content
stringlengths
1
15.9M
\section{Introduction} \noindent\textbf{Motivation.} We take the manifold hypothesis at face value and consider data consisting of a finite sample of a Riemannian manifold. We take the goal of \define{dimensionality reduction} to be that of learning an embedding of the input data in low dimension, in such a way that the differentiable structure of the underlying manifold is preserved. This is different from \define{charting}, whose objective we take to be that of producing local parametrizations of the data that, together, cover the entire manifold. We refer to dimensionality reduction algorithms which aim to preserve metric relationships and do not explicitly incorporate large scale topology in their objective function as \define{metric-based}. Metric-based algorithms work best when the Riemannian manifold underlying the data can be isometrically embedded in the target dimension. For example, algorithms such as Isomap \cite{tenenbaum-silva-langford}, Local Tangent Space Alignment (LTSA) \cite{zhang-zha}, and Hessian Eigenmaps (HLLE) \cite{donoho-grimes} assume that the manifold $\mathcal{X}$ underlying the data is \define{isometrically developable}, in the sense that $\mathcal{X}$ is a $d$-dimensional Riemannian manifold for which there exists an embedded $d$-dimensional manifold $\mathcal{X}' \subseteq \mathbb{R}^d$ and a diffeomorphism $\mathcal{X}' \to \mathcal{X}$ which is a Riemannian isometry. An isometrically developable manifold $\mathcal{X}$ is necessarily \define{flat} (i.e., locally isometric to Euclidean space) and \define{developable} (i.e., diffeomorphic to an embedded $d$-dimensional manifold $\mathcal{X}' \subseteq \mathbb{R}^d$). But a manifold can be flat and developable without it being isometrically developable: a simple example is that of a straight cyilinder in $\mathbb{R}^3$ (\cref{figure:cylinder-example}). As observed in \cite{lee-verleysen}, and shown in \cref{figure:cylinder-example}, already in the setting of a flat and developable $d$-dimensional manifold, metric-based dimensionality reduction algorithms can fail to find an embedding of the data in $\mathbb{R}^d$. On the mathematical side, while Whitney's embedding theorem \cite{whitney} guarantees that any closed $d$-dimensional manifold admits a smooth ($C^\infty$) embedding in $2d$ dimensions, a smooth, Riemannian isometric embedding of a closed $d$-dimensional Riemannian manifold can require in the order of $d^2$ dimensions \cite{cartan}. Thus, the preservation of distances requires more complicated embeddings than the preservation of topology. \begin{figure} \begin{center} \hspace*{-0.5cm} \raisebox{0.25cm}{\includegraphics[width=4cm]{figures/dataset-cylinder.pdf}} \hspace*{-0.5cm} \includegraphics[width=2.5cm]{figures/dataset-cylinder-isomap.pdf} \includegraphics[width=2.5cm]{figures/dataset-cylinder-ltsa.pdf} \includegraphics[width=2.5cm]{figures/dataset-cylinder-tsne.pdf} \includegraphics[width=2.5cm]{figures/dataset-cylinder-fibered.pdf} \end{center} \caption{\textbf{1}: A sample from a cylinder with height equal to $0.15$ times its radius, colored by height. The cylinder is developable, since it is diffeomorphic to an annulus in $\mathbb{R}^2$, and is also flat, but it is not isometric to the annulus, which also has a flat, yet distinct, Riemannian metric. \textbf{2,3,4}: Well known dimensionality reduction algorithms run on the cylinder data. The outputs are representative of other parameter choices and of the output of Laplacian Eigenmaps (LE) \cite{belkin-niyogi}, Diffusion Maps (DM) \cite{coifman-lafon}, LLE \cite{roweis-saul}, HLLE, t-SNE \cite{maaten-hinton}, and UMAP \cite{mcinnes-healy-melville}. Some algorithms only capture the circularity (\textbf{2}), others only the local 2D structure (\textbf{3}), while others (\textbf{4}) capture both, but they are not able to consistently align the local 2D structure. \textbf{5}: The output of fiberwise dimensionality reduction.} \label{figure:cylinder-example} \end{figure} If we remove a small portion of the cylinder of \cref{figure:cylinder-example}, in order to make it a curved rectangle, most metric-based dimensionality reduction algorithms have no problem finding an embedding in $\mathbb{R}^2$. It is thus the non-trivial topology of the cylinder---its circularity---that causes difficulties. This suggests that embeddings of topologically non-trivial manifolds can be built by gluing local representations along a representation of the global topological structure: in the case of the cylinder, one would try to glue 2D patches around a circle in a globally consistent manner. This leads to the following problem, formalized as the vector bundle embedding problem (\cref{problem:main-problem}): \hspace{0.2cm}{\itshape Given a dataset $X$ and an initial map $X \to \mathbb{R}^D$ capturing the large scale topology of $X$, find a new representation $X \to \mathbb{R}^D$ that captures the large scale topology as well as the local geometry.} We call our approach to the above problem \define{fiberwise dimensionality reduction} ({\normalfont\textsc{FibeRed}}{}). In the examples of \cref{section:examples}, we focus on manifolds with an essential loop, and, as initial map, we use circular coordinates based on persistent cohomology \cite{silva-morozov-vejdemo,perea-circular}, a technique from Topological Data Analysis \cite{oudot,ghrist}. Nevertheless, {\normalfont\textsc{FibeRed}}{} is not restricted to the case of a circular initial embedding. \noindent\textbf{Contributions.} We show that the theory of vector bundles is useful in abstracting (\cref{section:main-problem}), devising solutions to (\cref{section:main-algorithm}), and computing obstructions to solving (\cref{section:obstructions}) the problem of extending an initial coarse representation of data to a new, more descriptive representation. We demonstrate with computational examples (\cref{section:examples}) that efficient embeddings and chartings of topologically non-trivial data can be learned with this approach, and give examples supporting the claim that metric-based dimensionality reduction algorithms are often not able to find such representations. Our main algorithm, ${\normalfont\textsc{FibeRed}}{}$, can be efficiently implemented; an implementation can be found at \cite{scoccola-perea-2}. \noindent\textbf{Related work.} Various dimensionality reduction schemes \cite{teh-roweis, roweis-saul-hinton,brand} learn a global alignment of local linear models from the local interactions of the models, which can be challenging in the presence of non-trivial topology. In contrast, our approach assumes a global topological representation is given, and builds and aligns the local linear models along this representation. There has been recent interest in designing topology-preserving dimensionality reduction schemes \cite{luo-xu-zhang-jin,yan-zhao-rosen-scheidegger-wang,moor-horn-rick-borgwardt,wagner-solomon-bendich}. Our approach is different from previous approaches we are aware of, as it builds a new representation around an initial topological representation, instead of using topology to regularize an essentially metric objective. The cut-unfold technique of \cref{section:choosing-parameters} has a similar goal to that of \cite{lee-verleysen,yan-zhao-rosen-scheidegger-wang}, which propose to tear a data manifold in order to find efficient representations of it. A main difference is that our technique allows the user to select a specific hole to cut, and to use topological persistence to guide this choice. \section{Background and notation} \label{section:background} We give a brief description of the main topological notions relevant to this paper. We include detailed references for the interested reader. \noindent\textbf{Vector bundles.} We assume that manifolds, vector bundles, maps, and metrics are all smooth, i.e., $C^\infty$. For an introduction, we refer the reader to, e.g., \cite{milnor-stasheff,jost}. A \define{cover} of a topological space $\mathcal{B}$ is an indexed collection $\mathcal{U} = \{U_i\}_{i \in I}$ of open sets of $\mathcal{B}$ such that $\mathcal{B} = \bigcup_{i \in I} U_i$. When there is no risk of confusion, we may omit the indexing set. A rank $r$ (smooth) \define{vector bundle} $\pi : \mathcal{X} \to \mathcal{B}$ consists of a smooth map of differentiable manifolds such that each fiber $\pi^{-1}(b) \subseteq \mathcal{X}$ is endowed with the structure of a dimension $r$ real vector space, and such that there exists a cover $\mathcal{U} = \{U_i\}$ of $\mathcal{B}$ and diffeomorphisms $(\pi|_{\pi^{-1}(U_i)},f_i) : \pi^{-1}(U_i) \to U_i \times \mathbb{R}^r$ that induce a linear isomorphism $f_i|_{\pi^{-1}(b)} : \pi^{-1}(b) \to \mathbb{R}^r$ for each $b \in U_i \subseteq B$. The spaces $\mathcal{X}$ and $\mathcal{B}$ are called the \define{total space} and the \define{base space}, respectively, and the maps $\{(\pi|_{\pi^{-1}(U_i)},f_i) : \pi^{-1}(U_i) \to U_i \times \mathbb{R}^r\}$ are called a \define{trivialization} of the vector bundle $\pi$. A vector bundle $\pi : \mathcal{X} \to \mathcal{B}$ is \define{Euclidean} if each of its fibers $\pi^{-1}(b)$ is endowed with a scalar product $\langle -,-\rangle_b$ that varies smoothly with $b \in B$. A \define{metric trivialization} of a Euclidean vector bundle $\pi : \mathcal{X} \to \mathcal{B}$ consists of a trivialization in which the induced linear isomorphisms $\pi^{-1}(b) \to \mathbb{R}^r$ are isometries, where $\mathbb{R}^r$ is endowed with its usual scalar product. A \define{Riemannian manifold} consists of a smooth manifold $\mathcal{B}$ together with a Euclidean vector bundle structure on its tangent vector bundle $T\mathcal{B} \to \mathcal{B}$. Let $n \leq m$. The (compact) \define{Stiefel manifold} $\mathsf{V}(n,m)$ consists of the space of $m$-by-$n$ matrices with orthonormal columns, endowed with its usual differentiable structure. When $n=m$, the Stiefel manifold $\mathsf{V}(n,n)$ is equal to the \define{orthogonal group} $O(n)$ of orthogonal $n$-by-$n$ matrices. A \define{partition of unity} subordinate to a cover $\mathcal{U} = \{U_i\}$ of a topological space $\mathcal{B}$ consists of a family of continuous functions $\{\rho_i : \mathcal{B} \to \mathbb{R}\}$ taking non-negative values such that $\rho_i(x) = 0$ if $x \notin U_i$, for all $x \in \mathcal{B}$ we have that $\rho_i(x) \neq 0$ for only finitely many $i \in I$, and such that $\sum_{i} \rho_i(x) = 1$ for all $x \in \mathcal{B}$. \noindent\textbf{Simplicial complexes.} A \define{simplicial complex} consists of a set $S$ together with a family $\mathsf{simp}(S)$ of non-empty, finite subsets $S$, called \define{simplices}, that is closed under taking subsets and that contains all singletons. Any graph $G$ gives rise to a simplicial complex whose underlying set is the set of vertices of $G$, and whose simplices consist of the vertices and the edges of $G$. Another important example is that of the \define{nerve} of a cover $\mathcal{U} = \{U_i\}_{i \in I}$ of a topological space. The underlying set of the nerve of $\mathcal{U}$ is $I$, while the simplices consist of all finite subsets $J \subseteq I$ such that $\bigcap_{j \in J} U_j \neq \emptyset$. \noindent\textbf{(Persistent) cohomology.} We briefly recall some of the properties of cohomology \cite{hatcher} and persistence \cite{ghrist}. Given a topological space $\mathcal{B}$, a field $\mathbb{k}$, and $n \in \mathbb{N}$, the \define{$n$th cohomology group} of $\mathcal{B}$ with coefficients in $\mathbb{k}$ is a $\mathbb{k}$-vector space $H^n(\mathcal{B};\mathbb{k})$, whose dimension, informally, counts the number of $n$-dimensional wholes in $\mathcal{B}$. Cohomology is a functorial operation, which in particular implies that, given a family of topological spaces $\{\mathcal{B}_s\}_{s \in \mathbb{R}}$ such that $\mathcal{B}_s \subseteq \mathcal{B}_{s'}$ for $s \leq s'$, there exist linear maps $(s\leq s')^* : H^n(\mathcal{B}_{s'};\mathbb{k}) \to H^n(\mathcal{B}_{s};\mathbb{k})$ such that $(s\leq s')^* \circ (s' \leq s'')^* = (s \leq s'')^*$ for all $s \leq s' \leq s'' \in \mathbb{R}$. Under mild hypothesis, the family of $\mathbb{k}$-vector spaces and linear maps $\{H^n(\mathcal{B}_{s'};\mathbb{k}) \to H^n(\mathcal{B}_{s};\mathbb{k})\}$ can be described by a \define{persistence diagram} (PD) \cite[Chapter~1,~Section~3]{oudot}, which consists of a finite multiset of points $\{(x_i,y_i) \in \mathbb{R}^2 : y_i > x_i\}$, which has the property that the rank of the linear map $H^n(\mathcal{B}_{s'};\mathbb{k}) \to H^n(\mathcal{B}_{s};\mathbb{k})$ is equal to the number of points $(x_i, y_i)$ such that $x_i \leq s \leq s' < y_i$. Informally, a point $(x_i, y_i)$ in the $n$th persistence diagram of a filtered topological space $\{\mathcal{B}_s\}_{s \in \mathbb{R}}$ represents a hole in the filtration that first appears in $\mathcal{B}_{x_i}$ and disappears (is filled) in $\mathcal{B}_{y_i}$. When $\{\mathcal{B}_s\}$ is a well-behaved filtration, such a filtration of a finite simplicial complex, persistent cohomology can be used to construct cohomological coordinates, which are maps from the space that is being filtered into a topologically interesting space \cite{silva-morozov-vejdemo,perea-circular,perea-projective,polanco-perea}. We use \define{circular coordinates} as in \cite{perea-circular}, which, given a choice of point in the persistence diagram of the first cohomology group of the Vietoris--Rips filtration \cite[Definition~1.2]{ghrist} of (a subsample of) the data, returns a map from the data into the circle. The main takeaway here is that circular coordinates give a map into the circle which captures circularity present in the data. \section{Theory} \subsection{The vector bundle embedding problem} \label{section:main-problem} For background, please refer to \cref{section:background} and the references therein. In \cref{section:obstructions} we explain how characteristic classes of vector bundles give computable obstructions to solving the vector bundle embedding problem, and can thus be used for parameter selection. Let $\mathcal{B}$ be a closed differentiable manifold and let $\pi : \mathcal{X} \to \mathcal{B}$ be a rank $r$ Euclidean vector bundle with zero-section $s_0 : \mathcal{B} \to \mathcal{X}$, where by \define{Euclidean} we mean that $\pi$ is endowed with a scalar product on each fiber $\pi^{-1}(b) \subseteq \mathcal{X}$, which varies smoothly with $b \in \mathcal{B}$. The main problem we seek to solve is that of extending an embedding $\mathcal{B} \to \mathbb{R}^D$ to a fiberwise isometric embedding of $\mathcal{X}$, as follows: \begin{problem} \label{problem:main-problem} Given an embedding $\iota : \mathcal{B} \to \mathbb{R}^D$, find a fiberwise isometric embedding $\overline{\iota} : \mathcal{X} \to \mathbb{R}^D$ that extends $\iota$ in the sense that $\overline{\iota} \circ s_0 = \iota$, and that is orthogonal to $\mathcal{B}$, in the sense that $\overline{\iota}(\pi^{-1}(b))\, \bot \, \iota(T_{b}B)$ for all $b \in \mathcal{B}$. \end{problem} By \define{fiberwise isometric embedding} $\mathcal{X} \to \mathbb{R}^D$ we mean a map that is a linear isometry when restricted to each fiber $\pi^{-1}(b) \subseteq \mathcal{X}$, where $b \in \mathcal{B}$. Let $\nu : N \to \mathcal{B}$ be the normal bundle of the embedding $\iota : \mathcal{B} \to \mathbb{R}^D$, and endow $\nu$ with the Euclidean structure inherited from $\mathbb{R}^D$. The following result reduces \cref{problem:main-problem} to a problem only involving vector bundles. \begin{lemma} \label{lemma:reduction-main-problem} \cref{problem:main-problem} admits a solution if and only if there exists a morphism $\mathcal{X} \to N$ of vector bundles over $\mathcal{B}$ that is injective and an isometry in each fiber. \end{lemma} As is usual when working with bundles, one can solve \cref{problem:main-problem} locally. In order to do this, we trivialize the bundles $\mathcal{X}$ and $N$ over a common cover of the base $\mathcal{B}$, and construct the embedding $\mathcal{X} \to N$ by restricting to each element of the cover. Formally, we proceed as follows. Let $e$ be the dimension of $\mathcal{B}$, so that the rank of $\nu$ is $D - e$. Let $\mathcal{U} = \{U_i\}$ be a cover of $\mathcal{B}$ such that both $\pi$ and $\nu$ can be trivialized over $\mathcal{U}$, and let $\mathcal{X}_i := \pi^{-1}(U_i)$. Recall that $\mathsf{V}(n,m)$ denotes the Stiefel manifold, which consist of $m$-by-$n$ matrices with orthonormal columns, and that $O(n) = \mathsf{V}(n,n)$ denotes the orthogonal group. Let $\alpha = \{\alpha_i : U_i \to \mathsf{V}(D-e,D)\}$ be local bases for $N$, and let $\Theta = \{\Theta_{ij} : U_i \cap U_j \to O(D-e)\}$ be defined by $\Theta_{ij}(b) = \alpha_i(b) \circ \alpha_j(b)^T$ for all $b \in U_i \cap U_j$, so that $\Theta$ is a cocycle with associated vector bundle $\nu$. Finally, let $\{(\pi|_{\mathcal{X}_i},f_i) : \mathcal{X}_i \to U_i \times \mathbb{R}^r\}$ be a metric trivialization of $\mathcal{X}$ over $\mathcal{U}$, and let $\Omega = \{\Omega_{ij} : U_i \cap U_j \to O(r)\}$ be defined as the unique set of maps satisfying \begin{equation} \label{equation:omega-definition} \Omega_{ij}(\pi(x))\,f_j(x) = f_i(x), \text{ for all $x \in \mathcal{X}_i \cap \mathcal{X}_j$}, \end{equation} so that $\Omega$ is a cocycle with associated vector bundle $\pi$. We refer to the maps $\{f_i : \mathcal{X}_i \to \mathbb{R}^r\}$ as the \define{fiber coordinates}. With these definitions, one can use \cref{lemma:reduction-main-problem} to prove the following. \begin{proposition} \label{proposition:cocycle-characterization} There exists a fiberwise isometric embedding $\mathcal{X} \to N$ if and only if there exist maps $\Phi = \{\Phi_{i} : U_i \to \mathsf{V}(r,D-e)\}$ such that \begin{equation} \label{equation:idealized-objective-function} \Phi_i(b) \Omega_{ij}(b) = \Theta_{ij}(b) \Phi_j(b), \; \text{for all $i$ and $j$ and $b \in U_i \cap U_j$}. \end{equation} \end{proposition} Given the maps $\Phi = \{\Phi_{i} : U_i \to \mathsf{V}(r,D-e)\}$ of \cref{proposition:cocycle-characterization}, one obtains the fiberwise isometric embedding $\overline{\iota} : \mathcal{X} \to \mathbb{R}^D$ by $\overline{\iota}(x) = \alpha_i(b) \, \Phi_i(b) \, f_i(x) + \iota(b)$, where $b = \pi(x)$. In general, the fiberwise isometric embedding $\overline{\iota} : \mathcal{X} \to \mathbb{R}^D$ is not an embedding of $\mathcal{X}$ as a manifold, since different fibers may intersect. Nonetheless, if $\tau > 0$ is the \define{reach} (\cite[Definition~2.1]{aamari-kim-chazal-michel-rinaldo-wasserman}) of $\iota(\mathcal{B}) \subseteq \mathbb{R}^D$, i.e., the largest possible radius of a uniform tubular neighborhood around $\iota(\mathcal{B})$, one can find an embedding of a full-dimensional compact subset of $\mathcal{X}$ by scaling the fibers by a fraction of $\tau$, as follows. Let $\mathsf{disk}(\pi) \subseteq \mathcal{X}$ be the unit disk of the bundle $\pi$, namely, the subspace of points $x \in \mathcal{X}$ such that $\|x - s_0(\pi(x))\| \leq 1$, where $\|-\|$ denotes the norm of the fiber $\pi^{-1}(\pi(x))$ induced by the Euclidean structure of $\pi$. Then, the following formula gives an embedding $\mathsf{disk}(\pi) \to \mathbb{R}^D$: \begin{equation} \label{equation:assembly-theory} x \;\mapsto\; c\,\tau \cdot \alpha_i(\pi(x)) \, \Phi_i(\pi(x)) \, f_i(x) + \iota(\pi(x)), \;\text{ for $\pi(x) \in U_i$,} \end{equation} where $0 < c < 1$ is any fixed constant. \subsection{Vector bundles from finite samples} \label{section:discretization} In practice, continuous maps to a Stiefel manifold or orthogonal group---such as the maps $\{\alpha_i : U_i \to \mathsf{V}(D-e,D)\}$ or the cocycle $\{\Omega_{ij} : U_i \cap U_j \to O(r)\}$ of \cref{section:main-problem}---are hard to work with, as they are potentially determined by an infinite amount of data. One of the main takeaways of \cite{scoccola-perea} is that one can work with Euclidean vector bundles in practice by considering only constant maps into Stiefel manifolds or orthogonal groups. In order to accomplish this, one relaxes the notion of Euclidean vector bundle as follows. Given a simplicial complex $S$, a rank $r$ \define{discrete approximate} cocycle on $S$ (\cite[Definition~5.1]{scoccola-perea}) consists of a family of matrices $\{\Omega_{ij} \in O(r)\}$ indexed by the oriented $1$-simplices of $S$ which satisfies $\Omega_{ij} = \Omega_{ji}^T$. There is a similar way of discretizing maps into a Stiefel manifold (\cite[Definition~5.4]{scoccola-perea}). These discretizations can be used to represent usual vector bundles \cite[Theorem~A]{scoccola-perea} and any vector bundle can be represented in this way \cite[Proposition~5.7]{scoccola-perea}. This justifies the fact that, in \cref{section:main-algorithm}, we discretize the base $\mathcal{B}$ by considering the simplicial complex given by the nerve of a cover $\mathcal{U} = \{U_i\}$, and we consider constant maps from $U_i$ into a Stiefel manifold and from $U_i \cap U_j$ into an orthogonal group. \subsection{Computable obstructions to vector bundle embedding} \label{section:obstructions} The theory of vector bundles provides us with algebraic obstructions to solving \cref{problem:main-problem}, namely, characteristic classes. We now give a few details about the subject; we refer the reader to \cite{milnor-stasheff} for a detailed account of the theory of characteristic classes. To a vector bundle $\pi : \mathcal{X} \to \mathcal{B}$ and number $i \in \mathbb{N}$, one can associate an element $w_i(\pi) \in H^i(\mathcal{B};\mathbb{Z}/2)$ of the $i$th cohomology group of $\mathcal{B}$ with coefficients in the two-element group $\mathbb{Z}/2$, called the \define{$i$th Stiefel--Whitney class} of $\pi$. This procedure is such that, if $\pi$ and $\pi'$ are isomorphic vector bundles over the same base $\mathcal{B}$, then $w_i(\pi) = w_i(\pi')$. To give some intuition, we mention the well known fact that the first Stiefel--Whitney class of a vector bundle is zero if and only if the vector bundle is orientable, in the sense that one can orient all fibers in such a way that the orientation is preserved by some trivialization. If \cref{problem:main-problem} admits a solution, then there exists a complement of $\pi$ in $\nu$, that is there exists a rank $D-b-r$ vector bundle $\kappa$ over $\mathcal{B}$ such that $\pi \oplus \kappa \cong \nu$, where $\oplus$ denotes the direct sum of vector bundles. It follows from the Whitney product formula \cite[Section~4,~Axiom~3]{milnor-stasheff} that $w(\pi) \smallsmile w(\kappa) = w(\nu)$, where $\smallsmile$ denotes the cup-product in cohomology \cite[Section~3.2]{hatcher}. In particular, when \cref{problem:main-problem} admits a solution, we have the following: \begin{itemize}[leftmargin=8mm] \item If $D = r + e$, then $w_1(\pi) = w_1(\nu) \in H^1(\mathcal{B}; \mathbb{Z}/2)$. \item If $D = r+e+1$, then $w_2(\pi) - w_1(\pi)^2 + w_1(\pi) \smallsmile w_1(\nu) = w_2(\nu) \in H^2(\mathcal{B}; \mathbb{Z}/2)$. \end{itemize} These equalities are obstructions to the existence of a solution to \cref{problem:main-problem}: indeed, if any of these equalities is not satisfied, then \cref{problem:main-problem} does not admit a solution. Using the algorithms of \cite[Theorem~C]{scoccola-perea}, these obstructions can be effectively computed from finite samples. In \cref{section:obstructions-examples} we show the result of computing these obstructions for the examples of \cref{section:examples}, which we use to select the target dimension $D$. \section{The fiberwise dimensionality reduction scheme} \label{section:main-algorithm} We describe the {\normalfont\textsc{FibeRed}}{} algorithm in \cref{section:main-routine,section:subroutines}. In \cref{section:choosing-parameters}, we explain how we choose parameters. Since we work with finite samples, we need to use a discrete representation of vector bundles; for this we use discrete approximate cocycles, as in \cite{scoccola-perea} (see \cref{section:discretization} for details). To facilitate the interpretation of the different steps of the algorithm, the notation is kept as in \cref{section:main-problem}, except for the spaces $\mathcal{X}$ and $\mathcal{B}$, which we denote here by $X$ and $B$ to emphasize the fact that we are working with finite samples $X \subseteq \mathcal{X}$ and $B \subseteq \mathcal{B}$. Precise assumptions about the input of the algorithm are in \cref{section:assumptions}. We remark that our algorithm can be efficiently implemented; we give more details in \cref{section:efficiency}. \subsection{Assumptions about input of {\normalfont\textsc{FibeRed}}{}} \label{section:assumptions} The assumptions here are made so that we can justify the steps of the algorithm; formally addressing the consistency of the algorithm is left for future work. We assume that there exists a closed manifold $\mathcal{B}$ of dimension $e$, a rank $r$ Euclidean vector bundle $\pi : \mathcal{X} \to \mathcal{B}$, a Riemannian metric on $\mathcal{X}$, and a smooth embedding $\iota : \mathcal{B} \to \mathbb{R}^D$. We assume that the Riemannian metric on $\mathcal{X}$ is compatible with the Euclidean structure of the vector bundle $\pi$, in the sense that, given any metric trivialization of $\pi$ by maps $\{(\pi|_{\mathcal{X}_i},f_i) : \mathcal{X}_i \to U_i \times \mathbb{R}^r\}$, and $x \in \mathcal{X}$, the composite \[ \mathbb{R}^r \to T_{\pi(x)}\mathcal{B} \oplus T_{f_i(x)} \mathbb{R}^r \xrightarrow{\left(d (\pi|_{\mathcal{X}_i},f_i)_x\right)^{-1}} T_x \mathcal{X} \] is a linear isometric monomorphism. Here, the first map is the inclusion in the second component of the direct sum, where we are using the standard identification between tangent spaces of a Euclidean space and the Euclidean space itself. The input metric space of {\normalfont\textsc{FibeRed}}{} is assumed to be a sample $X \subseteq \mathcal{X}$, which implies, in particular, that its image $B := \pi(X)$ is a sample $B \subseteq \mathcal{B}$. Note that we do not ask for the embedding $\iota : \mathcal{B} \to \mathbb{R}^D$ to preserve the Riemannian structure of $\mathcal{B}$ inherited from that of $\mathcal{X}$. Note also that, when solving the vector bundle embedding problem, only the Euclidean structure of $\pi$ is required to be preserved, although we assumed that the total space $\mathcal{X}$ has a (compatible) Riemannian metric. We require a metric on $\mathcal{X}$ since most datasets come with a (global) distance, so we need to make some assumption about how this distance is generated. \subsection{Main routine} \label{section:main-routine} \begin{wrapfigure}{R}{0.6\textwidth} \begin{minipage}{0.6\textwidth} \vspace{-1cm} \begin{algorithm}[H] \begin{algorithmic}[1] \State $\mathcal{U}, \rho \gets {\normalfont\textsc{CoverAndPartitionUnity}}(k,B)$ \State $\mathcal{N} \gets {\normalfont\textsc{Nerve}}(B,\mathcal{U})$ \For{$1 \leq i \leq k$} \State $\ell_i \gets {\normalfont\textsc{LocalLinearRepresentation}}(X,\mathcal{U},d,i)$ \State $\Psi_i, \alpha_i \gets {\normalfont\textsc{EstTangAndNormBun}}(B,\mathcal{U},e,i)$ \State $\overline{f}_i \gets {\normalfont\textsc{EstNormFiberCoordinates}}(B,\Psi_i,\ell_i)$ \EndFor \State $\tau \gets {\normalfont\textsc{EstReach}}(B,\mathcal{U},\Psi)$ \For{$(ij) \in \mathcal{N}$} \State $\Omega_{ij},\Theta_{ij} \gets {\normalfont\textsc{EstCocycles}}(\overline{f}_i,\overline{f}_j,\alpha_i,\alpha_j)$ \EndFor \State $\Phi \gets {\normalfont\textsc{AlignFibers}}(\mathcal{N}, \Omega, \Theta, \texttt{n\_iter})$ \State \Return ${\normalfont\textsc{Assemble}}(\rho, \tau, c, \alpha, \Phi, \overline{f}, \pi)$ \end{algorithmic} \caption{${\normalfont\textsc{FibeRed}}(X,\pi,k,e,d,c,\texttt{n\_iter})$} \label{alg:cap} \end{algorithm} \vspace{-1.4cm} \end{minipage} \end{wrapfigure} \paragraph{Inputs.} A dataset represented by a finite set $X$ together with a distance matrix $\partial : X \times X \to \mathbb{R}$; and a function $\pi : X \to \mathbb{R}^D$. We let $B := \pi(X) \subseteq \mathbb{R}^D$. \noindent\textbf{Parameters.} A number $k \in \mathbb{N}$, the number of sets we use to construct a cover of $B$; a number $\texttt{n\_iter} \in \mathbb{N}$ used in the ${\normalfont\textsc{AlignFibers}}$ subroutine; an estimate $e \in \mathbb{N}$ of the intrinsic dimension of $\mathcal{B}$; an estimate $d \in \mathbb{N}$ of the intrinsic dimension of $\mathcal{X}$; a fiber scale $0 < c < 1$. \noindent\textbf{Output.} A new map $X \to \mathbb{R}^D$. \subsection{Subroutines} \label{section:subroutines} \noindent\textbf{Compute cover and partition of unity ({\normalfont\textsc{CoverAndPartitionUnity}}).} We compute a cover $\mathcal{U} = \{U_i \subseteq B\}_{1 \leq i \leq k}$ of $B$ as follows. We first run on $B$ an approximate algorithm for the $k$-center problem. We use a simple, greedy approach, but more sophisticated options are available (see, e.g., \cite{garcia-menchaca-menchaca-pomares-perez-lakouari} for a survey). This results in $k$ points $\{b_1, \dots, b_k\} \subseteq B$ and in a radius $c > 0$ such that any point of $B$ is at distance at most $c$ from some $b_i$. We then let $U_i = \{b \in B : \|b - b_i\| < 3c\}$. The factor of $3$ is arbitrary; we choose it to ensure that elements of the cover have sufficiently large intersections. We compute a partition of unity $\rho = \{\rho_i : U_i \to \mathbb{R}\}$ subordinate to $\mathcal{U}$ by first defining $p_i(x) = \exp\left( -1/(1 - (\|x - b_i\|/(3c))^2) \right)$ for $x \in U_i$ and $p_i(x) = 0$ for $x \not\in U_i$, and then normalizing as follows $\rho_i(x) = p_i(x) / \sum_j p_j(x)$. \noindent\textbf{Compute nerve of cover ({\normalfont\textsc{Nerve}}).} We let $\mathcal{N}$ be the undirected graph with vertices $1 \leq i \leq k$ and an edge $(ij)$ with weight $s_{ij} = |U_i \cap U_j|$ when $U_i \cap U_j \neq \emptyset$. \noindent\textbf{Compute local linear representation ({\normalfont\textsc{LocalLinearRepresentation}}).} Given $1 \leq i \leq k$, we let $X_i := \pi^{-1}(U_i)$ and apply a linear dimensionality reduction algorithm to each $X_i$, resulting in a function $\ell'_i : X_i \to \mathbb{R}^d$. In our implementation, we use classical multidimensional scaling (see, e.g., \cite{borg-groenen}). We then mean-center $\ell'_i$ to get a function $\ell_i : X_i \to \mathbb{R}^d$. \noindent\textbf{Estimate local trivialization of tangent and normal bundle ({\normalfont\textsc{EstTangAndNormBun}}).} Given $1 \leq i \leq k$, we compute an orthonormal frame $\Psi_i \in \mathsf{V}(e,D)$ by applying PCA with target dimension $e$ to $U_i \subseteq \mathbb{R}^D$. We then compute an orthonormal frame $\alpha_i \in \mathsf{V}(D-e,D)$ such that $\alpha_i \perp \Psi_i$. \noindent\textbf{Estimate normalized fiber coordinates ({\normalfont\textsc{EstNormFiberCoordinates}}).} Given $1 \leq i \leq k$, we define $t : X_i \to \mathbb{R}^{e}$ by $t(x) = \Psi_i^T (\pi(x) - b_i)$. We find a linear transformation $m : \mathbb{R}^{d} \to \mathbb{R}^{e}$, which has minimal Frobenius norm and minimizes \begin{equation} \label{equation:fiber-coordinate-fit} \sum_{x \in X_i} \|t(x) - m(\ell_i(x))\|^2, \end{equation} and compute an orthonormal frame $\eta_i \in \mathsf{V}(r,d)$ with image in the kernel of $m$. We let $f_i := \eta_i^T \circ \ell_i : X_i \to \mathbb{R}^{r}$, and obtain a normalized fiber coordinate $\overline{f}_i : X_i \to \mathbb{R}^{r}$ with image contained in the unit ball by normalizing $f_i$. We justify these choices in \cref{section:justification-fiber-coordinates}. \noindent\textbf{Estimate reach ({\normalfont\textsc{EstReach}}).} If $\{b_1, \dots, b_k\} \subseteq B$ are the centers of the $k$ balls used to construct the cover $\mathcal{U}$ in {\normalfont\textsc{CoverAndPartitionUnity}}, we compute an estimate of the reach of $B$ by \[ \tau = \inf_{i\neq j} \frac{\|b_j - b_i\|^2}{2 \sqrt{\|b_j - b_i\|^2 - \|\Psi_i^T (b_j - b_i)\|^2} }. \] This formula is equivalent to \cite[Equation~6.1]{aamari-kim-chazal-michel-rinaldo-wasserman}, where it is proven that, under suitable assumption, it yields a consistent estimator of the reach. \noindent\textbf{Estimate cocycles for $\nu$ and $\pi$ ({\normalfont\textsc{EstCocycles}}).} Based on \cref{equation:omega-definition}, given $(ij) \in \mathcal{N}$, we compute an orthogonal matrix $\Omega_{ij} \in O(r)$ which minimizes \[ \sum_{x \in X_i \cap X_j} \|\Omega_{ij} f_j(x) - f_i(x)\|^2. \] We also compute an orthogonal matrix $\Theta_{ij} \in O(D - e)$ which minimizes $\|\Theta_{ij} - \alpha_i^T \alpha_j\|_F$, where $\|-\|_F$ denotes the Frobenius norm. Both minimizations are instances of the orthogonal Procrustes problem, which can be solved using SVD (see, e.g., \cite[Section~7.4]{horn-johnson}). \noindent\textbf{Align fibers ({\normalfont\textsc{AlignFibers}}).} Based on \cref{equation:idealized-objective-function}, we compute orthonormal frames $\{\Phi_i \in \mathsf{V}(r,D - e)\}$ minimizing the following expression; we describe the minimization procedure in \cref{section:minimizing-objective}. \begin{equation} \label{equation:objective-function} \sum_{(ij) \in \mathcal{N}} s_{ij} \; \| \Phi_i \Omega_{ij} - \Theta_{ij} \Phi_j\|_F. \end{equation} \noindent\textbf{Compute final representation ({\normalfont\textsc{Assemble}}).} Based on \cref{equation:assembly-theory}, we represent $x \in X$ by \[ \sum_{1 \leq i \leq k} \rho_i(x) \;\big( c\tau \cdot \alpha_i\, \Phi_i\, \overline{f}_i(x) + \pi(x) \big). \] \subsection{Minimizing \cref{equation:objective-function}} \label{section:minimizing-objective} The minimization problem in {\normalfont\textsc{AlignFibers}}{} is non-convex, so a possible solution is to do gradient descent in a product Stiefel manifold. This is the approach we take, except that we avoid explicitly computing a gradient, and take a sampling based approach, as done in, e.g., LargeVis \cite{tang-liu-zhang-mei}. Before describing the approach, we note that, in the case $D = r + e$, the Stiefel manifold $\mathsf{V}(r,r)$ is equal to the orthogonal group $O(r)$, which is disconnected. Thus, in this case, any local optimization approach to minimizing \cref{equation:objective-function}, such a gradient descent, is bound to fail. In \cref{section:preprocessing} we describe a procedure based on the notion of synchronization (see, e.g., \cite{singer}), which reduces the problem from having to align using matrices in $O(r)$ to using matrices in $SO(r)$, which is connected. \noindent\textbf{Iterative procedure.} We start by initializing $\{\Phi_i \in \mathsf{V}(r,D-e)\}$ at random and setting $a = 1$. For $1 \leq n \leq \texttt{n\_iter}$, we proceed as follows. We sample an edge $(ij) \in \mathcal{N}$ with probability proportional to its weight $s_{ij}$, let $M$ be an orthonormal frame minimizing $\|M \Omega_{ij} - \Theta_{ij} \Phi_j\|_F$, and replace $\Phi_i$ with a closest orthonormal frame to the convex combination of matrices $(1-a) \Phi_i + a M$. Finally, we replace $a$ with $1 - n/\texttt{n\_iter}$. \subsection{Preprocessing in the case $D = r+e$.} \label{section:preprocessing} In this case, the matrices $\Phi$, $\Omega$, and $\Theta$ are in $O(r)$. The preprocessing consists of replacing the matrices $\{\Theta_{ij}\}$ by matrices that induce an equivalent problem to the one of minimizing \cref{equation:objective-function}, but for which the matrices $\{\Phi_i\}$ we look for can be taken to be in the special orthogonal group $SO(r)$, which is connected. Note that, if we want $\Phi_i \Omega_{ij}$ and $\Theta_{ij} \Phi_j$ to belong to the same connected component of $O(r)$, then we must have $\det(\Omega_{ij})\det(\Theta_{ij}) = \det(\Phi_i)\det(\Phi_j) \in O(1) = \{-1,+1\}$. This suggests that we can let $\omega_{ij} = \det(\Omega_{ij})\det(\Theta_{ij}) \in O(1)$ and consider first the problem of finding $\{\lambda_i \in O(1)\}$ such that $\lambda_i \lambda_j = \omega_{ij}$, which leads to minimizing the objective function \[ \sum_{(ij) \in \mathcal{N}} s_{ij} \; |\omega_{ij} - \lambda_i \lambda_j|^2. \] This is a well known synchronization problem, for which an approximate solution can be found effectively and efficiently with spectral methods \cite{singer-wu,bandeira-singer-spielman}. Here, we use \cite[Algorithm~2.3]{bandeira-singer-spielman}, with $d = 1$, which yields an approximate solution $\{\lambda_i \in O(1)\}$. Given $\lambda \in O(1) = \{-1,+1\}$ let $M(\lambda) \in O(r)$ be the diagonal matrix with all diagonal entries equal to $1$, except for the first one, which is equal to $\lambda$. With this in mind, we can replace $\Theta_{ij}$ by $M(\lambda_i) \Theta_{ij} M(\lambda_j)$. Having done this, we can now restrict the matrices $\{\Phi_i\}$ to belong to the connected component of $O(r)$ of orthogonal matrices with $+1$ as determinant. More specifically, we now can carry out the optimization procedure described in \cref{section:minimizing-objective}, but restring the matrices $\{\Phi_i\}$ to be in $SO(r) \subseteq O(r) = \mathsf{V}(r,r)$. \subsection{Justification of estimate of fiber coordinates} \label{section:justification-fiber-coordinates} Let $x := s_0(b_i) \in \mathcal{X}$. We interpret the local model $\ell_i : X_i \to \mathbb{R}^d$ as a projection $\ell_i : X_i \to T_{x} \mathcal{X} \cong \mathbb{R}^d$ of $X_i$ onto the tangent space at the origin of the fiber $\pi^{-1}(b_i)$. In the idealized case (\cref{section:assumptions}), the fiber coordinate $f_i : \mathcal{X}_i \to \mathbb{R}^r$ is given by any map fitting into a fiberwise isometric diffeomorphism $(\pi|_{\mathcal{X}_i}, f_i) : \mathcal{X}_i \to U_i \times \mathbb{R}^r$. When dealing with finite samples, we approximate $f_i$ by the composite \[ X_i \xrightarrow{\ell_i} T_x \mathcal{X} \xrightarrow{(d f_i)_{x}} T_{f_i(x)}\mathbb{R}^r \cong \mathbb{R}^r. \] Note that, by assumption, $(d f_i)_x$ is the second component of an isometric isomorphism of Euclidean vector spaces $d(\pi, f_i)_x : T_{x} \mathcal{X} \to T_{b_i} \mathcal{B} \oplus \mathbb{R}^r$, in which the two direct summands are orthogonal. It is thus sufficient to estimate the first component $d \pi_x : T_x \mathcal{X} \to T_{b_i} \mathcal{B}$ and to then compose $\ell_i$ with the orthogonal projection onto the orthogonal complement of $d\pi_x$. We do have an estimate for the composite \[ X_i \xrightarrow{\ell_i} T_x \mathcal{X} \xrightarrow{d \pi_{x}} T_{b_i}\mathcal{B} \cong \mathbb{R}^e, \] namely $t = \Psi_i^T \circ \pi|_{X_i} : X_i \to \mathbb{R}^{e}$, but, since the embedding $\mathcal{B} \subseteq \mathbb{R}^D$ is not required to preserve the Riemannian structure of $\mathcal{B}$ inherited from that of $\mathcal{X}$, the map $t$ is an approximation of $d\pi_x \circ \ell_i$ up to a linear map $m : \mathbb{R}^d \to \mathbb{R}^e$. This justifies finding $m$ by minimizing \cref{equation:fiber-coordinate-fit}, and getting the approximate fiber coordinate $f_i$ by composing $\ell_i$ with the orthogonal projection onto the kernel of $m$. \subsection{Choosing input and parameters} \label{section:choosing-parameters} \noindent\textbf{Parameters.} An estimate of the dimensions $e$ of $B$ and $d$ of $X$ can be obtained by applying the elbow method to the explained variance of PCA applied to each of the sets $U_i$ and $X_i$, but more sophisticated algorithms are available; see, e.g., \cite{little-lee-jung-maggioni}. The parameter $k$ is chosen to be large enough so that the cover $\mathcal{U}$ captures the topology of the base space $B$, and such that each open ball of the cover is sufficiently small so that it can be approximated reasonable well by a linear space. In our case, when the base space is the circle, we use $k = 16$. The algorithm is robust to the choice of parameter $\texttt{n\_iter}$, which we choose to be $1000$ in all of our examples. \noindent\textbf{Choosing base map and $D$.} In the examples, we construct the initial map $\pi : X \to \mathbb{R}^D$ in two ways. The first way is to use the persistent cohomology of the initial data $X$ to construct circular coordinates $X \to S^1$ and then embed the circle $S^1$ as the unit circle in the plane spanned by the first two coordinates of $\mathbb{R}^D$, $D \geq 2$, which gives us the initial map $\mathcal{X} \to \mathbb{R}^D$. In order to choose the embedding dimension $D$, we compute the Stiefel--Whitney obstructions, as in \cref{section:obstructions}. Since the base space is the circle, which is $1$-dimensional, only the first Stiefel--Whitney class provides an obstruction. The Stiefel--Whitney class of the normal bundle of the embedding $S^1 \subseteq \mathbb{R}^D$ is trivial. Thus, if the first Stiefel--Whitney class of the estimated cocycle $\Omega$ is trivial, we set $D = r + 1$, and if it is non-trivial, we set $D = r + 2$. The second way is to use the cut-unfold technique, explained next, with the circular coordinates and map $\mathcal{X} \to \mathbb{R}^D$ by embedding the interval $[0,1)$ as the unit interval of the line spanned by the first coordinate of $\mathbb{R}^D$. In this case, since the interval is topologically trivial (contractible), the Stiefel--Whitney classes give no obstructions, and thus we set $D = r + 1$. \noindent\textbf{Cut-unfold technique.} Some topologically non-trivial spaces can be described as a simple quotient of a simple topological space. For example, the circle $S^1$ is the quotient of the interval $[0,1]$ that identifies $0$ and $1$. Thus, given a continuous map $\mathcal{X} \to S^1$, one gets a function $\mathcal{X} \to [0,1)$, which is still continuous if we ``cut'' the topology of $\mathcal{X}$ at the preimage of $0$. \section{Examples} \label{section:examples} We apply {\normalfont\textsc{FibeRed}}{} to three examples. We reproduce a dynamical system simulation from \cite{charo-artana-sciamarella} and reconstruct one of its attractors---a torus. We reconstruct the conformation space---a M\"obius band---and energy landscape of the pentane molecule from a simulation using \texttt{RDKit} \cite{rdkit}; this is inspired by an analysis in \cite{membrillo-pirashvili-steinberg-brodzki-frey}. Finally, we reconstruct the conformation space of the cyclooctane molecule---a Klein bottle glued to a $2$-sphere---using the data of \cite{martin-thompson-coutsias-watson}. We compare {\normalfont\textsc{FibeRed}}{} to various well known dimensionality reduction algorithms (see \cref{section:other-runs} for more plots). \cref{table:minimal-target-dimensions} summarizes the minimal target dimensions for which the algorithms are able to recover the topology of the data without tears or self intersections. Given that we consider topologically non-trivial data, we follow \cite{rieck-leitte,paul-chalup} and evaluate the output of algorithms using persistent homology and persistence diagrams (PDs) to quantify the preservation of large scale topology (see \cref{section:background} for background and references). When we do not clarify the field of coefficients used to compute a PD, the PD is independent of this choice. For the initial map $\pi : X \to B$ we use the implementation of circular coordinates in \cite{dreimac}. The parameters for {\normalfont\textsc{FibeRed}}{} are chosen as in \cref{section:choosing-parameters}. For persistent homology computations, we use \texttt{Ripser} \cite{bauer} on geodesic distance, estimated as shortest path distance in a 15-nearest neighbor graph. For other dimensionality reduction algorithms, we use their \texttt{Scikit-learn} implementation \cite{scikit-learn}. \begin{table}[ht] \footnotesize \begin{center} \begin{tabular}{c|c|c|c|c|c|c|c|c|c|} \cline{2-10} & Optimal & Isomap & t-SNE & LE/DM & LLE & HLLE & LTSA & UMAP & FibeRed \\ \hline \multicolumn{1}{|l|}{Cylinder} & 2 & 3 & 3 & 3 & 3 & 3 & 3 & 3 & \textbf{2} \\ \hline \multicolumn{1}{|l|}{Torus} & 3 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & \textbf{3} \\ \hline \multicolumn{1}{|l|}{M\"{o}bius band} & 3 & 4 & 4 & \textbf{3} & N/A & N/A & N/A & \textbf{3} & \textbf{3} \\ \hline \multicolumn{1}{|l|}{Klein bottle} & 4 & 5 & 5 & 7 & 7 & 5 & 5 & \textbf{4} & \textbf{4} \\ \hline \end{tabular} \end{center} \caption{The minimal target dimension that can be chosen for each of the algorithms considered in this section, so that there exist parameters that return a topologically faithful embedding of the data. ``Optimal'' refers to the theoretical minimal embedding dimension. ``Cylinder'' refers to the dataset of \cref{figure:cylinder-example}. ``Torus'', ``M\"obius band'', and ``Klein bottle'' refer to the three datasets considered in this section. Since the M\"obius band data is not Euclidean, some algorithms cannot be run on these data; we denote this with ``N/A''. } \label{table:minimal-target-dimensions} \end{table} \noindent\textbf{Torus from attractor of double-gyre dynamical system.} Dynamical systems can be analyzed by studying the topology of their attractors \cite{abarbanel,perea}. Given a real-valued time series coming from measurements of a given particle on which a dynamical system acts, one can obtain a pointcloud by constructing a delay embedding of the time series, which, under certain conditions, is concentrated around a diffeomorphic copy of the attractor the particle is converging to \cite{perea}. Using the delay embedding method with target dimension $4$, it was shown in \cite[Section~4.1]{charo-artana-sciamarella} that a certain attractor of the double-gyre dynamical system \cite{shadden-lekien-marsden} is orientable, and has the homology of a torus. Here, we reproduce the simulation of \cite{charo-artana-sciamarella}, and apply dimensionality reduction to this $4$D pointcloud, with the goal of embedding the attractor and its dynamics in $\mathbb{R}^3$. In \cref{figure:torus-example}, we show the results of {\normalfont\textsc{FibeRed}}{} and t-SNE. In order to highlight self-intersections in low-dimensional representations, we use the following function: given a dataset $X$ and a representation of it $f : X \to Y$ let $\kappa : X \to \mathbb{R}$ be defined by $\kappa(x) = \min_{y \in X} d_Y(f(x),f(y))/d_X(x,y)$. The output of t-SNE in \cref{figure:torus-example} is representative of the output with other parameter choices and other dimensionality reduction algorithms we have tried on this data (LE, DM, LLE, HLLE, LTSA, Isomap, UMAP): if the target dimension is 3, there are always self-intersections or tears. The difficulty faced by metric-based algorithms in this example is that the input torus in 4D has a flat metric, and thus it does not admit a smooth isometric embedding in $\mathbb{R}^3$. \begin{figure} \begin{center} {\def0.9\textwidth{1\textwidth} \footnotesize \input{figures/torus-all-3.pdf_tex}} \end{center} \caption{\textbf{1}: The PD of the original pointcloud (two prominent $1$-dimensional classes, and one prominent $2$-dimensional class). \textbf{2}:~The output of {\normalfont\textsc{FibeRed}}{} with the reconstructed dynamics and side view; and the PD of the output (which matches the PD of the original pointcloud well). \textbf{3}: The output of t-SNE on the same data and side view, colored by $\kappa$ (red is smaller): there seem to be two self-intersections; and the PD of the output of t-SNE, which has one prominent $1$-dimensional hole and two $2$-dimensional voids, confirming that the red regions have been pinched. } \label{figure:torus-example} \end{figure} \noindent\textbf{M\"obius band from conformation space of pentane.} Any fixed molecule admits different realizations, or \define{conformations}, in three-dimensional space. In, e.g., molecular dynamics \cite{haile}, one is interested in understanding all possible conformations of a molecule. The collection of conformations up to rotations and translations is known as the \define{conformation space} of the molecule. Each conformation has an associated energy, and the conformation space together with the energy function is known as the \define{energy landscape} of the molecule. We reconstruct the conformation space and energy landscape of the pentane molecule from a simulation (see \cref{section:pentane-data-generation} for details). The pentane molecule has two rotational degrees of freedom (modelled as a torus $S^1 \times S^1$), but also has a symmetry which interchanges the two angles of rotation. For this reason, the (unlabeled) conformation space consists of a quotient of the torus, which can be seen to be a M\"obius band. In \cref{figure:mobius-example}, we embed the conformation space of pentane in $\mathbb{R}^3$, and compare the output of {\normalfont\textsc{FibeRed}}{} to that of Isomap and t-SNE. LE and DM are able to recover a M\"obius band in $\mathbb{R}^3$; since UMAP uses LE as initialization, it is also able to recover the M\"obius band in $\mathbb{R}^3$. In \cref{figure:mobius-example-conformation}, we use the cut-unfold technique to find a fundamental domain of the conformation space, and estimate the energy landscape. The difficulty faced by some of the metric-based dimensionality reduction algorithms in this example is that, with respect to the intrinsic metric, the ratio between the height of the M\"obius band and its circumference is approximately $2/3$, and thus there is no isometric embedding in $\mathbb{R}^3$ \cite[Theorem~15.1]{halpern-weaver}. \begin{figure} \begin{center} {\def0.9\textwidth{1\textwidth} \footnotesize {\input{figures/mobius-all.pdf_tex}}} \end{center} \caption{\textbf{1}: The PD of the original pointcloud, which has one prominent 1-dimensional class. \textbf{2}: The output of {\normalfont\textsc{FibeRed}}{} and its PD. \textbf{3}: The output of Isomap and its PD. Regardless of the parameter for Isomap, the algorithm is unable to capture the circularity of the data, and thus its PD has no prominent features. \textbf{4}: The output of t-SNE and its PD. Regardless of the parameters for t-SNE, the algorithm is unable to capture the circularity and non-orientability of the data without tears, which cause the output to have two holes. Outputs are colored by the fiber coordinate estimated by {\normalfont\textsc{FibeRed}}{}. } \label{figure:mobius-example} \end{figure} \begin{figure} \begin{center} {\def0.9\textwidth{1\textwidth} \scriptsize \itshape {\input{figures/inkscape-conformation-space-2.pdf_tex}}} \end{center} \caption{\textbf{Left}: the 2D representation of the conformation space of pentane using {\normalfont\textsc{FibeRed}}{} with the cut-unfold technique, colored by energy. Arrows indicate how the data must be glued in order to recover its global topology; this information can be extracted from the cocycle $\Omega$ of ${\normalfont\textsc{EstCocycles}}$. \textbf{Right}: a 2D representation of the energy landscape of pentane, where the energy is estimated using the representation on the left and Gaussian smoothing. We see that there are four local minima of the energy function. By going back to the molecule simulation, we confirm that these four minima correspond to the four well known conformations of pentane \cite{balabin}.} \label{figure:mobius-example-conformation} \end{figure} \noindent\textbf{Klein bottle from conformation space of cyclooctane.} In this example, we reconstruct the conformation space and energy landscape of the cyclooctane molecule using the dataset of \cite{martin-thompson-coutsias-watson}. In \cite{martin-thompson-coutsias-watson}, it is shown that the conformation space of cyclooctane consists of a 2-sphere glued to a Klein bottle along two disjoint circles, and a parametrization of the dataset is given using Isomap and knowledge about how the data was generated. In \cref{figure:klein-example}, we embed the Klein bottle part of the data in 4D. We were not able to recover the right topology in $\mathbb{R}^4$ using any of LE, DM, LLE, HLLE, LTSA, Isomap, or t-SNE. Meanwhile, UMAP is able to recover the right topology in $\mathbb{R}^4$. In order to evaluate the 4D embeddings, we use the following distinguishing feature of the Klein bottle $K$: with $\mathbb{Z}/2$ coefficients we have $\dim(H^1(K;\mathbb{Z}/2)) = 2$ and $\dim(H^2(K;\mathbb{Z}/2))=1$, while with $\mathbb{Z}/3$ coefficients we have $\dim(H^1(K;\mathbb{Z}/3)) = 1$ and $\dim(H^2(K;\mathbb{Z}/3))=0$. In \cref{figure:cyclooctane-full-parametrization}, we produce an efficient 2D parametrization of the conformation space of cyclooctane without using a priori knowledge of how the data was generated. The difficulty faced by metric-based algorithms in this example is that the Klein bottle in high dimensional space has aspect ratio close to $1$ (i.e., an isometric representation by a fundamental domain such as the one of \cref{figure:cyclooctane-full-parametrization}.\textbf{2} has commensurable height and width), and thus it does not admit an isometric embedding in $\mathbb{R}^4$. \begin{figure} \begin{center} {\def0.9\textwidth{1\textwidth} \scriptsize {\input{figures/pds-cyclooctane.pdf_tex}}} \end{center} \caption{ \textbf{1}: The PD of the original data with $\mathbb{Z}/2$ (two prominent $1$-dimensional and one $2$-dimensional classes) and $\mathbb{Z}/3$ coefficients (one prominent $1$-dimensional class), which suggests the data is a Klein bottle. \textbf{2}: The PD of the 4D representation obtained using {\normalfont\textsc{FibeRed}}{}, which matches the original topology well. \textbf{3}: The PD of a 4D representation using Isomap. \textbf{5}: The PD of a 4D representation using t-SNE. For Isomap and t-SNE, the PD is the same regardless of the field of coefficients. } \label{figure:klein-example} \end{figure} \begin{figure} \begin{center} {\def0.9\textwidth{0.9\textwidth} \scriptsize {\input{figures/cyclooctane-unfolded-2.pdf_tex}}} \end{center} \caption{\textbf{1}: The output of {\normalfont\textsc{FibeRed}}{} with the cut-unfold technique on the portion of the conformation space belonging to the Klein bottle. Colored in red and green are the two circles that glue the Klein bottle to the 2-sphere. Using this representation---a cylinder---we compute a new circular coordinate, which we combine with the initial circular coordinate to get a fundamental domain for the Klein bottle. \textbf{2}: A 2D model of the conformation space of cyclooctane. The two circles are two hemispheres of the 2D sphere, and were obtained using Isomap. Points not colored in grey indicate the gluings that have to be performed to recover the conformation space.} \label{figure:cyclooctane-full-parametrization} \end{figure} \section{Discussion} \label{section:discussion} We have presented a procedure to learn vector bundles from data, and demonstrated that it can be used to decouple the global topology from the local geometry in topologically complex data. We showed with examples that this can be helpful for embedding topologically complex data in low dimension, as well as for charting such data. We have also developed a sound mathematical foundation for this point of view. \noindent\textbf{Limitations.} The theory and methods presented in this paper assume that the data lives in the total space of a vector bundle. There are two main ways in which real data can deviate from these assumptions: (1) There are singularities in the data manifold, and thus the base map is not a vector bundle since fibers may have different dimensions; (2) the data contains outliers, and only a core subset of the data satisfies the assumptions. Another important caveat is that (3) the procedure assumes that a base map is given. We comment on these remarks below. \noindent\textbf{Future work.} With respect to (1), the situation in which the fibers of the base map can have different dimensions can be abstracted using the theory of stratified vector bundles \cite{baues-ferrario,baues-ferrario2}. We believe that the main algorithm of \cref{section:main-algorithm} can be adjusted to account for different local dimensions by allowing the cocycle $\Omega$ between patches with different dimension to be a matrix in a Stiefel manifold, instead of an orthogonal matrix. With respect to (2), our procedures are robust with respect to limited amount of noise, and the problem of devising extensions robust to outliers is left as future work. With respect to (3), there are several ways to obtain non-linear initial representations. First, other cohomological coordinates besides circular coordinates have been developed \cite{perea-projective,polanco-perea}. Second, one could use standard non-linear representations, such as the ones learned by Diffusion Maps \cite{lafon-lee,coifman-lafon}. Third, one could use any of the lens functions \cite[Section~4]{singh-memoli-carlsson} Mapper uses. Another interesting avenue for constructing coarse topological representations is to build a graph on the data, simplify it while preserving part of its large scale topology, and use a graph layout algorithm. Finally, {\normalfont\textsc{FibeRed}}{} can be interpreted as principal component analysis relative to an initial representation, as it works by linearly embedding the local coordinates of $X$ that are not already accounted by the initial map, in a way that is globally consistent and orthogonal to the coordinates already accounted by the initial map. This suggests considering versions of other popular dimensionality reduction algorithms relative to an initial representation. \medskip \noindent\textbf{Acknowledgements.} The authors thank Matt Piekenbrock for various fruitful conversations about dimensionality reduction. This work was partially supported by the National Science Foundation through grants CCF-2006661 and CAREER award DMS-1943758. \bibliographystyle{abbrv}
\section{Introduction} The Vera C. Rubin Observatory Legacy Survey of Space and Time (LSST; \citealt{Ivezic19}) will be one of the most ambitious surveys in the coming years. It will survey the southern sky repeatedly in six optical bands ($ugrizy$) for ten years and observe billions of galaxies. Currently, five Deep-Drilling Fields (DDFs; e.g., \citealt{Brandt18, Scolnic18}) have been selected: COSMOS (Cosmic Evolution Survey), \mbox{W-CDF-S} (Wide Chandra Deep Field-South), ELAIS-S1 (European Large-Area ISO Survey-S1), XMM-LSS (XMM-Large Scale Structure), and EDF-S (Euclid Deep Field-South). Rubin will observe them with a higher cadence and greater sensitivity than those characterizing the wide survey. Rich multi-wavelength datasets (archival or planned) are available in all the DDFs. To name just a few, these include the XMM-Spitzer Extragalactic Representative Volume Survey (XMM-SERVS)\footnote{\url{http://personal.psu.edu/wnb3/xmmservs/xmmservs.html}} in \mbox{X-rays} \citep{Chen18, Ni21}, the Spitzer DeepDrill survey in the infrared \citep{Lacy21}, and the MeerKAT International GHz Tiered Extragalactic Exploration (MIGHTEE) survey in the radio \citep{Jarvis16, Heywood21}. The DDFs will be valuable for many kinds of studies involving time-domain astronomy, ultra-deep imaging, or multi-wavelength investigations. The selection of the EDF-S field as the fifth DDF was finalized only recently (in March 2022), during the review process of this article, and EDF-S currently has poorer multi-wavelength data than the other DDFs. We leave the corresponding analyses and discussion of this field to the future and largely focus on the four original DDFs (i.e., COSMOS, \mbox{W-CDF-S}, ELAIS-S1, and XMM-LSS) in the following text.\par The COSMOS field has been extensively studied, with source properties cataloged carefully. Especially, the COSMOS2015 \citep{Laigle16} and COSMOS2020 \citep{Weaver22} catalogs contain refined photometry, photometric redshifts (photo-$z$s), and physical properties of sources derived from their spectral energy distributions (SEDs). The remaining three original DDFs (i.e., \mbox{W-CDF-S}, ELAIS-S1, and XMM-LSS), on the other hand, have not been fully investigated. To prepare for the upcoming LSST era, we have derived forced photometry and photo-$z$s for these fields in our previous works (\citealt{Nyland17, Chen18, Zou21a, Zou21b}; Nyland et al., in preparation) and present detailed SED fitting in this work.\par Multiwavelength SEDs contain the imprints of all the physical processes in galaxies, and different parts of SEDs are generally dominated by different processes -- \mbox{X-rays} mainly trace the emission from active galactic nuclei (AGNs), UV-to-optical light is from young stars (and/or AGNs) and is absorbed by dust (if present), near-infrared (NIR) emission is mainly from intermediate-age and old stars, and mid-infrared (MIR) to far-infrared (FIR) emission is from dust. Therefore, SEDs can provide many insights about source properties, which is particularly important for large extragalactic photometric surveys. A notable example is deriving redshifts from SEDs. Spectroscopic redshifts are expensive and generally limited to bright sources; on the other hand, multiwavelength photometry is usually much easier to obtain, and fitting the resulting SEDs can provide photo-$z$s. This is also true for many other parameters, whose single tracers are often expensive to obtain (e.g., H$\alpha$ traces star formation well but is hard to measure), and thus SED fitting becomes vital for these cases.\par By fitting SEDs with pre-constructed models, all the model parameters can be estimated, but their reliability is often not guaranteed. SED models are built upon all the detailed physical processes or empirical ones, and the internal uncertainties of these models themselves may cause biases in SED-fitting results; even if the models are correct in an average sense, they are often unable to span all the possible variations for individual galaxies, due to the limitations of both model flexibility and computational requirements, and hence many simplified assumptions are often inevitable. More importantly, SED fitting usually involves many parameters describing many physical processes, which couple together and form a complicated, nonlinear system. All of these issues have presented strong challenges to both the SED-fitting algorithms and interpretation of their results. Great efforts have been devoted to both of these. \citet{Walcher11} and \citet{Conroy13} are two useful reviews for fitting galaxy SEDs. There are many additional valuable related works that have appeared after these two reviews. Fig.~1 in \citet{Thorne21} summarizes the main features of the currently most popular SED-fitting codes, and \citet{Baes20} is a more recent review.\par SED fitting can provide direct information for LSST sources and thus can serve as a basis for a variety of works in the future. For instance, AGNs are important because supermassive black holes (SMBHs) coevolve with their host galaxies over cosmic time (e.g., \citealt{Kormendy13, Brandt21}; and references therein). In fact, AGN studies will be a pillar of the science that will be performed in the LSST DDFs (e.g., \citealt{Brandt18}). We thus need to derive AGN host-galaxy properties via SED fitting, exploiting the rich multi-wavelength coverage of the DDFs, which has currently not been fully utilized. Furthermore, galaxies that are experiencing rapid bursting or quenching (BQ for short) of star formation are also scientifically important for both galaxy and SMBH studies. For example, they are good candidates for experiencing nonsecular galaxy evolution (e.g., \citealt{Smethurst15}) and can also help us understand the evolution of galaxies across the main sequence (MS; e.g., \citealt{Ciesla18}). The driving physics of the BQ phases is still unclear, and one possible cause is AGN activity (though it may not be the dominant one). There is indeed observational evidence showing that the quenching and AGN activities are correlated (e.g., \citealt{Smethurst16, Alatalo17, Greene20}). Additionally, tidal disruption events (TDEs) significantly prefer (post-)starburst galaxies, with the fraction of post-starburst galaxies among TDE hosts enhanced by a factor of $\sim20-200$ compared to general galaxy populations (e.g., \citealt{French20} and references therein), and such TDE hosts are undergoing rapid instead of slow quenching \citep{French17}. Selecting BQ galaxies in advance can thus help the identification and follow-up observations of TDE candidates in the LSST era \citep{French18}. Additionally, the SMBH masses of TDEs cannot exceed the Hills mass \citep{Hills75}, which provides a soft constraint for the TDE host-galaxy stellar masses ($M_\star$) given the correlation between the SMBH mass and $M_\star$; therefore, measuring $M_\star$ can also help TDE searches. These two types of sources, AGNs and BQ galaxies, have distinct SED features, and thus SEDs can be used to select them and gain insights. Especially, the XMM-SERVS survey provides medium-deep \mbox{X-ray} coverage and can thus significantly help the AGN selection and modeling. Their different SEDs from those of normal galaxies also make it necessary to model their SEDs appropriately in a different way from those of normal galaxies. It has been shown that using normal-galaxy templates to fit AGN host galaxies or BQ galaxies leads to inaccurate results (e.g., \citealt{Ciesla15, Ciesla17, Salvato19}) because for AGNs, the AGN emission is wrongly attributed to the galaxy emission, and for BQ galaxies, normal parametric star-formation histories (SFHs) do not have the flexibility to sample BQ-galaxy SEDs well.\par There has been much work investigating AGNs and BQ galaxies in the COSMOS field (e.g., \citealt{Aufort20, Ni20}), separately from the general COSMOS catalogs, but as far as we know, no works are available that have systematically analyzed AGNs and BQ galaxies in our fields. To increase the utility of our work and prepare for broader investigations in the future, we decided to select AGNs and BQ galaxies and use models designed for them to fit their SEDs aside from the fitting of normal galaxies.\par This work mainly provides catalogs recording source classifications, $M_\star$, star-formation rates (SFR), and other related properties. Throughout this paper, we focus on the \mbox{W-CDF-S} field in the main text and put the results for ELAIS-S1 and XMM-LSS into two appendices to keep the narrative flow clear. \mbox{W-CDF-S} is chosen as the representative example because it has the most complete previous literature for comparison. For example, \mbox{CDF-S}, which is embedded in \mbox{W-CDF-S}, has the deepest X-ray observations ever obtained \citep{Luo17, Xue17, Brandt21} and thus can provide a largely complete pure AGN sample for calibration of AGN selection.\par This paper is structured as follows. Section~\ref{sec: data} describes the data. In Section~\ref{sec: sed_step1}, we run the SED fitting and classify our sources into four categories -- star, AGN candidate, BQ-galaxy candidate, or normal galaxy. Section~\ref{sec: sedfitting} presents the analyses of our results and relevant discussions. Section~\ref{sec: summary} summarizes this work. Appendices~\ref{append: es1} and \ref{append: xmmlss} present the SED analyses in ELAIS-S1 and XMM-LSS, respectively. We adopt a flat $\Lambda\mathrm{CDM}$ cosmology with $H_0=70~\mathrm{km~s^{-1}~Mpc^{-1}}$, $\Omega_\Lambda=0.7$, and $\Omega_M=0.3$. \section{Data} \label{sec: data} \subsection{Overview} Our full sample includes 0.8 million sources covering $4.9~\mathrm{deg^2}$ in \mbox{W-CDF-S}, 0.8 million sources covering $3.4~\mathrm{deg^2}$ in ELAIS-S1, and 1.2 million sources covering $4.9~\mathrm{deg^2}$ in XMM-LSS. All sources are required to be detected in the VISTA Deep Extragalactic Observations (VIDEO) survey (i.e., detected in any one of the VIDEO $ZYJHK_s$ bands; \citealt{Jarvis13}) because the VIDEO data are necessary for obtaining quality forced photometry (Section~\ref{sec: tractorphot}) and sufficient SED coverage in wavelength. The relatively smaller source surface-number density on $\mathrm{deg^2}$ scales in \mbox{W-CDF-S} is caused by the fact that the currently available VIDEO data are shallower in some parts of \mbox{W-CDF-S}. For example, the $Z$ band only covers $1.8~\mathrm{deg^2}$ in \mbox{W-CDF-S}. Due to this reason, the source surface number density shows a global variation across \mbox{W-CDF-S}, and one should not analyze, e.g., the demographics or spatial clustering of sources without accounting for this factor. ELAIS-S1 and XMM-LSS do not have this issue -- they are covered by all the VIDEO bands. The basic information for the three fields is listed in Table~\ref{tbl_fieldinfo}. We also refer readers to Tables~1 in \citet{Chen18} and \citet{Ni21} for similar summaries.\par \begin{table*} \caption{Basic information for the three fields} \label{tbl_fieldinfo} \centering \resizebox{\hsize}{!}{ \begin{threeparttable} \begin{tabular}{cccc} \hline \hline & \mbox{W-CDF-S} & ELAIS-S1 & XMM-LSS\\ \hline Center (J2000) & $\mathrm{RA=03^h32^m09^s, Dec=-28^\circ08'32''}$ & $\mathrm{RA=00^h37^m47^s, Dec=-44^\circ00'07''}$ & $\mathrm{RA=02^h22^m10^s, Dec=35^\circ32'30''}$\\ \hline Area & $4.9~\mathrm{deg^2}$ & $3.4~\mathrm{deg^2}$ & $4.9~\mathrm{deg^2}$\\ \hline Source number & 799607 & 826242 & 1247954\\ Star$^\star$ & 42628 & 56850 & 49230\\ AGN$^\star$ & 19612 & 18454 & 41568\\ BQ galaxy$^\star$ & 3624 & 4304 & 20852\\ Normal galaxy$^\star$ & 733743 & 746634 & 1136304\\ Reliable SED AGNs$^\sharp$ & 2652 & 2507 & 3658\\ \hline \mbox{X-ray} survey & XMM-SERV$\mathrm{S^a}$: \mbox{X-ray} & XMM-SERV$\mathrm{S^b}$: \mbox{X-ray} & XMM-SERV$\mathrm{S^b}$: \mbox{X-ray}\\ \hline UV survey & GALE$\mathrm{X^c}$: FUV and NUV & GALE$\mathrm{X^c}$: FUV and NUV & GALE$\mathrm{X^c}$: FUV and NUV\\ \hline \multirow{3}{*}{Optical surveys} & \multirow{2}{*}{VOIC$\mathrm{E^d}$: $ugri$} & VOIC$\mathrm{E^d}$: $u$ & \multirow{2}{*}{CFHTL$\mathrm{S^h}$: $ugriz$}\\ & \multirow{2}{*}{HS$\mathrm{C^e}$: $griz$} & ESI$\mathrm{S^f}$: $BVR$ & \multirow{2}{*}{HS$\mathrm{C^i}$: $grizy$}\\ & & DE$\mathrm{S^g}$: $grizY$\\ \hline \multirow{4}{*}{IR surveys} & VIDE$\mathrm{O^j}$: $ZYJHK_s$ & VIDE$\mathrm{O^j}$: $ZYJHK_s$ & VIDE$\mathrm{O^j}$: $ZYJHK_s$\\ & DeepDril$\mathrm{l^k}$: 3.6 and 4.5~$\mu\mathrm{m}$ & DeepDril$\mathrm{l^k}$: 3.6 and 4.5~$\mu\mathrm{m}$ & DeepDril$\mathrm{l^k}$: 3.6 and 4.5~$\mu\mathrm{m}$\\ & SWIR$\mathrm{E^l}$: 5.8, 8, 24, 70, and 160~$\mu\mathrm{m}$ & SWIR$\mathrm{E^l}$: 5.8, 8, 24, 70, and 160~$\mu\mathrm{m}$ & SWIR$\mathrm{E^l}$: 5.8, 8, 24, 70, and 160~$\mu\mathrm{m}$\\ & HerME$\mathrm{S^m}$: 100, 160, 250, 350, and 500~$\mu\mathrm{m}$ & HerME$\mathrm{S^m}$: 100, 160, 250, 350, and 500~$\mu\mathrm{m}$ & HerME$\mathrm{S^m}$: 100, 160, 250, 350, and 500~$\mu\mathrm{m}$\\ \hline \hline \end{tabular} \begin{tablenotes} \item \textit{Notes.} $^\star$ These rows are the numbers of sources whose ``best'' results are from the corresponding categories; see Section~\ref{sec: bestsedfittingresults} for more details. $^\sharp$ These are the numbers of calibrated, reliable SED AGNs; see Section~\ref{sec: sedagn} and Appendices~\ref{append: es1} and \ref{append: xmmlss} for more details. The full names of the survey or mission acronyms are listed as the following. XMM-SERVS is The XMM-Spitzer Extragalactic Representative Volume Survey, GALEX is The Galaxy Evolution Explorer, VOICE is The VST Optical Imaging of the CDF-S and ELAIS-S1 Fields, HSC is The Hyper Suprime-Cam, ESIS is The ESO-Spitzer Imaging extragalactic Survey, DES is The Dark Energy Survey, CFHTLS is The Canada-France-Hawaii Telescope Legacy Survey, VIDEO is The VISTA Deep Extragalactic Observations, DeepDrill is The Spitzer Survey of Deep-Drilling Fields, SWIRE is The Spitzer Wide-area Infrared Extragalactic survey, and HerMES is The Herschel Multi-tiered Extragalactic Survey. Example references: [a] \citet{Chen18}; [b] \citet{Ni21}; [c] \citet{Martin05}; [d] \citet{Vaccari16}; [e] \citet{Ni19}; [f] \citet{Berta06}; [g] \citet{Abbott21}; [h] \citet{Hudelot12}; [i] \citet{Aihara18}; [j] \citet{Jarvis13}; [k] \citet{Lacy21}; [l] \citet{Lonsdale03}; [m] \citet{Oliver12}. \end{tablenotes} \end{threeparttable} } \end{table*} Our photometry has been collected in a non-simultaneous manner, which not only applies to different bands, but also for single bands because the single-band images were merged from observations that often span several years. Possible photometric variability is not expected to influence our general results because sources with strong photometric variations are mainly bright type~1 AGNs that outshine their host galaxies, which are rare and also need extra caution that is beyond our general analyses (see Section~\ref{sec: qsohost} for further discussion). The fact that our single-band images are often from several observations also suppresses the impact of possible variability. Nevertheless, multi-epoch SED analyses can help investigate some rare but interesting non-galaxy sources (e.g., \citealt{Senarath21}) in the future, and LSST will provide high-cadence light curves for time-domain science.\par We will mainly rely upon \texttt{CIGALE} (Code Investigating GALaxy Emission) v2022.0\footnote{\url{https://cigale.lam.fr}} \citep{Boquien19, Yang20, Yang22} for the SED fitting. This code is based on an energy-balance principle and can decompose an SED into several user-defined components (including AGNs) from \mbox{X-ray} to radio. We choose \texttt{CIGALE} mainly for three reasons. First, its efficient parallel algorithm enables fast modeling for millions of sources. Second, its ability to fit AGN SEDs is the most advanced among current SED-fitting codes and has been well probed in the literature. For example, it allows modeling of the \mbox{X-ray} photometry and has state-of-the-art AGN templates \citep{Yang20, Yang22}. Previous literature has explored the best fitting strategies and justified its reliability for modeling AGN SEDs; see, e.g, \citet{Ciesla15, Buat21, Mountrichas20, Padilla21}. Third, dedicated studies of using \texttt{CIGALE} to fit BQ galaxies are also available; see, e.g., \citet{Boselli16, Aufort20, Ciesla21}. Due to its efficiency, accuracy, and flexibility, \texttt{CIGALE} has been widely used in other extragalactic survey studies (e.g., \citealt{Malek18, Zou19, Ni20}). However, \texttt{CIGALE} is not used to derive our photo-$z$s because this function has not been thoroughly evaluated, and its large number of parameters may lead to strong degeneracy in photo-$z$s. Our photo-$z$s were derived using other dedicated SED-fitting codes; see Section~\ref{sec: redshift} and references therein.\par We utilize photometry from the \mbox{X-ray} to FIR to perform the SED fitting. The following subsections will present our compilation and reduction of the photometry and redshifts in \mbox{W-CDF-S}\footnote{We will not explicitly write ``\mbox{W-CDF-S}'' hereafter. Unless noted in the main text, we always refer to \mbox{W-CDF-S} instead of ELAIS-S1 or XMM-LSS.} as a representative example. Almost the whole field is covered by \mbox{X-ray} to FIR surveys, and the multi-wavelength coverage is presented in Fig.~1 of \citet{Ni21}. \subsection{X-Ray Photometry} \label{sec: xrayphot} Our \mbox{X-ray} photometry is from the XMM-SERVS survey \citep{Chen18, Ni21}, which has observed the \mbox{W-CDF-S} field for 2.3 Ms, reaching a flux limit of $\approx1.0\times10^{-14}~\mathrm{erg~cm^{-2}~s^{-1}}$ in the $0.5-10$ keV band. \mbox{X-ray} sources have already been matched to \textit{The Tractor} catalog (Section~\ref{sec: tractorphot}; Nyland et al., in preparation) in \citet{Ni21}. Simple positional closest-radius matching is not suitable for matching these \mbox{X-ray} sources to their multi-wavelength counterparts because XMM-Newton has non-negligible positional uncertainties, and thus \citet{Ni21} used a Bayesian method that takes the offsets, magnitudes, and colors into consideration simultaneously to do the matching, as detailed in their Section~4. 3319 of our sources have reliable \mbox{X-ray} counterparts in \citet{Ni21}, and the others will be assigned \mbox{X-ray} upper limits in this section. The impacts of the \mbox{X-ray} data as well as the upper limits to our SED fitting will be discussed in detail in Section~\ref{sec: xraydatapoint}. There are 734 \mbox{X-ray} sources in \citet{Ni21} not included in our VIDEO-based sample. About one-third of them are not included because their VIDEO counterparts cannot be reliably assigned as there may be multiple possible counterparts corresponding to a single \mbox{X-ray} source, and the others are undetected in VIDEO (see Section~4 in \citealt{Ni21} for more details).\par The \mbox{X-ray} point-source catalog in \citet{Ni21} only presents observed \mbox{X-ray} fluxes, i.e., uncorrected for intrinsic obscuration (but corrected for Galactic obscuration). However, \texttt{CIGALE} needs absorption-corrected \mbox{X-ray} fluxes, and we thus estimate the intrinsic \mbox{X-ray} luminosities directly based on the \mbox{X-ray} count maps using a Bayesian approach. Bright sources are generally not affected by the Bayesian approach, and the prior (see below) can regulate the posteriors of faint sources so that the Eddington bias can be corrected. Our following method is optimized for AGNs because the majority of the \mbox{X-ray} sources with longer-wavelength counterparts are AGNs. Pure galaxies may present low-level \mbox{X-ray} emission mainly from \mbox{X-ray} binaries. \citet{Lehmer16} presented scaling relations for the \mbox{X-ray} luminosity from \mbox{X-ray} binaries as functions of $M_\star$, SFR, and $z$. We estimated such galaxy-only \mbox{X-ray} luminosities using our $M_\star$ and SFR measurements (Section~\ref{sec: sedfitting}) and confirmed that they are generally orders of magnitude lower than our observed luminosities, and the excess \mbox{X-ray} emission is expected to arise from AGNs.\par We take the column density, $N_\mathrm{H}$, and intrinsic $2-10$ keV luminosity, $L_\mathrm{X}$, as the free parameters. The model flux between the observed-frame energy range, $E_\mathrm{low}-E_\mathrm{high}$, is \begin{align} f_\mathrm{X}= \begin{cases} \frac{L_\mathrm{X}}{4\pi D_L^2}(1+z)^{2-\Gamma}\frac{E_\mathrm{high}^{2-\Gamma}-E_\mathrm{low}^{2-\Gamma}}{10^{2-\Gamma}-2^{2-\Gamma}}\eta,~\Gamma\neq2\\ \frac{L_\mathrm{X}}{4\pi D_L^2}\frac{\ln\frac{E_\mathrm{high}}{E_\mathrm{low}}}{\ln5}\eta,~\Gamma=2 \end{cases} ,\label{eq_def_fx} \end{align} where the full derivation is presented in Appendix~\ref{append: eq1}, $E_\mathrm{low}$ and $E_\mathrm{high}$ are in keV, $D_L$ is the luminosity distance at redshift $z$, $\Gamma$ is the power-law photon index of the source's intrinsic spectrum (assumed to be 1.8), and $\eta=\eta(N_\mathrm{H}, z; E_\mathrm{low}, E_\mathrm{high}, \Gamma)$ is the flux-reduction factor if the source emission (assumed to be a power-law) is absorbed by both the Galaxy and the source itself, where the column density of the Galaxy toward the \mbox{W-CDF-S} is taken to be $8.4\times10^{19}~\mathrm{cm^{-2}}$ \citep{Ni21}. $\eta$ is calculated using \texttt{XSPEC} \citep{Arnaud96}. The model flux is then converted to the predicted source counts within $5\times5$ pixels (i.e., $20''\times20''$) using the single-camera exposure ($t$) maps, encircled energy fraction (EEF) maps, and energy conversion factors (ECFs) in \citet{Ni21}, where EEF is the expected fraction of source photons falling within the given aperture centered at the position of the source, and ECF is the expected ratio between the source flux and the source counts. We follow Eq.~9 in \citet{Ruiz21}: \begin{align} M(k)=f_\mathrm{X}(k)\sum_{i=1}^3t_i(k)\mathrm{EEF}_i(k)\mathrm{ECF}_i(k),\label{eq: flux2counts} \end{align} where the subscript, $i$, denotes the cameras (EPIC PN, MOS1, and MOS2), and $k$ denotes soft (SB), hard (HB), and full (FB) bands. As done in \citet{Ni21}, $E_\mathrm{low}=0.5$~keV, $E_\mathrm{high}=2$~keV, and $M(\mathrm{SB})$ is calculated between $0.2-2$~keV for SB; $E_\mathrm{low}=2$~keV, $E_\mathrm{high}=10$~keV, and $M(\mathrm{HB})$ is calculated between $2-12$~keV for HB; $E_\mathrm{low}=0.5$~keV, $E_\mathrm{high}=10$~keV, and $M(\mathrm{FB})$ is calculated between $0.2-12$~keV for FB. In fact, the actual ECFs depend on the spectral shape, and our adopted values from \citet{Ni21} are only approximations. Based on the standard XMM-Newton response files,\footnote{\url{https://www.cosmos.esa.int/web/xmm-Newton/epic-response-files}} the HB ECF is estimated to vary within $\sim0.05~\mathrm{dex}$ around the value corresponding to $\Gamma=1.4$ and $N_\mathrm{H}=0$ for different $\Gamma$ and $N_\mathrm{H}$, and the SB ECF may deviate up to $\sim0.2~\mathrm{dex}$ when the SB counts are larger than the HB counts. Therefore, the variation of the ECF is only modest and unlikely to bias our results significantly.\par To compare the model counts with the observed counts, we further assume that the expected background intensity can be accurately measured. This assumption, also adopted in \citet{Ruiz21}, is reasonable because the intensity is estimated based on many background counts.\footnote{For example, for a typical background aperture with a radius of $60''$, which is much larger than the source aperture, there are over 2000 background counts, much larger than the typical source counts of a few tens to a few hundreds. Therefore, the relative uncertainty of the background intensity is generally much smaller than that of the source intensity.} The likelihood is thus\par \begin{align} \mathcal{L}=\prod_{k\in\mathrm{\{SB, HB\}}}\frac{[M(k)+B(k)]^{S(k)}e^{-[M(k)+B(k)]}}{S(k)!}, \end{align} where $B(k)$ is the estimated background intensity within the source region (defined as $5\times5$ pixels around the source) based on the background maps \citep{Ni21}, $S(k)$ is the observed counts within the source region, and $\mathcal{L}$ is essentially the Poisson probability of observing $S(k)$ photons when the expected counts are $M(k)+B(k)$.\par The prior is adopted as the product of the \mbox{X-ray} luminosity function (XLF) in \citet{Ananna19},\footnote{We have also tried using the XLF in \citet{Ueda14} and obtained similar results.} which is a function of not only $L_\mathrm{X}$ and $z$, but also $N_\mathrm{H}$, and the probability that the source is detected (see the next paragraph). We further set $\mathrm{XLF}=0$ when $N_\mathrm{H}\geq10^{24}~\mathrm{cm^{-2}}$ for two reasons. First, other complex components besides the simple transmission are important when $N_\mathrm{H}\geq10^{24}~\mathrm{cm^{-2}}$ (e.g., \citealt{Li19}), and it is impossible to use only two data points (i.e., SB and HB counts) to constrain them; secondly, the $N_\mathrm{H}$ distribution itself is not well understood when $N_\mathrm{H}\geq10^{24}~\mathrm{cm^{-2}}$ (e.g., \citealt{Ueda14, Yang21a}). Compton-thick (CT) AGNs should be selected and analyzed individually. For example, \mbox{X-ray} spectral analyses should be optimized specifically for heavily obscured sources to select CT AGNs (\citealt{Lanzuisi18}; Yan et al., in preparation). Besides, Yan et al. (in preparation) searched for CT AGNs in XMM-SERVS and only found several dozen candidates, indicating that the assumption of $N_\mathrm{H}\leq10^{24}~\mathrm{cm^{-2}}$ is appropriate for most of our sources.\par We adopt the Poisson likelihood to estimate the detection probability (i.e., $D$) of a source, which, in addition to the XLF, constitutes the adopted prior. The Poisson likelihood roughly follows a one-to-one relationship with the sophisticated PSF-fitting likelihood during the real detection process, though the scatter is large \citep{Liu20, Ni21}. First, we would expect a source to be detected in a band if its counts are strictly larger than a detection threshold (denoted as $N_\mathrm{thres}$) at a given significance (denoted as $P_\mathrm{Poisson}$), where $P_\mathrm{Poisson}(\mathrm{SB})=0.03$, $P_\mathrm{Poisson}(\mathrm{HB})=7.5\times10^{-5}$, and $P_\mathrm{Poisson}(\mathrm{FB})=0.03$ (see \citealt{Ni21} for more details). $N_\mathrm{thres}$ is thus the minimum non-negative integer that satisfies \begin{align} \mathfrak{Prob}\{\mathbb{POI}(B)\leq N_\mathrm{thres}\}&\geq1-P_\mathrm{Poisson},\label{eq: def_Nthres_part1}\\ \Leftrightarrow\mathcal{P}_\mathrm{IG}(N_\mathrm{thres}+1, B)&\leq P_\mathrm{Poisson}, \end{align} where $\mathfrak{Prob}$ means probability, $B$ is the expected background counts, $\mathbb{POI}(B)$ represents a Poisson random variable with rate $B$, and $\mathcal{P}_\mathrm{IG}(a, x)$ is the regularized lower incomplete gamma function.\footnote{The conventional notations of ``probability'', ``Poisson distribution'', and ``regularized lower incomplete gamma function'' are all ``$P$'', and thus we use different styles to distinguish them.} We denote $A(y, x)$ as the inversion of $\mathcal{P}_\mathrm{IG}(a, x)$ that takes $a$ as the independent variable and $x$ as the parameter, i.e., $\mathcal{P}_\mathrm{IG}(A(y, x), x)=y$. Then \begin{align} N_\mathrm{thres}= \begin{cases} \lceil A(P_\mathrm{Poisson}, B)\rceil-1,~B>0\\ 0,~B=0 \end{cases}, \end{align} where $\lceil x\rceil$ means the ceiling function of $x$. Based on these, we derive the band-merged detection probability, $D(N_\mathrm{H}, L_\mathrm{X}, z)$, in Appendix~\ref{append: xray_detection}.\par The posterior is thus $\mathfrak{Prob}(N_\mathrm{H}, L_\mathrm{X})\propto\mathcal{L}(N_\mathrm{H}, L_\mathrm{X})\times\mathrm{XLF}\times D$, and the expected $L_\mathrm{X}$ and its standard deviation are estimated by integrating the posterior using the \texttt{HCubature} module in \texttt{Julia} \citep{Julia17}. To prevent the XLF, which increases rapidly at low $L_\mathrm{X}$, from dominating the integration,\footnote{The large value given by the XLF cannot be fully counterbalanced by the small value of $D$ for very faint fluxes because the XLF increases roughly following a power-law while $D$ converges to a finite, non-zero constant when the source flux decreases.} we set the posterior to be 0 when $D(N_\mathrm{H}=0, L_\mathrm{X}, z)$ drops below 0.2,\footnote{Also note that when $D$ is small, the difference between the Poisson likelihood and the actual PSF-fitting likelihood shows large variations (see Fig.~5 in \citealt{Liu20}), and thus $D$ itself may deviate from the actual detection probability. The threshold, 0.2, only serves as an empirical value, and this value is also not too much larger than the smallest possible value of $D$ (i.e., $D(L_\mathrm{X}=0)=0.04$.)} and this threshold corresponds to fluxes small enough to be roughly several tens of times smaller than the sensitivities. $L_\mathrm{X}$ is then converted to the intrinsic $2-10$~keV flux, as the SED fitting requires. Fig.~\ref{fig_xraycorr} displays the distribution of the correction factor, defined as the ratio between $L_\mathrm{X}$ and the observed $2-10$~keV \mbox{X-ray} luminosities in \citet{Ni21}. The median correction is 0.1~dex, which is modest and indicates that absorption effects are unlikely to cause significant biases to our results. Such small corrections are also confirmed at similar \mbox{X-ray} fluxes through direct \mbox{X-ray} spectral fitting in \citet{Yang18b}. \begin{figure}[h] \centering \resizebox{\hsize}{!}{\includegraphics{xraycorr.pdf}} \caption{The distribution of the correction factor, defined as the ratio between $L_\mathrm{X}$ and the observed \mbox{X-ray} luminosities, for \mbox{X-ray}-detected sources. The vertical black line marks the median correction (0.1~dex).} \label{fig_xraycorr} \end{figure} \texttt{CIGALE} supports using flux upper limits to constrain the fitting (see \citealt{Boquien19} for more details), and thus we derive the $3\sigma$ observed HB flux upper-limit map following the method in \citet{Ruiz21} for the remaining sources undetected in any of the \mbox{X-ray} bands. The HB is adopted because it is less affected by absorption effects. The upper limit is \begin{widetext} \begin{align} f_\mathrm{X, upp}=\frac{\mathcal{P}_\mathrm{IG}^{-1}(S(\mathrm{HB})+1, 0.9987\mathcal{Q}_\mathrm{IG}(S(\mathrm{HB})+1, B(\mathrm{HB}))+\mathcal{P}_\mathrm{IG}(S(\mathrm{HB})+1, B(\mathrm{HB})))-B(\mathrm{HB})}{\sum_{i=1}^3t_i(\mathrm{HB})\mathrm{EEF}_i(\mathrm{HB})\mathrm{ECF}_i(\mathrm{HB})}, \end{align} \end{widetext} where $\mathcal{P}_\mathrm{IG}^{-1}(a, y)$ is the inverse function of $\mathcal{P}_\mathrm{IG}(a, x)$ (i.e., $\mathcal{P}_\mathrm{IG}(a, \mathcal{P}_\mathrm{IG}^{-1}(a, y))=y$), $\mathcal{Q}_\mathrm{IG}(a, x)=1-\mathcal{P}_\mathrm{IG}(a, x)$ is the regularized upper incomplete gamma function, and 0.9987 is the one-sided $3\sigma$ confidence level. Fig.~\ref{fig_fupp_HB} shows the resulting map. \citet{Ni21} also provide sensitivity maps, but our flux upper limit is conceptually different from sensitivity. Their subtle differences are detailed in \citet{Kashyap10}, where ``upper limit'' in our article is referred to as ``upper bound'' in theirs. Briefly, the sensitivity in \citet{Ni21} is roughly the detection threshold and thus only depends on the background intensity, but our flux upper limit is the largest possible value that a source can have at a given confidence level and depends on both the background and the signals within the source region (no matter whether the source is detected or not). Moreover, the detection significance of the HB sensitivity map in \citet{Ni21} is $7.5\times10^{-5}$, much more conservative than our adopted upper-limit significance ($1.3\times10^{-3}$).\par \begin{figure} \centering \resizebox{1.1\hsize}{!}{\includegraphics{fupp_HB_WCDFS.pdf}} \caption{The HB flux upper-limit map with units of $\mathrm{erg~cm^{-2}~s^{-1}}$. We derive flux upper limits for \mbox{X-ray}-undetected sources based on this map.} \label{fig_fupp_HB} \end{figure} We then convert the observed HB flux upper limits to the intrinsic HB flux upper limits for undetected sources using the $\eta_\mathrm{HB}$ function, i.e., the $\eta$ in Eq.~\ref{eq_def_fx} for HB. Since $\eta_\mathrm{HB}$ depends on $N_\mathrm{H}$, whose distribution further depends on $z$ and $L_\mathrm{X}$, and both $N_\mathrm{H}$ and $L_\mathrm{X}$ are unknown for undetected sources, we would like to derive typical correction factors independent of $N_\mathrm{H}$ and $L_\mathrm{X}$. The redshift dependence of the $N_\mathrm{H}$ distribution is addressed by the XLF. The undetected sources in which we are interested when deriving the corrections are those that may be detected if their $N_\mathrm{H}$ values were 0, and thus we add a weight of $D(N_\mathrm{H}=0, L_\mathrm{X}, z)$. The expected HB flux-correction factor for undetected sources is thus \begin{widetext} \begin{align} C_\mathrm{undet}(z)=\frac{\int_{20}^{24}\int_{\log{L_\mathrm{X, low}}}^{50}D(N_\mathrm{H}=0, L_\mathrm{X}, z)\left[1-D(N_\mathrm{H}, L_\mathrm{X}, z)\right]\mathrm{XLF}(\log N_\mathrm{H}, \log L_\mathrm{X}, z)/\eta_\mathrm{HB}d\log L_\mathrm{X}d\log N_\mathrm{H}}{\int_{20}^{24}\int_{\log{L_\mathrm{X, low}}}^{50}D(N_\mathrm{H}=0, L_\mathrm{X}, z)\left[1-D(N_\mathrm{H}, L_\mathrm{X}, z)\right]\mathrm{XLF}(\log N_\mathrm{H}, \log L_\mathrm{X}, z)d\log L_\mathrm{X}d\log N_\mathrm{H}},\label{eq: def_Cundet} \end{align} \end{widetext} where the upper integration bound of $L_\mathrm{X}$ ($10^{50}~\mathrm{erg~s^{-1}}$) is an arbitrary large number, and the lower integration bound of $L_\mathrm{X}$, $\log{L_\mathrm{X, low}}$, is set to prevent the rapidly increasing XLF from dominating the integration in the small $L_\mathrm{X}$ regime. As for the detected case, we define $\log{L_\mathrm{X, low}}$ as the value when $D(N_\mathrm{H}=0, L_\mathrm{X})$ drops down to 0.2. In principle, Eq.~\ref{eq: def_Cundet} is valid for every pixel and can thus lead to $C_\mathrm{undet}$ maps as a function of $z$, but this is too computationally demanding. Instead, we simply adopt the median values of the background maps as $B(k)$, i.e., $B(\mathrm{SB})=32.5$, $B(\mathrm{HB})=43.9$, and $B(\mathrm{FB})=76.6$ within $5\times5$ pixels. The corresponding $N_\mathrm{thres}$ values are 44, 71, and 93 counts for SB, HB, and FB, respectively. The conversion factor from flux to counts in each band is also adopted as the median value of the conversion-factor map (i.e., $\sum_{i=1}^3t_i(k)\mathrm{EEF}_i(k)\mathrm{ECF}_i(k)$; cf., Eq.~\ref{eq: flux2counts}) -- $2.1\times10^{16}$ and $2.5\times10^{15}$~$\mathrm{counts~erg^{-1}~cm^2~s}$ for SB and HB, respectively. The resulting $C_\mathrm{undet}(z)$ is shown in Fig.~\ref{fig_senscorr}. The intrinsic flux upper limit of a source in observed-frame $2-10~\mathrm{keV}$ is obtained by multiplying the value from the HB flux upper-limit map with $C_\mathrm{undet}$ at its redshift.\par \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{corrfac_for_sens.pdf}} \caption{The correction factor of the HB flux upper limit for undetected sources, $C_\mathrm{undet}$, as a function of $z$. We multiply the observed HB flux upper limits by this factor to obtain the intrinsic HB flux upper limits.} \label{fig_senscorr} \end{figure} The analyses in this section are done for all the XMM-SERVS fields, i.e., also for ELAIS-S1 and XMM-LSS. \subsection{UV Photometry} We collect UV photometry from GALEX (\citealt{Martin05}). Sources in \mbox{W-CDF-S} usually have multiple measurements in the GALEX database, and we follow a similar method as \citet{Bianchi17} to select unique measurements for each source. We first rank all the GALEX sources based on the detection status, exposure time, and distance from the center of the observed field (\texttt{fov\_radius} in the GALEX catalog). The rank of detection is the following: sources detected in both NUV and FUV are ranked the highest, those only detected in NUV are the second, and those only detected in FUV are ranked the lowest. If two sources have the same detection status, the one with higher exposure time is ranked higher. If two sources further have the same exposure time, the one with smaller \texttt{fov\_radius} is ranked higher. Proceeding from the source with the highest rank to the one with the lowest rank, we link surrounding sources that are within $2.5''$ of the primary source and from different observations to the primary one and remove these surrounding sources in the catalog, and the remaining primary sources constitute our unique-source catalog. We confirmed that the fluxes of the removed sources are generally consistent with those of the primary sources, indicating that they are indeed from the same objects.\par We then cross match the cleaned GALEX catalog to \textit{The Tractor} catalog (Section~\ref{sec: tractorphot}) with a matching radius of $2''$. \subsection{\textit{The Tractor} Photometry} \label{sec: tractorphot} The photometry for \mbox{W-CDF-S} from $0.36-4.5~\mu\mathrm{m}$ is compiled in Nyland et al. (in preparation), including VOICE $ugri$ \citep{Vaccari16}, HSC $griz$ \citep{Ni19}, VIDEO $ZYJHK_s$ \citep{Jarvis13}, and DeepDrill IRAC 3.6 and 4.5 $\mu\mathrm{m}$ \citep{Lacy21}. They adopted the band with the longest wavelength among the VIDEO bands in which a given source is detected as the fiducial band to derive the forced photometry in other bands using \textit{The Tractor} code \citep{Lang16}. This technique provides self-consistent photometry across different bands, partly deblends low-resolution images, and extends photometric measurements to a fainter magnitude regime, and thus the resulting photometric catalog is expected to be suitable for our multi-wavelength study. More details of the forced-photometry measurements are presented in \citet{Nyland17}, \citet{Zou21a}, and Nyland et al. (in preparation).\par We further found that residual atmospheric extinction may slightly affect the HSC $g$-band photometry for the \mbox{W-CDF-S}. This is because the airmass of HSC observations of \mbox{W-CDF-S} is generally high ($\sim1.5-2$), causing the fluxes of blue sources to be relatively more suppressed compared to redder sources in single broad bands, especially in the $g$ band. HSC uses bright stars to calibrate the photometry, but the intrinsic spectra of stars are different from those of galaxies; hence, the calibration may be slightly biased for galaxies, and the bias depends upon their colors. We empirically correct this issue by matching the HSC $g$-band photometry to the VOICE $g$-band photometry, and the following formula gives the correction: \begin{align} g_\mathrm{HSC}^\mathrm{new}=g_\mathrm{HSC}+0.0601(g_\mathrm{HSC}-i_\mathrm{HSC})-0.129.\label{eq: corr_g_hsc} \end{align} There is still a systematic $\sim0.02$~mag difference between $g_\mathrm{HSC}^\mathrm{new}$ and VOICE $g$, and thus we add an additional 0.02 mag error to the $g$-band error to account for the uncertainty of the calibration. For sources without $i_\mathrm{HSC}$, we increase the additional error term to 0.1 mag, which is the typical correction value from Eq.~\ref{eq: corr_g_hsc}. Note that this correction is only applied to \mbox{W-CDF-S} as \mbox{XMM-LSS} does not suffer from this issue and ELAIS-S1 lacks HSC data.\par Duplicated bands (i.e., VOICE $gri$ and HSC $gri$) are all included to provide more information and also reduce the risk of missing some bands due to bad photometry in either survey. \subsection{Photometry between $5.8-500~\mu m$} We adopt photometric data at wavelengths longer than $5.8~\mu m$ from the HELP project \citep{Shirley19, Shirley21}, including IRAC 5.8~$\mu\mathrm{m}$, IRAC 8~$\mu\mathrm{m}$, MIPS 24~$\mu\mathrm{m}$, PACS 100~$\mu\mathrm{m}$, PACS 160~$\mu\mathrm{m}$, SPIRE 250~$\mu\mathrm{m}$, SPIRE 350~$\mu\mathrm{m}$, and SPIRE 500~$\mu\mathrm{m}$. The photometric data are deblended for sources detected in IRAC bands using the XID+ tool \citep{Hurley17}.\par Given the importance of FIR data in constraining SFRs (e.g., \citealt{Ciesla15}), we further derive flux upper limits from 24~$\mu\mathrm{m}$ to 500 $\mu\mathrm{m}$, including MIPS 70 and 160~$\mu\mathrm{m}$ and the aforementioned FIR bands in HELP. These provide FIR constraints for $\approx50\%-70\%$ (the exact fraction varies across different bands) of our sources. Though the constraints are generally loose for the main population, they can help constrain galaxies with extreme SFRs -- we found that without the upper limits, 20\% of these sources with $\mathrm{SFR}>1000~M_\odot~\mathrm{yr^{-1}}$ will have SFR measurements overestimated by over 50\%.\par Similar to the \mbox{X-ray} HB flux upper-limit map in Section~\ref{sec: xrayphot}, we will generate FIR upper-limit maps, in which each pixel value equals the flux upper limit if a source is located at the pixel. We conduct point-response-function (PRF) fitting for each pixel, assuming that a source is located at the center of this pixel. As given in \citet{Smith12}, the best-fit flux and error are \begin{align} f&=\frac{\sum_i\frac{d_ip_i}{\sigma_i^2}}{\sum_i\frac{p_i^2}{\sigma_i^2}},\label{eq: prffittingflux}\\ \sigma_\mathrm{inst}&=\frac{1}{\sqrt{\sum_i\frac{p_i^2}{\sigma_i^2}}},\label{eq: prffittingerr} \end{align} where $d_i$, $p_i$, $\sigma_i$ are the image, PRF, and error map values at pixel $i$, respectively. Note that Eq.~\ref{eq: prffittingerr} only describes the instrumental noise, which would vanish relative to $f$ if the exposure time increased to infinity and is valid only if all the pixel values are independent. Actual instrumental noise values are usually inflated by a factor (denoted as $C_\mathrm{corr}$) due to the correlations among pixels, and the variance of the sky itself due to unresolved sources may also contribute to the total noise, named the confusion noise (denoted as $\sigma_\mathrm{conf}$) and is often assumed to be constant across a field (e.g., \citealt{Nguyen10, Hurley17}). The total noise $\sigma_\mathrm{tot}$ is thus \begin{align} \sigma_\mathrm{tot}=\sqrt{(C_\mathrm{corr}\sigma_\mathrm{inst})^2+\sigma_\mathrm{conf}^2}. \end{align} We then define the flux upper limit as \begin{align} f_\mathrm{upp}=\max\{f+3\sigma_\mathrm{tot}, \sigma_\mathrm{tot}\},\label{eq: fupp} \end{align} where $f_\mathrm{upp}$ is truncated at $\sigma_\mathrm{tot}$ to prevent the upper limit from being too small to be reliable. Again, this upper limit should be distinguished from sensitivity (usually $5\sigma_\mathrm{tot}$), as explained in Section~\ref{sec: xrayphot} and \citet{Kashyap10}.\par The FIR data are from the SWIRE survey (MIPS; \citealt{Lonsdale03, Surace05}) and HerMES survey (PACS and SPIRE; \citealt{Oliver12}), on which the HELP project is based. We calibrate the error following the procedures explained below and derive the flux upper limit based on Eqs.~\ref{eq: prffittingflux} $-$ \ref{eq: fupp}. \begin{itemize} \item{MIPS 24 $\mu\mathrm{m}$.\par The MIPS PRFs are from IRSA.\footnote{\url{https://irsa.ipac.caltech.edu/data/SPITZER/docs/mips/calibrationfiles/prfs/}} To calibrate our PRF-fitting process, we compare our PRF-fitting fluxes with the cataloged fluxes for detected sources, and the PRFs are normalized so that the median $\Delta\log\mathrm{(flux)}$ is 0. For simplicity, we set the fitting region to be a square whose side length is an odd number of pixels, and the size is chosen to be the one that minimizes the normalized median absolute deviation (NMAD)\footnote{NMAD is defined as $1.4826~\times$ median absolute deviation.} of $\Delta\log\mathrm{(flux)}$. The fitting regions are determined to be $11\times11$ pixels (i.e., $13.2''\times13.2''$), and the corresponding $\mathrm{NMAD}\{\Delta\log\mathrm{(flux)}\}$ is 0.024 dex. The deviation may be caused by the variations in PRFs, the different choices between our fitting regions and the ones used in the catalog, and the fact that the real source locations may not coincide with the pixel centers. To account for these effects, we add the NMAD values to the final flux errors in quadrature.\par We adopt $\sigma_\mathrm{conf}=0$ because it is negligible compared to $\sigma_\mathrm{inst}$ in our case. $\sigma_\mathrm{conf}$ is estimated to be $\sim0.01$ mJy in the previous literature (e.g., \citealt{Xu01, Franceschini03, Dole04}), which is $\sim10$ times smaller than $\sigma_\mathrm{inst}$. We thus only need to calibrate $C_\mathrm{corr}$. First, we mask regions around detected sources on the PRF-fitted map (i.e., the map with each pixel value being the one from Eq.~\ref{eq: prffittingflux} after calibration) and denote $\omega=f\sqrt{cov}$ on the unmasked regions, where $cov$ is the coverage; then $\omega$ is roughly normally distributed \citep{Surace05}. Similar to \citet{Smith12}, we estimate the standard deviation of $\omega$ as \begin{align} \sigma_\omega=\sqrt{\frac{1}{N}\sum_i(\omega_i-\mathrm{median}\{\omega_i\})^2},\label{eq: sigma_omega} \end{align} where the summation is restricted to $\omega_i\leq\mathrm{median}\{\omega_i\}$. The correlation correction factor is then estimated to be \begin{align} C_\mathrm{corr}=\mathrm{median}\left\{\frac{\sigma_\omega}{\sigma_f\sqrt{cov}}\right\}, \end{align} and the result is 3.5. } \item{MIPS 70 and 160 $\mu\mathrm{m}$.\par Following the approach for 24 $\mu\mathrm{m}$, we determine the fitting regions to be $5\times5$ and $7\times7$ pixels (i.e., $20''\times20''$ and $56''\times56''$) for 70 and 160 $\mu\mathrm{m}$, respectively; the corresponding $\mathrm{NMAD}\{\Delta\log\mathrm{(flux)}\}$ values are 0.029 and 0.026 dex. To do the error calibration, we assume $f\sim N(0, \sigma_\mathrm{tot}^2)$ for regions with $f<0$, which are not expected to be contaminated by any detectable sources. By maximizing the corresponding likelihood, we obtain $C_\mathrm{corr}=3.9$ (3.6) and $\sigma_\mathrm{conf}=1.0$ (14.3) mJy for 70 (160)~$\mu\mathrm{m}$. Our $\sigma_\mathrm{conf}$ values are consistent with the ones in the literature (e.g., \citealt{Xu01, Franceschini03, Dole04, Frayer06}) -- $\sim0.3-1.3$ mJy for 70 $\mu\mathrm{m}$ and $\sim7-19$ mJy for 160 $\mu\mathrm{m}$. } \item{ PACS 100 and 160 $\mu\mathrm{m}$.\par The PACS PRFs are available on the HerMES website\footnote{\url{http://hedam.lam.fr/HerMES/}} along with the data. We follow the same approach to derive the flux upper limits as for MIPS 24 $\mu\mathrm{m}$ because PACS $\sigma_\mathrm{conf}\lesssim1$ mJy (e.g., \citealt{Berta11}), much smaller than $\sigma_\mathrm{inst}$. We adopt the fitting regions to be $9\times9$ and $7\times7$ pixels (i.e., $18''\times18''$ and $21''\times21''$) for 100 and 160 $\mu\mathrm{m}$, respectively, and the resulting $\mathrm{NMAD}\{\Delta\log\mathrm{(flux)}\}$ values are 0.018 and 0.033 dex. The correlation correction factors are calibrated to be 1.9 and 2.4. We also add additional calibration errors as 7\% of the fluxes \citep{Balog14}. } \item{ SPIRE 250, 350, and 500 $\mu\mathrm{m}$.\par The SPIRE PRFs are assumed to be Gaussian with FWHMs of $18.15''$, $25.15''$, and $36.3''$ for 250, 350, and 500 $\mu\mathrm{m}$, respectively. This assumption is attested to be simple but adequate in the literature (e.g., \citealt{Roseboom10, Roseboom12, Smith12, Wang14}). Following \citet{Smith12}, we adopt $5\times5$ pixels as the PRF-fitting region. Following the same approach as for MIPS 70 and 160~$\mu\mathrm{m}$ to calibrate the errors, we obtain $C_\mathrm{corr}=1.8$, 2.1, and 2.0 and $\sigma_\mathrm{conf}=6.1$, 7.6, and 7.9 mJy for 250, 350, and 500 $\mu\mathrm{m}$, respectively. The $\sigma_\mathrm{conf}$ values are consistent with those in \citet{Smith12}. We also add a $7\%$ calibration-error term as done in \citet{Wang14}. } \end{itemize} As an example, we display the resulting upper-limit maps in a small region in \mbox{W-CDF-S} in Fig.~\ref{fig_fuppcutout}. The MIPS 160~$\mu\mathrm{m}$ map suffers more from source confusion than the PACS 160~$\mu\mathrm{m}$ map, but since both maps only provide flux upper-limit constraints, the source confusion does not matter, and thus we keep both the MIPS and PACS 160~$\mu\mathrm{m}$ maps. \begin{figure*} \centering \resizebox{\hsize}{!}{\includegraphics{fuppcutout.pdf}} \caption{The $24-500~\mu\mathrm{m}$ upper-limit maps in a $10'\times10'$ region of the \mbox{W-CDF-S}, centered at J2000 $\mathrm{RA=53^\circ, Dec=-28.4^\circ}$. The map units are all mJy.} \label{fig_fuppcutout} \end{figure*} \subsection{Galactic Extinction Correction} We derive the Galactic extinction for a given band from FUV to $8~\mu\mathrm{m}$ as \begin{align} A(\mathrm{band})=2.5\log\frac{\int s_\lambda\left(\frac{\lambda}{1+z}\right)e^{-\tau_\mathrm{IGM}}T(\lambda)d\lambda}{\int s_\lambda\left(\frac{\lambda}{1+z}\right)e^{-\tau_\mathrm{IGM}}T(\lambda)10^{-0.4A(\lambda)}d\lambda},\label{eq: GalExt} \end{align} where $s_\lambda$ is the rest-frame intrinsic source spectrum; $\tau_\mathrm{IGM}=\tau_\mathrm{IGM}(\lambda, z)$ is the expected transmission optical depth of the intergalactic medium (IGM); $T(\lambda)$ is the filter transmission curve in energy units; and $A(\lambda)=R(\lambda)E(B-V)$ is the extinction at wavelength $\lambda$. The intrinsic source emission is absorbed by both the IGM and the Galaxy, and the above equation only corrects for the Galactic extinction for IGM-absorbed emission. The IGM absorption will be corrected during the SED fitting \citep{Boquien19}. We adopt the median spectrum in \citet{Brammer08} as a representative $s$, the IGM attenuation law in \citet{Meiksin06} as $\tau_\mathrm{IGM}$, the $E(B-V)$ values in \citet{Schlegel98}, and extinction laws in \citet{Cardelli89}, \citet{ODonnell94}, and \citet{Indebetouw05} assuming $R_V=3.1$. Generally speaking, in our case, $R(\mathrm{band})=A(\mathrm{band})/E(B-V)$ has little dependence on $E(B-V)$ and the selection of $s$. Instead, the IGM attenuation plays a more important role, especially for the NUV band because the NUV covers the 2200~\AA\ extinction bump of our Galaxy. As redshift increases from 1 to 1.9, the IGM attenuation gradually absorbs the emission around the extinction bump while keeping the emission at longer wavelengths unaffected. This significantly modifies the effective wavelength of NUV and leads $R(\mathrm{NUV})$ to be $\sim8.5$ at other redshifts but drops to as low as $\sim6.8$ at $z\sim1.9$. However, the IGM attenuation itself is highly uncertain because the number of Lyman limit systems along the line of sight is highly variable \citep{Meiksin06}, and thus Eq.~\ref{eq: GalExt} can only return typical extinctions. Fortunately, the Galactic extinctions are not severe, as listed in Table~\ref{tbl_GalExt}. \begin{table} \caption{Galactic extinctions} \label{tbl_GalExt} \centering \begin{threeparttable} \begin{tabular}{ccc} \hline \hline Survey & Band & median\{$A(\mathrm{band})$\} (mag)\\ \hline GALEX & FUV & 0.074\\ GALEX & NUV & 0.070\\ VOICE & $u$ & 0.044\\ VOICE & $g$ & 0.033\\ VOICE & $r$ & 0.024\\ VOICE & $i$ & 0.019\\ HSC & $g$ & 0.033\\ HSC & $r$ & 0.024\\ HSC & $i$ & 0.018\\ HSC & $z$ & 0.014\\ VIDEO & $Z$ & 0.014\\ VIDEO & $Y$ & 0.011\\ VIDEO & $J$ & 0.008\\ VIDEO & $H$ & 0.005\\ VIDEO & $K_s$ & 0.003\\ DeepDrill & $3.6~\mu\mathrm{m}$ & 0.002\\ DeepDrill & $4.5~\mu\mathrm{m}$ & 0.002\\ SWIRE & $5.8~\mu\mathrm{m}$ & 0.001\\ SWIRE & $8.0~\mu\mathrm{m}$ & 0.001\\ \hline \hline \end{tabular} \end{threeparttable} \end{table} \subsection{Redshift} \label{sec: redshift} Our redshifts are from \citet{Ni21} and \citet{Zou21b}. They compiled all the available spectroscopic redshifts (spec-$z$s) for 30135 sources in \mbox{W-CDF-S}, and \citet{Zou21b} derived photo-$z$s for all the sources using \texttt{EAZY} \citep{Brammer08}. However, the photo-$z$s in \citet{Zou21b} are only valid if the optical-to-NIR emission is not dominated by an AGN, and \citet{Ni21} derived appropriate photo-$z$s for AGN-dominated sources. Therefore, we adopt the redshifts following the priority below. When available, spec-$z$s are adopted; otherwise, photo-$z$s in \citet{Ni21} are adopted; photo-$z$s in \citet{Zou21b} are used in the remaining cases. 738 photo-$z$s in \mbox{W-CDF-S} are taken from \citet{Ni21}. As discussed in \citet{Zou21b}, photo-$z$s are still appropriate for most AGNs because relatively few AGNs (sky surface density $\lesssim300~\mathrm{deg^2}$) can materially affect the observed optical-to-NIR SEDs, and most such AGN-dominated sources have been identified in \citet{Ni21} (see their Appendix~B). We thus do not need to refine further the photo-$z$s for AGN candidates (Section~\ref{sec: select_agn}). \section{SED Fitting and Source Classification} \label{sec: sed_step1} In this section, we classify sources into stars, AGN candidates, BQ-galaxy candidates, or normal galaxies. The ``best'' classified categories include 42628 stars, 19612 AGN candidates, 3624 BQ-galaxy candidates, and 733743 normal galaxies, as presented in Table~\ref{tbl_fieldinfo} and Section~\ref{sec: bestsedfittingresults}. One of the main goals for performing the classification before the main SED fitting in Section~\ref{sec: bestsedfittingresults} is to reduce the computational requirements. For example, we would like to add AGN components only for AGNs, and thus we first select AGN candidates using relatively sparser parameter grids to fit all the sources with or without AGN components and then re-fit the candidates with denser grids. \subsection{Selection of Stars} \label{sec: select_star} Stars are usually selected in two ways in extragalactic surveys -- by selecting point sources and by applying empirical color-color cuts (e.g., \citealt{Daddi04, Barro09, Henrion11, Malek13}). The former only works for bright sources because morphological information is limited for faint sources. In this section, we use both methods to select stars.\par First, we select point sources with $i$-band magnitudes brighter than 24 in HSC as stars. The reliability of the morphological selection decreases rapidly for fainter magnitudes; see \citet{Bosch18}. This selection is not applied to \mbox{X-ray} AGNs to avoid misclassifying point-like quasars, most of which are detected in \mbox{X-rays} \citep{Ni21}, as stars. A total of 21596 stars are selected in this way. Secondly, for the color-color selection, we adopt a more accurate method, SED fitting, to select stars. Similar to \citet{Laigle16} and \citet{Weaver22}, who selected stars in the COSMOS field through SED fitting with \texttt{LePhare} \citep{Arnouts99, Ilbert06}, we use the same code\footnote{\texttt{CIGALE} cannot be used to select stars because it does not have stellar templates.} to fit all of our sources with quasar, galaxy, and stellar templates and compare the resulting best-fit $\chi^2$ values for these three kinds of templates. This SED selection is not applied to extended sources in HSC. There are 39069 sources whose smallest $\chi^2$ values are from the stellar templates, and they are also selected as stars. Furthermore, 50 spectroscopic stars are also added, and \citet{Ni21} presented the details of these spectroscopic classifications. We also classify 12396 sources with statistically significant proper motions in Gaia EDR3 \citep{Gaia21} as stars. 82\% of the spectroscopic stars, 90\% of the HSC morphological stars, and 87\% of the Gaia stars are also identified by the SED selection. The positions of stars and non-stars in the $gzK$ color-color diagram are displayed in Fig.~\ref{fig_select_star}. There are 42628 stars selected in total. \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{select_star_wcdfs.pdf}} \caption{The $gzK$ color-color diagram for sources in \mbox{W-CDF-S}. Cyan and orange points are our selected non-stars and stars, respectively. Our selected stars form a clear stellar locus, justifying the overall reliability of the star selection. The branch lying roughly one-magnitude above the stellar locus is early-type galaxies; see, e.g., Fig.~1 in \citet{Lane07} for an example.} \label{fig_select_star} \end{figure} \subsection{Selection of AGN Candidates} \label{sec: select_agn} We use different selection methods to build an AGN sample that is as complete as possible, including \mbox{X-ray}, MIR, and SED methods. We note that another important AGN selection method is based on the radio band. The analyses of radio AGNs (including their SEDs) in our fields are still ongoing and will be presented separately in Zhu et al. (in preparation), and we do not present them in this work. Besides, the AGN radio emission is not strongly correlated to other bands -- first, the radio loudness is often set to be a free parameter in SED fitting that can hardly be inferred from shorter-wavelength SEDs (e.g., \citealt{Yang22}); secondly, the shorter-wavelength (e.g., \mbox{X-ray}) AGN emission generally only shows moderate enhancements even for sources with strong radio emission (i.e., radio-loud quasars; \citealt{Zhu20}). We thus do not expect strong biases caused by ignoring radio AGNs.\par \subsubsection{An Overview of Different Selection Methods} \mbox{X-ray} selection is efficient at selecting pure AGN samples, and \mbox{X-ray} AGNs have already been selected in \citet{Ni21}. Especially, \mbox{X-ray} emission suffers little from starlight contamination and can penetrate through large amounts of obscuring material (see \citealt{Brandt15} for a review). However, the \mbox{X-ray} method still faces challenges when selecting highly obscured or even CT AGNs and low-luminosity AGNs at high redshifts, given the \mbox{X-ray} depth.\par AGN candidates are also selected based on their red colors and power-law spectra in the MIR, which are approximated by Spitzer IRAC color-selection criteria \citep{Lacy04, Lacy07, Stern05, Donley12, Chang17}. The MIR method is able to select both unobscured AGNs, which may be selected by \mbox{X-ray} selection as well, and heavily obscured AGNs, which may be missed by \mbox{X-ray} selection (e.g., \citealt{Donley12}). However, it suffers from starlight contamination and thus can hardly select low-luminosity AGNs and AGNs with bright hosts. Moreover, depending upon the selection criteria, the resulting MIR AGN sample may be contaminated by star-forming galaxies, especially for the criterion in \citet{Lacy07}. The criterion in \citet{Donley12} is generally more reliable in avoiding the misclassification of star-forming galaxies as AGNs, but it may miss highly obscured AGNs (e.g., \citealt{Li20}). In this work, we select MIR AGN candidates if a source is detected in all four IRAC bands with a signal-to-noise ratio (SNR) above three and meets any criterion in \citet{Stern05}, \citet{Lacy07}, or \citet{Donley12} so that the resulting MIR AGN sample is as complete as possible. However, this will inevitably misclassify many star-forming galaxies as AGNs. We flag MIR AGNs satisfying different criteria separately in our final catalog, and users can easily select MIR AGNs based on a subset of all the three criteria depending upon their tradeoff between completeness and purity.\par AGN candidates can also be selected through SED fitting. Depending upon the data, the SED method may also have significant drawbacks in terms of completeness and purity, and this statistical model selection often lacks apparent physical meaning. Even for sources with distinct AGN features in one band (e.g., \mbox{X-ray}), the interplay between galaxy and AGN components in other bands may still make SED fitting possibly miss such sources; the resulting SED AGN candidates may also be contaminated by large numbers of galaxies (e.g., see the bottom panel of Fig.~16 in \citealt{Yang21b}), depending upon the adopted criterion. Especially, Section~\ref{sec: sedagn} shows that in our case, if we require a high selection purity, the SED selection method can hardly select sources missed by other methods. Therefore, we mostly rely on the SED method to select AGN \textit{candidates} without trying to firmly attest that they are AGNs. We emphasize that the limitations of the SED method in our case largely originate from the data instead of the method itself. \citet{Yang21b} show that most of the drawbacks can be resolved if one has deep and continuous MIR coverage, which, however, are unavailable in our case. When putting this into a broader context of joint galaxy-AGN SED modeling, the SED selection of AGNs will be an ever-green project that requires many years of investigations of both the data and the method. Our case is mainly limited by the data, but in cases where good data or external information are available, it is equally important to develop and evaluate appropriate methods that can effectively extract information from the data. Examples include developing the \mbox{X-ray} module in \texttt{CIGALE} \citep{Yang20, Yang22} and utilizing MIR color gradients in resolved galaxies \citep{Leja18}. \subsubsection{SED Fitting to Select AGN Candidates} We use \texttt{CIGALE v2022.0} to do the SED fitting. We use a delayed star-formation history (SFH) because it can model both early-type and late-type galaxies \citep{Boquien19} with only two free parameters, and its general reliability in measuring SFR and $M_\star$, even for AGN host galaxies, has been well attested in previous literature (e.g., \citealt{Ciesla15, Ciesla17, Carnall19, Lower20}).\footnote{Generally, adopting different parametric SFHs can result in a systematic difference $\lesssim0.1~\mathrm{dex}$ for $M_\star$ and SFR (e.g., \citealt{Carnall19}). For example, by comparing the results for all the sources based on the delayed SFH and the truncated delayed SFH in Section~\ref{sec: select_bqgal} using the parameter settings in Table~\ref{tbl_sedpar_step1}, we obtain a systematic difference in $M_\star$ (SFR) of 0.04 (0.08) dex, and the NMADs of the differences are 0.06 and 0.11 dex for $M_\star$ and SFR, respectively.} Stellar templates are from \citet{Bruzual03}, and a Chabrier initial mass function \citep{Chabrier03} is adopted. Nebular emission is also included in a self-consistent manner using CLOUDY photoionization calculations \citep{Ferland17}, as described and implemented in \citet{Villa-Velez21}. Dust attenuation is assumed to follow \citet{Calzetti00}, and dust emission in the IR is assumed to follow templates in \citet{Dale14} for simplicity. The \mbox{X-ray} module is included, where the AGN \mbox{X-ray} emission is assumed to be moderately anisotropic following \begin{align} \frac{L_\mathrm{X}(\theta)}{L_\mathrm{X}(0)}=a_1\cos\theta+a_2\cos^2\theta+1-a_1-a_2, \end{align} where $\theta$ is the viewing angle (face-on corresponds to $0^\circ$), and the angle coefficients, $a_1$ and $a_2$, are calibrated in \citet{Yang22} to be 0.5 and 0, respectively. The UV-to-IR AGN module is based on the SKIRTOR model \citep{Stalevski12, Stalevski16} with polar-dust extinction, and the disk spectral shape is modified from \citet{Schartmann05}, as detailed in \citet{Yang22}. The polar-dust extinction law is assumed to follow that in the Small Magellanic Cloud (SMC; \citealt{Prevot84}). \citet{Mountrichas20} demonstrated that the polar-dust component can help AGN selection, and SED-fitting results are insensitive to the temperature of the polar dust. \citet{Buat21} further showed that the SMC extinction law is largely optimal for polar dust and can return reliable results even if the real polar extinction curve is different from the SMC law. The viewing angle is set to include at least one face-on (type~1 AGN) and one edge-on (type~2 AGN) system, and \citet{Padilla21} showed that the SED-fitting results are insensitive to the choice of viewing angles as long as both type~1 and type~2 representatives are included.\par We use a two-step SED-fitting approach to select AGN candidates. In the first step, we run SED fitting for all the sources twice with coarse parameter grids -- once with the AGN module included and once without AGNs. The parameter settings are summarized in Table~\ref{tbl_sedpar_step1}. Among the parameters, the AGN fraction ($f_\mathrm{AGN}$) is defined as the fractional contribution of the AGN component to the total IR luminosity, where the IR luminosity is defined as all the dust-absorbed luminosity at shorter wavelengths. $f_\mathrm{AGN}$ is the primary parameter controlling the impact upon the SED shape from the AGN component and is hence assigned with a dense grid of possible values. The aim of this step is to narrow down all the millions of sources to a much smaller sample of \textit{raw} SED AGN candidates.\footnote{We will always include the word ``raw'' when referring to candidates selected in this step.} We compare how much the fitting is improved after adding an AGN component, as done in previous literature for selecting AGNs via SED-fitting techniques (e.g., \citealt{Chung14, Huang17, Pouliasis20b}). We adopt the Bayesian information criterion (BIC) to make the comparison, defined as $\mathrm{BIC}=2p\ln{N}-2\ln{L}$, where $p$ is the number of parameters, $N$ is the number of data points, and $L$ is the maximum likelihood of the model. Since $L=\exp(-\chi^2/2)$, $\Delta\mathrm{BIC}=2\Delta p\ln{N}+\Delta\chi^2$, where $\Delta\chi^2$ is the best-fit $\chi^2$ when not including the AGN module minus that with the AGN module. We set $\Delta p$ as $-3$, accounting for the fact that there are three free parameters in the AGN module (viewing angle, AGN fraction, and $E(B-V)$ of the polar extinction), and $N$ as the number of bands with SNR above three. We add a subscript of ``1'' to $\Delta\mathrm{BIC}$ to refer to the values derived in this step and write ``AGN'' in parentheses to mean that this is for the AGN selection. We will present the BQ-galaxy selection in Section~\ref{sec: select_bqgal}, and thus writing ``AGN'' explicitly helps distinguish the AGN selection and the BQ-galaxy selection. Raw SED AGN candidates are chosen to be those with $\Delta\mathrm{BIC_1(AGN)}>2$, which is a loose threshold so that the raw candidates are as complete as possible.\footnote{Nevertheless, the overall completeness cannot reach a near-unity level; see Sections~\ref{sec: select_results} and \ref{sec: sedagn} for more discussion.} This returns 48 thousand raw SED AGN candidates, which are only 6\% of the whole sample. This coarse-grid fitting is not designed to be perfect and tends to overestimate the actual $\Delta\mathrm{BIC}$ because the galaxy templates in Table~\ref{tbl_sedpar_step1} are limited; e.g., the number of possible values that the SFH parameters can have is small. Thus, the stellar continuum may not be well constrained, and the best-fit $\chi^2$ tends to be elevated. Some sources may be selected as raw SED AGN candidates simply because the galaxy templates are not sufficiently flexible to explain their SEDs. However, this is not necessarily a disadvantage in this step because the completeness is increased, and we will trim the sample in subsequent steps.\par \begin{table*} \caption{Coarse-grid \texttt{CIGALE} parameter settings used in step~1 of the AGN and BQ-galaxy selections} \label{tbl_sedpar_step1} \centering \begin{threeparttable} \begin{tabular}{cccc} \hline \hline \multirow{2}{*}{Module} & \multirow{2}{*}{Parameter} & Name in the \texttt{CIGALE} & \multirow{2}{*}{Possible values}\\ && configuration file &\\ \hline \multirow{2}{*}{Delayed SFH} & Stellar \textit{e-}folding time & tau\_main & 0.1, 0.5, 1, 3, 5, 10 Gyr\\ & Stellar age & age\_main & 0.1, 0.5, 1, 3, 5, 10 Gyr\\ or\\ \multirow{5}{*}{Truncated delayed SFH} & Stellar \textit{e-}folding time & tau\_main & 0.1, 0.5, 1, 3, 5, 10 Gyr\\ & Stellar age & age\_main & 1, 3, 5, 7, 10 Gyr\\ & Age of the BQ episode & age\_bq & 10, 50, 100, 200, 500, 800 Myr\\ & \multirow{2}{*}{$r_\mathrm{SFR}$} & \multirow{2}{*}{r\_sfr} & 0, 0.05, 0.1, 0.3, 0.5, 0.7, 1, 2,\\ &&&5, 7, 10, 30, 50, 100\\ \hline Simple stellar population & Initial mass function & imf & \citet{Chabrier03}\\ \citet{Bruzual03} & Metallicity & metallicity & 0.02\\ \hline Nebular & ----- & ----- & -----\\ \hline \multirow{3}{*}{Dust attenuation} & \multirow{2}{*}{$E(B-V)_\mathrm{line}$} & \multirow{2}{*}{E\_BV\_lines} & 0, 0.05, 0.1, 0.2, 0.3,\\ \multirow{3}{*}{\citet{Calzetti00}}&&& 0.4, 0.6, 0.8, 1, 1.5\\ & $E(B-V)_\mathrm{line}/E(B-V)_\mathrm{continuum}$ & E\_BV\_factor & 1\\ \hline Dust emission & \multirow{2}{*}{Alpha slope} & \multirow{2}{*}{alpha} & \multirow{2}{*}{1.5, 2.0, 2.5}\\ \citet{Dale14}\\ \hline \multirow{6}{*}{\mbox{X-ray}} & AGN photon index & gam & 1.8\\ & \multirow{2}{*}{AGN $\alpha_\mathrm{OX}$} & \multirow{2}{*}{alpha\_ox} & $-1.9$, $-1.8$, $-1.7$, $-1.6$, $-1.5$,\\ &&&$-1.4$, $-1.3$, $-1.2$, $-1.1$\\ & Maximum deviation of $\alpha_\mathrm{OX}$ & \multirow{2}{*}{max\_dev\_alpha\_ox} & \multirow{2}{*}{0.2}\\ & from the $\alpha_\mathrm{OX}-L_{\nu,2500}$ relation &\\ & AGN \mbox{X-ray} angle coefficients & angle\_coef & (0.5, 0)\\ \hline \multirow{7}{*}{AGN (optional)} & Viewing angle & i & $30^\circ, 70^\circ$\\ \multirow{7}{*}{\citet{Stalevski12, Stalevski16}}& Disk spectrum & disk\_type & \citet{Schartmann05}\\ & Modification of the optical & \multirow{2}{*}{delta} & \multirow{2}{*}{$-0.27$}\\ & Power-law index &\\ & \multirow{2}{*}{AGN fraction} & \multirow{2}{*}{fracAGN} & 0, 0.1, 0.2, 0.3, 0.4,\\ &&& 0.5, 0.7, 0.9, 0.99\\ & $E(B-V)$ of the polar extinction & EBV & 0, 0.1, 0.3, 0.5\\ \hline \hline \end{tabular} \begin{tablenotes} \item \textit{Notes.} Unlisted parameters are set to the default values. The AGN component and the truncated delayed SFH are only used in Section~\ref{sec: select_agn} and Section~\ref{sec: select_bqgal}, respectively. This fitting returns $\Delta\mathrm{BIC_1(AGN)}$ and $\Delta\mathrm{BIC_1(BQ)}$. \end{tablenotes} \end{threeparttable} \end{table*} In the second step, we refit our raw SED AGN candidates using denser parameter grids to refine the selection. Such fitting is not applied to the whole sample because that is too computationally intensive\footnote{To be more specific, the running time is estimated to be on a month-scale using two Intel Xeon Gold 6226R processors (16 cores and 32 threads each) or a year-scale for a typical personal computer, let alone that the requirement upon RAM is also heavy.} and also cannot provide many more insights (see Section~\ref{sec: sedagn}). Similar to the first step, we do the fitting twice using both normal-galaxy and AGN templates, and the parameter settings are summarized in Table~\ref{tbl_sedpar_step2_gal} for the normal-galaxy templates and Table~\ref{tbl_sedpar_step2_agn} for the AGN templates; we use $\Delta\mathrm{BIC_2(AGN)}$ to represent the comparison in this step. We select \textit{refined} SED AGN candidates as $\Delta\mathrm{BIC_2(AGN)}>2$. There are 16 thousand refined candidates, which is around one-third of the raw candidates. The exact $\Delta\mathrm{BIC_2(AGN)}$ threshold for the refined candidates is somewhat arbitrary and actually unimportant as long as it is reasonably good. What matters is the calibration of the SED selection, and we will present this in Section~\ref{sec: sedagn}. \begin{table*} \caption{Dense-grid \texttt{CIGALE} parameter settings for normal galaxies} \label{tbl_sedpar_step2_gal} \centering \begin{threeparttable} \begin{tabular}{cccc} \hline \hline \multirow{2}{*}{Module} & \multirow{2}{*}{Parameter} & Name in the \texttt{CIGALE} & \multirow{2}{*}{Possible values}\\ && configuration file &\\ \hline \multirow{4}{*}{Delayed SFH} & \multirow{2}{*}{Stellar \textit{e-}folding time} & \multirow{2}{*}{tau\_main} & 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,\\ &&&1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Gyr\\ & \multirow{2}{*}{Stellar age} & \multirow{2}{*}{age\_main} & 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,\\ &&&1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Gyr\\ \hline Simple stellar population & Initial mass function & imf & \citet{Chabrier03}\\ \citet{Bruzual03} & Metallicity & metallicity & 0.0001, 0.0004, 0.004, 0.008, 0.02, 0.05\\ \hline Nebular & ----- & ----- & -----\\ \hline \multirow{3}{*}{Dust attenuation} & \multirow{2}{*}{$E(B-V)_\mathrm{line}$} & \multirow{2}{*}{E\_BV\_lines} & 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4,\\ \multirow{3}{*}{\citet{Calzetti00}}&&& 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.2, 1.5\\ & $E(B-V)_\mathrm{line}/E(B-V)_\mathrm{continuum}$ & E\_BV\_factor & 1\\ \hline Dust emission & \multirow{2}{*}{Alpha slope} & \multirow{2}{*}{alpha} & \multirow{2}{*}{1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0}\\ \citet{Dale14}\\ \hline \mbox{X-ray} & ----- & ----- & -----\\ \hline \hline \end{tabular} \begin{tablenotes} \item \textit{Notes.} Unlisted parameters are set to the default values. These are applied to all the sources. \end{tablenotes} \end{threeparttable} \end{table*} \begin{table*} \caption{Dense-grid \texttt{CIGALE} parameter settings for AGN candidates} \label{tbl_sedpar_step2_agn} \centering \begin{threeparttable} \begin{tabular}{cccc} \hline \hline \multirow{2}{*}{Module} & \multirow{2}{*}{Parameter} & Name in the \texttt{CIGALE} & \multirow{2}{*}{Possible values}\\ && configuration file &\\ \hline \multirow{2}{*}{Delayed SFH} & Stellar \textit{e-}folding time & tau\_main & 0.1, 0.3, 0.5, 0.8, 1, 3, 5, 8, 10 Gyr\\ & Stellar age & age\_main & 0.1, 0.3, 0.5, 0.8, 1, 3, 5, 8, 10 Gyr\\ \hline Simple stellar population & Initial mass function & imf & \citet{Chabrier03}\\ \citet{Bruzual03} & Metallicity & metallicity & 0.02\\ \hline Nebular & ----- & ----- & -----\\ \hline \multirow{3}{*}{Dust attenuation} & \multirow{2}{*}{$E(B-V)_\mathrm{line}$} & \multirow{2}{*}{E\_BV\_lines} & 0, 0.1, 0.2, 0.3, 0.5,\\ \multirow{3}{*}{\citet{Calzetti00}}&&& 0.6, 0.8, 1, 1.2, 1.5\\ & $E(B-V)_\mathrm{line}/E(B-V)_\mathrm{continuum}$ & E\_BV\_factor & 1\\ \hline Dust emission & \multirow{2}{*}{Alpha slope} & \multirow{2}{*}{alpha} & \multirow{2}{*}{1.5, 2.0, 2.5}\\ \citet{Dale14}\\ \hline \multirow{6}{*}{\mbox{X-ray}} & AGN photon index & gam & 1.8\\ & \multirow{2}{*}{AGN $\alpha_\mathrm{OX}$} & \multirow{2}{*}{alpha\_ox} & $-1.9$, $-1.8$, $-1.7$, $-1.6$, $-1.5$,\\ &&&$-1.4$, $-1.3$, $-1.2$, $-1.1$\\ & Maximum deviation of $\alpha_\mathrm{OX}$ & \multirow{2}{*}{max\_dev\_alpha\_ox} & \multirow{2}{*}{0.2}\\ & from the $\alpha_\mathrm{OX}-L_{\nu,2500}$ relation &\\ & AGN \mbox{X-ray} angle coefficients & angle\_coef & (0.5, 0)\\ \hline \multirow{7}{*}{AGN} & Viewing angle & i & $0^\circ, 10^\circ, 30^\circ, 50^\circ, 70^\circ, 90^\circ$\\ \multirow{7}{*}{\citet{Stalevski12, Stalevski16}}& Disk spectrum & disk\_type & \citet{Schartmann05}\\ & Modification of the optical & \multirow{2}{*}{delta} & \multirow{2}{*}{$-0.27$}\\ & power-law index &\\ & \multirow{2}{*}{AGN fraction} & \multirow{2}{*}{fracAGN} & 0, 0.05, 0.1, 0.2, 0.3, 0.4,\\ &&& 0.5, 0.6, 0.7, 0.8, 0.9, 0.99\\ & $E(B-V)$ of the polar extinction & EBV & 0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5\\ \hline \hline \end{tabular} \begin{tablenotes} \item \textit{Notes.} Unlisted parameters are set to the default values. These are only applied to AGNs and raw SED AGN candidates with $\Delta\mathrm{BIC_1(AGN)>2}$ in order to return $\Delta\mathrm{BIC_2(AGN)}$. \end{tablenotes} \end{threeparttable} \end{table*} \subsubsection{The Selection Results} \label{sec: select_results} We first summarize our SED selection here. Similar to a steelmaking process, the overall SED selection undergoes multiple procedures to increase the purity step-by-step. The first-pass fitting returns raw SED AGN candidates with $\Delta\mathrm{BIC_1(AGN)}>2$, and the second-pass fitting is applied to the raw candidates and returns refined SED AGN candidates with $\Delta\mathrm{BIC_2(AGN)}>2$ (and $\Delta\mathrm{BIC_1(AGN)}>2$ by construction). As we will see in Section~\ref{sec: sedagn}, another calibration step is necessary to increase the purity further, but we only focus on the candidates in this section to obtain first insights.\par We compare the distributions of our sources with the MIR selection wedges \citep{Stern05, Lacy07, Donley12} in Figs.~\ref{fig_ircolor} and \ref{fig_ircolor_S05}. The distributions converge into the canonical wedges as $\Delta\mathrm{BIC(AGN)}$ increases, indicating that $\Delta\mathrm{BIC(AGN)}$ can indeed serve as an indicator for the existence of AGNs. Alternatively, excess \mbox{X-ray} emission can also indicate the existence of AGNs. The \mbox{X-ray} detection fractions of the four categories listed in the titles of the left four panels in Figs.~\ref{fig_ircolor} and \ref{fig_ircolor_S05} are 0.1\%, 1\%, 3\%, and 20\%, respectively. For the \mbox{X-ray}-undetected sources, we further perform \mbox{X-ray} stacking and present the results in Fig.~\ref{fig_xraynetCR}. For each panel of the figure, we have a list of sources satisfying the criterion at the top of the panel, and we randomly select 1000 sources that are at least $1'$ away from all the \mbox{X-ray} sources to avoid contamination. We then calculate the FB net count-rate map within a $84''\times84''$ region around each selected source and sum the signals together to obtain the stacked image, which is further smoothed and presented in Fig.~\ref{fig_xraynetCR}. The figure shows that the stacked \mbox{X-ray} signal increases toward higher $\Delta\mathrm{BIC(AGN)}$. Therefore, both the detected population and the undetected population in \mbox{X-rays} support that the AGN activity increases with $\Delta\mathrm{BIC(AGN)}$.\par \begin{figure*} \centering \resizebox{\hsize}{!}{\includegraphics{ircolor_wcdfs.pdf}} \caption{The distributions of sources on the IR color-color diagram. Red points are sources satisfying the criterion in the panel title, and cyan ones are the others. The kernel density estimations of the red points are plotted as the red-to-blue contour profiles. The dashed and solid lines are the AGN-selection wedges in \citet{Lacy07} and \citet{Donley12}, respectively. Among the four panels on the left, the upper left one shows galaxies that are not selected as raw SED AGN candidates; the upper right one shows sources that are selected as raw SED AGN candidates but fail to pass the refined candidate selection; the bottom two panels present the refined SED AGN candidates and divide them into two $\Delta\mathrm{BIC_2(AGN)}$ bins that roughly contain the same number of sources. As a comparison, the distribution of \mbox{X-ray} AGNs is plotted in the rightmost panel. The distribution of the red points gradually converges into the MIR AGN-selection wedges as $\Delta\mathrm{BIC}$ increases.} \label{fig_ircolor} \end{figure*} \begin{figure*} \centering \resizebox{\hsize}{!}{\includegraphics{ircolor_S05_wcdfs.pdf}} \caption{Same as Fig.~\ref{fig_ircolor}, but for the AGN-selection wedge in \citet{Stern05}.} \label{fig_ircolor_S05} \end{figure*} \begin{figure*} \centering \resizebox{\hsize}{!}{\includegraphics{stackxray_wcdfs.pdf}} \caption{The stacked and smoothed \mbox{X-ray} FB net count-rate images covering $84''\times84''$. Each image is constructed from 1000 random sources satisfying the criterion in the corresponding panel title and at least $1'$ away from all the \mbox{X-ray} sources. The stacked signal visually increases with $\Delta\mathrm{BIC(AGN)}$.} \label{fig_xraynetCR} \end{figure*} However, we caution that Figs.~\ref{fig_ircolor} $-$ \ref{fig_xraynetCR} are biased toward bright sources. For example, only 17\% of the refined SED AGN candidates have valid MIR colors, i.e., detected in all four IRAC bands with SNR above three, and thus the apparent agreements among sources with $\Delta\mathrm{BIC_2(AGN)}>9$ and the MIR wedges in Figs.~\ref{fig_ircolor} and \ref{fig_ircolor_S05} do not necessarily mean that $\Delta\mathrm{BIC_2(AGN)}>9$ is a good AGN-selection criterion for all sources. The only way to overcome this bias is to calibrate the SED selection with a complete and pure AGN sample. We present such a calibration in Section~\ref{sec: sedagn}, and it shows that faint SED AGNs are less reliable than bright SED AGNs.\par We compare different selections in the left panel of Fig.~\ref{fig_venn_agn} using Venn diagrams. 63\% of the ground-truth \mbox{X-ray} AGNs are also identified as refined SED AGN candidates, but the total number of refined SED AGN candidates is much larger than those selected by \mbox{X-ray} or MIR, and this is because of both the contamination of galaxies to refined SED AGN candidates and missed AGNs by \mbox{X-ray} and MIR. The MIR AGNs may also be contaminated by star-forming galaxies, and this problem can be largely solved by adopting the stringent criterion in \citet{Donley12}, which is known to be able to select purer MIR AGN samples. The right panel of Fig.~\ref{fig_venn_agn} shows that most (91\%) of MIR AGNs selected by the criterion in \citet{Donley12} are also selected as refined SED AGN candidates. To probe the nature of the AGNs that are selected by only \mbox{X-ray} or MIR approaches, we show the composite SEDs of AGNs identified by different combinations of selection methods in Fig.~\ref{fig_stacksed}. The composite SEDs are defined as the median $\nu F_\nu/\int F_\nu d\nu$ curves of best-fit models as functions of rest-frame wavelength. For the composite SED of AGNs identified by all the three methods (left panel in Fig.~\ref{fig_stacksed}), the AGN component dominates in the MIR and also has considerable contributions in the optical. In contrast, the composite SEDs of AGNs selected only from \mbox{X-ray} or MIR show much weaker AGN contributions, and they tend to be more obscured, leading to the difficulty of identifying such AGNs through SED fitting. Especially, the $16^\mathrm{th}$ percentile of the composite AGN component for MIR-only AGNs is zero across all wavelengths, indicating that the MIR-only AGNs may be largely contaminated by star-forming galaxies. If we only adopt the MIR criterion in \citet{Donley12}, we will obtain similar results as in Fig.~\ref{fig_stacksed}, except that the $16^\mathrm{th}$ percentile SED of the MIR-only AGNs in the right panel of the figure will not be zero, but will look similar to that of the \mbox{X-ray}-only AGNs because there is little contamination from normal galaxies to the \citet{Donley12} AGNs. When matching $z$ and $L_\mathrm{X}$, we found that \mbox{X-ray} AGNs that are not selected as refined SED AGN candidates have larger host $M_\star$ than those that are selected as both \mbox{X-ray} and SED AGNs, also indicating that these \mbox{X-ray} AGNs are missed by the SED selection because of larger galaxy dilution. Using the $N_\mathrm{H}$ values derived in Section~\ref{sec: xrayphot}, we found that the \mbox{X-ray}-only AGNs are slightly more obscured in the \mbox{X-ray}, with a median $\log N_\mathrm{H}=22$, while the median $\log N_\mathrm{H}$ of AGNs selected by all the three methods is 21. Besides, \mbox{X-ray}-only or MIR-only AGNs are generally fainter, as illustrated by their $i$-band magnitude distributions in Fig.~\ref{fig_imag_agns}. Overall, the result that these \mbox{X-ray}-only or MIR-only AGNs are not selected by other methods may be caused by their faintness, smaller AGN contributions, and higher obscurations.\par \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{venn_agn_refined_candidate_wcdfs.pdf} \includegraphics{venn_agn_refined_candidate_wcdfs_D12.pdf}} \caption{Venn diagrams comparing different AGN-selection results. The two panels differ for MIR AGNs, where the left panel contains MIR AGNs satisfying any criterion in \citet{Stern05}, \citet{Lacy07}, or \citet{Donley12}, while the right panel only contains MIR AGNs based on \citet{Donley12} to increase the purity. 63\% of \mbox{X-ray} AGNs, 41\% of MIR AGN, and 91\% of MIR AGNs based on \citet{Donley12} are also selected as refined SED AGN candidates, i.e., with $\Delta\mathrm{BIC_2(AGN)}>2$. There are many more SED AGN candidates than \mbox{X-ray} or MIR AGNs because of both the contamination of normal galaxies and missed AGNs by \mbox{X-ray} and MIR. The total number of AGNs and refined SED AGN candidates is slightly different from the number of sources with ``best'' results from the AGN fitting in Table~\ref{tbl_fieldinfo} because the best results of some refined SED AGN candidates are instead from the BQ-galaxy fitting (cf., Section~\ref{sec: bqagn}).} \label{fig_venn_agn} \end{figure*} \begin{figure*} \centering \resizebox{\hsize}{!}{\includegraphics{stacksed_wcdfs.pdf}} \caption{The typical SEDs of sources satisfying different AGN-selection conditions, as indicated by the panel titles, where ``SED'' means refined SED AGN candidates, and MIR AGNs are those satisfying any criterion in \citet{Stern05}, \citet{Lacy07}, or \citet{Donley12}. The source SEDs are normalized by their total fluxes integrated from \mbox{X-ray} to FIR, and the black, cyan, and red solid lines are the median total SEDs, galaxy, and AGN components, respectively. The shaded regions indicate $\mathrm{16^{th}-84^{th}}$ percentiles of the corresponding components. The red shaded regions become large in the optical because there are both type~1 and type~2 AGNs -- the former have bright and blue optical emission, while the latter are usually much fainter. The red shaded region for MIR-only AGNs is large because its $16^\mathrm{th}$ percentile is zero across all wavelengths, indicating that MIR-only AGNs may be largely contaminated by star-forming galaxies. The AGN components of \mbox{X-ray}- or MIR-only AGNs are generally more obscured and less dominant, which also explains why they are not selected as refined SED AGN candidates.} \label{fig_stacksed} \end{figure*} \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{imag_agns.pdf}} \caption{The $i$-band magnitude distributions of AGNs selected by different methods. The legend ``X-ray \& MIR \& SED'' means refined SED AGN candidates that are also identified by the \mbox{X-ray} and MIR selections, and ``X-ray (MIR) only'' refers to those only identified by \mbox{X-ray} (MIR) but not other methods. The \mbox{X-ray}- or MIR-only AGNs are generally fainter.} \label{fig_imag_agns} \end{figure} The incompleteness of our refined SED AGN candidates can hardly be resolved without greatly sacrificing purity. To illustrate this, we compare our raw SED AGN candidates with the \mbox{X-ray} and MIR selections, and the completeness only marginally increases compared to that of the refined SED AGN candidates -- 76\% of \mbox{X-ray} AGNs, 52\% of MIR AGNs, and 94\% of \citet{Donley12} MIR AGNs are identified as raw SED AGN candidates. Recall that the total number of raw SED AGN candidates is around three times larger than that of refined candidates, but the completeness only differs by around 10\%. \subsubsection{Are SED AGNs reliable?} \label{sec: sedagn} We quantitatively examine the reliability of the SED AGN selection and further construct a criterion to select purer reliable SED AGNs from our refined SED AGN candidates in this section. We turn to the smaller embedded \mbox{CDF-S} field with 7~Ms Chandra observations \citep{Luo17} and ultradeep multi-wavelength observations to calibrate our SED selection. This deepest \mbox{X-ray} field ever obtained provides a largely complete pure AGN sample; that is, we do not expect our SED selection to be able to identify many AGNs missed by Chandra in \mbox{CDF-S}. Note that our multi-wavelength data have similar depths in \mbox{CDF-S} compared to the remaining parts of \mbox{W-CDF-S}, and thus the comparison should be representative for the whole \mbox{W-CDF-S} field. We focus on the central region with high Chandra exposure, i.e., within $6'$ around J2000 $\mathrm{RA=03^h32^m28.27^s, Dec=-27^\circ48'21.8''}$, and match our sources with those in \citet{Luo17}. \citet{Lambrides20} argued that the \mbox{X-ray} luminosities of faint sources in \citet{Luo17} may be underestimated due to their heavy obscuration, and thus some AGNs may be misclassified in \citet{Luo17}. Therefore, we regard a source to be an AGN if it is classified as an AGN in either \citet{Luo17} or \citet{Guo19}, where \citet{Guo19} reclassified six galaxies in \citet{Luo17} as AGNs. There are 345 AGNs and 222 \mbox{X-ray}-detected galaxies in total, and we display the Venn diagram comparing them with our refined SED AGN candidates in the left panel of Fig.~\ref{fig_venn_agn_candidate_cdfs_L17}. There are many refined SED AGN candidates undetected in \mbox{X-rays}, and they are expected to be mainly galaxies misclassified as AGNs by the SED selection. The overall purity, defined as the fraction of sources identified as \mbox{CDF-S} AGNs, of our refined SED AGN candidates is 32\%; the completeness, defined as the fraction of \mbox{CDF-S} AGNs identified as refined SED AGN candidates, is 17\%.\par \begin{figure} \centering \resizebox{\hsize}{!}{ \includegraphics{venn_agn_candidate_cdfs_L17.pdf} } \caption{A Venn diagram comparing our refined SED AGN candidates with the ground-truth 7~Ms \mbox{X-ray} sources in \mbox{CDF-S}. The overlap between our refined candidates and the \mbox{X-ray} AGNs is limited, indicating that both the purity and the completeness are not high for the refined candidates.} \label{fig_venn_agn_candidate_cdfs_L17} \end{figure} We further probe how the purity and completeness evolve with the threshold of $\Delta\mathrm{BIC_2(AGN)}$. For a given threshold, $\delta$, we select sources with $\Delta\mathrm{BIC_2(AGN)}>\delta$ and follow the same procedure as above to calculate the corresponding purity and completeness. The results are presented in Fig.~\ref{fig_purity_complete_detbic}. As a comparison, we also show the completeness curves of retrieving the AGNs selected by \mbox{X-ray} or MIR in the whole \mbox{W-CDF-S} field given the $\Delta\mathrm{BIC_2(AGN)}$ threshold. The curves are higher than the completeness points in \mbox{CDF-S} because the AGN samples themselves in \mbox{W-CDF-S} are incomplete. Some MIR AGNs are actually galaxies, which may lower the completeness by increasing the denominator of the completeness calculation (i.e., the total number of MIR AGNs). As discussed in the last paragraph of Section~\ref{sec: select_results}, the completeness of our candidates can hardly be improved much without greatly decreasing the purity. This is also supported by Fig.~\ref{fig_purity_complete_detbic}, which shows that the purity decreases rapidly around $\delta=2$.\par \begin{figure} \centering \resizebox{\hsize}{!}{ \includegraphics{purity_complete_detbic.pdf} } \caption{The purity (blue) and completeness (red) of AGNs for a sample with $\Delta\mathrm{BIC_2(AGN)}>\delta$ as a function of the threshold $\delta$. The purity and completeness points are calculated by calibration over the \mbox{CDF-S} data, and the associated error bars represent their binomial proportion confidence intervals. The black horizontal line marks a purity of 75\%, which is roughly the plateau that the purity can reach when $\delta$ is large. The red curves are the completeness of retrieving \mbox{X-ray} or MIR AGNs in the whole \mbox{W-CDF-S} field using the criterion of $\Delta\mathrm{BIC_2(AGN)}>\delta$, where ``MIR'' means all the sources satisfying any criterion in \citet{Stern05}, \citet{Lacy07}, or \citet{Donley12}, while ``MIR; Donley et al. (2012)'' means only for MIR AGNs satisfying \citet{Donley12}.} \label{fig_purity_complete_detbic} \end{figure} Oftentimes, purity matters more than completeness, and thus we further calibrate the selection to select reliable SED AGNs with a high purity. Fig.~\ref{fig_purity_complete_detbic} shows that there is a plateau of $\approx75\%$ in purity when $\delta$ is high, and thus we adopt purity $\ge75\%$ as our requirement for reliable SED AGNs. We adopt a simple tree-like criterion and assume that a reliable SED AGN should satisfy \begin{align} \begin{cases} \Delta\mathrm{BIC_2(AGN)}\ge\delta_1, \chi^2_r\leq3,~\mathrm{if}~i_\mathrm{mag}\leq i_\mathrm{break},\\ \Delta\mathrm{BIC_2(AGN)}\ge\delta_2, \chi^2_r\leq3,~\mathrm{if}~i_\mathrm{mag}>i_\mathrm{break}, \end{cases}\label{eq: reliable_sedagn} \end{align} where $i_\mathrm{mag}$ is the HSC $i$-band magnitude, and we found that the magnitude condition can help our selection. We require that among the sources satisfying the above criteria in each magnitude bin, at least 75\% are AGNs. By adjusting the parameters, we found that the total number of such sources is maximized when \begin{align} i_\mathrm{break}=23, \delta_1=4, \mathrm{and}~\delta_2=50.\label{eq: crit_sedagn} \end{align} This results in 34 sources, and 26 of them are labeled as AGNs in \citet{Luo17} or \citet{Guo19}, i.e., a purity of $(76\pm7)\%$. The Venn diagram under our criterion is displayed in the left panel of Fig.~\ref{fig_venn_reliable_agn_cdfs_L17}. The high purity is achieved at the expense of a high incompleteness, and the source sky density decreases from $\sim3000~\mathrm{deg^{-2}}$ for refined SED AGN candidates to $\sim600~\mathrm{deg^{-2}}$ for these reliable SED AGNs. It is worth noting that if we perform the same calibration using $\Delta\mathrm{BIC_1(AGN)}$ over the raw SED AGN candidates instead of the refined SED AGN candidates, we can obtain the following criterion. \begin{align} \begin{cases} \Delta\mathrm{BIC_1(AGN)}\ge17, \chi^2_r\leq3,~\mathrm{if}~i_\mathrm{mag}\leq22.5,\\ \Delta\mathrm{BIC_1(AGN)}\ge54, \chi^2_r\leq3,~\mathrm{if}~i_\mathrm{mag}>22.5.\label{eq: reliable_sedagn_bic1} \end{cases} \end{align} 29 sources will be retrieved, and 22 will be AGNs. Among them, 27/29 sources selected by Eq.~\ref{eq: reliable_sedagn_bic1} are also selected by Eqs.~\ref{eq: reliable_sedagn} and \ref{eq: crit_sedagn}, and all the 22 true AGNs also satisfy the $\Delta\mathrm{BIC_2(AGN)}$ reliable SED AGN criterion in the meantime. Therefore, the reliable SED AGN sample is robust no matter whether $\Delta\mathrm{BIC_1(AGN)}$ or $\Delta\mathrm{BIC_2(AGN)}$ is adopted as long as careful calibrations are performed, except that $\Delta\mathrm{BIC_2(AGN)}$ is slightly more efficient in selecting more AGNs.\par \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{venn_agn_reliable_cdfs_L17.pdf} \includegraphics{venn_agn_reliable_wcdfs.pdf} } \caption{Venn diagrams comparing our reliable SED AGNs (cf., Eqs.~\ref{eq: reliable_sedagn} and \ref{eq: crit_sedagn}) in \mbox{CDF-S} (\textit{left}) and \mbox{W-CDF-S} (\textit{right}). The purity of our reliable SED AGNs is $(76\pm7)\%$, according to the \mbox{CDF-S} calibration, and 69\% of these sources are also identified as \mbox{X-ray} or MIR AGNs in \mbox{W-CDF-S}.} \label{fig_venn_reliable_agn_cdfs_L17} \end{figure*} By far, we have been focusing only on the SED AGN candidates, and one may wonder whether we can select many more reliable SED AGNs from the non-candidates to supplement the reliable SED AGN sample selected only from the candidates. We will argue that the answer is ``no'' in this paragraph. First, as we showed in Section~\ref{sec: select_results}, sources that are raw SED AGN candidates but not refined SED AGN candidates are much more likely to host AGNs than non-candidates because the former sample has a higher \mbox{X-ray} detection fraction and MIR colors more inclined toward the AGN MIR color-color wedges. It is thus expected that the fraction of reliable SED AGNs that we can obtain among the \mbox{CDF-S} AGNs in a given sample is larger for the sources that are raw but not refined candidates compared to the non-candidates. We follow the same calibration using $\Delta\mathrm{BIC_2(AGN)}$ for the sources that are raw but not refined candidates. We have 27 true AGNs in \mbox{CDF-S} that belong to the population and can only select one reliable SED AGN out of them. There are 184 AGNs in \mbox{CDF-S} classified as non-candidates, and the expected number of retrievable reliable SED AGNs among them is thus smaller than $1/27\times184=7$. This is an expected hard limit and is much smaller than the current number of reliable SED AGNs constructed only from the SED AGN candidates. Furthermore, we can directly try using $\Delta\mathrm{BIC_1(AGN)}$ to select reliable SED AGNs among the non-candidates.\footnote{Recall that the non-candidates do not have $\Delta\mathrm{BIC_2(AGN)}$ values.} The calibration using Eq.~\ref{eq: reliable_sedagn} but with $\Delta\mathrm{BIC_1(AGN)}$ returns zero reliable SED AGNs. Our previous paragraph has justified that the reliable SED AGNs are largely insensitive to the choice of $\Delta\mathrm{BIC_1(AGN)}$ or $\Delta\mathrm{BIC_2(AGN)}$, and thus it is expected that even if we spend vast computational resources obtaining the $\Delta\mathrm{BIC_2(AGN)}$ values for all the non-candidates, they can hardly provide more reliable SED AGNs, and we hence decide not to run the dense-grid AGN-template fitting for the non-candidates.\par We then apply the calibration results in Eqs.~\ref{eq: reliable_sedagn} and \ref{eq: crit_sedagn} to the whole \mbox{W-CDF-S} field and found that 69\% of the resulting reliable SED AGNs can be selected by \mbox{X-ray} or MIR, as shown in the right panel of Fig.~\ref{fig_venn_reliable_agn_cdfs_L17}. Recall that the expected purity is $(76\pm7)\%$ for the reliable SED AGNs, and 69\% is consistent with this expected purity. We thus conclude that the SED method can hardly \textit{reliably} identify more AGNs missed by other methods in our fields. This is not surprising because better SED selections require high-quality MIR data, and \citet{Yang21b} showed that this problem cannot be solved straightforwardly without deep and continuous MIR-band coverage from, e.g., JWST.\par Although \texttt{CIGALE} outputs $f_\mathrm{AGN}$, we do not rely on this parameter to select AGN candidates because it often has large systematic and statistical errors (e.g., \citealt{Ciesla15, Yang21b}). We present $f_\mathrm{AGN}$ versus $\Delta\mathrm{BIC_2(AGN)}$ in Fig.~\ref{fig_fracagn_detbic}. To depict the general trend of our sources, we also plot the locally estimated scatterplot smoothing (LOESS; e.g., Chapter~6 of \citealt{Feigelson12} and references therein) curve. The LOESS technique is effectively similar to the running mean or median in nonparametrically drawing a rough trend for scattered points, but LOESS provides smoother curves and avoids arbitrarily choosing abscissa bins. We will consistently use LOESS in Section~\ref{sec: sedfitting}. Fig.~\ref{fig_fracagn_detbic} shows that the two parameters only have a weak positive correlation, and $f_\mathrm{AGN}$ is largely a random number spanning a wide range regardless of $\Delta\mathrm{BIC_2(AGN)}$. This is because $f_\mathrm{AGN}$ generally cannot be constrained well by the current data \citep{Yang21b}, and thus we should not directly use $f_\mathrm{AGN}$ to select AGNs. \citet{Thorne22} is a recent example supporting our argument. They selected SED AGN candidates in COSMOS by requiring an AGN fraction between $5-20~\mu\mathrm{m}$ above 0.1. 42\% of their sources were regarded as AGN candidates, and they successfully classified 69\% of the \citet{Donley12} MIR AGNs as SED AGN candidates. In contrast, our refined SED AGN candidates only constitute 2\% of all the sources but include up to 91\% of MIR AGNs from \citet{Donley12}, and thus using AGN fraction to select AGNs may misclassify many normal galaxies as AGNs and/or miss real AGNs. \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{fracagn_detbic.pdf}} \caption{$f_\mathrm{AGN}$ vs. $\Delta\mathrm{BIC_2(AGN)}$ for refined SED AGN candidates. The red line is the LOESS curve of the points. The apparent horizontal point density does not reflect source number because we intentionally increase the point size and opacity at larger $\Delta\mathrm{BIC_2(AGN)}$ for better visualization. There is only a weak positive correlation between the two parameters, and $f_\mathrm{AGN}$ scatters across a wide range because it can hardly be constrained well by the available data.} \label{fig_fracagn_detbic} \end{figure} \subsection{Selection of BQ-galaxy Candidates} \label{sec: select_bqgal} We select BQ galaxies in this section. Our main goal is only to select BQ-galaxy candidates in an economical manner to improve their SED-fitting results within the \texttt{CIGALE} framework, and detailed characterizations of these sources are left for future works.\par Broad-band SEDs can be used to select BQ galaxies by checking if the modeled SFH has undergone a rapid change within several hundred million years. In \texttt{CIGALE}, such galaxies can be modeled by a truncated delayed SFH \citep{Ciesla16}, formulated as the following: \begin{align} \mathrm{SFR}(t)\propto \begin{cases} t\exp(-t/\tau),~t\leq t_\mathrm{trunc}\\ r_\mathrm{SFR}\mathrm{SFR(t_\mathrm{trunc})},~t>t_\mathrm{trunc} \end{cases},\label{eq: delayedsfhbq} \end{align} where the formula at $t\leq t_\mathrm{trunc}$ is the normal delayed SFH with an \textit{e}-folding time of $\tau$, and the SFR is assumed to instantaneously change by a factor of $r_\mathrm{SFR}$ at $t_\mathrm{trunc}$ and then remain constant until the current age. A normal delayed SFH is thus modeled by $r_\mathrm{SFR}=1$ to a first-order approximation.\par Similar to Section~\ref{sec: select_agn} and \citet{Ciesla18}, we use $\Delta\mathrm{BIC}$ between the fitting with normal and truncated delayed SFHs, and the candidates are selected in two steps. In the first step, we use the coarse-grid setting in Table~\ref{tbl_sedpar_step1} to calculate $\Delta\mathrm{BIC_1(BQ)}$ for all the sources and obtain 51 thousand sources with $\Delta\mathrm{BIC_1(BQ)}>2$; in the second step, we only fit sources with $\Delta\mathrm{BIC_1(BQ)}>2$ using the dense-grid settings in Tables~\ref{tbl_sedpar_step2_gal} and \ref{tbl_sedpar_step2_bqgal} to measure $\Delta\mathrm{BIC_2(BQ)}$. We do not add AGN components for simplicity. Six thousand BQ-galaxy candidates are selected with the criterion of $\Delta\mathrm{BIC_2(BQ)}>2$. The selection is done for all the sources no matter whether they are selected as SED AGN candidates or not (also see Section~\ref{sec: bqagn} for further discussion). When fitting BQ galaxies, the age of the BQ episode is set to be between 10 and 800~Myr. BQ episodes happening within $\sim100$~Myr are generally hard to detect with broad-band SEDs, but there are galaxies with strong bursts within a few tens of millions of years producing strong H$\alpha$ emission (e.g., \citealt{Broussard19}) that happen to reside in and dominate one of the observed bands (see Fig.~\ref{fig_example_sed} for an example). H$\alpha$ emission traces the star formation on a time scale of $\sim10$~Myr, and thus it is still helpful to include a few possible values between 10 to 100~Myr for the BQ episode age to better represent these bursting galaxies. Nevertheless, it is generally difficult to measure the BQ episode age reliably, as discussed in previous works (e.g., \citealt{Ciesla16, Ciesla21}), and thus this parameter should not be over-interpreted.\par It is worth noting that unlike the AGN selection, which judges whether an additive component from the AGN emission is necessary, the BQ-galaxy selection judges whether the SED shape of the normal-galaxy templates is satisfactory. As we discussed in Section~\ref{sec: sedagn}, using $\Delta\mathrm{BIC_1(AGN)}$ alone can also return fairly reliable SED AGN results as long as calibrations are performed, and the $\Delta\mathrm{BIC_1(AGN)}$ results are only slightly less efficient than the $\Delta\mathrm{BIC_2(AGN)}$ results. This indicates that the AGN selection is largely insensitive to whether the galaxy templates are sufficiently inclusive because the difference between AGN and galaxy SEDs is large. However, the BQ-galaxy selection is subject to more subtle differences, and it is hence more important to have good normal-galaxy templates. We indeed found that most $\Delta\mathrm{BIC_1(BQ)}$ values are dominated by the imperfect galaxy templates, and only 11\% of sources with $\Delta\mathrm{BIC_1(BQ)}>2$ pass the criterion of $\Delta\mathrm{BIC_2(BQ)}>2$. Again, the limitation of $\Delta\mathrm{BIC_1(BQ)}$ is not necessarily a disadvantage as it returns a more complete sample. We will only focus on $\Delta\mathrm{BIC_2(BQ)}$ hereafter. Unlike introducing the terms of ``raw SED AGN candidates'' and ``refined SED AGN candidates'', we use a single term of ``BQ-galaxy candidates'' to describe sources with $\Delta\mathrm{BIC_2(BQ)}>2$ for simplicity.\par \begin{table*} \caption{Dense-grid \texttt{CIGALE} parameter settings for BQ-galaxy candidates} \label{tbl_sedpar_step2_bqgal} \centering \begin{threeparttable} \begin{tabular}{cccc} \hline \hline \multirow{2}{*}{Module} & \multirow{2}{*}{Parameter} & Name in the \texttt{CIGALE} & \multirow{2}{*}{Possible values}\\ && configuration file &\\ \hline \multirow{7}{*}{Truncated delayed SFH} & \multirow{2}{*}{Stellar \textit{e-}folding time} & \multirow{2}{*}{tau\_main} & 0.1, 0.2, 0.3, 0.5, 0.7, 0.8,\\ &&&1, 2, 3, 5, 7, 8, 10 Gyr\\ & Stellar age & age\_main & 1, 2, 3, 5, 7, 8, 10 Gyr\\ & \multirow{2}{*}{Age of the BQ episode} & \multirow{2}{*}{age\_bq} & 10, 50, 100, 200, 300, 400\\ &&&500, 600, 700, 800 Myr\\ & \multirow{2}{*}{$r_\mathrm{SFR}$} & \multirow{2}{*}{r\_sfr} & 0, 0.05, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 0.7, 0.8,\\ &&&1, 1.5, 2, 3, 5, 7, 8, 10, 20, 50, 70, 100\\ \hline Simple stellar population & Initial mass function & imf & \citet{Chabrier03}\\ \citet{Bruzual03} & Metallicity & metallicity & 0.0001, 0.0004, 0.004, 0.008, 0.02, 0.05\\ \hline Nebular & ----- & ----- & -----\\ \hline \multirow{3}{*}{Dust attenuation} & \multirow{2}{*}{$E(B-V)_\mathrm{line}$} & \multirow{2}{*}{E\_BV\_lines} & 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4,\\ \multirow{3}{*}{\citet{Calzetti00}}&&& 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.2, 1.5\\ & $E(B-V)_\mathrm{line}/E(B-V)_\mathrm{continuum}$ & E\_BV\_factor & 1\\ \hline Dust emission & \multirow{2}{*}{Alpha slope} & \multirow{2}{*}{alpha} & \multirow{2}{*}{1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0}\\ \citet{Dale14}\\ \hline \mbox{X-ray} & ----- & ----- & -----\\ \hline \hline \end{tabular} \begin{tablenotes} \item \textit{Notes.} Unlisted parameters are set to the default values. These are only applied to sources with $\Delta\mathrm{BIC_1(BQ)>2}$ and return $\Delta\mathrm{BIC_2(BQ)}$. \end{tablenotes} \end{threeparttable} \end{table*} We show $r_\mathrm{SFR}$ versus $\Delta\mathrm{BIC_2(BQ)}$ in Fig.~\ref{fig_rsfr_detbic}, and $r_\mathrm{SFR}$ is clearly bimodal. The bimodality increases with $\Delta\mathrm{BIC_2(BQ)}$. This indicates that the BQ-galaxy candidates include both quenching ($r_\mathrm{SFR}\ll1$) and bursting ($r_\mathrm{SFR}\gg1$) galaxies. Based on the figure, we empirically set $r_\mathrm{SFR}=0.2$ and 10 as the thresholds for the quenching and bursting subpopulations, respectively, where the quenching threshold is from \citet{Ciesla18}. While there is some subjectiveness in defining numerical cutoffs, these thresholds are chosen to ensure that these galaxies experience large changes in SFR which we expect to leave a clear observational signal. However, there is not a clear precedent for these choices in the galaxy-formation literature. Simulations have shown that normal galaxies can commonly have SFR variations up to 0.5~dex or even more within hundreds of millions of years, but the exact variability amplitude depends on both $M_\star$ and the simulation setup (e.g., \citealt{Iyer20}); a reasonable $r_\mathrm{SFR}$ threshold should thus be larger than 0.5~dex to distinguish from normal SFR fluctuations. Meanwhile, (post-)starburst galaxies are often defined by their observational features instead of their SFHs, and an exact mapping between the observational classification of such galaxies and their SFH parameters has not been fully constructed. \citet{Ciesla21} further showed that the recovery of $r_\mathrm{SFR}$ for normal galaxies with $r_\mathrm{SFR}\approx1$ can span a range of $\sim1$~dex. Due to these reasons, exact $r_\mathrm{SFR}$ thresholds are difficult to obtain, but we have confirmed that our qualitative results do not depend on the adopted values as long as they are reasonable. We will briefly analyze the quenching subpopulation and bursting subpopulation in the following paragraphs.\par \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{rsfr_detbic.pdf}} \caption{$r_\mathrm{SFR}$ vs. $\Delta\mathrm{BIC_2(BQ)}$ for our BQ-galaxy candidates. The $r_\mathrm{SFR}$ distribution is bimodal. The black horizontal lines represent $r_\mathrm{SFR}=0.2$ and 10, from which we empirically select quenching or bursting subpopulations.} \label{fig_rsfr_detbic} \end{figure} First, we define ``likely quenching galaxies'' as those with $r_\mathrm{SFR}<0.2$ and $\chi_r^2\leq3$. This results in 639 sources. We show their distribution in the rest-frame $UVJ$ color-color diagram in Fig.~\ref{fig_UVJ}, where the $UX$- and $V$-band definitions in \citet{Bessell90} and $J$-band definition in \citet{Tokunaga02} are adopted. The $UVJ$ diagram is widely used to identify quiescent and star-forming galaxies (e.g., \citealt{Williams09, Whitaker12, Muzzin13, Leja19c}), and Fig.~\ref{fig_UVJ} reveals that our likely quenching galaxies generally locate in the star-forming region but on top of the main star-forming locus and form a line pointing toward the quiescent region. The line formed by these sources is generally parallel with the age-color relation in \citet{Belli19}, who defined the post-starburst region as median stellar age between 300 and 800~Myr (but see \citealt{Wu20} for a different conclusion). To compare with the relation in \citet{Belli19}, we color-code our likely quenching galaxies by their median stellar age in Fig.~\ref{fig_UVJ}, and they indeed show an age gradient such that the age generally increases toward the upper-right direction. Our median stellar ages are slightly larger than the relation in \citet{Belli19}, possibly because of the different choice of SFH and the fact that our redshifts are generally smaller than those in \citet{Belli19}. Nevertheless, the locations of our sources in Fig.~\ref{fig_UVJ} indicate that they should have undergone quenching very recently (within a few hundreds of millions of years) so that they have not entered the quiescent region, as also found in \citet{Ciesla18} (see their Fig.~8). Therefore, we are capturing quenching star-forming galaxies (i.e., those that are transitioning from the star-forming phase to the quiescent phase) instead of quenched quiescent galaxies because the latter generally do not strongly require a truncated delayed SFH to model their SEDs, even though they may have undergone (slow or rapid) quenching gigayears ago.\par \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{UVJ.pdf}} \caption{The distributions of sources in the $UVJ$ color-color plane. The large points are likely quenching galaxies color-coded by their median stellar age, the blue points are likely bursting galaxies, and the cyan points, plotted as a comparison, are our whole sample in \mbox{W-CDF-S}. The solid line is the boundary expected to enclose quiescent galaxies in \citet{Muzzin13} at $z>1$. The dashed line is the post-starburst region in \citet{Belli19}, which is defined as the region for which the expected median stellar age is between 300 and 800~Myr, as labeled in the figure. The likely quenching galaxies are generally in the star-forming region but on top of the main star-forming locus and have an age gradient toward the quiescent region. The likely bursting galaxies are scattered across the star-forming region.} \label{fig_UVJ} \end{figure} Similar to likely quenching galaxies, we define ``likely bursting galaxies'' as those satisfying $r_\mathrm{SFR}>10$ and $\chi_r^2\leq3$. We further require that they are not selected as AGNs or refined SED AGN candidates to avoid degeneracies (see Section~\ref{sec: bqagn} for more discussion). We also empirically exclude sources with $z=0.01$. 0.01 is the minimum photo-$z$ value allowed in \citet{Zou21b}, and photo-$z$s reaching this boundary are often caused by failures in photo-$z$ measurements and are hence unreliable. Such sources usually ``pile up'' at a single $z=0.01$ value. These cases are rare (3\%) for all the sources, but we found that they are enhanced and can account for 11\% of the bursting subpopulation. These $z=0.01$ bursting galaxies may still be real bursting galaxies at low redshifts ($z\lesssim0.2$), and their bursting nature may be the actual cause for why their photo-$z$s are inaccurate as the templates used in deriving photo-$z$s may not be able to fit their bursting SEDs.\footnote{Besides the limitations of the templates, there are also other reasons that can cause the $z=0.01$ solution for the general galaxy population, such as unreliable photometry (e.g., due to large angular sizes of low-redshift galaxies) and peculiar motions that are comparable to the Hubble flow.} The main problem caused by their small photo-$z$s is that their $M_\star$ and SFRs are hence highly underestimated. For example, the distance at $z=0.01$ is ten times smaller than that at $z=0.1$, even if the redshift difference is small and is thus not expected to cause material difference in the observed SED shape given a rest-frame SED. After removing these sources, we obtain a total of 1899 likely bursting galaxies.\par We plot the likely bursting galaxies in the $UVJ$ plane in Fig.~\ref{fig_UVJ}, and they generally scatter across the star-forming region. These likely bursting galaxies are possible candidates for starburst and/or rejuvenating galaxies. J. Zhang et al. (in preparation) found that rejuvenating galaxies generally cover a similar region in color-color diagrams as normal star-forming galaxies, explaining the large scatter of our likely bursting galaxies (J. Zhang 2022, private comm). Rejuvenating galaxies are still largely poorly understood and worthy of probing more carefully (e.g., \citealt{Chauke19, Mancini19}), and we leave such analyses to the future.\par Similar to the AGN selection, the BQ-galaxy selection and Eq.~\ref{eq: delayedsfhbq} may also face challenges. For example, $r_\mathrm{SFR}$ is difficult to constrain \citep{Ciesla16, Ciesla18}, and fluctuations of star formation, especially for low-mass galaxies, may mimic quenching (e.g., \citealt{El-Badry16}); how these factors may affect the selection results and Fig.~\ref{fig_UVJ} are still unknown. Efforts to improve the BQ-galaxy selection can be made in the future. For example, \citet{Aufort20} presented a machine-learning-based approximate Bayesian computation algorithm to select BQ galaxies and successfully applied it to the COSMOS field. Their method may help improve the BQ-galaxy selections in our fields. Another worthwhile project is to use \texttt{Prospector-$\alpha$} \citep{Leja17} to do the SED fitting. One of the main advantages of \texttt{Prospector-$\alpha$} compared to \texttt{CIGALE} is that the former allows non-parametric SFHs, and thus should be able to provide better measurements for SFHs. However, \texttt{Prospector-$\alpha$} is much more computationally demanding and cannot fit millions of SEDs with common computational resources. Our BQ-galaxy candidates, whose total number is much smaller than the number of all the sources, can thus significantly reduce the computational requirements by serving as a parent sample for the future \texttt{Prospector-$\alpha$} fitting, which may select BQ galaxies more accurately. \subsection{Normal galaxies} For the majority of sources that are not selected as stars, \mbox{X-ray} or IR AGNs, refined AGN candidates, or BQ-galaxy candidates, we call them ``normal galaxies''. They generally do not need specialized SED-fitting methods and thus will be treated together in the same manner. We use the parameter settings in Table~\ref{tbl_sedpar_step2_gal} to derive their properties. \subsection{SED-fitting Results} \label{sec: bestsedfittingresults} We summarize our SED fitting in this subsection. The parameter settings are listed in Tables~\ref{tbl_sedpar_step2_gal}, \ref{tbl_sedpar_step2_agn}, and \ref{tbl_sedpar_step2_bqgal} for normal-galaxy, AGN, and BQ-galaxy templates, respectively. Fig.~\ref{fig_example_sed} presents example SEDs. The AGN-template fitting is only run for MIR AGNs, raw SED AGN candidates, and \mbox{X-ray}-detected sources. The BQ-galaxy fitting is only run for sources with $\Delta\mathrm{BIC_1(BQ)}>2$. Normal-galaxy fitting is run for all sources regardless of their classifications. We set ``best'' results as NaN for stars. For a given non-stellar source, we adopt its ``best'' result following the criteria below: \begin{itemize} \item{If it is not a refined SED AGN candidate, \mbox{X-ray} AGN, IR AGN, or a BQ-galaxy candidate, we adopt the result from the normal-galaxy templates.} \item{If it is a refined SED AGN candidate but not a BQ-galaxy candidate, or it is an \mbox{X-ray}, IR, or reliable SED AGN, we adopt the AGN fitting result.} \item{If it is a BQ-galaxy candidate but not a refined SED AGN candidate or \mbox{X-ray} or IR AGN, we adopt the BQ-galaxy fitting result.} \item{In the remaining case, i.e., it is both a BQ-galaxy candidate and a refined SED AGN candidate (Section~\ref{sec: bqagn}), but not an \mbox{X-ray}, IR, or reliable SED AGN, we take the best result as the one with a smaller $\chi_r^2$ between the AGN and BQ-galaxy fitting results.} \end{itemize} There are 733743, 19612, and 3624 sources whose ``best'' results are from normal-galaxy, AGN, and BQ-galaxy fits, respectively. We reiterate that the candidates may be significantly contaminated by normal galaxies. Section~\ref{sec: sedagn} shows that most refined SED AGN candidates do not satisfy the calibrated, reliable SED AGN selection. The purity of our candidates is not guaranteed, and appropriate caution should be taken when analyzing them. Especially, when $\Delta\mathrm{BIC}$ is small, different models can hardly be distinguished, and the best category may be unreliable. We thus include the normal-galaxy fitting results for all the sources in our catalog so that users can choose what they need.\par \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{example_sed_gal.pdf} \includegraphics{example_sed_agn.pdf} } \resizebox{\hsize}{!}{ \includegraphics{example_sed_quench.pdf} \includegraphics{example_sed_burst.pdf} } \caption{Example rest-frame SEDs fitted by normal-galaxy (\textit{top left}), AGN (\textit{top right}), quenching-galaxy (\textit{bottom left}), and bursting-galaxy (\textit{bottom right}) templates. The blue points and downward triangles are the observed photometry and upper limits, respectively. The orange stars are the best-fit modeled photometry in the given bands, and the thick grey lines are the best-fit models. The bottom sub-panel of each panel shows the logarithm of the ratios of the observed fluxes over the model fluxes. The best-fit model for the AGN example in the top right panel is decomposed into an AGN component (green) and a galaxy component (red). In the panels other than the top left one, we also show the best-fit models with normal-galaxy templates as cyan dashed lines, and they cannot provide acceptable fits to the data. The abscissa axes of the bottom panels are truncated in the UV to help focus on the difference between the BQ and normal-galaxy models, for which the \mbox{X-ray} data cannot provide useful constraints. The inset plots in the bottom panels compare the best-fit SFHs of the BQ-galaxy model (grey) and normal-galaxy model (cyan). For the quenching galaxy in the bottom-left panel, the normal-galaxy model tends to assign most star formation to an early stage, and thus it cannot explain its blue optical color and red UV color simultaneously. Its quenching SFH indicates that it is generally star-forming before the quenching but the SFR has dropped significantly recently. For the bursting galaxy in the bottom-right panel, the normal-galaxy model predicts that all the stars were formed recently and hence cannot explain the excess NIR emission; in contrast, the bursting model retains low-level star formation before the burst (i.e., the part of the grey SFH that visually overlaps with the abscissa axis), which contributes to the NIR emission. Another feature of this bursting galaxy is that it has a strong H$\alpha$ line dominating its fourth photometric data point (counted from left to right), and we found that the normal-galaxy model cannot fully explain the excess. H$\alpha$ represents the star-formation activity within $\sim10~\mathrm{Myr}$, and this excessive H$\alpha$ feature does support a strong recent starburst (e.g., \citealt{Broussard19}).} \label{fig_example_sed} \end{figure*} We note that aside from $M_\star$ and SFR, other physical galaxy parameters generally cannot be reliably measured through our broad-band SED fitting. For example, the inferred detailed SFH and galaxy age often have large biases for our parametric SFH settings (e.g., \citealt{Carnall19}), dust attenuation suffers from internal biases and degeneracies (e.g., \citealt{Qin22}), and exact AGN contributions often cannot be constrained well (Section~\ref{sec: sedagn}). We thus mainly focus on $M_\star$ and SFR, which are often the most important parameters in extragalactic studies, as our primary results. \section{Analyses of the SED-fitting Results} \label{sec: sedfitting} We further investigate the SED-fitting results in Section~\ref{sec: bestsedfittingresults} from various perspectives in this section. \subsection{Galaxy Colors} \label{sec: galcolor} We show the rest-frame $UVJ$ and $FUVVJ$ color-color diagrams in Fig.~\ref{fig_galcolor}, which are color-coded by the specific SFR ($\mathrm{sSFR=SFR}/M_\star$). The traditional $UVJ$ diagram can be used to distinguish quiescent galaxies from star-forming galaxies (e.g., \citealt{Williams09, Muzzin13}) but cannot reliably separate quiescent galaxies with different levels of sSFR. Especially, the $UVJ$ diagram begins to saturate at $\sim10^{-10.5}~\mathrm{yr^{-1}}$ \citep{Leja19c}, below which all the galaxies tend to reside in the same region in the $UVJ$ diagram. In contrast, the $FUVVJ$ diagram, as proposed in \citet{Leja19c}, provides a larger dynamical range to separate efficiently different levels of sSFR and can thus help understand how the quiescent phase evolves during cosmic time. Furthermore, the inclusion of FUV can also help probing more complicated SFHs (e.g., \citealt{Akhshik21}), and we thus provide both $UVJ$ and $FUVVJ$ color information in our released catalog. \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{UVJ_galcolor.pdf} \includegraphics{FUVVJ_galcolor.pdf}} \caption{The rest-frame $UVJ$ (\textit{left}) and $FUVVJ$ (\textit{right}) color-color diagrams of our sources, color-coded by their $\log\mathrm{sSFR}$ in $\mathrm{yr^{-1}}$. The $FUVVJ$ diagram has a larger dynamical range to separate quiescent galaxies with different levels of sSFR.} \label{fig_galcolor} \end{figure*} \subsection{The $M_\star$-SFR Plane} When plotting all of our sources together in the $M_\star$-SFR plane, one finds that there is a linear ``cut'', above which there are no points, as shown in Fig.~\ref{fig_mstar_sfr_pileup}. However, this is not indicative of any material problem. The reason for this phenomenon is that there is (inevitably) a maximum sSFR allowed given our SFH settings. There are certainly some sources reaching the sSFR limit, and such points will ``pile up'' and visually form a linear cut when plotting millions of sources without a small point transparency. It can be shown that the maximum sSFR is $10^{-7.70}$ and $10^{-7.18}~\mathrm{yr^{-1}}$ for the normal-galaxy (Table~\ref{tbl_sedpar_step2_gal}) and BQ-galaxy (Table~\ref{tbl_sedpar_step2_bqgal}) settings, respectively. These values are sufficiently high and thus not problematic. To illustrate this, we first select star-forming galaxies based on the criteria in \citet{Lee18} and derive the $16^\mathrm{th}-84^\mathrm{th}$ and $2.5^\mathrm{th}-97.5^\mathrm{th}$ percentile ranges of sSFR. The sSFR ranges are plotted as the yellow and blue bands in Fig.~\ref{fig_mstar_sfr_pileup}, which are both far below the sSFR limits. We also display the MS from \citet{Popesso22} at $z=0$, 1, and 6 in Fig.~\ref{fig_mstar_sfr_pileup}, all of which are safely below the sSFR limits. The MS normalization is known to monotonically increase with $z$, and thus most galaxies are not expected to be above the $z=6$ curve; especially, $z=1$ is roughly the median redshift of our sources, and the corresponding MS is over one~dex below the sSFR limits. The sSFR limit of the BQ-galaxy setting is at least $1-2$~dex higher than the MS and hence is also sufficiently high for starburst galaxies.\par \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{mstar_sfr_pileup.pdf}} \caption{The cyan points are all of our sources in the $M_\star$-SFR plane, which ``pile up'' together and visually form linear cuts as the black lines. The black solid and dashed lines correspond to the maximum sSFR allowed ($10^{-7.70}$ and $10^{-7.18}~\mathrm{yr^{-1}}$) for our normal-galaxy and BQ-galaxy SFHs, respectively. When only plotting the results from the normal-galaxy fits, all the points will be constrained to lie below the black solid line. The yellow and blue bands represent the $16^\mathrm{th}-84^\mathrm{th}$ and $2.5^\mathrm{th}-97.5^\mathrm{th}$ percentile ranges of sSFR for our star-forming galaxies, respectively. The red curves are the MS at $z=0$, 1, and 6. All the bands and MS curves are far below the sSFR limits, and thus the apparent sSFR cut does not cause problems.} \label{fig_mstar_sfr_pileup} \end{figure} Nevertheless, \citet{Ciesla17} argued that an exponentially rising SFH might be better than a delayed SFH for star-forming galaxies with $z>2$ because the former allows a much higher sSFR limit (theoretically, able to reach infinity), and high-redshift galaxies tend to have higher sSFR values. We tried that for a smaller random sample of sources spanning $z=0-6$, and the systematic differences of $M_\star$ and SFR are both confined within $\sim0.1$~dex, which further indicates that the sSFR limit from our SFH settings does not cause material biases.\par We compare our star-forming galaxies with the MS in Fig.~\ref{fig_mstar_sfr_ms}, where we equally divide the sources into seven redshift bins and plot the MS from \citet{Popesso22} for comparison. They are consistent, even out to the high-redshift bins, further supporting the general reliability of our results. \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{mstar_sfr_ms.pdf}} \caption{Comparison between our $M_\star$ and SFR results for star-forming galaxies and the MS in \citet{Popesso22} in seven redshift bins. The SFRs at the lowest redshift are not shifted (i.e., const. = 0), and the subsequent SFRs at higher redshifts are progressively shifted upward by one dex for a better visualization. The solid lines are the MS at the median redshift of each redshift bin, as marked explicitly in the figure, and the transparent bands represent $\leq0.5$~dex offset from the MS. The points are the median $M_\star$ and shifted SFR values in several $M_\star$ bins of our star-forming galaxies and are generally consistent with the MS curves.} \label{fig_mstar_sfr_ms} \end{figure} \subsection{MIR-X-Ray Relations for AGNs} \label{sec: LxL6um} The AGN rest-frame $6~\mu\mathrm{m}$ luminosity ($L_{6~\mu\mathrm{m}}^\mathrm{AGN}$) is known to be tightly correlated with $L_\mathrm{X}$ (intrinsic $2-10~\mathrm{keV}$ luminosity; e.g., \citealt{Stern15, Chen17}), and we examine this relation for our sources in this section. Here, we use the observed \mbox{X-ray} luminosities ($L_\mathrm{X,~obs}$), instead of $L_\mathrm{X}$, mainly for three reasons -- first, this can help roughly reveal the number of heavily obscured AGNs detected (see next paragraph); second, this can reduce the impact of the internal connections between \mbox{X-ray} and $6~\mu\mathrm{m}$ luminosities arising from the SED fitting because $L_\mathrm{X}$ is directly adopted in the SED fitting to decompose the AGN component; third, for \mbox{X-ray}-detected sources, the typical difference between $L_\mathrm{X,~obs}$ and $L_\mathrm{X}$ ($\sim0.1~\mathrm{dex}$; Fig.~\ref{fig_xraycorr}) is smaller than the intrinsic scatter of the $L_{6~\mu\mathrm{m}}^\mathrm{AGN}-L_\mathrm{X}$ relation ($\sim0.4~\mathrm{dex}$) as well as the systematic differences of the relation among different papers ($\sim0.1-0.2~\mathrm{dex}$). We measure $L_{6~\mu\mathrm{m}}^\mathrm{AGN}$ from the decomposed best-fit SEDs and compare it with $L_\mathrm{X,~obs}$ in Fig.~\ref{fig_MIR-X-ray_relation} for all the AGNs and refined SED AGN candidates (see Section~\ref{sec: select_agn}). $L_\mathrm{X,~obs}$ is derived from the observed fluxes in \citet{Ni21}, assuming a power-law model with a photon index of $\Gamma_\mathrm{eff}$. Sources detected in both the SB and the HB have $\Gamma_\mathrm{eff}$ estimations in \citet{Ni21}. $\Gamma_\mathrm{eff}$ is generally chosen to be 1.9 for sources detected in the SB but undetected in the HB, 0.6 for those detected in the HB but undetected in the SB, and 1.4 for those only detected in the FB, but there are exceptions. We refer readers to Section~3.5 of \citet{Ni21} for more details about the choice of $\Gamma_\mathrm{eff}$. We derive $L_\mathrm{X,~obs}$ upper limits for \mbox{X-ray}-undetected sources using the HB flux upper-limit map in Fig.~\ref{fig_fupp_HB} and Eq.~\ref{eq_def_fx}, where $\eta$ and $\Gamma$ in Eq.~\ref{eq_def_fx} are set to 1 and 1.4,\footnote{$\Gamma_\mathrm{eff}=1.4$ is the typical power-law index of the cosmic \mbox{X-ray} background (e.g., \citealt{Marshall80})} respectively. Our sources agree well with the relation in the literature, indicating that the SED decompositions are generally reliable.\par When the source obscuration is high, the $L_\mathrm{X,~obs}$ value will be suppressed, and thus a large downward deviation from the $L_{6~\mu\mathrm{m}}^\mathrm{AGN}-L_\mathrm{X}$ relation may indicate a high obscuration level. We derive the suppression factor of $L_\mathrm{X,~obs}$ using the zeroth-order edge-on spectrum with a photon index of 1.8 in \texttt{MYTorus} \citep{Murphy09}, and the suppressed relations of \citet{Stern15} corresponding to $N_\mathrm{H}=5\times10^{23}~\mathrm{cm^{-2}}$ and $10^{24}~\mathrm{cm^{-2}}$ are also shown in Fig.~\ref{fig_MIR-X-ray_relation}. Note that the $L_{6~\mu\mathrm{m}}^\mathrm{AGN}-L_\mathrm{X}$ relation itself has a scatter of $\sigma\approx0.4~\mathrm{dex}$, and the suppressed curve at $N_\mathrm{H}=5\times10^{23}~\mathrm{cm^{-2}}$ roughly corresponds to the downward $2\sigma$ boundary of the $L_{6~\mu\mathrm{m}}^\mathrm{AGN}-L_\mathrm{X}$ relation. Therefore, it would be unreliable to identify obscured sources with $N_\mathrm{H}\lesssim5\times10^{23}~\mathrm{cm^{-2}}$ using the $L_{6~\mu\mathrm{m}}^\mathrm{AGN}-L_\mathrm{X}$ relation. There are few sources ($\lesssim20$) whose $L_\mathrm{X,~obs}$ values or upper limits are below the $N_\mathrm{H}=5\times10^{23}~\mathrm{cm^{-2}}$ curve, and no obvious sources are below the $N_\mathrm{H}=10^{24}~\mathrm{cm^{-2}}$ curve. Detailed \mbox{X-ray} spectral analyses are needed to reliably measure their $N_\mathrm{H}$ values and other \mbox{X-ray} spectral features (e.g., Fe K$\alpha$ lines) that are prevalent among heavily obscured AGNs. More detailed selection and analyses of heavily obscured and CT AGNs will be presented in Yan et al. (in preparation).\par \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{MIR-X-ray_relation.pdf}} \caption{The rest-frame $L_{6~\mu\mathrm{m}}^\mathrm{AGN}-L_\mathrm{X,~obs}$ relation of AGNs and refined SED AGN candidates, where the $L_\mathrm{X,~obs}$ upper limits are adopted for sources undetected in \mbox{X-ray}. Only sources whose best-fit SEDs have non-zero AGN contributions are shown. The standard relation in \citet{Stern15} is also displayed as a comparison.} \label{fig_MIR-X-ray_relation} \end{figure} There are two caveats worth noting. First, Fig.~\ref{fig_MIR-X-ray_relation} may be biased against CT AGNs. CT AGNs have very hard \mbox{X-ray} spectra, but the typical power-law index adopted to calculate $L_\mathrm{X,~obs}$ for these sources is 0.6 \citep{Ni21}. This value may be too soft for CT AGNs, and thus may lead to overestimations of $L_\mathrm{X,~obs}$. Solving this issue requires \mbox{X-ray} spectral fitting, and Yan et al. (in preparation) will correct this bias. Secondly, there are inevitable connections between AGN \mbox{X-ray} and $6~\mu\mathrm{m}$ luminosities resulting from the SED fitting. Nevertheless, the effect upon Fig.~\ref{fig_MIR-X-ray_relation}, compared to other luminosity-luminosity relations, has been minimized because the MIR-\mbox{X-ray} relation is only secondary \citep{Yang20, Brandt21} and $L_\mathrm{X,~obs}$, instead of $L_X$ (which is directly utilized in the SED fitting), is used. \subsection{Host galaxies of quasars} \label{sec: qsohost} Our \mbox{W-CDF-S} and XMM-LSS fields overlap with those of the SDSS-V Black Hole Mapper project \citep{Kollmeier17}, where optically luminous quasars will be studied in detail via reverberation mapping. However, our $M_\star$ measurements cannot be safely utilized for such quasars. To illustrate this, we show the typical SED of quasar-like reliable broad-line (BL) AGNs (i.e., \texttt{SED\_BLAGN\_FLAG = 1} in \citealt{Ni21}) in \mbox{W-CDF-S} in Fig.~\ref{fig_sed_qso_wcdfs}. Its AGN component generally dominates the emission from UV to MIR. Particularly, the NIR emission, which is important for measuring $M_\star$ and usually dominated by starlight for the general AGN population, is also significantly contaminated by the AGN emission for these quasars. The galaxy emission still generally dominates in the FIR, and thus SFRs can be reliably estimated for quasars detected in the FIR (see Section~\ref{sec: compare_results} for measurements of FIR-based SFRs), and 15\% of them are detected in the FIR.\par \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{sed_qso_wcdfs.pdf}} \caption{The typical decomposed SED of quasars, constructed from 424 BL quasars in \mbox{W-CDF-S}. This SED is plotted in the same way as for Fig.~\ref{fig_stacksed}, where the cyan and red solid lines represent the galaxy and AGN components, respectively.} \label{fig_sed_qso_wcdfs} \end{figure} Decomposing the optical-to-IR host-galaxy components for quasars and measuring their $M_\star$ often requires specialized methods, such as imaging decomposition (e.g., \citealt{Yue18, Li21}), which are beyond the scope of this work. \subsection{Sources Selected as Both Refined SED AGN Candidates and BQ-galaxy Candidates} \label{sec: bqagn} 2159 sources are selected as both refined SED AGN candidates and BQ-galaxy candidates, which constitutes over one-third of BQ-galaxy candidates. This mainly originates from their enhanced rest-frame UV emission. When matching the optical-to-NIR SEDs, the truncated delayed SFH may lead to larger UV emission than the normal delayed SFH, and type~1 AGNs can also increase the UV emission relative to the optical due to their blue UV-to-optical colors. Therefore, enhanced UV emission may be either explained by a truncated delayed SFH or a type~1 AGN, but it is hard to distinguish which one is correct without further information. Indeed, the $\chi_r^2$ distributions from BQ-galaxy-model fitting and AGN-model fitting are similar for sources selected as both refined SED AGN candidates and BQ-galaxy candidates. This difficulty is also known among (hot) dust-obscured galaxies, whose UV emission sometimes shows an excess compared to the optical (e.g., \citealt{Assef16, Assef19}). This excess can be explained by both ``leaked'' AGN emission (e.g., broad UV emission lines; \citealt{Zou20}) and unusual star-formation, and SEDs alone cannot reliably determine its origin.\par To break the degeneracy, we usually need other indicators that can independently and firmly classify such sources into one category, including \mbox{X-ray} and MIR information that we are using to classify AGNs in this work. Optical-to-NIR spectra should also be valuable as they can provide direct diagnostics for both AGNs and BQ galaxies, including locations in Baldwin-Phillips-Terlevich diagrams \citep{Baldwin81} and age-sensitive Balmer absorption lines. However, simultaneous co-analyses of both photometry and spectra are not directly supported in \texttt{CIGALE}, although some efforts have been devoted to including spectral information in SED fitting in \texttt{CIGALE} (e.g., \citealt{Boselli16, Villa-Velez21}).\par There may be some AGNs whose host galaxies are undergoing rapid (within several hundreds of millions of years) changes in SFR. For example, \citet{Alatalo17} showed that the enhanced MIR emission of post-starburst galaxies may indicate the prevelance of (mainly low-luminosity) AGNs, and \citet{Greene20} showed that their intermediate-redshift massive post-starburst galaxies are much more likely to host AGNs than quiescent galaxies. However, it is generally challenging and may have a danger of over-interpretation to select such sources solely based on SEDs, and thus we do not try to identify them in this work. Nevertheless, if type~2 AGNs can be selected by other methods (e.g., through optical spectra), it is still possible to safely characterize their recent SFHs \citep{Smethurst16}, which can then be used to probe the connection between type~2 AGN activity and rapid quenching. This will be left to future work.\par Given the aforementioned challenges, we adopt our best results for these sources as the AGN-fitting ones if they are \mbox{X-ray}, IR, or reliable SED AGNs, or their AGN-fitting $\chi_r^2$ values are smaller than their BQ-galaxy-fitting values; otherwise, their best results are set to be the BQ-galaxy-fitting ones. Sources selected as both refined SED AGN and BQ-galaxy candidates can be identified by requiring $\texttt{detBIC2\_agn}>2~\mathrm{AND}~\texttt{detBIC2\_bqgal}>2~\mathrm{AND}~\texttt{flag\_star}==0$ in our catalog (see Section~\ref{sec: release}). \subsection{The X-Ray Data Points} \label{sec: xraydatapoint} \mbox{X-ray} data are important for AGNs because they can directly constrain the AGN emission. However, the statistical contributions of the \mbox{X-ray} data to SED fitting may be ``diluted'' by dozens of longer-wavelength bands, and a direct consequence is that not all (though most) \mbox{X-ray} AGNs are selected as SED AGN candidates. One direct way to overcome this issue is via weighting the \mbox{X-ray} data points. This is analogous to simultaneous SED fitting for both photometry and spectra, where the contributions of the photometric data and spectroscopic data should be separated to prevent the significant statistical dilution from a large number of spectroscopic data points to the photometry, whose total number is usually much more limited (e.g., \citealt{Chilingarian12, LopezFernandez16, Thomas17}).\par Generally, there are no guidelines to choose the weight, and here we try a weighting that makes the contribution of the \mbox{X-ray} photometry roughly equal to that from all the other bands. We set the \mbox{X-ray} flux errors to be \begin{align} \sigma_\mathrm{X}=\frac{f_\mathrm{X}}{\sqrt{\sum_{i\in\mathrm{\{UV\ to\ FIR\}}}\left(\frac{f_i}{\sigma_i}\right)^2}}, \end{align} where $f$ and $\sigma$ are the flux and uncertainty, respectively. This analysis is only applied to \mbox{X-ray} AGNs because the equation above cannot be applied to undetected ones. We then re-do the SED fitting and compare the results with the unweighted ones. The weighting causes $\Delta\mathrm{BIC}$ to lose its statistical meaning, and nearly all the sources satisfy $\Delta\mathrm{BIC}>2$ or even more stringent criteria, as expected. We thus only focus on the resulting $M_\star$ and SFRs. The comparisons of $M_\star$ and SFRs for \mbox{X-ray} AGNs are displayed in Fig.~\ref{fig_comp_mstar_sfr_xeq}. There are almost no systematic differences, and the scatters are also small, and thus we conclude that the weighting generally does not affect the $M_\star$ and SFR measurements. Note that, throughout this paper, we still adopt the results based on the original, unweighted \mbox{X-ray} data.\par \begin{figure*} \centering \resizebox{\hsize}{!}{\includegraphics{comp_mstar_sfr_xeq.pdf}} \caption{Comparison of $M_\star$ (\textit{left}) and SFR (\textit{right}) between the SED fitting with weighted and unweighted \mbox{X-ray} data for \mbox{X-ray} AGNs. The black dashed lines represent 0.5~dex offsets from the one-to-one relationships, and the red lines, which visually overlap with the one-to-one lines, are LOESS curves of the points. The inferences about host-galaxy properties are generally not affected by the weighting.} \label{fig_comp_mstar_sfr_xeq} \end{figure*} The analyses above indicate that the \mbox{X-ray} data may not significantly influence the $M_\star$ and SFR measurements, even for \mbox{X-ray} AGNs. We conduct an additional test of removing the \mbox{X-ray} data from our SED fitting. In this way, we can also examine the results for \mbox{X-ray}-undetected refined SED AGN candidates. The comparisons are similar to those in Fig.~\ref{fig_comp_mstar_sfr_xeq}, i.e., the difference is small -- for \mbox{X-ray} AGNs, the offset of $M_\star$ (SFR) is 0.002 (0.001) dex, and the scatter is 0.008 (0.017) dex; for \mbox{X-ray}-undetected refined SED AGN candidates, the offset of $M_\star$ (SFR) is 0.002 ($-0.001$) dex, and the scatter is 0.006 (0.010) dex.\par However, this does not mean that the \mbox{X-ray} data are useless in this respect. \mbox{X-rays}, including \mbox{X-ray} upper limits, are mainly used to constrain the AGN component in SEDs. This has been thoroughly discussed in previous works (e.g., \citealt{Yang20, Mountrichas20}). We only briefly present one test here. We remove the \mbox{X-ray} upper limits for all the \mbox{X-ray}-undetected sources and re-fit their SEDs using the AGN parameter settings in Table~\ref{tbl_sedpar_step1} (but without the \mbox{X-ray} module). The simpler settings in Table~\ref{tbl_sedpar_step1}, instead of Table~\ref{tbl_sedpar_step2_agn}, are adopted to reduce the computational requirements. We compare $f_\mathrm{AGN}$ with and without \mbox{X-ray} upper limits for all the \mbox{X-ray}-undetected sources in Fig.~\ref{fig_compare_fagn_xray}, which demonstrates that \mbox{X-ray} upper limits can reduce $f_\mathrm{AGN}$ because models with strong AGN emission may violate the \mbox{X-ray} upper-limit constraint. Note that most sources in Fig.~\ref{fig_compare_fagn_xray} are galaxies and should have $f_\mathrm{AGN}=0$. The SED fitting hence systematically overestimates $f_\mathrm{AGN}$. Such an overestimation is larger without \mbox{X-ray} upper limits and is expected to be much smaller with deeper \mbox{X-ray} coverage (e.g., from Athena or AXIS in the future; \citealt{Yang20}). \begin{figure} \centering \resizebox{\hsize}{!}{\includegraphics{compare_fagn_xray.pdf}} \caption{Comparison of $f_\mathrm{AGN}$ between the SED fitting with and without \mbox{X-ray} upper limits for all the \mbox{X-ray}-undetected sources. The black line is the one-to-one relationship. \mbox{X-ray} upper limits can help constrain the decomposed AGN power to a lower level.} \label{fig_compare_fagn_xray} \end{figure} \subsection{Comparison with Other $M_\star$ and SFR Measurements} \label{sec: compare_results} To assess the reliability of our results, we compare them with other measurements in this section. All the numerical values are summarized in Table~\ref{tbl_compare_results}, and more details are illustrated in the following text.\par \begin{table*} \caption{Numerical comparison results between our $M_\star$ and SFR measurements with others} \label{tbl_compare_results} \centering \begin{threeparttable} \begin{tabular}{cccccccc} \hline \hline & & \multirow{2}{*}{HELP} & \multirow{2}{*}{\texttt{Prospector-$\alpha$}} & \multirow{2}{*}{\citet{Guo19}} & \multirow{2}{*}{$\mathrm{SFR_{FIR}}$} & \texttt{Prospector-$\alpha$} & $\mathrm{SFR_{FIR}}$\\ & & & & & & (corrected) & (corrected)\\ \hline \multirow{5}{*}{$\log M_\star$} & galaxy offset & 0.02 & $-0.12$ & 0.11 & ----- & $-0.02$ & -----\\ & galaxy NMAD & 0.22 & 0.22 & 0.15 & ----- & 0.15 & -----\\ & AGN offset & $-0.10$ & $-0.14$ & 0.10 & ----- & $-0.13$ & -----\\ & AGN NMAD & 0.24 & 0.20 & 0.19 & ----- & 0.16 & -----\\ & relevant figure & \ref{fig_comp_wcdfs_master} & \ref{fig_comp_wcdfs_master} & \ref{fig_comp_wcdfs_master} & ----- & \ref{fig_comp_correction_Leja} & -----\\ \hline \multirow{5}{*}{log SFR} & galaxy offset & $-0.15$ & 0.20 & $-0.01$ & $-0.33$ & $-0.02$ & 0.00\\ & galaxy NMAD & 0.24 & 0.37 & 0.49 & 0.41 & 0.28 & 0.20\\ & AGN offset & $-0.17$ & 0.01 & 0.20 & $-0.29$ & $-0.26$ & 0.02\\ & AGN NMAD & 0.25 & 0.37 & 0.67 & 0.38 & 0.30 & 0.22\\ & relevant figure & \ref{fig_comp_wcdfs_master} & \ref{fig_comp_wcdfs_master} & \ref{fig_comp_wcdfs_master} & \ref{fig_comp_sfr_fir} & \ref{fig_comp_correction_Leja} & \ref{fig_comp_sfr_fir}\\ \hline \hline \end{tabular} \begin{tablenotes} \item \textit{Notes.} The median and NMAD values of the differences (defined as our values minus the reference ones) between our $M_\star$ and (SED-based) SFR measurements and others, as clarified in the column heads. The values are in dex. ``\texttt{Prospector-$\alpha$} (corrected)'' means the comparison between our corrected values based on Eqs.~\ref{eq: corr_mstar_Joel} and \ref{eq: corr_sfr_Joel} and the \texttt{Prospector-$\alpha$} ones. ``$\mathrm{SFR_{FIR}}$ (corrected)'' represents the comparison between our corrected FIR-based SFRs based on Eq.~\ref{eq: correct_fir_sfr} and SED-based SFRs. Note that these values are global, and more subtle trends of the difference are plotted in the relevant figures listed in the table. \end{tablenotes} \end{threeparttable} \end{table*} We first compare our results with those from the HELP project across the whole \mbox{W-CDF-S} field, \texttt{Prospector-$\alpha$} results in the small 3D-HST \mbox{CDF-S} field \citep{Leja19b, Leja20, Leja21}, and \citet{Guo19} for Chandra sources in the smaller \mbox{CDF-S}. SED measurements in HELP are mainly limited to bright sources (see \citealt{Shirley21} for more details), and we provide SED-fitting results for $10-100$ times more sources than HELP in our fields. The \texttt{Prospector-$\alpha$} results and those in \citet{Guo19} are expected to be better than our results because their multi-wavelength data are deeper in the small \mbox{CDF-S} region.\footnote{Recall that \mbox{CDF-S} constitutes only 3\% of the whole \mbox{W-CDF-S} field.} More importantly, \texttt{Prospector-$\alpha$} enables highly flexible SED fitting with nonparametric SFHs, and millions of CPU hours were devoted to the SED fitting in 3D-HST to overcome the bottleneck that a systematic factor-of-two uncertainty generally exists among different SED-fitting results \citep{Leja19b}. We thus regard the \texttt{Prospector-$\alpha$} results as the ``ground truth'', at least for non-AGN galaxies. The \texttt{Prospector-$\alpha$} results for AGNs are not necessarily more reliable than our \texttt{CIGALE} results because \texttt{CIGALE} has more advanced AGN templates that have been extensively explored (e.g., \citealt{Yang20, Yang22, Mountrichas21, Mountrichas20, Buat21, Padilla21}) and can directly utilize the \mbox{X-ray} data. Therefore, the comparisons with \texttt{Prospector-$\alpha$} results and \citet{Guo19} are mainly for galaxies and AGNs, respectively.\par We show the comparisons of $M_\star$ in the top panels of Fig.~\ref{fig_comp_wcdfs_master}, in which we explicitly mark AGNs and BL AGNs, where AGNs are defined as \mbox{X-ray}, IR, or reliable SED AGNs, and BL AGNs are compiled in \citet{Ni21}. Only sources with consistent redshifts between the compared catalog and ours are shown, i.e., $|\Delta z|/(1+z)<0.15$. Denoting $X_1$ and $X_2$ as our measurements and the comparison ones, respectively, the abscissa axes in Fig.~\ref{fig_comp_wcdfs_master} are defined as $(X_1+X_2)/2$, and the ordinates are their difference, $X_1-X_2$. The choice of adopting $(X_1+X_2)/2$, instead of $X_1$ or $X_2$, as the abscissa axes can be easily explained as follows. Since $\{X_1\}$ and $\{X_2\}$ roughly span the same range, $\mathrm{Var}(\{X_1\})\approx\mathrm{Var}(\{X_2\})$.\footnote{Curly braces are used outside $X_1$ and $X_2$ to indicate that we are considering the collection of all the data points. For example, $\mathrm{Var}(\{X_1\})$ means the variance of all the $X_1$ values, but $\mathrm{Var}(X_1)$ may represent the square of the measurement uncertainty of a single data point.} Therefore, $\mathrm{Cov}(\{X_1\}, \{X_2-X_1\})=\mathrm{Cov}(\{X_1\}, \{X_2\})-\mathrm{Var}(\{X_1\})\leq\sqrt{\mathrm{Var}(\{X_1\})\mathrm{Var}(\{X_2\})}-\mathrm{Var}(\{X_1\})\approx0$, and $\mathrm{Cov}(\{(X_1+X_2)/2\}, \{X_2-X_1\})=[\mathrm{Var}(\{X_2\})-\mathrm{Var}(\{X_1\})]/2\approx0$. This indicates choosing $X_1$ as the abscissa axes will artificially introduce negative global trends (or positive trends for $X_2$), but adopting $(X_1+X_2)/2$ will not.\par The $M_\star$ measurements of galaxies are generally accurate, and systematic differences among different works are $\lesssim0.3~\mathrm{dex}$ (e.g., \citealt{Ni20}). Most $M_\star$ measurements agree with each other within $\sim0.5~\mathrm{dex}$. However, the $M_\star$ measurements of AGNs, especially BL AGNs, are more scattered. The comparison with \citet{Guo19} (upper-right panel of Fig.~\ref{fig_comp_wcdfs_master}) indicates that most of our $M_\star$ measurements of AGNs still agree with theirs within $\sim0.5~\mathrm{dex}$. However, unobscured AGN contributions are not considered in HELP SED fitting,\footnote{They included intermediate-type and type~2 AGN contributions, but not type~1 AGN contributions.} and thus their $M_\star$ measurements for (BL) AGNs are systematically larger than ours in the upper-left panel of Fig.~\ref{fig_comp_wcdfs_master}. \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{comp_wcdfs_master.pdf} } \caption{Comparisons of our $M_\star$ (\textit{top}) and SFR (\textit{bottom}) measurements with the HELP values (\textit{left}), the \texttt{Prospector-$\alpha$} values (\textit{middle}), and those in \citet{Guo19} (\textit{right}). The black solid lines are zero-difference relationships, and the black dashed lines represent 0.5~dex offsets. The red lines are LOESS curves for galaxies in the left and middle panels and all the sources in the right panel. The numerical comparison results are displayed in Table~\ref{tbl_compare_results}. Our measurements are generally consistent with others, though a small mass-dependent offset exists between ours and the \texttt{Prospector-$\alpha$} values.} \label{fig_comp_wcdfs_master} \end{figure*} We further compare SFRs in the bottom panels of Fig.~\ref{fig_comp_wcdfs_master}. We empirically exclude sources with $\mathrm{sSFR}\leq10^{-9.8}~\mathrm{yr^{-1}}$ in HELP because their SFR measurements ``saturate'' for low-sSFR galaxies. Their SED-fitting parameter settings are mainly for star-forming galaxies, and the smallest sSFR allowed is $10^{-10.2}~\mathrm{yr^{-1}}$, causing over-estimations of SFR for sources with small sSFR. Indeed, we found that the HELP SFRs are much larger than \texttt{Prospector-$\alpha$} values when $\mathrm{sSFR}\lesssim10^{-10}~\mathrm{yr^{-1}}$. The SFR measurements of galaxies are generally more scattered than for $M_\star$, especially when $\mathrm{SFR}\lesssim10^{-1}~M_\odot~\mathrm{yr^{-1}}$. The typical systematic difference of SFR is $\lesssim0.5~\mathrm{dex}$, and most SFR measurements agree within $\sim1~\mathrm{dex}$. Compared with \citet{Guo19}, our SFRs of (BL) AGNs are still generally consistent with theirs, although the scatter is larger than for galaxies.\par Although our results are generally consistent with other measurements within $\sim0.5$~dex, there are subtle systematic differences between our results and the ground-truth \texttt{Prospector-$\alpha$} ones. There is a mass-dependent offset between our $M_\star$ and the \texttt{Prospector-$\alpha$} $M_\star$, i.e., our $M_\star$ values tend to be under-estimated for low-mass galaxies. Our SFRs are also systematically higher than the \texttt{Prospector-$\alpha$} SFRs. These issues are well explored and explained in \citet{Leja19b}. Briefly, the main reason is that \texttt{Prospector-$\alpha$} uses non-parametric SFHs while ours are less-flexible, parametric SFHs, and our SFHs tend to underestimate galaxy ages, leading to the systematic offsets. Low-mass galaxies tend to be more sensitive to the adopted SFHs. This problem is fundamental and inherent in the SED-fitting methodology, and a more flexible SFH is needed to solve this issue at the expense of much heavier computational requirements, which is impractical in our case. Therefore, we simply calculate empirical corrections to match our results with the \texttt{Prospector-$\alpha$} ones. We fit the \texttt{Prospector-$\alpha$} $\log M_\star$ and $\log\mathrm{SFR}$ as polynomial functions of $z$ and our $\log M_\star$ and $\log\mathrm{SFR}$ for galaxies. For simplicity, the polynomial degree is limited not to exceed three, and the corrections are determined to be \begin{align} \log M_\star^\mathrm{new}=&28.06976-7.05089x_1+0.28953x_2\nonumber\\ +&4.53179z+0.76319x_1^2+0.13833x_2^2\nonumber\\ -&0.66180z^2-0.07999x_1x_2-0.71136x_1z\nonumber\\ +&0.72624x_2z-0.02378x_1^3+0.00229x_2^3\nonumber\\ -&0.03415z^3+0.00548x_1^2x_2+0.02394x_1^2z\nonumber\\ -&0.01231x_1x_2^2-0.00369x_2^2z+0.07799x_1z^2\nonumber\\ +&0.01088x_2z^2-0.07372x_1x_2z\label{eq: corr_mstar_Joel} \end{align} \begin{align} \log\mathrm{SFR}^\mathrm{new}=&-39.55280+8.78759x_1-19.54933x_2\nonumber\\ +&27.63832z-0.59271x_1^2-1.55026x_2^2\nonumber\\ -&0.18362z^2+3.57024x_1x_2-5.52671x_1z\nonumber\\ +&3.79753x_2z+0.01144x_1^3-0.09988x_2^3\nonumber\\ +&0.00888z^3-0.15492x_1^2x_2+0.27169x_1^2z\nonumber\\ +&0.12660x_1x_2^2+0.13441x_2^2z+0.01775x_1z^2\nonumber\\ -&0.10721x_2z^2-0.32932x_1x_2z,\label{eq: corr_sfr_Joel} \end{align} where $x_1$ and $x_2$ are our $\log M_\star$ (in $M_\odot$) and $\log\mathrm{SFR}$ (in $M_\odot~\mathrm{yr^{-1}}$), respectively. Fig.~\ref{fig_comp_correction_Leja} shows our corrected $M_\star$ and SFRs compared with the \texttt{Prospector-$\alpha$} values. Galaxies generally follow one-to-one relations, except for the high- or low-value edges, but AGNs are slightly systematically below the one-to-one lines. Given the reliability of \texttt{CIGALE} in fitting AGNs and the fact that the AGN locus and galaxy locus generally overlap well when comparing our SED results with those in \citet{Guo19} and our FIR-based SFRs (see the next paragraph), we tend to prefer our measurements for AGNs in Fig.~\ref{fig_comp_correction_Leja}. We note that the calibrations in Eqs.~\ref{eq: corr_mstar_Joel} and \ref{eq: corr_sfr_Joel} are based on sources covering a limited parameter space, i.e., populated by those above the mass-completeness limit of 3D-HST between $0.5<z<3$, where the limit as a function of $z$ is tabulated in Table~1 of \citet{Leja20}. Caution should be taken if extrapolating the corrections beyond this limited parameter space. Furthermore, we note that our uncorrected $M_\star$ and SFR are measured in a self-consistent manner, but the correction inevitably breaks the self-consistency and leads to significant interplays between $M_\star$ and SFR values, as revealed in Eqs.~\ref{eq: corr_mstar_Joel} and \ref{eq: corr_sfr_Joel}.\par \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{comp_mstar_sfr_new_Leja.pdf} } \caption{Comparisons between our corrected $M_\star$ and SFR (Eq.~\ref{eq: corr_mstar_Joel} and \ref{eq: corr_sfr_Joel}) and the \texttt{Prospector-$\alpha$} values. Galaxies generally follow one-to-one relations well while there are still systematic offsets for AGNs, possibly because the \texttt{Prospector-$\alpha$} fitting attributes some AGN emission to the galaxy component.} \label{fig_comp_correction_Leja} \end{figure*} To justify further the reliability of our measurements, we compare our original SED-based SFRs (i.e., not corrected by Eq.~\ref{eq: corr_sfr_Joel}) with FIR-based SFRs. The default assumption for FIR-based SFR estimations is that nearly all the UV photons are absorbed and reemitted in IR, and FIR luminosity is known to be a good tracer of SFR (e.g., \citealt{Chen13, Yang17, Zou19, Ni20}) for galaxies with SFR $\gtrsim1~M_\odot~\mathrm{yr^{-1}}$, where dust is often abundant. FIR-based SFRs are also generally reliable for AGN hosts because AGNs usually contribute little to the FIR emission. In principle, tracing SFR by the summation of UV and IR luminosities does not require the aforementioned assumption for FIR-based SFRs and thus may provide better SFR estimations, but this both faces practical problems and is unnecessary in our case. First, this procedure is problematic for AGNs, which may strongly contaminate the UV emission; second, the UV luminosities of our FIR-detected sources are negligible. We only consider sources with SNR $\ge5$ in at least one Herschel band ($100-500~\mu\mathrm{m}$). As Eq.~1 in \citet{Leja19b} indicates, adding the UV luminosity to the SFR estimation leads to a correction of $\log(1+2.2L(1216-3000\AA)/L(8-1000\mu\mathrm{m}))$ to $\log\mathrm{SFR}$. For our Herschel-detected sources, the median correction is 0.01~dex. Even for those with SFR $<1~M_\odot~\mathrm{yr^{-1}}$, the median correction is 0.04~dex. Such a small correction from the UV emission is generally expected for Herschel-detected sources (see \citealt{Lutz14} for a review) and is also much smaller than the more significant correction in Eq.~\ref{eq: correct_fir_sfr} (see below).\par We follow a similar method as \citet{Chen13} to measure FIR-based SFRs. Briefly, we take the observed flux from the Herschel band with SNR $\ge5$ having the longest wavelength\footnote{We found that for sources detected in multiple Herschel bands, the SFRs inferred from different bands may be different within $\sim0.6~\mathrm{dex}$. The \mbox{longest-wavelength} band is adopted to minimize possible AGN contamination.} and compare it with the redshifted IR templates in \citet{Kirkpatrick12} to estimate the total IR luminosity from $8-1000~\mu\mathrm{m}$. The luminosity is then converted to SFR by multiplying by a factor of $1.09\times10^{-10}~M_\odot~\mathrm{yr^{-1}}~L_\odot^{-1}$. The comparison is shown in the left panel of Fig.~\ref{fig_comp_sfr_fir}, and the SED-based SFRs seem to be systematically smaller than the FIR-based SFRs as the SFR decreases. This may be because the emission from old stars (i.e., stars aged $\gtrsim100~\mathrm{Myr}$) becomes increasingly important for low-SFR galaxies, and this effect is negligible and thus not considered when calibrating a linear relation between the IR luminosity and current SFR using samples of star-forming galaxies (e.g., \citealt{Leja19b}). This effect can be empirically corrected based on the relation between the old-star contribution and sSFR in \citet{Leja19b}: \begin{align} \mathrm{\frac{SFR_{FIR}^{new}}{SFR_{FIR}}}=10^{0.25}[-0.5\tanh(-0.8\log\mathrm{sSFR}+0.09z-8.4)],\label{eq: correct_fir_sfr} \end{align} where sSFR is in $\mathrm{yr}^{-1}$, and we manually multiply by a constant, $10^{0.25}$, to set the median difference in $\log\mathrm{SFR}$ to be 0. The comparison between our SED-based SFRs and corrected FIR-based SFRs is shown in the right panel of Fig.~\ref{fig_comp_sfr_fir}, which presents a better consistency than the left panel of Fig.~\ref{fig_comp_sfr_fir} and generally follows a one-to-one relation even down to small SFRs. Therefore, the old-star heating effect may be the primary cause for the deviation between our SED-based and original FIR-based SFRs for low-SFR galaxies, although the selection bias that only sources with enhanced FIR emission can be detected by Herschel when their SFRs are relatively low may also still exist. The difference between our SED-based and FIR-based SFRs for (BL) AGNs are well-confined within 0.5~dex with little systematic difference, and thus we conclude that our SFR measurements are generally more reliable for (BL) AGNs than previous works, in which the AGN contributions were not carefully considered. \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{comp_sfr_fir.pdf} \includegraphics{comp_sfr_fir_correction.pdf} } \caption{Comparisons between our original SED-based SFRs and FIR-based SFRs, where the left and right panels show the original and corrected FIR-based SFRs, respectively. The original FIR-based SFRs suffer from the old-star heating bias and thus are over-estimated for low-SFR galaxies. After correcting this issue, our FIR-based and SED-based SFRs are generally consistent for both galaxies and AGNs across a wide SFR range.} \label{fig_comp_sfr_fir} \end{figure*} Fig.~\ref{fig_comp_sfr_fir} is limited to FIR-detected sources, whose FIR photometry is included in the SED fitting, and thus it is somewhat expected that the SED-based SFRs and FIR-based SFRs will agree well. We try excluding the FIR data to see how the SED-fitting results would change, and the results are shown in Fig.~\ref{fig_comp_mstar_sfr_nofir}. Generally, there are no significant systematic differences between the results with or without FIR data for both galaxies and AGNs, and the median offsets are 0.002 and $-0.02$~dex for $M_\star$ and SFR, respectively. Therefore, the fitting without FIR data should also be reliable without significant biases (e.g., \citealt{Mountrichas21}). \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{comp_mstar_sfr_nofir.pdf} } \caption{Comparison between the SED-fitting results with or without FIR data for $M_\star$ (\textit{left}) and SFR (\textit{right}). The results are consistent, indicating that the fitting without FIR data does not have significant biases.} \label{fig_comp_mstar_sfr_nofir} \end{figure*} \subsection{Validation of $M_\star$ and SFR Uncertainties and Nominal Depth Assessment} \label{sec: valid_err} We validate the $M_\star$ and SFR statistical uncertainties output by \texttt{CIGALE} in this section. \texttt{CIGALE} computes the uncertainties as the likelihood-weighted standard deviations \citep{Boquien19}, and we use the linear-space analyses in \texttt{CIGALE}. It is usually difficult to test the uncertainties directly because real $M_\star$ and SFR values are unknown. However, the \texttt{Prospector-$\alpha$} results, which are based on ultradeep multi-wavelength data, provide highly accurate measurements that largely solve this problem.\par For each source, $s$, we denote the difference in $\log M_\star$ or $\log\mathrm{SFR}$ between our values and \texttt{Prospector-$\alpha$} values as $X_s$ and assume $X_s\sim Normal(o_s, e_{s; \texttt{CIGALE}}^2+e_{s; \texttt{Prospector}}^2)$, where $o_s$ is the expected offset between our and \texttt{Prospector-$\alpha$} measurements, and $e_{s; \texttt{CIGALE}}$ and $e_{s; \texttt{Prospector}}$ are our and \texttt{Prospector-$\alpha$} uncertainties, respectively. $o_s$ is usually not 0, as discussed in Section~\ref{sec: compare_results}; $o_s$ and $e_s$ also vary from source to source. It can be shown that the expected sample variance of $X_s$ is \begin{align} \mathrm{Var}(X_s)=&E(e_{s; \texttt{CIGALE}}^2)+E(e_{s; \texttt{Prospector}}^2)+\mathrm{Var}(o_s),\label{eq: valid_error} \end{align} where the full derivation is presented in Appendix~\ref{append: eq26}. By checking if the above equation holds, we can test if $e_{s; \texttt{CIGALE}}$ is reliable. For a meaningful comparison, the first term in Eq.~\ref{eq: valid_error} should contribute a sufficiently large portion of $\mathrm{Var}(X_s)$, and this will be checked in the following text. To mitigate the impact of outliers, we further replace the terms in Eq.~\ref{eq: valid_error} by their robust estimators -- we use $e\equiv\mathrm{NMAD}\{X_s\}$, $\mathrm{median}\{e_{s; \texttt{CIGALE}}^2\}$, and $\mathrm{median}\{e_{s; \texttt{Prospector}}^2\}$ to estimate $\sqrt{\mathrm{Var}(X_s)}$, $E(e_{s; \texttt{CIGALE}}^2)$, and $E(e_{s; \texttt{Prospector}}^2)$, respectively. We further define \begin{align} \hat{e}^2=\mathrm{median}\{e_{s; \texttt{CIGALE}}^2\}+\mathrm{median}\{e_{s; \texttt{Prospector}}^2\}+\mathrm{Var}(o_s).\label{eq: error_estimator} \end{align} The validation of Eq.~\ref{eq: valid_error} is thus to check if $e\approx\hat{e}$.\par The difficulty arises from the fact that $o_s$ is actually unknown, and thus we cannot calculate $\mathrm{Var}(o_s)$, but we can still give a reasonable range for it. The lower limit of $\mathrm{Var}(o_s)$ is 0, and we adopt its upper limit as the variance of a uniform distribution spanning 0.5 and 1 for $\log M_\star$ and $\log\mathrm{SFR}$, respectively. The spanning range can be justified in the middle panels of Fig.~\ref{fig_comp_wcdfs_master}, where the deviations of the LOESS curves from the one-to-one relationships are confined within a 0.5 (1) dex range for $\log M_\star$ ($\log\mathrm{SFR}$). For $\log M_\star$, $\hat{e}$ is thus estimated to be within the range of $0.17-0.23$, and this range is narrow enough to fairly accurately constrain the uncertainties. The first term in Eq.~\ref{eq: error_estimator} accounts for $51\%-85\%$ of the total $\hat{e}^2$; this fraction is large, and thus $\mathrm{Var}(X_s)$ should be sensitive to $e_{s; \texttt{CIGALE}}$, though the contributions from the other two terms are not negligible. $e$ is 0.22 for $\log M_\star$, within the expected range of $\hat{e}$. For $\log\mathrm{SFR}$, $\mathrm{Var}(o_s)$ is more significant. The contribution of the first term in Eq.~\ref{eq: error_estimator} is $32\%-70\%$, and the estimated range of $\hat{e}$ is $0.27-0.39$. $e$ is 0.37, also within the expected interval. Note that the possible bias of the second term in Eq.~\ref{eq: error_estimator} is not considered, and it may also slightly change the intervals. The analyses of errors are summarized in Table~\ref{tbl_valid_err} for easy reference. Overall, $e$ is largely consistent with $\hat{e}$, and thus we conclude that our uncertainties are generally reliable. We also divide the sources into several $i$-band magnitude bins and do not detect strong dependences of the above analysis results on the magnitude.\par \begin{table*} \caption{Analyses of errors in Section~\ref{sec: valid_err}} \label{tbl_valid_err} \centering \begin{threeparttable} \begin{tabular}{cccccc} \hline \hline & $\mathrm{median}\{e_{s; \texttt{CIGALE}}^2\}$ & $\mathrm{median}\{e_{s; \texttt{Prospector}}^2\}$ & $\mathrm{Var}(o_s)$ & $\hat{e}^2$ & $e^2$\\ & (1) & (2) & (3) & (4) & (5)\\ \hline $\log M_\star$ & 0.026 & 0.004 & $0-0.021$ & $0.030-0.051$ & 0.047\\ \hline log SFR & 0.049 & 0.021 & $0-0.083$ & $0.070-0.154$ & 0.139\\ \hline \hline \end{tabular} \begin{tablenotes} \item \textit{Notes.} (1), (2), and (3) are the first, second, and third terms in Eq.~\ref{eq: error_estimator}, respectively. (4) = (1) + (2) + (3) is the total expected variance, and (5) is the measured variance. See Section~\ref{sec: valid_err} for more details. \end{tablenotes} \end{threeparttable} \end{table*} The general reliability of the statistical uncertainties of our $M_\star$ and SFR measurements ultimately arises from the reliability of the statistical uncertainties of the SEDs, which are justified indirectly and independently by the photo-$z$ uncertainties in \citet{Zou21b}. They showed that 78\% of spec-$z$s reside in the 68\% photo-$z$ intervals. 78\% roughly corresponds to $1.2\sigma$ for a normal distribution, roughly consistent with $1\sigma$. This should not be taken for granted because it is a challenging problem to measure accurately the photometric errors accounting for both the pixel correlations in single bands and cross-band systematic uncertainties; especially, within the SED context, the photometric errors should also include the uncertainties of the physical SED models. Due to all these complicated issues, it is not surprising that some previous works found that their uncertainties were underestimated (e.g., \citealt{Luo10}). In principle, single-band photometric uncertainties can be addressed with detailed analyses (e.g., \citealt{Wold19}), but the choice of the systematic uncertainties for subsequent SED analyses often lacks clear guidelines because, at least, it is challenging to quantify the effective contributions from imperfect SED models. In Nyland et al. (in preparation), the smallest error in each band is around $3\%-9\%$ of the flux, and our results suggest that this is a suitable choice when constructing SEDs in our case. We emphasize that the uncertainties generally have little impact on the returned $M_\star$ and SFR values, which mainly depend on the photometric data points instead of their errors.\par We further estimate a nominal ``depth'' of our SEDs. We define ``good bands'' as those with ratios between their fluxes and flux errors above five and show the number of good bands of each source versus its $i_\mathrm{mag}$ in Fig.~\ref{fig_ngoodband_mag}. We use $i$ band to be consistent with the choice in \citet{Zou21b}, and this band is also sufficiently deep and red. The figure indicates that the number of good bands drops significantly below $i_\mathrm{mag}\approx24$, and thus we claim that our nominal depth is $i_\mathrm{mag}=24$. This is also supported by the fact that the nominal high-quality photo-$z$ depth is $i_\mathrm{mag}\approx24$ in \citet{Zou21b}. We found that this deterioration of SEDs when $i_\mathrm{mag}$ becomes fainter is generally contributed by all the bands between $u$ to Spitzer $4.5~\mu\mathrm{m}$, and no specific bands significantly dominate the band loss. Similarly, we repeat the analyses for the $K_s$ band, and the nominal $K_s$ depth of our SEDs is around 23. About 40\% of our sources are brighter than these magnitude depths. \begin{figure} \centering \resizebox{\hsize}{!}{ \includegraphics{ngoodband_mag.pdf} } \caption{The number of good bands vs. $i_\mathrm{mag}$. Each background point represents one source, and the large red points with error bars represent the median, $25^\mathrm{th}$, and $75^\mathrm{th}$ percentiles of the number of good bands in each magnitude bin. The number of good bands drops significantly around $i_\mathrm{mag}=24$.} \label{fig_ngoodband_mag} \end{figure} \subsection{Additional Errors from Photo-$z$ Uncertainties} \label{sec: adderr} Photo-$z$s are only estimations of real redshifts, but we fix photo-$z$s during the SED fitting. Photo-$z$ uncertainties can also contribute to the uncertainties of the fitting results, and we probe this additional error term in this section.\par We estimate the photo-$z$ error ($\sigma_z$) as half of the difference between the 68\% photo-$z$ lower limit and upper limit in \citet{Zou21b}, who have already justified the general reliability of the photo-$z$ limits. We then divide the $z-\sigma_z$ plane into a grid with a bin size of $\Delta z=0.2$ and $\Delta\sigma_z=0.05$, and the left panel of Fig.~\ref{fig_zperturb} shows the distribution of our sources in this plane. For each source, we perturb its $z$ value following a distribution combined from two half-normal distributions -- both peak at the best-fit photo-$z$ value, and the left (right) part has a $\sigma$ value of the difference between the best-fit photo-$z$ and the 68\% lower (upper) limit. We then fit the perturbed data to obtain the differences between the resulting parameters and the unperturbed parameters for each selected source. For each parameter and each $z-\sigma_z$ bin, we take the NMAD of the differences for sources within this bin as the additional error of this parameter at this specific bin. The results for $\log\mathrm{SFR}$ and $\log M_\star$ are shown in Fig.~\ref{fig_zperturb}, and the additional errors increase with $\sigma_z$, as expected. Although the additional errors can be large ($\gtrsim0.5~\mathrm{dex}$) when $\sigma_z$ is large and $z$ is small, few sources populate these regions (Fig.~\ref{fig_zperturb}). Most sources have largely accurate photo-$z$ measurements, and the typical additional errors from photo-$z$ uncertainties are 0.14 dex and 0.11 dex for $\log\mathrm{SFR}$ and $\log M_\star$, respectively.\par \begin{figure*} \centering \resizebox{\hsize}{!}{ \includegraphics{zperturb_nsrc.pdf} \includegraphics{zperturb_logmstar.pdf} \includegraphics{zperturb_logsfr.pdf} } \caption{\textit{Left}: The distribution of our sources in the $z-\sigma_z$ plane, where only bins with at least 200 sources are shown. \textit{Middle}: The map of the additional error from photo-$z$ uncertainties for $\log M_\star$. \textit{Right}: The map of the additional error from photo-$z$ uncertainties for $\log\mathrm{SFR}$.} \label{fig_zperturb} \end{figure*} We add these errors to the \texttt{CIGALE}-output errors in quadrature for sources without spec-$z$s, and the errors in those $z-\sigma_z$ bins not covered by Fig.~\ref{fig_zperturb} are linearly extrapolated from the other bins. One caveat is that the above analyses are based on Gaussian uncertainties and thus may not fully address large photo-$z$ errors or multi-modal posteriors. Especially, one case worth noting is $z=0.01$, as mentioned in Section~\ref{sec: select_bqgal}. Such sources usually have monotonically decreasing photo-$z$ posteriors with the largest posterior values occurring at 0.01, the smallest allowed redshift value. Their $M_\star$ and SFR values are thus heavily underestimated and should not be used directly. \subsection{Data Release} \label{sec: release} We release our SED-fitting results on the Zenodo repository (\url{https://zenodo.org/communities/ddfdata/}), including the catalog, auxiliary photometry products, and full best-fit decomposed SED curves for all the sources. The catalog columns are explained below. The relevant sections referred to below are mainly for \mbox{W-CDF-S}, and users should also check additional notes in Appendices~\ref{append: es1} and \ref{append: xmmlss} for ELAIS-S1 and XMM-LSS, respectively. \begin{itemize} \item{Column 1, \texttt{Tractor\_ID}: unique source identifier used in internal \textit{The Tractor} photometry catalogs. These identifiers are the same as those in \citet{Ni21}, \citet{Zou21a, Zou21b}, and our auxiliary photometry products.} \item{Column 2--3, \texttt{RA, Dec}: J2000 RA and Dec in Nyland et al. (in preparation).} \item{Column 4, \texttt{redshift}: redshift.} \item{Column 5, \texttt{ztype}: the type of the redshift. ``\texttt{zphot}'' and ``\texttt{zspec}'' stand for photometric and spectroscopic redshift, respectively.} \item{Column 6--7, \texttt{zphot\_lowlim} and \texttt{zphot\_upplim}: the 68\% lower and upper limit of photo-$z$. These columns are set to $-1$ for sources with spec-$z$s.} \item{Column 8, \texttt{flag\_star}: Whether the source is a star. ``1'' and ``0'' stand for yes and no, respectively.} \item{Column 9, \texttt{flag\_Xrayagn}: Whether the source is an \mbox{X-ray} AGN in \citet{Ni21}. ``1'' means that this source is an \mbox{X-ray} AGN, ``0'' means that this source is an \mbox{X-ray}-detected non-AGN, and ``$-1$'' means that this source is undetected in \mbox{X-rays}.} \item{Column 10, \texttt{flag\_IRagn\_S05}: Whether this source is an IR AGN that satisfies the criteria in \citet{Stern05}. ``1'' means yes, ``0'' means that this source is detected in all four IRAC bands with SNR above three but unclassified as an AGN, and ``$-1$'' indicates other sources.} \item{Column 11, \texttt{flag\_IRagn\_L07}: Same as Column~10, but for the criteria in \citet{Lacy07}.} \item{Column 12, \texttt{flag\_IRagn\_D12}: Same as Column~10, but for the criteria in \citet{Donley12}.} \item{Column 13, \texttt{flag\_reliablesedagn}: Whether this source is a reliable SED AGN that satisfies Eq.~\ref{eq: reliable_sedagn} and \ref{eq: crit_sedagn} for \mbox{W-CDF-S} and ELAIS-S1 or Eq.~\ref{eq: crit_sedagn_xmmlss} for XMM-LSS. ``1'' and ``0'' stand for yes and no, respectively.} \item{Column 14--15, \texttt{detBIC1\_agn} and \texttt{detBIC2\_agn}: $\Delta\mathrm{BIC_1(AGN)}$ and $\Delta\mathrm{BIC_2(AGN)}$ between the normal galaxy and AGN fitting in Section~\ref{sec: select_agn}.} \item{Column 16--17, \texttt{detBIC1\_bqgal} and \texttt{detBIC2\_bqgal}: $\Delta\mathrm{BIC_1(BQ)}$ and $\Delta\mathrm{BIC_2(BQ)}$ between the normal and BQ galaxy fitting in Section~\ref{sec: select_bqgal}.} \item{Column 18, \texttt{redchi2\_gal}: Best-fit $\chi^2_r$ values using normal-galaxy templates.} \item{Column 19, \texttt{redchi2\_agn}: Best-fit $\chi^2_r$ values using AGN templates. Sources other than IR AGNs, \mbox{X-ray} sources, and those with $\Delta\mathrm{BIC_1(AGN)}>2$ have NaN values.} \item{Column 20, \texttt{redchi2\_bqgal}: Best-fit $\chi^2_r$ values using BQ-galaxy templates. Sources other than those with $\Delta\mathrm{BIC_1(BQ)}>2$ have NaN values.} \item{Column 21, \texttt{redchi2\_best}: Adopted best-fit $\chi^2_r$ values, as described in Section~\ref{sec: bestsedfittingresults}.} \item{Column 22--29, \texttt{Mstar\_gal}, \texttt{Mstar\_gal\_err}, \texttt{Mstar\_agn}, \texttt{Mstar\_agn\_err}, \texttt{Mstar\_bqgal}, \texttt{Mstar\_bqgal\_err}, \texttt{Mstar\_best}, and \texttt{Mstar\_best\_err}: $M_\star$ and uncertainties in $M_\odot$, with the additional errors in Section~\ref{sec: adderr} added. The suffix (``\texttt{gal}'', ``\texttt{agn}'', ``\texttt{bqgal}'', or ``\texttt{best}'') follows the same rule in Columns~18--21.} \item{Column 30, \texttt{logMstar\_err\_from\_zphot}: The additional error of $\log M_\star$ from photo-$z$ uncertainties in Section~\ref{sec: adderr}. This column is set to 0 for sources with spec-$z$s.} \item{Column 31, \texttt{logMstar\_new}: Corrected $\log M_\star$ derived from Eq.~\ref{eq: corr_mstar_Joel} for \mbox{W-CDF-S and ELAIS-S1} or Eq.~\ref{eq: corr_mstar_Joel_xmmlss} for XMM-LSS. This column should be used with appropriate consideration due to the related caveats discussed in Section~\ref{sec: compare_results}.} \item{Column 32--41, \texttt{SFR\_gal}, \texttt{SFR\_gal\_err}, \texttt{SFR\_agn}, \texttt{SFR\_agn\_err}, \texttt{SFR\_bqgal}, \texttt{SFR\_bqgal\_err}, \texttt{SFR\_best}, \texttt{SFR\_best\_err}, \texttt{logSFR\_err\_from\_zphot}, and \texttt{logSFR\_new}: Similar to Columns~22--31, but for SFR.} \item{Column 42, \texttt{SFR\_FIR}: Original, uncorrected FIR-based SFRs.} \item{Column 43, \texttt{SFR\_FIR\_new}: Corrected FIR-based SFRs based on Eq.~\ref{eq: correct_fir_sfr}.} \item{Column 44--45, \texttt{V\_J\_gal} and \texttt{V\_J\_gal\_err}: Rest-frame $V-J$ colors and uncertainties using the galaxy templates.} \item{Column 46--47, \texttt{U\_V\_gal} and \texttt{U\_V\_gal\_err}: Rest-frame $U-V$ colors and uncertainties using the galaxy templates.} \item{Column 48--49, \texttt{FUV\_V\_gal} and \texttt{FUV\_V\_gal\_err}: Rest-frame $FUV-V$ colors and uncertainties using the galaxy templates.} \item{Column 50--51, \texttt{fracagn} and \texttt{fracagn\_err}: AGN fractions and uncertainties. Sources other than IR AGNs, \mbox{X-ray} sources, and those with $\Delta\mathrm{BIC_1(AGN)}>2$ have $\texttt{fracagn}=0$ and $\texttt{fracagn\_err}=-1$. We reiterate that this parameter can hardly be constrained well by the available data; see Section~\ref{sec: sedagn}.} \item{Column 52, \texttt{logL\_6um\_AGN}: Decomposed best-fit AGN rest-frame $6~\mu\mathrm{m}$ luminosity.} \item{Column 53--54, \texttt{rSFR} and \texttt{rSFR\_err}: $r_\mathrm{SFR}$ and uncertainties in Eq.~\ref{eq: delayedsfhbq}. Sources other than those with $\Delta\mathrm{BIC_1(BQ)}>2$ have $\texttt{rSFR}=1$ and $\texttt{rSFR\_err}=-1$.} \item{Column 55, \texttt{ngoodband}: Number of bands with $\mathrm{SNR>5}$, as defined in Section~\ref{sec: valid_err}.} \end{itemize} $\Delta\mathrm{BIC}$ values are included in our catalog, but we do not recommend directly linking them to statistical probabilities because the real physical case is much more complicated than the underlying assumptions of $\Delta\mathrm{BIC}$. Instead, detailed calibrations are usually needed. We refer readers to Section~\ref{sec: sedagn} and \citet{Ciesla18} for discussions of using $\Delta\mathrm{BIC}$ and other parameters to reliably select SED AGNs and rapidly quenching galaxies, respectively. The $M_\star$ and SFR measurements may become unreliable and/or have large errors when the photometric quality decreases, and thus we record the number of bands with $\mathrm{SNR>5}$ as a basic quality indicator worth considering.\par Our best-fit decomposed SED curves are also released to facilitate future studies of our sources. Their individual SEDs are merged into several large Hierarchical Data Format (HDF5) files, in which the \texttt{group} name is the same as the \texttt{Tractor\_ID} for each source, and the \texttt{dataset}s under each \texttt{group} record rasterized wavelengths or specific luminosities of all the components. We release the SEDs in the HDF5 format instead of the traditional FITS format because the HDF5 format has a better I/O performance (e.g., \citealt{Price15}), which is important in our case as millions of SEDs are involved. The files are downsized by resampling the SEDs to a sparser wavelength grid. We adopt the flux-conservation algorithm in the \texttt{SpectRes} package \citep{Carnall17} to do the resampling. We rewrote its code in \texttt{Julia} and increased the speed by a factor of $>100$. The resolution of the new grid is around eight times better than those of broad photometric bands at the corresponding wavelengths, and thus the downsizing procedure does not affect broad-band characterizations.\par Other intermediate data can be shared upon reasonable request to the authors. \section{Summary and Future Work} \label{sec: summary} In this work, we have derived and analyzed the \mbox{X-ray} to FIR SEDs of nearly three million sources in \mbox{W-CDF-S}, ELAIS-S1, and XMM-LSS. The main text focuses on \mbox{W-CDF-S} as a representative example, and the results for ELAIS-S1 and XMM-LSS are presented in Appendices~\ref{append: es1} and \ref{append: xmmlss}, respectively. Appendix~\ref{append: compare_fields} further makes a check that there are no significant systematic differences in our SED-fitting results among different fields. The main results are summarized below. \begin{itemize} \item{We collect and reduce the data from \mbox{X-ray} to FIR. The intrinsic \mbox{X-ray} luminosities are estimated using a Bayesian approach. We also generate flux upper-limit maps in the \mbox{X-ray} and FIR to feed into the SED fitting. See Section~\ref{sec: data}.} \item{We select AGNs or AGN candidates through \mbox{X-ray}, MIR, and SED methods and compare the selection results of these methods. By calibrating the SED method using the deep Chandra data in the \mbox{CDF-S}, we find that the SED method based on the existing data can hardly select more AGNs missed by other methods if we require high purity. The SED method can thus only select AGN candidates but may not be able to reliably justify whether a source is an AGN or not. See Section~\ref{sec: select_agn}.} \item{We select BQ-galaxy candidates that may be undergoing recent rapid changes in their SFRs. See Section~\ref{sec: select_bqgal}.} \item{We provide a catalog recording the source properties (e.g., SFR and $M_\star$) and briefly analyze them, including quiescent-galaxy colors, AGN MIR-X-ray relations, and comparisons between our measurements and others. Especially, we assess and calibrate our measurements by comparing them with the reference \texttt{Prospector-$\alpha$} results for small parts of the \mbox{W-CDF-S} and XMM-LSS fields. Empirical corrections of our SFR (SED-based and FIR-based) and $M_\star$ are given. The detailed decomposed SEDs are also publicly available along with the catalog. See Section~\ref{sec: sedfitting}.} \end{itemize} Overall, our data products provide a valuable resource for future extragalactic research in these LSST DDFs. New datasets are also constantly being released in these fields. For example, at the time of writing this article, slightly deeper Spitzer images from the Cosmic Dawn Survey than what we are using were released in \mbox{W-CDF-S} and XMM-LSS \citep{Moneti21}. The Hawaii Two-0 Survey (H20) will soon provide deep HSC images in \mbox{W-CDF-S} comparable to the LSST depth. Our \mbox{W-CDF-S} field has been selected as the Euclid Deep Field-Fornax, which will be deeply observed by Euclid in the NIR. The upcoming LSST DDF observations will also provide deeper optical data with hundreds of observation epochs. Re-analyses of the new data, including measuring forced photometry and subsequently conducting SED fitting, will take much more effort and time. We leave the utilization of the new data to future updates of our catalogs.\par There are also many ongoing or forthcoming spectroscopic surveys in our fields, and we list them here to the best of our knowledge: CSI (The Carnegie-Spitzer-IMACS Survey; \citealt{Kelson14}), DESI (The Dark Energy Spectroscopic Instrument; \citealt{Levi19}), DEVILS (The Deep Extragalactic Visible Legacy Survey; \citealt{Davies18}), H20, PFS (The Subaru Prime Focus Spectrograph; \citealt{Takada14}), SDSS-V BHM (Black Hole Mapper; \citealt{Kollmeier17}), VLT MOONS (The Multi-Object Optical and Near-infrared Spectrograph for the Very Large Telescope; \citealt{Maiolino20}), 4MOST WAVES (Wide-Area VISTA Extragalactic Survey with the 4-metre Multi-Object Spectroscopic Telescope; \citealt{Driver19}). Our work can help these projects select targets for spectroscopic observations, and they will further provide better redshift measurements and additional data for source characterization. Especially, with these upcoming spectra, as we briefly discussed in Sections~\ref{sec: bqagn} and \ref{sec: xraydatapoint}, co-analyses of spectra and photometry can provide further insights about our sources, and \citet{Villa-Velez21} is a recent example in COSMOS.\par Meanwhile, our catalogs will have rich legacy value and enable many scientific projects on different topics. To name just a few possibilities, our catalog helps in characterizing rapidly quenching or bursting galaxies; the links between AGNs and their host-galaxy properties can be probed; the cosmic growth of SMBHs and galaxies can be constructed; many high-redshift active dwarf galaxies with intermediate-mass black hole candidates can be selected; and hosts of transients (e.g., supernovae and TDEs) found in these DDFs can be analyzed. A notable example is that our catalog will be directly helpful for the LADUMA (Looking At the Distance Universe with the MeerKAT Array) survey \citep{Blyth16}, which will measure the amount of neutral atomic hydrogen; together with our $M_\star$ and SFR measurements, one can measure how long galactic star formation can continue in the future and the relative importance of the future star formation compared to the past star formation (characterized by $M_\star$). Overall, all these studies will greatly benefit from our large sample size. For instance, as far as we know, our catalog includes the largest sample of medium-depth ($\approx50$~ks exposure) \mbox{X-ray} AGNs and should thus be superb for AGN studies that were previously limited by the sample size. Besides our SED-fitting catalog, our compilation of photometric and redshift data in Section~\ref{sec: data} is also valuable, and users can perform further analyses with these depending upon their needs.\par Our analyses could further be extended to COSMOS and EDF-S, which would provide the community with self-consistent and easy-to-access catalogs covering all the LSST DDFs. Analyses in COSMOS would also provide opportunities for extensive comparisons and calibrations with many previous works, and those in EDF-S, when the data are ripe, will fill the vacancy of systematic catalogs of source SEDs and properties in EDF-S. \acknowledgments We thank the referee for a thorough and constructive review, which has greatly improved this article. We thank Franz E. Bauer, Zhenyuan Wang, and Junyu Zhang for helpful discussions. FZ, WNB, WY, and SZ acknowledge support from NASA grant 80NSSC19K0961, NSF grant AST-2106990, Penn State ACIS Instrument Team Contract SV4-74018 (issued by the Chandra X-ray Center, which is operated by the Smithsonian Astrophysical Observatory for and on behalf of NASA under contract NAS8-03060), and the V.M. Willaman Endowment. We acknowledge support from the LSST Corporation through an Enabling Science grant. QN acknowledges support from a UKRI Future Leaders Fellowship (grant code: MR/T020989/1). GY acknowledges support from the George P. and Cynthia Woods Mitchell Institute for Fundamental Physics and Astronomy at Texas A\&M University. BL acknowledges support from the National Natural Science Foundation of China grant 11991053. Basic research in radio astronomy at the U.S. Naval Research Laboratory is supported by 6.1 Base Funding. KN acknowledges support from the NRL Karles Fellow program. YQX acknowledges support from NSFC-12025303 and 11890693, the CAS Frontier Science Key Research Program (QYZDJ-SSW-SLH006), the K.C. Wong Education Foundation, and the science research grants from the China Manned Space Project with NO. CMS-CSST-2021-A06. The Chandra ACIS Team Guaranteed Time Observations (GTO) utilized were selected by the ACIS Instrument Principal Investigator, Gordon P. Garmire, currently of the Huntingdon Institute for X-ray Astronomy, LLC, which is under contract to the Smithsonian Astrophysical Observatory via Contract SV2-82024.
\section{Introduction} \subsection{Some context and prior work} A random band matrix is a random matrix whose entries vanish outside of a band around the diagonal. The standard random band matrix model uses independent Gaussian entries: Fix integers $N \geq W \geq 1$ and sample $A \in \mathbf{R}^{N \times N}$ according to the probability density $a \mapsto Z^{-1} e^{-\frac{W}{4} \operatorname{tr} a^* a}$ on the space of matrices $a \in \mathbf{R}^{N \times N}$ that satisfy $a^* = a$ and $a_{i,j} = 0$ for $|i - j| > W$. It is conjectured that, when $\varepsilon > 0$ small and $N \geq C_\varepsilon$ large, the eigenvectors of $A$ are typically localized when $W \leq N^{1/2-\varepsilon}$ and typically delocalized when $W \geq N^{1/2+\varepsilon}$. See Casati, Molinari, and Izrailev \cite{Casati-Molinari-Izrailev}. At the time of writing, the rigorous state of the art for this model was localization when $W \leq N^{1/7-\varepsilon}$ and delocalization when $W \geq N^{3/4+\varepsilon}$. These were proved by Peled, Schenker, Shamis, and Sodin \cite{Peled-Schenker-Shamis-Sodin} and Bourgade, Yau, and Yin \cite{Bourgade-Yau-Yin}, respectively. In this article we advance the localization regime to $W \leq N^{1/4-\varepsilon}$ by optimizing the proof of the $1/8$ exponent in Schenker \cite{Schenker}. In a simultaneous and independent work, Cipolloni, Peled, Schenker, and Shapiro \cite{Cipolloni-Peled-Schenker-Shapiro} also prove localization when $W \leq N^{1/4-\varepsilon}$. There is a related integrable band matrix model where the $N^{1/2}$ threshold is known to be sharp. See Shcherbina \cite{Shcherbina} and Shcherbina and Shcherbina \cite{Shcherbina-Shcherbina}. There is also a recent breakthrough on delocalization when $W \geq N^\varepsilon$ for a $d \geq 8$ dimensional toroidal band model. See Yang, Yau, and Yin \cites{Yang-Yau-Yin-1, Yang-Yau-Yin-2}. \subsection{Main result} For convenience we work with random block tridiagonal matrices. We expect our methods can be easily adapted to handle standard random band matrices. We sample a random block tridiagonal matrix \begin{equation*} A = \mat{ A_{1,1} & A_{1,2} \\ A_{1,2}^* & A_{2,2} & \ddots \\ & \ddots & \ddots & A_{N-1,N} \\ & & A_{N-1,N}^* & A_{N,N} } \in (\mathbf{R}^{M \times M})^{N \times N} \end{equation*} according to the probability density \begin{equation} \label{e.hamiltonian} a \mapsto Z^{-1} e^{- \frac{M}{4} \operatorname{tr} a^* a} \end{equation} on the space of block matrices $a \in (\mathbf{R}^{M \times M})^{N \times N}$ that satisfy $a^* = a$ and $a_{i,j} = 0$ for $|i - j| > 1$. We prove exponential off-diagonal decay of the resolvent: \begin{theorem} \label{t.main} If $\varepsilon > 0$, $|\lambda| < \varepsilon^{-1}$, and $N, M \geq C_\varepsilon$, then \begin{equation} \label{e.resolventdecay} \mathbf{E} \| ((A-\lambda)^{-1})_{i,j} \|^{1-\varepsilon} \leq e^{- M^{-3-\varepsilon} |i-j|} \end{equation} holds for all $1 \leq i, j \leq N$. \end{theorem} Here and throughout the paper, we let $C > 1 > c > 0$ denote positive universal constants that may differ in each instance. We use subscripts to denote dependence, so that $C_\varepsilon > 1 > c_\varepsilon > 0$ are positive constants that depend on $\varepsilon$. The resolvent bound \eref{resolventdecay} is known to imply localization of the eigenvectors when $N \geq M^{3+\varepsilon}$. See for example Aizenman, Friedrich, Hundertmark, and Schenker \cite{Aizenman-Friedrich-Hundertmark-Schenker}. Since the flattened version of $A$ is an $NM \times NM$ matrix, this corresponds to localization when $W \leq N^{1/4-\varepsilon}$ for the standard random band model. By arguments of Schenker \cite{Schenker} and Bourgain \cite{Bourgain}, \tref{main} can be deduced from the following lower bound on the logarithmic fluctuations of the corner block of the resolvent. \begin{lemma} \label{l.fluctuations} If $\varepsilon > 0$, $|\lambda| < \varepsilon^{-1}$, and $N, M \geq C_\varepsilon$, then \begin{equation} \label{e.fluctuations} \mathbf{V} \log \| ((A - \lambda)^{-1})_{1,N} \| \geq M^{-3-\varepsilon} N. \end{equation} \end{lemma} In particular, the logarithmic fluctuation lower bound \eref{fluctuations} is the main contribution of our paper. The reader interested in the reduction of \tref{main} to \lref{fluctuations}, which is arguably the most complicated part of the proof, is referred to Schenker \cite{Schenker} and Bourgain \cite{Bourgain}. We remark that our only essential use of the Gaussian law \eref{hamiltonian} of $A$ is to compute the conditional law of $S_k$ given $D_{k-1}, \bar D_k, D_{k+1}, B_{k-1}, B_k$ in \lref{conditionallaw}. We conjecture that this usage can be removed, and that the same matrices treated in Schenker \cite{Schenker} can also be handled using our methods. \subsection{Scalar fluctuations} We recall from Schenker \cite{Schenker} the reformulation of the lower bound \eref{fluctuations} in terms of the scalar fluctuations of a cocycle of a Markov chain. Assume the hypotheses of \lref{fluctuations}. Almost surely, Gaussian elimination yields the explicit formula \begin{equation} \label{e.product} ((A-\lambda)^{-1})_{1,N} = D_1^{-1} B_1 D_2^{-1} B_2 \cdots D_{N-1}^{-1} B_{N-1} D_N^{-1}, \end{equation} where \begin{equation} \label{e.markov} \begin{cases} D_1 = A_{1,1} - \lambda \\ B_k = - A_{k,k+1} \\ D_{k+1} = A_{k+1,k+1} - \lambda - B_k^* D_k^{-1} B_k \end{cases} \end{equation} for $k = 1, ..., N-1$. We bound the logarithmic fluctuations of the product \eref{product} from below by the sum of the conditional logarithmic fluctuations of the norms of its terms. First, we let \begin{equation*} S_k = \| D_k \| \end{equation*} and \begin{equation*} \bar D_k = \| D_k \|^{-1} D_k, \end{equation*} and then observe \begin{equation*} \mathbf{V} \log \| ((A - \lambda)^{-1})_{1,N} \| \geq \mathbf{E} ( \mathbf{V} ( \log ( S_1 \cdots S_N ) | \bar D_1, ..., \bar D_N, B_1, ..., B_{N-1})). \end{equation*} Second, we use independence to distribute the variance through the logarithm. Since $S_k$ and $(D_1, ..., D_{k-2}, D_{k+2}, ..., D_N, B_1, ..., B_{k-2}, B_{k+1}, ..., B_{N-1})$ are conditionally independent given $(D_{k-1}, \bar D_k, D_{k+1}, B_{k-1}, B_k)$, it follows that \begin{equation} \label{e.schenker} \mathbf{V}( \log \| ((A - \lambda)^{-1})_{1,N} \| ) \\ \geq \sum_{\substack{k \in 2 \mathbf{N} \\ 1 < k < N}} \mathbf{E}( \mathbf{V}( \log S_k | D_{k-1}, \bar D_k, D_{k+1}, B_{k-1}, B_k)). \end{equation} Here we dropped the odd terms in order to achieve conditional independence. The lower bound \eref{fluctuations} follows from the inequality \eref{schenker} and the lower bound \begin{equation} \label{e.expectedscalarfluctuations} \min_{1 < k < N} \mathbf{E}( \mathbf{V}( \log S_k | D_{k-1}, \bar D_k, D_{k+1}, B_{k-1}, B_k)) \geq M^{-3-\varepsilon}. \end{equation} We prove the lower bound \eref{expectedscalarfluctuations} by explicitly computing the conditional law of $S_k$ and estimating the log concavity of its density. See \lref{scalarfluctions} below. \subsection{Discussion of optimality} We expect the $1/4$ exponent is the best possible for any argument that relies on the scalar fluctuations of the terms in the product \eref{product}. Indeed, for energies close to zero, we conjecture an upper bound on the logarithmic variance of the norms of the terms: \begin{conjecture} \label{j.optimal} If $\varepsilon > 0$ is small, $|\lambda| < \varepsilon$, $M \geq C_\varepsilon$, and $1 < k < N$, then \begin{equation*} \mathbf{E}( \mathbf{V}( \log S_k | D_{k-1}, \bar D_k, D_{k+1}, B_{k-1}, B_k)) \leq M^{-3+\varepsilon}. \end{equation*} \end{conjecture} Intuitively, the fluctuations of the norm $S_k$ should contain only an $O(M^{-2})$ fraction of the total randomness in the matrix $D_k$. In particular, any improvement beyond the exponent $1/4$ should give finer information about the Lyapunov exponents of the cocycle \eref{product} of the Markov chain \eref{markov}. \subsection{Acknowledgements} The second author was partially supported by the National Science Foundation via NSF-DMS-2137909. \section{Random full matrix bounds} We collect some known estimates for random full matrices. Recall that $\| A \| = \max_{\| x \| = 1} \| A x \|$ is the operator norm of $A$, $\| A \|_F = (\operatorname{tr} A^* A)^{1/2}$ is the Frobenius norm of $A$, and $\operatorname{tr} \operatorname{1}_I(A)$ is the number of eigenvalues of $A$ in the interval $I \subseteq \mathbf{R}$. \begin{lemma} \label{l.randomfullmatrices} If $E \in \mathbf{R}^{M \times M}$ has independent $N(0,M^{-1})$ Gaussian entries, $G = (E + E^*)/\sqrt 2$, and $H \in \mathbf{R}^{M \times M}$ is symmetric and deterministic, then \begin{align} \label{e.wegner} & \mathbf{E} \operatorname{tr} \operatorname{1}_I(G + H) \leq C M |I|, \\ \label{e.inversefrobenius} & \P( \| (G + H)^{-1} \|_F \geq t ) \leq C M t^{-1}, \\ \label{e.dotproduct} & \mathbf{E} (\operatorname{tr} G H)^2 = 2 M^{-1} \| H \|_F^2, \\ \label{e.operator} & \P( \| E \| \geq C ) \leq e^{-c M}, \\ \label{e.conjugatedfrobenius} \mbox{and} \quad & \P( \| E^* H E \|_F \leq c \| H \|_F) \leq e^{-c M} \end{align} hold for all intervals $I \subseteq \mathbf{R}$ and $t > 0$. \end{lemma} \begin{proof} The estimates \eref{wegner} and \eref{inversefrobenius} are part of the main theorem in Aizenman, Peled, Schenker, Shamis, and Sodin \cite{Aizenman-Peled-Schenker-Shamis-Sodin}. The estimate \eref{dotproduct} follows from $\operatorname{tr} G H = \sum_{ij} \sqrt{2} E_{ij} H_{ij}$ and the fact that the $E_{ij}$ are independent $N(0,M^{-1})$ Gaussians. The estimate \eref{operator} is a standard operator norm bound for Wigner matrices and can be found in Tao \cite{Tao}. The final estimate \eref{conjugatedfrobenius} is somewhat non-standard, so we give an ad hoc proof. Since the law of $E$ is invariant under left multiplication by an orthogonal matrix, we may assume $H$ is diagonal and therefore $(E^* H E)_{ij} = \sum_k E_{ki} H_{kk} E_{kj}$. For $i \neq j$, compute \begin{equation*} \mathbf{E} (E^* H E)_{ij}^2 = M^{-2} \| H \|_F^2 \end{equation*} and \begin{equation*} \mathbf{E} (E^* H E)_{ij}^4 = 3 M^{-4} \| H \|_F^4. \end{equation*} It follows that \begin{equation*} \P ( (E^* H E)_{ij}^2 \geq c M^{-2} \| H \|_F^2 ) \geq c. \end{equation*} Since $(E^* H E)_{i_1 j_1}, ..., (E^* H E)_{i_m j_m}$ are independent whenever $\{ i_1, j_1 \}, ..., \{ i_m, j_m \}$ are disjoint, we can partition the entries $\{ (E^* H E)_{ij}: i \neq j \}$ into at most $C M$ sets of at least $c M$ independent entries. In particular, the event $ \| E^* H E \|_F \leq c \| H \|_F$ is contained in a union of at most $C M$ events of probability at most $e^{-c M}$. \end{proof} The diagonal and off-diagonal blocks $A_{k,k}$ and $A_{k,k+1}$ have, respectively, the same law as $G$ and $E$ from \lref{randomfullmatrices}. We can therefore use the random full matrix bounds in \lref{randomfullmatrices} to control the typical sizes of the matrices appearing in the Markov chain \eref{markov}: \begin{lemma} \label{l.matrixbounds} If $\varepsilon > 0$, $|\lambda| < \varepsilon^{-1}$, $M \geq C_\varepsilon$, and $1 \leq k < N$, then, with probability at least $1 - M^{-c_\varepsilon}$, \begin{align*} & M^{1/2-\varepsilon} \leq \| A_{k+1,k+1} \|_F \leq M^{1/2+\varepsilon}, \\ & M^{1/2-\varepsilon} \leq \| B_k^* D_k^{-1} B_k \|_F \leq M^{1 + \varepsilon}, \\ & |\operatorname{tr} A_{k+1,k+1} (\lambda + B_k^* D_k^{-1} B_k)| \leq M^{1/2+\varepsilon}, \\ \mbox{and} \quad & |\operatorname{tr} A_{k+1,k+1} B_k^* D_k^{-1} B_k| \leq M^{1/2+\varepsilon}. \end{align*} \end{lemma} \begin{proof} We prove a series of estimates valid for all $\varepsilon > 0$, $|\lambda| < \varepsilon^{-1}$, $M \geq C_\varepsilon$, and $1 \leq k < N$. For brevity, we omit these quantifiers from the notation. However, it is important to note that an estimate for some $\varepsilon > 0$ may follow from a previous estimate for a different $\varepsilon > 0$. The estimate \begin{equation*} \P(\| A_{k+1,k+1} \|_F \geq M^{1/2+\varepsilon}) \leq M^{-c_\varepsilon} \end{equation*} follows from Markov's inequality and $\mathbf{E} \| A_{k+1,k+1} \|_F^2 = M+1$. The estimate \begin{equation*} \P ( \operatorname{tr} \operatorname{1}_{[-M^{-\varepsilon},M^{-\varepsilon}]}(A_{k+1,k+1}) \geq \varepsilon M ) \leq M^{-c_\varepsilon} \end{equation*} follows from the Wegner estimate \eref{wegner}. The estimate \begin{equation*} \P(\| A_{k+1,k+1} \|_F \leq M^{1/2-\varepsilon}) \leq M^{-c_\varepsilon} \end{equation*} follows from the previous estimate and the fact that $A_{k+1,k+1}$ has $M$ eigenvalues. The estimate \begin{equation*} \P(\| D_k^{-1} \|_F \geq M^{1+\varepsilon}) \leq M^{-c_\varepsilon} \end{equation*} follows from the independence of $D_k - A_{k,k}$ and $A_{k,k}$ and the inverse Frobenius norm bound \eref{inversefrobenius}. The estimate \begin{equation*} \P(\| B_k^* D_k^{-1} B_k \|_F \geq M^{1+\varepsilon}) \leq M^{-c_\varepsilon} \end{equation*} follows from the previous estimate and the operator norm bound \eref{operator} applied to $B_k$. The estimate \begin{equation*} \P ( \operatorname{tr} \operatorname{1}_{[-M^{-\varepsilon},M^{-\varepsilon}]}(D_k) \geq \varepsilon M ) \leq M^{-c_\varepsilon} \end{equation*} follows from the independence of $D_k - A_{k,k}$ and $A_{k,k}$ and the Wegner estimate \eref{wegner}. The estimate \begin{equation*} \P(\operatorname{tr} \operatorname{1}_{[-M^\varepsilon,M^\varepsilon]} (B_k^* D_k^{-1} B_k ) \leq (1 - \varepsilon) M) \leq M^{-c_\varepsilon} \end{equation*} follows from the previous estimate and the operator norm bound \eref{operator} applied to $B_k$. The estimate \begin{equation*} \P(\operatorname{tr} \operatorname{1}_{[-M^\varepsilon,M^\varepsilon]} (D_k ) \leq (1 - \varepsilon) M) \leq M^{-c_\varepsilon} \end{equation*} follows from the previous estimate, $|\lambda| < \varepsilon^{-1}$, and the operator norm bound \eref{operator} applied to $A_{k,k}$. The estimate \begin{equation*} \P(\| D_k^{-1} \|_F \leq M^{1/2-\varepsilon}) \leq M^{-c_\varepsilon} \end{equation*} follows from the previous estimate and the fact that $\| D_k^{-1} \|_F^2$ is the sum of the squares of the eigenvalues of $D_k^{-1}$. The estimate \begin{equation*} \P(\| B_k^* D_k^{-1} B_k \|_F \leq M^{1/2-\varepsilon}) \leq M^{-c_\varepsilon} \end{equation*} follows from the previous estimate, the independence of $B_k$ and $D_k$, and the conjugated Frobenius norm bound \eref{conjugatedfrobenius}. Finally, the last two estimates in the statement of the lemma follow from the Frobenius inner product bound \eref{dotproduct}, Markov's inequality, and the independence of $A_{k+1,k+1}$ and $B_k^* D_k^{-1} B_k$. \end{proof} \section{Fluctuation lower bound} For an arbitrary random vector whose law has a continuous density, we recall the conditional law of its norm given its direction: \begin{lemma} \label{l.normdensity} If the random vector $X \in \mathbf{R}^n$ has continuous density $\phi$, $Y = \| X \|$, $\bar X = \| X \|^{-1} X$, and $f \in C_c((0,\infty))$, then \begin{equation*} \mathbf{E}( f(Y) | \bar X) = Z^{-1} \int_0^\infty f(y) y^{n-1} \phi(y \bar X) \,dy, \end{equation*} where $Z = \int_0^\infty y^{n-1} \phi(y \bar X) \,dy.$ \qed \end{lemma} The conditional law of $S_k$ can now be computed from the density \eref{hamiltonian} of the random band matrix. \begin{lemma} \label{l.conditionallaw} For $1 < k < N$ and $f \in C_c((0,\infty))$, \begin{equation*} \mathbf{E}( f(S_k) | D_{k-1}, \bar D_k, D_{k+1}, B_{k-1}, B_k) = Z_k^{-1} \int_0^\infty f(s) e^{-\phi_k(s)} \,ds, \end{equation*} where \begin{equation} \begin{aligned} \label{e.conditionallaw} \phi_k(s S_k) & = \frac{M}{4} \| s D_k + \lambda + B_{k-1}^* D_{k-1}^{-1} B_{k-1} \|_F^2 \\ & \quad + \frac{M}{4} \| D_{k+1} + \lambda + s^{-1} B_k^* D_k^{-1} B_k \|_F^2 \\ & \quad - \frac{M^2+M-2}{2} \log (s S_k) \end{aligned} \end{equation} and $Z_k = \int_0^\infty e^{-\phi_k(s)} \,ds.$ \end{lemma} \begin{proof} Since the law of $A$ has density \eref{hamiltonian} and the change of variables $A \mapsto (D,B)$ in \eref{markov} preserves Lebesgue measure, the law of $(D,B)$ has density \begin{equation*} (d,b) \mapsto Z_{N,M}^{-1} e^{- \frac{M}{4} \| d_1 \|_F^2 - \frac{M}{4} \sum_k \| d_{k+1} + \lambda + b_k^* d_k^{-1} b_k \|_F^2 - \frac{M}{2} \sum_k \| b_k \|_F^2} \end{equation*} on the space of pairs of sequences of matrices $(d,b) \in (\mathbf{R}^{M \times M})^N \times (\mathbf{R}^{M \times M})^{N-1}$ that satisfy $d_k^* = d_k$. The conditional law of $D_k$ given $(D_{k-1}, D_{k+1}, B_{k-1}, B_k)$ therefore has density \begin{equation*} d \mapsto Z^{-1} e^{- \frac{M}{4} \| d + \lambda + B_{k-1}^* D_{k-1}^{-1} B_{k-1} \|_F^2 - \frac{M}{4} \| D_{k+1} + \lambda + B_k^* d^{-1} B_k \|_F^2} \end{equation*} where $Z > 0$ is $(D_{k-1}, D_{k+1}, B_{k-1}, B_k)$-measurable. Conclude using \lref{normdensity} together with the fact that the space of $d \in \mathbf{R}^{M \times M}$ with $d^* = d$ has dimension $M(M+1)/2$. \end{proof} We estimate the typical growth of the logarithmic density $\phi_k$. \begin{lemma} \label{l.uniformlylogconcave} If $\varepsilon > 0$, $|\lambda| < \varepsilon^{-1}$, $M \geq C_\varepsilon$, and $1 < k < N$, then, with probability at least $1 - M^{-c_\varepsilon}$, the logarithmic density $\phi_k$ defined in \eref{conditionallaw} satisfies \begin{equation*} S_k \phi_k'(S_k s) \geq M^{2-\varepsilon} s \quad \mbox{for } s \geq M^\varepsilon, \end{equation*} \begin{equation*} S_k \phi_k'(S_k s) \leq - M^{2-\varepsilon} s^{-3} \quad \mbox{for } 0 < s \leq M^{-\varepsilon}, \end{equation*} and \begin{equation*} |S_k^2 \phi_k''(S_k s)| \leq M^{3+\varepsilon} (1 + s^{-4}) \quad \mbox{for } s > 0. \end{equation*} \end{lemma} \begin{proof} Using the recursion \eref{markov}, compute \begin{equation*} s D_k + \lambda + B_{k-1}^* D_{k-1}^{-1} B_{k-1} = s A_{k,k} + (1 - s) (\lambda + B_{k-1}^* D_{k-1}^{-1} B_{k-1}) \end{equation*} and \begin{equation*} D_{k+1} + \lambda + s^{-1} B_k^* D_k^{-1} B_k = A_{k+1,k+1} + (s^{-1} - 1) B_k^* D_k^{-1} B_k. \end{equation*} Inserting these into the definition of $\phi_k$ in \eref{conditionallaw}, obtain \begin{equation*} \phi_k(S_k s) = \alpha_1 s^2 + \alpha_2 (s-1)^2 - 2 \alpha_3 s (s-1) + \alpha_4 + \alpha_5 (s^{-1}-1)^2 + 2 \alpha_6 (s^{-1}-1) - \alpha_7 \log (S_k s), \end{equation*} where \begin{align*} & \alpha_1 = \tfrac{M}{4} \| A_{k,k} \|^2_F, \\ & \alpha_2 = \tfrac{M}{4} \| \lambda + B_{k-1}^* D_{k-1}^{-1} B_{k-1} \|_F^2, \\ & \alpha_3 = \tfrac{M}{4} \operatorname{tr} A_{k,k} (\lambda + B_{k-1}^* D_{k-1}^{-1} B_{k-1}), \\ & \alpha_4 = \tfrac{M}{4} \| A_{k+1,k+1} \|_F^2 \\ & \alpha_5 = \tfrac{M}{4} \| B_k^* D_k^{-1} B_k \|_F^2, \\ & \alpha_6 = \tfrac{M}{4} \operatorname{tr} A_{k+1,k+1} B_k^* D_k^{-1} B_k, \\ \mbox{and} \quad & \alpha_7 = \tfrac12 (M^2 + M - 2). \end{align*} Using \lref{matrixbounds}, the bounds \begin{align*} & M^{2-\varepsilon} \leq \alpha_1 \leq M^{2+\varepsilon}, \\ & M^{2-\varepsilon} \leq \alpha_2 \leq M^{3+\varepsilon}, \\ & |\alpha_3| \leq M^{3/2+\varepsilon}, \\ & M^{2-\varepsilon} \leq \alpha_4 \leq M^{2+\varepsilon}, \\ & M^{2-\varepsilon} \leq \alpha_5 \leq M^{3+\varepsilon}, \\ & |\alpha_6| \leq M^{3/2+\varepsilon}, \\ \mbox{and} \quad & M^{2-\varepsilon} \leq \alpha_7 \leq M^{2+\varepsilon}, \end{align*} hold with probability at least $1 - M^{-c_\varepsilon}$. Without loss of generality, assume these bounds hold almost surely. Compute \begin{equation*} S_k \phi_k'(S_k s) = 2 \alpha_1 s + 2 \alpha_2 (s-1) - 4 \alpha_3 s + 2 \alpha_5 (s^{-2} - s^{-3}) - 2 \alpha_6 s^{-2} - \alpha_7 s^{-1}. \end{equation*} and use the bounds on $\alpha_k$ to estimate \begin{equation*} S_k \phi_k'(S_k s) \geq M^{2-\varepsilon} s - M^{2+\varepsilon} \quad \mbox{for } s > 1 \end{equation*} and \begin{equation*} S_k \phi_k'(S_k s) \leq M^{2+\varepsilon} + M^{2-\varepsilon} (s^{-2} - s^{-3}) \quad \mbox{for } 0 < s < 1. \end{equation*} Conclude the first and second inequalities in the lemma statement. Compute \begin{equation*} S_k^2 \phi_k''(S_k s) = 2 \alpha_1 + 2 \alpha_2 - 4 \alpha_3 + 2 \alpha_5 (3 s^{-4} - 2 s^{-3}) + 4 \alpha_6 s^{-3} + \alpha_7 s^{-2} \end{equation*} and use the bounds on the $\alpha_k$ and $s^{-2} + s^{-3} \leq 2 + s^{-4}$ to conclude the third inequality in the lemma statement. \end{proof} We prove an elementary logarithmic variance bound. \begin{lemma} \label{l.logvariance} If $Y$ is a positive random variable, the law of $Y$ has continuous density $e^{-\psi}$, and there are $y_0 > 0$, $\alpha \geq 1$, and $\beta \geq 1$ such that \begin{equation*} y_0 \psi'(y_0 y) \geq \beta y \quad \mbox{for } y \geq \beta, \end{equation*} \begin{equation*} y_0 \psi'(y_0 y) \leq - \beta y^{-3} \quad \mbox{for } 0 < y \leq \beta^{-1}, \end{equation*} and \begin{equation*} |y_0^2 \psi''(y_0 y)| \leq \alpha (1 + y^{-4}) \quad \mbox{for } y > 0, \end{equation*} then $\mathbf{V} \log Y \geq c \alpha^{-1} \beta^{-6}.$ \end{lemma} \begin{proof} Since $\mathbf{V} \log (y_0^{-1} Y) = \mathbf{V} \log Y$ and $y_0^{-1} Y$ has density $y \mapsto y_0 e^{- \psi(y_0 y)}$, we can rescale to make $y_0 = 1$. Using $\psi'(y) \geq \beta y$ for $y \geq \beta$, compute \begin{align*} & \int_{2 \beta}^\infty |\log y| e^{-\psi(y)} \,dy \\ & \leq \int_{2 \beta}^\infty y e^{-\psi(2 \beta) + \frac12 \beta (2 \beta)^2 - \frac12 \beta y^2} \\ & = \beta^{-1} e^{-\psi(2 \beta)} \\ & \leq \beta^{-2} \int_\beta^{2 \beta} e^{-\psi(y)} \,dy \\ & \leq \beta^{-2}. \end{align*} Similarly, using $\psi'(y) \leq - \beta y^{-3}$ for $0 < y \leq \beta^{-1}$, compute \begin{align*} & \int_0^{(2 \beta)^{-1}} |\log y| e^{-\psi(y)} \,dy \\ & \leq (2 \beta)^{-2} \int_0^{(2 \beta)^{-1}} y^{-3} e^{-\psi((2 \beta)^{-1}) + \frac12 \beta (2 \beta)^2 - \frac12 \beta y^{-2}} \\ & = (2 \beta)^{-2} \beta^{-1} e^{-\psi((2 \beta)^{-1})} \\ & \leq \frac12 \beta^{-2} \int_{(2 \beta)^{-1}}^{\beta^{-1}} e^{-\psi(y)} \,dy \\ & \leq \frac12 \beta^{-2}. \end{align*} Conclude $\mathbf{E} |\log Y| \leq \log \beta + C$ and therefore $y_1 = \exp \mathbf{E} \log Y$ satisfies $c \beta^{-1} \leq y_1 \leq C \beta$. Using $|\psi''(y)| \leq \alpha (1 + y^{-4})$, compute \begin{equation*} \int_0^{y_1-t} e^{-\psi} + \int_{y_1+t}^\infty e^{-\psi} \geq e^{-C \alpha \beta^4 t^2} \int_{y_1-t}^{y_1+t} e^{-\psi} \end{equation*} for $0 < t < c \beta^{-1}$. Using Markov's inequality, compute \begin{equation*} t^{-2} \mathbf{V} \log Y \geq \P(|\log Y - \log y_1| \geq t ) \geq \P(|Y - y_1| \geq C \beta t) \geq e^{- C \alpha \beta^{6} t^2} \end{equation*} for $0 < t < c \beta^{-1}$. Conclude by setting $t^{-2} = \alpha \beta^6$. \end{proof} Combining the previous two lemmas yields the main result. \begin{lemma} \label{l.scalarfluctions} If $\varepsilon > 0$, $|\lambda| < \varepsilon^{-1}$, $M \geq C_\varepsilon$, and $1 < k < N$, then, with probability at least $1 - M^{-c_\varepsilon}$, \begin{equation*} \mathbf{V} ( \log S_k | D_{k-1}, \bar D_k, D_{k+1}, B_{k-1}, B_k ) \geq M^{-3-\varepsilon}. \end{equation*} In particular, the lower bound \eref{expectedscalarfluctuations} holds. \end{lemma} \begin{proof} This is immediate from \lref{uniformlylogconcave} and \lref{logvariance}. \end{proof} \begin{bibdiv} \begin{biblist} \bib{Aizenman-Friedrich-Hundertmark-Schenker}{article}{ author={Aizenman, Michael}, author={Hundertmark, Dirk}, author={Friedrich, Roland M.}, author={Schenker, Jeffrey H.}, title={Finite-volume fractional-moment criteria for Anderson localization}, note={Dedicated to Joel L. Lebowitz}, journal={Comm. Math. Phys.}, volume={224}, date={2001}, number={1}, pages={219--253}, issn={0010-3616}, review={\MR{1868998}}, doi={10.1007/s002200100441}, } \bib{Aizenman-Peled-Schenker-Shamis-Sodin}{article}{ author={Aizenman, Michael}, author={Peled, Ron}, author={Schenker, Jeffrey}, author={Shamis, Mira}, author={Sodin, Sasha}, title={Matrix regularizing effects of Gaussian perturbations}, journal={Commun. Contemp. Math.}, volume={19}, date={2017}, number={3}, pages={1750028, 22}, issn={0219-1997}, review={\MR{3631932}}, doi={10.1142/S0219199717500286}, } \bib{Bourgade-Yau-Yin}{article}{ author={Bourgade, Paul}, author={Yau, Horng-Tzer}, author={Yin, Jun}, title={Random band matrices in the delocalized phase I: Quantum unique ergodicity and universality}, journal={Comm. Pure Appl. Math.}, volume={73}, date={2020}, number={7}, pages={1526--1596}, issn={0010-3640}, review={\MR{4156609}}, doi={10.1002/cpa.21895}, } \bib{Bourgain}{article}{ author={Bourgain, J.}, title={A lower bound for the Lyapunov exponents of the random Schr\"{o}dinger operator on a strip}, journal={J. Stat. Phys.}, volume={153}, date={2013}, number={1}, pages={1--9}, issn={0022-4715}, review={\MR{3100812}}, doi={10.1007/s10955-013-0821-x}, } \bib{Casati-Molinari-Izrailev}{article}{ author={Casati, Giulio}, author={Molinari, Luca}, author={Izrailev, Felix}, title={Scaling properties of band random matrices}, journal={Phys. Rev. Lett.}, volume={64}, date={1990}, number={16}, pages={1851--1854}, issn={0031-9007}, review={\MR{1046365}}, doi={10.1103/PhysRevLett.64.1851}, } \bib{Cipolloni-Peled-Schenker-Shapiro}{article}{ author={Giorgio Cipolloni}, author={Ron Peled,} author={Jeffrey Schenker}, author={Jacob Shapiro}, note={Personal communication}, } \bib{Peled-Schenker-Shamis-Sodin}{article}{ author={Peled, Ron}, author={Schenker, Jeffrey}, author={Shamis, Mira}, author={Sodin, Sasha}, title={On the Wegner orbital model}, journal={Int. Math. Res. Not. IMRN}, date={2019}, number={4}, pages={1030--1058}, issn={1073-7928}, review={\MR{3915294}}, doi={10.1093/imrn/rnx145}, } \bib{Schenker}{article}{ author={Schenker, Jeffrey}, title={Eigenvector localization for random band matrices with power law band width}, journal={Comm. Math. Phys.}, volume={290}, date={2009}, number={3}, pages={1065--1097}, issn={0010-3616}, review={\MR{2525652}}, doi={10.1007/s00220-009-0798-0}, } \bib{Shcherbina}{article}{ author={Shcherbina, Tatyana}, title={SUSY transfer matrix approach for the real symmetric 1d random band matrices}, journal={Electron. J. Probab.}, volume={27}, date={2022}, pages={Paper No. 24, 29}, review={\MR{4379199}}, doi={10.1214/22-ejp747}, } \bib{Shcherbina-Shcherbina}{article}{ author={Shcherbina, Mariya}, author={Shcherbina, Tatyana}, title={Universality for 1d random band matrices}, journal={Comm. Math. Phys.}, volume={385}, date={2021}, number={2}, pages={667--716}, issn={0010-3616}, review={\MR{4278281}}, doi={10.1007/s00220-021-04135-6}, } \bib{Tao}{book}{ author={Tao, Terence}, title={Topics in random matrix theory}, series={Graduate Studies in Mathematics}, volume={132}, publisher={American Mathematical Society, Providence, RI}, date={2012}, pages={x+282}, isbn={978-0-8218-7430-1}, review={\MR{2906465}}, doi={10.1090/gsm/132}, } \bib{Yang-Yau-Yin-1}{article}{ author={Yang, Fan}, author={Yau, Horng-Tzer}, author={Yin, Jun}, title={Delocalization and quantum diffusion of random band matrices in high dimensions I: Self-energy renormalization}, note={arXiv:2104.12048} } \bib{Yang-Yau-Yin-2}{article}{ author={Yang, Fan}, author={Yau, Horng-Tzer}, author={Yin, Jun}, title={Delocalization and quantum diffusion of random band matrices in high dimensions II: T-expansion }, note={arXiv:2107.05795} } \end{biblist} \end{bibdiv} \end{document}
\section{Introduction} \label{s:introduction} The advent of social media has democratized public discourse on an unparalleled scale. Meanwhile, it is considered a particularly conducive arena for hate speech \cite{caiani2021online}. Online hate speech is prevalent and can lead to serious consequences. At the individual level, the victims targeted by hate speech are frightened by online threats that may materialize in the real world \cite{olteanu2018effect}. At the societal level, it has been reported that there is an upsurge in offline hate crimes targeting minorities \cite{olteanu2018effect,farrell2019exploring}. \begin{table}[t] \small \centering \begin{tabular}{p{0.6cm} p{6.1cm}} \toprule \emph{Parent} & As an average height male, idgaf how tall you are, if that's your issue then spend the money and get a better seat, or just f**king make the seat selection online to get more space. \\ \emph{Target} & Found the short guy! \\ \addlinespace \multicolumn{2}{l}{~-\emph{Target} is Neutral if considering only \emph{Target}.} \\ \multicolumn{2}{l}{~-\emph{Target} is Hate if considering \emph{Parent} and \emph{Target}.} \\ \midrule \emph{Parent} & I deal with women all day with my job and this is how they are - extremely stupid, hate-filled, bizarre and they appreciate nothing. \\ \emph{Target}& Maybe you're an a**hole if they treat you like that? \\ \addlinespace \multicolumn{2}{l}{~-\emph{Target} is Hate if considering only \emph{Target}.} \\ \multicolumn{2}{l}{~-\emph{Target} is Counter-hate if considering \emph{Parent} and \emph{Target}.} \\ \bottomrule \end{tabular} \caption{Reddit comments (\emph{Target}s) deemed to be Hate, Neutral, or Counter-hate depending on whether one takes into account the previous comment (\emph{Parent}). } \label{t:problem-examples} \end{table} There are two common strategies to combat online hate: disruption and counter speech. Disruption refers to blocking hateful content or users. To scale this strategy, researchers have proposed methods to identify hate~\cite{waseem-hovy-2016-hateful,hateoffensive,nobata2016abusive}. While these interventions could de-escalate the impact of hate speech, they may violate online free speech \cite{DBLP:conf/icwsm/MathewSTRSMG019}. Additionally, attacks at the micro-level may be ineffective as hate networks often have rapid rewiring and self-repairing mechanisms~\cite{johnson2019hidden}. Counter speech refers to the ``direct response that counters hate speech''~\cite{DBLP:conf/icwsm/MathewSTRSMG019}. It has been shown to be more effective in the long term than disruption in theoretical and empirical studies~\cite{richards2000counterspeech,mathew2020hate}. Identifying hate and counter speech in natural conversations is critical to understand effective counter speech strategies and the generation of counter speech. Most corpora with either hate speech (Hate) or counter speech (Counter-hate) annotations do not include conversational context. Indeed, they annotate a user-generated comment as Hate or Counter-hate based on the comment in isolation~\cite{hateoffensive,waseem-hovy-2016-hateful,DBLP:conf/icwsm/MathewSTRSMG019,he2021racism}. Therefore, systems trained on these corpora fail to consider the effect of contextual information on the identification of Hate and Counter-hate. Recent studies have shown that context affects annotations in toxicity and abuse detection~\cite{pavlopoulos-etal-2020-toxicity, DBLP:journals/corr/abs-2103-14916}. We further investigate the effect of context on the task of identifying Hate and Counter-hate. Table~\ref{t:problem-examples} shows examples where a comment, denoted as \emph{Target}, is Hate, Neutral or Counter-hate depending on whether the preceding comment, denoted as \emph{Parent}, is taken into account.\footnote{The examples in this paper contain hateful content. We cannot avoid it due to the nature of our work.} In the top example, the \emph{Target} goes from Neutral to Hate when taking into account the \emph{Parent}: it becomes clear that the author is disparaging short men. In the bottom example, the \emph{Target} goes from Hate to Counter-hate as the author uses offensive language to counter the hateful content in the \emph{Parent}. This is a common strategy to express counter speech~\cite{DBLP:conf/icwsm/MathewSTRSMG019}. \begin{table*}[ht!] \small \centering \begin{tabular}{lcrcccp{0.2cm}} \toprule Authors & Source & Size &Labels &Context? &Counter? \\ \midrule \citet{waseem-hovy-2016-hateful} &Twitter &1,607 &Sexism/Racism/Normal &\xmark &\xmark \\ \citet{hateoffensive} &Twitter &24,783 &Hate/Offense/Neither &\xmark &\xmark \\ \citet{nobata2016abusive} &Yahoo! &2,000 &Hate/Derogatory/Profanity/Clean &\xmark &\xmark \\ \citet{DBLP:conf/aaai/MathewSYBG021} & Gab &1,1093 &Hateful/Offensive/Normal &\xmark &\xmark \\ \citet{gao-huang-2017-detecting} &Fox News &1,528 &Hateful/Non-hateful &preceding comment &\xmark \\ \citet{qian-etal-2019-benchmark} &Reddit &22,324 &Hate/Non-hate &full conversation &\xmark \\ \citet{pavlopoulos-etal-2020-toxicity} &Wikipedia &20,000 &Toxic/Non-toxic &preceding comment &\xmark \\ \citet{DBLP:journals/corr/abs-2103-14916} &Twitter &8,018 &Abuse/Non-abuse &preceding comment &\xmark \\ \hdashline \citet{DBLP:conf/icwsm/MathewSTRSMG019} &YouTube &13,924 &Non-counter/Counter (6,898) &\xmark &\cmark \\ \citet{he2021racism} &Twitter &2,400 &Hate/Neutral/Counter (517) &\xmark &\cmark \\ \citet{vidgen-etal-2021-introducing} &Reddit &27,494 & Taxonomy including Counter (220) &full conversation &\cmark \\ \textbf{Ours} &Reddit & 6,846 &Hate/Neutral/Counter (1,622) & preceding comment &\cmark \\ \bottomrule \end{tabular} \caption{Comparison of corpora with hate (above dashed line) and counter-hate annotations (below dashed line, some also include hate). \citet{vidgen-etal-2021-introducing} is the only one considering counter-hate and context, but they only have 220 instances of counter hate. Numbers between parenthesis indicate the number of counter-hate instances. } \label{t:datasets} \end{table*} In this study, we answer the following questions: \begin{compactenum} \item Does conversational context affect if a comment is perceived as Hate, Neutral, or Counter-hate by humans? (It does.) \item Do models to identify Hate, Neutral, and Counter-hate benefit from incorporating context? (They do.) \end{compactenum} To answer the first question, we create a collection of (\emph{Parent}, \emph{Target}) Reddit comments and annotate the \emph{Targets} with three labels (Hate, Neutral, Counter-hate) in two independent phases: showing annotators (a) only the \emph{Target} or (b) the \emph{Parent} and the \emph{Target}. We limit context to the parent comment. While the full conversation could provide additional information, it is also known to affect annotators' stance~\cite{dutta2020changing} and introduce biases. We find that human judgments are substantially different when the \emph{Parent} is shown. Thus the task of annotating Hate and Counter-hate requires taking into account the context. To answer the second question, we experiment with context-unaware and context-aware classifiers to detect if a given \emph{Target} is Hate, Neutral, or Counter-hate. Results show that adding context does benefit the classifiers significantly. In summary, the main contributions of this paper are:\footnote{Code and data available at \url{https://github.com/xinchenyu/counter\_context}} \begin{inparaenum}[(a\upshape)] \item a corpus with 6,846 pairs of (\emph{Parent}, \emph{Target}) Reddit comments and annotations indicating whether the \emph{Target}s are Hate, Neutral, or Counter-hate; \item annotation analysis showing that the problem requires taking into account context, as the ground truth changes; \item corpus analysis detailing the kind of language people use to express Hate and Counter-hate; \item experiments showing that context-aware neural models obtain significantly better results; and \item qualitative analysis revealing when context is beneficial and the remaining errors made by the best context-aware model. \end{inparaenum} \section{Related Work} Hate speech in user-generated content has been an active research area recently~\cite{fortuna2018survey}. Researchers have built several datasets for hate speech detection from diverse sources such as Twitter \cite{waseem-hovy-2016-hateful, hateoffensive}, Yahoo! \cite{nobata2016abusive}, Fox News \cite{gao-huang-2017-detecting}, Gab \cite{DBLP:conf/aaai/MathewSYBG021} and Reddit \cite{qian-etal-2019-benchmark}. Compared to hate speech detection, few studies focus on detecting counter speech~\cite{DBLP:conf/icwsm/MathewSTRSMG019, garland-etal-2020-countering, he2021racism}. \citet{DBLP:conf/icwsm/MathewSTRSMG019} collect and hand-code 6,898 counter hate comments from YouTube videos targeting Jews, Blacks and LGBT communities. \citet{garland-etal-2020-countering} work with German tweets and define hate and counter speech based on the communities to which the authors belong. \citet{he2021racism} use a collection of hate and counter hate keywords relevant to COVID-19 and create a dataset containing 359 counter hate tweets targeting Asians. Another line of research focuses on curating datasets for counter speech generation using crowdsourcing~\cite{qian-etal-2019-benchmark} or with the help of trained operators \cite{chung-etal-2019-conan, fanton-etal-2021-human}. However, synthetic language is rarely as rich as language in the wild. Even if it were, conclusions and models from synthetic data may not transfer to the real world. In this paper, we work with user-generated content expressing hate and counter-hate rather than synthetic content. Table \ref{t:datasets} summarizes existing datasets for Hate and Counter-hate detection. Most of them do not include context information. In other words, the preceding comments are not provided when annotating \emph{Target}s. Context does affect human judgments and has been taken into account for Hate detection \cite{gao-huang-2017-detecting,pavlopoulos-etal-2020-toxicity,DBLP:journals/corr/abs-2103-14916,vidgen-etal-2021-introducing}. \citet{gao-huang-2017-detecting} annotate hateful comments in the nested structures of Fox News discussion threads. \citet{vidgen-etal-2021-introducing} introduce a dataset of Reddit comments with annotations in 6 categories taking into account context. However, the inter annotator agreement is low (Fleiss’ Kappa 0.267) and the number of Counter-hate instances is small (220). Moreover, both studies use contextual information without identifying the role context plays in the annotation and detection. \citet{pavlopoulos-etal-2020-toxicity} allow annotators to see one previous comment to annotate Wikipedia conversations. They find context matters in the annotation but provide no empirical evidence showing whether models to detect toxicity benefit from incorporating context. \citet{DBLP:journals/corr/abs-2103-14916} re-annotate an existing corpus to investigate the role of context in abusive language. They found context does matter. Utilizing conversational context has also been explored in text classification tasks such as sentiment analysis~\cite{ren2016context}, stance~\cite{ZUBIAGA2018273} and sarcasm~\cite{ghosh-etal-2020-report}. In this paper, we investigate the role of context in Hate and Counter-hate detection. \section{Dataset Collection and Annotation} \label{s:datasets-Collection-Annotation} We first describe our procedure to collect (\emph{Parent}, \emph{Target}) pairs, where both \emph{Parents} and \emph{Targets} are Reddit comments in English. Then, we describe the annotation guidelines and the two annotation phases: showing annotators (a) only the \emph{Target} and (b) the \emph{Parent} and \emph{Target}. The two independent phases allow us to quantify how often context affects the annotation of Hate and Counter-hate. \subsection{Collecting (\emph{Parent}, \emph{Target}) pairs} \label{ss:collecting-pairs} In this work, we focus on Reddit, a popular social media site. It is an ideal platform for data collection due to the large size of user populations and many diverse topics \cite{DBLP:conf/icwsm/BaumgartnerZKSB20}. We use a list of hate words to retrieve Reddit conversations to keep the annotation costs reasonable while creating a (relatively) large corpus of counter speech. We start with a set of 1,726 hate words from two lexicons: Hatebase\footnote{\url{http://hatebase.org/}} and a harassment corpus \cite{rezvan2018quality}. We remove ambiguous words following \citet{DBLP:conf/icwsm/ElSheriefKNWB18}. To collect (\emph{Parent}, \emph{Target}) pairs, we use the following steps. First, we retrieve comments containing at least one hate word~(comment\textsubscript{w/ hateword}{}). Second, we create a (\emph{Parent}, \emph{Target}) pair using comment\textsubscript{w/ hateword}{} as \emph{Target} and its preceding comment as \emph{Parent}. Third, we create a \textit{(Parent, Target)} pair using comment\textsubscript{w/ hateword}{} as \emph{Parent} and each of its replies as \emph{Target}. Lastly, we remove pairs if the same author posted the \emph{Parent} and \emph{Target}. We retrieve 6,846 ({\emph{Parent}, \emph{Target}) pairs with PushShift~\cite{DBLP:conf/icwsm/BaumgartnerZKSB20} from 416 submissions. We also collect the title of the discussion from which each pair is retrieved. \subsection{Annotation Guidelines} To identify whether a \emph{Target} is Hate, Neutral, or Counter-hate, we crowdsource human judgments from non-experts. Our guidelines reuse the definitions of Hate by \citet{ward1997free} and Counter-hate by \citet{DBLP:conf/icwsm/MathewSTRSMG019} and \citet{vidgen-etal-2021-introducing}: \begin{compactitem} \item \textbf{Hate}: the author attacks an individual or a group with the intention to vilify, humiliate, or incite hatred; \item \textbf{Counter-hate}: the author challenges, condemns the hate expressed in another comment, or calls out a comment for being hateful; \item \textbf{Neutral}: the author neither conveys hate nor opposes hate expressed in another comment. \end{compactitem} \noindent \textbf{Annotation Process} We chose Amazon Mechanical Turk (MTurk) as the crowdsourcing platform. We replace user names with placeholders (User\_A and User\_B) owing to privacy concerns. The annotations took place in two independent phases. In the first phase, annotators are first shown the \emph{Parent} comment. After a short delay, they click a button to show the \emph{Target} and then after another short delay they submit their annotation. Delays are at most a few seconds and proportional to the length of the comments. Our rationale behind the delays is to ``force'' annotators to read the \emph{Parent} and \emph{Target} in order. In the second phase, annotators label each \emph{Target} without seeing the preceding \emph{Parent} comment. A total of 375 annotators were involved in the first phase and 299 in the second phase. There is no overlap between annotators thus we eliminated the possibility of biased annotators remembering the \emph{Parent} in the second phase. \noindent \textbf{Annotation Quality} Crowdsourcing may attract spammers~\cite{sabou-etal-2014-corpus}. For quality control, we first set a few requirements for annotators: they must be located in the US and have a 95\% approval rate over at least 100 Human Intelligence Tasks (HITs). We also block annotators who submit more than 10 HITs with an average completion time below 5 seconds (half the time required in our pilot study). As the corpus contains vulgar words, we require annotators to pass the Adult Content Qualification Test. The reward per HIT is \$0.05. The second effort is to identify bad annotators and filter out their annotations until we obtain \textit{substantial} inter-annotator agreement. We collect five annotations per HIT and compute MACE~\cite[Multi-Annotator Competence Estimation]{hovy-etal-2013-learning} for each annotator. MACE is devised to rank annotators by their competence and adjudicate disagreements based on annotator competence (not the majority label). Then, we use Krippendorff’s $\alpha$~\cite{krippendorff} to estimate inter-annotator agreement: $\alpha$ coefficients at or above 0.6 are considered \textit{substantial} (above 0.8 are considered \emph{nearly perfect})~\cite{artstein2008inter}. We repeat the following steps until $\alpha$ $\geq$ 0.6: \begin{compactenum} \item Use MACE to calculate the competence score of all annotators. \item Discard all the annotations by the annotator with the lowest MACE score. \item Check Krippendorff’s $\alpha$ on the remaining annotations. Go to (1) if $\alpha < 0.6$. \end{compactenum} The final corpus consists of 6,846 (\emph{Parent}, \emph{Target}) pairs and a label assigned to each \emph{Target} (Hate, Counter-hate, or Neutral). The ground truth we experiment with (Section \ref{s:experiments}) is the label obtained taking into account the \emph{Parent} (first phase)}. The second phase, which disregards the \emph{Parent}, was conducted for analysis purposes~(Section~\ref{s:analysis}). We split the corpus into two subsets: (a) Gold (4,751 pairs with $\alpha \ge 0.6$) and (b) Silver (2,095 remaining pairs). As we shall see, the Silver pairs are useful to learn models. \section{Corpus Analysis} \label{s:analysis} \begin{table} \small \centering \begin{tabular}{ccccc} \toprule \multicolumn{2}{c}{} & \multicolumn{3}{c}{Without \emph{Parent}}\\ \cmidrule{3-5} & & Hate & Counter-hate & Neutral\\ \midrule \multirow{3}{*}{\begin{sideways}With\end{sideways}} & Hate & 57.4 & 8.4 & 34.2\\ & Counter-hate & 18.7 & 26.2 & 55.1\\ & Neutral & 9.7 & 8.1 & 82.2\\ \bottomrule \end{tabular} \caption{Confusion matrix (percentages) showing annotation changes depending on whether annotators are shown the \emph{Parent} of the \emph{Target} comment.} \label{t:confusion-matrix} \end{table} \begin{table}[t!] \small \centering \begin{tabular}{p{4.5cm} c c} \toprule Example & With & Without \\ \midrule \emph{Parent}: That chick needs a high-five in the face with a chair. Damn her for making us look bad! & & \\ \emph{Target}: A brick is more effective. &Hate & Neutral\\ \midrule \emph{Parent}: If I knew her I would sh*t in her mailbox. & & \\ \emph{Target}: The poor mail carrier in that neighborhood doesn't deserve that. &Counter & Neutral\\ \midrule \emph{Parent}: Go watch your incest porn on your own time. & & \\ \emph{Target}: You're a sick person. & Counter & Hate\\ \bottomrule \end{tabular} \caption{Examples of \emph{Target} comments whose labels change depending on whether annotators are shown the \emph{Parent} of the \emph{Target} comment (with and without).} \label{t:corpus-examples} \end{table} \begin{table*} \centering \small \begin{tabular}{lcccccccc} \toprule \multicolumn{1}{c}{} & \multicolumn{3}{c}{\textit{Title}} & \multicolumn{3}{c}{\emph{Parent}} & \multicolumn{2}{c}{\emph{Target}}\\ \cline{2-3} \cline{5-6} \cline{8-9} \multicolumn{1}{c}{} & p-value & Bonferroni & & p-value & Bonferroni & & p-value & Bonferroni\\ \hline Textual factors \\ ~~~~Total tokens &$\downarrow\downarrow$ &\xmark & &$\uparrow\uparrow\uparrow$ & \cmark & & & \\ ~~~~Question marks & & & & & & & $\uparrow\uparrow\uparrow$ &\cmark \\ ~~~~1st person pronouns & & & &$\downarrow\downarrow\downarrow$ & \cmark & & & \\ ~~~~2nd person pronouns & & & &$\uparrow\uparrow\uparrow$ &\cmark & &$\uparrow\uparrow$ & \xmark\\ \hline Sentiment and cognitive factors \\ ~~~~Profanity words & & & &$\uparrow\uparrow\uparrow$ &\cmark & & $\downarrow\downarrow\downarrow$ & \cmark \\ ~~~~Problem-solving words & & & & & & &$\uparrow\uparrow\uparrow$ &\cmark \\ ~~~~Awareness words & & & & & & &$\uparrow\uparrow\uparrow$ &\cmark \\ ~~~~Negative words & $\downarrow$ &\xmark & &$\uparrow\uparrow\uparrow$ &\cmark & &$\downarrow\downarrow\downarrow$ & \cmark \\ ~~~~Disgust words & & & & & & & $\downarrow\downarrow\downarrow$ & \cmark \\ ~~~~Enlightenment words & & & & & & & $\uparrow\uparrow\uparrow$ & \cmark \\ ~~~~Conflicting words &$\downarrow\downarrow\downarrow$ &\cmark & & & & & &\\ \bottomrule \end{tabular} \caption{Linguistic analysis comparing the \textit{Titles}, \emph{Parents} and \emph{Targets} in Counter-hate and Hate \emph{Target} comments. Number of arrows indicate the p-value (t-test; one: p\textless 0.05, two: p\textless 0.01, and three: p\textless 0.001). Arrow direction indicates whether higher values correlate with Counter-hate (up) or Hate (down). A check mark (\cmark) indicates that the test passes the Bonferroni correction.} \label{t:linguistic-analysis} \end{table*} \paragraph{Does conversational context affect if a comment is perceived as Hate or Counter-hate?} Yes, it does. Table \ref{t:confusion-matrix} presents the percentage of labels that change and remain the same depending on whether annotators are shown the \emph{Parent}, i.e., the context. Many \emph{Target} comments that are perceived as Hate or Counter-hate become Neutral (34.2\% and 55.1\% respectively) when the \emph{Parent} is provided. More surprisingly, many \emph{Target} comments are perceived with the opposite label (from Hate to Counter-hate (8.4\%) or from Counter-hate to Hate (18.7\%)) when the \emph{Parent} comments are shown. We show examples of label changes in Table \ref{t:corpus-examples}. In the first example, annotators identify the \emph{Target} (``A brick is more effective.'') as Neutral without seeing the \emph{Parent}. In fact, a female is the target of hate in the \emph{Parent}, and the author of \emph{Target} replies with even more hatred (and the ground truth label is Hate). In the second example, the \emph{Target} alone is insufficient to tell if it is Counter-hate. When annotators see the \emph{Parent}, however, they understand the author of \emph{Target} counters the hateful content in the \emph{Parent} by showing empathy towards the mail carrier. In the last example, the \emph{Target} alone is considered Hate because it attacks someone by using the phrase ``sick person''. When the \emph{Parent} is shown, however, the annotators understand the \emph{Target} as calling out the \emph{Parent} to be inappropriate. \begin{figure}[t] \centering \includegraphics[width=0.75\linewidth]{label_distribution.jpeg} \caption{Label distribution in \emph{Target}s depending on whether comment\textsubscript{w/ hateword}{} is the \emph{Parent} or the \emph{Target}.} \label{fig:label_distribution} \end{figure} \begin{table*}[ht!] \small \centering \begin{tabular}{l ccc ccc ccc ccc} \toprule \multicolumn{1}{c}{} & \multicolumn{3}{c}{Hate} & \multicolumn{3}{c}{Counter-hate} & \multicolumn{3}{c}{Neutral} & \multicolumn{3}{c}{Weighted Average} \\ \cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10} \cmidrule(lr){11-13} & P & R & F1 & P & R & F1 & P & R & F1 & P & R & F1 \\ \hline \addlinespace Majority Baseline & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.51 & 1.00 & 0.67 & 0.26 & 0.51 & 0.34 \\ \addlinespace Trained with Target & 0.56 & 0.55 & 0.56 & 0.41 & 0.36 & 0.38 & 0.67 & 0.71 & 0.69 & 0.58 & 0.59 & 0.58\\ ~~~~~~~~+ Silver & 0.58 & 0.55 &0.57&0.44 &0.42 &0.43&0.69 &0.72 &0.70&0.60 &0.61 &0.61\\ ~~~~~~~~+ Related task & 0.56 & 0.55 &0.56&0.51 &0.41 &0.45&0.68 &0.74 &0.71&0.61 &0.61 &0.61\\ ~~~~~~~~+ Silver + Related task & 0.55 & 0.56 & 0.56 & 0.49 & 0.53 & 0.51 & 0.67 & 0.69 & 0.70 & 0.61 & 0.61 & 0.61\\ \addlinespace Trained with Parent\_Target & 0.56 & 0.62 & 0.59 & 0.52 & 0.38 & 0.44 & 0.68 & 0.72 & 0.70 & 0.61 & 0.62 & 0.61\\ ~~~~~~~~+ Silver† & 0.58 &0.57 &0.57 &0.49 &0.51& 0.50 &\textbf{0.72} &\textbf{0.71} &\textbf{0.72} &0.63 &0.63 &0.63 \\ ~~~~~~~~+ Related task† & \textbf{0.55} & \textbf{0.66} & \textbf{0.60} & 0.54 & 0.43 & 0.48 & 0.71 &0.70 & 0.71 & 0.63 & 0.63 & 0.63 \\ ~~~~~~~~+ Silver + Related task‡ & 0.55 & 0.65 & 0.60 & \textbf{0.54} & \textbf{0.52} & \textbf{0.53}& 0.74 &0.68 & 0.71 & \textbf{0.64} & \textbf{0.64} & \textbf{0.64} \\ \bottomrule \end{tabular} \caption{Results obtained with several systems. We indicate statistical significance (McNemar’s test \cite{mcnemar1947note} over weighted average) with respect to the model trained with the \emph{Target} only using neither Silver nor pretraining on related tasks as follows: † indicates $p<0.05$ and ‡ indicates $p<0.01$. Training with the \emph{Parent} and \emph{Target} coupled with blending Silver annotations and pretraining with stance corpora yields the best results. The supplementary materials detail the results pretraining with all related tasks we consider.} \label{t:model-results} \end{table*} \paragraph{Label distribution and linguistic insights} Figure~\ref{fig:label_distribution} shows the label distribution for all pairs (rightmost column in each block) and for pairs in which comment\textsubscript{w/ hateword}{} (i.e., the comment containing at least one hate word) is the \emph{Parent} or \emph{Target}. The most frequent label assigned to \emph{Target} comments is Neutral~(49\%) followed by Hate~(28\%) and Counter-hate~(23\%). While \emph{Target} comments containing a hate word are likely to be Hate (45\%), some are Counter-hate (19\%) with context. We analyze the linguistic characteristics of \textit{Title}s, \emph{Parent}s and \emph{Target}s when the \emph{Target}s are Hate or Counter-hate with context to shed light on the differences between the language people use in hate and counter speech. We combine the set of hate words with profanity words to check for profanity words.\footnote{\url{https://github.com/RobertJGabriel/google-profanity-words-node-module/blob/master/lib/profanity.js}} We analyze sentiment and cognitive factors using the Sentiment Analysis and Cognition Engine (SEANCE) lexicon, a popular tool for psychological linguistic analysis \cite{crossley2017sentiment}. Statistical tests are conducted using unpaired t-tests between the groups, of which the \emph{Target}s are Counter-hate or Hate (Table \ref{t:linguistic-analysis}). We also report whether each feature passes the Bonferroni correction as multiple hypothesis tests are performed. We draw several interesting insights: \begin{compactitem} \item Questions marks in \emph{Target} signal Counter-hate. They are often rhetorical questions. \item Fewer 1st person pronouns (e.g., I, me) and more 2nd person pronouns (e.g., you, your) in the \emph{Parent} signal that the \emph{Target} is more likely to be Counter-hate. This is due to the fact that people tend to target others in hateful content. \item High profanity count in the \emph{Parent} signals that the \emph{Target} is Counter-hate, while high profanity count in the \emph{Target} signals Hate. \item More words related to awareness, enlightenment and problem-solving in the \emph{Target} signal Counter-hate. \item When there are more negative words in the \emph{Parent}, the \emph{Target} tends to be Counter-hate. \emph{Target}s labeled as Counter-hate contain fewer negative and disgusting words. \end{compactitem} \section{Experiments and Results} \label{s:experiments} We build neural network models to identify if a \emph{Target} comment is Hate, Counter-hate, or Neutral. We randomly split Gold instances (4,751) as follows: 70\% for training, 15\% for validation and 15\% for testing. Silver instances are only used for training. \paragraph{Neural Network Architecture} We experiment with neural classifiers built on top of the RoBERTa transformer \cite{DBLP:journals/corr/abs-1907-11692}. The neural architecture consists of a pretrained RoBERTa transformer, a fully connected layer (768 neurons and Tanh activation), and another fully connected layer (3 neurons and softmax activation) to make predictions (Hate, Counter-hate, or Neutral). To investigate the role of context, we consider two textual inputs: \begin{compactitem} \item the \textit{Target} alone (Target), and \item the \textit{Parent} and the \textit{Target} (Parent\_Target). \end{compactitem} We concatenate the \textit{Target} and the \textit{Parent} with the [SEP] special token. We conduct multiple runs of experiments, which show consistent results. The hyperparameters and other implementation details are presented in the Appendix. We also experiment models that take the title of the discussion as part of the context, but it is not beneficial. We implement two strategies to enhance the performance of neural models: \paragraph{Blending Gold and Silver} We adopt the method by \citet{shnarch-etal-2018-will} to determine whether Silver annotations are beneficial. There are two phases in the training process: \textit{m} blending epochs using all Gold and a fraction of Silver, and then \textit{n} epochs using all Gold. In each blending epoch, Silver instances are fed in a random order to the network. The fraction of Silver is determined by a blending factor \(\alpha\) \(\in\) [0..1]. The first blending epoch is trained with all Gold and all Silver, and the amount of Silver to blend is reduced by $\alpha$ in each epoch. \paragraph{Pretraining with Related Tasks} We also experiment with several corpora to investigate whether pretraining with related tasks is beneficial. Specifically, we pretrain our models with existing corpora annotating: (1) hateful comments: hateful or not hateful \cite{qian-etal-2019-benchmark}, and hate speech, offensive, or neither \cite{hateoffensive}; (2) sentiment: negative, neutral, or positive \cite{rosenthal-etal-2017-semeval}; (3) sarcasm: sarcasm or not sarcasm \cite{ghosh-etal-2020-report}; and (4) stance: agree, neutral, or attack \cite{pougubiyong2021debagreement}. \begin{table*} \small \centering \begin{tabular}{@{\hspace{.03in}}p{2.5cm}p{0.1cm}p{0.6cm}p{7.6cm}ll@{\hspace{.03in}}} \toprule Error Type & \% & \multicolumn{2}{l}{Example} & Parent\_Target & Target \\ \midrule Lack of information & 48 & \emph{Parent}: & Women can hover..? & & \\ & & \emph{Target}: & No, they can't, but for some reason they keep trying and it gets sh*t everywhere. & Hate & Neutral \\ \midrule Negation & 27 & \emph{Parent}: & It's a joke you pu**y. & & \\ & & \emph{Target}: & I don't see sexism as a joke, especially on a site dedicated to calling out sexism. & Counter-hate & Neutral \\ \midrule Sarcasm or irony & 19 & \emph{Parent}: & You must have been a real baller banging out those eighth graders as a High School senior. & & \\ & & \emph{Target}: & Glad to see you have no rational argument left except childish jokes. We're done here pal. & Counter-hate & Hate \\ \midrule \multirow{2}{1in}{Hate without swear words} & 8 & \emph{Parent}: & Name a dildo `misogyny' so you can *literally* internalize it. & & \\ & & \emph{Target}: & lol. Misogyny can already turn me on so that's a good idea. & Hate & Neutral \\ \bottomrule \end{tabular} \caption{Most common error types made by the \textit{Target} only network (Target) that are fixed by the context-aware neural network (Parent\_Target). } \label{t:error-target} \end{table*} \subsection{Quantitative Results} We present results with the test split in Table \ref{t:model-results}. The majority baseline always predicts Neutral. The remaining rows present the results with the different training settings: training with the \emph{Target} or both the \emph{Parent} and \emph{Target}; training with only Gold or blending Silver annotations; and pretraining with related tasks. We provide here results pretraining with the most beneficial task, stance detection, and present additional results in the Appendices. Blending Gold and Silver annotations requires tuning $\alpha$. We did so empirically using the training and validations splits, like other hyperparameters. We found the optimal value to be 0.3 when blending Silver (+ Silver rows) and 1.0 when blending Silver and pretraining with a related task (+Silver + Related task rows). As shown in Table \ref{t:model-results}, blending Gold and Silver annotations obtains better results (F1 weighted average) than using only Gold (Target: 0.61 vs. 0.58; Parent\_Target: 0.63 vs. 0.61). We also find that models pretrained for stance detection obtain better results than pretrained with other tasks (see detailed results in the Appendices). Pretraining with stance detection data benefits models trained without context (Target: 0.61 vs. 0.58) and models with context (Parent\_Target: 0.63 vs. 0.61). These results indicate that stance information between \emph{Parent} and \emph{Target} is useful to determine whether the \emph{Target} is Hate, Counter-Hate or Neutral. We make two observations about the results obtained using neither strategy. First, using the \emph{Target} alone obtains much better results than the majority baseline (0.58 vs. 0.34). In other words, modeling the \emph{Target} allows the network to identify \emph{some} instances of Hate and Counter-hate despite the ground truth requires the \emph{Parent}. Second, incorporating the \emph{Parent} comment is beneficial: the F1 score for all classes are higher (Hate: 0.59 vs. 0.56, Counter-hate 0.44 vs. 0.38, Neutral 0.70 vs. 0.69), and so is the weighted average (0.61 vs. 0.58). The findings are consistent (weighted F1) using either strategy (+Silver: 0.63 vs 0.61, +Related task: 0.63 vs 0.61) or both (0.64 vs. 0.61). The F1 scores of the three classes with Parent\_Target models are equal to or better than those by Target only models. Finally, the network (a) blending Gold and Silver annotations and (b) pretraining with stance detection achieves the best performance (Parent\_Target+Silver+Related task: 0.64). This result is statistically significant ($p<0.01$) compared to Target only model without blending Silver or pretraining with related tasks. \begin{table*} \small \centering \begin{tabular}{p{2.5cm}p{0.1cm}p{0.6cm}p{6.7cm}ll} \toprule Error Type & \% & \multicolumn{2}{l}{Example} & Ground Truth & Predicted \\ \midrule Negation & 28 & \emph{Parent}: & Those damn f**king white males, ruining it for everyone else. I'm going to a corner to process my guilt. & & \\ & & \emph{Target}: & Don't forget male isn't a gender, it's a disease. & Hate & Counter-hate \\ \midrule Rhetorical question & 27 & \emph{Parent}: & Men are the ones that made inequality. & & \\ & & \emph{Target}: & Do you get paid to be a dumba** in the internet? & Hate & Counter-hate\\ \midrule Hate without swear & 8 & Parent: & Circumcision is good for men. & & \\ words & & \emph{Target}: & Cut off the clitoris of women and cut of their breasts because of breast cancer then. & Hate & Neutral\\ \midrule Non-hate with swear words & 8 & \emph{Parent}: & \textless I wonder if feminists ever consider that? No. They are b**ches incapable of empathy. & & \\ & & \emph{Target}: & This is the sh*t that gets screen capped and spread around to give this sub a bad name. & Counter-hate & Hate \\ \midrule Intricate text & 7 & \emph{Parent}: &Ah it's this again, f**king her and her cronies. & & \\ & & \emph{Target}: & I have lost all respect for her. & Neutral & Hate \\ \bottomrule \end{tabular} \caption{Most common errors made by the best context-aware network (predictions by Parent\_Target+Silver+Related task) compared to the ground truth.} \label{t:error-context} \end{table*} \section{Qualitative Analysis} When is adding the context beneficial? When does our best model make mistakes? To investigate these questions, we manually analyze the following: \begin{compactitem} \item The errors made by the \emph{Target} only network that are fixed by the context-aware network (Trained with Parent\_Target, Table \ref{t:error-target}). \item The errors made by the context-aware network pretrained on related task (stance) and blending Silver annotations (Parent\_Target+Silver+Related task, Table~\ref{t:error-context}). \end{compactitem} \paragraph{When does the context complement \emph{Target}?} We analyze the errors made by the network using only the \emph{Target} that are fixed by the context-aware network (Trained with Parent\_Target). Table \ref{t:error-target} exemplifies the most common error types. The most frequent type of error fixed by the context-aware model is when there is \emph{Lack of information} in the \emph{Target} (48\%). In this case, the \emph{Parent} comment is crucial to determine the label of the \emph{Target}. In the example, knowing what the author of \emph{Target} refers to (i.e., a rhetorical question, \emph{Women can hover?}) is crucial to determine that the \emph{Target} is humiliating women as a group. \begin{comment} the \textit{Target} alone is not sufficient, and the concatenation of both the \textit{Target} and the \textit{Parent} provides key information. Considering the first conversation in Table \ref{t:error-target} as an example, the \textit{Target} alone is treated as a neutral reply until provided with the \textit{Context}, which points out women as the target of attack. Without the \textit{Parent}, the network Target fails to make the connection, but that adding the Parent\_Target complements it and predicts that the reply is a hateful comment humiliating women as a group. \end{comment} The second most frequent error type is \emph{Negation} (27\%). In the example in Table \ref{t:error-target}, taking into account the \emph{Parent} allows the context-aware network to identify that the author of the \emph{Target} is scolding the author of \emph{Parent} and thus countering hate. \citet{nobata2016abusive} and \citet{qian-etal-2019-benchmark} have pointed out that sarcasm and irony make detecting abusive and hateful content difficult. We find evidence supporting this claim. We also discover that by incorporating the \emph{Parent} comment, a substantial amount of these errors are fixed. Indeed, 19\% of errors fixed by the context-aware network include sarcasm or irony in the \emph{Target} comment. Finally, the context-aware network taking into account the \emph{Parent} fixes many errors (8\%) in which the \emph{Target} comment is Hate despite it does not contain swear words. In the example, the \emph{Target} is introducing additional hateful content, which can be identified by the context-aware model when the \emph{Parent} information is used. \paragraph{When does the best model make errors?} In order to find out the most common error types made by the best model (context-aware, Parent\_Target+Silver+Related task), we manually analyze 200 random samples in which the output of the network differs from the ground truth. Table \ref{t:error-context} shows the results of the analysis. Despite 27\% of errors fixed by the context-aware network (i.e., taking into account the \emph{Parent}) include negation in the \emph{Target}, \emph{negation} is the most common type of errors made by our best network~(28\%). The example in Table \ref{t:error-context} is especially challenging as it includes a double negation. We observe that \emph{Rhetorical questions} are almost as common (27\%). This finding is consistent with the findings by \citet{schmidt-wiegand-2017-survey}. In the example, the best model fails to realize that the \emph{Target} is hateful, as it disdains the author of \emph{Parent}. Swear words are present in a substantial number of errors. Wrongly predicting a \emph{Target} without swear words as Counter-hate or Neutral accounts for 8\% of errors, and wrongly predicting a \emph{Target} with swear words as Hate accounts for another 8\% of errors. As pointed out by \citet{hateoffensive}, hate speech may not contain hate or swear words. And vice versa, comments containing swear words may not be hateful \cite{zhang2019hate}. Finally, we observe \emph{Intricate text} in 7\% errors. Our best model identifies the \emph{Target} (``I have lost all respect for her.'') as Hate probably because by identifying the agreeing stance on the \emph{Parent}. Indeed, the author of \emph{Target} expresses his/her attitude without vilifying others. Hence, the ground truth label is Neutral. \section{Conclusions and Future Work} Conversational context does matter in Hate and Counter-hate detection. We have demonstrated so by (a) analyzing whether humans perceive user-generated content as Hate or Counter-hate depending on whether we show them the \emph{Parent} comment and (b) investigating whether neural networks benefit from incorporating the \emph{Parent}. We find that 38.3\% of human judgments change when we show the \emph{Parent} to annotators. Experimental results demonstrate that networks incorporating the \emph{Parent} yield better results. Additionally, we show that noisy instances (Silver data) and pretraining with relevant datasets improves model performance. We have created and released a corpus of 6,846 (\emph{Parent}, \emph{Target}) pairs of Reddit comments with the \emph{Target} annotated as Hate, Neutral or Counter-hate. Our work have several limitations. First, we only consider context as the parent comment. While considering additional context might be sometimes beneficial, doing so would require careful design to not bias annotations~\cite{dutta2020changing}. Our research agenda includes exploring reliably strategies to consider more context and identify which parts are most important. Second, people may have different opinions about what constitutes hate and counter speech due to different tolerances in online aggression. We obtained the ground truth according to annotators' reliability (MACE scores), which may lead to controversial samples falling in the Silver set and thus being considered only for training (not for testing). Finally, the keywords sampling used to create our corpus may introduce biases. Despite we partially mitigate the issue by considering hateful comments in both the \emph{Parent} and \emph{Target}, community-based sampling~\cite{vidgen-etal-2021-introducing} could be applied in our future work. \section{Ethical Considerations} We use the PushShift API to collect data from Reddit.\footnote{\url{https://pushshift.io/api-parameters/}} Our collection process is consistent with Reddit's Terms of Service. The data are accessed through the data dumps on Google's BigQuery using Python.\footnote{\url{https://pushshift.io/ using-bigquery-with-reddit-data/}} Reddit can be considered a public space for discussion which differs from a private messaging service \cite{vidgen-etal-2021-introducing}. Users consent to have their data made available to third parties including academics when they sign up to Reddit. Existing ethical guidelines state that in this situation explicit consent is not required from each user \cite{DBLP:conf/tto/ProcterWBHEWJ19}. We obfuscate user names as User\_A or User\_B to reduce the possibility of identifying users. In compliance with Reddit's policy, we would like to make sure that our dataset will be reused for non-commercial research only.\footnote{\url{https://www.reddit.com/wiki/api-terms/}} The Reddit comments in this dataset were annotated by annotators using Amazon Mechanical Turk. We have followed all requirements introduced by the platform for tasks containing adult content. A warning was added in the task title. Annotators need to pass the Adult Content Qualification Test before working on our tasks. Annotators were compensated on average with \$8 per hour. We paid them regardless of whether we accepted their work. Annotators' IDs are not included in the dataset. \section*{Acknowledgements} This work was supported by Research Seed Grant of the UNT College of Information. We would like to thank the anonymous reviewers for their insightful comments and suggestions.
\section{Introduction} \subsection{Motivation} \IEEEPARstart{P}{redicting} and inferring drivers' braking actions in advance are critical for avoiding collisions in car-following scenarios. The National Highway Traffic Safety Administration (NHTSA) reported that rear-end collisions accounted for 32.4\% of a total of 1,966,000 crashes in the United States in 2014 \cite{NHTSA}. To prevent the rear-end collisions, a wide variety of forward collision avoidance systems have been developed, such as forward collision warning (FCW) systems \cite{wang2016forward,takada2014effectiveness}, pre-crash brake assist (PBA) systems, and autonomous emergency braking (AEB) systems \cite{guononlinear,AlbertoCertainty,savino2016robust}. \begin{figure}[t] \centering \includegraphics[width = 0.48\textwidth]{Figures/figure1} \caption{The forward collision avoidance systems for car-following scenarios. The red (dark) area behind the preceding vehicle represents the critical region where braking actions are required. The yellow (lighter) area represents the region in which the driver should be warned if unaware of the situation.} \label{figure1} \end{figure} The FCW system is an active safety device that warns drivers by a visual, audio, or tactile means when a potential collision is detected \cite{ahtamad2016warning,meng2015tactile}. FCW systems have been proven to have a positive effect on improving traffic safety. A well-known problem with the FCW systems, however, is false-positive alarms. Sometimes, the false alarm rate is so high that it reduces its acceptability to end-users. One key to reducing false-positive alarms is to \textit{infer}\footnote[1]{In this paper, \textit{inferring} means that deducing drivers' braking actions using the model learned from their historical data.} and accurately predict drivers' braking actions and decide correctly whether to deliver a warning to the drivers. As shown in Fig. \ref{figure1}, the FCW system that can correctly judge ``\textit{Will the driver brake?}'' at the next time step and determine ``\textit{Should I send a warning to the driver?}'' can be more attractive to end-users. If it is inferred that the driver will not brake, the FCW systems should then send a warning to the driver so as to avoid a collision \cite{mccall2007driver}. \subsection{Related Research} Generally, drivers perform braking behavior through two succeeding stages, i.e., decision-making and decision execution. The decision-making stage is reflected by the question ``\textit{Will the driver brake?}'' and the execution stage is reflected by the question ``\textit{What kind of brake style will the driver prefer?}''. In this research, we focus on the first stage, which is the preconditioned to execute the decision and can be found in many existing literatures. For example, Tran \textit{et al}. \cite{tran2012modeling} predicted driver foot behavior under Stop-\&-Go conditions based on the camera data using a hidden Markov model (HMM). The driver foot behavior was decomposed into seven states to characterize the behavior of engaging the acceleration/brake pedal. The predicted driver's foot behavior was used to reduce the possibility of annoying alarm in collision warning systems\cite{sakabe2002development}, but the data used for training HMM should first be labeled, which was labor-intensive, and the vision-based data of the foot gesture depends heavily upon the light on the foot, i.e., requires flashlight illumination\cite{tran2012modeling}. Besides, the methods based on the foot gesture data can not directly reflect how the driver makes decisions to brake when perceiving the current driving situation, as shown in Fig. \ref{Comp_methods}(a). Pugeault and Bowden \cite{pugeault2015much} predicted driver braking behavior using a statistical learning approach with vision-based data and reached an accuracy of 80\%. McCall and Trivedi \cite{mccall2006human,mccall2007driver} applied a Bayesian network (BN) framework to predict the need for drivers' braking actions using in-vehicle data and surroundings information in seven dimensions, including steering angle, wheel speed, longitudinal/lateral acceleration, yaw rate, brake pedal pressure, and acceleration pedal position. The limitation of using the BN method, however, is that the probability between that of the driver not intending to begin braking and that of the need to brake is not always conditionally independent. Furthermore, the BN method is computationally expensive, particularly for high-dimensional data. \begin{figure}[t] \centering \subfloat[Methods based on foot gesture/movement data.]{\includegraphics[width = 0.48\textwidth]{Figures/FootBased}}\\ \subfloat[Methods based on perception-decision-action (PDA) data.]{\includegraphics[width = 0.48\textwidth]{Figures/EnvirBased}} \caption{Comparisons between (a) the foot gesture/movement-based methods and (b) the main idea of our developed method.} \label{Comp_methods} \end{figure} In addition to using the vehicle-depended data and the camera data, physiological signals could also provide hints of braking behavior. For example, researchers in \cite{khaliliardali2015action,haufe2014electrophysiology} utilized anticipation-related electroencephalogram (EEG) signals to predict the driver braking behavior in a driving simulator (with performance 0.83$ \pm $0.13) and real-world driving. In \cite{abbink2011measuring}, Abbink \textit{et al}. used haptic feedback to inform and infer drivers' braking actions to support car following by measuring neuromuscular control dynamics of legs with electromyogram (EMG) sensors. When drivers tend to brake, the measures from their foot and/or brains can indirectly reflect their intents, but could lead to a lag between prediction results and the their braking actions because of stimulus delay. The EEG/EMG data could reflect driver's decision-making in braking, but in a real driving case, human drivers would not like to wear the EEG or EMG signal collection equipment when driving, which strongly limits their applications to real vehicles. Differing from research directly using maneuver and physiological signals, Mulder \textit{et al}. \cite{mulder2010active} predicted the driver's action of hitting/releasing the gas pedal by analyzing the parameters of a linear control-theoretic driver-vehicle model based on a Monte Carlo approach. The prediction results were then applied to develop a haptic gas pedal feedback system. However, the linear control-theoretic driver-vehicle model may be inadequate and inappropriate to describe nonlinear, stochastic, dynamic processes\cite{nechyba1998stochastic} like the decision-making process of human drivers. Based on the aforementioned discussions, it can be known that directly utilizing the camera-related signals or EEG/EMG signals to predict drivers' braking action without considering the fact that human driver behavior is dynamically changing could impede the in-depth applications to the FCW systems. \subsection{Contributions} Inspired by the fact that human reasoning and decision-making involve probabilistic inferential processes (e.g., Markov processes)\cite{donoso2014foundations}, we introduce a GMM-HMM approach, which combines a Gaussian mixture model (GMM) and an HMM, to \textit{learn}\footnote[2]{In this paper, \textit{learning} means that acquiring knowledge of the dynamic and stochastic process of how drivers take braking actions.} and \textit{infer} drivers' braking actions from the perception-decision-action perspective, as shown in Fig. \ref{Comp_methods}(b). Compared with other methods (e.g., BN and fuzzy logic), the GMM-HMM method has the following advantages: \begin{itemize} \item It requires fewer parameters to be estimated and the model parameter can be learned in an off-line phase. \item It requires less or no effort to label data. All the data are formulated by a joint probability density function. \item Many on-the-shelf estimation techniques (e.g., expectation maximization (EM) algorithm) can be directly used in this model, which makes it be easy for applications. \item A joint probability density function directly describes the relationships between variables, rather than assuming the conditional independence between ``brake'' and ``no brake'' as in \cite{mccall2006human,mccall2007driver}. \end{itemize} Using the GMM-HMM method that can capture the underlying stochastic and dynamic characteristics of driver behaviors, we aim to infer drivers' braking actions in car-following scenarios. This work presents the following contributions: \begin{enumerate} \item Unlike other research in \cite{tran2012modeling,pugeault2015much,mccall2006human,mccall2007driver,haufe2014electrophysiology}, drivers' braking action is inferred using the states derived from the ego vehicle and the preceding vehicle (Fig. \ref{Comp_methods}(b)), rather than using the EEG/EMG data or the video/camera information of drivers' foot gestures and movements. \item Differing from existing research, a framework is proposed from the perception-decision-action \cite{windridge2013characterizing} perspective for modeling, learning, and inferring drivers' braking actions based on the GMM-HMM method. \end{enumerate} Instead of investigating a driver's braking style, this paper mainly focuses on inferring the driver's intent to brake (Fig. \ref{figure1}), which is essential to generating a binary warning decision. The styles of hitting the gas/brake pedal (e.g., aggressive or gentle) are not discussed in this research. For more information about analyzing driving styles, readers are referred to \cite{xu2015establishing,mulder2011design,wang2017driving}. \subsection{Paper Organization} The remainder of this paper is organized as follows. Section II formulates the problem to be solved. Section III presents the GMM-HMM method for learning and inferring drivers' braking actions. Section IV describes the experiment and data collection. Section V provides the results and analysis. Section VI discusses conclusions and suggests future works. \begin{figure}[t] \centering \includegraphics[width = \linewidth]{Figures/figure2} \caption{Car-following scenarios on a two-lane road.} \label{figure2} \end{figure} \section{Problem Formulation} In this section, before introducing the GMM-HMM method, we first define the car-following scenario and discuss the braking behavior model we aim to build. \subsection{Car-Following Scenarios} Two vehicles (i.e., ``ego vehicle'' and ``preceding vehicle'') are involved in the car-following scenario, as shown in Fig. \ref{figure2}. The car-following scenario is defined using the following criteria: \begin{itemize} \item We mainly infer the driver's braking action of the ego vehicle. \item The preceding vehicle is the vehicle located ahead in the same lane as the ego vehicle. The surrounding vehicles that are in the different lane as the ego vehicle are not considered. \item The relative distance, $ L $, between the ego vehicle and the preceding vehicle is less than $ 120 $ m. If $ L \geq 120$ m, the ego vehicle is in a free-following case \cite{higgs2015segmentation}. \item The ego vehicle is driving on roads with a small curvature, $ \rho \leq 10^{-3} \ \mathrm{m}^{-1} $. The car-following behavior on road with a big curvature is not considered. Curvature is limited to avoid the case where the roadway or the preceding vehicle in front of the ego vehicle is out of radar detecting range. \end{itemize} Only longitudinal control is involved, consisting of braking and accelerating behaviors. Steering behaviors during car following are not included in this work. Interested readers can refer to \cite{guononlinear} for lateral and longitudinal control research on collision avoidance. \subsection{Braking Behavior Model} As discussed in the foregoing section, we aim to describe a driver's braking behavior from the perception-decision-action \cite{windridge2013characterizing} perspective. Drivers normally make braking decisions and then conduct braking actions according to their internal model and perceptions of the \textit{driving situations} they are in. Drivers are more likely to be subject to a variety of decision-making rules because of variances in individuals' experiences and dynamic driving situations. For instance, some drivers prefer to follow the lead vehicle closely, while others prefer a greater headway. Since our goal is to predict the driver's braking actions based on information of driving situations, we will develop a model that can generate sequences which are as close as possible to what the driver would have done in the same situations, thus being able to infer this person's braking action. In what follows, the driving situations and input/output of the developed model are detailed. \subsubsection{Explanatory Variables} In this research, \textit{driving situation} is modeled by the states from which the driver of the ego vehicle can extract information, make decisions, and execute actions. The states are derived from the ego vehicle and the preceding vehicle. Thus, the \textit{driving situation} can be described using the following variables: \begin{itemize} \item {\it Time to collision} (TTC): TTC has been widely accepted as the basic criterion for designing various types of FCW systems and car-following models \cite{wang2016development, wang2016forward, takada2014effectiveness,milanes2012fuzzy}. The basic TTC is defined as the time it would take the cars to collide at their present speed. There are many extended versions of TTC, such as Honda's TTC algorithm \cite{fujita1995radar}, which takes an additional safety margin into consideration. More extended TTC-algorithms are described in \cite{wang2016development}. In order to make computation easier, in this work, the basic TTC at time $ t $ is obtained by: \begin{equation}\label{eq1} TTC_{t} = \frac{L_{t}}{v^{E}_{t}} \end{equation} where $ v^{E}_{t} $ is the speed of the ego vehicle and $ L_{t} $ is the relative distance between the ego and preceding vehicles at time $ t $. \item {\it Relative speed} ($ \Delta v $): Even though drivers have a relatively limited ability to perceive the absolute value of longitudinal distance or acceleration, they are good at estimating relative kinematics such as changes in relative spacing or relative speed \cite{gray1998accuracy,pariota2015linear,warren1995self}. Therefore, the relative speed between the ego vehicle and the preceding vehicle is used as a feature to describe a driver's decision to brake. It can be computed by $ \Delta v = v^{P} - v^{E} $, where $ v^{P} $ is the speed of the preceding vehicle. \item {\it Relative distance} ($ L $): Taieb-Maimon and Shinar \cite{taieb2001minimum} found that drivers have the ability to adjust the relative distance $ L $ by hitting brake or acceleration pedal to keep themselves at what they felt to be a `comfort' distance when following a lead car. Some drivers, for example, tend to keep a large relative distance, but some drivers do not. \item {\it Speed of the ego vehicle} ($ v^{E} $): The speed of the ego vehicle will also influence drivers' braking decision \cite{boer1999car}. Differences in psychological and physiological perceptions among drivers result in various decisions of keeping the vehicle speed at their own `comfort' level\cite{richard2012motivations}. The longitudinal speed is directly controlled by the driver's braking or accelerating actions. \end{itemize} In the car-following scenario, therefore, we used four variables, including $ TTC $, $ \Delta v $, $ L $, and $ v^{E} $, to describe the driving situation perceived by the driver of the ego vehicle. \subsubsection{Inferring Braking Action} Given a specific driving situation, we will infer drivers' braking action $ Br_t $ from the learned model. Note that we focus primarily on inferring if the driver will brake, thus $ Br_{t}$ can be described by a binary variable $ Br_{t} \in \{1, 0\} $, with $ 1 $ and $ 0 $ representing `brake' and `no brake', respectively. The model with the aim to infer a driver's braking action at time $ t $ based on historical data ($ Br_{1:t-1} $ and $ \boldsymbol{\xi}_{1:t-1} $) and the current observable states $ \boldsymbol{\xi}_{t} $ can be formulated as \begin{equation}\label{Eq2} f(Br_{t};Br_{1:t-1}, \boldsymbol{\xi}_{1:t}): \boldsymbol{\xi}_{t} \mapsto Br_{t} \end{equation} where $ \boldsymbol{\xi}_{t} = \{ L_{t}, v^{E}_{t}, \Delta v_{t}, TTC_{t} \}^{\top} \in \mathbb{R}^{4 \times 1}$, $ Br_{t} $ is the driver's braking decision at time $ t $, and $ f $ is the model we aim to learn. \section{Methodology} \begin{figure}[t] \centering \includegraphics[width = \linewidth]{Figures/ProposedMethod} \caption{An illustration of the developed GMM-HMM method for inferring drivers' braking actions, where $ m_{t} $ is the hidden mode, $ \boldsymbol{\xi}_{t} $ is the observable state, $ Br_{t} $ is the unobservable state, and $ \boldsymbol{\theta} $ is the emission parameter.} \label{basic_idea} \end{figure} Most of the previous research formulates drivers' car-following behavior using fundamental equations with several physical variables\cite{pariota2015linear,jiang2015some,brackstone1999car}, but it is difficult to estimate the model parameters and describe stochastic and dynamic features of driver behaviors. Fortunately, HMM has shown a powerful ability to model and explain dynamic behavior of human driver \cite{tang2016modeling,tran2012modeling,gadepally2014framework} and thus been widely used. Based on the structure of HMM, we developed a model to describe drivers' braking behavior in car-following scenarios by combining it with GMM, as shown in Fig. \ref{basic_idea}. We selected the GMM to formulate the relationship between the state of driving situation and the braking action while keeping the stochastic feature of braking behavior. Each mixture component of GMM is treated as a hidden mode of the HMM. The GMM is chosen because it has demonstrated its powerful effectiveness in modeling other driving tasks and the stochastic features of driver behavior \cite{butakov2015personalized,lefevre2016learning,angkititrakul2011use,wang2017learning,lefevre2015driver}. The basic concepts of GMM-HMM are discussed in the following sections. \subsection{Gaussian Mixture Model} In order to determine the hidden mode of HMM, we define an augmented vector $ \boldsymbol{\zeta} = [\boldsymbol{\xi}^{\top}, Br]^{\top} \in \mathbb{R}^{5 \times 1}$ to describe the relationships between driving situations and braking actions. The joint probability density function between the driving situation and the braking action is presented in the form of a multivariate Gaussian regression function: \begin{equation}\label{eq3} \begin{split} p(\boldsymbol{\zeta}_{t} ; \boldsymbol{\theta}) = & \sum_{i=1}^{M} \omega_{i}\mathcal{N}_{i}(\boldsymbol{\zeta}_{t}; \theta_{i}) \\ = & \sum_{i=1}^{M} \omega_{i} \frac{1}{(2\pi)^{d/2}|\boldsymbol{\Sigma}_{i}|^{1/2}} \\ & \times \exp\left\lbrace -\frac{1}{2} (\boldsymbol{\zeta}_{t} - \boldsymbol{\mu}_{i})^{\top} (\boldsymbol{\Sigma}_{i})^{-1} (\boldsymbol{\zeta}_{t} - \boldsymbol{\mu}_{i}) \right\rbrace \end{split} \end{equation} with $ \boldsymbol{\theta} =\{\omega_{i}, \theta_{i}\}_{i=1}^{M} $, where $ \mathcal{N}_{i}(\boldsymbol{\zeta}_{t};\theta_{i}) $ is the $ i $-th multivariate Gaussian distribution of dimension $ d $ (Here, $ d = 5 $); $ M \in \mathbb{N}^{+}$ is the number of Gaussian components; $ \theta_{i} = (\boldsymbol{\mu}_{i}, \boldsymbol{\Sigma}_{i})$, $ \boldsymbol{\mu}_{i} $ and $ \boldsymbol{\Sigma}_{i} $ are the mean and covariance of the $ i $-th Gaussian component; $ \omega_{i} $ is the weight of the $ i $-th mixture component and $ \sum_{i=1}^{M} \omega_{i}= 1 $. Given a data set for a particular driver, the GMM parameter $ \boldsymbol{\theta} $ can be estimated using the maximization-likelihood (ML) method. We assume that the training data set is $ \mathcal{S}_{Train} =\{ \boldsymbol{\zeta}_{1}, \boldsymbol{\zeta}_{2}, \cdots, \boldsymbol{\zeta}_{t}, \cdots, \boldsymbol{\zeta}_{n} \} $ with time intervals $ t $ denoted by natural numbers, and the goal of the ML method is to find the parameter $ \boldsymbol{\theta} $ that maximizes the likelihood of the GMM function \begin{equation}\label{Eq4} \mathcal{L}(\boldsymbol{\theta}) = \underset{\boldsymbol{\theta}}{\max} \sum_{t=1}^{n}\log (p(\boldsymbol{\zeta}_{t}; \boldsymbol{\theta})). \end{equation} However, the non-linearity of (\ref{Eq4}) with regard to $ \boldsymbol{\theta} $ limits to search the optimal value by directly solving (\ref{Eq4}). Fortunately, the Expectation-Maximum (EM) \cite{xuan2001algorithms} algorithm provides a possible means to get the optimal value of $ \boldsymbol{\theta} $ that maximizes $ \mathcal{L}(\boldsymbol{\theta}) $ with iteration. The EM algorithm can guarantee a monotonic increase for $ \mathcal{L} (\boldsymbol{\theta}) $ at each iterated step with the aim of finding a set of $ \boldsymbol{\theta} $ that maximize (\ref{Eq4}). Assuming $ \widehat{\boldsymbol{\theta}}^{k} $ is the estimation of $ \boldsymbol{\theta} $ at iteration step $ k $, we can update $ \widehat{\boldsymbol{\theta}} $ as follows. For each iteration step, we finish the E-step and M-step by: \begin{itemize} \item (\textbf{E-Step}): The {\it posterior} probability for each component $ i $ is obtained from the previous iteration $ \widehat{\boldsymbol{\theta}}^{k} $: \begin{equation}\label{eq5} \mathrm{P}(\boldsymbol{\zeta}_{t})^{k+1}_{i} = \frac{\widehat{\omega}_{i}^{k} \mathcal{N}_{i}(\boldsymbol{\zeta}_{t}; \widehat{\boldsymbol{\mu}}^{k}_{i}, \widehat{\boldsymbol{\Sigma}}^{k}_{i})}{\sum_{j=1}^{M}\widehat{\omega}_{j}^{k} \mathcal{N}_{j}(\boldsymbol{\zeta}_{t}; \widehat{\boldsymbol{\mu}}^{k}_{j}, \widehat{\boldsymbol{\Sigma}}^{k}_{j})}. \end{equation} \item (\textbf{M-Step}): Then, update the model parameter $ \widehat{\boldsymbol{\theta}} $ at step $ k+1 $ by \begin{equation}\label{eq6} \widehat{\omega}^{k+1}_{i} = \frac{1}{n} \sum_{t=1}^{n}\mathrm{P}(\boldsymbol{\zeta}_{t})^{k+1}_{i}, \end{equation} \begin{equation}\label{eq7} \widehat{\boldsymbol{\mu}}^{k+1}_{i} = \frac{\sum_{t=1}^{n}\mathrm{P}(\boldsymbol{\zeta}_{t})^{k+1}_{i} \boldsymbol{\zeta}_{t}}{\sum_{t=1}^{n}\mathrm{P}(\boldsymbol{\zeta}_{t})^{k+1}_{i} }, \end{equation} \begin{equation}\label{eq8} \widehat{\boldsymbol{\Sigma}}^{k+1}_{i} = \frac{\sum_{t=1}^{n} \mathrm{P}(\boldsymbol{\zeta}_{t})^{k+1}_{i} (\boldsymbol{\zeta}_{t} - \widehat{\boldsymbol{\mu}}^{k+1}_{i}) (\boldsymbol{\zeta}_{t} - \widehat{\boldsymbol{\mu}}^{k+1}_{i})^{\top}}{\sum_{t=1}^{n}\mathrm{P}(\boldsymbol{\zeta}_{t})^{k+1}_{i}}. \end{equation} \item Update the value of log-likelihood function $ \mathcal{L}(\widehat{\boldsymbol{\theta}}^{k+1}) $ by \begin{equation}\label{eq9} \mathcal{L}(\widehat{\boldsymbol{\theta}}^{k+1}) = \sum_{t=1}^{n} \log (p(\boldsymbol{\zeta}_{t}; \widehat{\boldsymbol{\theta}}^{k+1})) \end{equation} where $ \widehat{\boldsymbol{\theta}}^{k+1} = (\widehat{\omega}^{k+1}_{i}, \widehat{\boldsymbol{\mu}}^{k+1}_{i}, \widehat{\boldsymbol{\Sigma}}^{k+1}_{i})_{i=1}^{M}$. \end{itemize} Update (\ref{eq5}) -- (\ref{eq9}) until the log-likelihood converges, i.e., $ \mathcal{L}(\widehat{\boldsymbol{\theta}}^{k+1}) - \mathcal{L}(\widehat{\boldsymbol{\theta}}^{k}) < \epsilon $. In this work, we set $ \epsilon = 10^{-10} $. The number $ M $ of Gaussian components is determined using the Bayesian information criterion (BIC) \cite{calinon2010learning}. We can thus get the optimally estimated parameter of GMM, denoted by $ \boldsymbol{\theta}^{\ast} $ \begin{equation}\label{eq10} \boldsymbol{\theta}^{\ast} = \arg \underset{\boldsymbol{\theta}}{\max} \ \sum_{t=1}^{n} \log (p(\boldsymbol{\zeta}; \boldsymbol{\theta})). \end{equation} \subsection{Hidden Markov Model} After learning the GMM parameters, each mixture component of GMM is treated as a hidden mode of HMM, thus obtaining an HMM with $ M $ hidden states. Based on the trained GMM consisting of $ M $ multivariate Gaussians, we obtain a corresponding mode $ m_{t} \in \{ 1,2,\cdots, M \} $ given an observed data $ \boldsymbol{\zeta}_{t} $ at time $ t $, as shown in Fig. \ref{basic_idea}. Our goal is to infer drivers' braking actions from the defined driving situation, so we define the following variables for the HMM: \begin{itemize} \item \textit{Hidden mode}: we define $ \mathcal{M}_{t} \in \{ 1,2,\cdots, M \}$ as the hidden mode at time $ t $, with $ M $ the number of possible hidden modes. \item \textit{Observable state}: $ \mathcal{O}_{t} = \boldsymbol{\xi}_{t} = [L_{t}, v^{E}_{t}, \Delta v_{t}, TTC_{t}]$ is the observable state at time $ t $. \item \textit{Unobservable state}: $ \mathcal{U}_{t} = Br_{t}$ is the hidden state we need to infer from the observable state $ \mathcal{O}_{t} $ at time $ t $. \item \textit{Transfer matrix}: $ \mathcal{T} = \{ T_{i,j} \}_{i,j}^{M} \in \mathbb{R}^{M\times M}$ is the transfer probability matrix. $ T_{i,j} $ is the transfer probability from mode $ i $ to mode $ j $. \item \textit{Emission parameters}: $ \mathcal{E} = \{ \boldsymbol{\mu}_{i}, \boldsymbol{\Sigma}_{i} \}_{i = 1}^{M} $ are the emission parameters from the hidden states to the observable states. \end{itemize} The transfer probability $ T_{i,j} $ can be estimated from the training data set $ \mathcal{S}_{Train} $ (see Appendix A). Thus, the HMM model can be represented by $ \{ \mathcal{M}_{t}, \mathcal{O}_{t}, \mathcal{U}_{t}, \mathcal{T}, \mathcal{E} \} $ based on the learned GMM. In GMM-HMM, the joint distribution between the hidden modes and the states consisting of observable and unobservable states is formulated by \begin{equation} \begin{split} p(\mathcal{M}_{0:t},\mathcal{O}_{1:t},\mathcal{U}_{1:t}) = & p(\mathcal{M}_{0}) \times \\ & \prod_{k=1}^{t}\left[ p(\mathcal{M}_{k}|\mathcal{M}_{k-1}) \cdot p(\mathcal{O}_{k},\mathcal{U}_{k}|\mathcal{M}_{k})\right] \\ = & p(\mathcal{M}_{0}) \prod_{k=1}^{t} \left[ T_{k-1,k}\cdot p(\mathcal{O}_{k},\mathcal{U}_{k}|\mathcal{M}_{k}) \right]. \end{split} \end{equation} The braking action at time $ t $ is inferred from the consecutive values of the driving situation using GMM, i.e., $ \widehat{Br}_{t} $ is obtained as the conditional expectation of $ Br_{t} $ given the sequence $ \boldsymbol{\xi}_{1:t} $\cite{lefevre2016learning}, \begin{equation}\label{eq11} \begin{split} \widehat{Br}_{t} = & E(Br_{t};\boldsymbol{\xi}_{1:t}) \\ = & \sum_{i=1}^{M} \alpha_{i,t} \left( \boldsymbol{\mu}^{Br}_{i} + \boldsymbol{\Sigma}_{i}^{Br,\boldsymbol{\xi} } (\boldsymbol{\Sigma}_{i}^{\boldsymbol{\xi},\boldsymbol{\xi}})^{-1} (\boldsymbol{\xi}_{t} - \boldsymbol{\mu}_{i}^{\boldsymbol{\xi}}) \right) \end{split} \end{equation} where \begin{equation}\label{eq12} \boldsymbol{\mu}_{i} = \begin{bmatrix} \boldsymbol{\mu}_{i}^{\boldsymbol{\xi}} \\ \boldsymbol{\mu}_{i}^{Br} \\ \end{bmatrix} \end{equation} \begin{equation}\label{eq13} \boldsymbol{\Sigma}_{i} = \begin{bmatrix} \boldsymbol{\Sigma}_{i}^{\boldsymbol{\xi}, \boldsymbol{\xi}} & \boldsymbol{\Sigma}_{i}^{\boldsymbol{\xi}, Br}\\ \boldsymbol{\Sigma}_{i}^{Br, \boldsymbol{\xi}} & \boldsymbol{\Sigma}_{i}^{Br, Br}\\ \end{bmatrix}, \end{equation} and $ \alpha_{i,t} $ is the HMM forward variable, calculated by \begin{equation}\label{eq14} \alpha_{i,t} = \frac{\left( \sum_{j=1}^{M} \alpha_{j,t-1}T_{j,i} \right) \mathcal{N}_{i}(\boldsymbol{\xi}_{t}; \boldsymbol{\mu}_{i}^{\boldsymbol{\xi}},\boldsymbol{\Sigma}_{i}^{\boldsymbol{\xi},\boldsymbol{\xi} })}{\sum_{k=1}^{M} \left[ \left( \sum_{j=1}^{M} \alpha_{j,t-1}T_{j,k} \right) \mathcal{N}_{k}(\boldsymbol{\xi}_{t}; \boldsymbol{\mu}_{k}^{\boldsymbol{\xi}},\boldsymbol{\Sigma}_{k}^{\boldsymbol{\xi},\boldsymbol{\xi} }) \right] }. \end{equation} The initial value with $ t=1 $ is given by \begin{equation*} \alpha_{i,1} = \frac{\omega_{i}\mathcal{N}_{i}(\boldsymbol{\xi}_{1}; \boldsymbol{\mu}_{i}, \boldsymbol{\Sigma}_{i}^{\boldsymbol{\xi},\boldsymbol{\xi}})}{\sum_{k=1}^{M}\omega_{k}\mathcal{N}_{k}(\boldsymbol{\xi}_{1}; \boldsymbol{\mu}_{k}, \boldsymbol{\Sigma}_{k}^{\boldsymbol{\xi},\boldsymbol{\xi}})}. \end{equation*} Based on the above steps, drivers' braking actions $ Br_{t} $ at time $ t $ can be inferred from historic samples $ \boldsymbol{\zeta}_{1:t-1} $ and its present driving conditions $ \boldsymbol{\xi}_{t} $ (i.e., observable states, $ \mathcal{O}_{t} $). \begin{figure}[t] \centering \includegraphics[width = \linewidth]{Figures/Equipment} \caption{One of the experimental vehicles with data-collection equipment. (a) An experimental vehicle; (b) Mobileye; (c) Data acquisition systems.} \label{exps} \end{figure} \begin{figure*}[t] \centering \includegraphics[width = 0.85\textwidth]{Figures/BrakePorp1} \caption{The proportion of braking behaviors in the entire driving data and the number of car-following events for different drivers.} \label{BrakeProp} \end{figure*} \section{Experiment and Data Collection} We used naturalistic driving data collected from the University of Michigan Safety Pilot Model Deployment (SPMD) program \cite{bezzina2014safety}. It recorded the naturalistic driving of 2,842 equipped vehicles in Ann Arbor, Michigan, for over three years. As of April 2016, 34.9 million miles of driving data were logged, making the SPMD database one of the largest public N-FOT ones ever. In the SPMD database, 98 sedans were equipped with data acquisition systems (DASs) and MobilEye (Fig. \ref{exps}). The vehicle was pre-equipped from the factory with sensors to measure the speed, lane marks, relative speed and distance between the ego vehicle and the preceding vehicle, and road curvature. The data of relative speed, relative range, and road curvature were collected from the MobileEye. The ego vehicle speed, brake pedal position, and throttle opening were recorded from the CAN-bus of each vehicle. \subsection{Driver Participants and Data Record} In this work, 56 drivers were included. They all hold a valid driving license. Each driver performed casual daily trips without any restrictions or requirements on their trips. The drivers were not restricted to a particular route and were given no restrictions, including the duration of routes. While driving, the on-board PC recorded driving data at a frequency of 10 Hz. The DASs were not shown to the drivers and the process of recording data were hidden from the drivers, guaranteeing that the drivers were not disturbed by the DASs and that the recorded data were naturalistic. While driving, many kinds of driving behaviors, such as lane changing, overtaking, and car-following, were recorded. \subsection{Data Extraction} In order to extract the car-following data from the database, we defined the car-following {\it event} as follows: \begin{itemize} \item The relative distance $ L $ between the ego vehicle and preceding vehicle should be less than 120 m \cite{higgs2015segmentation}. If the relative distance was $ L >120 $ m, then we ended the event. \item The ego vehicle and the preceding vehicle should be in the same lane. If the left or right turn light was on, which indicates the driver would make a lane change or overtaking behavior, then the event was ended. \item If one other vehicle was merging between the ego vehicle and the preceding vehicle, the car-following event was ended. \item When vehicle speed was less than 5 m/s (i.e., 18 km/h), the event ended. In addition, if the relative range was less than 10 m, the event ended, ensuring that no Stop-\&-Go case was included. \item The duration for a singular car-following event should be larger than 50 s. \item Any driver with less than 500 car-following events was eliminated, which was able to guarantee the collected data were enough to capture the underlying driving styles\cite{wang2017much}. \end{itemize} Based on the above criteria, 49 drivers were selected out from 56 drivers. The number of car-following events for each driver was about 1,480 and each \textit{event} lasted about 86.93 seconds on average. The extracted data consisted of the variables as follows: \begin{enumerate} \item Vehicle speed, $ v^{E} \in [5, 45] $ [m/s]; \item Relative speed, $ \Delta v $; \item Relative range, $ L \in[10, 120] $ [m]; \item Time to collision, $ TTC $, calculated from (1) \item Throttle opening, $ Th \in [0,100] $; \item Braking action, $ Br = 1\ \mathrm{or} \ 0 $. \end{enumerate} The braking actions $ Br $ were recorded with the rules: $ Br = 1$ when the driver put his/her foot on the brake pedal; otherwise $ Br = 0 $ when the driver removed his/her foot from the brake pedal. \subsection{General Data Analysis} Overall, we collected 72,166 car-following events from the 49 drivers. Fig. \ref{BrakeProp} shows the number of car-following events and the percentage of data with braking actions in all events of each driver. We found that the percentage of those pushing the brake pedal during the car-following task was about 4.5\% on average, as shown by the green dashed line in Fig. \ref{BrakeProp}. Some drivers tended to prefer frequent braking actions, (e.g., driver \#42 with 12.27\% braking actions); others tended to brake less often (e.g., driver \#8 with 1.43\% braking actions). When we preprocessed data, the driver's {\it movement time} -- the time to lift the foot off the accelerator pedal, move it laterally to the brake pedal, or vice versa -- was not considered because the performance time was very small (about 0.15 -- 0.30 seconds \cite{davies1969preliminary}), compared to the total driving time and the time of keeping their foot on the brake pedal. We also found that drivers would not always put their foot on the brake pedal and gas pedal, but the duration was very small, compared to the total car-following time (with a percentage of about $ 1.873\times10^{-4} $ in our experiments). For each driver, in total, we obtained 95.6 minutes of driving data on average with keeping their foot on the brake pedal. \begin{figure}[t] \centering \includegraphics[width = \linewidth]{Figures/BIC1} \caption{An example of test results of BIC with different numbers of GMM components for driver \#4, with total 2,233 events.} \label{BIC} \end{figure} \subsection{Methods for Comparison} In this paper, the driver participants' braking actions were recorded as a binary variable. Therefore, the task of inferring whether the driver will brake when following a preceding car can be interpreted as a supervised classification problem, thus providing an opportunity for ones to utilize the standard methods capable of dealing with the binary classification. The support vector machine (SVM) and its extensions have shown advantages in recognizing driver intents \cite{kumar2013learning} and driving styles\cite{wang2017driving,wang2016rapid}. Therefore, we selected two SVM-based approaches to make comparisons, one was the basic SVM method \cite{kumar2013learning} and the other one was the SVM-BF method\cite{aoude2012driver} that combines SVM and Bayesian filtering. \subsubsection{SVM} Given a binary labeled training data $ \{ \boldsymbol{\xi}_{i}, Br_{i} \} $, where $ Br_{i} $ is the label specified with 1 or 0 of the observation $ \boldsymbol{\xi}_{i} $, a new test data $ \boldsymbol{\xi} $ is classified into one class ($ Br = 1 $) or the other ($ Br = 0 $) based on a trained SVM classifier. Based on outputs of SVM, the drivers' braking actions can thus be directly inferred. \subsubsection{SVM-BF} In the SVM-BF method\cite{aoude2012driver}, the output of the SVM block is then fed into a Bayesian filtering (BF) block, which provides an additional logic before making a final classification. The BF component transfers the output of the SVM block into a probability that the driver takes a braking action with present driving conditions $ \boldsymbol{\xi} $, i.e., $ p(Br = 1|\boldsymbol{\xi}) \in [0,1] $. Based on $ p(Br = 1|\boldsymbol{\xi}) $, the SVM-BF algorithm then computes the the final classification with the threshold specified value $ \gamma_{Br} \in [0,1] $. The driver is inferred to take a braking action if $ p(Br = 1|\boldsymbol{\xi}) > \gamma_{Br} $; otherwise it is treated as no brake. In this paper, we preset the threshold to $ \gamma_{Br} = 0.9 $. We developed the SVM and SVM-BF models based on the classification function \texttt{svm.SVC} in \texttt{scikit-learning} tools (\url{http://scikit-learn.org/stable/}) to train and test these models. Labeled datasets used to infer whether the driver will brake are not linearly separable cases because of the inherent uncertainty and nonlinearity of driver behaviors. Therefore, a nonlinear kernel, a Gaussian kernel, was selected for both of SVM and SVM-BF according to \cite{ben2010user,aoude2012driver} in this work. In order to avoid the overfitting issues, a Cross-Validation approach was also used and detailed as follows. \subsection{Training and Test Procedures} \subsubsection{BIC} The number of GMM components $ M $ was determined according to the BIC\cite{calinon2010learning}. However, the amount of driving data is various among drivers (Fig. \ref{BrakeProp}) and thus influences the BIC values. For example, a smaller amount of driving data tends to obtain a smaller optimal value of $ M $, e.g., 621 car-following events result in $ M = 9 $; on the other hand, a larger amount of driving data tends to obtain a larger optimal value of $ M $, e.g., 3,307 car-following events result in $ M = 13 $. Fig. \ref{BIC} shows an example of driving data with 2,223 car-following events, in which the BIC reaches the \textit{elbow point} when $ M = 10 $. In order to make a trade-off between the cost of computing time and the accuracy of the learned model, we selected $ M = 10 $ because a smaller value of $ M $ would reduce the fitting accuracy of the model while a larger value of $ M $ would increase the computation cost without a significant improvement in accuracy. \subsubsection{Cross-Validation} The $ \kappa $-fold \textit{Cross-Validation} (CV) method \cite{godino2006dimensionality} was used to avoid over-fitting issues and assess the model performance. For SVM and SVM-BF, the Gaussian kernel width in the \texttt{svm.SVC} was determined by parameters $ C $ and $ \gamma $, and we finally set $ C = 1.0 $ and $ \gamma = 0.01 $ according to the CV results. To do CV, for each driver, the driving data set was evenly divided into $ \kappa $ subsets, also called {\it folds}. We utilized $ \kappa -1$ folds to learn the model parameter and the left-out fold was used to assess the prediction performance, which is called {\it leave-one-out cross-validation} (LOO-CV). In this work, we selected $ \kappa=10 $. The CV method ensures that data used for learning the model parameters is disjoint from the data used for assessment. \subsubsection{Training and Test Procedure} For a single participant, one of ten folds was used to test, and the remaining folds were used to train, thus cyclically obtaining 10 different test results. The model performance was recorded and assessed using the average value of the 10 CV results. While training the GMM, the initial value of the GMM (i.e., the initial center of the GMM component) was determined by directly using a $ K $-means clustering method, where $ K $ was equal to the number of GMM components (i.e., $ K=M=10 $). We operated the $ K $-means clustering method for five times on the training data and selected one of the clustering results as an initial value that could maximize the likelihood function (4). \section{Experimental Results and Analysis} \subsection{Performance Metrics} In this work, our goal is to answer the question ``\textit{Will the driver brake when following a preceding car?}'', which means that the performance evaluation can be achieved using assessment approaches for binary classifications. The best performance is that the developed method can {\it correctly} infer drivers' braking/no braking actions and also can obtain a higher degree of {\it accuracy}. To better understand the meaning of {\it accuracy}, we define the following concepts based on a statistical method in \cite{altman1994diagnostic}, as shown in Table \ref{Table_ind}: \begin{itemize} \item \textit{True Positive} (TP): A TP test result is one in which inferring a braking action will occur when the driver brakes. \item \textit{True Negative} (TN): A TN test result is one in which inferring a braking action will not occur when the driver does not brake. \item \textit{False Positive} (FP): A FP test result is one in which inferring a braking action will occur but the driver does not brake. \item \textit{False Negative} (FN): A FN test result is one in which inferring a braking action will not occur when the driver brakes. \end{itemize} Obviously, we tend to prefer the results with a larger proportion of TP and TN. More specifically, we define {\it accuracy}, {\it sensitivity}, and {\it specificity} as follows: \begin{table}[t] \centering \caption{Basic Concepts of Statistical Measures.} \label{Table_ind} \begin{tabular}{c|c|c|c} \hline \hline \multicolumn{2}{l|}{} & \multicolumn{2}{c}{Inferring} \\ \hline \multirow{3}{*}{\rotatebox[origin=c]{90}{Real}} & \multicolumn{1}{l|}{} & Brake & No Brake \\ \cline{2-4} & Positive & TP & FN \\ \cline{2-4} & Negative & FP & TN \\ \hline \hline \end{tabular} \end{table} \subsubsection{Accuracy} Accuracy is the commonly used measure for assessing the classification performance. In this paper, the problem of inferring whether the driver will bake was treated as a classifier problem as aforementioned. Therefore, the accuracy can be computed by \begin{equation}\label{eq15} \eta_{\mathrm{acc}} = \frac{N_{TP} + N_{TN}}{N_{TP} + N_{FP} + N_{FN} + N_{TN}} \end{equation} where $ N_{(\ast)}$ is the number of $ (\ast) $ appearing, with $ (\ast) \in \{ TN, TP, FP, FN \} $. The accuracy metric $ \eta_{\mathrm{acc}} $ can show the comprehensive performance, with a higher value of accuracy indicating good performance. \subsubsection{Sensitivity} Sensitivity represents the ability to correctly infer drivers' braking actions. The sensitivity is calculated by \begin{equation}\label{eq16} \eta_{\mathrm{sen}} = \frac{N_{TP}}{N_{TP} + N_{FN}}. \end{equation} A larger value of $ \eta_{sen} $ indicates that the method is more possible for correctly inferring drivers' braking actions. \subsubsection{Specificity} Specificity is related to the ability to correctly infer that the driver does not brake. The specificity is computed by \begin{equation}\label{eq17} \eta_{\mathrm{spe}} = \frac{N_{TN}}{N_{TN} + N_{FP}}. \end{equation} Note that a larger value of $ \eta_{\mathrm{spe}} $ means that the method has a greater ability to infer the driver's `no' braking action. \begin{figure}[t] \centering \subfloat[]{\includegraphics[width = \linewidth]{Figures/Main_figure}}\\ \subfloat[]{\includegraphics[width = \linewidth]{Figures/sub2}}\\ \subfloat[]{\includegraphics[width = \linewidth]{Figures/sub3}} \caption{Example of the inferred results using the GMM-HMM method for driver \#4 during $ 2\times 10^{4} $ seconds, including about 233 events, with $ Br^{\mathrm{c}} = 0.9 $, $ \eta_{\mathrm{acc}} = 93.87\% $, $ \eta_{\mathrm{sen}} = 83.76\%$, and $ \eta_{\mathrm{spe}} = 98.27\% $. (a) One of the test results for driver \#4; (b) an unreliable inferred result; and (c) a good inferred result with local data.} \label{Example_res} \end{figure} Based on the above-mentioned definitions, we assess the performance of GMM-HMM using the three metrics, consisting of accuracy, $ \eta_{\mathrm{acc}} $, sensitivity, $ \eta_{\mathrm{sen}} $, and specificity, $ \eta_{\mathrm{spe}} $. \subsection{Results Decoding} To compute the performance metrics (\ref{eq15}) -- (\ref{eq17}), we decode the outputs of GMM-HMM by following rules: \begin{table}[t] \centering \caption{Performance Metrics (Mean (\%) $ \pm $ Standard Deviation) of Ten Cross-Validation Results Regarding $ \eta_{\mathrm{acc}} $, $ \eta_{\mathrm{sen}} $ and $ \eta_{\mathrm{spe}} $ for All Drivers Using the GMM-HMM Method with $ Br^{\mathrm{c}} = 0.9$ } \label{Table_res} \begin{tabular}{c|c|c|c} \hline \hline Driver & $ \eta_{\mathrm{acc}} $ & $ \eta_{\mathrm{sen}} $ & $ \eta_{\mathrm{spe}} $ \\ \hline 1 & $ 95.90 \pm 0.0125 $ & $ 86.48 \pm 0.0515 $ & $ 97.31 \pm 0.0078 $\\ 2 & $ 90.61 \pm 0.0192 $ & $ 87.90 \pm 0.0445 $ & $ 97.23 \pm 0.0059 $ \\ 3 & $ 93.62 \pm 0.0172$ & $ 93.99 \pm 0.0617 $ & $ 98.12 \pm 0.0162 $\\ 4 & $ 91.49 \pm 0.0191 $ & $ 89.30 \pm 0.0424 $ & $ 97.28 \pm 0.0068 $\\ 5 & $ 94.72 \pm 0.0107 $ & $ 81.02 \pm 0.0734 $ & $ 98.86 \pm 0.0057 $ \\ 6 & $ 93.80 \pm 0.0232 $ & $ 88.88 \pm 0.0633 $ & $ 98.14 \pm 0.0054 $ \\ 7 & $ 86.56 \pm 0.1031 $ & $ 84.85 \pm 0.0807 $ & $ 97.12 \pm 0.0077 $ \\ 8 & $ 89.62 \pm 0.0214 $ & $ 78.41 \pm 0.0206 $ & \colorbox{red}{$ 99.54 \pm 0.0021 $} \\ 9 & $ 91.94 \pm 0.0216 $ & \colorbox{red}{$ 95.41 \pm 0.0341 $} & $ 96.53\pm 0.0095 $\\ 10 & $ 93.61 \pm 0.0124 $ & $ 90.08 \pm 0.0736 $ & $ 98.52 \pm 0.0054 $\\ 11 & $ 89.74\pm 0.0201 $ & $ 91.95 \pm 0.0461 $ & $ 96.98 \pm 0.0072 $\\ 12 & $ 91.55 \pm 0.0261 $ & $ 88.19 \pm 0.0793 $ & $ 98.31 \pm 0.0080 $\\ 13 & $ 89.69 \pm 0.0280 $ & $ 78.26 \pm 0.0495 $ & $ 98.86 \pm 0.0038 $\\ 14 & $ 95.46 \pm 0.0176 $ & $ 84.72 \pm 0.0733 $ & $ 98.90 \pm 0.0049 $\\ 15 & $ 94.57 \pm 0.0149 $ & $ 94.44 \pm 0.0444 $ & $ 94.40 \pm 0.0138 $\\ 16 & $ 93.96 \pm 0.0094 $ & $ 73.70 \pm 0.0508$ & $ 97.63 \pm 0.0057 $\\ 17 & $ 93.78 \pm 0.0505 $ & $ 89.82 \pm 0.0234 $ & $ 97.89 \pm 0.0042$\\ 18 & $ 93.27 \pm 0.0553 $ & $ 89.38 \pm 0.0984 $ & $ 99.22 \pm 0.0038 $\\ 19 & $ 93.31 \pm 0.0134 $ & $ 85.93 \pm 0.1259 $ & $ 96.48 \pm 0.0121 $\\ 20 & $ 73.10 \pm 0.0383 $ & $ 75.68 \pm 0.0585 $ & $ 94.83 \pm 0.0245 $\\ 21 & $ 94.62 \pm 0.0085 $ & $ 88.94 \pm 0.0496 $ & $ 96.69 \pm 0.0041 $\\ 22 & $ 94.50 \pm 0.0336 $ & $ 91.29 \pm 0.0594 $ & $ 99.06 \pm 0.0077 $\\ 23 & $ 82.50 \pm 0.0393 $ & $ 81.92 \pm 0.0297 $ & $ 97.89 \pm 0.0066 $\\ 24 & $ 76.98 \pm 0.0398 $ & $ 87.91 \pm 0.0229 $ & $ 96.41 \pm 0.0091 $\\ 25 & $ 86.86 \pm 0.0330 $ & $ 83.90 \pm 0.0516 $ & $ 98.08 \pm 0.0016 $\\ 26 & $ 80.97 \pm 0.0549 $ & \colorbox{green}{$ 64.20 \pm 0.0280 $} & $ 97.83 \pm 0.0073 $\\ 27 & $ 87.70 \pm 0.0293 $ & $ 83.63 \pm 0.0528 $ & $ 95.09 \pm 0.0101 $\\ 28 & $ 86.65 \pm 0.0293 $ & $ 74.59 \pm 0.0522 $ & $ 98.27 \pm 0.0072 $\\ 29 & $ 78.24 \pm 0.0217 $ & $ 77.06 \pm 0.0418 $ & $ 96.02 \pm 0.0096 $\\ 30 & $ 85.41 \pm 0.0447 $ & $ 84.62 \pm 0.0402 $ & $ 98.15 \pm 0.0082 $\\ 31 & $ 91.34 \pm 0.0212 $ & $ 75.03 \pm 0.0745 $ & $ 96.12 \pm 0.0165$\\ 32 & $ 91.09 \pm 0.0222 $ & $ 89.85 \pm 0.0778 $ & $ 96.72 \pm 0.0088 $\\ 33 & $ 92.29 \pm 0.0237 $ & $ 80.02 \pm 0.0630 $ & $ 96.13 \pm 0.0112 $\\ 34 & $ 89.66 \pm 0.0414 $ & $ 77.84 \pm 0.0780 $ & $ 98.30 \pm 0.0104 $\\ 35 & $ 92.34 \pm 0.0545 $ & $ 78.19 \pm 0.0566 $ & $ 98.07 \pm 0.0070 $\\ 36 & $ 86.41 \pm 0.0395 $ & $ 81.87 \pm 0.0191 $ & $ 97.74 \pm 0.0064 $\\ 37 & $ 93.08 \pm 0.0162 $ & $ 85.93 \pm 0.0366 $ & $ 98.03 \pm 0.0031 $\\ 38 & $ 81.88 \pm 0.0343 $ & $ 84.56 \pm 0.0368 $ & $ 98.66 \pm 0.0035 $\\ 39 & $ 91.86 \pm 0.0208 $ & $ 83.74 \pm 0.0596 $ & $ 97.29 \pm 0.0048 $\\ 40 & $ 91.33 \pm 0.0212 $ & $ 91.30 \pm 0.0236 $ & $ 98.82 \pm 0.0040 $\\ 41 & $ 83.05 \pm 0.0694 $ & $ 79.63 \pm 0.0569 $ & $ 97.25 \pm 0.0090$ \\ 42 & \colorbox{green}{$ 70.94 \pm 0.0668 $} & $ 73.62 \pm 0.0285 $ & \colorbox{green}{$ 92.51 \pm 0.0152 $}\\ 43 & \colorbox{red}{$ 96.42 \pm 0.0093 $}& $ 85.22 \pm 0.0759 $ & $ 98.54 \pm 0.0046 $\\ 44 & $ 92.08 \pm 0.0264 $ & $ 87.49 \pm 0.0612 $ & $ 98.88 \pm 0.0043 $\\ 45 & $ 88.86 \pm 0.0204 $ & $ 79.56 \pm 0.0405 $ & $ 95.92 \pm 0.0111 $\\ 46 & $ 89.45 \pm 0.0170 $ & $ 71.50 \pm 0.0497 $ & $ 97.40 \pm 0.0073 $\\ 47 & $ 87.81 \pm 0.0238 $ & $ 77.32 \pm 0.0494 $ & $ 96.81 \pm 0.0063 $\\ 48 & $ 96.36 \pm 0.0118 $ & $ 88.44 \pm 0.0683 $ & $ 97.96 \pm 0.0072 $\\ 49 & $ 90.26 \pm 0.0490 $ & $ 79.96 \pm 0.0581 $ & $ 96.06 \pm 0.0248 $\\ \hline Ave. & $ \boldsymbol{89.41} \pm 0.0584 $ & $ \boldsymbol{83.42} \pm 0.0677 $ & $ \boldsymbol{97.41} \pm 0.0132$\\ \hline \hline \end{tabular} \end{table} \begin{figure}[t] \subfloat[SVM with a Gaussian kernel]{\includegraphics[width = \linewidth]{Figures/SVM}}\\ \subfloat[SVM-BF with $ \gamma_{Br} = 0.9 $]{\includegraphics[width = \linewidth]{Figures/SVMBF}}\\ \subfloat[GMM-HMM with $ Br^{\mathrm{c}} = 0.9 $]{\includegraphics[width = \linewidth]{Figures/GMM_HMM}}\\ \caption{Statistical results of performance metrics using (a) the SVM method, (b) the SVM-BF method, and (c) the GMM-HMM method.} \label{St_results} \end{figure} \begin{itemize} \item If the inferred output from (\ref{eq11}) is lager than a preset critical value $ Br^{\mathrm{c}} $, i.e., $ Br^{\mathrm{c}} \leq \widehat{Br} $, we believe that the driver is braking. In addition, if $ \widehat{Br} > 1.0 $, it is believed that the driver is braking. \item If the inferred output from (\ref{eq11}) is smaller than $ Br^{\mathrm{c}} $, i.e., $ \widehat{Br} \leq Br^{\mathrm{c}} $, we believe that the driver is not braking. \end{itemize} Thus, we can decode the output results by \begin{equation}\label{eq18} \widehat{Br} = \begin{cases} 0, & \mathrm{if} \ \ \widehat{Br} \leq Br^{\mathrm{c}} \\ 1, & \mathrm{otherwise} \\ \end{cases}. \end{equation} Obviously, different critical values of $ Br^{\mathrm{c}} \in (0,1) $ could influence the model performance. We will discuss this in the following Section \textit{C. Result Analysis}. After decoding the experiment results using (\ref{eq18}), we can then compute the numbers of TP, TN, FP, and FN actions occurring in all of the test datasets. Fig. \ref{Example_res} shows an example of the inferred results of one fold test data from driver \#4 using the GMM-HMM method. We can see that, for driver \#4, the GMM-HMM can infer the braking actions with a high level of performance, specifically with an accuracy of 93.87\%, sensitivity of 83.76\%, and specificity of 98.27\%. In addition, Table \ref{Table_res} shows the means and standard deviations of ten cross-validation results regarding the three evaluation metrics for each driver participant. We know that the GMM-HMM method can achieve a remarkable performance, with accuracy of 96.42\% (driver \#43), sensitivity of 95.41\% (driver \#9), and specificity of 99.54\% (driver \#8), as highlighted in red in Table \ref{Table_res}. Note that, for all driver participants, the GMM-HMM method is able to infer their braking actions, with an accuracy of 89.41\%, a sensitivity of 83.42\%, and a specificity of 97.41\% on average. However in some special cases, the performance is slightly lower than the average performance, as highlighted in green in Table \ref{Table_res}. \begin{figure}[t] \centering \includegraphics[width = \linewidth]{Figures/methodcompare} \caption{Comparison results of performance metrics using the SVM, SVM-BF, and GMM-HMM methods with $ Br^{\mathrm{c}} = 0.9$ and $ \gamma_{Br} = 0.9 $.} \label{fig:comparison} \end{figure} \subsection{Results Analysis} \subsubsection{Performance Analysis} Table \ref{Table_res} shows the statistical performance metrics for each driver using the GMM-HMM. In order to show the benefits of GMM-HMM, we compare it with SVM and SVM-BF. Fig. \ref{St_results} shows the distributions of the mean values regarding the three performance metrics of all driver participants with different methods. In order to make comparison flexible, each performance metric (i.e., $ \eta_{\mathrm{acc}} $, $ \eta_{\mathrm{sen}} $, and $ \eta_{\mathrm{spe}} $) is further divided into four intervals for each method. The percentage of performance values in each interval is then computed as the ratio between the number of performance values located in this interval and the total number of driver participants. In each sub-figure of Fig. \ref{St_results}, the horizontal axis is the interval of performance metrics and the vertical axis is the percentage. \begin{itemize} \item {\it Accuracy}: Comparing the left plots of Fig. \ref{St_results}(a)-(c), we can see that the GMM-HMM achieves a higher accuracy falling in the interval of $ [0.90, 0.95) $ with a percentage of 48.99\% than other two methods. More specifically, about half of the driver participants only achieve accuracy falling in $ [0.70, 0.75) $ for SVM and 38.78\% of the driver participants with accuracy falling in $ [0.80, 0.90) $ for SVM-BF. In addition, GMM-HMM obtains the accuracy of higher than 0.95 such as for driver \#1, driver \#14, driver \#43, and driver \#48, as shown in Table \ref{Table_res}. By using GMM-HMM, 34.69\% of drivers are able to obtain the accuracy falling in $ [0.80, 0.90) $ and only 8.16\% of drivers fall in a low accuracy range $ [0.70, 0.80) $. \item {\it Sensitivity}: From Table \ref{Table_res}, we can see that GMM-HMM achieves a slightly lower sensitivity of 83.42\% on average, but it performs a better sensitivity, compared to SVM and SVM-BF, as shown in the middle plots of Fig. \ref{St_results}(a)-(c). More specifically, when using GMM-HMM, more than 50\% and 30\% of the 49 drivers achieve the sensitivity falling in $ [0.80, 0.90) $ and $ [0.70, 0.80) $, respectively. In addition, only 2.04\% of the driver participants achieve the sensitivity of lower than 0.70, compared to more than 90\% of drivers with SVM and about 55 \% of drivers with SVM-BF. \item {\it Specificity}: From the right plots of Fig. \ref{St_results}(a)-(c), we found that the GMM-HMM obtains the highest level of specificity among the three methods. More specifically, 61.22\% of driver participants obtain a specificity falling in $ [0.97,0.99) $ and 26.53\% of all driver participants obtain a specificity of $ [0.95,0.97) $. In addition, Table \ref{Table_res} shows that the specificity is also more like to be greater than 0.99 for some drivers such as driver \#8, driver \#18 and driver \#22. The best value of specificity is 99.54\% (driver \#8) and the worst value of specificity is still over 92\% (driver \#42). However, for the SVM and SVM-BF methods, both of them were not able to achieve such highlight performance. \end{itemize} In order to evaluate the average performance of different methods, Fig. \ref{fig:comparison} presents the statistical results of means and standard deviations regarding the three performance metrics over all drivers. We can see that the GMM-HMM achieves a better performance than the other two methods. Using GMM-HMM improves the performance by 26.37\% in accuracy, 39.06\% in sensitivity, 19.36\% in specificity with respect to those using SVM and by 5.05\% in accuracy, 8.03\% in sensitivity, 4.62\% with respect to those using SVM-BF. \begin{figure}[t] \centering \includegraphics[width = \linewidth]{Figures/Br_critical} \caption{The influences of brake critical value, $ Br^{\mathrm{c}}$, on model performances.} \label{Br_cri} \end{figure} \subsubsection{Results Discussion} From the above-mentioned analysis, we found that all of the three methods performed well in terms of accuracy and specificity on average, but less well in terms of sensitivity, as shown in Fig. \ref{fig:comparison}. A high level of sensitivity indicates that GMM-HMM can correctly infer the case where the driver will brake when following a preceding vehicle, which can be used to design human-friendly FCW systems. For example, when the driver does brake and the inferred outcome is a braking action in the current driving situation, and then comparing the inferred results with the driver's real action can help the FCW systems to determine ``{\it Should I send a forward collision warning to the driver?}". A high specificity value indicates that GMM-HMM can infer that the driver will not take braking actions. The results then are helpful to solve over-warning issues in the FCW systems. For example, if we correctly infer that the driver would not brake in the future situation as that driver usually does, we simply do not need to give a warning to the driver, thus avoiding the over-warning issues. \subsubsection{Influence of the Critical Value ($Br^{\mathrm{c}}$)} Fig. \ref{Br_cri} shows the influences of the critical value on model performances when using GMM-HMM. We can conclude that, with an increasing critical value $ Br^{\mathrm{c}} $, \begin{itemize} \item the accuracy $ \eta_{\mathrm{acc}} $ improves slightly from 80.84\% with $Br^{\mathrm{c}}$ = 0.1 to 89.41\% with $Br^{\mathrm{c}}$ = 0.9; \item the sensitivity $ \eta_{\mathrm{sen}} $ improves significant about 22.30\%; \item the specificity $ \eta_{\mathrm{spe}} $ decreases slightly from 98.93\% with $Br^{\mathrm{c}}$ = 0.1 to 97.41\% with $Br^{\mathrm{c}}$ = 0.9. \end{itemize} In other words, the accuracy and specificity have smaller standard deviations of 0.0123 and 0.0049, respectively, compared to the standard deviation of sensitivity with 0.0402. Therefore, we selected $Br^{\mathrm{c}} = 0.9$ to make a trade-off between three performance metrics and show the results in Fig. \ref{Example_res} - Fig. \ref{fig:comparison} as well as in Table \ref{Table_res}. \section{External Discussion and Future Work} In this paper, the driver's braking action in car-following scenarios was learned and inferred using the developed GMM-HMM method and achieved a high level of accuracy, with 97.41\% on average. Here, we mainly focused on whether the driver will brake when following a preceding car, which was the first step in modeling driver braking behavior. Individuals' driving style of hitting the brake pedal were not included. Potential directions in future work are discussed as follows. \subsection{Influence of Road Curvature} Note that the influence of road profiles with a large road curvature were not included. In general, the road curvature will influence drivers' braking decision and action. Researchers \cite{chandrasiri2016driving} demonstrated that drivers' braking action differs across individuals while approaching and negotiating a road segment with a large curvature, particularly at the beginning \cite{erseus2010driver}. For example, when entering curvy roads, some drivers tend to prefer braking on the straight road segment, far in advance of the curve beginning, to obtain the desired speed; conversely, others may tend to brake hardly at the beginning of the curve. Future work will take larger road curvatures into consideration when inferring the driver's braking action. \subsection{Bounded Characteristics of Variables} Most observed driving data from drivers usually have bounded support features\cite{wang2017evaluation,wang2017development}. For example, in the car-following scenario, the relative range between the ego and leading vehicle is usually larger than a critical value, and also drivers usually prefer certain relative ranges or vehicle speeds, thereby the distributions of the relative range and the vehicle speed will have the bounded supports. In the developed GMM-HMM method, the bounded features of driving data were not considered, which might be one of the factors that cause a large deviation in the metric of specificity. Therefore, we will develop a more robust and flexible Gaussian mixture model to fit all kinds of driving data in future work. \subsection{Applications in Future Works} This paper investigated on whether a driver will brake when following a vehicle. The inferred outcomes of drivers' braking action make the FCW systems acceptable for end-users, as discussed in Section V-\textit{C}. However, other characteristics of driver behavior such as the style of hitting brake pedal (e.g., hard and gentle) and kinematic characteristics \cite{wang2016development} of the ego and preceding vehicles should be included when designing human-friendly FCW systems. \section{Conclusions} This paper has developed a GMM-HMM method for learning and inferring drivers' braking action in car-following scenarios. The driver's braking behavior was formulated from a perception-decision-action perspective and the driving situation was described using four variables: speed of the ego vehicle, relative distance and speed between the ego and preceding vehicle, and time to collision. The braking action was discretized into binary values (i.e., $ 1 $ - brake and $ 0 $ - no brake). The relationships between perceptions and brake actions were modeled using a joint distribution of multi-variable Gaussian regression functions. The GMM-HMM method was validated using naturalistic driving data collected from 49 drivers. A series of comparative experiment were conducted among the SVM, SVM-BF and GMM-HMM methods. The experiment results shown that the GMM-HMM achieves the best performance, with an accuracy of 89.41\%, sensitivity of 83.42\%, and specificity of 97.41\% on average. \appendices \section{} In this Appendix, the calculation of transfer matrix $ \mathcal{T} $ in Section III-{\it B} is presented. Given the training data set with $ n $ data points $ \boldsymbol{\zeta}_{t} $: \begin{equation*} \mathcal{S}_{Train} = \{ \boldsymbol{\zeta}_{1}, \boldsymbol{\zeta}_{2}, \cdots, \boldsymbol{\zeta}_{t}, \cdots, \boldsymbol{\zeta}_{n} \}. \end{equation*} For each data point $ \boldsymbol{\zeta}_{t} $, we assume that $ \boldsymbol{\zeta}_{t} $ is subject to the mode $ \mathcal{M}_{i} \in \{1, 2, \cdots, M\} $ if \begin{equation} \mathcal{M}_{i} = \underset{i \in \{ 1,2, \cdots, M\} }{\max} \ \mathcal{N}_{i}(\boldsymbol{\zeta}_{t}; \boldsymbol{\mu}_{i}, \Sigma_{i}). \end{equation} Therefore, each $ \boldsymbol{\zeta}_{t} $ has a mode $ \mathcal{M}_{t} \in \{ 1, 2, \cdots, M \} $, and we obtain a mode sequence with the same number of training data points \begin{equation}\label{appedix.1} \{\mathcal{M}_{t}\}_{t=1}^{n} \Longleftrightarrow \mathcal{S}_{Train} = \{\boldsymbol{\zeta}_{t}\}_{t=1}^{n}. \end{equation} The transfer probability between mode $ i $ and mode $ j $ can then be estimated by \begin{equation} T_{i,j} = \frac{F_{i,j}}{n_{i}}, \ i, j = 1, 2, \cdots, M \end{equation} where $ F_{i,j} $ is the frequency of transferring from mode $ \mathcal{M}_{i} $ to $ \mathcal{M}_{j} $, and $ n_{i} $ is the total number of training data points in mode $ \mathcal{M}_i $. In this research, $ n$ is larger than $5\times 10^{5} $. Finally, we obtain the transfer matrix \begin{equation} \mathcal{T} = \begin{bmatrix} T_{1,1} & T_{1,2} & \cdots & T_{1,M-1} & T_{1,M} \\ T_{2,1} & T_{2,2} & \cdots & T_{2,M-1} & T_{2,M} \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ T_{M,1} & T_{M,2} & \cdots & T_{M,M-1} & T_{M,M}\\ \end{bmatrix}_{M\times M}. \end{equation} \ifCLASSOPTIONcaptionsoff \newpage \fi \bibliographystyle{IEEEtran}
\section{Introduction} \label{sect:sect_intro} Previous work on status update, e.g. \cite{KaulYatesGruteser-2012Infocom,2012CISS-KaulYatesGruteser,CostaCodreanuEphremides2016, KamKompellaEphremides2013ISIT,NajmNasser-ISIT2016,YatesKaul-2012ISIT}, used an Age of Information (AoI) metric in order to assess the freshness of randomly generated updates sent by one or multiple sources to a monitor through the network. In these papers, updates are assumed to be generated according to a Poisson process and the main metric used to quantify the \emph{age} is the time average age (which we will call average age) given by \begin{equation} \label{eq:eq_age_definition} \Delta = \lim_{\tau\to\infty} \frac{1}{\tau}\int_0^\tau \Delta(t)\mathrm{d}t, \end{equation} where $\Delta(t)$ is the instantaneous age at the receiver of the information about the source status. If the last successfully received update was generated at time $u(t)$ then the \emph{age} of the source status at time $t$ is $\Delta(t)=t-u(t)$. When the system is idle or an update is being transmitted then the instantaneous age increases linearly with time. Once an update generated at time $t_i$ is received by the monitor at $t'_i$, $\Delta(t)$ drops to the value $t'_i-t_i$. This results in the sawtooth sample path seen in Fig.~\ref{fig1}. Moreover, in \cite{CostaCodreanuEphremides2014ISIT} the authors introduce another age metric: the \emph{average peak age} defined as the time average of the maximum value of the instantaneous age $\Delta(t)$ right before the reception by the monitor of a new update. In Fig.~\ref{fig1} the peak age right before the reception of the $j^{th}$ successfully transmitted update is denoted by $K_j$. Hence the average peak age is given by \begin{equation} \label{eq:eq_avg_peak_age_def} \Delta_{peak} = \lim_{N\to\infty}\frac{1}{N}\sum_{j=1}^N K_j. \end{equation} In this paper, we assume that an \lq observer\rq\ (which we will call source), generating updates according to a Poisson process with rate $\lambda$, observes $M$ streams of data. At each generation instant, the source chooses to \lq observe\rq\ stream $i$ and send its observation (update) of this stream with probability $p_i$, $i=1,\dots,M$. This probability distribution is a design parameter that one can control. Moreover, we assume that the system can handle only one update at a time without any buffer to store incoming updates. This means that whenever a new update is generated and the system is busy, the transmitter preempts the packet being served and starts sending the new update instead. Since we consider a general service time distribution for the updates, we denote this transmission scheme by M/G/1/1 preemptive queue. It has been shown that for a single-stream source and exponential update service time, preemption ensures the lowest average age \cite{2012CISS-KaulYatesGruteser}. However, the work in \cite{NajmNasser-ISIT2016} suggests that under the assumption of gamma distributed service time, preemption might not be the best policy. In \cite{NajmYatesSoljaninMG11}, the authors derive a closed form expression for the average age of a single-stream source and M/G/1/1 preemptive queue. As a generalization of the result in \cite{NajmYatesSoljaninMG11}, we derive in this paper a closed form expression for the average age and average peak age per stream of the multi-stream source M/G/1/1 preemptive queue. To that end we use the detour flow graph method which is also used to find an upper bound on the error probability of a Viterbi decoder (see \cite{rimoldi_2016}). A special case of this problem was studied in \cite{YatesKaul-2016arxiv} where the service time is assumed to be exponentially distributed. In this paper the average age of each stream was obtained in closed form using a stochastic hybrid system. Another related work, \cite{HuangModiano2015ISIT}, gives closed form expressions for the average peak age of multi-stream source M/G/1 queues as well as M/G/1/1 queues with blocking. In this last model, if a newly generated update finds the system busy, it is discarded. In addition, given a fixed total update rate $\lambda$, we show in this work that if we want to decrease the age of a certain stream $i$ with respect to other streams we need to increase its update rate (by increasing its choice probability $p_i$) and thus decreasing the update rates of the other streams. Moreover, if we choose the sum of the ages as our performance metric and we wish to minimize it then we prove that we need to adopt a fair strategy: all streams should be given the same update rate. This paper is structured as follows: in Section~\ref{sec:sec_system_model}, we start by defining the model and the different variables needed in our study. In Section~\ref{sec:sec_age_multi_stream} we derive the closed form expressions of the average age and average peak age and state the conditions necessary to minimize the sum of the ages. \section{System Model} \label{sec:sec_system_model} In this model a source generates updates according to a Poisson process with rate $\lambda$ and send them through the network. However, we assume that the updates belong to $M$ different streams, each stream $i$ being chosen independently at generation time with probability $p_i$, $\sum_{i=1}^M p_i =1$. This setup is equivalent to having $M$ independent Poisson sources with rates $\lambda_i = \lambda p_i$, $i=1,\dots,M$, and $\lambda = \lambda_1+\dots+\lambda_M$ (see \cite{ross}). Moreover, we consider an M/G/1/1 queue with preemption. This means that only one update can be in the system at a time and thus the different streams preempt each others and even the same stream preempts itself. This setup was analyzed in \cite{YatesKaul-2016arxiv} where the authors considered an exponential service time. In this paper, we assume a service time $S$ with general distribution. Given that the system is symmetric from the point of view of each stream, we will focus --- without loss of generality--- on stream $1$ as the main stream. Hence, unless stated otherwise, all random variables correspond to packets from stream $1$. Moreover, in this paper we follow the convention where a random variable $U$ with no subscript corresponds to the steady-state version of $U_j$ which refers to the random variable relative to the $j^{th}$ received packet from stream $1$. To differentiate between streams we will use superscripts, so $U^{(i)}$ corresponds to the steady-state variable $U$ relative to the $i^{th}$ stream. It is important to note that in M/G/1/1 queues with preemption, some updates might be dropped. Hence we call the updates that are not dropped, and thus delivered to the receiver, as \lq\lq successfully received updates\rq\rq\ or \lq\lq successful updates\rq\rq. We also define: $(i)$ $Y_j= t'_{j+1}-t'_{j}$ to be the interdeparture time between the $j^{th}$ and ${j+1}^{th}$ successfully received updates, $(ii)$ $X^{(i)}$ to be the interarrival time between two consecutive generated updates from stream $i$, $i=1,\dots,M$, (which may or may not be successfully transmitted), so $f_{X^{(i)}}(x) = \lambda_i e^{-\lambda_i x}$, $(iii)$ $S$ to be the service time random variable for any update (from any stream) with distribution $F_S(t)$, $(iv)$ $T_j$ to be the system time, or the time spent by the $j^{th}$ successful update in the queue and $(v)$ $N_\tau=\max\left\{n:t'_{n}\leq\tau\right\}$, the number of successfully received updates from stream $1$ in the interval $[0,\tau]$. In our model, we assume the service time of the updates from the different streams to be independent of the interarrival time between consecutive packets (belonging to the same stream or not). These concepts are illustrated in Fig.~\ref{fig1}, where only successfully transmitted packets from stream $1$ are shown. \begin{figure}[!t] \centering \includegraphics[scale=0.5]{age_information_1}% \caption{Variation of the instantaneous age of stream $1$ for M/G/1/1 queue with preemption} \label{fig1} \end{figure} \section{Age of a multi-stream M/G/1/1 preemptive queue} \label{sec:sec_age_multi_stream} We denote by $P_\lambda$, the Laplace transform of the service time distribution evaluated at $\lambda=\lambda_1+\dots+\lambda_M$, i.e. $P_\lambda = \mathbb{E}\left( e^{-\lambda S}\right)$ Before stating the main result of this section we need the following lemmas. \begin{lemma} \label{lemma:lemma_general_results} Let $X$, $\Lambda$ and $S$ be three non-negative independent random variables with respective distributions: $f_X(x) = \lambda_1 e^{-\lambda_1 x}$, $f_\Lambda(x) = (\lambda-\lambda_1)e^{-(\lambda-\lambda_1)x}$ and $f_S(t)$, with $\lambda>\lambda_1>0$. Let $A$, $Z$, $B$, $V$ be random variables such that $\mathbb{P}\left( A>t\right)=\mathbb{P}\left( X>t|X<\Lambda\right)$, $\mathbb{P}\left( Z>t\right)=\mathbb{P}\left( \Lambda>t|X>\Lambda\right)$, $\mathbb{P}\left( B>t\right)=\mathbb{P}\left( X>t|X<\min\left( S,\Lambda\right)\rp$ and $\mathbb{P}\left( V>t\right)=\mathbb{P}\left( \Lambda>t|\Lambda<\min\left( S,X\right)\rp$. Then, \begin{description} \item[$(i)$] $\mathbb{E}\left( e^{sA}\right) = \mathbb{E}\left( e^{sZ}\right) = \frac{\lambda}{\lambda-s}$, \item[$(ii)$] $\mathbb{E}\left( e^{sB}\right) = \mathbb{E}\left( e^{sV}\right) = \frac{\lambda\lp1-P_{\lambda-s}\right)}{\left(\lambda-s\right)\lp1-P_\lambda\right)}$, \end{description} with $P_\lambda$ being the Laplace transform of the random variable $S$ evaluated at $\lambda$. \end{lemma} \begin{proof} We will only prove the result for the variable $B$ since we can apply the same technique for the others. Denote by $\bar{F_S}(t)$ the complementary CDF of $S$. Then, \begin{align*} \mathbb{P}\left( \min(S,\Lambda)\geq t\right) &=\mathbb{P}\left( S\geq t, \Lambda\geq t\right)\\&= \mathbb{P}\left( S\geq t\right)\mathbb{P}\left( \Lambda\geq t\right)\\ &= \bar{F_S}(t)e^{-(\lambda-\lambda_1)t}. \end{align*} {\small\begin{align*} f_B(t) &= \lim_{\epsilon\to 0}\frac{\mathbb{P}\left( B\in [t,t+\epsilon] \right)}{\epsilon}\\ &= \lim_{\epsilon\to 0}\frac{\mathbb{P}\left( X\in [t,t+\epsilon]|X\leq\min(S,\Lambda)\right)}{\epsilon}\\ &= \lim_{\epsilon\to 0}\frac{\mathbb{P}\left( X\in [t,t+\epsilon]\right) \mathbb{P}\left( X\leq\min(S,\Lambda)| X\in [t,t+\epsilon]\right)}{\epsilon\mathbb{P}\left( X\leq\min(S,\Lambda)\right)}\\ &= \frac{\lambda_1 e^{-\lambda_1 t}\mathbb{P}\left( \min(S,\Lambda)\geq t\right)}{\mathbb{P}\left( X\leq\min(S,\Lambda)\right)} = \frac{\lambda_1e^{-\lambda t}\bar{F_S}(t)}{\mathbb{P}\left( X\leq\min(S,\Lambda)\right)}, \end{align*}} \begin{align*} \mathbb{P}\left( X\leq\min(S,\Lambda)\right) &= \int_0^\infty \mathbb{P}\left( \min(S,\Lambda)\geq t|X=t\right)\lambda_1 e^{-\lambda_1 t}\mathrm{d}t\\ &= \int_0^\infty \lambda_1 e^{-\lambda t}\bar{F_S}(t)\mathrm{d}t = \frac{\lambda_1}{\lambda}\lp1-P_\lambda\right), \end{align*} where the last equality is obtained using integration by parts. Thus $f_B(t) = \frac{\lambda e^{-\lambda t}\bar{F_S}(t)}{1-P_{\lambda}}$. Using again integration by parts we find that $ \mathbb{E}\left( e^{sB}\right)=\int_0^\infty f_B(t)e^{st}\mathrm{d}t = \frac{\lambda\lp1-P_{\lambda-s}\right)}{\left(\lambda-s\right)\lp1-P_\lambda\right)}$. \end{proof} \begin{lemma} \label{lemma:lemma_mg11_sys_time} For the M/G/1/1 queue with preemption described above, the moment generating function of the system time $T^{(i)}$ corresponding to a stream $i$ is given by \begin{equation} \label{eqn:eqn_mg11_T} \phi_{T^{(i)}}(s) = \frac{P_{\lambda-s}}{P_\lambda}. \end{equation} Note that the right hand side of \eqref{eqn:eqn_mg11_T} does not depend on the chosen stream. \end{lemma} \begin{proof} Without loss of generality we will prove Lemma~\ref{lemma:lemma_mg11_sys_time} for stream $1$. The system time $T_j$ of the $j^{th}$ successfully received packet corresponds to the service time of the $j^{th}$ received packet given that service was completed before any new arrival (since any new packet from any stream will preempt the current update being served). So, in steady-state, $\mathbb{P}\left( T>t\right) = \mathbb{P}\left( S>t|S<\min\left( X^{(1)},\dots, X^{(M)}\right)\rp$. Hence, for $L = \min\left( X^{(1)},\dots, X^{(M)}\right)$, \begin{align*} f_T(t) &= \lim_{\epsilon\to 0}\frac{\mathbb{P}\left( T\in [t,t+\epsilon] \right)}{\epsilon}\\ &= \lim_{\epsilon\to 0}\frac{\mathbb{P}\left( S\in [t,t+\epsilon]|S<L\right)}{\epsilon}\\ &= \lim_{\epsilon\to 0}\frac{\mathbb{P}\left( S\in [t,t+\epsilon]\right) \mathbb{P}\left( S<L| S\in [t,t+\epsilon]\right)}{\epsilon\mathbb{P}\left( S<L\right)}\\ &= \frac{f_S(t)\mathbb{P}\left( L>t\right)}{\mathbb{P}\left( S<L\right)} = \frac{f_S(t)e^{-\lambda t}}{\mathbb{P}\left( S<L\right)}, \end{align*} where the last equality is due to the fact that $L$ is exponentially distributed with rate $\lambda$. Thus, \begin{align*} \phi_T(s) &= \mathbb{E}\left( e^{sT} \right) = \int_0^\infty \frac{f_S(t)}{\mathbb{P}\left( S<L\right)}e^{-(\lambda-s)t}\mathrm{d}t = \frac{P_{\lambda-s}}{\mathbb{P}\left( S<L\right)}. \end{align*} Finally, \begin{align} \label{eq:eq_P_l} \mathbb{P}\left( S<L\right) &= \int_0^\infty f_S(t)\mathbb{P}\left( L>t\right)\mathrm{d}t = \int_0^\infty f_S(t)e^{-\lambda t}\mathrm{d}t\nonumber\\ &= P_\lambda. \end{align} \end{proof} \begin{lemma} \label{lemma:lemma_mg11_Y} The moment generating function of the interdeparture time of the $i^{th}$ stream, $Y^{(i)}$, is \begin{equation} \label{eqn:eqn_mg11_Y} \phi_{Y^{(i)}}(s) = \frac{\lambda_i P_{\lambda-s}}{\lambda_i P_{\lambda-s}-s}. \end{equation} \end{lemma} \begin{figure}[!t] \begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=2.8cm, semithick] \tikzstyle{every state}=[fill=red,draw=none,text=white] \node[initial,state] (A) {$q_0$}; \node[state] (B) [above right of=A] {$q_1$}; \node[state] (D) [below right of=A] {$q_{0'}$}; \node[state] (C) [below right of=B] {$q_{1'}$}; \path [->] (A) edge [bend left] node[ fill=white, anchor=center, pos=0.5] {$a$} (B); \path [->] (A) edge node[ fill=white, anchor=center, pos=0.5] {$z$} (C); \path [->] (B) edge [loop above] node {$b$}(B); \path [->] (B) edge [bend left] node[ fill=white, anchor=center, pos=0.5] {$u$} (A); \path [->] (B) edge [bend left] node[ fill=white, anchor=center, pos=0.5] {$v$} (C); \path [->] (C) edge [bend left] node[ fill=white, anchor=center, pos=0.5] {$u$} (D); \path [->] (C) edge [loop right] node {$v$} (C); \path [->] (C) edge [bend left] node[ fill=white, anchor=center, pos=0.5] {$b$} (B); \path [->] (D) edge [bend left] node[ fill=white, anchor=center, pos=0.5] {$z$} (C); \draw [->] (D) ..controls +(east:5) and +(east:5)..(B) node[ fill=white, anchor=center, pos=0.5] {$a$}; \end{tikzpicture} \caption{Semi-Markov chain representing the M/G/1/1 interdeparture time for stream $1$.} \label{fig:fig_mg11_mc} \end{figure} \begin{proof} Without loss of generality, we will prove Lemma~\ref{lemma:lemma_mg11_Y} for stream $1$. We define $L=\min\left( X^{(1)},\dots,X^{(M)}\right)$ and $\Lambda=\min\left( X^{(2)},\dots,X^{(M)}\right)$. Since $L$ and $\Lambda$ are the minimum of independent exponential random variables, then they are also exponentially distributed with rates $\lambda=\lambda_1+\dots+\lambda_M$ and $\lambda-\lambda_1$ respectively. Fig.~\ref{fig:fig_mg11_mc} shows the semi-Markov chain relative to the interdeparture time $Y_j$ between the $j^{th}$ and ${j+1}^{th}$ received packet of the first stream. When the $j^{th}$ packet leaves the queue, the system enters the idle state $q_0$ where it waits for a new packet from any stream to be generated. Hence two clocks start: a clock $X^{(1)}$ and a clock $\Lambda$. Clock $X^{(1)}$ ticks first with probability $a=\mathbb{P}\left( X^{(1)}<\Lambda\right)$, at which point a new packet from stream $1$ will be generated first and the system goes to state $q_1$. The value $A$ of the clock when it ticks has distribution $\mathbb{P}\left( A>t\right)=\mathbb{P}\left( X^{(1)}>t|X^{(1)}<\Lambda\right)$. Clock $\Lambda$ ticks first with probability $z=1-a=\mathbb{P}\left( \Lambda<X^{(1)}\right)$, at which point a new packet from one of the other $M-1$ streams is generated first and the system goes to state $q_{1'}$. The value $Z$ of this second clock when it ticks has distribution $\mathbb{P}\left( Z>t\right)=\mathbb{P}\left( \Lambda>t|\Lambda<X^{(1)}\right)$. When the system arrives in state $q_1$, this means a packet from stream $1$ is starting service. Thus, due to the memoryless property of $\Lambda$, three clocks start: a service clock $S$, clock $X^{(1)}$ and clock $\Lambda$. The service clock ticks first with probability $u=\mathbb{P}\left( S<L\right)$ and its value $U$ has distribution $\mathbb{P}\left( U>t\right)=\mathbb{P}\left( S>t|S<L\right)$. At this point the stream $1$ packet currently being served finishes service before any new packet is generated and the system goes back to state $q_0$. This ends the interdeparture time $Y_j$. On the other hand, clock $X^{(1)}$ ticks first with probability $b=\mathbb{P}\left( X^{(1)}<\min\left( S,\Lambda\right)\rp$ and its value $B$ has distribution $\mathbb{P}\left( B>t\right)=\mathbb{P}\left( X^{(1)}>t|X^{(1)}<\min\left( S,\Lambda\right)\rp$. At this point, a new stream $1$ update is generated before any other update from other streams and preempts the one currently in service. In this case the system stays in state $q_1$. The third clock $\Lambda$ ticks first with probability $v=\mathbb{P}\left( \Lambda<\min\left( S,X^{(1)}\right)\rp$ and its value $V$ has distribution $\mathbb{P}\left( V>t\right)=\mathbb{P}\left( \Lambda>t|\Lambda<\min\left( S,X^{(1)}\right)\rp$. At this point a new update not from stream $1$ is generated, preempts the one currently in service and the system switches to state $q_{1'}$. When the system arrives in state $q_{1'}$, this means a packet not from stream $1$ is starting service. Thus, due to the memoryless property of $X^{(1)}$, three clocks start: a service clock $S$, clock $X^{(1)}$ and clock $\Lambda$. As for state $q_1$, the service clock ticks first with probability $u$ and has value $U$. At this point packet currently being served finishes service before any new packet is generated and the system goes to state $q_{0'}$. Also like before, clock $X^{(1)}$ ticks first with probability $b$ and has value $B$. At this point, a new stream $1$ update is generated before any other update from other streams and preempts the one currently in service. In this case the system switches to state $q_1$. The third clock $\Lambda$ ticks first with probability $v$ and has value $V$. At this point a new update not from stream $1$ is generated, preempts the one currently in service and the system stays in state $q_{1'}$. Finally, when the system arrives in state $q_{0'}$, this means the system is idle but no update from stream $1$ has been delivered. Given $X^{(1)}$ and $\Lambda$ are memoryless, the system in state $q_{0'}$ behaves exactly like if it were in state $q_0$. From the above analysis we see that the interdeparture time is given by the sum of the values of the different clocks on the path starting and finishing at $q_0$. For example, for the path $q_0q_1q_{1'}q_{0'}q_{1'}q_1q_0$ in Fig.~\ref{fig:fig_mg11_mc} the interdeparture time $Y=A_1+V_1+U_1+Z_1+B_1+U_2$, where all the random variables in the sum are mutually independent. This value of $Y$ is also valid for the path $q_0q_{1'}q_{0'}q_1q_{1'}q_1q_0$. Hence $Y$ depends on the variables $A_j,B_j,U_j,V_j,Z_j$ and their number of occurrences and not on the path itself. Therefore, the probability that exactly $(i_1, i_2, i_3, i_4, i_5)$ occurrences of $\left( A, B, U, V, Z\right)$ happen, which is equivalent to the probability that $$Y=\sum_{k=1}^{i_1} A_k + \sum_{k=1}^{i_2} B_k + \sum_{k=1}^{i_3} U_k + \sum_{k=1}^{i_4} V_k + \sum_{k=1}^{i_5} Z_k$$ is given by $a^{i_1}b^{i_2}u^{i_3}v^{i_4}z^{i_5}Q(i_1,i_2,i_3,i_4,i_5)$, where $Q(i_1,i_2,i_3,i_4,i_5)$ is the number of paths with this combination of occurrences. Taking into account the fact that the $\{A_k, B_k, U_k, V_k, Z_k\}$ are mutually independent, the moment generating function of $Y$ is \begin{align} \label{eq:eq_mg11_Y_mgf1} \phi_Y(s) &= \mathbb{E}\left(\mathbb{E}\left( e^{sY}|\left( I_1, I_2, I_3, I_4, I_5\right)=\left( i_1, i_2, i_3, i_4, i_5\right) \right)\rp\nonumber\\ &= \sum_{i_1,i_2,i_3,i_4,i_5} \left[a^{i_1}b^{i_2}u^{i_3}v^{i_4}z^{i_5}Q(i_1,i_2,i_3,i_4,i_5)\right.\nonumber\\ & \left. {} \mathbb{E}\left( e^{s\left(\sum_{k=1}^{i_1} A_k + \sum_{k=1}^{i_2} B_k + \sum_{k=1}^{i_3} U_k + \sum_{k=1}^{i_4} V_k + \sum_{k=1}^{i_5} Z_k\right)}\right)\right]\nonumber\\ &=\sum_{i_1,i_2,i_3,i_4,i_5} \left[a^{i_1}b^{i_2}u^{i_3}v^{i_4}z^{i_5}Q(i_1,i_2,i_3,i_4,i_5)\right.\nonumber\\ &\left. {} \mathbb{E}\left( e^{sA}\right)^{i_1}\mathbb{E}\left( e^{sB}\right)^{i_2}\mathbb{E}\left( e^{sU}\right)^{i_3}\mathbb{E}\left( e^{sV}\right)^{i_4}\mathbb{E}\left( e^{sZ}\right)^{i_5}\right], \end{align} where $\{I_1, I_2, I_3, I_4, I_5\}$ are the random variables associated with the number of occurrences of $\{A, B, U, V, Z\}$ respectively. Moreover, given a directed graph $G=(V,E)$ with algebraic label $L(e)$ on its edges, and a node $u\in V$ with no incoming edges, the transfer function $H(v)$ from $u$ to a node $v$ is the sum over of all paths from $u$ to $v$ with each path contributing the product of its edge labels to the sum (see \cite[pp. 213--216]{rimoldi_2016}). The complete set of transfer functions $\{H(v): v\in V\}$ can be computed easily by solving the linear equations: $$\begin{cases} H(u) & = 1\\ H(w) &= \sum_{w': (w',w)\in E} H(w') L(( w',w)), \quad w\neq u. \end{cases}$$ Observe that the sum in \eqref{eq:eq_mg11_Y_mgf1} is nothing but the transfer function from $q_0$ to $\bar q_0$ in the graph shown in Fig.~\ref{fig:fig_detour_flow_graph} with \begin{align*} &(D_1,D_2,D_3,D_4,D_5)\\ &=\left(\mathbb{E}\left( e^{sA}\right),\mathbb{E}\left( e^{sB}\right),\mathbb{E}\left( e^{sU}\right),\mathbb{E}\left( e^{sV}\right),\mathbb{E}\left( e^{sZ}\right)\rp. \end{align*} Solving the system of linear equations above yields the transfer function as \begin{align} \label{eq:eq_H} &H(D_1,D_2,D_3,D_4,D_5) \nonumber\\ &=\sum_{\substack{i_1,i_2,i_3,\\i_4,i_5}} \left[Q(i_1,i_2,i_3,i_4,i_5)a^{i_1}b^{i_2}u^{i_3}v^{i_4}z^{i_5}\right.\nonumber\\ &\qquad \left. {} D_1^{i_1} D_2^{i_2}D_3^{i_3}D_4^{i_4}D_5^{i_5}\right]\nonumber\\ &=\frac{uD_3\left( bD_2zD_5+aD_1-aD_1vD_4\right)}{\left( 1-bD_2\right)\lp1-uD_3zD_5\right)-vD_4\left( 1+uD_3aD_1\right)}. \end{align} Thus $$\phi_Y(s) = H\left(\mathbb{E}\left( e^{sA}\right),\mathbb{E}\left( e^{sB}\right),\mathbb{E}\left( e^{sU}\right),\mathbb{E}\left( e^{sV}\right),\mathbb{E}\left( e^{sZ}\right)\rp.$$ From Lemma~\ref{lemma:lemma_general_results}, we know that $\mathbb{E}\left( e^{sB}\right)=\mathbb{E}\left( e^{sV}\right)=\frac{\lambda\lp1-P_{\lambda-s}\right)}{\left(\lambda-s\right)\lp1-P_\lambda\right)}$ and $\mathbb{E}\left( e^{sA}\right)=\mathbb{E}\left( e^{sZ}\right)=\frac{\lambda}{\lambda-s}$. Moreover, one can notice that $U$ has the same distribution as the system time $T$ so $\mathbb{E}\left( e^{sU}\right)=\frac{P_{\lambda-s}}{P_\lambda}$. Simple computations show that $a=\frac{\lambda_1}{\lambda}$, $b=\frac{\lambda_1}{\lambda}\lp1-P_\lambda \right)$, $u=P_\lambda$, $v=\frac{\lambda-\lambda_1}{\lambda}\lp1-P_\lambda\right)$, $z=\frac{\lambda-\lambda_1}{\lambda}$. Finally, replacing the above expressions into \eqref{eq:eq_H}, we get our result. \begin{figure}[!t] \begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=2.6cm, semithick] \tikzstyle{every state}=[fill=red,draw=none,text=white] \node[state] (A) {$q_0$}; \node[state] (C) [right of=A] {$q_{1'}$}; \node[state] (B) [right of=C] {$q_1$}; \node[state] (E) [right of=B] {$\bar q_{0}$}; \node[state] (D) at (3.9,2.5) {$q_{0'}$}; \path [->] (A) edge [bend right] node[ fill=white, anchor=center, pos=0.5] {$aD_1$} (B); \path [->] (A) edge node[ fill=white, anchor=center, pos=0.5] {$zD_5$} (C); \draw [->] (B) to [out=60, in=30, looseness=8] node[above] {$bD_2$} (B); \path [->] (B) edge node[ fill=white, anchor=center, pos=0.5] {$uD_3$} (E); \path [->] (B) edge [bend right=30] node[ fill=white, anchor=center, pos=0.5] {$vD_4$} (C); \path [->] (C) edge [bend left=30] node[ fill=white, anchor=center, pos=0.5] {$uD_3$} (D); \draw [->] (C) to [out=120, in=150, looseness=8] node[above] {$vD_4$}(C); \path [->] (C) edge node[ fill=white, anchor=center, pos=0.5] {$bD_2$} (B); \path [->] (D) edge [bend left=20] node[ fill=white, anchor=center, pos=0.5] {$zD_5$} (C); \draw [->] (D) edge node[ fill=white, anchor=center, pos=0.5] {$aD_1$} (B); \end{tikzpicture} \caption{Detour flow graph of the M/G/1/1 interdeparture time for stream $1$.} \label{fig:fig_detour_flow_graph} \end{figure} \end{proof} \begin{thm} \label{thm:thm_mg11_age} Given an M/G/1/1 queue with preemption and service time $S$ and a source generating packets belonging to $M$ streams according to $M$ independent Poisson processes with rates $\lambda_i$, $i=1,\dots,M$, such that $\lambda=\lambda_1+\dots+\lambda_M$, then \begin{enumerate} \item the average age of stream $i$ is given by \begin{equation} \label{eq:eq_avg_age_mg11} \Delta_i = \frac{1}{\lambda_i P_\lambda}, \end{equation} \item and the average peak age of stream $i$ is given by \begin{equation} \label{eq:eq_avg_peak_age_mg11} \Delta_{peak,i} = \frac{1}{\lambda_i P_\lambda}+\frac{\mathbb{E}\left(Se^{-\lambda S}\right)}{P_\lambda}. \end{equation} \end{enumerate} \end{thm} \begin{proof} Due to the symmetry in the system from a stream point of view, then, without loss of generality, we will prove \ref{thm:thm_mg11_age} for stream $1$ only. The same proof applies for the other $M-1$ streams. From \eqref{eq:eq_age_definition} and Fig.~\ref{fig1}, the average age for stream $1$ of the M/G/1/1 queue can be also expressed as the sum of the geometric areas $Q_i$ under the instantaneous age curve. Authors in \cite{2012CISS-KaulYatesGruteser} show that \begin{align} \label{eq:eq_agedef} \Delta_1 &=\lim_{\tau\to\infty}\frac{N_\tau}{\tau}\frac{1}{N_\tau}\sum_{j=1}^{N_\tau} Q_j = \lambda_e\mathbb{E}(Q), \end{align} where $\lambda_e = \lim_{\tau\to\infty}\frac{N_\tau}{\tau}$, $Q$ is the steady-state counterpart of $Q_j$ and the second equality is justified by the ergodicity of the system. As shown in \cite{YatesKaul-2016arxiv} and \cite{NajmYatesSoljaninMG11}, $\lambda_e$ is the rate at which successful updates are received. Given that the interarrival time of all streams are memoryless, then the interdeparture times, $Y_j$ and $Y_{j+1}$, between two consecutive received updates are i.i.d. Hence $N_{\tau}$ forms a renewal process and by \cite{ross}, $\lim_{\tau\to\infty}\frac{N_\tau}{\tau}=\frac{1}{\mathbb{E}(Y)}$, where $Y$ is the steady-state interdeparture random variable. Moreover, from Fig.~\ref{fig1} we see that by applying same reasoning as in \cite{NajmNasser-ISIT2016} $$ \mathbb{E}\left(Q\right) = \frac{1}{2} \mathbb{E}\left( Y^2\right) +\mathbb{E}\left( TY\right) = \frac{1}{2} \mathbb{E}\left( Y^2\right) +\mathbb{E}\left( T\right) \mathbb{E}\left( Y\right).$$ The second equality is obtained by noticing that for any received packet $j$, $T_j$ and $Y_j$ are independent. Therefore, \begin{equation} \label{eq:eq_steady_state_mg11_age} \Delta_1 = \mathbb{E}\left( T\right) + \frac{\mathbb{E}\left( Y^2\right)}{2\mathbb{E}\left( Y\right)} \end{equation} Moreover, from Fig.~\ref{fig1} we see that the peak age at the instant before receiving the $j^{th}$ packet is given by $$K_j = T_{j-1}+Y_{j-1}.$$ Hence, given that the system is ergodic, \eqref{eq:eq_avg_peak_age_def} becomes at steady state, \begin{equation} \label{eq:eq_peak_age_1} \Delta_{peak,1}=\mathbb{E}\left( K\right)=\mathbb{E}\left( T\right)+\mathbb{E}\left( Y\right). \end{equation} Using Lemma~\ref{lemma:lemma_mg11_sys_time}, we get that $\mathbb{E}\left( T\right)= P_\lambda^{-1}\mathbb{E}\left( Se^{-\lambda S}\right)$. Using Lemma~\ref{lemma:lemma_mg11_Y}, we get that $\mathbb{E}\left( Y\right)= \left( \lambda_1 P_\lambda\right)^{-1}$ and $\mathbb{E}\left( Y^2\right)=2\left(-\frac{\mathbb{E}\left( Se^{-\lambda S}\right)}{\lambda_1 P_\lambda^2}+\frac{1}{\lambda_1^2 P_\lambda^2}\right)$. Using these expressions in \eqref{eq:eq_steady_state_mg11_age} and \eqref{eq:eq_peak_age_1} we obtain our result for stream $1$. \end{proof} Note that for $M=1$, we get back the result derived in \cite{NajmYatesSoljaninMG11} for single stream M/G/1/1 preemptive queue. Moreover, if we replace $P_\lambda$ in \eqref{eq:eq_avg_age_mg11} by the Laplace transform of the exponential distribution evaluated at $\lambda$ we recover the expression stated in \cite[Theorem 2(a)]{YatesKaul-2016arxiv}. \begin{corollary} \label{cor:cor} Let a source generate updates according to a Poisson process with fixed rate $\lambda$. Moreover, these updates belong to $M$ different streams, each stream $i$ chosen independently with probability $p_i$ at generation time. Then if we use an M/G/1/1 with preemption transmission scheme we can decrease the average age (and the average peak age) of a high priority stream $k$ with respect to the other streams by increasing the probability $p_k$ with which it is chosen. \end{corollary} \begin{proof} From Theorem~\ref{thm:thm_mg11_age} we know that for any two streams $i$ and $k$, in order to have $\Delta_i<\Delta_k$ or $\Delta_{peak,i}<\Delta_{peak,k}$ we must have $\lambda_i>\lambda_k$. Given that $\lambda_i = \lambda p_i$, $i=1,\dots,M$, then we must have $p_i>p_k$. \end{proof} Given the source generates multiple streams, one interesting performance measure of the system would be the total average age or total average peak age defined respectively as \begin{align} \label{eq:eq_total_age} \Delta_{tot} &= \sum_{i=1}^M \Delta_i,\ \Delta_{peak,tot} = \sum_{i=1}^M \Delta_{peak,i}. \end{align} The next theorem gives the distribution over the $p_i$, $i=1,\dots,M$, that minimizes the metrics in \eqref{eq:eq_total_age} as well as their minimum achievable value. \begin{thm} \label{thm:thm_optimal_age} For the M/G/1/1 multi-stream preemptive system described above with fixed total generation rate $\lambda$, the optimal strategy that achieves the smallest value for the total average age, $\Delta_{tot}$, and the total average peak age, $\Delta_{peak,tot}$, is the fair strategy: all streams should have the same generation rate. This means that the probability distribution $\{p_i\}$ over the choices of streams should be the uniform distribution with $p_i=\frac{1}{M}$, $i=1,\dots,M$. Moreover, the optimal values of $\Delta_{tot}$ and $\Delta_{peak,tot}$ are given by \begin{align} \label{eq:eq_optimal_total_age} \Delta_{tot} &= \frac{M^2}{\lambda P_\lambda},\ \Delta_{peak,tot} = \frac{M^2}{\lambda P_\lambda}+\frac{M\mathbb{E}\left(Se^{-\lambda S}\right)}{P_\lambda} \end{align} \end{thm} \begin{proof} From \eqref{eq:eq_avg_age_mg11}, \eqref{eq:eq_avg_peak_age_mg11} and \eqref{eq:eq_total_age}, we get that \begin{align} \label{eq:eq_age_tot_2} \Delta_{tot} &= \frac{1}{P_\lambda}\sum_{i=1}^M \frac{1}{\lambda_i} = \frac{1}{\lambda P_{\lambda}}\sum_{i=1}^M \frac{1}{p_i}\nonumber\\ \Delta_{peak,tot} &= \frac{1}{P_\lambda}\sum_{i=1}^M \frac{1}{\lambda_i}+\frac{M\mathbb{E}\left(Se^{-\lambda S}\right)}{P_\lambda}\nonumber\\ &= \frac{1}{\lambda P_\lambda}\sum_{i=1}^M \frac{1}{p_i}+\frac{M\mathbb{E}\left(Se^{-\lambda S}\right)}{P_\lambda} \end{align} Given that $\lambda$ is fixed, then minimizing $\Delta_{tot}$ and $\Delta_{peak,tot}$ over $(p_1,\dots,p_M)$ is equivalent to minimizing $\sum_{i=1}^M \frac{1}{p_i}$. As this is a symmetric convex function, it is minimized when $p_1=\dots=p_M=1/M$ with the value $M^2$, which proves our theorem. \end{proof} From Corollary~\ref{cor:cor} and Theorem~\ref{thm:thm_optimal_age}, we see that prioritizing a stream over the others from an age point of view and minimizing the total age are two contradictory objectives. \section{Conclusion} In this paper we studied the M/G/1/1 preemptive system with a multi-stream updates source. We derived closed form expressions for the average age and average peak age using the detour flow graph method. Moreover, using these results we showed that, for a fixed total generation rate, one can't prioritize one of the streams and at the same time minimize the total age. In fact, we prove that in order to optimize the total age, the source needs to generate all streams at the same rate. This means that no single stream can be given a higher rate, a necessary condition to reduce its age with respect to the other streams. \section*{Acknowledgements} This research was supported in part by grant No. 200021\_166106/1 of the Swiss National Science Foundation. \bibliographystyle{IEEEtran}
\section{Introduction} Starting with the seminal references ~\cite{aberg_quantifying_2006,baumgratz_quantifying_2014,levi_quantitative_2014}, quantum coherence, intended as superposition of `classical' states, has been recently formalized as a resource, making use of concepts and tools of quantum information processing (see \cite{streltsov_colloquium_2017} for a recent review). The relation of coherence with respect to quantum correlations and quantum entanglement in bi- and multi-partite systems is of particular interest, especially given that entanglement is a manifestation of coherence at the level of distributed systems, and has already enjoyed focused effort~\cite{streltsov_measuring_2015,theurer_resource_2017,regula_converting_2017,radhakrishnan_distribution_2016,bu_distribution_2017,bu_distribution_2017-1,xi_coherence_2017,yadin_quantum_2016,ma_converting_2016,streltsov_towards_2017,chitambar_relating_2016}. In this paper we provide a general framework for the quantification of genuine distributed coherence, based on the notion of active localization of coherence on individual systems by means of incoherent unitaries that neither create nor destroy coherence; the amount of coherence that cannot be localized is then deemed to be genuinely distributed. Our approach is inspired by Ref.~\cite{kraft_characterizing_2017}, where the authors tackled the issue of pinning down genuine multilevel entanglement, considering the possibility of focusing and splitting entanglement across levels by means of the class of unitaries that are free in the resource-theoretic approach to entanglement, that is, by means of local unitaries. We remark that our approach is different from that of, e.g., Refs.~\cite{radhakrishnan_distribution_2016,bu_distribution_2017,bu_distribution_2017-1, xi_coherence_2017}. In the latter references the authors consider the given distribution of local and multipartite coherence; we instead consider the (reversible) manipulation of coherence under the class of unitaries that, in a resource-theoretic approach to coherence, are deemed to be ``free operations'' that preserve the coherence that is present; most importantly, while these operations maintain constant the amount of global coherence, they may allow to `focus' it on local sites. We emphasize that our notion of localization is different from the assisted distillation of coherence~\cite{chitambar_assisted_2016}. Also, our notion of ``genuine distributed coherence'' is not related to the notion of ``genuine coherence'', with the latter being the resource in a theory of coherence based on the notion of genuine incoherent operation~\cite{vicente_genuine_2017}. Finally our genuine distributed coherence is not the same as the notion of intrinsic coherence~\cite{radhakrishnan_distribution_2016}. \section{Coherence and entanglement} Quantum coherence, as considered in the seminal paper~\cite{baumgratz_quantifying_2014}, is a basis-dependent concept, which can be defined for a single system. Such a single system may be composite in nature, and this is the case we will consider. Let us denote by $\{\ket{i}\}_i$ the fixed \emph{incoherent} basis of the system; such a basis may be singled out by the physics, for example it could be the eigenbasis of the Hamiltonian of the system, or of some other specific and relevant observable. A general quantum state of the system is deemed incoherent if it is diagonal in the incoherent basis: \[ \varrho^{\textrm{inc}} = \sum_i p_i \ket{i}\bra{i}. \] The set of incoherent states will be denoted by $I$. Any state that is not incoherent is deemed coherent (equivalently, it is said to display some quantum coherence). Notice that in the case the incoherent state is pure, the corresponding vector state is simply one of the elements of the basis $\{\ket{i}\}_i$ (up to an irrelevant phase factor). A coherent vector state is a non-trivial superposition of the element of the basis; we call coherence rank the number of terms in such a superposition~\cite{theurer_resource_2017}. Let now $\hilb{H}_{AB}=\hilb{H}_{A}\otimes\hilb{H}_{B}$ be a $d_A\times d_B$-dimensional composite Hilbert space, used to describe the state of Alice and Bob's joint system. We define the local reference basis $\qty{\ket{i}_A}_{i=0}^{d_A-1}$ for Alice and similarly $\qty{\ket{j}_B}_{j=0}^{d_B-1}$ for Bob. These are called the local incoherent bases. The joint incoherent basis is then assumed to be given by the tensor product of the local incoherent bases: $\{\ket{ij}_{AB}:=\ket{i}_A\otimes\ket{j}_B\}_{i,j}$. A bipartite pure state \begin{equation} \label{eq:purestategen} \ket{\psi}_{AB}=\sum_{ij} \psi_{ij}\ket{ij}_{AB} \end{equation} is incoherent if and only if exactly one of the $\psi_{ij}$ is non-zero. Otherwise, the state is coherent and the number of non-zero coefficients is, as we mentioned already in the single-system case, the coherence rank. A pure state \eqref{eq:purestategen} is \emph{unentangled} if and only if the matrix of coefficients $\Psi=[\psi_{ij}]$ has exactly one non-zero singular value, and \emph{entangled} otherwise. The number of non-zero singular values of $\Psi$ is called the Schmidt rank. Unentangled pure states have the form $\ket{\alpha}\ket{\beta}$. A pure state \eqref{eq:purestategen} is maximally coherent if all the coefficients $\psi_{ij}$ are non-zero and equal in modulus, that is, $|\psi_{ij}| = (d_Ad_B)^{-1/2}$ for all $i,j$. Thus, a maximally coherent state has the form \[ \ket{\psi}_{AB}=\frac{1}{\sqrt{d_Ad_B}}\sum_{ij} e^{i\varphi_{ij}}\ket{i}_A\ket{j}_{B}. \] A pure state \eqref{eq:purestategen} is maximally entangled if and only if the matrix $[\psi_{ij}]$ has $\min\{d_A,d_B\}$ non-zero and equal singular values, which are then necessarily equal to $(\min\{d_A,d_B\})^{-1/2}$. Thus, a maximally entangled state has the form \[ \ket{\psi}_{AB}=\frac{1}{\sqrt{\min\{d_A,d_B\}}}\sum_{i}\ket{\alpha_i}_A\ket{\beta_i}_{B}, \] where $\{\ket{\alpha_i}\}$ and $\{\ket{\beta_j}\}$ are local orthonormal bases. Notice that one can absorb any phases in the definition of the local bases. Both for coherence and entanglement, the concepts are generalized to the mixed-state case by simply considering convex combinations. The incoherent (unentangled) mixed states are all and only those that can be obtained by taking convex combinations of pure incoherent (entangled) states. States of the form \begin{equation} \label{Eq:incoherentmixedstate} \varrho=\sum_{ij} p_{ij} \ketbra{i}\otimes\ketbra{j} \end{equation} that are diagonal in the joint incoherent basis constitute the set of bipartite incoherent states $I$. Unentangled states are those that can be written as convex combinations of unentangled pure states, that is, states of the form \[ \rho_{AB}=\sum_{i}p_i\ketbra{\alpha_i}_A\otimes\ketbra{\beta_i}_{B}. \] Both coherence and entanglement can be considered resources in frameworks where there are certain specific limitations. We will focus in particular on unitary transformations that leave coherence invariant. For a single system, incoherent unitary operations are of the form \begin{equation} \label{Eq:IncoherentUnitarySingle} U=\sum_{j} e^{i\varphi_{j}} \ketbra{\pi(j)}{j}, \end{equation} i.e. they can be written as a phase gate and a permutation $\pi$ of the incoherent basis. These are the most general unitary operations under which the set $I$ is closed. In the bipartite setting, incoherent unitary operations are of the form \begin{equation} \label{Eq:IncoherentUnitary} U=\sum_{ij} e^{i\varphi_{ij}} \ketbra{\pi(ij)}{ij}. \end{equation} \section{Relative entropy of coherence} As a quantifier of coherence we will use the \textit{relative entropy of coherence} \cite{baumgratz_quantifying_2014} that is defined by \begin{equation} \label{Eq:RelEntropyCoherence} \meas{C}(\varrho):=\min_{\sigma\in I}\ent{S}(\varrho\parallel\sigma). \end{equation} Here, $\ent{S}(\varrho\parallel\sigma):=\tr[\varrho\log(\varrho)]-\tr[\varrho\log(\sigma)]$ is the relative entropy, and the minimization is over all incoherent states $\sigma$. A very useful property of the relative entropy of coherence is that it is additive on tensor products, \begin{equation} \label{eq:Cadditivity} \meas{C}(\varrho_A\otimes\varrho_B)=\meas{C}(\varrho_A)+\meas{C}(\varrho_B). \end{equation} In addition, an analytic solution to the minimization problem is known \cite{baumgratz_quantifying_2014}. The relative entropy of coherence can be expressed as \begin{eqnarray} \label{Eq:AnalyticExpression} \meas{C}(\varrho)&=&\ent{S}(\varrho^{d})-\ent{S}(\varrho) \end{eqnarray} where $\ent{S}(\varrho)=-\tr[\varrho\log(\varrho)]$ is the von Neumann entropy and $\varrho^{d}=\sum_i \bra{i}\varrho\ket{i} \ketbra{i}$ is the totally decohered version of the state $\varrho$. It is immediate to see that the relative entropy of coherence is invariant under the action of incoherent unitary transformations, which makes it a good coherence quantifier~\cite{baumgratz_quantifying_2014}. \section{A first look at distributed coherence} In multipartite systems one can distinguish between different manifestations of coherence, going beyond simply detecting and quantifying coherence in the joint incoherent basis $\{\ket{ij}\}$ (see also~\cite{radhakrishnan_distribution_2016,bu_distribution_2017,bu_distribution_2017-1,xi_coherence_2017,yadin_quantum_2016,ma_converting_2016,streltsov_towards_2017}). What we are mostly interested in in this work is the relation between global coherence---that is, the coherence of the global state---and the local coherence---the coherence exhibited by the local reduced states. \begin{example} In the simplest case the systems are uncorrelated and their state does not contain any coherence at all, such in the case of \begin{equation} \ket{0}\ket{0}. \end{equation} \end{example} \begin{example} Then, there exist coherent, yet uncorrelated states. Consider the state \begin{equation} \ket{+}\ket{+}=\frac{1}{2}\sum_{i,j=1}^1\ket{ij}, \end{equation} with $\ket{\pm}=(\ket{0}\pm\ket{1})/\sqrt{2}$. Here, not only the global state is coherent, but also its marginals are. In fact, the amount of local coherence is equal to the amount of global coherence, in the sense that $\meas{C}(\varrho_{AB})=\meas{C}(\varrho_{A})+\meas{C}(\varrho_{B})$. \end{example} A more interesting class of states are those that are globally coherent, but, due to the fact that they are entangled, have incoherent marginals. Nevertheless, in some of these cases the coherence can be concentrated on the subsystems by applying incoherent unitary operations such that the global coherence is preserved, but converted to local coherence. \begin{example} Consider the maximally entangled state in dimension $d\times d$ \begin{equation} \ket{\psi_d}=\frac{1}{\sqrt{d}}\sum_{i}\ket{ii}. \end{equation} This state has coherence rank $d$ and its coherence is a property of the bipartite system since both marginals are maximally mixed and thus incoherent. Interestingly, all the coherence can be concentrated on one of the subsystems, say Alice, by applying an incoherent unitary operation. Indeed, \begin{equation} \ket{\psi_d}=\ent{CNOT}\qty[\frac{1}{\sqrt{d}}\sum_i\ket{i}\otimes \ket{0}], \end{equation} where $\ent{CNOT}$ is the generalized controlled-not gate (more precisely, a controlled shift) acting as $\ent{CNOT}\ket{i}\ket{j}=\ket{i}\ket{j\oplus i}$, where the addition $\oplus$ is modulo $d_B$. Notice that the coherence in the state inside the square brackets is located in Alice's system. \end{example} \section{A quantifier of genuine distributed coherence} \label{sec:gmc} Our objective is to study coherence in multipartite systems by considering entropic quantifiers to measure to what extent coherence is spread across the subsystems and to what extent it can be concentrated on the individual systems by means of incoherent unitary operations. While we will focus on the bipartite case for the sake of clarity and conciseness, essentially all of the basic definitions extend naturally to the multipartite case, and for this reason we may use the adjective ``multipartite'' even if focusing on the bipartite case. \subsection{Distributed coherence} In a first step we want to quantify to what extent the coherence of a state is a property of the bipartite state and not only of its marginals. We propose the following quantifier of distributed coherence (DC) to characterize the multipartite (as opposite to localized) coherence of a state: \begin{equation} \label{eq:CDCdef} \meas{C}_{DC}(\varrho_{AB}):=\meas{C}(\varrho_{AB})-\meas{C}(\varrho_A\otimes\varrho_B)=\meas{C}(\varrho_{AB})-\qty[\meas{C}(\varrho_A)+\meas{C}(\varrho_B)]. \end{equation} Again, we point out that this could as easily be defined directly / generalized for actual multipartite systems in a straightforward way; explicitly: \begin{equation} \begin{split} \meas{C}_{DC}(\varrho_{A_1A_2\ldots A_n})=\meas{C}(\varrho_{A_1A_2\ldots A_n})-\meas{C}(\bigotimes\varrho_{A_i}) =\meas{C}(\varrho_{A_1A_2\ldots A_n})-\sum_i \meas{C}(\varrho_{A_i}). \end{split} \end{equation} We remark that the fact that our distributed-coherence quantifier is equal both to the gap between global coherence and the sum of the local coherences, and to the gap between global coherence and the coherence of the product of the marginals, is a consequence of the additivity of the relative entropy of coherence on tensor products, Eq.~\eqref{eq:Cadditivity}. While this is beyond the scope of the present work, one can define and study gaps between the global and local coherences that are based on other coherence quantifiers, and in such a case, one would in general deal with two distinct gaps. Recall that there is an analytic expression that can be used to express our quantifier \eqref{eq:CDCdef} in terms entropies of the original state $\varrho_{AB}$, its decohered version $\varrho_{AB}^{d}$ and their marginals. Inserting the expression from Eq. \eqref{Eq:AnalyticExpression}, one obtains \begin{equation} \label{Eq:MCquant} \begin{split} \meas{C}_{DC}(\varrho_{AB})&=\ent{S}(\varrho_{AB}^{d})-\ent{S}(\varrho_{AB})-\qty[\ent{S}(\varrho_A^{d})-\ent{S}(\varrho_A)+\ent{S}(\varrho_B^{d})-\ent{S}(\varrho_B)]\\ &=I_{\varrho}(A:B)-I_{\varrho^d}(A:B)\\ &\coloneqq\Delta I_{\varrho}(A:B). \end{split} \end{equation} That this difference is not negative comes from the data-processing inequality~(see the comprehensive~\cite{beaudry_intuitive_2011}) related to strong-subadditivity of the von Neumann entropy, which ensures that mutual information $I_\varrho(A:B)=S(\varrho_A)+S(\varrho_B)-S(\varrho_{AB})=S(\varrho_{AB}\|\varrho_A\otimes\varrho_B)$ decreases under local operations, in particular under local projective measurements. We recognize $\Delta I_{\varrho}(A:B)$ as a basis-dependent version of a discord quantifier based on the notion of local projective measurements, meant to capture the quantumness of correlations~\cite{ollivier_quantum_2001,modi_classical-quantum_2012}. One obtains a basis-\emph{in}dependent discord quantifier---actually, what we normally refer to as discord quantifier---by minimizing the gap $\Delta I_{\varrho}(A:B)$ over the choice of local bases~\cite{girolami_faithful_2011,modi_classical-quantum_2012}, equivalently, by optimizing over local unitaries~\footnote{We remark that, in the case where one is interested in the quantumness of correlations, a further option is that of optimizing over general local measurements (also known as POVMs) meant to ``extract'' the largest possible amount of classical correlation~\cite{piani_no-local-broadcasting_2008}.}. As we will see later, in this paper we go down another route, optimizing over arbitrary (that is, also global) incoherent unitaries. We point out that the above identity $\meas{C}_\textrm{DC}(\rho) = \Delta I_\varrho(A:B)$, together, with the data processing inequality provides an immediate and simple proof of some of the results of \cite{bu_distribution_2017} relating coherence and discord. It is natural to consider the problem of when $\Delta I_{\varrho}(A:B)$ vanishes. One solution is certainly the trivial case when the state $\varrho_{AB}$ itself is already incoherent. Another trivial solution is the case where the state $\varrho_{AB}$ is uncorrelated, i.e., $\varrho_{AB}=\varrho_A\otimes\varrho_B$, so that the mutual information vanishes to begin with. The authors of \cite{yadin_quantum_2016}, building on techniques from~\cite{piani_no-local-broadcasting_2008}, and amending a statement made in~\cite{ollivier_quantum_2001}, derived the structure of the states $\varrho_{AB}$ for which the condition \begin{equation} \label{eq:onesidebasisdepdiscord} I_{\varrho}(A:B)-I_{\varrho^{d_A}}(A:B) = 0 \end{equation} holds, where $\varrho^{d_A}=\sum_i\ketbra{i}_A\otimes\ensuremath{\mathds{1}}_B \varrho \ketbra{i}_A\otimes\ensuremath{\mathds{1}}_B$. Such a structure can be understood in terms of a partitioning of elements of the incoherent basis $\{\ket{i}\}$ on $A$ into disjoint subsets, and of orthogonal projectors $\{P_a\}$ each projecting on the subspace spanned by one subset in such partitioning. Equivalently, we can speak of an orthogonal projective decomposition of the identity, where each projector is diagonal in the incoherent basis. Then the condition for \eqref{eq:onesidebasisdepdiscord} to hold is that \[ \sum_a P^A_a \otimes \ensuremath{\mathds{1}}_B \varrho_{AB} P^A_a \otimes \ensuremath{\mathds{1}}_B = \varrho_{AB} \] and that \[ P^A_a \otimes \ensuremath{\mathds{1}}_B \varrho_{AB} P^A_a \otimes \ensuremath{\mathds{1}}_B \] is product for every projector $P_a$. It is immediate to realize that, in the case where one considers projective measurements on both parties, one has $\Delta I_{\varrho}(A:B)=0$ if and only if \begin{equation} \label{eq:invariantstate} \sum_a P^A_a \otimes P^B_b \varrho_{AB} P^A_a \otimes P^B_b = \varrho_{AB}, \end{equation} and it holds both that \[ P^A_a \otimes \ensuremath{\mathds{1}}_B \varrho_{AB} P^A_a \otimes \ensuremath{\mathds{1}}_B \] is uncorrelated for all $a$, and that \[ \ensuremath{\mathds{1}}_A \otimes P^B_b \varrho_{AB} \ensuremath{\mathds{1}}_A \otimes P^B_b \] is uncorrelated for all $b$, for some local orthogonal projective measurements $\{P^A_a\}$ and $\{P^B_b\}$ which are diagonal in the respective local incoherent bases. Notice that such conditions imply that \[ P^A_a \otimes P^B_b \varrho_{AB} P^A_a \otimes P^B_b \] is uncorrelated for all $a$ and $b$. We point out how this characterization covers both trivial cases mentioned above, i.e., incoherent states and product states. In the following we will focus on pure states. It is clear that in the case of a pure state $\varrho_{AB}=\ketbra{\psi}_{AB}$ the conditions above can only be satisfied by a product state $\ket{\psi}_{AB}=\ket{\alpha}_A\ket{\beta}_B$. This is because Eq. \eqref{eq:invariantstate} implies that $P^A_a \otimes P^B_b \ket{\psi}_{AB}$ must be proportional to $\ket{\psi}_{AB}$, besides also being uncorrelated. \subsection{Genuinely distributed coherence} We introduce the concept of \emph{genuine distributed coherence} by taking into consideration that, in the framework of incoherent operations introduced by Baumgratz et al.~\cite{baumgratz_quantifying_2014}, the coherence present in a distributed system is invariant under incoherent unitaries~\cite{streltsov_measuring_2015}, which are considered as ``free operations'', even in the case where they are non-local. That is, (global) incoherent unitaries play the same role in coherence theory as local unitaries play in entanglement theory, at least, as mentioned, in the framework of Ref.~\cite{baumgratz_quantifying_2014}. Taking this idea seriously, as done previously in, for example, Refs.~\cite{streltsov_measuring_2015,winter_operational_2016}, in this paper we focus on the amount of multipartite coherence that remains after a minimization of $\meas{C}_{DC}$ over all incoherent unitaries defined by Eq. \eqref{Eq:IncoherentUnitary}. This leads to the following definition of genuinely distributed coherence (with stratighforward generalization to the multipartite case): \begin{equation} \label{Eq:GMC} \meas{C}_{GDC}(\varrho_{AB})=\min_{U_I} \qty[ \meas{C}(\xi_{AB})-\meas{C}(\xi_A\otimes\xi_B)]_{\xi=U_I\varrho_{AB}U_I^{\dagger}}=\min_{U_I} \Delta I_{\xi}(A:B)\big\rvert_{\xi=U_I\varrho_{AB}U_I^{\dagger}}. \end{equation} \section{Distributed and genuine distributed coherence for pure bipartite states} After having defined our concepts and quantifiers in a general way---that is, for mixed multipartite states---in the previous sections, in this section we focus on pure bipartite states. \subsection{Pure bipartite states with vanishing genuine multipartite coherence} We have argued that the only pure bipartite state with vanishing multipartite coherence $\meas{C}_{DC}$ are factorized states. This implies that the only pure bipartie states $\ket{\psi}_{AB}$ with vanishing \emph{genuine} distributed coherence $\meas{C}_{GDC}$ are those that can be decorrelated by means of an incoherent unitary. We now derive necessary and sufficient conditions for this to be possible. Given a pure state $\ket{\psi}$, we can expand it in the incoherent basis, \begin{equation} \ket{\psi}=\sum_{ij}\psi_{ij}\ket{ij}=\sum_{ij}\abs{\psi_{ij}}e^{i\varphi_{ij}}\ket{ij}, \end{equation} where $\ensuremath{\mathbb{C}}\ni\psi_{ij}=\abs{\psi_{ij}}e^{i\varphi_{ij}}$. Then, a state $\ket{\psi}$ can be decorrelated by incoherent unitaries $U_I$ if and only if \begin{equation} \max_{U_I,\ket{ab}}\abs{\bra{ab}U_I\ket{\psi}}=1 , \end{equation} where $\ket{ab}=\sum_{ij}a_ib_j\ket{ij}=\sum_{ij}\abs{a_i}\abs{b_j}e^{i(\alpha_i+\beta_j)}\ket{ij}$. Recall, that incoherent unitaries can be written as a combination of a phase gate and a permutation in the incoherent basis (see Eq.~\eqref{Eq:IncoherentUnitary}). Thus, one has \[ \ket{\psi'} = U_I\ket{\psi} = \sum_{ij}\abs{\psi_{\pi(ij)}}e^{i\varphi'_{ij}}\ket{ij}. \] We remark that, thanks to the freedom in the phases of the incoherent unitary, the phases $\varphi'_{ij}$ can be chosen arbitrarly, when optimizing over $U_I$. One therefore has, \[ \begin{split} \max_{U_I}\abs{\bra{ab}U_I\ket{\psi}} &=\max_{\pi,{\varphi_{ij}'}}\abs{\sum_{ij}\abs{\psi_{\pi(ij)}}\abs{a_i}\abs{b_j}e^{i(-\alpha_i-\beta_j+\varphi'_{ij})}}\\ &\leq \max_{\pi}\sum_{ij}\abs{\psi_{\pi(ij)}}\abs{a_i}\abs{b_j} \end{split} \] where the last inequality---coming from the triangle inequality---can be saturated by a suitable choice of phases $\varphi_{ij}'$, specifically $\varphi_{ij}'=\alpha_i+\beta_j$. Then we are left with optimizing \begin{equation} \max_{\pi,\ket{ab}}\sum_{ij}\abs{\psi_{\pi(ij)}}\abs{a_i}\abs{b_j} =\max_{\pi}\qty[ \|\Psi^\textrm{abs}_\pi\|_\infty], \end{equation} where $\Psi^\textrm{abs}_\pi=\left[\abs{\psi_{\pi(ij)}}\right]$ is the matrix of the moduli of the coefficients $\psi_{ij}$, rearranged according to the permutation $\pi$, and $\|\cdot\|_\infty$ indicates the largest singular value. From this the following observation follows. \begin{theorem} A bipartite pure state $\ket{\psi}$ of dimension $d_A\times d_B$ with coefficients $\psi_{ij}\in\ensuremath{\mathbb{C}}$ has $\meas{C}_{GDC}(\ketbra{\psi})=0$ if and only if $\max_{\pi}\qty[\|\Psi^\textrm{abs}_\pi\|_\infty ]=1$, where $\Psi^\textrm{abs}_\pi=\left[\abs{\psi_{\pi(ij)}}\right]$, and the maximization is over all permutations of the pairs $(i,j)$. An equivalent condition is that there is a permutation $\pi$ such that $\Psi^\textrm{abs}_\pi$ has rank equal to one. \end{theorem} \begin{observation} \label{obs:maxentexact} Any two-qubit maximally entangled state $\psi$ has vanishing genuine distributed coherence. This is clear, once one considers that the matrix of coefficients $\Psi=[\psi_{ij}]$ is in such a case proportional to a unitary matrix, whose rows and columns are orthogonal vectors, so that necessarily $\psi^*_{00}\psi_{01}=-\psi^*_{10}\psi_{11}$, and hence $\abs{\psi_{00}}\abs{\psi_{01}}-\abs{\psi_{10}}\abs{\psi_{11}}=0$; this proves that there is a permutation $\pi$ such that $\Psi^\textrm{abs}_\pi$ has rank equal to one. \end{observation} We see that for two qubits, maximal entanglement is not compatible with the presence of genuine distributed coherence. Is this the case for all maximally entangled states in any local dimension? The following proves that it is not. \begin{corollary} Any pure state $\ket{\psi}$ such that $\Psi$ has a number of non-vanishing entries equal to a prime number striclty larger than $\max\{d_A,d_B\}$ has non-zero genuine distributed coherence. \end{corollary} This is because, for $\Psi^\textrm{abs}_\pi$ to have rank one, that is, to be of the form $\ket{a}\bra{b}$, it must be that the number of its non-zero entries is either less or equal to $\max\{d_A,d_B\}$, or not a prime number. \begin{example} The two-qutrit maximally entangled state \[ \frac{1}{\sqrt{3}}\left(\ket{+}\ket{+}+i\ket{-}\ket{-}+\ket{2}\ket{2}\right) \] with $\ket{\pm}=(\ket{0}\pm\ket{1})/\sqrt{2}$, has genuinely distributed coherence, since it has five non-vanishing coefficient when expressed in the standard othonormal basis $\{\ket{i}\ket{j}\}$. \end{example} Despite the fact that computing the maximal singular value of the matrix $\Psi^\textrm{abs}_\pi$ is rather easy, there still remains the problem of optimizing over the permutations of the indices. An upper bound on the number of arrangements of the coefficients that could potentially lead to different singular values is given by \begin{equation} \label{Eq:Num1} N=\frac{(d_A\times d_B)!}{\prod_{i,j} (i+j-1)}. \end{equation} If one is only interested in whether or not there is an arrangement, such that $\text{rank}(\Psi_\pi)=1$, the number of arrangements that one has to test is at most \begin{equation} \label{Eq:Num2} N'=\frac{(d_A + d_B -2 )!}{(d_A-1)! \times (d_B-1)!}. \end{equation} As mentioned, our approach is insipired by the problem of characterizing high-dimensional entanglement tackled in \cite{kraft_characterizing_2017}; a detailed proof and discussion of Eqs. \eqref{Eq:Num1} and \eqref{Eq:Num2} can be found therein. For the case of two qubits the optimization over the permutations of coefficients can, however, easily be performed. Observe that if $\Psi^\textrm{abs}_\pi$ has rank one, it can be written as $\ketbra{a}{b}$ and we can assume without loss of generality that $a_0>a_1$ and $b_0>b_1$ (due to the freedom of absorbing the local permutations $\psi_{0j}\leftrightarrow\psi_{1j}$ and $\psi_{i0}\leftrightarrow\psi_{i1}$, which cannot change $\meas{C}_\textrm{DC}$, since they preserve both the global and the local coherences). Hence, it is optimal to permute the largest element in the upper left entry and the smallest in the lower right entry. The position of the intermediate values does not matter, since the rank is invariant under transposition. Hence we arrive at the following observation. \begin{corollary} A generic two-qubit pure state $\ket{\psi}=\psi_{00}\ket{00}+\psi_{01}\ket{01}+\psi_{10}\ket{10}+\psi_{11}\ket{11}$ has zero genuine multipartite coherence in the standard computational basis corresponding to this expansion if and only if \begin{equation} \det\mqty[\abs{\psi_{\max}} & \abs{\psi_{1}} \\ \abs{\psi_{2}} & \abs{\psi_{\min}}]=\abs{\psi_{\max}}\abs{\psi_{\min}}-\abs{\psi_{1}}\abs{\psi_{2}}=0, \end{equation} where $\psi_{\max}$ is the largest coefficient, $\psi_{\min}$ the smallest, and $\psi_{1,2}$ are the remaining two coefficients. \end{corollary} \subsection{Distributed coherence of pure two-qubit states} In this subsection we illustrate the concept of distributed coherence of Section \ref{sec:gmc} by evaluating its quantifier $\meas{C}_\textrm{DC}$ for generic two-qubit pure states. Again, we consider the generic form of a pure state, \begin{equation} \ket{\psi}=\sum_{ij}\psi_{ij}\ket{ij}. \end{equation} As noticed before, $\meas{C}_\textrm{DC}$ coincides with the difference in the mutual information, given by \begin{equation} \Delta I(A:B)=\ent{S}(\varrho_A)+\ent{S}(\varrho_B)-\ent{S}(\varrho_{AB})-\ent{S}(\varrho^d_A)-\ent{S}(\varrho^d_B)+\ent{S}(\varrho^d_{AB}). \end{equation} First, note that $\ent{S}(\varrho_{AB})=0$, since the global state is pure. For the other entropies one obtains \begin{eqnarray} \ent{S}(\varrho_A)+\ent{S}(\varrho_B)&=&2\Bigg[-\qty(\frac{1}{2}+\sqrt{\frac{1}{4}-\abs{\det(\Psi)}^2})\log_2\qty(\frac{1}{2}+\sqrt{\frac{1}{4}-\abs{\det(\Psi)}^2})\notag\\ &&\quad-\qty(\frac{1}{2}-\sqrt{\frac{1}{4}-\abs{\det(\Psi)}^2})\log_2\qty(\frac{1}{2}-\sqrt{\frac{1}{4}-\abs{\det(\Psi)}^2})\Bigg]\notag\\ &=&2h\bigg(\frac{1}{2}+\sqrt{\frac{1}{4}-\abs{\det(\Psi)}^2}\bigg)\\ \ent{S}(\varrho^d_A)+\ent{S}(\varrho^d_B)&=&-(\abs{\psi_{00}}^2+\abs{\psi_{01}}^2)\log_2(\abs{\psi_{00}}^2+\abs{\psi_{01}}^2)-(\abs{\psi_{10}}^2+\abs{\psi_{11}}^2)\log_2(\abs{\psi_{10}}^2+\abs{\psi_{11}}^2)\notag\\ &&-(\abs{\psi_{00}}^2+\abs{\psi_{10}}^2)\log_2(\abs{\psi_{00}}^2+\abs{\psi_{10}}^2)-(\abs{\psi_{01}}^2+\abs{\psi_{11}}^2)\log_2(\abs{\psi_{01}}^2+\abs{\psi_{11}}^2)\notag\\ \ent{S}(\varrho_{AB}^d)&=&-\sum_{ij}\abs{\psi_{ij}}^2\log_2(\abs{\psi_{ij}}^2), \label{eq:C_DC} \end{eqnarray} where, we recall, \begin{equation} \Psi= \mqty[\psi_{00}&\psi_{01}\\\psi_{10}&\psi_{11}] \end{equation} is the matrix of coefficients in the standard computational/incoherent basis, and $h(p):=-p\log p -(1-p)\log_2(1-p)$ is the binary entropy. The above constitutes a generic expression of $\meas{C}_\textrm{DC}$ for any two-qubit pure state. It simplifies substantially for, e.g., a maximally entangled state. In the latter case, as mentioned already in Observation~\ref{obs:maxentexact}, the matrix of coefficients $\Psi = [\psi_{ij}]$ is proportional to a unitary, more precisely $\Psi=U/\sqrt{2}$, so that $|\det(\Psi)|=1/2$, and the reduced states are maximally mixed. Thus $\Delta I(A:B)=\ent{S}(\varrho_{AB}^d)$. Since $\Psi=U/\sqrt{2}$, with the columns and rows of $U$ orthonormal, we have that \[ \begin{split} -\sum_{ij}\abs{\psi_{ij}}^2\log_2(\abs{\psi_{ij}}^2) &= -2 (|\psi_{00}|^2 \log_2 |\psi_{00}|^2 + |\psi_{01}|^2 \log_2 |\psi_{01}|^2 ) \\ &= -2 \left(\frac{p}{2} \log_2 \frac{p}{2} + \frac{1-p}{2} \log_2 \frac{1-p}{2} \right)\\ &= 1 + \left(- p \log_2 p - (1-p)\log_2 (1-p)\right)\\ &= 1 + h(p), \end{split} \] with $p=2|\psi_{00}|^2=2|\psi_{11}|^2$. Thus the maximal amount of coherence for a maximally entangled state can simply be computed. It turns out that the state \begin{equation} \ket{\psi}=\frac{1}{\sqrt{2}}(\ket{0}\ket{+}+\ket{1}\ket{-})=\ket{\bullet\hspace*{-1mm}-\hspace*{-1mm}\bullet}, \end{equation} which is a two-qubit graph state \cite{hein_entanglement_2006}, has the maximum amount of distributed coherence, $\Delta I(A:B)=2$. Nonetheless, as we have seen in Observation~\ref{obs:maxentexact}, a maximally entangled two-qubit state has zero genuine distributed coherence because it can be decorrelated by an incoherent unitary; indeed, in this specific case, by applying a controlled phase gate the state $\ket{+}\ket{+}$ is obtained. \subsection{Genuine distributed coherence of pure two-qubit states} We now tackle the calculation of $\meas{C}_\textrm{GDC}$ of a given two-qubit pure state, obtained by minimizing $\meas{C}_\textrm{DC}$ over incoherent unitaries. Since the coherence $\meas{C}(\rho_{AB})$ is invariant under the action of the incoherent unitary operation, we are left with maximizing the sum of the local coherences, that is, with calculating \begin{equation} \max[\meas{C}(\varrho_A)+\meas{C}(\varrho_B)]=\max\qty{\ent{S}(\varrho^d_A)+\ent{S}(\varrho^d_B)-[\ent{S}(\varrho_A)+\ent{S}(\varrho_B)]}. \label{eq:maxlocalcoherence} \end{equation} First, note that only the maximization of the local coherences of $\varrho_A$ and $\varrho_B$ depends on the phases of the coefficients $\psi_{ij}$. The maximization of these terms is equivalent to the minimization of the square of the absolute value of the determinant of $\Psi$, \[ \abs{\det(\Psi)}^2=|\psi_{00}\psi_{11}-\psi_{01}\psi_{10}|^2=\abs{\psi_{00}}^2\abs{\psi_{11}}^2+\abs{\psi_{01}}^2\abs{\psi_{10}}^2-2\Re\qty{\psi_{00}\psi_{01}^*\psi_{10}^*\psi_{11}}. \] Here, the minimum is obtained if all the phases in the last term cancel, i.e. if the product is rotated to the positive real axis. Therefore it is justified to assume that all the $\psi_{ij}$ are real and positive, that is, to work with $\Psi^\textrm{abs}$ rather than $\Psi$; indeed, we can achieve this by means of the phase freedom in the incoherent unitary. Having optimized over the phases of the incoherent unitary, we now need to consider the optimization over permutations $\pi$ of the pairs $(i,j)$. Given the expressions in Eqs.~\eqref{eq:C_DC}, it is immediate to realize that it is sufficient to consider only the permutations given by the identity, by $(0,1)\leftrightarrow (1,1)$, and by $(1,0)\leftrightarrow (1,1)$. That is, the three arrangements of coefficients that could potentially lead to different values of the quantifier are the following: \begin{eqnarray} \Psi= \mqty[\psi_{00}&\psi_{01}\\\psi_{10}&\psi_{11}],\quad\Psi'= \mqty[\psi_{00}&\psi_{11}\\\psi_{10}&\psi_{01}],\quad\Psi''= \mqty[\psi_{00}&\psi_{01}\\\psi_{11}&\psi_{10}]. \label{eq:rearrangements} \end{eqnarray} Thus, we have found that, for any given two-qubit pure state, one can compute the value of $\meas{C}_{\textrm{GDC}}$ by evaluating the quantities in~\eqref{eq:C_DC} with the use of the absolute values of the amplitudes, and for all the rearrangements~\eqref{eq:rearrangements}, then picking the arrangement that realizes \eqref{eq:maxlocalcoherence}. By optimizing numerically~\footnote{We used the function NMaximize in Wolfram Mathematica 11.0.1.0.} over the amplitudes $\psi_{ij}$ for a two-qubit pure state, we observe that the largest amount of genuine distributed coherence is achieved by pure states with coherence rank equal to three, rather than maximal (that is, four). More precisely, we find that a state with the largest genuine distributed coherence is \begin{equation} \label{eq:maximalGDC} \ket{\psi}=\frac{1}{\sqrt{3}}(\ket{00}+\ket{01}+\ket{10})=\frac{1}{\sqrt{3}}(\sqrt{2}\ket{0}\ket{+}+\ket{1}\ket{0}), \end{equation} which has reduced states \[ \rho_A=\rho_B = \frac{2}{3}\ketbra{+}+\frac{1}{3}\ketbra{1}. \] Such a state has global coherence $\meas{C}(\ketbra{\psi})=\log_2 3$ and local coherences $\meas{C}(\rho_A)=\meas{C}(\rho_B)=h(1/3)-h((3+\sqrt{5})/6)$, so that it has distributed coherence \[ \log_2 3 - 2(h(1/3)-h((3+\sqrt{5})/6))\approx 0.8485, \] which can not be further decreased by incoherent unitaries, as evident from Eqs. \eqref{eq:C_DC} and from the discussion in this subsection. States that have the same amplitudes as $\ket{\psi}$, up to phases and to relabelling of the elements of the incoherent basis, have the same genuine distributed coherence and even the same distributed coherence. More in general, taking into account our discussion on the optimization of phases, so that only real positive $\psi_{ij}$ need to be considered to find a maximum for $\meas{C}_{\textrm{GDC}}$, one is led to consider the class of rank-three states characterized by points in the first octant on the three-dimensional unit sphere, which can be written using spherical coordinates: \begin{equation} \label{eq:rankthreeGDC} \ket{\psi}=\sin(\theta)\cos(\phi)\ket{00}+\sin(\theta)\sin(\phi)\ket{01}+\cos(\theta)\ket{10}, \end{equation} where $\theta,\phi\in\qty[0,\pi/2]$. In Figure \ref{fig:maxGDC} we have plotted the genuine distributed coherence $\meas{C}_{\textrm{GDC}}$ as a function of $\theta$ and $\phi$, which shows graphically how, within this class, the state \eqref{eq:maximalGDC} is optimal. \begin{figure}[t!] \centering \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[height=2.2in]{maxGDC} \end{subfigure} ~ \begin{subfigure}[t]{0.45\textwidth} \centering \includegraphics[height=2.2in]{maxGDCdensity} \end{subfigure} \caption{Genuine distributed coherence $\meas{C}_{\textrm{GDC}}$ for the class of states described in Eq.~\eqref{eq:rankthreeGDC}.} \label{fig:maxGDC} \end{figure} It is worth remarking that the state Eq. \eqref{eq:maximalGDC} that has the largest amount of genuinely distributed coherence has a structure similar to that of the four-qubit state that was shown to have the largest amount of genuine multilevel entanglement (see Ref. \cite{kraft_characterizing_2017}, in particular Observation 2): \begin{equation} \ket{\xi}=\frac{1}{\sqrt{3}}\qty(\ket{00}+\ket{11}+\ket{22})_{AB}. \end{equation} This state cannot be reproduced by two pairs of (potentially entangled) qubits together with arbitrary local unitary operations on Alice's and Bob's qubits respectively; that is, \[ \ket{\xi}_{AB}\neq U_{A_1A_2}\otimes V_{B_1B_2}\ket{\psi_1}_{A_1B_1}\ket{\psi_2}_{A_2B_2}, \] for any two qubit states $\ket{\psi_1}$ and $\ket{\psi_2}$, and any two-qubit unitaries $U$ and $V$. Interestingly, however, the state $\ket{\xi}$ can be produced from the state \eqref{eq:maximalGDC}. Think of the latter as being the state of the two qubits held by Alice, and let such qubits each interact independently with one qubit of Bob, initially prepared in the state $\ket{0}$, via a $\ent{CNOT}$, so to obtain \begin{align*} &\quad( \ent{CNOT}_{A_1B_1}\otimes \ent{CNOT}_{A_2B_2})\bigg[\frac{1}{\sqrt{3}}\qty(\ket{00}+\ket{01}+\ket{10})_{A_1A_2}\otimes\ket{00}_{B_1B_2}\bigg]\\ &=\frac{1}{\sqrt{3}}\qty(\ket{0000}+\ket{0101}+\ket{1010})_{A_1A_2B_1B_2}\\ &=\frac{1}{\sqrt{3}}\qty(\ket{00}+\ket{11}+\ket{22})_{AB}. \end{align*} with the identification/relabeling $\ket{0}_A = \ket{00}_{A_1A_2}$, $\ket{1}_A = \ket{01}_{A_1A_2}$, $\ket{2}_A = \ket{10}_{A_1A_2}$, and $\ket{3}_A=\ket{11}_{A_1A_2}$ (similarly for Bob's systems). We find this to be an additional indication of the similarity existing between the theory of coherence and the theory of entanglement, and of the role that the (generalized) $\ent{CNOT}$ plays in the mapping between coherence and entanglement~\cite{streltsov_measuring_2015,theurer_resource_2017,regula_converting_2017} as well as between general quantumness (of correlations) and entanglement~\cite{piani_all_2011,gharibian_characterizing_2011, piani_quantumness_2012} \section{Conclusions} We have introduced a quantifier of genuine distributed coherence for multipartite systems. It is based on the combination of a quantifier of distributed coherence---the gap between global and local coherences---together with a minimization of such a quantifier over all possible global incoherent unitaries. This is justified by the fact that in principle, in the framework established by \cite{baumgratz_quantifying_2014}, and considering the natural choice of global incoherent basis as product of the local incoherent bases, incoherent unitaries that permute, up to a phase, elements of such a global basis are `free'. We remark that there is an on-going debate about the right class of `incoherent operations' that should be considered as free, in particular taking into account that one can distinguish between speakable and unspeakable notions of coherence~\cite{marvian_how_2016,chitambar_critical_2016,streltsov_colloquium_2017}. The class of unitaries we consider as free makes the theory developed in this paper be about speakable coherence. Nonetheless, the starting quantifier $\meas{C}_\textrm{DC}$ of distributed coherence is well-defined also in other frameworks, and one could define alternative measures of genuine distributed coherence minimizing over other meaningful classes of unitaries. If one such class was to be either a subset or a superset of the class of incoherent unitaries we do consider in the present paper, then our genuine-distributed-coherence quantifier would play the role of upper bound or lower bound, respectively, on such said alternative quantifier of genuine distributed coherence. Given that the class of unitaries \eqref{Eq:IncoherentUnitary} is the most general that preserves incoherent states, our quantifier is more likely to play the role of lower bound in future studies in other resource-theoretic frameworks. For that matter, we like to imagine that our approach to quantify genuine distributed coherence may contribute to the discussion about the validity and consistency of alternative resource-theoretic frameworks. Even staying within our framework, plenty of problems and possible venues of research stay open. While we have given numerical evidence that the state \eqref{eq:maximalGDC} is the two-qubit state that exhibits the largest value of genuine distributed coherence $\meas{C}_\textrm{GDC}$, an analytical proof is lacking. Also, obviously, it would be good to generalize our detailed analysis also to higher dimensions, mixed states, and multipartite systems. In particular, with respect to the point of considering multipartite systems, we observe that our quantifiers $\meas{C}_\textrm{DC}$ and $\meas{C}_\textrm{GDC}$ do not distinguish between (genuine) distributed coherence that involves only a limited number of parties, and coherence that involves many or all parties. This ties with another notion of `genuine' multipartite properties, like `genuine multipartite entanglement'~\cite{acin_classification_2001,coffman_distributed_2000,dur_three_2000,guhne_entanglement_2009,horodecki_quantum_2009}, where one cares whether all parties contribute to the property simultaneously. While this kind of concept was explored in, e.g., \cite{radhakrishnan_distribution_2016}, we believe more could be done, even just at the level of distributed coherence like the one captured by $\meas{C}_\textrm{DC}$. One could then still further consider the issue of redistributing coherence by means of incoherent global unitary transformations. Going in this direction, one could study a sort of `supergenuine multipartite coherence', where one takes into account at the same time both the issue of how many parties contribute to the coherence, and of the ability to redistribute coherence `freely' by means of incoherent unitaries. Finally, there is the open question of what kind of effects / uses may be related to genuine distributed coherence, as well as of the means to detect such form of coherence, e.g., by means of suitably defined witnesses, like it can be done for coherence and multilevel coherence~\cite{napoli_robustness_2016,piani_robustness_2016,ringbauer_quasi-device-independent_2017}. \section*{Acknowledgements} We acknowledge support by the Foundational Questions Institute under the Physics of the Observer Programme (Grant No. FQXi-RFP-1601). We thank Xiao-Dong Yu for useful discussions, and Gerardo Adesso for feedback on a preliminary version of this manuscript. Part of this work was conducted during the 657$^\mathrm{o}$ WE-Heraeus Seminar “Quantum Correlations in Space and Time”, and we gratefully acknowledge the support and the hospitality of the WE-Heraeus Foundation and of the Physikzentrum Bad Honnef.
\section*{Abstract} With recent developments in nanotechnology, self-assembled structures are providing convenient, cheaper and more precise ways of manufacturing various patterns and shapes with less complexity. Of these self-assembled structures, rolled-up nano-tubes play a vital role in various aspects. The notion is, the utilization of strain energy developed during epitaxial growth of a bilayer thin film over a substrate, mediated by a sacrificial layer. While the sacrificial layer is etched, the bilayer film is subjected to release its own in-built strain energy in the out-of-plane direction (3D structure) due to a bending stress induced by biaxial strain through the thickness, in the bilayer. This paper proposes a new method of fabricating conical self-rolled assembly by thickness and strain variations along the width of the bilayer and, cylindrical structure of variable radius due to thickness and strain variations along the length.\\ {\emph{Keywords}}: thin Film; bilayer; cone; finte element analysis\\ \section{Introduction} \label{S:1} Neoteric advances on self-assembly of various thin film structures\cite{schmidt,prinz,zhang2,schmidt2,zhang,chen,hamley,fedor} have prompted for proliferated research at nano-scale. Some of the prominent contributions in the field of self-assembled bilayer thin film systems (a double layered film) are nano-tubes\cite{schmidt,prinz,zhang2}, nano-scrolls\cite{zhang,chen,bell}, nano-rings\cite{schmidt2,zhang2}, etc.. It is a result of out-of-plane deformation of the bilayer due to a through thickness gradient of eigenstrain developed during the epitaxial growth of the film over the substrate. However, initially, the bilayer being strongly bonded to the substrate, the bilayer remains strained. The implication thus, is to overcome this bond energy, achieved by etching, and releasing the eigenstrains (due to lattice mismatch of film and substrate) in specific direction, in the form of rolling-up and/or wrinkling\cite{fedor} of the bilayer\cite{cendula}. These structures contribute significantly to a wide variety of interest in fields of drug delivery\cite{hamley}, nano-tools\cite{solovev}, photonics\cite{kipp,li,quinones}, nano-jets and engines\cite{baraban,fennimore,mei,solovev2}, and thus, it makes a significant topic for exploration of different patterns caused by the interplay between geometry and strain, specially due to its precise assembly\cite{chen2}. \\ Previously, simulation works have been explored along with experimental backings for radius estimates\cite{nikishkov2}, moving boundary analysis \cite{huang} to simulate progressive etching, bending and wrinkling mode preference\cite{cendula}, side of roll preference\cite{chun, alben}, twisting\cite{chen}, etc.. \\ In some of the recent works, cone shaped nanostructures have also been made\cite{fomin,gao,quinones} for the nano-jets and nano-motors. One of the methods is, by taking thickness gradient and/or strain gradient along the width, as observed in \cite{fomin}. Although not explicitly mentioned or worked upon previously, these gradients contribute to a lot of variations for the precise self-assembly of conical or coiled structures. \\ In this paper, a new method for fabricating conical bilayer structures is presented and, we further investigate the effect of geometric parameters (thickness, length and width) of the initial bilayer and strain variation (decoupled), on the final geometry, separately. Similarly, investigation of thickness and strain variations along the length of the bilayer, is also presented. \section{Model setup} The formulation of a bilayer model is based on a multilayered plate system of Reissner-Mindlin plates\cite{reissner,mindlin} combined with F\"{o}ppl-von K\'{a}rm\'{a}n\cite{landau} equations for non-linear deformation, as the rolled-up assembly of the bilayer is subjected to small strains with large rotations. The roll-up process is simulated using Finite Element Method with the aid of commercial package ABAQUS\cite{abaqus}. \noindent The material properties (Young's modulus and Poisson's ratio) for the bilayer consisting of linear elastic isotropic Silicon (top layer) and Si$_x$Ge$_{1-x}$ (bottom layer) are taken as $E_1 = 170$ GPa, $\nu_1 = 0.22$\citep{sharpe} and $E_2 = 166.15$ GPa, $ \nu_2 = 0.2775$ ($x ~ 0.9$), respectively.\\ \noindent In this section, thickness of a free-hanging bilayer is varied linearly, without any cohesive layer or substrate as shown in Fig.~\ref{3}. Also, strain in the Si$_{x}$Ge$_{1-x}$ layer is varied separately for a uniformly thick (both the layers of same non-varying thickness) free-hanging bilayer as shown in Fig.~\ref{14}.\\ The model consists of a bilayer, fixed at left end of the longer edge along the width and free at the other, with length $l=$ 20 $\mu$m and a linearly tapered, symmetric thickness cross-section, for thickness gradient along the width ($w$) (Fig.~\ref{3a}) and along the length ($l$) (Fig.~\ref{3b}). Eigenstrain is fixed at $2\%$ for all thickness variation analysis. For the thickness variation along the width, we first keep the taper ratio ($t_o/t_i$) constant, varying only the width, to simulate the effects of taper angle (the angle formed by the thickness gradient) by varying aspect ratio ($w/l$). Here, $t_i$ and $t_o$ are the total thickness of bilayer at small thickness and large thickness edge, respectively.\\ The effect of the variation of taper angle is further studied, by keeping $t_i$ and $w/l$ constant and varying $t_o$. Taper angle, thus, is varied in terms of taper ratio.\\ Finally, the effect of average thickness ($(t_o +t_i)/2$) for same taper angle/taper ratio was studied by keeping initial taper ratio as 5 and then adding 10 to 40 nanometers to the whole bilayer, terming this as average thickness increment, uniformly by maintaining proportionality in thickness of the layers as (1:1) in the bilayer. Width is also varied for each average thickness case, for the complete study. \begin{figure}[!htbp] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[width=\linewidth]{tapered} \put(-10,30){$t_i$} \put(-177,61){$t_o$} \put(-170,78){Fixed end} \put(-50,-7){Free end} \caption{} \label{3a} \end{subfigure} \begin{subfigure}{0.45\textwidth} \includegraphics[width=\linewidth]{taperlength1} \put(-170,115){Fixed end} \put(-50,-7){Free end} \caption{} \label{3b} \end{subfigure} \caption{(a) Tapered thickness along the width and (b) Tapered thickness along the length in a bilayer system}\label{3} \end{figure} \noindent Similarly, for strain gradient ($0.75\%$ to $3\%$) along the length and along the width ($0.5\%$ to $3\%$), bilayer with uniform cross section (with 30 nm thickness of a layer) is used with equal thickness for both layers. Minimum strain along the length was chosen as $0.75\%$ so as to observe higher deformation/rotation (also, to overcome the effects of fixed boundary). Likewise, minimum strain of $0.5\%$ is chosen for gradient along the width so as to avoid strain free condition and provide some bending moment at the respective edge. \\ \begin{figure}[!htbp] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{straingradwidth} \caption{} \label{14a} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{straingradlength} \caption{} \label{14b} \end{subfigure} \caption{a) Strain gradient along the width and b) Along the length in a bilayer system}\label{14} \end{figure} Rolled-up cylindrical nano-tubes have certain radius ($R$), which depends on the ratio of thickness ($t_1/t_2$) of the individual layers in a bilayer, and on strain difference in upper (subscript 1) and lower layer (subscript 2), $\delta \epsilon=\epsilon_1-\epsilon_2$ ($\epsilon$ represents strain), and material modulus ratio $\chi= Y_1/Y_2$, according to \cite{nikishkov} \begin{equation} R = \frac{Y^2_1 t^4_1+ Y^2_2 t^4_2 + 2 Y_1 Y_2 t_1 t_2 (2t^2_1+2t^2_2+3t_1t_2)}{6 Y_1 Y_2 t_1 t_2 (t_1+t_2)(\eta_1\epsilon_1-\eta_2\epsilon_2)} \end{equation} where, $Y_1=E_1/(1-\nu^2_1), Y_2=E_2/(1-\nu^2_1)$ and $\eta_{i}=1$, for plane strain condition. \begin{figure}[!htbp] \centering \includegraphics[width=0.5\linewidth]{sampleradius.pdf} \caption{Projection of trace of a longitudinal edge of a sample rolled up uniform bilayer of certain uniform strain in lower layer (S$i_{x}$Ge$_{1-x}$ layer) and no strain in upper layer (Si layer) on to $xy$-plane.} \label{new} \end{figure} The projection of trace of a longitudinal edge of rolled-up bilayer, initially in $xy$-plane before rolling-up, on to the $xy$ - plane is observed to be a straight line, as in Fig.~\ref{new}. However, this deviates for the thickness variation of bilayer along the width and strain gradient along the width, as discussed below. \subsection{Effects of thickness variations along the width of a free standing bilayer film} \begin{figure}[!htbp] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{try4} \caption{} \label{4a} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{try1} \caption{} \label{4b} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{sample.pdf} \caption{} \label{4c} \end{subfigure} \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{sample2.pdf} \caption{} \label{4d} \end{subfigure} \caption{a) Conical structure formed by thickness gradient along the width, b) Tracing the deformed small thickness edge, c) Projection of small thickness edge on $xy$-plane and d) Projection of large thickness edge on $xy$-plane.}\label{4} \end{figure} In this section, we study the effect of geometry, i.e., taper angle (by taper ratio ($t_o / t_i$)), aspect ratio ($w/l$) variation (by varying width) and average thickness ($(t_o + t_i)/2$) variation (same taper ratio, adding overall thickness), on the cone angle, pitch and radius of the rolled-up tube. Due to the asymmetry introduced through tapered cross section, the film also bends in $y$-direction, as shown in Fig.~\ref{4}. This leads to formation of a helical roll with increasing pitch, as a direct consequence of varying bending stiffness along the width. Conical shapes due to thickness gradient along the width, have been previously observed experimentally\cite{fomin}. However, there was no systematic study on such conical system in literature to the best of our knowledge. \par\noindent We study the change in pitch, for different aspect ratio ($w/l$), taper ratio ($t_o / t_i$) and average thickness, between same extrema number, starting from fixed end to free end as depicted in Fig.~\ref{4c}. All the variations were studied by tracing and projecting the deformed state of small thickness edge and large thickness edge on the $xy$-plane as shown in Fig.~\ref{4c} and ~\ref{4d}, respectively.\\ \subsubsection{Effects of width variation} \begin{figure}[!htbp] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{p_width_i.pdf} \caption{} \label{6a} \end{subfigure} \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{p_width_o.pdf} \caption{} \label{6b} \end{subfigure} \caption{ Aspect ratio effect: a) Pitch variation plot for small thickness edge and b) For large thickness edge}\label{6} \end{figure} \begin{figure}[!htbp] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{d_e_thickness.pdf} \caption{} \label{7a} \end{subfigure} \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_width.pdf} \caption{} \label{7b} \end{subfigure} \caption{ Aspect ratio effect: a) Location of an extrema along median wave-line path $d$ for different aspect ratios ($w/l$) from fixed end to free end of an edge's projection plot and b) Normalised radius ($r/l$) (non-solid lines) and normalised cone angle}\label{7} \end{figure} It can be observed from Figs.~\ref{6} and ~\ref{7a}, as the aspect ratio $w/l$ increases, number of turns increase for both small thickness edge and large thickness edge, resulting in formation of a compact conical roll. Fig.~\ref{6} suggests, more the aspect ratio ($w/l$), lesser the pitch ($p$) becomes, between two extrema number (read as a curve in Fig.~\ref{6}), i.e., for a given turn number, for both small thickness edge and large thickness edge. It may further be noted that the increase in the number of turns with increase in the aspect ratio ($w/l$) is quantitatively larger for the small thickness edge than the large thickness edge. This is due to lower bending stiffness of the small thickness edge compared to the large thickness edge. While the radius of any given section along the length of the bilayer remains same, it linearly increases from small thickness edge (smallest radius) to large thickness edge (largest radius), forming a constant cone angle, as shown in Fig.~\ref{7b}, which decreases as the aspect ratio ($w/l$) increases. Thus, supporting the previous statement of compactness, as indicated by Fig.~\ref{6}. Fig.~\ref{7b} also indicates that the radius of any longitudinal section of the bilayer is independent of the aspect ratio ($w/l$). Note that the thickness of the film changes at a longitudinal section with width variation for a given $t_o$ and $t_i$. Hence, it may be concluded that for a given thickness the radius remains independent of the aspect ratio ($w/l$). However, this radius can't be obtained from equation (1) due to the effects of thickness variation along width.\\ \subsubsection{Effects of taper ratio ($t_o / t_i$)} Fig.~\ref{8a} and~\ref{8b} show the effect of varying taper ratio ($t_{o}$/$t_{i}$) for a given width of the bilayer, on the geometry of conical roll. The value of $t_i$ is taken as 10 nm while the value of $t_o$ is varied. As the taper ratio increases (See Fig.~\ref{8a} and ~\ref{8b}), the number of turns decreases, and hence, the pitch between two particular extrema increases. As observed and stated previously, the radius for the same thickness remains the same and increases with increasing thickness at the large thickness edge (as thickness of outer edge is varied) as observed in Fig.~\ref{8c}. The overlapping of curves for different widths for small thickness edge reiterates the prediction. The cone angle increases with increasing the taper ratio ($t_{o}$/$t_{i}$) as shown in Fig.~\ref{8d}, and decreases with increase in aspect ratio, for a fixed taper ratio, as observed previously in Fig.~\ref{7b}. \begin{figure}[!htbp] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{14_p_taper_i.pdf} \caption{} \label{8a} \end{subfigure}% \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{14_p_taper_o.pdf} \caption{} \label{8b} \end{subfigure}% \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_taper1.pdf} \caption{} \label{8c} \end{subfigure}% \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_taper2.pdf} \caption{} \label{8d} \end{subfigure}% \caption{Taper ratio effect: a) Pitch variation plot for small thickness edge, b) For large thickness edge, c) Normalised radius ($r/l$) and d) Normalised cone angle}\label{8} \end{figure} \subsubsection{Effects of average thickness variation} In this section, we study the effect of increasing the film thickness at both the large thickness edge and small thickness by the same amount thus keeping the taper angle constant for a particular width. In other words, the average thickness ($(t_o +t_i)/2$) is increased keeping the thickness of each layer proportional (1:1). Note that, for any given average thickness in the case of different widths, the thickness of either of the longitudinal edge is fixed and constant for different widths. With the increase in average thickness (measure of thickness in $xz$-plane), the number of turns decrease and pitch increases linearly as shown in Figs.~\ref{9a} and ~\ref{9b}, for the small thickness edge and the large thickness edge, respectively.\\ Radius increases linearly and equally for both small thickness and large thickness edge, with increasing average thickness, due to increasing bending stiffness and as indicated by the parallel lines of both edges (see Fig.~\ref{9c}). The cone angle remains constant as the taper angle is maintained same (Fig.~\ref{9d}), independent of average thickness. Variation of the cone angle with aspect ratio, is in accordance with previous observations, which is, the cone angle decreases with increasing aspect ratio as taper angle is also changing with the aspect ratio (Fig.~\ref{7b}). \begin{figure}[!htbp] \centering \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{14_p_thick_i1.pdf} \caption{} \label{9a} \end{subfigure}% \hfill \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{14_p_thick_o1.pdf} \caption{} \label{9b} \end{subfigure}% \hfill \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_thick1.pdf} \caption{} \label{9c} \end{subfigure}% \hfill \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_thick2.pdf} \caption{} \label{9d} \end{subfigure}% \caption{Average thickness effect (taper angle fixed): a) Pitch variation plot for small thickness edge, b) For large thickness edge, c) Normalised radius ($r/l$) (non-solid lines) and d) Normalised cone angle} \label{9} \end{figure} \noindent Thus, it can be inferred that, for the thickness variation along the width, the deformation in $y$-direction is due to bending moment arising from the stiffness variation along that direction. Thus, the pitch so obtained increases continuously as the bending stiffness variation is also continuous. Radius for a particular average thickness remains the same as the same bending stiffness at that longitudinal section and the same strain is acting in that plane (initially $xz$-plane). The structure so obtained is a variation of surface of a helicoid with varying pitch and straight line generatrix with a cylindrical directrix whose parametric equation is given by \cite{kriv}. \subsection{Thickness tapering along the length} The effects of variation of thickness along the length are studied in this section. The initial configuration of the bilayer is depicted in Fig.~\ref{3b}. The shape obtained after straining to the bilayer, is that of a tube with increasing radius (free end to fixed end) (See Fig.~\ref{10a}). The radius thus obtained, is a function of thickness.\\ The FE model predicts variable radius, and is in very good agreement with the analytical solution (equation (1)) for a given thickness at a given position along the length, as shown in Fig.~\ref{10c}. The radius of curvature for a given thickness of a uniform thickness bilayer, was calculated using equation (1), obtaining different radius for different thickness of the uniform bilayer and plotted in Fig.~\ref{10c} along withthe radius of curvature for a linearly tapered thickness along the length of the bilayer system. The FE analysis plot depicts the radius at a particular point of the tapered bilayer along the length. \begin{figure}[!htbp] \centering \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{newlengthtaper.jpg} \put(-195,12){Fixed end} \put(-60,7){Front view} \caption{} \label{10a} \end{subfigure} \hfill \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width=\linewidth]{radiusgrad1.pdf} \caption{} \label{10c} \end{subfigure} \caption{a) Effect of tapered thickness and strain gradient along the length in a bilayer system and b) Evolution of radius with thickness variation ($50$ to $10$ nm) and strain variation ($0.75\%$ to $3\% $) (left to right, linearly)} \label{10} \end{figure} \subsection{Effects of strain gradient along the width} In this section, we present the results concerning the second methodology, i.e., simulations by strain engineering to fabricate conical films. First, we discuss the system with strain gradient along the width of the film and then along the length of the film (discussed in the next section). The values of strains at small strain edge and large strain edge for both the cases are shown in Figs.~\ref{14a} and \ref{14b}. Note that in this section, the thickness of the bilayer film is taken as 30 nm (each layer) and is uniform in all simulations for the mentioned strain gradient.\\ \begin{figure}[!hb] \centering \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{p_temp_i1.pdf} \caption{} \label{11a} \end{subfigure}% \hfill \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{p_temp_o1.pdf} \caption{} \label{11b} \end{subfigure}% \hfill \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_temp1.pdf} \caption{} \label{11c} \end{subfigure}% \hfill \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_temp2.pdf} \caption{} \label{11d} \end{subfigure}% \caption{Strain gradient effect: a) Pitch variation for large strain edge, b) For small strain edge, c) Normalised radius ($r/l$) (referred by edge) and d) Normalised cone angle and normalise spiral angle} \label{11} \end{figure} \noindent Figs.~\ref{11a} and \ref{11b} show the variation of normalized pitch as a function of aspect ratio ($w/l$) of the film for large strain edge and small strain edge, respectively (0.5$\%$ strain at an edge is termed small strain edge and 3$\%$ at the other edge is termed as large strain edge). It can be observed that the number of extrema increases and the pitch decreases with increase in the aspect ratio ($w/l$). However, the edges are switched, i.e., the edge with higher strain curls in smaller radius. The effects of strain gradient along the width for different aspect ratios ($w/l$) as shown in Fig.~\ref{11} are similar to the effects due to thickness variation along the width as shown in Figs.~\ref{6} and \ref{7}.\\ \begin{figure}[!htbp] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{32_p_thicktemp_i.pdf} \caption{} \label{12a} \end{subfigure}% \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{32_p_thicktemp_o.pdf} \caption{} \label{12b} \end{subfigure}% \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_thicktemp1.pdf} \caption{} \label{12c} \end{subfigure}% \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{a_rad_thicktemp2.pdf} \caption{} \label{12d} \end{subfigure}% \caption{Average thickness effect (on strain variation model): a) Pitch variation for large strain edge, b) For small strain edge, c) Normalised radius ($r/l$) (referred by edge) and d) Normalised cone angle and normalised spiral angle}\label{12} \end{figure} \noindent Effect of average thickness on the normalized pitch for width 32 $\mu$m, is shown in Figs.~\ref{12a} and \ref{12b}. Here, the average thickness is the average of the thickness of top and bottom layers of the bilayer. Note that the number of turns and the pitch variation in this case are less compared to the case of film with uniform strain and thickness gradient along the width (see Figs.~\ref{9a} and \ref{9b}). Fig.~\ref{12c} shows the radius variation as a function of average thickness and Fig.~\ref{12d} shows the cone angle and spiral angle (spiral angle is the term used for angle formed by a linear increase in radius of a longitudinal section of the bilayer film from fixed end to free end) as a function of average thickness. The radius of the roll increases (see Fig.~\ref{12a}) with increase in average thickness due to increased bending stiffness for both the small strain and large strain edges. However, it is worth noting that the rate of change of radius with thickness is not the same for both the edges unlike the case of the thickness variation along the width (Fig.~\ref{9c}). This different rates of radius variation with the average thickness for both the edges (Fig.~\ref{12a}) may be attributed to the existence of spiral angle. \\ \noindent Thus, comparative observations can be made with the thickness variation along the width, with an additional angle of spiral as depicted in Fig.~\ref{13a}. The spiral angle remains constant for three or more maxima as observed in Fig.~\ref{11d}, and thus, is independent of the strain gradient. Also, as seen in Fig.~\ref{12d}, the cone angle remains same since there is no change in the strain gradient, but the spiral angle increases with the increase in overall stiffness which in turn is due to the increase in the average thickness. Due to the spiral angle effect, only the initial radius (starting radius of helical spiral) (first turn on the conical tube), of various edges, is relevant for defining the rolled-up assembly.\\ Note that below three maxima of large strain edge, it is not possible to get a proper spiral angle, due to the effect of fixed boundary condition on the first maxima and minima. Also, beyond a total thickness of 80 nm of the bilayer, the edge with small strain does not roll in a complete turn, thus, some measurements are not possible for those cases (cone angle, radius of the small strain edge).\\ The spiral angle comes in effect due to the strain being bi-directional, hence, it can relax in the plane of the bilayer. It was not so in the case of thickness variation along the width as bending stiffness was limited to one direction, and is a fixed entity for the entire bilayer.\\ In conclusion, It was observed that the thickness variation along the width has a larger effect (with direct proportionality) on the radius, cone angle and pitch variation, as compared to the strain variation (with inverse proportionality). \begin{figure}[!htbp] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{sampleamp.pdf} \caption{} \label{13a} \end{subfigure}% \hfill \begin{subfigure}{0.49\textwidth} \includegraphics[width=\linewidth]{d_e_strain.pdf} \caption{} \label{13b} \end{subfigure}% \caption{a) Depiction of spiral angle and, b) Location of an extrema along median wave-line path $d$ for different aspect ratios ($w/l$) from fixed end to free end of an edge's projection plot} \label{13} \end{figure} \subsection{Effects of strain gradient along the length} In this section, we present the results corresponding to the case of a bilayer film subjected to variation of strain along the length of the film. The values of strain at the fixed and the free lateral edges are shown in Fig.~\ref{14b}. Note that the strain at the free edge is 3$\%$ and at the fixed edge is 0.75$\%$ with a linear variation. The simulation predicts variable radius as shown in Fig.~\ref{10} showing a very good agreement with the analytical solution (equation (1)) (same procedure was followed in calculations as for thickness taper along the length).\\ Here, it can be concluded that the thickness variation along the length has lower effects on the bilayer radius (with direct proportionality) compared with the strain variation along the length (with inverse proportionality). \section{Conclusions} We propose a novel method to fabricate conical tubes based on the same principle of out-of-plane deformation of bilayer thin films. It has been shown that by varying the thickness or strain along the width of the bilayer film, it is possible to obtain conical tubes of different geometrical properties. Detailed analysis on the effects of thickness variation and strain variation along the width is conducted to quantify the geometry of the thus formed cones. It was observed that the cone angle is directly influenced by the taper angle and the strain gradient. The radius of the cone at a given section is influenced by thickness (direct proportionality) and strain (inverse proportionality) at that section. The radius remains constant for a given longitudinal section of uniform thickness in the case of thickness gradient along the width. But in the case of strain gradient along the width, the radius of a given longitudinal section shows an increase in radius from fixed end to free end, which is counter intuitive. The radius change along the width of the film results in the cone angle and the radius change along the length (discussed in the previous sentence) results in spiral angle. The spiral angle appears in the rolled-up geometry of the conical bilayer for the strain variation case alone, due to the non-equi-biaxial nature of the eigenstrains. In the case of thickness variation along the width, we do not observe a spiral angle formation due to the equi-biaxial state of strain. The geometry of the cone is described by helices of constant radius and variable pitch for the thickness variation. In the case of a uniform thickness bilayer film with strain gradient along the width, the helices will be of increasing radius with variable pitch. It has been observed that the strain (or thickness) variation along the length of the film results in the formation of spiral geometry.\\ The work presented here can be helpful in predicting the dimensions of the resultant geometrical features of the rolled-up tubes and cones for a given initial geometry of the film and the eigenstrain. Thus, the methodologies int his work may help designers to come up with novel fabrication strategies of micro and nano-scale three dimensional objects from two-dimensional geometries through strain and geometry engineering. \bibliographystyle{elsarticle-num-names}
\section{Introduction} We are interested in the optimal control of the following non-smooth evolution problem. Let $\Omega \subset \mathbb{R}^d$ be a bounded Lipschitz domain, $d\in \mathbb{N}$, and $I:=(0,T)$ an interval. Let us define dissipation and energy functional by \begin{equation} \mathcal{D} \colon \; H^1_0(\Omega) \to \mathbb{R}, \quad \mathcal{D}(v) := \int_\Omega \vert v\vert + \frac{\sigma}{2} \vert \nabla v \vert^2\; \dx, \end{equation} \begin{equation} \mathcal{E}\colon H^1_0(\Omega)\times L^2(\Omega) \to \mathbb{R}, \quad \mathcal{E}(z,g):= \int_\Omega \frac{1}{2} \vert \nabla z \vert^2 -z\cdot g\; \dx . \end{equation} where $\sigma$ is a positive viscosity parameter. The function $z$ is the state of the system, while the function $g$ acts as a distributed control. Minimization of $\mathcal{E}(z(t),g(t)) + \mathcal{D}(\dot{z}(t))$ with respect to $z$ motivates the differential inclusion \begin{equation}\label{eq003} 0 \in \partial\mathcal{D}(\dot{z}) + \partial_z \mathcal{E}(z,g), \end{equation} where $\partial$ denotes the convex subdifferential. We obtain \begin{equation}\label{eq004} 0 \in \partial \vert \dot{z}(t,x) \vert - \Delta z(t,x) - \sigma \Delta \dot{z}(t,x) - g(t,x) \qquad \text{f.a.a.\@ } (t,x)\in I\times \Omega, \end{equation} where $g$ is the control and $z$ the state. The system is complemented by an initial condition $z(0)=z_0$. Due to the appearance of the subdifferential, the evolution system is inherently non-smooth. This makes the derivation of first-order necessary optimality conditions very challenging. The non-smooth evolution system can be interpreted as a simplification of models appearing in applications. Various different physical phenomena can be modelled by such non-smooth systems. This includes, e.g., electromagnetism, damage and crack propagation, and models with phase changes, see for instance the recent monograph \cite{MR2015}. In order to focus on the impact of the non-smoothness of the model on the optimization, we decided to study the simplified model with convex and quadratic energy. Let us point out connections to other models studied in the literature. Using a duality argument, we can rewrite the differential inclusion. To this end, let us introduce \[ K:= \{ v \in H^1_0(\Omega)^*\mid v \in L^2(\Omega),\; -1 \leq v \leq 1 \; \text{a.e. in}\; \Omega\}, \] which is equal to the range of the subdifferential of the $L^1(\Omega)$-norm considered as a convex function on $H^1_0(\Omega)$. As we will see in Lemma \ref{lemma: Normalenkegel}, the inclusion \eqref{eq004} is equivalent to \begin{equation}\label{eq005} \dot{z}(t) \in N_K(\Delta z(t) + \sigma\Delta \dot{z}(t) +g(t)) \qquad \text{f.a.a.\@ } t\in I. \end{equation} Thus for $\sigma=0$ the inclusion can be considered as a sweeping process in the space $H^1_0(\Omega)$. Let us emphasize two important properties of the set-valued mapping $z\mapsto N_K(\Delta z)$: first of all, the images of this mapping are either unbounded or empty. And second, due to the results of \cite{CW17} the set $K$ is not polyhedric in $H^1_0(\Omega)^*$. At least one of these two properties is used in many works on optimal control of differential inclusions. In addition, in both formulations \eqref{eq003} and \eqref{eq005} the arguments of the non-smooth mapping contain the highest-order time or spatial derivative of $z$, which points to a lack of compactness in our system. That is, the arguments of the non-smooth maps do not compactly depend on $z$ for sensible choices of function spaces. Let us comment on available literature for control of non-smooth evolution systems. Optimal control of parabolic variational inequalities of the type $y_t-\Delta y + \beta(y)=u$ with $\beta$ a maximal monotone, set-valued operator were studied for instance in the monographs \cite{NeittaanmakiTiba1994,Tiba1990}, see also the recent contribution \cite{MSusu17}. Optimal control problems of the sweeping process in finite-dimensions was studied in \cite{CHHM2012,CHHM2016}. Recent works on optimal control of differential inclusions are \cite{MW2015,PRR2017}. There, the set-valued map is assumed to have bounded images on bounded sets, an assumption that is not fulfilled in our setting. The sweeping process is related to the so-called play operator, which is the solution map of a rate-independent variational inequality. Optimal control problems of the coupling of a play operator on $\mathbb R^n$ coupled with a ODE system was studied in \cite{BK2016}, the coupling with a parabolic pde was investigated in \cite{M2017b}. In \cite{GQ2011} the control of systems contain play operators on infinite time horizons was studied. Due to the arguments above, all these results are not directly applicable to our setting. To overcome the difficulties related to the non-smoothness of the system, we follow the popular approach of smoothing the state equation. The regularization scheme is introduced in section \ref{sec3}, and its convergence properties are investigated in section \ref{section: Passing to limit in smooth equation}. Passing to the limit with the regularization parameter, allows us to obtain a first-order system, which is the main result of our paper in Theorem \ref{theorem: optimality system nonsmooth}. It turns out that the appearing adjoint functions have rather low regularity. The present work is strongly related to the earlier contribution \cite{SWW2016}. There, optimal control of an rate-independent system was studied, which corresponds to our problem with $\sigma=0$. The positive parameter $\sigma>0$ enables us to prove stronger results than \cite{SWW2016}. We comment on this at the end of Section \ref{sec74}, see Remark \ref{compare_to_SWW}. \subsubsection*{Notation and function spaces} We will work with the Lebesgue and Sobolev spaces $L^p(\Omega)$, $W^{1,p}(\Omega)$, $W^{1,p}_0(\Omega)$. In order to shorten the notation we define $H:= L^2(\Omega)$, $V:= H^1_0(\Omega)$, $V^*:= H^{-1}(\Omega):= (H^1_0(\Omega))^*$. We define the Laplace operator in a distributional sense \begin{align*} \Delta: V \to V^*: \ \langle \Delta u ,v \rangle_{V^*,V} := - \int\limits_{\Omega} \nabla u(x) \cdot \nabla v(x) \dx \end{align*} The inner product on $V$ is defined by $(u,v)_{H^1_0(\Omega)}= (u,v)_V := \int\limits_{\Omega} \nabla u(x) \cdot \nabla v(x) \dx $ and its induced norm by $\lVert u \rVert_V := \sqrt{(u,u)_V}$. Due to the zero boundary condition this norm is equivalent to the $H^1(\Omega)$-norm in the space $V$. Since we are analyzing an evolution equation, we need Bochner spaces like $L^p(I,X)$ and $H^1(I,X)$, where $X$ is a real Banach space. The state equation of interest is equipped with a zero initial condition. Therefore we define the spaces \[\begin{aligned} H^1_\star(I,X)&:= \{ u \in H^1(I,X) \mid u(0) = 0 \}, \\ H^2_\star(I,X)&:= \{ u \in H^2(I,X) \mid u(0) = 0,\; \dot{u}(0) = 0 \} , \end{aligned}\] where $\dot u$ denotes the weak derivative with respect to the time variable $t$. Moreover, we work with the standard Hilbert triple $V \hookrightarrow H \cong H^* \hookrightarrow V^*$ induced by the $L^2$-inner product in order to use $L^2(\Omega)$-functions as elements of $V^*$.\\ \section{The non-smooth optimal control problem} Let us first the define the notion of weak solutions of the differential inclusion \eqref{eq003}. \begin{definition} A function $z\in H^1_\star(I,V)$ is called weak solution of \eqref{eq003} if and only if for almost all $t\in I$ it holds \[ 0 \in \partial \vert \dot{z}(t) \vert - \Delta z(t) - \sigma \Delta \dot{z}(t) - g(t) \qquad \text{ in } V^*. \] Here, $\partial \vert v\vert$ denotes the subdifferential of the $L^1(\Omega)$-norm with respect to the space $V$. \end{definition} The state equation is uniquely solvable and we have the following theorem, which will be proven in section \ref{section: Passing to limit in smooth equation}. \begin{theorem} \label{theorem: solution non-smooth} For all $g \in H^1_\star(I,V^*)$ there exists a unique solution $z\in H^2_\star(I,V) $ of the non-smooth state equation \eqref{eq: non-smooth problem}. \end{theorem} Note that $g \in H^1_\star(I,V^*)$ and $z\in H^1_\star(I,V) $ include the conditions $g(0)=0$ and $z(0)=0$. In view of the results derived below, these conditions can be viewed as compatibility conditions at $t=0$. As a conclusion of Theorem \ref{theorem: solution non-smooth} we can define a solution operator, which maps a control to the corresponding state. \begin{equation} \mathcal{S}: \; H^1_\star(I,L^2(\Omega)) \rightarrow H^1_\star(I,H^1_0(\Omega))\quad g \mapsto z . \end{equation} We now take a closer look at the subdifferential of the non-smooth part of $\mathcal{D}$, which is $\hat{\mathcal{D}}(v):= \lVert v \rVert_{L^1(\Omega)}$ and give characterizations of the state equation via cones. To this end we define \begin{align*} K&:= \{ v \in V^*\mid v \in H,\; -1 \leq v \leq 1 \; \text{a.e. in}\; \Omega\},\\ N_K(v) &:= \{ w \in V \mid \langle w,\tilde{v}-v\rangle_{V,V^*} \leq 0 \; \forall \tilde{v} \in K \}, \\ \tilde{K}&:= \{ w \in V \mid \Delta w \in H,\; -1 \leq \Delta w \leq 1 \; \text{a.e. in}\; \Omega\} = \Delta^{-1}(K),\\ N^{\text{Hilbert}}_{\tilde{K}}(v) &:= \{ w \in V\mid (w,\tilde{v}-v)_{V} \leq 0 \; \forall \tilde{v} \in \tilde{K} \}. \end{align*} \begin{lemma} \label{lemma: subdiff L1} Let $v \in V$ and $f\in V^*$. Then it holds \begin{equation*} f \in \partial \hat{\mathcal{D}}(v) \quad \Leftrightarrow \quad f\in K \text{ and } v \in N_K(f). \end{equation*} Moreover, $f\in \partial \hat{\mathcal{D}}(v)$ implies $f\in H$ and \begin{equation*} f(x) \in \begin{cases} \{ 1 \}& \text{ if }v(x) > 0 ,\\ [-1,1] & \text{ if }v(x)= 0,\\ \{ -1 \} & \text{ if }v(x) < 0, \end{cases} \end{equation*} i.e., $f(x)$ is in the subdifferential of the absolute value function evaluated at $v(x)$ for almost all $x\in \Omega$. \end{lemma} \begin{proof} Let us denote by $\sigma_K$ be the support function and by $\delta_K$ the indicator function of $K$. Then we have the following chain of equivalences \begin{align*} f \in \partial \hat{\mathcal{D}}(v) &\Leftrightarrow f \in \partial \sigma_K(v) \\ &\Leftrightarrow f \in \partial \delta_K^*(v) \\ &\Leftrightarrow v \in \partial \delta_K(f) \\ &\Leftrightarrow \delta_K(h) \geq \delta_K(f) + \langle v,h-f\rangle_{V^*,V}\quad \forall h \in V \\ &\Leftrightarrow f\in K \; \text{and} \; 0 \geq \langle v,h-f \rangle_{V^*,V} \quad \forall h \in K \\ &\Leftrightarrow f\in K \; \text{and} \; v \in N_K(f) , \end{align*} which proves the first part of the lemma. Let now $f\in \partial \hat{\mathcal{D}}(v)$ be satisfied. We already proved in the first part $f\in H$ and $-1 \leq f \leq 1$ a.e.\@ on $\Omega$. It remains to prove \begin{equation*} f(x) \in \begin{cases} \{ 1 \}&\text{for}\; v(x) > 0 ,\\ \{ -1 \} &\text{for}\; v(x) < 0. \end{cases} \end{equation*} Assume there exists a set $M \subset \{ x \in \Omega :\ \vert v(x) \vert >0 \}$ with positive measure such that $\vert f(x) \vert< 1$ a.e.\@ on $M$. Hence there is an $\varepsilon >0$ and a set $M_\varepsilon \subset M$ with $\vert M_\varepsilon \vert >0$ such that $\vert f(x) \vert < 1-\varepsilon$ for a.a.\@ $x\in M_\varepsilon$. We obtain the existence of a $\delta >0$ and a subset $A_\delta \subset M_\varepsilon$ with $\vert A_\delta \vert > 0$ and $v(x)> \delta$ a.e.\@ on $A_\delta$. \\ Due to the positive homogeneity of $\hat{\mathcal{D}}$ we have $ f\in \partial \hat{\mathcal{D}}(v) \Leftrightarrow \hat{\mathcal{D}}(v)= \langle f,v \rangle_{V^*,V}$, see e.g. \cite[Lemma 1.3.1]{MR2015} and we obtain \begin{align*} \hat{\mathcal{D}}(v) &= \langle f,v \rangle_{V^*,V} = \int\limits_{\Omega} f(x)v(x)\, \dx = \int\limits_M fv\, \dx + \int\limits_{\{ v(x)=0 \}} fv\, \dx = \int\limits_{M_\varepsilon} fv\, \dx + \int\limits_{M\setminus M_\varepsilon} fv\, \dx \\ &\leq (1-\varepsilon) \int\limits_{M_\varepsilon} \vert v \vert\, \dx + \int\limits_{M\setminus M_\varepsilon} \vert v \vert\, \dx = \int\limits_{\Omega} \vert v(x) \vert\, \dx - \varepsilon \int\limits_{M_\varepsilon} \vert v(x) \vert\, \dx \\ &\leq \lVert v \rVert_{L^1(\Omega)} - \varepsilon \int\limits_{A_\delta} \vert v(x) \vert\, \dx \leq \lVert v \rVert_{L^1(\Omega)} - \varepsilon \delta < \lVert v \rVert_{L^1(\Omega)} = \hat{\mathcal{D}}(v), \end{align*} which is a contradiction. \end{proof} Using this lemma one can easily verify the following characterizations of the state equation. \begin{lemma} \label{lemma: Normalenkegel} Let $z \in H^1_\star(I,V)$ and $g\in H^1(I,V^*)$ be given. Then the following statements are equivalent. \begin{enumerate} \item $z$ is a weak solution of \eqref{eq003} to $g$, i.e., \begin{equation*} 0 \in \partial \vert \dot{z}(t) \vert - \Delta z(t) - \sigma \Delta \dot{z}(t) - g(t) \quad \text{in } V^* \; \text{a.e.\@ on I.} \end{equation*} \item \begin{equation} \dot{z} \in N^{\text{Hilbert}}_{\tilde{K}}(-z-\sigma\dot{z}-\Delta^{-1}g) \quad \text{in } V\; \text{a.e.\@ on I.} \end{equation} \item \begin{equation} \dot{z} \in N_K(\Delta z + \sigma\Delta \dot{z} +g) \quad \text{in } V\; \text{a.e.\@ on I.} \label{eq: normal cone} \end{equation} \end{enumerate} \end{lemma} Evolution inclusion using the normal cone are known from other problems like the sweeping process, and optimal control problems of this process are analyzed, e.g., in \cite{CHHM2012,CHHM2016}. An important difference is that in our case the time derivative of the state as well as $\Delta z$ are arguments of the normal cone mapping. In the next lemma we prove a continuity property of the solution operator $\mathcal{S}$. This lemma as well as the proof are from \cite[Lemma 3.4]{SWW2016} \begin{lemma} \label{lemma: convergence of solution operator} Let $(g_n)_{n\in\mathbb{N}} \in H^1_\star(I;H)$ be a sequence with $g_n \rightharpoonup g$ in $H^1(I,H)$. Then $\mathcal{S}(g_n) \rightarrow \mathcal{S}(g)$ in $H^1_\star(I,V)$ and in $\mathcal{C}(\bar{I},V)$. Moreover, $\mathcal{S}$ is Lipschitz continuous from $L^2(I,V^*)$ to $H^1_\star(I,V)$. \end{lemma} \begin{proof} Let us denote $z:=\mathcal{S}(g)$, $z_n:=\mathcal{S}(g_n)$. Due to the continuity of the embedding $H^1(I,H)\hookrightarrow \mathcal{C}(\bar{I},V)$ we have $g(0)= 0$. Testing \eqref{eq: normal cone} for $z$ with $\sigma \Delta \dot{z}_n + \Delta z_n + g_n$ and for $z_n$ with $\sigma \Delta \dot{z} +\Delta z + g$ we obtain by adding both inequalities and integrating from $0$ to $t$ \begin{equation*} \frac{1}{2} \lVert z(t) - z_n(t) \rVert_{V}^2 + \sigma \lVert \dot{z}-\dot{z}_n \rVert_{L^2(0,t;V)}^2 \leq \int_0^t \langle \dot{z}_n - \dot{z},g_n-g\rangle_{V,V^*} \ds. \end{equation*} Taking the supremum with respect to $t$ yields \begin{equation*} \frac{1}{2} \lVert z - z_n \rVert_{C(\bar{I},V)}^2 + \sigma \lVert \dot{z}-\dot{z}_n \rVert_{L^2(I,V)}^2 \leq \lVert \dot{z}-\dot{z}_n \rVert_{L^2(I,V)}\lVert g_n -g \rVert_{L^2(I,V^*)}. \end{equation*} Young's inequality $ab \leq \frac{\sigma}{2}a^2 + \frac{1}{2\sigma}b^2$ gives \begin{equation} \label{proof: continuity S 1} \frac{1}{2} \lVert z - z_n \rVert_{C(\bar{I},V)}^2 + \frac{\sigma}{2} \lVert \dot{z}-\dot{z}_n \rVert_{L^2(I,V)}^2 \leq \frac{1}{2\sigma} \lVert g_n -g \rVert_{L^2(I,V^*)}^2. \end{equation} From the Aubin-Lions lemma, see, e.g., \cite{A1963,L1969}, we know that the embedding $H^1(I,H) \hookrightarrow L^2(I,V^*)$ is compact, which proves the assertion. \end{proof} \begin{remark} The proof shows explicitly $\mathcal{S}(g_n) \to \mathcal{S}(g)$ in $\mathcal{C}(\bar{I},V)$. However, this is also a consequence of the continuity of the embedding $H^1_\star(I,V)\hookrightarrow \mathcal{C}(\bar{I},V) $. \end{remark} We will use the previous lemma to show existence of solutions of the optimal control problem \eqref{eq: non-smooth problem} below. In order to formulate the optimal control problem, we take two functions \begin{align} &j_1:\; L^2(I;V) \to \mathbb{R}, \\ &j_2:\; V \to \mathbb{R}, \end{align} which we assume to be continuously Fr\'{e}chet differentiable and bounded from below. The objective function is given by \begin{align*} J:\; H^1(I,V) \times H^1(I,H) \; &\to \; \mathbb{R}, \notag \\ (z,g) &\mapsto J(z,g) := j_1(z) + j_2(z(T)) + \frac{1}{2} \lVert g \rVert_{H^1(I;H)}^2. \end{align*} In the sequel we will study the following optimal control problem \begin{align} &\min J(z,g) \qquad \text{with respect to } (z,g)\in H^1(I,V) \times H^1(I,H) \notag \\ &\text{subject to} \left\{\!\begin{aligned} &0 \in \partial \vert \dot{z}(t) \vert - \Delta z(t) - \sigma \Delta \dot{z}(t) - g(t) \qquad \text{ in } V^* \text{ for a.a.\@ } t\in I, \\ &g(0) = 0,\; z(0) = 0. \end{aligned}\right. \label{eq: non-smooth problem} \tag{P} \end{align} \begin{theorem} \label{lemma: global solution nonsmooth} There exists a solution of the optimal control problem \eqref{eq: non-smooth problem}. \end{theorem} \begin{proof} The proof uses the standard direct method. Let $ (g_n,z_n)_n \in H^1_\star(I,H)\times H^1_\star(I,V)$ be a minimizing sequence. In particular, $z_n = \mathcal{S}(g_n)$ holds. Since $j_1,j_2$ are bounded from below, we get that $\frac{1}{2} \lVert g_n \rVert^2_{H^1(I,V^*)}$ is bounded, and there exists $g\in H^1_\star(I,H)$ such that $g_n \rightharpoonup g $ after possibly extracting a subsequence. Lemma \ref{lemma: convergence of solution operator} shows that $z_n \to z =\mathcal{S}(g)$ in $H^1_\star(I,V)$. Since $j_1,j_2$ are assumed to be continuous, and $\lVert \cdot \rVert_{H^1(I,H)}^2$ is weakly lower semicontinuous, we get $j_1(z_n)\to j_1(z)$, $j_2(z_n(T))\to j_2(z(T))$, $\lVert g \rVert^2_{H^1(I,V^*)} \leq \liminf\limits_{n\to \infty} \lVert g_n \rVert^2_{H^1(I,V^*)}$. Hence it follows $J(\mathcal{S}(g),g) = J(z,g)\leq \liminf\limits_{n\to \infty} J(z_n,g_n)$, i.e., $(z,g)$ solves the state equation and is (globally) optimal. \end{proof} We are interested in proving necessary optimality conditions for the non-smooth optimal control problem \eqref{eq: non-smooth problem}. \section{The regularized state equation} \label{sec3} In this section we approximate the non-smooth part of the dissipation function and analyze the resulting equation. \subsection{Smooth approximation of the dissipation} \label{subsection: Approximation of absolute value} The function $H^1_0(\Omega) \ni v \mapsto \lVert v \rVert_{L^1(\Omega)} $ is non-smooth, which makes the state equation quite uncomfortable to deal with. For this reason we will replace the absolute value function in the $L^1$-norm by a smooth approximation function. The idea how to choose the approximation is from \cite[section 4.1]{SWW2016}. Let $\rho > 0 $ be a positive parameter and define a family of functions \begin{equation*} \vert \cdot \vert_\rho: \; \mathbb{R} \rightarrow \mathbb{R}, \qquad x \to \vert x \vert_\rho . \end{equation*} The family $\{\vert \cdot \vert_\rho \}_{\rho>0}$ should satisfy some properties. \begin{assumption} \label{assump: smooth approx} Let $\rho >0$. We assume for the family $\{\vert \cdot \vert_\rho \}_{\rho>0}$ the following properties. \begin{enumerate} \item $\vert \cdot \vert_\rho $ is in $\mathcal{C}^2(\mathbb{R},\mathbb{R})$. \item $\vert \cdot \vert_\rho $ is convex. \item $\vert \cdot \vert_\rho$ is an even function, i.e. $\vert v \vert_\rho=\vert -v \vert_\rho$ for all $v\in \mathbb{R}$. \item $\vert v \vert_\rho = \vert v \vert$ for all $v\in \mathbb{R}$ with $\vert v \vert \geq \rho$. \item $\vert v \vert_\rho'' \leq \frac{2}{\rho}$ for all $v \in \mathbb{R}$. \item The second derivatives $\vert \cdot \vert_\rho'' $ are Lipschitz continuous with Lipschitz constant $\frac{2}{\rho^2}$. \item $\vert v \vert_{\rho_1} \leq \vert v \vert_{\rho_2} $ for all $v\in \mathbb{R}$ and $\rho_1 \leq \rho_2$. \item For all $\rho_1,\rho_2 > 0$ and $v\in \mathbb{R}$ holds $\big\vert \vert v \vert_{\rho_1}- \vert v \vert_{\rho_2}\big\vert \leq \, \vert \rho_1 - \rho_2 \vert$. \label{assumption, estimate two rhos} \end{enumerate} \end{assumption} \begin{lemma} \label{lemma: properties approx} Let the family $\{ \vert \cdot \vert \}_{\rho >0}$ satisfy Assumption \eqref{assump: smooth approx}. Then it holds for all $v\in \mathbb{R}$: \begin{minipage}{\textwidth} \begin{enumerate} \item $\vert v \vert_\rho' \in [-1,1] $, \item $\vert v \vert_\rho'' \geq 0$, \item $\vert v \vert \leq \vert v \vert_\rho \leq \vert v \vert + \rho$, \item $\vert v \vert_\rho' v \geq \vert v \vert - \rho$, \item $\vert v \vert_\rho'' v^2 \leq 2\rho$. \end{enumerate} \end{minipage} \end{lemma} \begin{proof} 1. and 2. follow immediately from convexity. 3. and 4. can be found in \cite{SWW2016}. It remains to prove 5.: Due to $\vert v \vert_\rho'' \leq \frac{2}{\rho^2} $ we have $ \vert v \vert_\rho'' v^2 \leq \frac{2}{\rho} \rho^2 \leq 2\rho. $ \end{proof} A function satisfying Assumption \ref{assump: smooth approx} exists. An example is \begin{equation} \vert \cdot \vert_\rho : \mathbb{R} \to \mathbb{R} \qquad v\mapsto \begin{cases} \vert v \vert & \vert v \vert \geq \rho, \\ \frac{1}{3}\rho + \frac{1}{\rho^2}v^2(\rho - \frac{1}{3}\vert v \vert) & \vert v \vert \leq \rho. \end{cases} \end{equation} \subsection{Existence and uniqueness of solutions for the smooth state equation} \label{subsection: Ex and un for smooth state equation} In this section we are going to modify the dissipation function $\mathcal{D}$ by using the family $\{ \vert \cdot \vert_\rho \}$. This section is oriented on \cite[Section 4.2]{SWW2016}. Consider the modified dissipation function \begin{equation} \mathcal{D}_\rho : H^1_0(\Omega) \to \mathbb{R}, \; \mathcal{D}_\rho(v) := \int_\Omega \vert v \vert_\rho + \frac{\sigma}{2}\vert \nabla v \vert^2 \dx \end{equation} for an arbitrary $\rho > 0$. Using this regularized dissipation instead of $\mathcal D$ leads to the inclusion \begin{equation*} 0 \in \partial \mathcal{D}_\rho(\dot{z}) +\partial_z \mathcal{E}(z,g). \end{equation*} The regularized dissipation $\mathcal{D}_\rho$ is differentiable, which means in particular that the inclusion is actually an equation. Furthermore, we require the initial condition $z(0)=0$. We obtain the following regularized state equation \begin{subequations} \label{eq:state glatt} \begin{align} \vert \dot{z}(t)\vert'_\rho - \sigma \Delta \dot{z}(t) - \Delta z(t) &= g(t) &&\text{in } V^* \text{ f.a.a.\@ } t\in I, \\ z(0) &= 0. && \end{align} \end{subequations} The first step in analyzing the regularized state equation is to show that for every control $g \in L^2(I,V^*)$ there exists a unique state $z\in H^1_\star(I,V)$, which solves equation \eqref{eq:state glatt}. Using the substitution $w:=\dot{z}$ we can reformulate equation \eqref{eq:state glatt} in the following way. \begin{subequations} \label{eq: state glatt 2} \begin{align} \dot{z} &= w &&\text{in } V \text{ a.e.\@ on }I, \\ -\sigma \Delta w + \vert w \vert'_\rho &= \Delta z + g &&\text{in } V \text{ a.e.\@ on }I, \\ z(0)&=0. && \end{align} \end{subequations} In order to solve the system \eqref{eq: state glatt 2} we first analyze the equation \begin{equation} \label{equation: state mon operator} -\sigma \Delta w + \vert w \vert'_\rho = v \quad \text{in } V^*, \end{equation} where $v\in V^*$ is arbitrary. The operator \begin{equation} \label{equation: def mon operator} A_\rho : V \to V^*,\; A_\rho(w):= -\sigma \Delta w + \vert w \vert'_\rho \end{equation} is strongly monotone and hemi-continuous with \begin{equation*} \langle Aw_1 - Aw_2 , w_1 - w_2 \rangle_{V^*,V} \geq \sigma \lVert w_1 - w_2 \rVert_V^2 \qquad \forall \, w_1,w_2 \in V. \end{equation*} Hence equation \eqref{equation: state mon operator} is uniquely solvable and its solution operator \begin{equation*} T_\rho : V^* \to V,\quad T_\rho(v) := A_\rho^{-1} \end{equation*} is Lipschitz continuous with Lipschitz constant $\frac{1}{\sigma}$. Using the operator $T_\rho$, we can reformulate the regularized state equation as an initial value problem in the Banach space $H^1_0(\Omega)$, \begin{equation} \label{equation: ODE in H-1} \begin{cases} \dot{z}(t) = T_\rho \bigl(g(t) + \Delta z(t)\bigr) &\text{in } H^1_0(\Omega) \quad \text{f.a.a.\@ }t \in I , \\ z(0)= 0 &\text{in } H^1_0(\Omega). \end{cases} \end{equation} This initial value problem is uniquely solvable due to the Lipschitz continuity of $T_\rho$, and the solution operator \begin{equation} \mathcal{S}_\rho: L^2(I,V^*) \to H^1_\star(I,V), \quad g \mapsto z \end{equation} is continuous, see \cite[Satz 1.3]{GGZ1974}. \subsection{Differentiability of the solution operator and Lipschitz estimates} \label{section: Diffbarkeit smooth solution operator} The next step is to prove the Fr\'{e}chet differentiability of the solution operator $\mathcal{S}_\rho$ and to formulate an equation, which is solved by its derivative. This will be important for finding the optimality conditions, as it allows us to use the reduced functional. In order to prove differentiability of $\mathcal{S}_\rho$, we first show that $T_\rho$ is differentiable. \begin{theorem} \label{theorem: Trho diffbar} Let $\rho >0$. The operator $T_\rho:V^*\to V$ is Fr\'{e}chet differentiable. Let $v,h \in V^*$ be given and define $w:= T_\rho(v)$. Let $y\in H^1_0(\Omega)$ be the unique weak solution of the equation \begin{equation} \label{equation: derivative solution operator} -\sigma \Delta y + \vert w \vert_\rho''y = h \qquad \text{in } V^*. \end{equation} Then it holds $ T_\rho'(v)h = y $ and \begin{equation} \label{equation: continuous dependence of derivative} \lVert y \rVert_{V} = \lVert T_\rho'(v)h \rVert_{V} \leq \frac{1}{\sigma} \lVert h \rVert_{V^*}. \end{equation} \end{theorem} \begin{proof} Equation \eqref{equation: derivative solution operator} is uniquely solvable in $V$ due to the Lax-Milgram theorem since $\vert w \vert_\rho''\in L^\infty(\Omega)$ is a nonnegative coefficient. In addition, it holds $\lVert y \rVert_V \leq \frac{1}{\sigma} \lVert h \rVert_{V^*}$. In order to show the Fr\'{e}chet differentiability we investigate the remainder $r_h := T_\rho(v+h) - w - y$. By definition of $T_\rho(v+h)$, $T_\rho(v)$, and $y$ we have \begin{align*} - \sigma \Delta T_\rho(v+h) + \vert T_\rho(v+h) \vert_\rho' &= v+h &&\text{in }V^*, \\ - \sigma \Delta w + \vert w \vert_\rho' &= v &&\text{in } V^*, \\ -\sigma \Delta y + \vert w \vert_\rho''y &= h &&\text{in } V^*. \end{align*} Subtracting the second and third from the first equation, adding and subtracting $\vert w \vert_\rho''\bigl( T_\rho(v+h) - w \bigr)$ yield % \begin{equation} - \sigma \Delta r_h + \vert w \vert_\rho'' r_h = -\bigl( \vert T_\rho(v+h) \vert_\rho' - \vert w \vert_\rho' - \vert w \vert_\rho''(T_\rho(v+h) - w) \bigr). \end{equation} % Lax-Milgram implies that $r_h$ is the unique weak solution of this equation, and we get the estimate % \begin{equation*} \lVert r_h \rVert_{V} \leq \frac{1}{\sigma} \Big\lVert \vert T_\rho(v+h) \vert_\rho' - \vert w \vert_\rho' - \vert w \vert_\rho''(T_\rho(v+h) - w) \Big\rVert_{H} \label{proof: Trho diffbar 1}. \end{equation*} The embedding theorems for Sobolev spaces give us the existence of $p>2$ such that $V\hookrightarrow L^p(\Omega)$. Due to the boundedness of $\vert \cdot \vert_\rho'$ the Nemytskij operator of this mapping is Fr\'{e}chet differentiable from $L^p(\Omega)$ to $H$. This shows \[ \lVert r_h \rVert_{V} = o\big(\lVert T_\rho(v+h) - w\|_V\big) = o\big(\|h\|_{V^*}\big), \] which proves the Fr\'{e}chet differentiability of $T_\rho$. \end{proof} \begin{theorem} \label{theorem: S_rho diffbar} Let $\rho >0$, $2\leq p< \infty$, and $1 \leq q <p$ be given. Then the operator $\mathcal{S}_\rho$ is Fr\'{e}chet differentiable as a mapping from $L^p(I,V^*)$ to $W^{1,q}_\star(I,V)$. For $g,h \in L^p(I,V^*) $ define $z := \mathcal{S}_\rho(g),\; \zeta:= \mathcal{S}'_\rho(g)h$. Then $\zeta$ is the unique solution of the system \begin{subequations} \label{equation: Ableitung Lösungsoperator} \begin{align} \dot{\zeta} &= \omega &&\text{in } V\; \text{a.e.\@ on } I,\\ -\sigma \Delta \omega + \vert \dot{z}\vert''_\rho \omega &= \Delta \zeta + h &&\text{in } V^*\; \text{a.e.\@ on } I,\\ \zeta(0)&=0 &&\text{in } V. \end{align} \end{subequations} \end{theorem} \begin{proof} This can be proven following the lines of the proof of \cite[Theorem 4.4]{SWW2016}. \end{proof} Later we will consider controls $g$ in the space $H^1_\star(I,H)$. In this case we have the following result. \begin{corollary} Let $g\in H^1_\star(I,H)$ and $1\leq q < \infty$. Then $S_\rho$ is Fr\'{e}chet differentiable as a mapping from $H^1_\star(I,H)$ to $W^{1,q}_\star(I,V)$. \end{corollary} \begin{proof} Choose $p$ such that $q < p < \infty$ holds. The following embeddings are continuous. \begin{equation*} H^1_\star(I,H)\hookrightarrow \mathcal{C}(\bar{I},H) \hookrightarrow L^p(I,V^*). \end{equation*} Therefore the claim follows from Theorem \eqref{theorem: S_rho diffbar}. \end{proof} In the next lemma we show a Lipschitz property for $S_\rho$. This lemma is a stronger version of \cite[Lemma 4.5]{SWW2016}. \begin{lemma} \label{lemma: Lipschitz smooth solution operator} Let $2\leq p \leq \infty$ and $g_1,g_2 \in L^p(I,V^*)$ be given. For $i=1,2$ define $z_i:= \mathcal{S}_\rho(g_i)$. Then it holds $z_i \in W^{1,p}_\star(I,V)$. In addition, we have for almost all $t\in I$ \begin{equation} \lVert \dot{z}_1(t) - \dot{z}_2(t) \rVert_{V} \leq \frac{1}{\sigma} \big\lVert g_1(t) - g_2(t) \big\rVert_{V^*} + \frac{1}{\sigma^2}e^{\frac{1}{\sigma}t}\big\lVert g_1 -g_2 \big\rVert_{L^1(0,t;V^*)}. \label{eq: Lipschitz Srho} \end{equation} \end{lemma} \begin{proof} We obtain with the Lipschitz continuity of $T_\rho$ for a.a. $t\in I$ \begin{align} \lVert \dot{z}_1(t) &- \dot{z}_2(t) \rVert_{V} \notag = \lVert T_\rho(g_1(t) + \Delta z_1(t)) - T_\rho(g_2(t)+ \Delta z_2(t)) \rVert_{V} \notag \\ &\leq \frac{1}{\sigma} \lVert g_1(t) - g_2(t) \rVert_{V^*} + \frac{1}{\sigma} \lVert z_1(t) - z_2(t) \rVert_{V} \label{eq: proof Lipschitz Srho 1} . \end{align} By integrating \eqref{equation: ODE in H-1} from $0$ to $t$, we obtain \begin{align*} \lVert z_1(t) - z_2(t) \rVert_{V} &=\Big\lVert \int\limits_{0}^{t} T_\rho(g_1(s)+\Delta z_1(s) ) - T_\rho(g_2(s)+\Delta z_2(s) )\ds \Big\rVert_{V} \\ &\leq \frac{1}{\sigma} \Big\lVert g_1 - g_2 \Big\rVert_{L^1(0,t;V^*)} + \frac{1}{\sigma} \int\limits_{0}^{t} \Big\lVert z_1(s) - z_2(s) \Big\rVert_{V} \ds \end{align*} We apply Gronwall's inequality and obtain \begin{equation} \lVert z_1(t) - z_2(t) \rVert_{V} \leq \frac{1}{\sigma^2}e^{\frac{1}{\sigma}t}\big\lVert g_1 -g_2 \big\rVert_{L^1(0,t;V^*)}. \label{eq: proof Lipschitz Srho 2} \end{equation} Combining \eqref{eq: proof Lipschitz Srho 1} and \eqref{eq: proof Lipschitz Srho 2} we get the asserted inequality. Moreover, choosing $g_2=0$ in \eqref{eq: Lipschitz Srho} gives \begin{equation*} \lVert \dot{z}_1(t)\rVert_{V} \leq \frac{1}{\sigma} \big\lVert g_1(t) \big\rVert_{V^*} + \frac{1}{\sigma^2}e^{\frac{1}{\sigma}T}\big\lVert g_1 \big\rVert_{L^1(I,V^*)}, \end{equation*} hence $z_1 \in W^{1,p}_\star(I,V)$ holds. \end{proof} \subsection{Higher regularity of the state and a-priori estimates} Let us now prove some a-priori estimates for the state $z$ of the regularized equation. We will also prove higher regularity results for the state $z$ in space and time under some assumptions on the domain $\Omega$ and on the control $g$. The next lemma is from \cite[Lemma 4.6]{SWW2016}. \begin{lemma} \label{lemma: H2 time} Let $\rho > 0$ and $g\in H^1_\star(I,V^*)$ be given. Define $z:= \mathcal{S}_\rho(g)$. Then it holds $z \in H^2(I,V)$ and \begin{equation*} \lVert \ddot{z}(t) \rVert_{V} \leq \frac{1}{\sigma} \big\lVert \dot{g}(t) + \Delta \dot{z}(t) \big\rVert_{V^*}\qquad \text{a.e.\@ on } I. \end{equation*} Moreover, there is a constant $C>0$ independent of $\sigma$, $\rho$ such that \begin{equation} \lVert \dot{z}(T) \rVert_{V}^2 + \lVert \dot{z} \rVert_{L^2(I,V)}^2 \leq C\cdot \Bigl[\bigl(\frac{2\rho}{\sigma} + 1\bigr)\cdot \vert \Omega \vert + \frac{1}{\sigma} \lVert \dot{g} \rVert_{L^2(I,V^*)}^2 \Bigr] \end{equation} and \begin{equation} \lVert \dot{z}(0)\rVert_{V} \leq \frac{\rho}{\sigma} \vert \Omega \vert. \label{eq: estimate dotz_0} \end{equation} are satisfied. \end{lemma} \begin{proof} The proof is the same as \cite[Proof of Lemma 4.6]{SWW2016}, except that we have $\sigma \Delta \dot{z}$ in \eqref{eq:state glatt} instead of $\rho \Delta \dot{z}$. \end{proof} We now turn our focus on regularity results in space. In order to prove higher regularity in space for the state $z$ we need to assume higher regularity in space for the control $g$, i.e. $g\in H^1_\star(I,H)$. We first show that for a fixed $t\in I$ the function $\dot{z}(t)$ solves an elliptic PDE. \begin{lemma}\label{lemma: regularity space} Let $\rho >0$ and $g \in H^1_\star(I,H)$. Let further $z := \mathcal{S}_\rho g \in H^1_\star(I,V)$ be the unique solution of the regularized state equation \eqref{eq:state glatt}. Then it holds $\Delta z(t),\Delta \dot{z}(t) \in H$ f.a.a. $t\in I$. In addition, we have the estimates \begin{align} \lVert \Delta z \rVert_{C(\bar{I},H)} &\leq \sqrt{\frac{1}{2\sigma}} \big\lVert g - \vert \dot{z} \vert_\rho' \big\rVert_{L^2(I,H)}, \label{estimate regularity space 1} \\ \lVert \Delta \dot{z} \rVert_{L^2(I,H)} &\leq \frac{1}{\sigma} \big\lVert g - \vert \dot{z} \vert_\rho' \big\rVert_{L^2(I,H)}. \label{estimate regularity space 2} \end{align} \end{lemma} \begin{proof} Let us set $f:= \frac{1}{\sigma}\bigl( g - \vert \dot{z} \vert_\rho' \bigr)$, hence $f \in L^2(I,H)$. The initial value problem \begin{equation} \label{proof regularity space1} \begin{cases} \dot v(t) + \frac{1}{\sigma}v(t) = f(t) &\text{in } H\;\text{for a.a.}\; t\in I, \\ v(0) = 0 &\text{in } H \end{cases} \end{equation} has a unique solution $v \in H^1(I,H) $ due to \cite[Satz 1.3]{GGZ1974}. We multiply \eqref{proof regularity space1} with $\dot{v}(t)$ and integrate over $(0,t)\times \Omega$. This yields \begin{equation*} \int\limits_{0}^{t} \bigl(\dot{v}(t) , \dot{v}(t) \bigr)_H\dt + \frac{1}{\sigma} \int\limits_{0}^{t} \bigl(v(t) , \dot{v}(t) \bigr)_{H}\dt = \int\limits_{0}^{t} \bigl(f(t) , \dot{v}(t) \bigr)_{H}\dt \leq \lVert f \rVert_{L^2(I,H)} \cdot \lVert \dot{v} \rVert_{L^2(0,t;H)}. \end{equation*} Therefore we obtain \begin{equation*} \lVert \dot{v} \rVert_{L^2(I,H)}^2 + \frac{1}{2\sigma} \lVert v \rVert_{C(\bar{I},H)}^2 \leq \lVert f \rVert_{L^2(I,H)} \cdot \lVert \dot{v} \rVert_{L^2(I,H)} \leq \frac{1}{4} \lVert f \rVert_{L^2(I,H)}^2 + \lVert \dot{v}\rVert_{L^2(I,H)}, \end{equation*} which implies the two inequalities \begin{align} \lVert \dot{v} \rVert_{L^2(I,H)} &\leq \lVert f \rVert_{L^2(I,H)}, \label{proof regularity space2} \\ \lVert v \rVert_{C(\bar{I},H)} &\leq \sqrt{\frac{\sigma}{2}} \lVert f \rVert_{L^2(I,H)}. \label{proof regularity space3} \end{align} By construction of $f$, we have \begin{equation} \begin{cases} - \Delta \dot{z}(t) - \frac{1}{\sigma}\Delta z(t) = f(t) &\text{in } V^*\;\text{for a.a.}\; t\in I, \\ -\Delta z(0) = 0 &\text{in } V^*. \end{cases} \end{equation} Since this initial value problem is uniquely solvable, it follow $-\Delta z(t) = v(t) \in H$ f.a.a. $t\in I$. \end{proof} Using the previous lemma we can apply several known results about higher regularity. We only mention one of them here. \begin{corollary} \label{cor: regularity in the interior} (Regularity in the interior) \\ Let $\rho >0$ and $g \in H^1_\star(I,H)$. Let further $z := \mathcal{S}_\rho g \in H^1_\star(I,V)$ and define $v\in H^1(I,H),f\in L^2(I,H)$ as in the previous lemma. Let $\Omega_0\subset \Omega$ be an open set compactly contained in $\Omega$. Then it holds $z \in H^1_\star(I,H^2(\Omega_0))$, and there exists a constant $C$ independent of $\rho$ such that \begin{align*} \lVert z \rVert_{C(\bar I,H^2(\Omega_0))} &\leq C\bigl( 1 + \lVert g \rVert_{L^2(I,H)}+\lVert z \rVert_{C(\bar I,V} \bigr) , \\ \lVert \dot z \rVert_{L^2(I,H^2(\Omega_0))} &\leq C\bigl( 1 + \lVert g \rVert_{L^2(I,H)}+\lVert \dot z \rVert_{L^2(I,V} \bigr) , \\ \lVert \ddot{z} \rVert_{L^2(I,H^2(\Omega_0))} &\leq C \bigl( \lVert \ddot{z} \rVert_{L^2(I,V)} + \lVert \Delta\dot{z}\rVert_{L^2(I,H)} + \lVert \dot{g} \rVert_{L^2(I,H)} + \frac{1}{ \rho} \lVert \ddot{z}\rVert_{L^2(I,H)}\bigr). \end{align*} \end{corollary} \begin{proof} Applying the well known theorem about regularity in the interior for elliptic PDEs on Lipschitz domains, which can be found, e.g., in \cite[Section 6.3]{E2010}, gives us the existence of $C>0$ such that \[ \lVert u \rVert_{H^2(\Omega_0)} \leq C\bigl( \lVert u \rVert_V+ \lVert \Delta u \rVert_H\bigr) \] for all $u\in V$ with $\Delta u\in H$. Then the claimed estimates of $z$ and $\dot z$ are a consequence of the previous Lemma \ref{lemma: regularity space}. It remains to prove the estimate of $\ddot z$. Here, we will use the function $v$ as defined in the previous proof. Let us choose $h\in \mathbb{R}$ such that $t+ h \in I$. Then \[ -\Delta \big[ \dot{z}(t+h) - \dot{z}(t) \big] = \dot{v}(t+h) - \dot v(t) \quad \text{for a.a.}\; t\in I \; \text{in} \; V^*.\\ \] Recall from the proof of Lemma \ref{lemma: regularity space}, that $\dot{v}+ \frac{1}{\sigma}v = f= \frac{1}{\sigma}\bigl( g - \vert \dot{z} \vert_\rho' \bigr)$. Since $\vert \cdot \vert_\rho'$ is Lipschitz with constant $\frac{2}{\rho}$, c.f. Assumption \ref{assump: smooth approx}, we obtain \begin{align*} \lVert \dot{v}(t+h) - \dot{v}(t) \rVert_H &\leq \frac{1}{\sigma} \lVert v(t+h) - v(t) \rVert_H + \frac{1}{\sigma} \lVert f(t+h) - f(t) \rVert_V \\ &\leq \frac{1}{\sigma} \lVert v(t+h) - v(t) \rVert_H + \frac{1}{\sigma} \lVert g(t+h) - g(t) \rVert_H + \frac{2}{\sigma \rho} \lVert \dot{z}(t+h) - \dot{z}(t) \rVert_H. \end{align*} Since $v,g,\dot z\in L^2(I,H)$, this shows $\ddot v = -\Delta \ddot z\in L^2(I,H)$. With the estimate \begin{equation*} \lVert \ddot{z}\rVert_{L^2(I,H^2(\Omega_0))} \leq C \big( \lVert \ddot{z} \rVert_{L^2(I,V)} + \lVert \ddot{v} \rVert_{L^2(I,H)} \big) \end{equation*} the claim follows. \end{proof} \begin{remark} \label{rem: H2 in space and time} This corollary and the estimates from Lemma \ref{lemma: regularity space} show that $\lVert z \rVert_{H^1(I,H^2(\Omega_0))}$ is bounded for $\rho \searrow 0$. This is not true for $\lVert \ddot{z}(t) \rVert_{H^2(\Omega_0)}$, which is not necessarily bounded for $\rho \searrow 0$. \end{remark} We now summarize our regularity results for the state in a theorem. \begin{theorem} \label{theorem: regularity of the state} (Regularity of the state) Let $(\rho_n)_n \in \mathbb{R}$ be a positive and bounded sequence. Let further $(g_n)_{n\in\mathbb{N}}\in H^1_\star(I,V^*)$ and define $z_n := \mathcal{S}_{\rho_n}(g_n)$. Then we have the following regularity results. \begin{enumerate} \item It holds \begin{equation*} z_n \in H^1_\star(I,V)\cap H^2(I,V). \end{equation*} Furthermore, the sequence $(z_n)_n$ is bounded in these spaces if $(g_n)_n $ is bounded in $H^1_\star(I,V^*)$. \item If additionally $g_n\in H^1_\star(I,H)$ for all $n\in \mathbb{N}$, then it holds for all open and compactly contained subsets $\Omega_0$ of $\Omega$ \begin{equation*} z_n \in H^1_\star(I,V)\cap H^2(I,V)\cap H^2(I,H^2(\Omega_0)). \end{equation*} Furthermore, the sequence $(z_n)_n$ is bounded in $H^1_\star(I,V), \; H^2(I,V)$ and $H^1_\star(I,H^2(\Omega_0))$ if $(g_n)_n $ is bounded in $H^1_\star(I,H)$. \end{enumerate} \end{theorem} \section{Passing to the limit in the smooth state equation} \label{section: Passing to limit in smooth equation} In this section we analyze the regularized state equation for $\rho \searrow 0$. We will prove that in this process solutions of the smooth state equation converges to the solution of the non-smooth equation. But first we prove that the non-smooth state equation is uniquely solvable.\\ We start by proving a lemma that will give us some useful estimates. The proof uses an idea from \cite[Proof of Lemma 4.7]{SWW2016}. \begin{lemma} \label{lemma: Cauchy property of smooth equation} Let $(\rho_n)_{n\in \mathbb{N}} \in \mathbb{R} $ be a sequence with $\rho_n >0$. Let further $(g_n)_{n\in \mathbb{N}}\in H^1_\star(I,V^*)$ be given, and define $z_n := \mathcal{S}_{\rho_n}(g_n)$. Then for all $n,m \in \mathbb{N}$ we have \begin{equation} \frac{\sigma}{2} \lVert \dot{z}_n - \dot{z}_m \rVert_{L^2(I,V)}^2 + \frac{1}{2}\lVert z_n - z_m \rVert_{C(\bar{I},V)}^2 \leq 2 T \vert \Omega \vert \cdot \vert \rho_m - \rho_n \vert + \frac{2}{\sigma} \lVert g_n - g_m \rVert_{L^2(I,V^*)}. \label{eq: state Cauchy sequence} \end{equation} \end{lemma} \begin{proof} We test the equations \begin{align*} -\sigma \Delta\dot{z}_n - \Delta z_n - g_n + \vert \dot{z}_n \vert_{\rho_n}' &= 0, \\ -\sigma \Delta\dot{z}_m - \Delta z_m - g_m + \vert \dot{z}_m \vert_{\rho_m}' &= 0 \end{align*} with $\dot{z}_n - \dot{z}_m$, subtract them from each other, and integrate from $0$ to $t$. This yields \begin{align} \label{proof: smooth Cauchy1} \sigma \lVert &\dot{z}_n - \dot{z}_m \rVert_{L^2(0,t;V)}^2 + \frac{1}{2} \lVert z_n(t) - z_m(t) \rVert_{V}^2 - \frac{1}{2} \lVert \underbrace{z_n(0)}_{=0} - \underbrace{z_m(0)}_{=0}\rVert_{V}^2 \notag \\ &= - \int\limits_{0}^{t} \int\limits_{\Omega} \Bigl( \vert \dot{z}_n \vert_{\rho_n}' - \vert \dot{z}_m \vert_{\rho_m}' \Bigr)\cdot \Bigl( \dot{z}_n - \dot{z}_m \Bigr) \dx \,\ds + \int\limits_{0}^{t} \langle g_n - g_m, \dot{z}_n -\dot{z_m} \rangle \ds. \end{align} The convexity of $\vert \cdot \vert_\rho$ and Property \ref{assumption, estimate two rhos} from Assumption \ref{assump: smooth approx} imply \begin{multline} \label{proof: smooth Cauchy2} - \int\limits_{0}^{t} \int\limits_{\Omega} \Bigl( \vert \dot{z}_n \vert_{\rho_n}' - \vert \dot{z}_m \vert_{\rho_m}' \Bigr)\cdot \Bigl( \dot{z}_n - \dot{z}_m \Bigr) \dx\ds\notag\\ \begin{aligned} & \leq \int\limits_{0}^{t} \int\limits_{\Omega} \vert \dot{z}_n \vert_{\rho_m} - \vert \dot{z}_m \vert_{\rho_m} \dx\,\ds + \int\limits_{0}^{t} \int\limits_{\Omega} \vert \dot{z}_m \vert_{\rho_n} - \vert \dot{z}_n \vert_{\rho_n} \dx\,\ds \notag \\ &= \int\limits_{0}^{t} \int\limits_{\Omega} \underbrace{\Big\vert \vert \dot{z}_m \vert_{\rho_n} - \vert \dot{z}_m \vert_{\rho_m} \Big\vert}_{\leq \vert \rho_n - \rho_m \vert} \dx\,\ds + \int\limits_{0}^{t} \int\limits_{\Omega} \underbrace{\Big\vert \vert \dot{z}_n \vert_{\rho_m} - \vert \dot{z}_n \vert_{\rho_n} \Big\vert}_{\leq \vert \rho_n - \rho_m \vert} \dx\,\ds \leq 2T \, \vert \Omega \vert \cdot \vert \rho_n - \rho_m \vert. \end{aligned} \end{multline} Furthermore, using Hölder's and Young's inequality gives \begin{equation*} \int\limits_{0}^{t} \langle g_n - g_m, \dot{z}_n -\dot{z}_m \rangle_{V^*,V} \leq \frac{1}{2\sigma} \lVert g_n - g_m \rVert_{L^2(I;V^*)}^2 + \frac{\sigma}{2}\lVert \dot{z}_n - \dot{z}_m \rVert_{L^2(I,V)}^2. \end{equation*} Applying the previous estimates in equation \eqref{proof: smooth Cauchy1}, yields \begin{equation*} \frac{\sigma}{2} \lVert \dot{z}_n - \dot{z}_m \rVert_{L^2(0,t;V)}^2 + \frac{1}{2} \lVert z_n(t) - z_m(t) \rVert_{V}^2 \leq 2 T \vert \Omega \vert \cdot \vert \rho_m - \rho_n \vert +\frac{1}{2\sigma} \lVert g_n - g_m \rVert_{L^2(I;V^*)}^2. \end{equation*} f.a.a. $t\in I$, which is the asserted inequality. \end{proof} We are now ready to prove existence and uniqueness of solutions for the non-smooth state equation. \begin{proof}[Proof of Theorem \ref{theorem: solution non-smooth}] \label{Proof: ex and unique of non-smooth} Let $g\in H^1_\star(I,V^*)$ be given. Let us take a sequence $(\rho_n)_{n\in \mathbb{N}} \in\mathbb{R}$ be a sequence with $\rho_n \searrow 0$ and define $z_n:= \mathcal{S}_{\rho_n} g $. Using Theorem \ref{theorem: regularity of the state} we obtain that the sequence $(z_n)_n$ is bounded in $H^1_\star(I,V) \cap H^2(I,V) $. Due to reflexivity, we have a weakly convergent subsequence (which we denote again by $z_n$ ) and a function $ z\in H^2(I,V) \cap H^1_\star(I,V)$ such that $z_n \rightharpoonup z$ in these spaces. Moreover, we have $\lVert \dot{z_n}(0)\rVert_{V} \leq \frac{\rho_n}{\sigma} \vert \Omega \vert$, see \eqref{eq: estimate dotz_0}, and hence $\dot{z}(0)= 0$ is satisfied. Lemma \ref{lemma: Cauchy property of smooth equation} shows, that $z_n$ is a Cauchy sequence in $H^1_\star(I,V)$, which implies $z_n \to z$ in $H^1_\star(I,V)$. Due to the convexity of $\vert \cdot \vert_\rho$ we have for a.a. $t\in I$, all $n\in \mathbb{N}$ and all $v\in V$ \begin{equation} \label{proof: existence uniqueness of nonsmooth1} \int\limits_{\Omega} \vert v \vert_{\rho_n} \dx \geq \int\limits_{\Omega} \vert \dot{z}_n(t) \vert_{\rho_n} \dx + \langle \sigma \Delta \dot{z}_n(t) + \Delta z_n(t) + g(t),v-\dot{z}_n \rangle_{V^*,V}. \end{equation} It is easy to show that we can pass to the limit in this inequality and obtain \begin{equation*} \lVert v \rVert_{L^1(\Omega)} \geq \lVert \dot{z}(t)\rVert_{L^1(\Omega)} + \langle \sigma \Delta \dot{z}(t) + \Delta z(t) + g(t),v-\dot{z}(t) \rangle_{V^*,V}, \end{equation*} i.e. $\sigma \Delta \dot{z}(t) + \Delta z(t) + g(t) \in \partial \vert \dot{z}(t)\vert$.\\ It remains to prove uniqueness of solutions. Let two solutions $z_1,z_2 \in H^1_\star(I,V)$ of the non-smooth state equation be given. Then for all $v,w\in V$ and a.a. $t\in I$ we have \begin{align*} \lVert v \rVert_{L^1(\Omega)} &\geq \lVert \dot{z}_1(t) \rVert_{L^1(\Omega)} + \langle \sigma \Delta \dot{z}_1(t) + \Delta z_2(t) + g(t), v- \dot{z}_1(t) \rangle_{V^*,V}, \\ \lVert w \rVert_{L^1(\Omega)} &\geq \lVert \dot{z}_2(t) \rVert_{L^1(\Omega)} + \langle \sigma \Delta \dot{z}_2(t) + \Delta z_2(t) + g(t), w- \dot{z}_2(t) \rangle_{V^*,V}. \end{align*} Choosing $v:= \dot{z}_2(t)$, $w:= \dot{z}_1(t)$, adding the resulting inequalities, and canceling out some summands gives \begin{equation*} 0 \geq \lVert \dot{z}_1(t) - \dot{z}_2(t) \rVert_{V}^2 + \bigl( z_2(t) - z_1(t), \dot{z}_2(t) - \dot{z}_1(t) \bigr)_{V}. \end{equation*} Integrating this inequality from $0$ to $t$ yields \begin{equation*} 0 \geq \lVert \dot{z}_1(t) - \dot{z}_2(t) \rVert_{L^2(0,t;V}^2 + \frac{1}{2} \lVert z_2(t) - z_1(t) \rVert_{V}^2 - \frac{1}{2} \lVert \underbrace{z_2(0)}_{=0} - \underbrace{z_1(0)}_{=0} \rVert_{V}^2, \end{equation*} hence $z_1 = z_2$ on $I$. \end{proof} In particular, this proof yields the following corollary. \begin{corollary} \label{cor: convergence solutions} For every $g\in H^1_\star(I,V^*)$ we have $\mathcal{S}_{\rho}(g)\to \mathcal{S}(g)$ in $H^1_\star(I,V)$ for $\rho \searrow 0$. \end{corollary} In the next theorem we show stronger convergence for $\rho \searrow 0$. \begin{theorem} \label{theorem: GW glatt} Let sequences $(\rho_n)_{n\in \mathbb{N}}\in \mathbb{R}$ and $(g_n)_{n\in N} \in H^1_\star(I,V^*)$ be given with $\rho_n \searrow0$ and $g_n \to g$ in $L^2(I,V^*)$ for some $g \in H^1_\star(I,V^*)$. Define $z_n := \mathcal{S}_{\rho_n}(g_n)$ and $z := \mathcal{S}(g)$. Then it holds $z_n \to z$ in $H^1_\star(I,V)$ and $\mathcal{C}(\bar{I},V)$. \end{theorem} \begin{proof} We have the estimate \begin{equation*} \lVert z_n - z \rVert_{H^1_\star(I,V)} \leq \lVert z_n - \mathcal{S}_{\rho_n}(g) \rVert_{H^1_\star(I,V)} + \lVert \mathcal{S}_{\rho_n}(g) - z \rVert_{H^1_\star(I,V)}. \end{equation*} The right-hand side converges to zero due to Lemma \ref{lemma: Lipschitz smooth solution operator} and Corollary \ref{cor: convergence solutions}. The claim follows by passing to the limit $m\to\infty$ in inequality \eqref{eq: state Cauchy sequence}. \end{proof} \section{Optimality system} \label{chapter: Optimality system} So far we studied the smooth state equation and the behavior of solutions for $\rho \searrow 0$. Now we would like to find an optimality system for \eqref{eq: non-smooth problem}. We will formulate such a system for an optimal control problem with the regularized state equation and then pass to the limit $\rho \searrow 0$. However, first we need to know how the optimality system should look like. This will be discussed in the following subsection. \subsection{Formal derivation of an optimality system} \label{chapter: Formal derivation optimality system} Motivated by the previous thoughts we formally derive optimality conditions for the non-smooth optimal control problem. Consider the optimal control problem \begin{align*} &\min J(z,g) \\ &\text{s.t.} \; \bigl( \dot{z}(t,x),g(t,x) + \Delta z(t,x) + \sigma \Delta\dot{z}(t,x) \bigr) \in M \qquad \forall (t,x) \in I\times \Omega, \end{align*} where \begin{equation*} M :=\text{gph}\,\partial \vert \cdot \vert = \{(u,v) \in \mathbb{R}^2 \mid v \in \partial \vert u \vert \} = \bigl( (-\infty,0] \times \{-1\} \bigr) \cup \bigl( \{0\} \times [-1,1] \bigr) \cup \bigl( [0,\infty) \times \{1\} \bigr). \end{equation*} In \cite[Chapter 2]{SWW2016} optimality conditions are formally derived by using the Lagrangian \begin{equation*} \mathcal{L}(z,g,q,\xi) := J(z,g) - (q,\dot{z})_{L^2(I\times \Omega)} + (\xi,g+\Delta z)_{L^2(I\times \Omega)}. \end{equation*} We present another way to derive optimality conditions, which however gives the same conditions as the approach from \cite{SWW2016}. Using the indicator function of the set $M$ it is possible to write the optimal control problem as an unconstrained problem, \begin{equation*} \min J(z,g) + \delta_M( \dot{z},g + \Delta z + \sigma \Delta\dot{z}) \qquad (z,g) \in H^1_\star(I,V)\times H^1_\star(I,H). \end{equation*} Using the generalized Fermat rule, an optimality condition is given by \begin{align*} \label{Fermat} 0 &\in \partial \bigl[J(z,g) + \delta_M( \dot{z},g+ \Delta z + \sigma \Delta\dot{z}) \bigr]\\ &= j_1'(z) +\langle j_2'(z(T)), \hat{\delta}_T\rangle_{V^*,V} + \bigl( g,\cdot \bigr)_{H^1(I,H)} + \partial \delta_M( \dot{z},g+ \Delta z + \sigma \Delta\dot{z}), \end{align*} where $\hat\delta_T:w\mapsto w(T)$ denotes the evaluation of a function at time $T$. Let us define $(z,g) \mapsto L(z,g) := \bigl( \dot{z},g + \Delta z + \sigma \Delta\dot{z} \bigr) $, which is a linear mapping between Hilbert spaces with (formal) adjoint \begin{equation*} L^*(q,\xi):= \Bigl( -\dot{q} + \Delta \xi - \sigma \Delta \dot{\xi} + (q(T),\hat{\delta}_T)_H + (\Delta \xi(T),\hat{\delta}_T)_H,\; \xi \Bigr). \end{equation*} Continuing our formal calculations, we apply the chain rule in the form $\partial (\delta_M\circ L) = L^*\circ \partial \delta_M \circ L$. Then we arrive at \begin{equation*} \partial \delta_M( \dot{z},g+ \Delta z + \sigma \Delta\dot{z}) = \bigl( L^* \circ N_M \bigr)(\dot{z},g+ \Delta z + \sigma \Delta \dot{z}), \end{equation*} where $N_M$ is the Fr\'echet normal cone of $M$. This implies that there is $(-q,\xi)\in N_M(\dot{z},g+ \Delta z + \sigma \Delta \dot{z})$ such that \begin{align*} 0 \in \Bigl( j_1'(z) + &\langle j_2'(z(T)), \hat{\delta}_T \rangle_{V^*,V} +\dot{q} + \Delta \xi - \sigma \Delta \dot{\xi} + (-q(T),\hat{\delta}_T)_H + \sigma (\Delta \xi(T),\hat{\delta}_T)_H,\\ & -\ddot{g}+ g + (\dot{g}(T),\hat{\delta}_T)_H + \xi \Bigr). \end{align*} Hence, (formal!) optimality conditions are given by \begin{subequations} \label{formal optimality system equations} \begin{align} j_1'(z) + \dot{q} +\Delta \xi - \sigma \Delta \dot{\xi} &= 0 &&\text{a.e.\@ on } I\times \Omega,\label{eq51a} \\ j_2'(z(T)) - q(T) + \sigma \Delta \xi(T)&=0 &&\text{a.e.\@ on } \Omega, \\ g-\ddot{g}+\xi &=0 &&\text{a.e.\@ on } I\times \Omega, \\ \dot{g}(T)&=0 &&\text{a.e.\@ on } \Omega,\label{eq51d}\\ (-q,\xi)&\in N_M(\dot{z},g+ \Delta z + \sigma \Delta \dot{z}).\label{eq51e} \end{align} \end{subequations} The condition \eqref{eq51e} involving the Fr\'{e}chet normal cone of $M$ can be written as the following system of pointwise properties: \begin{subequations} \label{formal optimality system cone} \begin{align} \dot{z}(t,x)>0,\quad g(t,x) + \Delta z(t,x) + \sigma \Delta \dot{z}(t,x) = 1\quad &\Longrightarrow \quad q(t,x)= 0, \label{formal optimality system cone a} \\ \dot{z}(t,x)=0,\quad g(t,x) + \Delta z(t,x) + \sigma \Delta \dot{z}(t,x) = 1\quad &\Longrightarrow \quad q(t,x)\geq 0,\quad \xi(t,x) \geq 0, \label{formal optimality system cone b} \\ \dot{z}(t,x)=0,\quad \vert g(t,x) + \Delta z(t,x) + \sigma \Delta \dot{z}(t,x)\vert < 1 \quad &\Longrightarrow \quad \xi(t,x)= 0, \label{formal optimality system cone c} \\ \dot{z}(t,x)=0,\quad g(t,x) + \Delta z(t,x) + \sigma \Delta \dot{z}(t,x) = -1\quad &\Longrightarrow \quad q(t,x)\leq 0,\quad \xi(t,x)\leq 0, \label{formal optimality system cone d} \\ \dot{z}(t,x)<0,\quad g(t,x) + \Delta z(t,x) + \sigma \Delta \dot{z}(t,x) = -1 \quad &\Longrightarrow \quad q(t,x)= 0. \label{formal optimality system cone e} \end{align} \end{subequations} Our aim in the next sections is to prove that some of the these formally derived conditions are optimality conditions for \eqref{eq: non-smooth problem}. \subsection{Smooth optimal control problem} Now, we are going to consider an optimal control problem with regularized state equation depending on the parameter $\rho$. We show existence of solutions for this problem and investigate what happens with them for $\rho \searrow 0$. This section is based on \cite[Section 4.4]{SWW2016}. \\ Let \begin{equation*} (\bar{z},\bar{g}) \in H^1_\star(I,V) \times H^1_\star(I,H) \end{equation*} be a local solution of \eqref{eq: non-smooth problem}. Hence, there exists $\delta >0$ such that $J(\bar{z},\bar{g})\leq J(\mathcal{S}(g),g)$ for all $g\in H^1_\star(I,H)$ with $\lVert g-\bar{g} \rVert_{H^1(I,H)} < \delta $ holds. We define \begin{align} J_\rho: H^1(I,V) \times H^1_\star(I,H) \; &\to \; \mathbb{R} \notag \\ (z,g) &\mapsto J(z,g) + \frac{1}{2} \lVert g-\bar{g} \rVert_{H^1(I,H)}^2. \end{align} We will now consider the optimal control problem \begin{align} &\min J(z,g) + \frac{1}{2} \lVert g-\bar{g} \rVert_{H^1(I,H)}^2 \quad \text{for}\; (z,g) \in H^1(I,V) \times H^1(I,H), \notag \\ &\text{s.t.} \left\{\!\begin{aligned}& \lVert g-\bar{g} \rVert_{H^1(I,H)} \leq \delta, \\ &g(0) = 0, \; z(0) = 0, \\ &-\sigma \Delta \dot{z} -\Delta z -g +\vert \dot{z} \vert''_\rho = 0 \quad \text{in } V^*\quad \text{for a.a.}\; t\in I. \end{aligned}\right. \tag{$P_\rho$} \label{eq: smooth optimal control problem} \end{align} Augmenting the original problem with additional penalty terms and constraints is a well-known technique for nonsmooth optimal control problem. Here, the constraint $\lVert g-\bar{g} \rVert_{H^1(I,H)} \leq \delta$ will give us the existence of global solutions of such a smoothed problem. The additional term $\frac{1}{2} \lVert g-\bar{g} \rVert_{H^1(I,H)}^2$ will be used to force strong convergence of solutions of \eqref{eq: smooth optimal control problem} to $\bar{g}$ for $\rho \searrow 0$, see the proof of Theorem \ref{theorem: convergence solutions}, which is from \cite[Proof of Theorem 4.9]{SWW2016}. \begin{lemma} For all $\rho>0$ the optimal control problem \eqref{eq: smooth optimal control problem} has global solutions $(z_\rho,g_\rho)$. In addition it holds $z_\rho \in H^2_\star(I,V) $. \end{lemma} \begin{proof} The proof of existence is similar to the proof of Lemma \ref{lemma: global solution nonsmooth}. The optimal state $z_\rho$ is in the asserted spaces due to Theorem \ref{theorem: regularity of the state}. \end{proof} For convergence of global solutions, we have the following theorem. Its proof is identical to the proof of \cite[Theorem 4.9]{SWW2016}. \begin{theorem} \label{theorem: convergence solutions} Let $\{(z_\rho,g_\rho)\}_{\rho >0}$ a family of global solutions of \eqref{eq: smooth optimal control problem}. Then for $\rho \searrow 0$ it holds \begin{equation*} \begin{array}{lll} g_\rho \to \bar{g} &\text{in} & H^1_\star(I,H) ,\\ z_\rho \to \bar{z} &\text{in} & H^1_\star(I,V). \end{array} \end{equation*} \end{theorem} \subsection{Optimality system for the regularized problem} In this section we will formulate optimality conditions for the regularized problem \eqref{eq: smooth optimal control problem}. Motivated by the results of Section \ref{chapter: Formal derivation optimality system} the optimality system should include the equations \begin{align*} -\dot{q}_\rho + \sigma \Delta \dot{\xi}_\rho &= \Delta \xi + j_1'(z_\rho), \\ q_\rho(T) - \sigma \Delta \xi_\rho(T) &= j_2'(z_\rho(T)). \end{align*} Moreover, we would like to have an optimality condition corresponding to the inclusion $(-q,\xi)\in N_M(\dot{z},g+ \Delta z + \sigma \Delta \dot{z})$, see \eqref{formal optimality system equations}. Let us formulate a version of this condition for the regularized problem. Define $M_\rho := \operatorname{graph}(\vert \cdot \vert_\rho')\subset \mathbb{R}^2$ and consider \begin{equation*} (-q_\rho,\xi_\rho)\in N_{M_\rho}\big(\dot{z}_\rho,g_\rho+ \Delta z_\rho + \sigma \Delta \dot{z}_\rho \big) = N_{M_\rho}\big( \dot{z}_\rho, \vert \dot{z}_\rho \vert_\rho' \big), \end{equation*} which is equivalent to the equation \begin{equation*} 0 = \Big\langle \begin{pmatrix} -q_\rho\\ \xi_\rho \end{pmatrix} , \begin{pmatrix} 1\\ \vert \dot{z}_\rho \vert_\rho'' \end{pmatrix} \Big\rangle_{\mathbb{R}^2} = -q_\rho + \xi_\rho \vert \dot{z}_\rho \vert_\rho''. \end{equation*} We introduce the substitution $u_\rho := q_\rho - \sigma \Delta \xi_\rho$ and define the optimality system \begin{subequations} \label{NOB glatt} \begin{align} j_1'(z_\rho) + \dot{u}_\rho +\Delta \xi_\rho &= 0 \qquad &\text{in } V^*\; &\text{a.e.\@ on } I, \label{NOB glatt a} \\ j_2'(z_\rho(T)) - u_\rho(T)&=0 &\text{in } V^*, \label{NOB glatt b}\\ -\sigma \Delta \xi_\rho + \vert \dot{z_\rho} \vert_\rho'' \xi_\rho &= u_\rho &\text{in } V^*\; &\text{a.e.\@ on } I, \label{NOB glatt c} \end{align} \end{subequations} which is similar to the system in \cite{SWW2016} but with $q_\rho$ replaced by $u_\rho$. We call $\xi_\rho,u_\rho,q_\rho$ \emph{adjoint variables} and system \eqref{NOB glatt} the \emph{adjoint system}. First we show that the adjoint system is uniquely solvable (in certain function spaces). \begin{lemma} Let $\rho >0$ and $(z_\rho, g_\rho) \in H^1_\star(I,V)\times H^1_\star(I,H)$ with $z_\rho = \mathcal{S}_\rho(g_\rho)$ be given. Then there exists a unique solution $\bigl( u_\rho,\xi_\rho \bigr)\in H^1(I,V^*)\times L^2(I,V)$ of system \eqref{NOB glatt}. If $d\leq 4$ then $\xi_\rho \in H^1(I,V)$. In this case there exists a constant $C>0$ independent of $\rho,\xi_\rho,u_\rho,z_\rho$ such that \begin{equation*} \lVert \dot{\xi}_\rho \rVert_{L^2(I,V)} \leq \frac{2}{\rho^2} \lVert \ddot{z}_\rho \rVert_{L^\infty(I,L^2(\Omega))} \cdot \lVert \xi_\rho \rVert_{L^2(I,V)} + \lVert \dot{u}_\rho \rVert_{L^2(I,V^*)} . \end{equation*} \end{lemma} \begin{proof} Existence and uniqueness can be shown in the same way as in \cite[Proof of Lemma 4.13]{SWW2016}. Observe that the adjoint system is equivalent to \begin{align} \dot{u}_\rho(t) &= - \Delta T_\rho'\big(g_\rho(t) + \Delta z_\rho(t)\big)u_\rho(t) - j_1'(z_\rho) &&\text{in } V^* \; \text{a.e.\@ on } I, \label{NOB glatt equiv a}\\ u_\rho(T) &= j_2'(z_\rho(T)) &&\text{in } V^*, \label{NOB glatt equiv b} \\ \xi_\rho(t) &= T_\rho'(g_\rho(t) + \Delta z_\rho(t))u_\rho(t) &&\text{in } V \; \text{a.e.\@ on } I. \label{NOB glatt equiv c} \end{align} The first two equations are an initial value problem in the Banach space $V^*$, which is uniquely solvable, see \cite[Satz 1.3]{GGZ1974}. Hence, the adjoint system is uniquely solvable. % It remains to prove $\xi_\rho \in H^1(I,V)$ in the case $d\leq 4$. That is, we have to show differentiability of $\xi_\rho$ in time. Here, we investigate the differences $\xi_\rho(t+h) - \xi_\rho(t)$. By definition of $\xi_\rho$ we have f.a.a.\@ $t\in I$ \begin{align*} - \sigma \Delta \xi_\rho(t) + \vert \dot{z}_\rho(t) \vert_\rho'' \xi_\rho(t) &= u_\rho(t) \quad &\text{in } V^*, \\ - \sigma \Delta \xi_\rho(t+h) + \vert \dot{z}_\rho(t+h) \vert_\rho'' \xi_\rho(t+h) &= u_\rho(t+h) \quad &\text{in } V^*. \end{align*} We subtract these equations from each other, add, and subtract the term $\vert \dot{z}_\rho(t+h)\vert_\rho'' \xi_\rho(t)$ to obtain \begin{equation*} -\sigma \Delta \bigl( \xi_\rho(t+h)-\xi_\rho(t) \bigr) + \vert \dot{z}_\rho(t+h)\vert_\rho'' \bigl( \xi_\rho(t+h)-\xi_\rho(t) \bigr) = - \bigl( \vert \dot{z}_\rho(t+h)\vert_\rho''- \dot{z}_\rho(t)\vert_\rho'' \bigr) \xi_\rho(t) + u_\rho(t+h) - u_\rho(t) \end{equation*} By the Lax-Milgram theorem, we get the estimate \begin{equation*} \big\lVert \xi_\rho(t+h) - \xi_\rho(t) \big\rVert_{V} \leq \frac{1}{\sigma} \big\lVert \bigl( \vert \dot{z}_\rho(t+h)\vert_\rho''- \vert \dot{z}_\rho(t)\vert_\rho'' \bigr) \xi_\rho(t)\big\rVert_{V^*} + \big\lVert u_\rho(t+h) - u_\rho(t) \big\rVert_{V^*}. \end{equation*} The Lipschitz continuity of $\vert \cdot \vert_\rho''$, c.f. Assumption \ref{assump: smooth approx}, implies for almost all $t\in I$ \begin{align*} \big\lVert \xi_\rho(t+h) - \xi_\rho(t) \big\rVert_{V} \leq \frac{2}{\rho^2} \underbrace{\big\lVert \bigl( \dot{z}_\rho(t+h)- \dot{z}_\rho(t) \bigr) \xi_\rho(t) \big\rVert_{L^\frac{4}{3}(\Omega)}}_{=: A_h} + \big\lVert u_\rho(t+h) - u_\rho(t) \big\rVert_{V^*}. \end{align*} Note that the term $A_h$ is well defined, since $d\leq 4$ implies the embedding $V\hookrightarrow L^4(\Omega)$. Using Hölder's inequality we obtain \begin{equation} \lVert \xi_\rho(t+h) - \xi_\rho(t) \rVert_{H^1_0(\Omega)} \leq \big\lVert \dot{z}_\rho(t+h) - \dot{z}(t) \big\rVert_{L^2(\Omega)} \cdot \ \big\lVert \xi_\rho(t) \big\rVert_{L^4(\Omega)} + \lVert u_\rho(t+h) - u_\rho(t) \rVert_{V^*}. \label{proof: xi diffbar} \end{equation} Since $u_\rho \in H^1(I,V^*)$ and $\dot{z}_\rho \in H^1(I,V) $ the finite differences $\frac{1}{h}\bigl( \xi_\rho(t+h)-\xi_\rho(t)\bigr)$ are bounded in $V$, hence $\xi$ is differentiable a.e.\@ in $I$. We divide inequality \eqref{proof: xi diffbar} by $h$ and obtain the asserted inequality by passing to the limit $h \searrow 0$. Squaring this inequality and integrating over $I$ proves $\dot{\xi}_\rho \in L^2(I,V)$. Observe that $\xi_\rho \in L^\infty(I,V)$, since $u \in H^1(I,V^*)\hookrightarrow L^\infty(I,V^*)$ and $\lVert \xi_\rho(t)\rVert_V \leq \frac{1}{\sigma} \lVert u(t)\rVert_{V^*}$. \end{proof} Given the unique solvability of the adjoint system, we can formulate the optimality conditions for the regularized optimal control problem. \begin{theorem} \label{theorem: optimality conditions smooth} Let $\rho >0$ and $(z_\rho,g_\rho)$ be a local solution of \eqref{eq: smooth optimal control problem} with $\lVert g_\rho - \bar{g} \rVert_{H^1(I,H)} < \delta$. Then there exist unique $\bigl( u_\rho,\xi_\rho \bigr)\in H^1(I,V^*)\times L^2(I,V)$ which is the solution of \eqref{NOB glatt} and \begin{align*} -2 \ddot{g}_\rho + \ddot{\bar{g}} + 2 g_\rho - \bar{g} + \xi_\rho &= 0 \quad &\text{for a.a.}\;t\in I \; \text{in } H^{-1}(\Omega),\\ g_\rho(0)&=0 &\text{a.e. in}\; V^*,\\ 2\dot{g}_\rho(T)-\dot{\bar{g}}(T) &= 0 &\text{a.e. in}\; V^*. \end{align*} holds in the following weak sense: \\ \begin{equation*} \bigl( h,\xi_\rho \bigr)_{L^2(I,H)} + \bigl( 2 g_\rho - \bar{g}, h \bigr)_{H^1(I,H)} = 0 \qquad \forall \; h\in H^1_\star(I,H) \end{equation*} \end{theorem} \begin{proof} The proof is exactly as \cite[Proof of Theorem 4.14]{SWW2016}. \end{proof} \begin{remark} \label{remark j1} Recall that $j_1$ is a mapping from $L^2(I,V)$ to $\mathbb{R}$, which means it holds \begin{equation*} j_1'(z_\rho) \in \bigl[L^2(I,V)\bigr]^* \cong L^2(I,V^*), \end{equation*} In the following, we will always denote by $j_1'(z_\rho) $ the representative in $L^2(I,V^*)$. \end{remark} We would like to prove that the optimality conditions converge for $\rho \searrow 0$ to the equations that we derived in Section \ref{chapter: Formal derivation optimality system}. To this end we have to show that $\xi_\rho, u_\rho$ converge (weakly) in suitable function spaces. Hence our next aim is to prove some boundedness properties. \begin{lemma} Let $g_\rho \in H^1(I,H)$ and $z_\rho := \mathcal{S}_\rho(g_\rho) $. Let further $(u_\rho,\xi_\rho)$ be the unique solution of \eqref{NOB glatt}. Then we have f.a.a. $t\in I$ the estimates \begin{subequations} \begin{align} \lVert u_\rho (t)\rVert_{V^*} &\leq e^{\frac{1}{\sigma }T} \Big[ \lVert j_1'(z_\rho) \rVert_{L^1(I,V^*)} + \lVert j_2'(z_\rho(T)) \rVert_{V^*} \Big], \\ \lVert \dot{u}_\rho(t) \rVert_{V^*} &\leq \big\lVert \big[ j_1'(z_\rho)\big](t) \rVert_{V^*} + \lVert \xi_\rho(t) \big\rVert_V , \\ \frac{\sigma}{2} \lVert \xi_\rho(t) \rVert_V^2 + \int\limits_{\Omega} \vert \dot{z}_\rho(t) \vert_\rho'' \xi_\rho(t)^2 \, \dx &\leq e^{\frac{1}{\sigma}T} \frac{1}{2 \sigma} \Big[ \lVert j_1'(z_\rho) \rVert_{L^2(I,V^*)} + \lVert j_2'(z_\rho(T)) \rVert_{V^*} \Big]. \end{align} \end{subequations} \end{lemma} \begin{proof} Integrating \eqref{NOB glatt equiv a} from $t$ to $T$ we obtain \begin{equation*} u_\rho(T) - u_\rho(t) = - \Delta \int\limits_t^T T_\rho'(g_\rho(s)+ \Delta z_\rho(s) ) u_\rho(s) - \big[j_1'(z_\rho)\big](s) \, \ds . \end{equation*} Using \eqref{NOB glatt equiv b} we obtain the estimate \begin{equation*} \lVert u_\rho(t) \rVert_{V^*} \leq \lVert j_2'(z_\rho(T)) \rVert_{V^*} + \int\limits_t^T \lVert j_1'(z_\rho) \rVert_{L^1(I,V^*)} + \frac{1}{\sigma} \int\limits_t^T \lVert u_\rho(s) \rVert_{V^*}, \end{equation*} and Gronwall's inequality yields the first inequality. The second one follows immediately from \eqref{NOB glatt a}. In order to prove the third estimate we test \eqref{NOB glatt a} with $\xi_\rho(t)$ and use Young's inequality: \begin{align*} \sigma \big\lVert \xi_\rho(t)\big\lVert_V^2 + \int\limits_\Omega\xi_\rho(t)^2 \vert \dot{z}_\rho(t) \vert_\rho'' \; \dx &= \langle u_\rho(t) ,\xi_\rho(t) \rangle_{V^*,V} \leq \frac{\sigma}{2} \big\lVert \xi_\rho \big\rVert_V^2 + \frac{1}{2\sigma} \big\lVert u_\rho(t) \big\rVert_{V^*}^2, \end{align*} which finishes the proof. \end{proof} This lemma gives us some boundedness properties, which we will collect next. Recall that we defined in the beginning of the section $q_\rho = u_\rho + \sigma \Delta \xi_\rho$. \begin{corollary} \label{cor: Beschränktheit Adjungiert} Let the family $\{z_\rho,g_\rho\}_{\rho >0}$ with $z_\rho := \mathcal{S}_\rho(g_\rho)$ be bounded in $H^1_\star(I,V)\times H^1_\star(I,H)$. Then there exists a constant $C>0$ independent of $\rho,g_\rho, z_\rho,\xi_\rho, u_\rho$ such that \begin{align*} &\lVert j_1'(z_\rho)\rVert_{L^2(I,V^*)}, \quad \lVert j_2'(z_\rho(T)) \rVert_{V},\\ &\lVert \xi_\rho \rVert_{L^\infty(I,V)}, \quad \lVert u_\rho \rVert_{W^{1,\infty}(I,V^*)}, \quad \lVert q_\rho \rVert_{L^\infty(I,V^*)}, \\ &\Big\lVert \vert \dot{z}_\rho \vert_\rho'' \xi_\rho^2 \Big\rVert_{L^\infty(I,L^1(\Omega))} \end{align*} are less then $C$. \end{corollary} \subsection{Optimality system for the non-smooth problem} \label{sec74} In this section we analyze the optimality system for $\rho \searrow 0$. We start with a lemma that shows a weak formulation of the optimality conditions \eqref{formal optimality system cone a}, \eqref{formal optimality system cone e} and corresponds to \cite[Lemma 5.1]{SWW2016}. \begin{lemma} \label{lemma: optimality condition1} Let $(z_\rho )_{\rho>0} \in H^1_\star(I,V) $ with $z_\rho \to z$ in $H^1_\star(I,V)$. Let further $(u_\rho,\xi_\rho )_{\rho>0}$ be the corresponding unique solutions of the adjoint system \eqref{NOB glatt} and define $q_\rho := u_\rho + \sigma \Delta \xi_\rho$. Then there exists a function $q\in L^\infty(I,V^*)$ and a subsequence of $q_\rho$, which we denote again by $q_\rho$, such that $q_\rho \rightharpoonup^* q$ in $L^\infty(I,V^*)$ for $\rho \searrow 0$. Furthermore, for a.a. $t\in I$ we have \begin{equation*} \langle q(t),\phi \vert \dot{z}(t)\vert \rangle_{V^*,V} = 0 \qquad \forall \phi \in C_0^\infty(\Omega). \end{equation*} \end{lemma} \begin{proof} Let $\phi \in C_0^\infty(\Omega)$ and $\eta \in C_0^\infty(I)$ be given. Testing the adjoint equation $q_\rho(t) = \vert \dot{z}_\rho(t) \vert_\rho''\xi_\rho(t)$ with $\phi \;\vert \dot{z}_\rho(t) \vert \; \eta(t) $ we obtain for almost all $t\in I$ \begin{equation*} \big\vert \langle q_\rho(t),\phi \, \vert \dot{z}_\rho(t)\vert\, \eta(t) \rangle_{V^*,V} \big\vert \leq \lVert \phi \rVert_{L^\infty(\Omega)} \cdot \lVert \eta \rVert_{L^\infty(I)} \cdot \Big\lVert \sqrt{\vert \dot{z}_\rho(t) \vert_\rho''} \; \dot{z}_\rho(t) \Big\rVert_{H} \cdot \Big\lVert \sqrt{\vert \dot{z}_\rho(t) \vert_\rho''} \; \xi_\rho(t) \Big\rVert_{H}. \end{equation*} By Lemma \ref{lemma: properties approx} we have $\sqrt{\vert \dot{z}_\rho(t,x) \vert_\rho''} \; \vert \dot{z}_\rho(t,x) \vert \leq \sqrt{2\rho}$. Furthermore, we know due to Corollary \ref{cor: Beschränktheit Adjungiert} that \begin{equation*} \Big\lVert \sqrt{\vert \dot{z}_\rho \vert_\rho''} \xi_\rho \Big\rVert_{L^\infty(I,H)} \end{equation*} is bounded. Hence we can pass to the limit \begin{equation} \label{proof: NOB a,e 1} \Big\vert \langle q_\rho,\vert \dot{z}_\rho\vert \, \phi\, \eta \rangle_{L^2(I,V^*),L^2(I,V)} \Big\vert \leq T \sqrt{2\rho} \lVert \phi \rVert_{L^\infty(\Omega)} \cdot \lVert \eta \rVert_{L^\infty(I)} \cdot \Big\lVert \sqrt{\vert \dot{z}_\rho \vert_\rho''} \; \xi_\rho \Big\rVert_{L^\infty(I,H)} \overset{\rho\searrow 0}{\longrightarrow} 0. \end{equation} Since $q_\rho \rightharpoonup^* q$ in $L^\infty(I,V^*)$ and $\dot{z}_\rho \to \dot{z}$ in $L^2(I,V)$ we have \begin{equation*} \langle q_\rho,\vert \dot{z}_\rho\vert \, \phi\, \eta \rangle_{L^2(I,V^*),L^2(I,V)} \longrightarrow \langle q,\vert \dot{z}\vert\, \phi\, \eta \rangle_{L^2(I,V^*),L^2(I,V)}, \end{equation*} which proves the assertion. \end{proof} \begin{remark} \label{remark: weak cone a,e} The corresponding result in \cite[Lemma 5.1]{SWW2016} is \begin{equation*} \int\limits_{I} \langle q(t), \phi(t) \vert \dot{z}(t) \vert \rangle_{H^{-1}(\Omega),H^1_0(\Omega)}\dt = 0 \qquad \forall \phi \in \mathcal{C}_0^\infty(I\times \Omega), \end{equation*} which is weaker than our result, since we have the equality pointwise f.a.a. $t\in I$. \end{remark} By summarizing our previous results we obtain an optimality system for the non-smooth problem. The next theorem, which is our main result, corresponds to \cite[Theorem 5.2]{SWW2016}. \begin{theorem} \label{theorem: optimality system nonsmooth} Let $(\bar{z},\bar{g})\in H^1_\star(I,V) \times H^1_\star(I,H)$ be a local solution of \eqref{eq: non-smooth problem} and $p\in (1,\infty)$. Then there exist adjoint variables $u \in W^{1,p}(I,V^*)$ and $\xi \in L^\infty(I,V)$. Define $q := u + \sigma \Delta \xi$. Then we have \begin{subequations} \begin{align} &\begin{cases} \dot{u} &= -\Delta \xi - j_1'(\bar{z}),\\ u(T) &= j_2'(\bar{z}(T)), \end{cases} \label{NOB nonsmooth1} \\ &\begin{cases} -\ddot{\bar{g}} +\bar{g} +\xi &= 0, \\ \bar{g}(0) &= 0, \\ \dot{\bar{g}}(T) &= 0, \end{cases} \label{NOB nonsmooth2} \\ &\langle q, \phi \vert \dot{\bar{z}}\vert \rangle_{V^*,V} = 0 \qquad \forall \; \phi \in \mathcal{C}_0^\infty(\Omega), \label{NOB nonsmooth3}\\ &\langle u(t), \xi(t) \rangle_{V^*,V} \geq \sigma \lVert \xi(t) \rVert_V^2 \qquad \text{f.a.a.\@ } t\in I. \label{NOB nonsmooth4}\\ &\langle q(t), \xi(t) \rangle_{V^*,V} \geq 0 \qquad \text{f.a.a.\@ } t\in I. \label{NOB nonsmooth5} \end{align} \end{subequations} The system \eqref{NOB nonsmooth1} has to be understood as an initial value problem in the Banach space $V^*$, which is equivalent to the equation \begin{equation} \label{NOB nonsmooth system 1} u(t) = j_2'(\bar{z}(T)) + \int\limits_{t}^{T} \Delta \xi(s)\ds + \int\limits_{t}^{T} \big[j_1'(\bar{z})\big](s)\ds \quad \text{in } V^* \quad \text{for a.a.}\; t\in I. \end{equation} The system \eqref{NOB nonsmooth2} holds in the following weak sense: \begin{equation} \label{NOB nonsmooth system 2} \bigl( \xi, h \bigr)_{L^2(I,H)} + \bigl(\bar{g},h\bigr)_{H^1(I,H)} = 0 \qquad \forall \, h \in H^1_\star(I,H). \end{equation} \end{theorem} \begin{proof} Let $\rho>0 $ and $(z_\rho,g_\rho)\in H^1_\star(I,V)\times H^1_\star(I,H)$ be a global solution of \eqref{eq: smooth optimal control problem} such that $z_\rho \to \bar{z}$ in $H^1_\star(I,V)$ and $g_\rho \to g$ in $H^1_\star(I,H)$, c.f. Theorem \ref{theorem: convergence solutions}. Due to the boundedness properties in Corollary \ref{cor: Beschränktheit Adjungiert} we can choose weak- or weak*-convergent subsequences and pass to the limit in \eqref{NOB nonsmooth system 1} and \eqref{NOB nonsmooth system 2}. Condition \eqref{NOB nonsmooth3} holds due to Lemma \ref{lemma: optimality condition1}.\\ In order to prove \eqref{NOB nonsmooth4} we test \eqref{NOB glatt c} with $\xi_\rho$ and obtain f.a.a. $t\in I$ \begin{equation*} \langle u_\rho(t), \xi_\rho(t)\rangle_{V^*,V} = \sigma \lVert \xi_\rho(t) \rVert_V^2 + \int\limits_\Omega \vert \dot{z}_\rho(t) \vert_\rho'' \xi_\rho(t)^2 \; \dx \geq \sigma \lVert \xi_\rho(t) \rVert_V^2. \end{equation*} The boundedness properties of $u_\rho, \xi_\rho$ and embeddings imply $u_\rho \to u$ in $C(\bar{I},V^*)$ and $\xi_\rho \rightharpoonup \xi$ in $L^1(I,V)$. Hence $\langle u_\rho , \xi_\rho \rangle_{V^*,V} \to \langle u , \xi \rangle_{V^*,V}$ in $L^1(I)$ and we can choose a subsequence, which converges pointwise f.a.a. $t\in I$.\\ Finally, equation \eqref{NOB nonsmooth5} can be proven by testing the equation $q=u+\sigma \Delta \xi$ with $\xi$ and using \eqref{NOB nonsmooth4}: \begin{equation*} \langle q(t), \xi(t)\rangle_{V^*,V} = \langle u(t), \xi(t)\rangle_{V^*,V} - \sigma \lVert \xi(t) \rVert_V^2 \geq 0. \end{equation*} \end{proof} Let us compare the previous result to the formal optimality conditions of section \ref{chapter: Formal derivation optimality system}. The equations \eqref{NOB nonsmooth1}--\eqref{NOB nonsmooth2} are equal to \eqref{eq51a}--\eqref{eq51d}. The relation \eqref{NOB nonsmooth3} is a weak formulation of the formal conditions \eqref{formal optimality system cone a}, \eqref{formal optimality system cone e}. Moreover, the formal condition \eqref{formal optimality system cone} implies $q\xi\ge0$, which corresponds to \eqref{NOB nonsmooth5}. It is an open problem whether all the other implications of \eqref{formal optimality system cone} can be proven to be necessary for local optimality. \begin{remark}\label{compare_to_SWW} Theorem \ref{theorem: optimality system nonsmooth} gives stronger results than \cite[Theorem 5.2]{SWW2016}. First of all, due to the presence of the posivitive viscosity parameter $\sigma$, we were able to proof the regularity $u \in W^{1,p}(I,V^*)$ and $\xi \in L^\infty(I,V)$, which is stronger than the regularity obtained in \cite{SWW2016}: $u \in L^\infty(I,V^*)$ and $\xi \in W^{-1,p}(I,L^2(\Omega))$. In addition, the non-negativity conditions \eqref{NOB nonsmooth3} and \eqref{NOB nonsmooth4} are new. Similarly as above, one can argue that these conditions are also valid for the problem considered in \cite{SWW2016}. \end{remark} \subsection{Towards additional complementarity conditions} \label{section: Further optimality conditions} The conditions \eqref{formal optimality system cone b}-\eqref{formal optimality system cone d} remain unproven. In this section we turn our focus on the condition \eqref{formal optimality system cone c}, which is \begin{equation*} \dot{z}(t,x)=0,\quad \vert g(t,x) + \Delta z(t,x) + \sigma \Delta \dot{z}(t,x)\vert < 1 \quad \Longrightarrow \quad \xi(t,x)= 0. \end{equation*} We will now present a possible proof for this optimality condition, which however requires a strong assumption about the sequence $\vert \dot{z}_\rho \vert_\rho'$. From now on we work with the function $\vert \cdot \vert_\rho$, which was suggested in the end of Subsection \ref{subsection: Approximation of absolute value}. \begin{equation} \vert v \vert_\rho = \begin{cases} \vert v \vert & \vert v \vert > \rho, \\ \frac{1}{3}\rho + \frac{1}{\rho^2}v^2(\rho - \frac{1}{3}\vert v \vert) & \vert v \vert \leq \rho, \end{cases}. \end{equation} \label{explizite approx funct} \begin{lemma} Let $(\bar{z},\bar{g})\in H^1_\star(I,V) \times H^1_\star(I,H)$ be a local solution of \eqref{eq: non-smooth problem}. Assume that there exists a sequence $(\rho_n)_n$ with $\rho_n \searrow 0$ such that $\vert \dot{z}_n(t,x)\vert_{\rho_n}'$ is pointwise convergent for a.a. $(t,x)\in I\times \Omega$.\\ Then there exists adjoint variables $(u, \xi)$ as in Theorem \ref{theorem: optimality system nonsmooth} such that $\xi(t,x)= 0$ for almost all $(t,x)\in I\times \Omega$ that satisfy $\dot{\bar{z}}(t,x)= 0$ and $ \vert \bar{g}(t,x) + \Delta \bar{z}(t,x) + \sigma \Delta \dot{\bar{z}}(t,x)\vert < 1$. \end{lemma} \begin{proof} Define the set \begin{equation*} M := \{ x\in \Omega \mid \dot{z}(t,x) = 0, \; \vert \bar{g}(t,x) + \Delta \bar{z}(t,x) + \sigma \Delta \dot{\bar{z}}(t,x) \vert <1 \}, \end{equation*} which is well-defined up to a set of zero measure. Let $(\rho_n)_n \in \mathbb{R} $ be a sequence with $ \rho_n \searrow 0 $ and $(z_n,g_n)$ the solution of $(P_{\rho_n})$ with \begin{align*} &g_n \to \bar{g} \qquad \text{in } H^1_\star(I,H), \\ &z_n \to \bar{z} \qquad \text{in} \; H^1_\star(I,V), \end{align*} c.f. Theorem \ref{theorem: convergence solutions}. Hence, it holds $g_n\to \bar{g},\; \Delta z_n \to \Delta \bar{z},\; \Delta \dot{z}_n\to \Delta \dot{\bar{z}}$ each in $L^2(I,V^*)$. Moreover, $\vert \dot{z}_\rho\vert_\rho'$ converges to $\bar{g} + \Delta \bar{z} + \sigma \Delta \dot{\bar{z}}$ in $L^2(I,V^*)$ since \begin{align*} \big\lVert \vert \dot{z}_n \vert_{\rho_n}' - \bigl[ \bar{g} + \Delta \bar{z}+ \sigma \Delta \dot{\bar{z}} \bigr] \big\rVert_{L^2(I,V^*)} &= \big\lVert \bigl[ g_\rho + \Delta z_\rho + \sigma\dot{z}_\rho \bigr] - \bigl[ \bar{g} + \Delta \bar{z}+ \sigma \Delta \dot{\bar{z}} \bigr] \big\rVert_{L^2(I,V^*)} \\ &\longrightarrow 0 \qquad \text{for}\; \rho \searrow 0. \end{align*} By assumption, $\vert \dot{z}_n(t,x) \vert_{\rho_n}'$ is pointwise convergent a.e.\@ on $I\times \Omega$. Since $\vert v \vert_{\rho_n}'\in [-1,1]$ for all $v\in \mathbb{R}$ we obtain by Lebesgue's dominated convergence theorem that $\vert \dot{z}_n \vert_{\rho_n}'$ converges in $L^2(I\times \Omega)$ to the pointwise limit. Hence $\bar{g}+ \Delta \bar{z}+ \sigma \Delta \dot{\bar{z}}$ is the pointwise limit of $\vert \dot{z}_n \vert_{\rho_n}'$. Now let $0 <\varepsilon < \frac{1}{2}$. We define the family of sets \begin{equation*} M_\varepsilon := \{ (t,x)\in I\times \Omega \mid \dot{z}(t,x) = 0, \; \vert \bar{g}(t,x) + \Delta \bar{z}(t,x) + \sigma \Delta \dot{\bar{z}}(t,x) \vert <1-2 \varepsilon \}. \end{equation*} Due to Egorov's Theorem, there exists for all $\delta >0$ a set $B_\delta \subset I\times \Omega$ such that $\vert \dot{z}_\rho \vert_\rho'$ converges uniformly on $B_\delta$ and $\big\vert \bigl( I\times \Omega \bigr) \setminus B_\delta \big\vert \leq \delta $. In particular, it follows $\vert M_\varepsilon \setminus B_\delta \vert \leq \delta$. The pointwise convergence of $\vert \dot{z}_n \vert_{\rho_n}'$ implies \begin{equation*} \lim\limits_{n\to \infty} \vert \dot{z}_n(t,x) \vert_{\rho_n}' \leq 1- 2\varepsilon \qquad \text{a.e.\@ on } M_\varepsilon, \end{equation*} and due to the uniform convergence on $B_\delta$ there exists $N_0\in \mathbb{N}$ such that \begin{equation} \label{proof: lemma cone c 1} \vert \dot{z_n}(t,x) \vert \leq 1 - \varepsilon \qquad \text{for a.a.}\; (t,x) \in M_\varepsilon \cap B_\delta \quad\text{and}\; \forall\; n \geq N_0. \end{equation} Now recall that we made a particular choice of $\vert \cdot \vert_{\rho_n}'$, see page \eqref{explizite approx funct}. It is easy to verify that this function satisfies \begin{equation*} \big\vert \vert v \vert_{\rho_n}' \big\vert \leq 1-\varepsilon \quad \Leftrightarrow \quad \vert v \vert \leq \rho_n(1-\sqrt{\varepsilon}) \quad \Leftrightarrow \quad \vert v \vert_{\rho_n}'' \geq \frac{2}{\rho_n} \sqrt{\varepsilon}. \end{equation*} Hence, it holds \begin{equation*} \vert \dot{z}_n \vert_{\rho_n}'' \geq \frac{2}{\rho_n} \sqrt{\varepsilon} \qquad \text{for a.a.}\; (t,x) \in M_\varepsilon \cap B_\delta, \quad\text{and}\; \forall\; n \geq N_0. \end{equation*} The boundedness of $\Big\lVert \vert \dot{z}_n \vert_{\rho_n}'' \xi_n^2 \Big\rVert_{L^1(I,L^1(\Omega))}$, cf., Corollary \ref{cor: Beschränktheit Adjungiert}, implies the existence of a $C>0$ such that for all $n\geq N_0$ \begin{align*} C \geq &\lVert \vert \dot{z}_n(t,x) \vert_{\rho_n}'' \xi_n(t,x)^2 \rVert_{L^1(I,L^1(\Omega))} \geq \int_{M_\varepsilon \cap B_\delta} \vert \dot{z}_n (t,x)\vert_{\rho_n}'' \xi_n(t,x)^2\; \dx \dt \\ &\geq \frac{2\sqrt{\varepsilon}}{\rho_n} \int_{M_\varepsilon \cap B_\delta} \xi_n(t,x)^2\; \dx \dt \end{align*} is satisfied. Due to embedding theorems for Sobolev functions there exists $p>2$ such that $V\hookrightarrow L^p(\Omega)$. Choose $q$ such that $\frac{1}{p} + \frac{1}{q} = \frac{1}{2}$. We obtain \begin{equation*} 0 \leq \int_{M_\varepsilon} \xi_n^2 \; \dx\dt \leq \frac{\rho_n}{2\sqrt{\varepsilon}} C + \int_{M_\varepsilon \setminus B_\delta} \xi_n^2\; \dx\dt \leq \frac{\rho_n}{2\sqrt{\varepsilon}} C + \delta^{\frac{1}{q}} \lVert \xi_n\rVert_{L^p(I,V)}. \end{equation*} As $\xi_n$ is bounded in $L^\infty(I,V)$ by Corollary \ref{cor: Beschränktheit Adjungiert}, there is a constant $C'>0$ such that \[ 0 \leq \int_{M_\varepsilon} \xi_n^2 \; \dx\dt \le C' \left( \frac{\rho_n}{\sqrt{\varepsilon}} + \delta^{\frac{1}{q}}\right). \] These previous results yields \begin{equation*} 0\le \limsup\limits_{n\to \infty} \int_{M_\varepsilon} \xi_n^2\;\dt \dx \leq \limsup\limits_{n\to \infty}C' \left( \frac{\rho_n}{\sqrt{\varepsilon}} + \delta^{\frac{1}{q}}\right) =C' \delta^{\frac{1}{q}}. \end{equation*} Since $\delta>0$ was arbitrary, we can conclude $\lim\limits_{n\to \infty} \int_{M_\varepsilon} \xi_n^2\; \dt \dx = 0$. Hence, we showed $\xi_n \to 0$ in $L^2(M_\varepsilon)$. Due to the boundedness of $\xi$ in $L^2(I,H)$, we get $\xi_n \rightharpoonup \xi$ (for a subsequence). Weak and strong limits have to be the same, and therefore it follows $\xi = 0$ a.e.\@ on $M_\varepsilon$ (for all weak subsequential limit points of $\xi_n$). Since $M = \bigcup_{k\in \mathbb{N}} M_\frac{1}{k}$, we obtain $\xi = 0$ a.e.\@ on $M$. \end{proof} In the next corollary we give a sufficient condition for pointwise convergence of $\vert \dot{z}_n \vert_\rho'$. \begin{corollary} Let $p \in (1,\infty)$ and assume that there exists a sequence $(\rho_n)_n$ with $\rho_n \searrow 0$ such that $\vert \dot{z}_n \vert_{\rho_n}'$ is bounded in $L^p(I,V)$. Then there exists a subsequence (denoted again by $\rho_n$) such that $\vert \dot{z}_n \vert_{\rho_n}'$ is pointwise convergent a.e.\@ on $I\times \Omega$. \end{corollary} \begin{proof} Since $z_n$ solves the smooth state equation we have \begin{equation*} \vert \dot{z}_n(t) \vert_{\rho_n}' = g_n + \sigma \Delta \dot{z}_n + \Delta z_n \qquad \text{a.e.\@ on } I. \end{equation*} We obtain by the boundedness of $g_n$ and $z_n$ that $\bigl( \vert \dot{z}_n \vert_{\rho_n}' \bigr)_n$ is bounded in $H^1(I,V^*)$. Hence, $\bigl( \vert \dot{z}_n \vert_{\rho_n}' \bigr)_n$ is bounded in $L^p(I,V)\cap H^1(I,V^*)$. Due to the Aubin-Lions lemma \cite{A1963,L1969}, the embedding $L^p(I,V)\cap H^1(I,V^*) \hookrightarrow L^p(I,H)$. is compact, which proves the claim. \end{proof} \begin{remark} Since $\nabla \bigl( \vert \dot{z}_n(t) \vert_\rho' \bigr) = \vert \dot{z}_n(t) \vert_\rho'' \nabla \dot{z}_n(t) $ and $\vert \cdot \vert_\rho''$ is not bounded for $\rho \searrow 0$ the sequence $\vert \dot{z}_n \vert_{\rho_n}'$ is not necessarily bounded in $L^p(I,V)$ and has to be assumed. \end{remark} \section{Conclusion and outlook} We derived and proved optimality conditions for the non-smooth optimal control problem. Our optimality system is similar to that in \cite{SWW2016}. We obtained stronger results, e.g., higher regularity of the adjoint variables. Despite the high regularity, we were not able to prove some of the expected optimality condition. Here, we presented an additional assumption to prove one of the missing conditions.
\section{Introduction} \label{sec_intro} Complex systems are characterized by emergent properties that cannot be immediately inferred from the properties of the units forming it. Among these properties, synchronization has become one of the most paradigmatic examples, because synchronization processes are ubiquitous in nature and play a very important role in many different contexts such as biology, ecology, climatology, sociology, and technology \cite{pikovsky2003synchronization,osipov2007synchronization,boccaletti2008synchronization}. Periodic interactions between the system units lead to a common rate of entrainment, which can be characterized either by a common phase or by a common frequency. Similarity between the periods of the units is crucial to achieve such a synchronized state but there is another ingredient that plays also a very significant role: the pattern of interactions between the units \cite{arenas2006synchronization,arenas2008synchronization,dorfler2014survey}. It is important not only for determining the time scale to reach a stationary state but in some cases -as in the situation under study in the present work- it can even prevent the synchronization of identical units \cite{PSD13,perez2017control}. In the past few years, renewed interest has emerged in the study of systems of coupled oscillators that move in space, forming complex time-dependent networks. Such setups can be used as simplified representations of real (more complex) systems to study the efficiency and feasibility of communication protocols among its units. These models, despite their apparent simplicity, display a variety of properties that cannot be explained based on an aggregation of the characteristics of the elements forming the system, but emerge from the interaction patterns themselves and their rules of change. Prominent examples where this modeling can be useful range from technological applications (groups of autonomous self-propelled vehicles) \cite{baronchelli2012consensus,BFFF16} to the study of synchronization in ethology (anurans, bush crickets and fireflies) \cite{chicoli2016fish,swain2015fish,giardina2008,deisboeck2009}. Also, mapping the mobility of the units to a certain change in their environment (who or what you see/follow/interact with at a given moment) can be used to study social phenomena and even unexpected financial behaviors \cite{saavedra2011} While the emergence of such behaviors is by no means restricted to systems with moving units, recently, interesting and intriguing phenomena triggered by the motion of its constituents have been studied. In particular, studies have been performed to describe how the ability of a system of coupled oscillators to achieve a synchronized state is affected by the speed of their motion under different experimental conditions and settings. Generally speaking, moving faster usually makes the time the system needs to reach a coherent state shorter \cite{fujiwara2011km,fujiwara2016chaos,levis2017prx} Nevertheless, more recent studies have shown how this is not always the case. When the coupling is highly nonlinear [i.e., for pulse-coupled oscillators (PCOs), also called integrate-and-fire oscillators (IFOs)] it may happen that increasing the velocity is not beneficial for the achievement of a synchronized state. It has been suggested~\cite{PSD13} that two ingredients are necessary for this behavior to be displayed: the interaction pattern has to be (a) sparse and (b) nonreciprocal. The first condition means that each oscillator is limited to interact with just very few units at the same time. Thus, without motion the system is disconnected -below the static percolation threshold~\cite{dall2002rgg} - and hence unable to synchronize globally because no signal can propagate through the entire system. Therefore, mobility is necessary to achieve synchronization. The second condition refers directly to the details of the interaction rule. It must include a certain degree of asymmetry. In summary, if moving pulse-coupled oscillators are (a) allowed to receive and send a signal only to a few other nearby elements that (b) may or may not correspond to them depending on a nonsymmetric interaction rule, then the synchronization time has a nonmonotonous dependency on the velocity of motion. That is, a velocity increase does not always correspond to a decrease in the system's synchronization time. For these setups, broadly three possible scenarios have been identified: (1) for slow speeds, moving a little faster promotes synchrony in a shorter time; (2) for fast enough velocities, the synchronization time approaches a minimum constant value which becomes independent of the speed of motion; and (3) for intermediate values, when the velocity is increased, counterintuitively, the system takes longer on average to reach a coherent state, sometimes being completely unable to synchronize. The underlying hypothesis to explain this phenomenology is that different synchronization mechanisms are at work for the two extreme regimes. In case 1, synchrony is achieved at the level of small groups of units that are able to transmit information among themselves. These small groups synchronize internally and then break and recombine into new groups with increasingly less diverse phases. This iterative process leads the system to synchronize at a global scale through a sort of coalescent process. In case 2, every oscillator has the chance to interact with many others in a short time span, so global synchrony emerges directly through individual interactions rather than by repeated cluster recombination. This description is very general and holds for any kind of coupling. For instance, it has been proven correct for moving Kuramoto oscillators \cite{fujiwara2011km}. However, if the coupling is highly non linear as in PCOs, difficulties arise for intermediate velocities when the typical time between two consecutive changes in the interaction pattern is comparable with the time that local groups take to synchronize. Then, some clusters are broken before they synchronize but at the same time the interactions are not rewired fast enough. In this case, the two typical timescales of the system, that of the motion of its units and that of the synchronization of local clusters, may interfere in a very ineffective way. This hypothesis has been demonstrated for a particular minimal model with particulary simple interaction rules~\cite{PSD13} where a semianalytic estimation of the value of the limiting velocities that separate the three regimes has been proposed. However, nonmonotonic behavior has been observed in other settings. In particular, more recent works~\cite{PRG15,perez2017control} have confirmed that a sparse and nonreciprocal interaction pattern is a necessary condition for such behavior to be observed, yet the validity of the general interpretation based on the two timescales has not been verified. In this paper, we analyze the model proposed in~\cite{PRG15,perez2017control} showing how it fits the interpretation proposed in~\cite{PSD13}. Additionally, we introduce a general explanation of what the unfruitful interplay between timescales is and how and why it is related to features (a) and (b) of the interaction pattern. In Sec. \ref{sec_model}, we roughly describe the model under study. We then determine for this specific model the velocity at which the expected time between two consecutive changes in the interaction pattern is the same as the average time local clusters need to synchronize. We show how, starting from just above this precise value of the speed, the dependency of the synchronization time on the velocity of the oscillators may change depending on whether conditions (a) and (b) are satisfied. We thus validate the hypothesis about the ineffective interplay between the two time scales for an additional, more realistic (suitable to be implemented with real robots), experimental setting than the one studied in~\cite{PSD13}. In the second part, Sec. \ref{sec_conditions}, we focus on studying the relationship between conditions (a) and (b) and the appearance of the non monotonic behavior through the analysis of the oscillators interaction patterns. In particular, we show how the existence of local configurations that are not able to reach a synchronized local state is what makes the interplay between the time scale fruitless. To conclude, we present a complete explanation of the necessary and sufficient conditions for this peculiar and unexpected phenomenon to occur in terms of the microscopic topological and dynamical characterization of the system. \begin{figure}[htbp] \begin{center} \includegraphics[width=0.4\textwidth]{F1.png} \caption{Illustration of the interaction rule. The arrows indicate the neighbors of each oscillator and the cones of vision are the shaded green areas determined by $\alpha$ and $R$. Upon firing by an oscillator, its neighbors are affected by a phase update.} \label{fig0} \end{center} \end{figure} \section{The ineffective interplay of two time scales.} \label{sec_model} The model considered in this paper was introduced in~\cite{PRG15,perez2017control} and can be regarded as a modified version of the minimal model originally proposed in~\cite{PSD13}. It consists of a population of $N$ moving oscillators with velocity $V$ and random orientation on a square of side length $L$ with finite boundary conditions. When a unit reaches a border, its motion is reoriented randomly inside the box. The internal phases of the agents $\phi \in (0,1)$ increase uniformly with frequency $\tau^{-1}$, \begin{align} \frac{d\phi_i}{dt}=\frac{1}{\tau} \qquad \forall \,i = 1,\dots, N, \end{align} until they reach a maximum value of 1, when a firing event occurs and the phase is reset. The interaction rule of this particular model is based on cones of vision (COV), which are circular sectors centered in the oscillators and oriented in the direction of their motion (parallel to $V$). The COV are characterized by a radius $R$ and an angle $\alpha$ that are the same for all the units in the system (see Fig.~\ref{fig0}). Whenever a firing event is triggered, all units that have the emitting oscillator inside their COV are affected. Upon a firing by oscillator $i$ at time $t$, all such oscillators $n$ - which we call neighbors of unit $i$ from now onward - receive a signal and update their phases $\{\phi^i_n\}$ by a factor $\varepsilon$: \begin{align} \phi_{i}(t^-)=1 \Rightarrow \left \{ \begin{array}{l} \phi_i(t^+)=0\\ \phi^i_n(t^+)=(1+\varepsilon)\phi^i_{n}(t^-) \end{array} \right. . \end{align} The phase update is performed at frozen time until the phases of all oscillators have been updated (some agents may reach their threshold and fire upon receiving a phase update from a firing neighbor). Then the phases evolve again uniformly in time (we take $\tau=1$ to fix the time scale) until another firing is triggered. We consider that the system is synchronized when a succession of $N$ firing events takes place, or equivalently when all the oscillators have exactly the same internal phase. Following~\cite{PSD13}, in order to verify the hypothesis that the nonmonotonic behavior (NMB) is caused by an ineffective interplay between the two time scales that characterize the system, we must determine both the average time between two sequential changes in the interaction pattern, $T_C$, and the average local synchronization time $T_L$. By local synchronization time we mean the time that a subset of interacting oscillators takes to reach equal phases. Such a subset is defined as follows: taking one unit as a starting point, the cluster includes all its neighbors (those that receive its signal) and the oscillators whose neighbor is this unit (that send their signal to it); then the same is done for every newly included unit until no new oscillator is added to the group. We call such subsets of oscillators local clusters and their definition corresponds to what in graph theory is called a weakly connected component of a direct graph. In Fig.~\ref{fig0}, oscillators $1$, $2$, $3$, and $4$ form a local cluster, while oscillator $5$ belongs to another one whose only element is oscillator $5$ itself. If our hypothesis is correct, then a change in the dependency of the synchronization time on the velocity should be observed when these two characteristic times approach each other if conditions (a) and (b) of the interaction pattern are satisfied. In other words, there should exist a typical velocity - depending on the parameters of the system - such that $T_C$ is equal to $T_L$. Above this velocity, the system may exit the slow regime and the synchronization time will display a NMB. Besides the usual parameters that characterize every model of this type - the number of oscillators in the system $N$, the coupling constant $\varepsilon$, and the size of the box $L$ - the model under study is defined by two additional parameters that determine the spatial details of the interaction rule: the reach (radius $R$) and shape (angle $\alpha$) of the COV. By varying these parameters it is possible to tune the average number of neighbors (through the area) and the proportion of nonreciprocal interactions (through the angle) thus directly affecting the properties of sparseness (a) and asymmetry (b) of the interaction pattern. \begin{figure}[htbp] \begin{center} \includegraphics[width=0.5\textwidth]{F2.pdf} \caption{$\langle T_{\text{sync}} \rangle$ vs $\nu$. (a) We fix $\bar{k}=1$. NMB is obtained by decreasing $\alpha$, or equivalently by enforcing the asymmetry of the interaction pattern. (b) We fix $\alpha=\pi$, so we consider partially asymmetric interactions. For this value of $\alpha$, the NMB is no longer observed if we increase the connectivity. In such cases where NMB is displayed, $\nu=1$ (or equivalently $T_{L}=T_{C}$) characterizes the velocity from which the monotonic decreasing of $\langle T_{\text{sync}}\rangle$ is broken. $\langle T_{\text{sync}}\rangle$ is averaged over 75 realizations in a setting of $N=20$ oscillators in a box of side $L=200$, with coupling constant $\epsilon=0.1$. Hereafter, this same setting is implemented in all the figures.} \label{fig12} \end{center} \end{figure} In Fig.~\ref{fig12}(a) we show the average synchronization time $\langle T_{\text{sync}} \rangle$ as a function of the ratio $\nu= T_L/T_C$ for several values of $\alpha$ and a fixed area of the COV, fixing $N$, $L$ and $\varepsilon$ too. In order to keep everything but the fraction of nonreciprocal interactions fixed, the radius has been adjusted to force the average number of neighbors per oscillator to $\bar{k}=1$. The appropriated value of $R$ for each $\alpha$ can be computed analytically under periodic boundary conditions, yet, due to finite boundary effects, a correction needs to be applied on the simulations (see Appendix~\ref{app:scaling_k}). The empirical value of $T_L$ for each set of parameters has been calculated numerically under static conditions, that is, for $V=0$. Initiating the system with random initial conditions (phases and orientation of the COV) several times, $T_L$ has been computed as the average time a reference oscillator takes to synchronize with the rest of the units in its local cluster. The cases in which it is not possible to achieve a coherent state after a fixed maximum number of cycles $T_{\text{max}} \gg \langle T_{\text{sync}} \rangle$ have been discarded assuming that they do not contribute to the general enhancement of coherency. Thus, $T_L$ is the average time synchronizable local clusters of oscillators of any size need to synchronize. Concerning $T_C$ - the average time between two sequential changes in the connectivity pattern - notice that in principle it can be determined via semi-analytic calculations. Following the line of reasoning exposed in \cite{PSD13}, we can estimate $T_C$ as the time a unit needs to exit the COV of one of its neighbors, averaging over all the possible initial positions and orientations, divided by the total number of oscillators in the system. However, obtaining an explicit expression of this quantity as a function of $V$, $\alpha$ and $R$ is a tedious task that does not deserve the effort in this context. Hence, its value has been estimated numerically. In Appendix~\ref{app:pi_time} we show an example of how such calculation can be performed in the particular case of $\alpha=\pi$ to obtain the explicit dependency $T_C(V,R)$. Figure~\ref{fig12}(a) shows that, if $\alpha$ is small enough, starting from $\nu=1$ (that is, when $T_L = T_C$), the decreasing of $\langle T_{\text{sync}} \rangle$ slows down and then the appearance of NMB is patent for larger values of $\nu$ (see Appendix \ref{app_nu1} for further numerical evidences). The smaller the value of $\alpha$, the greater the deviation from the monotonous behavior. For larger values of the angle, the connectivity pattern gets increasingly symmetric and condition (b) is no longer satisfied, so the monotonic behavior is recovered. In particular, when $\alpha=2\pi$ we recover the fully symmetric model studied in~\cite{PSGD12} for which no deviation from the monotonous behavior has ever been observed, for any choice of the parameters. In Fig.~\ref{fig12}(b) we plot again $\langle T_{\text{sync}} \rangle$ as a function of $\nu$ but this time for a fixed value of the COV angle, $\alpha=\pi$, with increasing radius of the cone in order to vary the average number of neighbors per oscillator. As expected, NMB can be observed for $\nu>1$ if $\bar{k}$ is small enough, while the nonmonotonicity fades for larger $\bar{k}$, in accordance with the results found in \cite{perez2017control}. We are thus able to confirm that $\nu$ is indeed a suitable control parameter for this class of models, and not only for the particular example proposed in~\cite{PSD13}. For all the sets of parameters for which the system displays NMB, we observe a change in the dependency of the synchronization time above $\nu=1$. It then reaches a local minimum around $\nu=2$ and a peak roughly around $\nu=20$, which is when $T_L$ is comparable with $NT_C$ and almost no local cluster lasts long enough to be able to synchronize completely. These observations corroborate the hypothesis that it is actually the ineffective interplay of the two timescales that complicates the synchronization process. Moreover, it confirms that such phenomenology will be surely observed whenever two conditions are satisfied, that is, when both $\alpha$ and $\bar{k}$ are small enough. Notice also that changing the coupling parameter $\varepsilon$ or the number of oscillators, $N$, does not affect the validity of our arguments (see Appendix~\ref{app:scaling_eps}). \begin{figure}[htbp] \begin{center} \includegraphics[width=0.5\textwidth]{F3A_rho_Mm.pdf} \includegraphics[width=0.5\textwidth]{F3B_rho_NMB.pdf} \caption{ $\rho_{\text{Mm}}$ and $\rho_{\text{NMB}}$ vs $p_{A},\bar{k}$ with superimposed isolines. The boundary line represents the smoothed interpolation of points for which $\rho_{\text{NMB}} \in [-150,150]$, which marks the appearance of NMB. Figures are averaged over 150 realizations with $N=20$ and $\epsilon=0.1$ and interpolated using a multiquadratic radial basis function (RBF). For visualization purposes, in the panel, values for which $\rho_{\text{Mm}}<1$ have been saturated at $\rho_{\text{Mm}}=1$. In the lower panel, values are displayed using a \emph{symlog} scale, which is shown as $-\log |\rho_{\text{NMB}} |$ if $\rho_{\text{NMB}}<0$ with linear interpolation in the range $\rho_{\text{NMB}} \in [0.01,-0.01]$.} \label{fig3} \end{center} \end{figure} Let us introduce a metric able to capture in a quantitative way the degree of nonmonotonicity of the system behavior. For every pair ($\alpha$, $R$), we can compute the estimator $\rho_{\text{Mm}}=T_{\text{sync}}^{\text{MAX}}-T_{\text{sync}}^{\text{min}}$, that is, the the difference between the largest and the smallest value of $\langle T_{\text{sync}}\rangle$. More precisely, $T_{\text{sync}}^{\text{min}}$ is the first minimum of $\langle T_{\text{sync}}\rangle$ starting from $\nu=0$, hence, it may correspond either to a local minimum or to the asymptotic value for $\nu \to \infty$ (fast switching regime), depending on whether the system does or does not display NMB. Likewise, $T_{\text{sync}}^{\text{MAX}}$ is the maximum value of the average synchronization time for $\nu>\nu_{\text{min}}$, that is, for a value of $\nu$ larger than that corresponding to $T_{\text{sync}}^{\text{min}}$. When the system behavior is monotonic, besides small fluctuations, there is no difference between $T_{\text{sync}}^{\text{MAX}}$ and $T_{\text{sync}}^{\text{min}}$, so $\rho_{\text{Mm}}\approx 0$. On the contrary, if the system displays a high degree of nonmonotonicity, the difference between the minimum and the maximum of $\langle T_{\text{sync}}\rangle$ is not negligible and $\rho_{\text{Mm}}$ takes increasingly larger values. In the heatmap in Fig.~\ref{fig3}(a), $\rho_{\text{Mm}}$ is plotted against the average number of neighbors $\bar{k}$ and the expected fraction of nonreciprocal interactions $p_A=1-\alpha/2\pi$. Below $p_A\simeq 0.4$ the system behaves monotonically (dark blue). Above $p_A\simeq 0.4$, depending on the value of $\bar{k}$, it may display NMB. The transition between the monotonic and nonmonotonic regions is quite smooth, especially for relatively large $\bar{k}$. According to the definition of $\rho_{Mm}$, when $\rho_{Mm}>1$, the system displays nonmonotonicity. However, if $\rho_{Mm}<<T_{\text{sync}}^{\text{min}}$, the behavior can be classified as just slightly nonmonotonic: $\langle T_{\text{sync}}(\nu)\rangle$ displays a plateau for intermediate $\nu$, with a small bulge after $\nu=1$. For larger $\rho_{Mm}$, we find stronger NMB, ranging from the ultra-NMB of the top left corner, where the sychronization time diverges for intermediate velocity, to the non diverging NMB displayed when the system is more densely connected but most of these connections are asymmetric (top-right part). In the lower $\rho_{Mm}$ region the behavior of the system is perfectly uniform: increasing the velocity makes the synchronization time decrease monotonically. Although this description captures all the relevant features of the system behavior, it does not provide a clear border between what is proper NMB and behaviors barely deviating from monotonicity, which do not suppose any relevant violation of the general rule that states that \textit{mobility enhances synchronization}. With the aim of differentiating properly nonmonotonicity from other trends, we propose a different estimator that takes positive values when the behavior is strongly nonmonotonic and negative ones otherwise. Such an estimator is defined as the difference between the expected synchronization time near to the local minimum and to the local maximum: $\rho_{\text{NMB}}=\langle T_{\text{sync}}(\nu=20)\rangle - \langle T_{\text{sync}}(\nu=2)\rangle$. In this way, we are regarding as NMB only those cases such that increasing the velocity by a factor of 10 does not benefit the ability of the system to synchronize in a shorter time. The choice of the reference values of $\nu$ is, to some extent, arbitrary. Nonetheless, we have already shown that $\nu$ is a good control parameter for this class of systems and the average synchronization time as a function of $\nu$ in the NMB region displays common features, one of the most relevant being a common localized range of values at which the synchronization time slows down its decreasing, reaches a minimum, and subsequently starts to increase up to a maximum or a divergence. Hence, a slight change of the chosen values of $\nu$ does not modify the result shown in Fig.~\ref{fig3}(b): the existence of two clearly separated regions which correspond to the presence (blue) or absence (orange) of strong NMB, respectively. In the figure, the border is highlighted by a red line. Above this line, the system displays a degree of nonmonotonicity that ranges from the ultra-NMB of the top left corner, where the synchronization time diverges for intermediate velocities, to the non diverging NMB displayed when the system is more densely connected but most of these connections are asymmetric (top right part). In all these circumstances, it is correct to affirm that there exists a range of velocities such that increasing the mobility of the oscillators makes the synchronization process considerably slower. More specifically, we observe that the deviation from the monotonic behavior is maximal ($\rho_{\text{NMB}}>10^4$, dark blue) when $\bar{k}$ is very small, namely, $\bar{k}<1.8$, and $p_A$ is larger than $0.6$, that is, when conditions (a) and (b) are both satisfied. It is also worth noticing that when the fraction of asymmetric interactions is large enough ($p_A>0.6$), the strong NMB does not disappear completely by merely increasing the connectivity ($10^2<\rho_{\text{NMB}}<10^4$). In other words, it is not possible to affirm that a minimal connectivity is still a necessary condition for NMB when almost all the interactions are no-reciprocal. Summarizing, it is possible to draw a well-defined boundary that separates the region of the parameter space where the system displays strong NMB. The simultaneous satisfaction of conditions (a) and (b) leads to ultra-NMB, but condition (b) alone is able to grant a relevant degree of nonmonotonicity even when the sparsity of the connections is violated. \section{A microscopic topological explanation for the emergence of NMB}\label{sec_conditions} In this section we analyze in detail what happens at the local clusters when the parameters $\bar{k}$ and $p_A$ are varied. Our goal is to explain why and how some combinations of features (a) and (b) make the interplay between the mobility time scale and the time scale of local synchronization critically ineffective. To this end, the model under study is a very useful tool, different from the nearest-neighbors setting where $p_A$ depends on the number $k$ of neighbors with whom the units are allowed to interact. Indeed, through the parameters $R$ and $\alpha$, it is possible to tune both the density and the asymmetry of the interactions, respectively, while keeping the other constant. Consider a static local cluster of nonsynchronized oscillators, firing at their out-neighbors (units having them inside their COV) and receiving from their in-neighbors (units inside their COV). We may ask ourselves what is needed for such a configuration to synchronize in finite time. Due to the asymmetry of the interactions, even if each unit is receiving or sending signals to at least one other oscillator, it might be the case that some pathological configurations do not allow signal to flow throughout the entire cluster thus preventing it from synchronizing. We call such interaction patterns “frustrated configurations”: a setup that is not able to synchronize because of structure-related reasons. Consider, for instance, the case of two pairs of reciprocal neighbors firing at each other plus another oscillator that is not firing at anyone but is receiving from one element of each pair. These five units form a local cluster, but the signals interchanged between one pair do not affect the other in any way. Thus, they cannot synchronize. Every oscillator is receiving or sending signals to some units in the group, but still it is not possible for them to communicate at the cluster level. In topological terms, a configuration is frustrated if \emph{there does not exist an oscillator from which there is a (directed) path to every pair of oscillators which do not have a path between them}. Examples of this situation are depicted in Fig.~\ref{fig4}. \begin{figure}[htbp] \begin{center} \includegraphics[width=0.45\textwidth]{F4.png} \caption{Illustration of frustrated conditions. Cluster A is non frustrated because there is a path between all pairs of oscillators. Cluster B is non frustrated because there is an oscillator (3) from which there is a path to each oscillator of every pair without a path between them (pairs 1-4,1-5,2-4 and 2-5). Cluster C is frustrated because there is not an oscillator from which there is a path to each oscillator of a pair without a path between them (e.g., pair 2-4).} \label{fig4} \end{center} \end{figure} In order to understand the impact of these configurations, imagine a cluster of oscillators laid out into a nonfrustrated configuration that is about to reach a synchronized state. If some change takes place in the internal interactions as a consequence of the motion (e.g. an oscillator exits any COV of the cluster) frustration may occur. Then, the phases that were converging towards a common value will move apart and the time they have spent together can be regarded as “wasted” in terms of the synchronization process. The worst scenario corresponds to the cluster having almost reached a coherent state when it changes into a frustrated configuration. Because of the peculiar characteristics of the pulse-coupling (with small enough refractory period, otherwise NMB does not appear \cite{perez2017control}), the achieved partial coherence will be wasted. Conversely, an optimal case would be the one in which a cluster becomes frustrated due to a change in the internal interactions just after synchronizing. Indeed, if the cluster is already synchronized, such a change will not affect the achieved coherency. Any extra time spent by the oscillators in the same configuration once local synchronization has been attained does not help to enhance the coherence of the system. For lower velocities this happens more often and for longer periods, making the average (global) synchronization time longer. \begin{figure}[htbp] \begin{center} \includegraphics[width=0.5\textwidth]{F5bis.pdf} \caption{$P_{fr}$ vs $p_{A},\bar{k}$. The probability of obtaining at least one frustrated cluster decreases by decreasing the asymmetry of the interaction pattern and, to a lesser degree, by increasing the connectivity. The same boundary shown in Fig. \ref{fig3}(b) has been added as a guide for comparison. $P_{fr}$ averaged over 150 static interaction networks composed of $N=20$ oscillators. Heatmap interpolated using multiquadratic RBF. \label{fig5} \end{center} \end{figure} \begin{figure}[htbp] \begin{center} \includegraphics[width=0.5\textwidth]{F6.pdf} \caption{Fraction of oscillators in the largest connected component $g$ against the expected fraction of asymmetric interactions, $p_{A}$, and the average number of neighbors, $\bar{k}$. Heatmap interpolated using multiquadratic RBF.} \label{fig6} \end{center} \end{figure} The key factor driving synchronization at a global scale are hence non frustrated clusters that have reached local synchronization. For slow velocities, even if their overall fraction is small, for every “cluster change” the oscillators belonging to non frustrated (and already synchronized) clusters act as effective “spreaders” of synchronization across the system. However, as velocity is increased beyond the point where nonfrustrated clusters cannot synchronize before a topological change occurs ($\nu>1$), the fraction of effective “spreaders” starts to decrease and synchronization is no longer promoted by mobility, leading to NMB. Synchronization time thus depends on the trade-off between two factors: the presence of frustrated clusters in the system and the chances that nonfrustrated clusters have reached local synchronization before a change in the interaction pattern takes place. The first factor is a merely topological characteristic of the interaction pattern, which only depends on the interaction rules and not on the velocity of the oscillators. On the contrary, the second one is affected by mobility in a negative way: the higher the velocity, the smaller the chances that local clusters can synchronize. To quantify the first property, in Fig.~\ref{fig5} we show the probability of observing at least one frustrated configuration $P_{fr}$ in a randomly generated static connectivity pattern as a function of the fraction of asymmetric interactions, $p_A$, and the average number of neighbors $\bar{k}$. It can be deduced from the isolines that what affects $P_{fr}$ the most is $p_A$, while the only effect of $\bar{k}$ is that of slightly reducing the value $P_{fr}$ if increased at fixed $p_A$. In this regard, the heatmap of $P_{fr}$ shows an overall resemblance to Fig.~\ref{fig3}(a), making this magnitude a good candidate to explain the transition between the monotonic and the nonmonotonic regions. By overprinting the NMB boundary shown in Fig.~\ref{fig3}(b) on Fig.~\ref{fig5}, the relation between the boundary $\rho_{NMB}\approx 0$ (in red) and $P_{fr}$ is also clear. The boundary of the NMB occurs between isocurve $P_{fr}=0.55$ and isocurve $P_{fr}=0.75$. More precisely, it follows $P_{fr}=0.55$ when $\bar{k}\leq 2$, then moves to $P_{fr}=0.75$ as the connectivity increases. This observation can be interpreted in terms of the general topology of the interaction pattern: Sparsity penalizes the achievement of synchronization in the intermediate velocity regime because global coherency through local synchronization is reached faster when there are large nonfrustrated clusters already synchronized (only one common phase for all the oscillators) than when there are several small clusters in the same situation. For that reason, the higher the connectivity, the higher $P_{fr}$ in order to make the local synchronization mechanism ineffective for intermediate velocities (which leads to NMB). Therefore, when the system is made up of separated small groups of connected oscillators, having at least one frustrated cluster in around $50-55\%$ of the static configurations is enough to trigger NMB. On the contrary, when the system is almost connected (the largest connected components includes more than $80\%$ of the oscillators) and the effect of mobility can be understood as that of a rewiring mechanism, a larger $P_{fr}$ is necessary in order to observe strong nonmonotonicity\footnote{Due to the limited number of oscillators, we cannot talk about a proper percolation transition.}. In Fig.~\ref{fig6} we plotted the heatmap of the average fraction of oscillators belonging to the largest (weakly) connected component of the system to further clarify this point. As a general conclusion, we can state that a certain amount of frustrated configurations are required for the system to display NMB. The value ranges between $P_{fr}=0.55$ and $P_{fr}=0.75$, depending on the connectivity. It is not possible, at the present stage, to extend these results to other values of the rest of the parameters, and especially to other number of units in the system. However, most of the significant trends in the behavior of these systems do not change by changing $\epsilon$ or $N$ (see Appendix.~\ref{app:scaling_eps}). Even though we cannot make a strong claim stating that the precise amount of $P_{fr}$ required would not change under other conditions, it is very likely that the relation between frustration and nonmonotonicity would stay the same. In particular, it is important to stress, that lying below the percolation threshold is not a necessary condition for the appearance of NMB: If the fraction of asymmetric interaction is large enough, the existence of frustrated configuration enhances nonmonotonicity even when all the oscillators belong to the same cluster. \section{Conclusions}\label{sec_conclusions} The present work constitutes another step forward to understand the peculiar phenomena of the prevention of synchronization of a group of mobile PCOs by tuning their velocities, presented in \cite{PSD13} and further studied in other works \cite{PRG15,7277178,perez2017control}. In this research, we have first shown how two conditions are needed for this phenomenology to appear, mainly a sparse connectivity pattern and asymmetric interactions. We have confirmed a control parameter $\nu$, a quantity expressed in terms of the quotient among the time a typical cluster of oscillators takes to synchronize and the average time spent for these clusters to suffer a connectivity change due to mobility. We furthermore have put forward a microscopic explanation to show how the appearance of frustrated clusters is the most likely explanation behind the nonmonotonic dependency of the average synchronization time on the velocity in systems of moving PCOs. Frustration can be regarded as an emerging property of the connectivity pattern that solely depends on the interaction rules implemented in each model, not on their dynamics. This leads us to believe that any model of the same class (moving PCOs) might display exactly the same behavior. Additionally, we have proposed two metrics that allow one to (1) determine if the system can display NMB and (2) predict for which values of the velocity such behavior may occur. The first metric is the probability of finding a frustrated configuration $P_{fr}$. Although we are not able, at the present moment, to suggest a precise value of $P_{fr}$ above which NMB will be observed, we can confidently state that if $P_{fr}$ is high enough, NMB will surely appear. The threshold value is affected by the concurrence of other factors, such as the size of frustrated clusters or the existence of synchronizable subclusters within one frustrated group. The relevance of these secondary factors is very difficult to analyze because of finite size effects. Further efforts need to be devoted to determining the precise necessary conditions for NMB in terms of the values of the parameters of the model. The second metric, $\nu$, had already been conceptually introduced in \cite{PSD13}. In this paper, we confirmed that it is a general fact that, above $\nu=1$, when the typical time for local synchronization is larger than the average time between two topological changes, the behavior of the system may deviate from monotonicity. It must be noted that the phenomenology studied here may have large relevance due to their application in swarms of autonomous robotic vehicles, as its appearance has been reproduced in experimental settings \cite{perez2017control}. The present work sheds light on explaining the appearance of this intriguing emerging behavior and, moreover, helps in identifying possible general features that might be not only restricted to mobile pulse-coupled oscillators but can be applied more generally to wider sets of models subject to discrete, nonlinear, firing processes. The explanation provided in this work constitutes thus solid ground from which to test this hypothesis on other models, equally nonlinear, proposed in the literature, which might be especially relevant for new technological applications in robotics. \acknowledgments The authors acknowledge support from Ministerio de Econom\'{\i}a y Competitividad of Spain Projects No. FIS2012-38266-C02-02 and No. FIS2015-71582-C2-2-P (MINECO/FEDER); and Generalitat de Catalunya Grant No. 2014SGR608.
\section{Introduction} One of the most important properties of a Boolean function $f:\{-1,1\}^{n}\to\{-1,1\}$ is its robustness to noise in its inputs. This robustness is traditionally measured by the \emph{noise sensitivity} of the function \begin{equation} \NS_{\delta}[f]\dfn\P\left(f(X^{n})\neq f(Y^{n})\right),\label{eq: noise sensitivity} \end{equation} where $X^{n}\in\{-1,1\}^{n}$ is a uniform Bernoulli vector, and $Y^{n}\in\{-1,1\}^{n}$ is obtained from $X^{n}$ be flipping each coordinate independently with probability $0<\delta<1/2$. The noise sensitivity of Boolean functions has been extensively investigated \cite{Bool_book}, most often in terms of the equivalent notion of \emph{stability} \[ \Stab_{\rho}[f]\dfn\E\left[f(X^{n})f(Y^{n})\right], \] where $0<\rho<1$ is the correlation parameter, i.e., $\rho\triangleq\E(X_{i}Y_{i})=1-2\delta$. The noise sensitivity of $f$ can also be interpreted as the error probability of a predictor trying to guess the value of $f(X^{n})$ by simply applying $f$ to the noisy input $Y^{n}$. While this predictor is intuitively appealing and easy to analyze, it is generally suboptimal. As a simple example, think of the case where $f$ is biased and the noise level $\delta$ is sufficiently high; it is easy to see that a constant predictor would result in a lower error probability than $f(Y^{n})$ would. The optimal predictor, i.e., the one that minimizes the error probability in predicting $f(X^{n})$ from $Y^{n}$, is clearly given by the sign of $\E(f(X^{n})\mid Y^{n}=y^{n})$. In general, this function might be rather different from $f$ itself. However, while using the optimal predictor is generally superior to using the function itself (albeit as we shall see, by a factor of two at the most), computing the former is often very difficult as it depends on the values of the function over the entire Hamming cube. It is therefore interesting to study functions that coincide with their optimal predictor; we call these functions \emph{self-predicting} (SP). Predicting the value of a SP function by applying it to noisy inputs is optimal, clearly a desirable property. For example, suppose the function describes a voting rule and the noise represents possible contamination of the votes (e.g., due to fraud). If the function is SP, then any mechanism used for computing the function with clean votes can be used without any modification in case it turns out that the votes are actually noisy. In this case, the output of the function is the optimal predictor for its true value. It should be noted, however, that being SP does not imply anything about the ordinary stability of the function. For example, all parity functions (characters) are SP functions, including the least stable one, to wit, the parity of all inputs (namely, the largest character). Nonetheless, if, e.g., there are a few alternatives for choosing a function to be used, and all of these functions have the same stability, it is sensible to choose one of the SP functions among them (if such exists). Nonetheless, a function can be SP at certain noise levels but not at others. We thus say that a function is \emph{uniformly SP (USP)} if it is SP at any noise level. For example, in the voting scenario mentioned above, it may not be realistic to assume that the noise level is known, yet if the function is USP it can always be used to obtain the optimal prediction of the true voting result. In this paper, we introduce and explore self-predictability of Boolean functions. We derive various properties of SP functions, and specifically the following: \begin{itemize} \item If a function is monotone (resp. odd, resp. symmetric), then so is the optimal predictor. We use this fact to show that Majority functions are USP, and that for a monotone function, self-predictability at dominating boundary points is necessary and sufficient for the function to be SP. \item High correlation SP: A function with Fourier degree $k$ is SP for any $\rho>1-1/k^{2}$, and if $f$ is SP for $\rho>1-\varepsilon$ and $n=\Omega(1/\varepsilon)$, then each point $x^{n}$ has a distance-$2$ neighbor with the same function value. \item A low correlation SP (abbreviated LCSP) function is spectral threshold, i.e., equal to the sign of its lowest Fourier level. This simple fact implies many properties: LCSP functions are either balanced or constant, they have energy at least $1/2$ on their first level (if any), and a monotone LCSP function is $\sqrt{\frac{2}{\pi n}}$-close to a linear threshold function. \item Sharp threshold: While all functions are trivially SP for $\rho>1-\frac{2\ln2}{n}+O(n^{-2})$, only a doubly-exponential small fraction are SP for $\rho=1-\frac{2\alpha}{n}$ for any $\alpha>1$. The same continues to hold in the fixed high-correlation regime. \end{itemize} The paper is organized as follows. Section \ref{sec:Definitions} contains basic notation and Fourier theory facts. The self-predictability problem and some basic properties are introduced in Section \ref{sec: USP functions}, including the proof that Majority is USP. In Section \ref{sec:high-corr} we discuss high-correlation sufficient conditions for SP. In Section \ref{sec:low-corr} we discuss low-correlation SP functions. Section \ref{sec:stab} contains stability-based necessary conditions for SP. In Section \ref{sec:Sharp-Threshold} we prove the \emph{sharp threshold} phenomenon for the SP property. We conclude the paper in Section \ref{sec:Open Problems} with a list of open problems. \section{Preliminaries\label{sec:Definitions}} \subsection{Notation and Definitions} We use upper case letters for random variables and random vectors, and their lower case counterparts for specific realizations. For vectors we write $x_{i}^{j}=(x_{i},\ldots,x_{j})$ and omit the subscript whenever $i=1$. A concatenation of vectors is denoted by $(x_{i}^{j},x_{k}^{m})=(x_{i},\ldots,x_{j},x_{k},\ldots,x_{m})$. The cardinality of a set $S$ will be denoted by $|S|$. The complement of the set $\mathcal{A}$ is denoted by $\mathcal{A}^{c}$. We write $[n]$ for the set $\{1,2,\ldots,n\}$. The indicator function is denoted by $\I(\cdot)$, and the sign function $\sgn(z)$ returns the sign of $z$, and by convention $\sgn(0)=0$ unless otherwise stated. Throughout, the logarithm $\log(t)$ is base $2$, while $\ln(t)$ is the natural logarithm. The Hamming distance between $x^{n}$ and $y^{n}$ is $\Hamd(x^{n},y^{n})$. In this paper, $X^{n}$ is a uniformly distributed binary vector, and $Y^{n}$ is the binary vector obtained by flipping each coordinate of $X^{n}$ with some given probability $\delta\in[0,1/2]$. We write $p(x^{n},y^{n})$ to denote the associated joint probability mass function, and $p(x^{n}\mid y^{n})$, e.g., to denote the conditional probability mass function. As a binary alphabet, for the most part we will find it convenient to work with $\{-1,1\}$, in which case it is more natural to consider the \emph{correlation} parameter $\rho\dfn\E(X_{i}Y_{i})=1-2\delta\in[0,1]$ instead of the crossover probability parameter $\delta$. We will use these notations throughout the paper, with the exception of a few proofs where we find it more convenient to work with $\delta$ and the binary alphabet $\{0,1\}$. \subsection{Boolean Functions and Fourier Analysis} In this paper we consider Boolean functions $f:\{-1,1\}^{n}\to\{-1,1\}$. The \emph{distance} between two Boolean functions $f$ and $g$ is defined as the fraction of inputs on which they disagree, i.e., $\P(f(X^{n})\neq g(X^{n}))$. We say that $f$ and $g$ are \emph{$\varepsilon$-close} if their distance is at most $\varepsilon$. An inner product between two Boolean functions $f,g$ is defined as \begin{equation} \left\langle f,g\right\rangle \dfn\E\left(f(X^{n})g(X^{n})\right).\label{eq: inner product} \end{equation} A \emph{character} associated with a set of coordinates $S\subseteq[n]$ is the Boolean function $x^{S}\dfn\prod_{i\in S}x^{i}$, where by convention $x^{\emptyset}=1$. It can be shown \cite[Chapter 1]{Bool_book} that the set of all characters form an orthonormal basis with respect to (w.r.t.) to the inner product (\ref{eq: inner product}). Furthermore, \[ f(x^{n})=\sum_{S\subseteq[n]}\hat{f}_{S}\cdot x^{S}, \] where $\{\hat{f}_{S}\}_{S\subseteq[n]}$ are the \emph{Fourier coefficients }of $f$, given by $\hat{f}_{S}=\langle x^{S},f\rangle=\E(X^{S}\cdot f(X^{n}))$. When $S$ is a singleton $\{i\}\subset[n]$, we use the shorthand $\hat{f}_{i}=\hat{f}_{\{i\}}$. The \emph{Fourier weight} of $f$ at degree $k$ is \[ W^{k}[f]\dfn\sum_{S\subseteq[n]\colon|S|=k}\hat{f}_{S}^{2}. \] Instead of the \emph{noise sensitivity} defined in (\ref{eq: noise sensitivity}) it is more common to consider the \emph{stability}, defined as \[ \Stab_{\rho}[f]\dfn\E\left(f(X^{n})f(Y^{n})\right), \] where the noise sensitivity and stability are trivially related via \begin{equation} \Stab_{\rho}[f]=1-2\NS_{\frac{1-\rho}{2}}[f].\label{eq: stability and sensitivity} \end{equation} Thus, the stability of a function is directly related to the error probability of the possibly suboptimal predictor $f(y^{n})$ to the function's true value $f(x^{n})$. The \emph{noise operator} for \emph{$\rho$}-correlated $X^{n}$ and $Y^{n}$ is defined as \[ T_{\rho}f(y^{n})\dfn\E\left(f(X^{n})\mid Y^{n}=y^{n}\right), \] and, evidently, as $\{(X_{i},Y_{i})\}$ is an i.i.d. sequence, \begin{align} T_{\rho}f(y^{n})=\E\left(\sum_{S\in[n]}\hat{f}_{S}\cdot X^{S}\mid Y^{n}=y^{n}\right)=\sum_{S\in[n]}\rho^{|S|}\cdot\hat{f}_{S}\cdot y^{S}.\label{eq: Fourier expansion of noise operator} \end{align} The stability can then be expressed using the Fourier coefficients and the noise operator as \begin{align} \Stab_{\rho}[f] & =\E\left(\E\left(f(X^{n})f(Y^{n})\right)\mid Y^{n}\right)\\ & =\E\left(f(Y^{n})T_{\rho}f(Y^{n})\right)\\ & =\langle f,T_{\rho}f\rangle\\ & =\sum_{S\in[n]}\rho^{|S|}\cdot\hat{f}_{S}^{2}\label{eq: Stability as Fourier}\\ & =\left\Vert T_{\sqrt{\rho}}f\right\Vert _{2}^{2},\label{eq: Stability as squared 2-norm} \end{align} where (\ref{eq: Stability as Fourier}) follows from \emph{Plancharel's identity }$\langle f,g\rangle=\E(f(X^{n})g(X^{n}))=\sum_{S\in[n]}\hat{f}_{S}\hat{g}_{S}$. A Boolean function $f$ is called a \emph{linear threshold function (LTF)} if there exists coefficients $a_{0}^{n}\in\mathbb{R}^{n+1}$ such that \begin{equation} f(x^{n})=\sgn\left(a_{0}+\sum_{i=1}^{n}a_{i}x_{i}\right).\label{eq: LTF} \end{equation} Note that if $a_{0}=0$ then $f$ is \emph{balanced}, i.e., $\Pr(f(X^{n})=1)=1/2$. More generally, a function $f$ is a \emph{polynomial threshold function} (PTF) \cite{bruck1990harmonic} of degree $k$ if there exists $\{\hat{p}_{S}\}$ such that $\max_{S:\hat{p}_{S}\neq0}|S|=k$ and \begin{equation} f(x^{n})=\sgn\left(\sum_{S\subseteq[n]}\hat{p}_{S}\cdot x^{S}\right).\label{eq: PTF} \end{equation} A PTF has \emph{sparsity} $s$ if $\{\hat{p}_{S}\}$ is supported over exactly $s$ terms. For LTF and PTFs, we will always assume that coefficients are chosen such that the polynomial inside the sign operator is never exactly zero. \section{Optimal Prediction and Self Predicting (SP) Functions \label{sec: USP functions}} \subsection{The Optimal Predictor} Let $f:\{-1,1\}^{n}\to\{-1,1\}$ be some Boolean function. It is easy to see that the optimal predictor (minimizing the error probability) of $f(X^{n})$ given that $Y^{n}=y^{n}$ has been observed, is simply \[ \sgn\E\left(f(X^{n})\mid Y^{n}=y^{n}\right)=\sgn T_{\rho}f(y^{n}). \] Note that according to our definition $\sgn(0)=0$, but ties can of course be broken arbitrarily in any other way. The optimal predictor preserves several properties of the function. We define the natural partial order $\preceq$ over $\mathbb{R}^{k}$, where $y^{k}\preceq z^{k}$ if and only if $y_{i}\leq z_{i}$ for all coordinates $i$. We write $\prec$ to denote the case of strict inequality in at least one of the coordinates. Recall that \cite[Definition 2.8.]{Bool_book} a function $f:\{-1,1\}^{n}\to\mathbb{R}$ is called: \begin{itemize} \item \emph{Monotone on} $S\subseteq[n]$, if $f(y^{n})\leq f(z^{n})$ whenever both $y^{S}\preceq z^{S}$ and $y^{[n]\setminus S}=z^{[n]\setminus S}$, and \emph{monotone }if it is monotone on $[n]$. \item \emph{Odd (resp. even) if} $f(x^{n})=-f(-x^{n})$ for all $x^{n}\in\{-1,1\}^{n}$ (resp. $f(x^{n})=f(-x^{n})$). \item \emph{Symmetric }if $f(\pi(x^{n}))=f(x^{n})$ for all $x^{n}\in\{-1,1\}^{n}$ and permutation $\pi\in\mathbb{S}_{n}$ (where $\mathbb{S}_{n}$ is the symmetric group over the set $[n]$) and $\pi(x^{n})=(x_{\pi(1)},\ldots,x_{\pi(n)})$. \end{itemize} \begin{prop} \label{prop: Optimal predictor preserves OSM}For $\rho\in(0,1]$, $\sgn T_{\rho}(\cdot)$ preserves monotonicity on any $S\subseteq[n]$, parity (oddness or evenness) and symmetry. \end{prop} \begin{proof} ~ \begin{itemize} \item \emph{Monotonicity}: This property stems from the fact that the operator $T_{\rho}$ itself preserves monotonicity (for $\rho\in(0,1]$) \cite[Proof of Proposition 4.4]{keller2009probability}, \cite[Claim 2.4. (b)]{kalai2016correlation}. A short proof is given for the sake of completeness. Assume that $f(y^{n})=1$ and let $z^{n}$ satisfy $y^{S}\preceq z^{S}$ and $y^{[n]\setminus S}=z^{[n]\setminus S}$. We prove the statement for a singleton $S$, say $S=\{n\}$. The general case then follows by applying the same argument repeatedly. If $y_{n}=1$ the claim is trivial. Assume $y_{n}=-1$ and let $z^{n}$ agree with $y^{n}$ except on the $n$th coordinate. Due to monotonicity of $f$, we have that $f(z^{n})=1$. Then \begin{align} T_{\rho}f(z^{n}) & =\sum_{x^{n}}p(x^{n}\mid z^{n})f(x^{n})\\ & =\sum_{x^{n-1}}\sum_{x_{n}}p(x^{n-1}\mid y^{n-1})p(x_{n}\mid1)f(x^{n})\\ & =\sum_{x^{n-1}}p(x^{n-1}\mid y^{n-1})\left[\delta f(x^{n-1},-1)+(1-\delta)f(x^{n-1},1)\right]\\ & \geq\sum_{x^{n-1}}p(x^{n-1}\mid y^{n-1})\left[(1-\delta)f(x^{n-1},-1)+\delta f(x^{n-1},1)\right]\label{eq: monotonicity lemma derivation a}\\ & =T_{\rho}f(y^{n}) \end{align} where (\ref{eq: monotonicity lemma derivation a}) holds since $f$ is monotone on the $n$th coordinate (and $\delta\in[0,1/2)$). Hence, $\sgn T_{\rho}f(z^{n})\geq\sgn T_{\rho}f(y^{n})$. \item \emph{Parity}: $f$ is odd if and only if $\hat{f}_{S}=0$ for all $S\in[n]$ such that $|S|$ is even \cite[Exercise 1.8]{Bool_book}. It follows from the Fourier expansion of $T_{\rho}f$ (\ref{eq: Fourier expansion of noise operator}) that if $f$ is odd then so is $T_{\rho}f$, i.e. $T_{\rho}f(x^{n})+T_{\rho}f(-x^{n})=0$ for all $x^{n}\in\{-1,1\}^{n}$. Thus, $\sgn T_{\rho}f$ is also odd (utilizing the convention $\sgn(0)=0$). The proof for even functions is similar. \item \emph{Symmetry}: $f$ is symmetric if and only if $\hat{f}_{S}$ depends on $S$ only via $|S|$. Hence (\ref{eq: Fourier expansion of noise operator}) implies that if $f$ is symmetric then so is $T_{\rho}f$. A composition of scalar function and a symmetric function results in a symmetric function, and thus $\sgn T_{\rho}f$ is symmetric. \end{itemize} \end{proof} We say that a Boolean function $f$ is \emph{$\rho$-self-predicting ($\rho$-SP) at $y^{n}$}, if the optimal predictor given $y^{n}$ at correlation level $\rho$ coincides with the function itself whenever it is not tied, i.e., if \[ f(y^{n})=\sgn T_{\rho}f(y^{n}), \] whenever $T_{\rho}f(y^{n})\neq0$. The function $f$ is called $\rho$-SP if it is $\rho$-SP for any $y^{n}\in\{-1,1\}^{n}$. We say that $f$ is \emph{uniformly self-predicting (USP)} if it is $\rho$-SP for any $\rho\in[0,1]$. We also say that $f$ is \emph{low-correlation self-predicting (LCSP)}, if there exists some $\rho^{*}>0$ such that $f$ is $\rho$-SP for all $\rho\in[0,\rho^{*})$. We note in passing that seemingly plausible properties may not hold in general: \begin{example} \label{exa:balanced function may not have balanced predictor}The optimal predictor of a balanced function may not be balanced. For example, the function \begin{align*} & \frac{1}{4}(2x_{1}+x{}_{3}-2x{}_{1}x{}_{2}+x{}_{1}x{}_{3}+x{}_{2}x{}_{3}-x{}_{3}x{}_{4}\\ & \hphantom{=}+x{}_{1}x{}_{2}x{}_{3}+x{}_{1}x{}_{3}x{}_{4}-x{}_{2}x{}_{3}x{}_{4}+x{}_{1}x{}_{2}x{}_{3}x{}_{4}) \end{align*} is a balanced function, yet $\sgn T_{\rho}f$ is non-balanced when $\rho=1/2$. \end{example} \begin{example} \label{exa: LTF example}In the following sections we explore functions that are SP for high or low correlation. However, self-predictability is not necessarily a monotone property in $\rho$. To wit, if a function is $\rho_{0}$-SP then it might not be $\rho$-SP for some $\rho\geq\rho_{0}$. Indeed, there are functions that admit such an ``irregular'' behavior. For example, the balanced LTF with $n=11$ and coefficients \[ a_{1}^{11}=(13,43,67,67,67,117,153,165,165,179,179) \] can be verified by direct computation to be $\rho$-SP only for $\rho\in[0,0.312]\cup(0.544,1]$. \end{example} \subsection{Elementary USP Functions} The following fact follows easily from the definition. \begin{prop} \label{prop: Characters are USP}All the characters are USP. \end{prop} \begin{proof} Let $f(x^{n})=x^{S}$ for some $S\subseteq[n]$. Then for any $y^{n}$, \begin{align} \sgn T_{\rho}f(y^{n}) & =\sgn\left(\rho^{|S|}\cdot y^{S}\right)\\ & =\sgn\left(y^{S}\right)\\ & =f(y^{n}). \end{align} \end{proof} We next show that Majority (for odd $n$), given by, \[ \maj(x^{n})\dfn\sgn\sum_{i\in[n]}x_{i} \] is USP. Before we proceed, however, we would like to observe the behavior of the function at boundary points, e.g., those for which $\sum_{i\in[n]}x_{i}=1$. At least in the immediate neighborhood of such a point (say, Hamming distance one or two), there are more neighbors who disagree with $y^{n}$ on the value of the function, than those who agree with it. Thus, any proof that such a point is SP cannot rely only on the local values of the function in the vicinity of the that point. Rather, it should take into account the function's value in larger neighborhoods, or even over the entire Hamming cube. \begin{thm} \label{thm: Majority USP}Majority is USP. \end{thm} \begin{proof} Since $\maj$ is monotone, odd and symmetric, then so is $\sgn T_{\rho}\maj$ (Proposition \ref{prop: Optimal predictor preserves OSM}). Hence, for all $x^{n}\in\{-1,1\}^{n}$ \begin{equation} \sgn T_{\rho}\maj(x^{n})+\sgn T_{\rho}\maj(-x^{n})=0.\label{eq: sgn T_rho majority is odd explicit} \end{equation} Consider without loss of generality $x^{n}$ such that $\maj(x^{n})=1$, i.e., if $w$ is the number of $1$'s in $x^{n}$, then $w>n-w$. Then, $\overline{x}=(1^{w},-1^{n-w})$ and $\tilde{x}=(1^{n-w},-1^{w})$ satisfy $\tilde{x}^{n}\preceq\overline{x}^{n}$, and from symmetry, \[ \sgn T_{\rho}\maj(x^{n})=\sgn T_{\rho}\maj(\overline{x}^{n})\geq\sgn T_{\rho}\maj(\tilde{x}^{n})=\sgn T_{\rho}\maj(-x^{n}). \] Hence, (\ref{eq: sgn T_rho majority is odd explicit}) implies that $\sgn T_{\rho}\maj(x^{n})\geq0$, as was required to be proved. \end{proof} \begin{rem} \label{rem: proof of majority is USP via May's theorem}An indirect way of proving Theorem \ref{thm: Majority USP} is via May's theorem \cite[Ex. 2.3]{Bool_book}: Since $\sgn T_{\rho}\maj$ is monotone, odd and symmetric, it must be the majority function itself. \end{rem} Majority (and characters) are not the only USP functions, and not even the only USP LTFs: \begin{example} \label{exa:USP not majority}The balanced LTFs with $n=5$ and coefficients $a_{1}^{5}=(1,1,3,3,5)$, with $n=7$ and coefficients $a_{1}^{7}=(1,1,3,3,3,5,7)$, with $n=9$ and coefficients $a_{1}^{9}=(1,1,3,3,3,5,5,5,7)$, with $n=11$ and coefficients $a_{1}^{11}=(1,1,3,3,3,3,5,5,5,7,7)$ can all be verified by direct computation to be USP. In the next section we generate classes of USP functions by utilizing operations which preserve the SP property. \end{example} \subsection{SP/USP Preserving Operators} Let us now discuss several operations that preserve self-predictability. First, we note that self-predictability is invariant to negation of inputs. We write $\circ$ for the Hadamard product. \begin{prop} \label{prop:Input flip preserves SP}Let $a^{n}\in\{-1,1\}^{n}$. Then, $f(x^{n})$ is $\rho$-SP if and only if $f(a^{n}\circ x^{n})$ is $\rho$-SP. \end{prop} The straightforward proof is omitted. Next, we consider the case of separable functions. \begin{prop} \label{prop:seperable functions}Let $f(x^{n})=g(x_{1}^{k})\cdot h(x_{k+1}^{n})$. Then $f$ is $\rho$-SP if and only if both $g$ and $h$ are $\rho$-SP. \end{prop} \begin{proof} If $g$ and $h$ are both $\rho$-SP then for any $y^{n}$, \begin{align} \sgn T_{\rho}f(y^{n}) & =\sgn T_{\rho}\left(g(y^{k})\cdot h(y_{k+1}^{n})\right)\\ & =\sgn\left(T_{\rho}g(y^{k})\cdot T_{\rho}h(y_{k+1}^{n})\right)\\ & =g(y_{1}^{k})\cdot h(y_{k+1}^{n})\\ & =f(y^{n}). \end{align} Conversely, suppose that $f$ is $\rho$-SP. Note that Lemma \ref{lem: Any function is SP for some output} implies in particular that there must exist at least one point $y_{k+1}^{n}$ at which $h$ is $\rho$-SP. Without loss of generality, assume that $h(y_{k+1}^{n})=1$. Then for any $y^{k}$ \begin{align} \sgn T_{\rho}g(y^{k}) & =\sgn T_{\rho}g(y^{k})\cdot\sgn T_{\rho}h(y_{k+1}^{n})\\ & =\sgn\left(T_{\rho}g(y^{k})\cdot T_{\rho}h(y_{k+1}^{n})\right)\\ & =\sgn T_{\rho}f(y^{n})\\ & =f(y^{n})\\ & =g(y^{k})\cdot h(y_{k+1}^{n})\\ & =g(y^{k}). \end{align} Hence $g$, and symmetrically, also $h$, are $\rho$-SP. \end{proof} Note that Proposition \ref{prop: Characters are USP} also follows as a simple corollary to Proposition \ref{prop:seperable functions}. Next, we consider functions of equal-size disjoint characters.\textbf{ } \begin{prop} \label{prop:majority of independent characters}Let $\{S_{\ell}\subseteq[n]\}_{\ell\in[m]}$ be disjoint subsets of equal size $|S_{\ell}|=w$. Let $f:\{-1,1\}^{m}\to\{-1,1\}$ be $\rho^{w}$-SP. Then $f(x^{S_{0}},x^{S_{1}},\ldots,x^{S_{m-1}})$ is $\rho$-SP. \end{prop} \begin{proof} It is easy to check that the Fourier coefficients of $h(x^{n})=f(x^{S_{1}},x^{S_{2}},\ldots,x^{S_{m}})$ are given by \[ \hat{h}_{S}=\begin{cases} \hat{f}_{T}, & S=\cup_{t\in T}S_{t}\\ 0, & \text{otherwise} \end{cases}. \] Hence, \begin{align} \sgn T_{\rho}h(y^{n}) & =\sgn\sum_{S\subseteq[n]}\rho^{|S|}\hat{h}_{S}y^{S}\\ & =\sgn\sum_{T\subseteq[m]}\rho^{w|T|}\cdot\hat{h}_{\cup_{t\in T}S_{t}}\cdot y^{\cup_{t\in T}S_{t}}\\ & =\sgn\sum_{T\subseteq[m]}\rho^{w|T|}\hat{f}_{T}y^{T}\\ & =\sgn T_{\rho^{w}}f(y^{S_{0}},y^{S_{1}},\ldots,y^{S_{m-1}})\\ & =f(y^{S_{0}},y^{S_{1}},\ldots,y^{S_{m-1}})\\ & =h(y^{n}). \end{align} \end{proof} \begin{example} \label{exa:Majority characters and operations}Using the fact that characters and Majority are USP functions, together with Propositions \ref{prop:Input flip preserves SP}, \ref{prop:seperable functions} and \ref{prop:majority of independent characters}, we can construct many distinct USP functions. For example, the function \[ \sgn\left((x_{1}x_{2}+x_{3}x_{4}+x_{5}x_{6})\cdot(x_{7}x_{8}x_{9}-x_{10}x_{11}x_{12}-x_{13}x_{14}x_{15})\cdot x_{16}\right) \] is USP. \end{example} Nonetheless, there are USP functions that cannot be constructed from characters and Majority this way. For example, none of these functions can be an LTF, as the USP functions in Example \ref{exa:USP not majority}. \subsection{Closeness to SP and Strong Stability} How far can a function be from self predicting? We say that a function is \emph{$\varepsilon$-close to $\rho$-SP}, to mean that $f$ and its optimal predictor $\sgn T_{\rho}f$ are $\varepsilon$-close. \begin{lem} \label{lem: Any function is SP for some output}Any function $f$ is $\sum_{S\subseteq[n]}(1-\rho^{|S|})\hat{f}_{S}^{2}$-close to $\rho$-SP. \end{lem} \begin{proof} Let $A\subseteq\{-1,1\}^{n}$ be the set of all $y^{n}$ at which $f$ is $\rho$-SP. Hence for any $y^{n}\not\in A$ it must be that $f(y^{n})\cdot T_{\rho}f(y^{n})<0$. Noting that $|T_{\rho}f(y^{n})|\leq1$, we have that \[ \E\left(f(Y^{n})\cdot T_{\rho}f(Y^{n})\right)\leq\P\left(Y^{n}\in A\right). \] On the other hand, it also holds that \[ \E\left(f(Y^{n})\cdot T_{\rho}f(Y^{n})\right)=\sum_{S\subseteq[n]}\rho^{|S|}\hat{f}_{S}^{2}. \] The proof now follows by recalling that $\sum_{S\in[n]}\hat{f}_{S}^{2}=1$. \end{proof} For any $n$, functions that depend on all $n$ variables can be found (even balanced ones), whose distance from their optimal predictor is larger than some universal constant. The problem with this measure of closeness to SP is that in many cases the optimal predictor might be different from the functions on inputs that are very noisy, i.e., where the posterior probability of the function value is close to uniform. Thus, a more practically motivated way of quantifying closeness to SP is by considering noise sensitivity and stability. Define the \emph{strong noise sensitivity} of a function $f$ to be \begin{equation} \NS_{\delta}^{*}[f]\dfn\Pr\left(f(X^{n})\neq\sgn T_{\rho}f(Y^{n})\right), \end{equation} and the associated \emph{strong stability} as \begin{equation} \Stab_{\rho}^{*}[f]\dfn\E\left(f(X^{n})\cdot\sgn T_{\rho}f(Y^{n})\right).\label{eq: strong stability} \end{equation} Of course, just as for the regular noise sensitivity and stability, we have the trivial connection \begin{equation} \Stab_{\rho}^{*}[f]=1-2\NS_{\frac{1-\rho}{2}}^{*}[f],\label{eq: strong stability and strong sensitivity} \end{equation} and we can express the strong stability in terms of the noise operator: \begin{align} \Stab_{\rho}^{*}[f] & =\E\left(\E\left(f(X^{n})\cdot\sgn T_{\rho}f(Y^{n})\mid Y^{n}\right)\right)\\ & =\E\left(T_{\rho}f(Y^{n})\cdot\sgn T_{\rho}f(Y^{n})\right)\\ & =\E\left|T_{\rho}f(Y^{n})\right|\\ & =\left\Vert T_{\rho}f\right\Vert _{1}.\label{eq: Stab_star as 1-norm} \end{align} Thus the $1$-norm of $T_{\rho}f$ can be interpreted in terms of the error probability associated with the optimal predictor for $f$. Since the optimal predictor $\sgn T_{\rho}f$ can only do better than $f$ itself, we immediately have: \begin{prop} \label{prop: SP charctarization using stability and noise operator}For any function $f$ and any $\rho\in[0,1]$ \begin{equation} \left\Vert T_{\sqrt{\rho}}f\right\Vert _{2}^{2}\leq\left\Vert T_{\rho}f\right\Vert _{1},\label{eq: relation between stab and stab_star} \end{equation} with equality if and only if $f$ is $\rho$-SP. \end{prop} The strong stability can also be upper bounded by a regular stability expression. \begin{prop} $\Stab_{\rho}[f]\leq\Stab_{\rho}^{*}[f]\leq\sqrt{\Stab_{\rho^{2}}[f]}$. \end{prop} \begin{proof} Write \begin{align} \Stab_{\rho}^{*}[f] & =\left\langle T_{\rho}f,\sgn T_{\rho}f\right\rangle \\ & \leq\left\Vert T_{\rho}f\right\Vert _{2}\cdot\left\Vert \sgn T_{\rho}f\right\Vert _{2}\label{eq: strong stability bounds a}\\ & =\sqrt{\langle T_{\rho}f,T_{\rho}f\rangle}\\ & =\sqrt{\langle T_{\rho^{2}}f,f\rangle}\label{eq: strong stability bounds b}\\ & =\sqrt{\Stab_{\rho^{2}}[f]}. \end{align} where (\ref{eq: strong stability bounds a}) is by the Cauchy-Schwartz inequality, and (\ref{eq: strong stability bounds b}) is since $T_{\rho}f$ is a self-adjoint operator. \end{proof} An immediate consequence of the above is: \begin{cor} The strong noise sensitivity satisfies: \begin{equation} \frac{1-\sqrt{\Stab_{\rho^{2}}[f]}}{1-\Stab_{\rho}[f]}\cdot\NS_{\delta}[f]\leq\NS_{\delta}^{*}[f]\leq\NS_{\delta}[f].\label{eq: prediction gain definition} \end{equation} \end{cor} Note that this bound is tight for the characters (and again shows that they are USP). We can easily derive the following weaker statements: \begin{cor} For any $f$ \begin{equation} \frac{\NS_{\delta}[f]}{2}\leq\NS_{\delta}^{*}[f]\leq\NS_{\delta}[f].\label{eq: simple bounds on NS - half} \end{equation} If $f$ is balanced, then \begin{equation} \frac{\NS_{\delta}[f]}{1+\rho}\leq\NS_{\delta}^{*}[f]\leq\NS_{\delta}[f].\label{eq: simple bound on NS - 1 plus rho^2} \end{equation} \end{cor} We may obtain improved bounds for low correlation values: \begin{prop} \label{prop:Prediction gain bounds for low correlation} Suppose $W^{1}[f]>0$. Then: \[ \max\left\{ 1,\frac{1}{\sqrt{2W^{1}[f]}}+O(\rho^{2})\right\} \leq\frac{\Stab_{\rho}^{*}[f]}{\Stab_{\rho}[f]}\leq\frac{1}{\sqrt{W^{1}[f]}}+O(\rho^{2}). \] \end{prop} \begin{proof} We have that \begin{align} \Stab_{\rho}^{*}[f] & =\E\left|T_{\rho}f(Y^{n})\right|\\ & =\E\left|\sum_{i=1}^{n}\rho\hat{f}_{i}Y_{i}\right|+O(\rho^{2}). \end{align} Khintchine's inequality \cite{haagerup1981best} then implies \[ \frac{1}{\sqrt{2}}\cdot\sqrt{W^{1}[f]}\cdot\rho+O(\rho^{2})\leq\Stab_{\rho}^{*}[f]\leq\sqrt{W^{1}[f]}\cdot\rho+O(\rho^{2}), \] and the result follows from \cite[Proposition 2.51]{Bool_book} \begin{equation} \Stab_{\rho}[f]=W^{1}[f]\cdot\rho+O(\rho^{2}).\label{eq: stability at low correlation} \end{equation} \end{proof} \begin{cor} For any balanced LTF $W^{1}[f]\geq1/2$ \cite[Theorem 5.2]{Bool_book}, and so \[ \frac{\Stab_{\rho}^{*}[f]}{\Stab_{\rho}[f]}\leq\sqrt{2}+O(\rho^{2}). \] \end{cor} \section{High Correlation Sufficient Conditions\label{sec:high-corr}} In this section, we derive sufficient conditions on a function to be SP using various arguments. All our conditions will be high correlation ones, i.e., for $\rho_{0}$ larger than some threshold. To this end, we will need a simple characterization of monotone SP functions. Recall that $x^{n}$ is called a \textit{boundary point} of $f$ if the value of $f(x^{n})$ can be flipped by filliping some single coordinate of $x^{n}$. We further say that $x^{n}$ is a \textit{dominating boundary point} of $f$ if $f(x^{n})=1$ (resp. $=-1$) and $f(y^{n})=-1$ (resp. $=1$) for any $y^{n}\prec x^{n}$ (resp. $x^{n}\prec y^{n}$). The following is a simple corollary to the fact that monotonicity is preserved by $\sgn T_{\rho}$ (Proposition \ref{prop: Optimal predictor preserves OSM}). \begin{prop} \label{prop:dominating_boundary} A monotone function is $\rho$-SP if and only if it is $\rho$-SP at all its dominating boundary points. \end{prop} We now may prove that: \begin{prop} \label{thm: Sufficient - no flips}Any function is $\rho$-SP for $\rho>2^{\nicefrac{(n-1)}{n}}-1$, and there is no better universal guarantee. \end{prop} \begin{proof} This range corresponds to the values of the crossover probability $\delta\in[0,1-2^{-\nicefrac{1}{n}})$ for which the probability no bit was flipped $(1-\delta)^{n}$, is at least $1/2$. This bound is achieved with equality by the OR function $\OR(x^{n})$. To see this, note that the OR function is monotone and symmetric with two types of dominating boundary points. The first is the all-ones sequence $1^{n}$. In this case \[ T_{\rho}\OR(1^{n})=(1-\delta)^{n}\cdot1+\left[1-(1-\delta)^{n}\right]\cdot(-1). \] which is non-negative if and only if $\delta\in[0,1-2^{-\nicefrac{1}{n}}]$. The second type is $y^{n}=(1^{n-1},-1)$ (or any permutation thereof), in which case \begin{align} T_{\rho}\OR(y^{n}) & \leq\delta(1-\delta)^{n-1}\delta\cdot1+(1-\delta(1-\delta)^{n-1})\cdot(-1)\\ & \leq\frac{1}{2}(1-\delta)^{n-2}-1\\ & <0 \end{align} for any $\delta\in[0,1/2)$. \end{proof} Specific properties of the function, may be used to obtain better sufficient bounds in special cases. For example, suppose that the \emph{sparsity} of $\hat{f}_{S}$ is $s$, i.e., \[ f(x^{n})=\sum_{S\in\mathcal{S}}\hat{f}_{S}\cdot x^{S} \] where $\mathcal{S}\subset2^{[n]}$ and $|\mathcal{S}|=s$. Then, an application of the union bounds leads to \begin{align*} \P\left[f(X^{n})=f(y^{n})\mid Y^{n}=y^{n}\right] & \geq\P\left[\bigcap_{S\in\mathcal{S}}X^{S}=y^{S}\mid Y^{n}=y^{n}\right]\\ & \geq1-\sum_{S\in\mathcal{S}}\P\left[X^{S}=y^{S}\mid Y^{n}=y^{n}\right]\\ & =1-\sum_{S\in\mathcal{S}}\frac{1-\rho^{|S|}}{2}. \end{align*} This probability will be larger than $1/2$ for all $y^{n}\in\{-1,1\}^{n}$ if $\rho$ is larger than the solution to \[ \sum_{S\in\mathcal{S}}\rho^{|S|}=s-1. \] Similar conditions can be derived for PTFs of sparsity $s$ (\ref{eq: PTF}). The extermal property of the OR function noted above may ostensibly be attributed to the fact that it is extremely unbalanced. However, $x_{1}\cdot\OR(x_{2}^{n})$ is balanced, and Propositions \ref{prop:seperable functions} and \ref{thm: Sufficient - no flips} imply that it is $\rho$-SP for $\rho>2^{\nicefrac{(n-2)}{(n-1)}}-1=1-\frac{2\ln(2)}{n}n+O(n^{-2})$. The next proposition demonstrates that the statement in Proposition \ref{thm: Sufficient - no flips} holds even if we restrict ourselves to balanced LTFs. \begin{prop} \label{prop: balanced but very not SP}Any balanced LTF $f$ is $\rho$-SP for $\rho>1-\frac{2\ln(2)}{n}+O(n^{-2})$, and there is no better universal guarantee. \end{prop} \begin{proof} Note that the above region is essentially the same as the one in Proposition \ref{thm: Sufficient - no flips}, hence one direction is clear. We need to show there exists a balanced function that is not $\rho$-SP at any point outside this region. To that end, let us introduce the \emph{enlightened dictator} (E-DIC) function, defined for $n\geq3$ to be \begin{equation} \edic(x^{n})\dfn\sgn\left((n-2)x_{1}+\sum_{i=2}^{n}x_{i}\right).\label{eq: E-dict def} \end{equation} Evidently, $\edic(x^{n})$ is determined by the ``dictator'' $x_{1}$, unless all the ''subjects'' $x_{2},\ldots,x_{n}$ disagree. It is easy to verify that $\edic(x^{n})$ is a monotone, odd (and hence balanced) function. By Proposition \ref{prop:dominating_boundary}, we need only check its dominating boundary points to establish self-predictability. Due to oddness, it suffices to check the dominating boundary points for which $\edic(y^{n})=1$. There are two types of such points. The first is $y^{n}=(-1,1^{n-1})$. The function is SP at this $y^{n}$ if and only if \begin{align} \P(\edic(X^{n})=1\mid Y^{n}=y^{n}) & =(1-\delta)^{n}+\delta(1-\delta^{n-1})\geq1/2.\label{eq:edict_type1} \end{align} The second derivative of the left-hand side (l.h.s.) above is $n(n-1)((1-\delta)^{n-1}-\delta^{n-2})$, which is non-negative for $\delta\in[0,1/2]$, hence the l.h.s. is convex inside this interval. It is easy to check that equality in (\ref{eq:edict_type1}) holds for $\delta=\ln(2)\cdot n^{-1}-O(n^{-2})$ and for $\delta=1/2$, hence by convexity $y^{n}$ is $\delta$-SP if and only if $\delta<\ln(2)\cdot n^{-1}-O(n^{-2})$, or equivalently, $\rho>1-2\ln(2)\cdot n^{-1}+O(n^{-2})$. The second type of dominating boundary points is of the form $y^{n}=(1,1,-1^{n-2})$ (or any other permutation of the subjects). For this $y^{n}$ we have \begin{align} \P(\edic(X^{n})=1\mid Y^{n}=y^{n}) & =\delta^{n-1}(1-\delta)+(1-\delta)(1-\delta(1-\delta)^{n-2})\\ & =(1-\delta)\cdot\left[1-\delta((1-\delta)^{n-2}-\delta^{n-2})\right]\\ & \geq(1-\delta)\cdot\left[1-\delta(1-2\delta)\right],\label{eq:edict_type2} \end{align} where the inequality follows since $(1-\delta)^{n-2}-\delta^{n-2}\leq1-2\delta$ for $\delta\in[0,1/2]$ and any $n\geq1$. It is easy to check that (\ref{eq:edict_type2}) is strictly decreasing in $\delta\in[0,1/2]$ and equals $1/2$ for $\delta=1/2$. This implies that the function is USP at this $y^{n}$. Hence we conclude that $\edic$ is $\rho$-SP if and only if $\rho>1-2\ln(2)\cdot n^{-1}+O(n^{-2})$, concluding the proof. \end{proof} \subsection{Bounded Degree and Spectral Norm} Next, we provide an stronger statement that uses the \emph{degree} $\Deg(f)$ of the function $f$, i.e., the maximal character degree appearing in the Fourier representation of $f$. \begin{thm} \label{thm: Sufficient - Berenstein}Any function $f$ is $\rho$-SP for \[ \rho\geq1-\frac{1}{\Deg(f)\cdot\min\left\{ \Deg(f),\sum_{S\in[n]}\left|\hat{f}_{S}\right|\right\} }. \] \end{thm} \begin{proof} Fix any $y^{n}$ and think of $T_{\rho}f(y^{n})$ as a polynomial in $\rho$. Let $\rho_{0}$ be the largest root of this polynomial in $[0,1]$ (if there is one, otherwise $\rho_{0}=0$). Since $T_{\rho}f(y^{n})$ equals $f(y^{n})\in\{1,-1\}$ for $\rho=1$, then by continuity $f$ is $\rho$-SP at $y^{n}$ for any $\rho\geq\rho_{0}$. Clearly, \begin{equation} \rho_{0}\leq1-\frac{1}{\max_{\rho\in[0,1]}\left|\frac{\d}{\d\rho}T_{\rho}f(y^{n})\right|},\label{eq: bound on largest root} \end{equation} and so a bound on $\rho_{0}$ may be obtained by bounding the derivative. To that end, recall that Markov brothers' inequality \cite[Theorem 1.1]{govil1999markov} states that for any real polynomial $P(t)$ of degree $k$ \[ \max_{\rho\in[-1,1]}\left|\frac{\d}{\d t}P(t)\right|\leq k^{2}\cdot\max_{\rho\in[-1,1]}\left|\frac{\d}{\d t}P(t)\right|, \] and that Bernstein's inequality \cite[Theorem 1.2]{govil1999markov} states that for any complex polynomial $Q(z)$ of degree $k$, \[ \max_{|z|\leq1}\left|\frac{\d Q(z)}{\d z}\right|\leq k\cdot\max_{|z|\leq1}\left|Q(z)\right|. \] The claim then follows from (\ref{eq: bound on largest root}) by noting that the degree (in $\rho$) of $T_{\rho}f$ equals the (Fourier) degree of $\Deg(f)$ of $f$, and the bound \begin{align*} |T_{\rho}f(y^{n})| & =\left|\sum_{S\in[n]}\rho^{|S|}\cdot\hat{f}_{S}\cdot x^{S}\right|\\ & \leq\sum_{S\in[n]}|\hat{f}_{S}| \end{align*} for any $\rho\in(0,1]$. \end{proof} Theorem \ref{thm: Sufficient - Berenstein} significantly improves on Theorem \ref{thm: Sufficient - no flips} whenever $\Deg(f)\ll\sqrt{n}$, e.g., for $n$-dimensional functions $f$ that can be computed by a decision tree of depth $k$, in which case $\Deg(f)\leq k$ \cite[Proposition 3.16]{Bool_book}. Functions with low \emph{spectral norm $\sum_{S\in[n]}|\hat{f}_{S}|$ }are discussed in \cite{shpilka2017structure} and references therein. \subsection{Friendly Neighbors} Given a function $f$, we say that a point $x^{n}$ has a \emph{radius-$d$ friendly neighborhood} w.r.t. $f$ if there exists some $y^{n}$ of distance at most $d$ that agrees with $x^{n}$, namely, where $\Hamd(x^{n},y^{n})\leq d$ and $f(x^{n})=f(y^{n})$. \begin{prop} \label{prop: distance 2 neighbour}Suppose $f$ is $\rho$-SP for all $\rho>1-\varepsilon$, and $n>\max\{2\varepsilon^{-1},\gamma\}$ where $\gamma$ is a universal constant. Then each point in $\{-1,1\}^{n}$ has a radius-$2$ friendly neighborhood w.r.t. $f$. \end{prop} \begin{proof} Suppose toward contradiction that all the neighbors at Hamming distance $1$ and $2$ from some $y^{n}$ disagree with it. This implies that \begin{align} \P\left(f(X^{n})\neq f(Y^{n})\mid Y^{n}=y^{n}\right) & \geq\binom{n}{1}\delta(1-\delta)^{n-1}+\binom{n}{2}\delta^{2}(1-\delta)^{n-2}\\ & =(1-\delta)^{n-2}n\delta\left((1-\delta)+\frac{(n-1)}{2}\delta\right).\label{eq: neighbor distance 2 derivation first bound} \end{align} Choosing $\delta=\frac{\alpha}{n}$, and assuming that $n>\frac{2\alpha}{\varepsilon}$ so that we are in the SP region, yields \begin{align} \P\left(f(X^{n})\neq f(Y^{n})|Y^{n}=y^{n}\right) & \geq\left(1-\frac{\alpha}{n}\right)^{n-2}\alpha\left(1+\frac{\alpha}{2}-\frac{3\alpha}{2n}\right)\\ & \geq\left(1-\frac{\alpha}{n}\right)^{n-2}\cdot\left(\alpha+\frac{\alpha^{2}}{2}\right)-O\left(\frac{1}{n}\right)\\ & =e^{-\alpha}\cdot\left(\alpha+\frac{\alpha^{2}}{2}\right)-O\left(\frac{1}{n}\right). \end{align} One can check that, e.g., for $\alpha=1$, $(\alpha+\frac{\alpha^{2}}{2})e^{-\alpha}>1/2$, and so $f$ cannot be SP if $n$ is larger than some universal constant, in contradiction. \end{proof} Hence, for a function to be SP even slightly below the guaranteed high correlation threshold of $\rho>1-\frac{2\ln(2)}{n}+O(n^{-2})$, every point must admit a radius-$2$ friendly neighborhood. The OR function, e.g., does not satisfy this property. Furthermore, this result is tight: for the largest character $x^{[n]}=\prod_{i=1}^{n}x_{i}$, which is USP, the distance-$1$ neighbors of each point do not agree with it. The following corollary, which is not directly related to self-predictability, is obtained by combining Theorem \ref{thm: Sufficient - Berenstein} and Proposition \ref{prop: distance 2 neighbour}. \begin{cor} If $\Deg f<\sqrt{n/2}$ and $n$ is larger than a universal constant, then each point in $\{-1,1\}^{n}$ has a radius-$2$ friendly neighborhood w.r.t. $f$. \end{cor} \section{Low Correlation Self Predicting (LCSP) Functions\label{sec:low-corr}} In this section we discuss LCSP functions, i.e., functions that are $\rho$-SP for any $\rho<\rho^{*}$ for some $\rho^{*}>0$. Note that any USP function is trivially also LCSP, hence all our LCSP necessary conditions will apply to USP functions verbatim. \subsection{LCSP and Spectral Threshold Functions} Let the \emph{minimal level} of a function $f$ be defined as \[ \Lev(f)\dfn\min\left\{ k\in[n]:W^{k}[f]>0\right\} , \] and let \[ f_{\Lev}(x^{n})\dfn\sum_{S:|S|=\Lev(f)}\hat{f}_{S}x^{S}. \] We say that $f$ is \emph{weakly spectral threshold (WST)} if $f_{\Lev}(x^{n})\cdot f(x^{n})\geq0$ for all $x^{n}$, i.e., the sign of both functions agree whenever $f_{\Lev}\neq0$. We say that $f$ is \emph{strongly spectral threshold (SST)} if it is WST and $f_{\Lev}$ is never zero. For an LTF $f=\sgn(a_{0}+\sum_{i=1}^{n}a_{i}x_{i})$, the Fourier coefficients $(\hat{f}_{\phi},\hat{f_{1}},\ldots,\hat{f}_{n})$ are called as the \emph{Chow parameters}, and, as is well-known \cite{chow1961characterization,tannenbaum1961establishment}, these parameters unambiguously determine the LTF (equivalently, the coefficients $a_{0}^{n}$). The \emph{Chow-parameters problem} \cite{o2011chow} is to find the coefficients defining the LTF given the Chow parameters. It can be seen that in case of balanced LTFs, SST functions are exactly the LTFs for which a solution to the Chow-parameters problem is exactly the chow parameters themselves. \begin{prop} \label{prop: USP implies WST} SST implies LCSP. Conversely, LCSP implies WST. \end{prop} \begin{proof} The optimal predictor for $f$ satisfies \begin{align} \sgn T_{\rho}f(x^{n}) & =\sgn\left(\rho^{\Lev(f)}\cdot\sum_{s:|S|\geq\Lev(f)}\rho^{|S|-\Lev(f)}\hat{f}_{S}x^{S}\right)\\ & =\sgn\left(f_{\Lev}(x^{n})+O(\rho)\right). \end{align} Thus, $\sgn T_{\rho}f(x^{n})=\sgn f_{\Lev}(x^{n})$ for any $\rho$ small enough whenever $f_{\Lev}(x^{n})\neq0$. If $f$ is SST $f_{\Lev}(x^{n})$ never vanishes, and hence $f(x^{n})=\sgn f_{\Lev}(x^{n})=\sgn T_{\rho}f(x^{n})$, implying LCSP. Conversely, if $f$ is LCSP, then $f(x^{n})=\sgn T_{\rho}f(x^{n})=\sgn f_{\Lev}(x^{n})$ unless $f_{\Lev}$ vanishes, implying WST. \end{proof} An immediate consequence of Proposition \ref{prop: USP implies WST} is: \begin{cor} \label{cor: unblanaced functions are SP only constants} An LCSP function is either balanced or constant. \end{cor} \begin{proof} Suppose $f$ is LCSP and unbalanced. Then $\Lev[f]=0$ and $\hat{f}_{\phi}\neq0$, and by Proposition \ref{prop: USP implies WST} it must be WST. Hence $f=\sgn\hat{f}_{\phi}\in\{-1,1\}$ must be constant. \end{proof} It is interesting to note that in light of Proposition \ref{prop: USP implies WST}, Proposition \ref{prop:Prediction gain bounds for low correlation} immediately implies the following dichotomy: \begin{cor} Let $f$ be an LCSP function. Then either $W^{1}[f]=0$ or $W^{1}[f]\geq1/2$. \end{cor} This result is very similar to the claim that $W^{1}[f]\geq1/2$ for LTFs \cite[Theorem 5.2]{Bool_book}. Note however that the above claim holds for LCSP functions that are not LTFs but do have energy on the first level. Next, recall that Proposition \ref{prop: SP charctarization using stability and noise operator} states that a function is $\rho$-SP if and only if $\Vert T_{\rho}f\Vert_{1}=\Stab_{\rho}^{*}[f]=\Stab_{\rho}[f]=\Vert T_{\sqrt{\rho}}f\Vert_{2}^{2}$. A similar property holds for $f_{\Lev}$ if the function is LCSP. \begin{cor} If $f$ is LCSP then $\Vert f_{\Lev}\Vert_{1}=\Vert f_{\Lev}\Vert_{2}^{2}$. \end{cor} \begin{proof} $f$ must be WST by Proposition \ref{prop: USP implies WST}, and so Plancharel's identity implies that \begin{align} \E\left|f_{\Lev}(X^{n})\right| & =\E\left(f_{\Lev}(X^{n})\cdot f(X^{n})\right)\\ & =\langle f_{\Lev},f\rangle\\ & =\sum_{S:|S|=\Lev[f]}\hat{f}_{S}^{2}\\ & =\E\left(f_{\Lev}^{2}(X^{n})\right). \end{align} \end{proof} The following two examples show that the distinction between WST and SST in the theorem is necessary. \begin{example}[LCSP does not imply SST] Consider the balanced LTF with $n=4$ and coefficients $a_{1}^{4}=(2,1,1,1)$. This is a Majority function with a tie breaking input. It can be verified by direct computation that this function is USP, hence also LCSP. However, its level-$1$ Fourier coefficients are $(\frac{3}{4},\frac{1}{4},\frac{1}{4},\frac{1}{4})$. Hence, while it is clearly WST, it is not SST as there are $2$ inputs for which $f_{\Lev}(x^{n})=0$. \end{example} \begin{example}[WST does not imply LCSP] The balanced LTF with $n=9$ and coefficients $a_{1}^{9}=(1,5,16,19,25,58,68,91,94)$ can be verified to be WST, but not LCSP. It is $\rho$-SP only for $\rho>0.577$. \end{example} The following example shows that the SST property is limited to the low-correlation regime only. \begin{example}[SST does not imply USP] The LTF of Example \ref{exa: LTF example} is SST, but as was shown there, is not USP. Thus, while an SST is always LCSP, it is not necessarily USP. \end{example} We note in passing that there are SST and WST functions outside Majority that are USP. \begin{example} The LTF in Example \ref{exa:USP not majority} is SST and USP, while the balanced LTF with $n=9$ and coefficients $a_{1}^{9}=(1,1,1,3,3,3,5,5,7)$ is WST and USP ($f_{\Lev}=0$ for $30$ inputs), but not SST. \end{example} Next, using Proposition \ref{prop: USP implies WST}, we can show that the largest coefficients of an LCSP LTF cannot be too distinct. \begin{prop} \label{prop:first to second ration for LTF}Let $f$ be an LTF that depends on all its $n$ variables. Let $a$ and $b$ be its first and second largest coefficients in absolute values, respectively, in some representation of $f$. If $f$ is LCSP then $\left|\frac{a}{b}\right|<\sqrt{2n\ln(2n)}+1$. \end{prop} \begin{proof} Assume without loss of generality that $a_{1}\geq a_{2}\geq\cdots\geq a_{n}>0$. Recall also that by Corollary \ref{cor: unblanaced functions are SP only constants} we know that $a_{0}=0$. Since $f$ is monotone, its level-$1$ Fourier coefficients equal influences \cite[Proposition 2.21]{Bool_book}, i.e., \begin{align} \hat{f}_{k} & =\Inf_{k}[f]\label{eq: Fourier is influence for monotone}\\ & \dfn\P\left(f(X^{n})\neq f(X_{1}^{k-1},-X_{k},X_{k+1}^{n})\right)\\ & =\P\left(\left|\sum_{i\neq k}a_{i}X_{i}\right|\leq a_{k}\right).\label{eq: Fourier level 1 with probability} \end{align} Assume without loss of generality that $a_{2}=1$, and write $a\dfn a_{1}$. For brevity, also write $Z\dfn\sum_{i=3}^{n}a_{i}X_{i}$ and $X\dfn X_{1}$. Then, from the symmetry of $Z$, \begin{align} \hat{f}_{1} & =\P(|X+Z|\leq a)\\ & =\P(|1+Z|\leq a)\\ & \geq\P(|Z|<a-1), \end{align} and \begin{align} \hat{f}_{2} & =\P(|aX+Z|\leq1)\\ & \leq\P(a-1\leq|Z|\leq a+1)\\ & \leq\P(|Z|\geq a-1). \end{align} Hence, \[ \frac{\hat{f}_{1}}{\hat{f}_{2}}\geq\frac{1-\P(|Z|\geq a-1)}{\P(|Z|\geq a-1)}. \] Since $|a_{i}|\leq1$ for $3\leq i\leq n$, and assuming toward contradiction that $a>\sqrt{(2n-2)\ln2n}+1$, Hoeffding's inequality implies that \[ \P(|Z|\geq a-1)<1/n, \] and so $\hat{f}_{1}/\hat{f}_{2}>n-1$. Noting that $a_{i}\geq a_{j}$ implies $\hat{f}_{i}\geq\hat{f}_{j}$, we also have that $\hat{f}_{1}/\hat{f}_{i}\geq n-1+\varepsilon$ for any $i>1$, for $\varepsilon>0$ small enough. Since $f$ is WST, i.e., $f(x^{n})=\sgn\sum_{i=1}^{n}\hat{f}_{i}x_{i}$ whenever the right-hand side (r.h.s.) is nonzero, but for these ratios of coefficients clearly it must be that $f(x^{n})=x_{1}$, in contradiction to the assumption that it depends on all the variables. \end{proof} For example, the enlightened dictator function $\edic(\cdot)$ (\ref{eq: E-dict def}) has first-to-second coefficient ratio of $n-2$, and thus cannot be LCSP. It should be noted however, that $\edic(\cdot)$ can also be written as an LTF with coefficients $\edic(\cdot)=(\sqrt{n},1,c,c,\ldots,c)$ where $c=\frac{\sqrt{n}-1+\varepsilon}{n-2}$ for some $\varepsilon>0$. When given in this form, Proposition \ref{prop:first to second ration for LTF} is incapable of ruling it out from being SP. Nonetheless, it is easy to verify that LTFs of coefficients $(c,1,1,...,1)$ for $c<n-2$ and $c=\Omega(n)$, must have $a_{2}=a_{3}\cdots=a_{n}$ in any valid representation, and thus the first-to-second-coefficient ratio is always $\Omega(n)$. \subsection{LTF Approximation} The WST condition can be leveraged to show that a LCSP function can typically be well approximated by an LTF. Specifically: \begin{thm} \label{thm:LCSP_LTF_approx} An LCSP $f$ is $\sqrt{\frac{2}{\pi n_{f}}}$-close to an LTF, where $n_{f}\dfn|\{i\in[n]:\hat{f}_{i}\neq0\}|$. \end{thm} \begin{cor} A monotone LCSP function that depends on all its coordinates is $\sqrt{\frac{2}{\pi n}}$-close to an LTF. \end{cor} To prove Theorem \ref{thm:LCSP_LTF_approx} we first establish the following technical lemma. We state it in a slightly more general form than we actually need. \begin{lem} \label{lem:sperner} Let $a^{n}\in\mathbb{R}^{n}$ be a vector of nonzero coefficients. Then for any $b\in\mathbb{R}$ \[ \P\left(\left|\sum_{i=1}^{n}a_{i}X_{i}-b\right|<\min_{k\in[n]}|a_{k}|\right)\leq2^{-n}\binom{n}{\lfloor\nicefrac{n}{2}\rfloor}\leq\sqrt{\frac{2}{\pi n}}. \] \end{lem} \begin{proof} Write $a=\min|a_{k}|$ and let \[ \mathcal{A}\dfn\left\{ x^{n}\in\{-1,1\}^{n}:\left|\sum_{i=1}^{n}a_{i}x_{i}-b\right|<a\right\} . \] It is easy to see that $\mathcal{A}$ forms an antichain w.r.t. the partial order $\preceq$ on $\{-1,1\}^{n}$, i.e., that there are no two distinct $x^{n},y^{n}\in\mathcal{A}$ such that $x^{n}\preceq y^{n}$. This holds simply since for such a pair it must hold that \[ \sum_{i=1}^{n}a_{i}y_{i}-\sum_{i=1}^{n}a_{i}x_{i}\geq2a. \] Such an antichain is called a \emph{Sperner family}, and \emph{Sperner's theorem} \cite[Maximal Antichains, Corollary 2]{alon2004probabilistic} shows that \[ |\mathcal{A}|\leq\binom{n}{\lfloor\nicefrac{n}{2}\rfloor} \] concluding the proof. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:LCSP_LTF_approx}] Assume $\Lev[f]=1$ (trivial otherwise), and define $g(x^{n})=\sgn(\sum_{i=1}^{n}\hat{f}_{i}x_{i})$. Let $\mathcal{A}\dfn\{x^{n}\in\{-1,1\}^{n}:g(x^{n})=0\}$. Using Lemma \ref{lem:sperner}, we have that \begin{align} \Pr(X^{n}\in\mathcal{A}) & \leq\sqrt{\frac{2}{\pi n_{f}}}. \end{align} Since $f$ is LCSP then by Proposition \ref{prop: USP implies WST} is it also WST, and hence $f(x^{n})=g(x^{n})$ for any $x^{n}\not\in\mathcal{A}$. By slightly perturbing the coefficients of $g$, one can clearly obtain a ``legal'' LTF $\tilde{g}$ that takes values only in $\{-1,1\}$ and still agrees with $f$ for all $x^{n}\in\mathcal{A}$. The distance between $f$ and $\tilde{g}$ is therefore at most $|\mathcal{A}|/2^{n}$. \end{proof} \subsection{Chow Distance} The \emph{Chow distance} between two Boolean functions $f$ and $g$ is defined as \[ d_{\Chow}(f,g)\triangleq\left(\sum_{i\in[n]}\left(\hat{f}_{i}-\hat{g}_{i}\right)^{2}\right)^{1/2}. \] It was shown in \cite[Prop. 1.5, Th. 1.6]{o2011chow} that for any $f$ and $g$ \[ \frac{1}{4}d_{\mathrm{\Chow}}^{2}(f,g)\le\Dist(f,g)\leq\tilde{O}\left(\frac{1}{\sqrt{-\log d_{\Chow}(f,g)}}\right), \] where for $q<1$, $\tilde{O}(q)$ means $O(q\cdot\log^{c}(1/q))$ for some absolute constant $c$. For LCSP LTF functions, the upper bound can be generally improved. We will state our result for the case where one of the functions is SST, though it can be somewhat cumbersomely extended to the case where none of them is. Let $\Gap[f]$ be the minimal positive value of $\sum_{i=1}^{n}\hat{f}_{i}x_{i}$ over the Hamming cube (with $\Gap[f]=0$ if all the $\hat{f}_{i}$'s are zero). \begin{thm} \label{thm:lcsp_separation} Let $f$ and $g$ be two balanced LCSP functions that depend on all $n$ variables, and assume that $f$ is SST. Then \[ \Dist(f,g)\leq\frac{d_{\mathrm{\Chow}}^{2}(f,g)}{2\Gap[f]}. \] \end{thm} \begin{proof}[Proof of Theorem \ref{thm:lcsp_separation}] Let \[ \mathcal{B}\dfn\left\{ x^{n}\in\{-1,1\}^{n}:f(x^{n})\neq g(x^{n})\right\} . \] Then, \begin{align} d_{\Chow}^{2}(f,g) & =\E\left((f(X^{n})-g(X^{n}))\cdot\sum_{i\in[n]}\left(\hat{f}_{i}-\hat{g}_{i}\right)X_{i}\right)\label{eq:lcsp_dist1}\\ & =2\E\left(\left|\sum_{i\in[n]}\left(\hat{f}_{i}-\hat{g}_{i}\right)X_{i}\right|\cdot\I(X^{n}\in\mathcal{B})\right)\label{eq:lcsp_dist2}\\ & \geq2\Gap[f]\cdot\P\left(X^{n}\in\mathcal{B}\right)\label{eq:lcsp_dist3} \end{align} where (\ref{eq:lcsp_dist1}) follows from linearity of expectation and the definition of the Fourier coefficients, (\ref{eq:lcsp_dist2}) holds since both $f$ and $g$ are WST by virtue of Proposition \ref{prop: USP implies WST}, and (\ref{eq:lcsp_dist3}) holds since $f$ is SST and $g$ is WST. \end{proof} Equations (\ref{eq: Fourier is influence for monotone})-(\ref{eq: Fourier level 1 with probability}) and Lemma \ref{lem:sperner} imply that $\Gap[\maj]\leq\sqrt{\frac{2}{\pi n}}$. Since Majority is SST, we have: \begin{cor} For odd $n$ and any LCSP function $g$, \[ \frac{1}{4}\cdot d_{\Chow}^{2}(\maj,g)\leq\Dist(\maj,g)\leq\sqrt{\frac{\pi n}{8}}\cdot d_{\Chow}^{2}(\maj,g). \] \end{cor} \section{Stability-based Conditions\label{sec:stab}} In this section we provide simple necessary conditions for a function to be $\rho$-SP, in terms of its stability and Fourier coefficients. \begin{prop} \label{prop: necessary condition basic}If $f$ is $\rho$-SP then \begin{align} \Stab_{\rho}[f] & \geq\max_{S\subseteq[n]}\rho^{|S|}|\hat{f}_{S}|. \end{align} \end{prop} \begin{proof} If $f$ is $\rho$-SP, then $\Stab_{\rho}[f]=\Stab_{\rho}^{*}[f]$. Letting $T\subseteq[n]$, the strong stability can be lower bounded as follows: \begin{align} \Stab_{\rho}^{*}[f] & =\E\left|\sum_{S\subseteq[n]}\rho^{|S|}\cdot\hat{f}_{S}\cdot Y^{S}\right|\\ & =\E\left(\left|\sum_{S\subseteq[n]}\rho^{|S|}\cdot\hat{f}_{S}\cdot Y^{S}\right|\cdot\left|Y^{T}\right|\right)\\ & =\E\left(\left|\sum_{S\subseteq[n]}\rho^{|S|}\cdot\hat{f}_{S}\cdot Y^{S}\cdot Y^{T}\right|\right)\\ & \geq\left|\E\left(\sum_{S\subseteq[n]}\rho^{|S|}\cdot\hat{f}_{S}\cdot Y^{S}\cdot Y^{T}\right)\right|\\ & =|\rho^{|T|}\cdot\hat{f}_{T}|. \end{align} The proof is completed by optimizing over $T$. \end{proof} \begin{example} When $f$ is the OR function, we have \[ \max_{S\subseteq[n]}\rho^{|S|}|\hat{f}_{S}|=|\hat{f}_{\phi}|=1-2^{1-n}. \] It is easy to verify that \[ \P\left(f(X^{n})=f(Y^{n})\right)=1-2^{1-n}\cdot\left(1-\left(1-\delta\right)^{n}\right), \] and using $\rho=1-2\delta$ \begin{align} \Stab_{\rho}[f] & =2\cdot\P\left(f(X^{n})=f(Y^{n})\right)-1\\ & =1-2^{2-n}\cdot\left(1-\left(\frac{1+\rho}{2}\right)^{n}\right). \end{align} Then, $\OR$ is $\rho$-SP only when $\Stab_{\rho}[\OR]\geq1-2^{1-n}$, which can be seen to be equivalent to $\rho\geq2^{(\nicefrac{n-1)}{n}}-1$. This is the same result that can be obtained by direct computation (see Proposition \ref{thm: Sufficient - no flips}), and so the bound of Proposition \ref{prop: necessary condition basic} is tight in this case. Furthermore, we may deduce again the result of Corollary \ref{cor: unblanaced functions are SP only constants}: \end{example} \begin{cor} An LCSP function is either balanced or constant. \end{cor} \begin{proof} If $f$ is $\rho$-SP then \[ \Stab_{\rho}[f]=\sum_{S\subseteq[n]}\rho^{|S|}|\hat{f}_{S}|^{2}\geq|\hat{f}_{\phi}|. \] As $\rho\downarrow0$, this bound implies that $|\hat{f}_{\phi}|^{2}\geq|\hat{f}_{\phi}|$, and as $|\hat{f}_{\phi}|\leq1$, this is only possible when either $\hat{f}_{\phi}=0$ or $|\hat{f}_{\phi}|=1$. \end{proof} More generally, we have the following: \begin{cor} If $f$ is LCSP then \[ W^{\Lev[f]}[f]\geq\max_{S\subseteq[n]:\;|S|=\Lev(f)}|\hat{f}_{S}|. \] Specifically, if $f$ is also monotone, this bound reads \[ W^{1}[f]\geq\max_{i\in[n]}\hat{f}_{i}=\max_{i\in[n]}\Inf_{i}[f], \] where the r.h.s. is the so-called \emph{maximal influence} of $f$. \end{cor} When $\Deg(f)<n$, another bound of the form of Proposition \ref{prop: necessary condition basic} can be derived using the following implication of hypercontractivity \cite{bonami1970etude,gross1975logarithmic}: When $f:\{-1,1\}^{n}\to\mathbb{R}$ has $\Deg(f)=k$ then $\left\Vert f\right\Vert _{2}\leq e^{k}\cdot\left\Vert f\right\Vert _{1}$ \cite[Theorem 9.22]{Bool_book}. \begin{prop} \label{prop: necessary condition hyper}If $f$ is $\rho$-SP and $\Deg(f)=k$ then \[ \Stab_{\rho}[f]\geq e^{-k}\cdot\sqrt{\Stab_{\rho^{2}}[f]}. \] \end{prop} \begin{proof} As in the proof of Proposition \ref{prop: necessary condition basic}, we lower bound \begin{align} \E\left|\sum_{S\subseteq[n]}\rho^{|S|}\cdot\hat{f}_{S}\cdot Y^{S}\right| & =\left\Vert T_{\rho}f\right\Vert _{1}\\ & \geq e^{-k}\cdot\left\Vert T_{\rho}f\right\Vert _{2}\label{eq: hypercontractivity stability bound a}\\ & =e^{-k}\cdot\sqrt{\langle T_{\rho}f,T_{\rho}f\rangle}\\ & =e^{-k}\cdot\sqrt{\langle T_{\rho^{2}}f,f\rangle}\label{eq: hypercontractivity stability bound b}\\ & =e^{-k}\cdot\sqrt{\Stab_{\rho^{2}}[f]}\label{eq: hypercontractivity stability bound} \end{align} where (\ref{eq: hypercontractivity stability bound a}) is since if $\Deg(f)=\Deg[T_{\rho}f]=k$, and (\ref{eq: hypercontractivity stability bound b}) is since $T_{\rho}f$ is a self-adjoint operator. \end{proof} The last proof implies for a degree $k$, $\rho$-SP function $f$ \[ e^{-k}\cdot\sqrt{\Stab_{\rho^{2}}[f]}\leq\Stab_{\rho}[f]\leq\sqrt{\Stab_{\rho^{2}}[f]}. \] It can be observed that even for a given degree $k$, neither of the bounds in Propositions \ref{prop: necessary condition basic} and \ref{prop: necessary condition hyper} subsumes the other. \section{Sharp Threshold at High Correlation \label{sec:Sharp-Threshold}} As we have seen, all functions are $\rho$-SP when $\rho>1-\frac{2\ln2}{n}+O(n^{-2})$. In this section, we show that when the correlation is reduced ever so slightly to $\rho\approx1-\frac{2}{n}$, the fraction of SP functions becomes double-exponentially small. \begin{thm} \label{thm: sharp threshold delta=00003D1/n}For any $\alpha>1$, the fraction of $\rho$-SP functions for $\rho=1-\frac{2\alpha}{n}$ is at most $\exp(-2^{n\cdot\binent(\frac{\alpha-1}{2\alpha})+o(n)})$, where $\binent(t)\dfn-t\log(t)-(1-t)\cdot\log(1-t)$ is the binary entropy function. \end{thm} The fact that $\rho$-SP functions are rare is not limited to the $\rho=1-O(\frac{1}{n})$ regime, yet a different technique is needed in order to establish this in other regimes. We next demonstrate how a similar phenomenon holds in a high correlation regime where $\rho$ is fixed. Let $\eta_{\delta}$ be the minimal $\eta>0$ such that \begin{equation} \frac{1}{2}\log\frac{1}{\delta^{2}+(1-\delta)^{2}}<\min\left\{ \log\frac{1}{1-\delta},\bindiv(\eta||\delta)\right\} \label{eq: condition on crossover for sharp threshold} \end{equation} holds, where $\bindiv(p||q)\dfn p\log\frac{p}{q}+(1-p)\log\frac{1-p}{1-q}$ is the binary divergence function. It can be verified that $\eta_{\delta}<1/4$ for any $\delta<\delta_{\max}\approx0.0974$. \begin{thm} \label{thm: sharp threshold large delta}For any $\delta\in(0,\delta_{\max})$, the fraction of $\rho$-SP functions for $\rho=1-2\delta$ is at most $\exp\left(-2^{n[1-\binent(2\eta_{\delta})]-o(n)}\right)$. \end{thm} We begin with the proof of Theorem \ref{thm: sharp threshold delta=00003D1/n}. \begin{proof}[Proof of Theorem \ref{thm: sharp threshold delta=00003D1/n}] In this proof we find it more convenient to work with the $\delta$ and $\{0,1\}$ convention. The proof comprises two steps. First, we focus on a specific $y^{n}$ and derive a sufficient condition for a function to be non $\rho$-SP at $y^{n}$. This condition depends only on local values of the function, up to Hamming distance $\log n$ from $y^{n}$, and specifically tailored to the regime of $\delta=\Theta(1/n)$. We show that for a random choice of function, the probability that this condition is satisfied decays exponentially, and we derive an upper bound on the exponential decay rate. In the second step, we recall that a function is $\rho$-SP only if it is $\rho$-SP at all $2^{n}$ points of the Hamming cube. This implies that the expected number of non $\rho$-SP points is exponentially large. While there are statistical dependencies between different points in the Hamming cube, Janson's theorem \cite[Theorem 8.1.1]{alon2004probabilistic} and the fact that the condition in the first step is ``local'' allows us to prove that the probability that all points in the Hamming cube are $\rho$-SP is only double-exponentially small. We begin with the first step. To this end, let us denote the \emph{shell of radius $d$ around $x^{n}\in\{0,1\}^{n}$} by \begin{equation} \mathcal{S}(x^{n},d)\dfn\left\{ \tilde{x}^{n}:\Hamd(x^{n},\tilde{x}^{n})=d\right\} .\label{eq: Hamming shells} \end{equation} For any function $f:\{0,1\}^{n}\to\{0,1\}$, let the $d$\emph{-shell bias of $f$ }be \begin{equation} \beta_{d,f}(x^{n})\dfn\frac{1}{\left|\mathcal{S}(x^{n},d)\right|}\sum_{\tilde{x}^{n}\in\mathcal{S}(x^{n},d)}f(\tilde{x}^{n}).\label{eq: d-shell bias} \end{equation} Fix $\eta>0$ and some $y^{n}$. Without loss of generality, below we assume that $f(y^{n})=0$. Define the set of functions \[ \mathcal{B}_{\eta}(y^{n},1)=\left\{ f:\beta_{1,f}(y^{n})\geq1-\eta\right\} , \] and for $2\leq d\leq\ell$, the sets \[ \mathcal{B}_{\eta}(y^{n},d)=\left\{ f:\beta_{d,f}(y^{n})\geq1/2\right\} , \] where $\ell\geq3$. We say that $y^{n}$ is \emph{bad} for $f$ if $f\in\mathcal{B}_{\eta}(y^{n})$, where \[ \mathcal{B}_{\eta}(y^{n})\dfn\bigcap_{d=1}^{\ell}\mathcal{B}_{\eta}(y^{n},d). \] Now, for any $n>\ell$, setting $\delta=\frac{\alpha}{n}$, any $f\in\mathcal{B}_{\eta}(y^{n})$ satisfies: \begin{align} & \P\left(f(X^{n})\neq f(Y^{n})\mid Y^{n}=y^{n}\right)\nonumber \\ & \geq\sum_{d=1}^{\ell}\beta_{d,f}(y^{n})\binom{n}{d}\delta^{d}(1-\delta)^{n-d}\\ & \geq(1-\delta)^{n}\cdot\sum_{d=1}^{\ell}\beta_{d,f}(y^{n})\binom{n}{d}\delta^{d}\\ & \geq\left(1-\frac{\alpha}{n}\right){}^{n}\cdot\left(1-\frac{\ell}{n}\right){}^{\ell}\cdot\left(\sum_{d=1}^{\ell}\frac{\beta_{d,f}(y^{n})}{d!}\cdot\alpha^{d}\right)\label{eq: lower bound on the error probability with shells}\\ & \geq\left(1-\frac{\alpha}{n}\right){}^{n}\cdot\left(1-\frac{\ell}{n}\right){}^{\ell}\cdot\left((1-\eta)\cdot\alpha+\frac{1}{2}\sum_{d=2}^{\ell}\frac{\alpha^{d}}{d!}\right)\\ & =\left(1-\frac{\alpha}{n}\right){}^{n}\cdot\left(1-\frac{\ell}{n}\right){}^{\ell}\cdot\left((1-\eta)\cdot\alpha+\frac{1}{2}\left(e^{\alpha}-1-\alpha-\sum_{d=\ell+1}^{\infty}\frac{\alpha^{d}}{d!}\right)\right).\label{eq: lower bound on conditional prob} \end{align} Taking $\ell$ to be $\Omega(1)$ and $o(n)$, say $\ell=\log n$, (\ref{eq: lower bound on conditional prob}) tends to \begin{equation} \frac{1}{2}+\left(\frac{1}{2}-\eta\right)\alpha e^{-\alpha}-\frac{1}{2}e^{-\alpha}\label{eq: limit of conditional probability} \end{equation} as $n\to\infty$. Let \[ \eta_{\alpha}\dfn\frac{\alpha-1}{2\alpha}. \] Clearly, $\eta_{\alpha}$ is monotonically increasing for $\alpha>0$, where $\lim_{\alpha\downarrow1}\eta_{\alpha}=0$, and $\lim_{\alpha\uparrow\infty}\eta_{\alpha}=1/2$. Setting $\eta\in(0,\eta_{\alpha})$ guarantees that (\ref{eq: lower bound on conditional prob}) is larger than $1/2$ for all large enough $n$. Hence, for such a choice, \[ \P\left(f(X^{n})\neq f(Y^{n})\mid Y=y^{n}\right)>1/2, \] and so \[ \left\{ f\in\mathcal{B}_{\eta}(y^{n})\right\} \subseteq\left\{ f\text{ is not }\text{\ensuremath{\rho}}\text{-SP at }y^{n}\right\} . \] Let us now choose $f$ uniformly at random over all functions Boolean functions on $\{0,1\}^{n}$, and lower bound the probability that $f$ is $\rho$-SP at $y^{n}$. To this end, note that Chernoff's bound implies that \begin{equation} \P\left(\beta_{1,f}(y^{n})\geq1-\eta\right)=2^{-n\left(1-\binent(\eta)\right)+o(n)},\label{eq: M1 large value asymptotic probability} \end{equation} and symmetry implies that \[ \P\left(\beta_{d,f}(y^{n})\geq1/2\right)\geq1/2, \] for $2\leq d\leq\ell=\log n$. By independence, \begin{align} \P\left(\mathcal{B}_{\eta}(y^{n})\right) & =\prod_{d=1}^{\log n}\P\left(\mathcal{B}_{\eta}(y^{n},d)\right)\\ & =2^{-n\left(1-\binent(\eta)\right)+o(n)}\cdot2^{-(\log n-1)}\\ & =2^{-n\left(1-\binent(\eta)\right)+o(n)}, \end{align} and so \[ \P\left(f\text{ is not }\text{\ensuremath{\rho}}\text{-SP at }y^{n}\right)\geq2^{-n\left(1-\binent(\eta)\right)+o(n)}. \] This completes the first step of the proof. For the second step, let us upper bound the probability $\P(f\in\mathcal{E})$ where \[ \mathcal{E}\dfn\bigcap_{y^{n}\in\{0,1\}^{n}}\mathcal{B}_{\eta}^{c}(y^{n}). \] This in turn will serve as an upper bound the probability that the function we draw is $\rho$-SP for the aforementioned $\rho$. To this end, note that if $f$ is $\rho$-SP for $\rho=1-2\alpha\cdot n^{-1}$ then it must be that $f$ has no bad inputs, i.e., $f\in\mathcal{E}$, and therefore, the expected number of ``bad'' inputs is given by \[ \mu\dfn2^{n}\cdot\P\left(\mathcal{B}_{\eta}(y^{n})\right)=2^{n\binent(\eta)+o(n)}. \] Had the number of bad inputs been distributed according to a Poisson distribution with expected value $\mu$, then the probability of $\mathcal{E}$ would have been given by \[ \P(\mathcal{E})=e^{-\mu}=\exp\left(-2^{n\cdot\binent(\eta)+o(n)}\right). \] However, the events $\mathcal{B}_{\eta}(x^{n})$ and $\mathcal{B}_{\eta}(y^{n})$ are dependent whenever $\Hamd(x^{n},y^{n})\leq2\ell$. Nonetheless, Janson's correction \cite[Theorem 8.1.1]{alon2004probabilistic} implies that \[ \P(\mathcal{E})\leq e^{-\mu+\frac{\Delta}{2}}, \] where $\Delta$ is a correction term that depends on joint probability of dependent bad events $\P\left(\mathcal{B}_{\eta}(x^{n})\cap\mathcal{B}_{\eta}(y^{n})\right)$. We next show that $\Delta\to0$ as $n\to\infty$ exponentially fast, as long as $\eta\in(0,\binent^{-1}(1/2))$. As \textbf{$\eta_{\max}\leq\binent^{-1}(1/2)$}, for any $\eta\in(0,\eta_{\max})$ \begin{equation} \P\left(\mathcal{E}\right)\leq\exp\left(-2^{n\cdot\binent(\eta)+o(n)}\right).\label{eq: double-exponetial decrease proof} \end{equation} The statement of the theorem then follows. To complete the proof, it remains to show that $\Delta\to0$ exponentially fast. Let us denote $x^{n}\sim y^{n}$ whenever the events $\{f\in\mathcal{B}_{\eta}(x^{n})\}$ and $\{f\in\mathcal{B}_{\eta}(y^{n})\}$ are statistically dependent. For brevity, below we write $\mathcal{B}_{\eta}(y^{n})$ to mean the corresponding event. The term required for Janson's theorem is then given by \begin{equation} \Delta\dfn\sum_{x^{n}\sim y^{n}}\P\left(\mathcal{B}_{\eta}(x^{n})\cap\mathcal{B}_{\eta}(y^{n})\right).\label{eq: Janson correction term} \end{equation} Let us analyze the probability in (\ref{eq: Janson correction term}) under the assumption that $f(x^{n})=f(y^{n})=0$. Bayes rule implies that \begin{align} & \P\left(\mathcal{B}_{\eta}(x^{n})\cap\mathcal{B}_{\eta}(y^{n})\mid f(x^{n})=0,f(y^{n})=0\right)\nonumber \\ & =\P\left(\mathcal{B}_{\eta}(x^{n},1)\mid f(x^{n})=0,f(y^{n})=0\right)\nonumber \\ & \hphantom{=}\times\P\left(\mathcal{B}_{\eta}(y^{n},1)\mid f(x^{n})=0,f(y^{n})=0,\mathcal{B}_{\eta}(x^{n},1)\right)\nonumber \\ & \hphantom{=}\times\P\left(\bigcap_{d=2}^{\ell}\mathcal{B}_{\eta}(x^{n},d),\bigcap_{d=2}^{\ell}\mathcal{B}_{\eta}(y^{n},d)\mid f(x^{n})=0,f(y^{n})=0,\mathcal{B}_{\eta}(x^{n},1),\mathcal{B}_{\eta}(y^{n},1)\right).\label{eq: Bayes rule first derivation} \end{align} For the first probability on the r.h.s. of (\ref{eq: Bayes rule first derivation}), we note that if $\Hamd(x^{n},y^{n})\geq2$ then $\mathcal{S}(x^{n},1)\cap\{x^{n},y^{n}\}=\phi$ and (\ref{eq: M1 large value asymptotic probability}) holds. Otherwise, if $\Hamd(x^{n},y^{n})=1$ then $\mathcal{S}(x^{n},1)\cap\{x^{n},y^{n}\}=y^{n}$. In that case, \begin{align} & \P\left(\mathcal{B}_{\eta}(x^{n},1)\mid f(x^{n})=0,f(y^{n})=0\right)\nonumber \\ & =\P\left(\beta_{1,f}(x^{n})\geq1-\eta\mid f(x^{n})=0,f(y^{n})=0\right)\\ & =\P\left(\frac{1}{\binom{n}{1}}\sum_{\tilde{y}^{n}\in\mathcal{S}(x^{n},1)\backslash\{y^{n}\}}f(\tilde{y}^{n})+f(y^{n})\geq1-\eta\mid f(x^{n})=0,f(y^{n})=0\right)\\ & =\P\left(\frac{1}{n-1}\sum_{\tilde{y}^{n}\in\mathcal{S}(x^{n},1)\backslash\{y^{n}\}}f(\tilde{y}^{n})\geq\frac{n}{n-1}(1-\eta)\right)\\ & =2^{-(n-1)\left[1-\binent\left(\eta+O(n^{-1})\right)\right]+o(n)}\\ & =2^{-n(1-\binent(\eta))+o(n)},\label{eq: first layer A step - derivation} \end{align} where the last transition is since $\binent(\eta)$ is a smooth function, with bounded derivatives around a neighborhood of any fixed $\eta\in(0,1)$. For the second probability on the r.h.s. of (\ref{eq: Bayes rule first derivation}), if $\Hamd(x^{n},y^{n})\geq3$ then $\mathcal{S}(y^{n},1)\cap\{\{x^{n},y^{n}\}\cup\mathcal{S}(x^{n},1)\}=\phi$ and (\ref{eq: M1 large value asymptotic probability}) holds. Next, if $\Hamd(x^{n},y^{n})=1$ then $\mathcal{S}(y^{n},1)\cap\{\{x^{n},y^{n}\}\cup\mathcal{S}(x^{n},1)\}=x^{n}$. A derivation similar to (\ref{eq: first layer A step - derivation}) shows that \begin{equation} \P\left(\mathcal{B}_{\eta}(y^{n},1)\mid f(x^{n})=0,f(y^{n})=0,\mathcal{B}_{\eta}(x^{n},1)\right)=2^{-n(1-\binent(\eta))+o(n)}\label{eq: first layer B step} \end{equation} holds. If $\Hamd(x^{n},y^{n})=2$ then $\mathcal{S}(y^{n},1)\cap\{\{x^{n},y^{n}\}\cup\mathcal{S}(x^{n},1)\}$ contains exactly two points. Again, a derivation similar to (\ref{eq: first layer A step - derivation}) (with $n-2$ replacing $n-1$) shows that (\ref{eq: first layer B step}) holds. The third probability in the r.h.s. of (\ref{eq: Bayes rule first derivation}) can be trivially upper bounded by $1$. Thus, \[ \P\left(\mathcal{B}_{\eta}(x^{n})\cap\mathcal{B}_{\eta}(y^{n})\mid f(x^{n})=0,f(y^{n})=0\right)\leq2^{-2n(1-\binent(\eta))+o(n)}. \] Evidently, analogous analysis holds for all other three possibilities of the pair $(f(x^{n}),f(y^{n}))$, and so \begin{equation} \P\left(\mathcal{B}_{\eta}(x^{n})\cap\mathcal{B}_{\eta}(y^{n})\right)\leq2^{-2n(1-\binent(\eta))+o(n)}.\label{eq: bound on pairwise bad events} \end{equation} As if $x^{n}\sim y^{n}$ then $\Hamd(x^{n},y^{n})\leq2\ell$ the number of dependent pairs is upper bounded by $2^{n}\cdot\binom{n}{2\ell}$. As $\ell=\log n$ was chosen, $\binom{n}{2\ell}\leq n^{\log n}=2^{\log^{2}n}$. Then (\ref{eq: bound on pairwise bad events}) implies that \begin{align} \Delta & \leq2^{n+o(n)}\cdot2^{-2n(1-\binent(\eta))+o(n)}\\ & =2^{-n\left(1-2\binent(\eta)\right)+o(n)}. \end{align} Thus, $\Delta\to0$ as $n\to\infty$ exponentially fast, as long as $\eta\in(0,\binent^{-1}(1/2))$, as was required to be proved. \end{proof} We move on to the proof of Theorem \ref{thm: sharp threshold large delta}. \begin{proof}[Proof of Theorem \ref{thm: sharp threshold large delta}] The proof again comprises two steps, in the spirit of Theorem \ref{thm: sharp threshold delta=00003D1/n}, first focusing on a single point, and then on the entire Hamming cube. However, the arguments in each step are different. Specifically, in the first step we derive a necessary condition for a function to be $\rho$-SP, which is now based only on the value of the function at points of Hamming distance of (slightly larger than) $2\eta n$ with $\eta<1/4$. This condition is tailored to the regime of a fixed $\delta$. We then use a central-limit theorem to show that the probability that this condition is satisfied is close to $1/2$. Thus, the probability that the local condition holds is close to the probability that the function is SP (when accounting for the entire Hamming cube). In the second step, rather than considering all $2^{n}$ points of the Hamming cube, we consider a subset of the hamming cube of size about $2^{n[1-\binent(2\eta)]}$, which satisfies that the Hamming distance between each two points in the subset is at least $\eta n$. The existence of this set is assured from the Gilbert-Varshamov bound from coding-theory \cite[Th. 4.10]{roth2006introduction}. Since the points in this subset are sufficiently far apart, the event that the condition derived in the first step occurs for one point is independent of all other points. Thus, the probability of a function to be $\rho$-SP is about $2^{-2^{n[1-\binent(2\eta)]}}$. For the first step, let $\delta<\eta<1/4$ be given, and let $\mathcal{B}_{\eta}(y^{n})$ be a punctured Hamming ball of relative radius $\eta$ around $y^{n}$, i.e., \[ \mathcal{B}_{\eta}(y^{n})\dfn\left\{ z^{n}\in\{-1,1\}^{n}:0<\frac{1}{n}\Hamd(z^{n},y^{n})\leq\eta\right\} . \] Then, clearly \[ \left|p(y^{n}|y^{n})\cdot f(x^{n})\right|\leq p(y^{n}|y^{n})=2^{-n\log\frac{1}{1-\delta}}, \] and by the Chernoff bound (or the method of types \cite{csiszar2011information}) \begin{align} \left|\sum_{x^{n}\in\mathcal{B}_{\eta}^{c}(y^{n})\backslash y^{n}}p(x^{n}|y^{n})\cdot f(x^{n})\right|\leq & \sum_{x^{n}\in\mathcal{B}_{\eta}^{c}(y^{n})\backslash y^{n}}p(x^{n}|y^{n})\\ & =\P\left(X^{n}\not\in\mathcal{B}_{\eta}(y^{n})\mid Y^{n}=y^{n}\right)\\ & \leq2^{-n\bindiv(\eta||\delta)-\Theta(\log n)}. \end{align} Focusing on a given $y^{n}$, let us assume without loss of generality that $f(y^{n})=-1$. Then, \begin{align} & \E\left(f(X^{n})\mid Y^{n}=y^{n}\right)\nonumber \\ & =\sum_{x^{n}}p(x^{n}|y^{n})\cdot f(x^{n})\\ & =p(y^{n}|y^{n})\cdot f(x^{n})+\sum_{x^{n}\in\mathcal{B}_{\eta}(y^{n})}p(x^{n}|y^{n})\cdot f(x^{n})+\sum_{x^{n}\in\mathcal{B}_{\eta}^{c}(y^{n})\backslash y^{n}}p(x^{n}|y^{n})\cdot f(x^{n})\\ & \geq-2^{-n\log\frac{1}{1-\delta}}+\sum_{x^{n}\in\mathcal{B}_{\eta}(y^{n})}p(x^{n}|y^{n})\cdot f(x^{n})-2^{-n\bindiv(\eta||\delta)-\Theta(\log n)}, \end{align} and thus, \begin{equation} \left\{ f\text{ is }\text{\ensuremath{\rho}}\text{-SP at }y^{n}\right\} \subseteq\left\{ \sum_{x^{n}\in\mathcal{B}_{\eta}(y^{n})}p(x^{n}|y^{n})\cdot f(x^{n})\leq2^{-n\log\frac{1}{1-\delta}}+2^{-n\bindiv(\eta||\delta)-\Theta(\log n)}\right\} \dfn\mathcal{A}_{\eta}(y^{n}).\label{eq: sharp threshold two -- sufficient condition} \end{equation} Let us now choose $f$ uniformly at random over all Boolean functions on $\{-1,1\}^{n}$. We will next evaluate the probability of the event on the r.h.s. of (\ref{eq: sharp threshold two -- sufficient condition}) by the Berry-Esseen central-limit theorem \cite[Chapter XVI.5, Theorem 2]{Feller}. To this end, we note that \[ \E\left(\sum_{x^{n}\in\mathcal{B}_{\eta}(y^{n})}p(x^{n}|y^{n})\cdot f(x^{n})\right)=0, \] and by the method of types \cite{csiszar2011information} \begin{align} \E\left(\sum_{x^{n}\in\mathcal{B}_{\eta}(y^{n})}p(x^{n}|y^{n})\cdot f(x^{n})\right)^{2} & =\sum_{x^{n}\in\mathcal{B}_{\eta}(y^{n})}p^{2}(x^{n}|y^{n})\\ & =\sum_{d=1}^{\lfloor\eta n\rfloor}\sum_{x^{n}:\Hamd(x^{n},y^{n})=d}2^{-n[\binent(d/n)+\bindiv(\zeta||\delta)]}\\ & =2^{-n\cdot\min_{0\leq\zeta\leq\eta}[\binent(\zeta)+2\bindiv(\zeta||\delta)]-\Theta(\log n)}\label{eq: variance for random function}\\ & =2^{-n\cdot\frac{1}{2}\cdot\log\frac{1}{\delta^{2}+(1-\delta)^{2}}-\Theta(\log n)} \end{align} where the minimum in (\ref{eq: variance for random function}) is attained for $\zeta=\frac{\delta^{2}}{\delta^{2}+(1-\delta)^{2}}$ (which satisfies $\zeta\leq\delta<\eta$). Similarly, \begin{align*} \gamma_{n} & \dfn\sum_{x^{n}\in\mathcal{B}_{\eta}(y^{n})}\E\left|p(x^{n}|y^{n})\cdot f(x^{n})\right|^{3}\\ & =2^{-n\cdot\min_{0\leq\zeta\leq\eta}[2\binent(\zeta)+3\bindiv(\zeta||\delta)]-\Theta(\log n)}, \end{align*} and clearly $\gamma_{n}$ decreases exponentially for any $\delta\in(0,1/2)$. With this, the Berry-Esseen central-limit theorem implies that for some universal constant $c$ \begin{align} \P\left(\mathcal{A}_{\eta}(y^{n})\right) & \leq1-Q\left(\frac{2^{-n\log\frac{1}{1-\delta}}+2^{-n\bindiv(\eta||\delta)-\Theta(\log n)}}{2^{-n\cdot\frac{1}{2}\log\frac{1}{\delta^{2}+(1-\delta)^{2}}-\Theta(\log n)}}\right)+c\gamma_{n}\label{eq: sharp threshold fixed delta Q function}\\ & \leq\frac{1}{2}+o(1).\label{eq: sharp threshold fixed delta} \end{align} where in (\ref{eq: sharp threshold fixed delta Q function}) $Q(\cdot)$ is the tail distribution function of the standard normal distribution, and (\ref{eq: sharp threshold fixed delta}) is satisfied whenever $\eta=\eta_{\delta}$. This completes the first step of the proof. Moving on to the second step, by the Gilbert-Varshamov bound \cite[Th. 4.10]{roth2006introduction}, there exists a set (also known as an\emph{ error-correcting code}) $\mathcal{C}_{n}\subset\{-1,1\}^{n}$ such that \[ |\mathcal{C}_{n}|\geq2^{n[1-\binent(2\eta)]-o(n)} \] and $\mathcal{B}_{\eta}(x^{n})\cap\mathcal{B}_{\eta}(y^{n})=\phi$ for all $x^{n},y^{n}\in\mathcal{C}_{n}$. Consequently, \begin{align} \P\left(f\text{ is }\text{\ensuremath{\rho}}\text{-SP}\right) & \leq\P\left(\bigcap_{y^{n}\in\mathcal{C}_{n}}f\text{ is }\text{\ensuremath{\rho}}\text{-SP at }y^{n}\right)\\ & \leq\P\left(\bigcap_{y^{n}\in\mathcal{C}_{n}}\mathcal{A}_{\eta}^{c}(y^{n})\right)\\ & =\prod_{y^{n}\in\mathcal{C}_{n}}\P\left(\mathcal{A}_{\eta}(y^{n})\right)\\ & \leq\left(\frac{1}{2}+o(1)\right)^{|\mathcal{C}_{n}|}. \end{align} The proof is completed since $|\mathcal{C}_{n}|$ increases exponentially for $\eta<1/4$. \end{proof} \begin{rem} It is evident that the proof of Theorem \ref{thm: sharp threshold large delta} also holds for any sequence of $\{\delta_{n}\}$ such that $\delta_{n}=\omega(\frac{1}{\sqrt{n}})$ and $\overline{\delta}\dfn\limsup_{n\to\infty}\delta_{n}<\delta_{\max}$. Indeed, (\ref{eq: sharp threshold fixed delta}) holds in this case too, as long as we choose $\eta$ to be $\eta_{\overline{\delta}}$. \end{rem} \section{Open Problems \label{sec:Open Problems}} We have introduced the notion of self-predictability for Boolean functions. There are many interesting questions left open; below is a far from exhaustive list. We know that the characters, Majority and a few other LTFs (found numerically) are USP, and we can create many other USP functions from them. However, we still lack a clear understanding of what makes a function USP. \begin{problem} Characterize the family of USP functions. Specifically, how many USP functions are there? \end{problem} More specifically, we ask: \begin{problem} Is there a finite set of USP functions and a finite set of SP-preserving operations that span all USP functions? \end{problem} Adding symmetry to the mix, we conjecture the following. \begin{conjecture} The only symmetric USP functions are Majority and the largest character. In particular, Majority is the only monotone and symmetric USP function. \end{conjecture} We have seen that LCSP functions are WST, but not vice versa. \begin{problem} Find a simple condition guaranteeing that a WST function is LCSP (resp. USP). \end{problem} We say that a function $f$ is \emph{monotonically SP} if there exists $\rho_{0}$ such that $f$ is $\rho$-SP for $\rho>\rho_{0}$ and not $\rho$-SP for $\rho<\rho_{0}$. We have seen that there exist (balanced) functions that are not monotonically SP. \begin{problem} Characterize the family of monotonically SP functions. \end{problem} We have bounded the ratio between the strongest and second strongest coefficient of an LCSP LTF. This is quite weak: Let $r_{n}(\mathcal{F})$ be the minimum number such that any LTF in the family $\mathcal{F}$ admits a representation in which the ratio between the maximal coefficient and minimal coefficient (in absolute values) is at most $r_{n}(\mathcal{F})$. It is known in general, (see \cite[Theorem 2]{babai2010weights} and references therein) that $2^{-n(2-o(1))}\cdot n^{n/2}\leq r_{n}(\mathcal{F})\leq2^{n-1}\cdot(n+1)^{(n+1)/2}$ if $\mathcal{F}$ is the family of all LTFs. It is interesting to ask whether $r_{n}(\mathcal{F})$ becomes much smaller under self-predictability. \begin{problem} Characterize $r_{n}(\mathcal{F})$ when $\mathcal{F}$ is the family of LCSP LTFs (resp. USP LTFs). \end{problem} Let $\mathcal{G}_{\rho,n}$ be a directed graph over the set of all Boolean functions with $n$ variables, where we draw a directed edge from every function $f$ to its optimal predictor $\sgn T_{\rho}f$ (unless they coincide). To avoid ambiguities, we can set $\sgn T_{\rho}f$ equal to $f$ whenever $T_{\rho}f$ is exactly zero. It is easy to see that the number of $\rho$-SP functions is upper bounded by the number of connected components of $\mathcal{G}_{\rho,n}$. In fact, we conjecture that these quantities are exactly equal, or equivalently: \begin{conjecture} $\mathcal{G}_{\rho,n}$ contains no cycles. \end{conjecture} Such a conjecture can be proved, if e.g., one can show that there exist a dissimilarity measure $\theta(f,\sgn T_{\rho}f)$ which strictly decreases when $\sgn T_{\rho}$is operated on both its arguments. Note that if the above conjecture holds, then a simple way to arrive at a $\rho$-SP function is to start with some function $f$ and repeatedly apply the $\sgn T_{\rho}$ operator; this procedure will terminate at a $\rho$-SP function in finite time. In fact, simulations indicate that this convergence happens very quickly, which may hint that the (acyclic) connected components of $\mathcal{G}_{\rho,n}$ have small depth. \section*{Acknowledgments} We are grateful to Or Ordentlich for coming up with the original (different) argument that Majority is USP, based on May\textquoteright s Theorem (Remark \ref{rem: proof of majority is USP via May's theorem}), and to Lele Wang for coming up with Example \ref{exa:balanced function may not have balanced predictor}. We would like to thank both, as well as Omri Weinstein, for providing valuable insight during many stimulating discussions. \bibliographystyle{amsalpha}
\section{Introduction}\label{Sec:Introduction} The actual system of big data needs to process lots of data within a limited time generally, so many researches are on sample data to improve their efficiency \cite{chen2014big}. Distribution goodness-of-fit plays a fundamental role in signal processing and information theory, which focuses on the error magnitude between the distribution of a set of sample values and the real distribution. This paper desires to solve this problem based on information theory. Shannon entropy \cite{shannon2001mathematical} is possibly the most important quantity in information theory, which describes the fundamental laws of data compression and communication \cite{verdu1998fifty}. Due to its success, numerous entropies have been provided in order to extend information theory. Among them, the most successful expansion is R{\'e}nyi entropy \cite{renyi1961measures}. There are many applications based on R{\'e}nyi entropy, such as hypothesis testing \cite{van2014renyi}. Actually, entropy is a quantity with respect to probability distribution, which satisfies the intuitive notion of what a measure of information should be \cite{Elements}. Therefore, in this paper, we propose differential message importance measure (DMIM) as a measure of information for continuous random variable to characterize the process of information collection. DMIM is expanded from discrete message importance measure (MIM) \cite{fan2016message} which is such an information quantity which agrees with the intuitive notion of information importance for small probability event. Recent studies show that MIM has many applications in big data, such as information divergence measures \cite{she2017amplifying} and compressed data storage \cite{liu2017non}. Much of the research in the goodness of fit in the past several decades focused on the Kolmogorov-Smirnov test \cite{massey1951kolmogorov,lilliefors1967kolmogorov}. Based on it, \cite{Resnick1992Advantures} gave an error estimation of empirical distribution. This result can describe the goodness of fit very well and guide us to choose the sampling numbers. However, it can not visually display the process of information collection because the previous results can not describe the message carried by each sample and the information changes with the increase of the sampling size. The problem of testing goodness-of-fit in a discrete setting was discussed in \cite{harremoes2012information}. Fortunately, DMIM is the proper measure to help us consider the problem of goodness of fit in the view of the information collection of continuous random variables. Moreover, Compared with Kolmogorov-Smirnov statistic, DMIM also shows the relationship between the variance of a random variable and the error estimation of empirical distribution. The rest of this paper is organized as follows. Section \ref{sec:two} introduces the definition and basic properties of DMIM. Then, the DMIM of some basic continuous distribution is discussed in Section \ref{sec:three}, in which we give the asymptotic analysis of Gaussian distribution. In Section \ref{sec:four}, the goodness of fit with DMIM is discussed to analyze the process of information collection. The validity of proposed theoretical results is verified by the simulation results in Section \ref{sec:five}. Finally, we finish the paper with conclusions in Section \ref{sec:six}. \section{The Definition and Properties of DMIM}\label{sec:two} \subsection{Differential Message Important Measure} In this part, a new measure of information for continuous random variable will be introduced, which is called DMIM. It is an extension of MIM. \begin{defn}\label{Non-parametric MIM} The DMIM $l(X)$ of a continuous random variable $X$ with density $f(x)$ is defined as \begin{equation} l(X) = {\int_S {f(x){e^{ - f(x)}}dx} }, \end{equation} where $S$ is the support set of the random variable. \end{defn} In fact, the DMIM of a continuous random variable $X$ with density $f(x)$ can be written as \begin{flalign}\label{equ:Normal} l(X)=&\int_{ - \infty }^{ + \infty } {f (x)} {e^{ - f (x)}}dx \\ =& \int_{ - \infty }^{ + \infty } {f (x)} \sum\limits_{ n= 0}^\infty {{{{{\left( { - f (x)} \right)}^n}} \over {n!}}} dx\tag{\theequation a}\label{equ:Normal a}\\ = &\int_{ - \infty }^{ + \infty } {\sum\limits_{n = 0}^\infty {{{\left( { - 1} \right)}^n}{{{{\left( {f (x)} \right)}^{n + 1}}} \over {n!}}} dx} \tag{\theequation b}\label{equ:Normal b} \\ =& \int_{ - \infty }^{ + \infty } {f (x)dx + \sum\limits_{n = 1}^\infty {\int_{ - \infty }^{ + \infty } {{{\left( { - 1} \right)}^n}{{{{\left( {f (x)} \right)}^{n + 1}}} \over {n!}}dx} } }\tag{\theequation c}\label{equ:Normal c}\\ =& 1 + \sum\limits_{n = 1}^\infty {{{{{\left( { - 1} \right)}^n}} \over {n!}}\int_{ - \infty }^{ + \infty } {{{\left( {f (x)} \right)}^{n + 1}}dx} }. \tag{\theequation d}\label{equ:Normal d} \end{flalign} \subsection{Properties of DMIM} In this part, several basic properties of DMIM are discussed in details. \subsubsection{Upper and Lower Bound} For any continuous random variable $X$ with density $f(x)$, due to $0\leq f(x)\leq 1$, it is obtained that \begin{flalign}\label{equ:Bound} 0\le \int_S {f(x){e^{ - f(x)}}dx} \le \int_S {f(x)dx} = 1. \end{flalign} \subsubsection{Translation} Let $Y=X+c$, where $c$ is a constant. Then $f_Y(y)=f_X(y-c)$, and \begin{equation} l(X+c)=\int_{-\infty}^{+\infty} {{f_X}(x - c){e^{ - {f_X}(x - c)}}dx} =l(X). \end{equation} As a result, the constant drift does not change the DMIM. \subsubsection{Relation of DMIM to R{\'{e}}nyi Entropy} The differential R{\'{e}}nyi entropy of a continuous random variable $X$ with density $f(x)$ is given by \cite{van2014renyi} \begin{equation} h_{\alpha}(X)=\frac{1}{1-\alpha} \ln \int {(f(x))}^{\alpha}dx, \end{equation} where $\alpha>0$ and $\alpha \ne 1$. As $\alpha$ tends to 1, the Rényi entropy tends to the Shannon entropy. Therefore, we obtain \begin{equation}\label{equ:H_renyi} \int {(f(x))}^{\alpha}dx=e^{(1-\alpha) h_{\alpha}(X)}. \end{equation} Hence, we find \begin{equation}\label{equ:Renyi} l(X) = 1 + \sum\limits_{n = 1}^\infty {{{{{\left( { - 1} \right)}^n}} \over {n!}}e^{-n h_{n+1}(X)} }. \end{equation} Obviously, the DMIM is an infinite series of R{\'{e}}nyi Entropy. \subsubsection{Truncation Error} In this part, the remainder term of $l(X)$ will be discussed. \begin{thm}\label{thm:Truncation Error} If $\int {(f(x))}^{n+1}dx \leq \varepsilon $ for every $n\geq m$, then \begin{equation}\label{equ:Truncation Error} \left| {l(X) - (1 + \sum\limits_{n = 1}^{m - 1} {{\frac{{(-1)}^n}{n!}}{e^{ - n{h_{n + 1}}(X)}}} )} \right| \le e\varepsilon. \end{equation} \end{thm} \begin{proof} Substituting (\ref{equ:H_renyi}) and (\ref{equ:Renyi}) in the left of (\ref{equ:Truncation Error}), we obtain \begin{flalign}\label{equ:Truncation Error 1} &\left| {l\left( X \right) - \left( {1 + \sum\limits_{n = 1}^{m - 1} {{{{{\left( { - 1} \right)}^n}} \over {n!}}\int_{ - \infty }^{ + \infty } {{{\left( {f(x)} \right)}^{n + 1}}dx} } } \right)} \right| \nonumber\\ =& \left| {\sum\limits_{n = m}^\infty {{{{{\left( { - 1} \right)}^n}} \over {n!}}\int_{ - \infty }^{ + \infty } {{{\left( {f(x)} \right)}^{n + 1}}dx} } } \right| \\ \leq & \sum\limits_{n = m}^\infty {\left| {{{1} \over {n!}}\int_{ - \infty }^{ + \infty } {{{\left( {f(x)} \right)}^{n + 1}}dx} } \right|} \tag{\theequation a}\label{equ:Truncation Error 1 }\\ \leq &\left( {\sum\limits_{n = m}^\infty {{1 \over {n!}}} } \right)\varepsilon \tag{\theequation b}\label{equ:Truncation Error 1 c}\\ \leq&\left( {1 + \sum\limits_{n = 1}^{m - 1} {{1 \over {n!}}} + \sum\limits_{i = m}^\infty {{1 \over {n!}}} } \right)\varepsilon =e\varepsilon \tag{\theequation c}\label{equ:lTruncation Error 1 e} \end{flalign} where (\ref{equ:Truncation Error 1 c}) follows from $\int {(f(x))}^{n+1}dx \leq \varepsilon $. \end{proof} That is to say, if the integral of the density to the $(n+1)$-th power is limited, the remainder term will be restricted. \begin{rem}\label{rem:jieduan} Let $m=2$ in (\ref{equ:Truncation Error 1 c}), we obtain \begin{equation} \left| {l(x) - (1 -e^{-h_2(x)} )} \right| \le (1+1+\sum\limits_{n= 2}^{\infty} {{ \frac{1}{n!}} } -2) \varepsilon =(e-2)\varepsilon. \end{equation} \end{rem} \section{The DMIM of Typical Distributions} \label{sec:three} \subsection{Uniform Distribution} For a random variable whose density is $\frac{1}{b-a}$ from $a$ to $b$ and $0$ elsewhere. Then we obtain \begin{equation}\label{equ:Uniform 1} l(X) = {\int_a^b {{1 \over {b - a}}{e^{ - {1 \over {b - a}}}}dx} } = {e^{ - {1 \over {b - a}}}}. \end{equation} It is also noted that \begin{flalign}\label{equ:Uniform 2} \mathop {\lim }\limits_{\left( {b - a} \right) \to 0} {e^{ - {1 \over {b - a}}}} =0,\quad \mathop {\lim }\limits_{\left( {b - a} \right) \to \infty } {e^{ - {1 \over {b - a}}}} = 1 \end{flalign} \subsection{Normal Distribution} Let $X\sim \phi (x) = {1 \over {\sqrt {2\pi {\sigma ^2}} }}{e^{ - {{{{\left( {x - \mu } \right)}^2}} \over {2{\sigma ^2}}}}}$, we obtain \begin{flalign}\label{equ:Normal 1} &\int_{ - \infty }^{ + \infty } {{{\left( {\phi (x)} \right)}^{n + 1}}dx} = \int_{ - \infty }^{ + \infty } {{{\left( {{1 \over {\sqrt {2\pi {\sigma ^2}} }}{e^{ - {{{{\left( {x - \mu } \right)}^2}} \over {2{\sigma ^2}}}}}} \right)}^{n + 1}}dx} \\ &={\left( {{1 \over {\sqrt {2\pi {\sigma ^2}} }}} \right)^{n + 1}}\int_{ - \infty }^{ + \infty } {{e^{ - {{n + 1} \over {2{\sigma ^2}}}{{\left( {x - \mu } \right)}^2}}}dx} \tag{\theequation a}\label{equ:Normal 1 a}\\ & = {\left( {{1 \over {\sqrt {2\pi {\sigma ^2}} }}} \right)^{n + 1}}\sqrt {{{2\pi {\sigma ^2}} \over {n + 1}}} = {1 \over {\sqrt {n + 1} }}{\left( {{1 \over {\sqrt {2\pi {\sigma ^2}} }}} \right)^n}. \tag{\theequation b}\label{equ:Normal 1 c} \end{flalign} Substituting (\ref{equ:Normal 1 c}) in (\ref{equ:Normal d}), we obtian \begin{equation}\label{equ:normal RMIM} l(X) = 1 + \sum\limits_{n = 1}^\infty {{{{{\left( { - 1} \right)}^n}} \over {n!}}} {1 \over {\sqrt {n + 1} }}{\left( {{1 \over {\sqrt {2\pi {\sigma ^2}} }}} \right)^n}. \end{equation} Obviously, if $\sigma>1/\sqrt{2 \pi}$, $\int_{ - \infty }^{ + \infty } {{{\left( {\phi (x)} \right)}^{n + 1}}dx}$ will be less than or equal to $1/{(2\sqrt{3}\pi\sigma^2})$ for every $n\geq 2$ because $ {1 \over {\sqrt {n + 1} }}{\left( {{1 \over {\sqrt {2\pi {\sigma ^2}} }}} \right)^n}$ monotonically decreases in this case. According to Remark \ref{rem:jieduan}, we obtain \begin{equation}\label{equ:normal jieduan 1} \left| {l(x) - (1 -e^{-h_2(x)} )} \right| \leq \frac{(e-2) }{{2\sqrt{3}\pi\sigma^2}}\approx \frac{0.066}{\sigma^2}. \end{equation} If $\sigma$ is big enough, $\frac{(e-2) }{{2\sqrt{3}\pi\sigma^2}} \approx 0$. In this case, substituting $h_2(X)=\ln2+0.5\ln\pi +\ln \sigma$ in (\ref{equ:normal jieduan 1}), we find \begin{equation}\label{equ:normal jieduan 2} l(x) \approx 1-\frac{1}{2\sqrt{\pi}\sigma } \approx e^{-\frac{1}{2\sqrt{\pi}\sigma}}. \end{equation} In fact, $e^{-\frac{1}{2\sqrt{\pi}\sigma}}$ is a very good approximation for DMIM of normal distribution when $\sigma$ is not too small, which will be shown by the numerical results in section \ref{sec:five}. \subsection{Negative Exponential Distribution} Letting \begin{equation} \begin{split} X\sim f(x)=\left\{ \begin{aligned} & \lambda e^{-\lambda x}, \quad x \geq 0 \\ & 0,\quad\quad\quad x<0 \\ \end{aligned} \right., \end{split} \end{equation} we obtain \begin{flalign}\label{equ:Negative Exponential 1} &\int_{ - \infty }^{ + \infty } {{{\left( {f(x)} \right)}^{n + 1}}dx} = \int_0^{ + \infty } {{{\left( {\lambda {e^{ - \lambda x}}} \right)}^{n + 1}}dx} = {{{\lambda ^n}} \over {n + 1}}. \end{flalign} Substituting (\ref{equ:Negative Exponential 1}) in (\ref{equ:Normal d}), we obtain \begin{equation}\label{equ: Negative Exponential RMIM} l(X) = 1 + \sum\limits_{n = 1}^\infty {{{\left( { - 1} \right)}^n}{{{\lambda ^n}} \over {\left( {n + 1} \right)!}}} =\frac{1}{\lambda}(1-e^{-\lambda}). \end{equation} It is noted that \begin{flalign}\label{equ:Negative Exponential 2} \mathop {\lim }\limits_{\lambda \to 0} {1 \over \lambda }\left( {1 - {e^{ - \lambda }}} \right) = 1, \quad \mathop {\lim }\limits_{\lambda \to \infty} {1 \over \lambda }\left( {1 - {e^{ - \lambda }}} \right) = 0 \end{flalign} \section{Goodness of Fit} \label{sec:four} In this section, we will consider the problem of distribution goodness-of-fit in a continuous setting. Let $X_1,X_2,...X_n$ be a sequence of independent and identically distributed random variables, each having mean $\mu$ and variance $\sigma^2$. In practice, the real distribution is generally unknown and we usually use empirical distribution to substitute real distribution. Generally, the empirical distribution function is given by \begin{equation} \hat F_n(x)=\frac{1}{n}\sum\limits_{k=1}^n {I_{(X_k\leq x)}}, \end{equation} and the real distribution is $F(x)$ . One practical problem that can occur with this strategy is that how many samples is required for fitting the real distribution. Many literatures studied this problem by Kolmogorov-Smirnov statistic \cite{massey1951kolmogorov,lilliefors1967kolmogorov,Resnick1992Advantures}. When $n$ is big enough, the confidence limits for a cumulative distribution are given by \cite{Resnick1992Advantures}, \begin{equation} P\{D_n>d\}\approx 2\sum\limits_{k=1}^{\infty} {{(-1)}^{k-1}e^{-2nk^2d^2}}, \end{equation} where $D_n$ is error bound between empirical distribution and real distribution, called Kolmogorov-Smirnov statistic, which is defined as \begin{equation} D_n=\mathop {\sup}\limits_x {\left| \hat F_n (x)-F(x)\right|}, \end{equation} Though this result can describe the goodness of fit very well and guide us to choose the sampling numbers, we need to give two artificial criterions, the deviation value $d$ and the probability $ P\{D_n>d\}$, in order to determine $n$. In addition, this method do not take the message importance of samples into account, which makes the process of information collection not intuitionistic. In this paper, we consider this problem from the perspective of DMIM. Firstly, we define \begin{equation}\label{equ:XNX define} \gamma \left( n \right) ={{l\left( {\sum\limits_{i = 1}^n {{X_i}} } \right)} / {l(X)}} \end{equation} as relative importance of these $n$ sample points. According to central-limit theorem \cite{ross2014first}, when $n$ is big enough, $\sum\nolimits_{i =1}^n {{X_i}} $ approximately obeys normal distribution $N(n\mu,n\sigma^2)$. In fact, when $\sqrt{n}\sigma$ is not too small (such a condition is satisfied because $n$ is big enough), $l\left( {\sum\nolimits_{i = 1}^n {{X_i}} } \right) \approx {e^{ - {1 \over {2\sqrt {\pi n} \sigma }}}}$ according to (\ref{equ:normal jieduan 2}). Hence \begin{equation}\label{equ:XNX define 1} \gamma(n)={{{e^{ - {1 \over {2\sqrt {\pi n} \sigma }}}}} \over {l\left( X \right)}}. \end{equation} We find $\gamma(n)$ increases rapidly firstly, and then increases slowly by analyzing its monotonicity. Moreover, we obtain \begin{equation}\label{equ:XNX infty} \gamma(\infty)=\mathop {\lim }\limits_{n \to \infty } \gamma \left( n \right) = \mathop {\lim }\limits_{n \to \infty } {{{e^{ - {1 \over {2\sqrt {\pi n} \sigma }}}}} \over {l\left( X \right)}} = {1 \over {l\left( X \right)}}, \end{equation} which means $\gamma(n)$ reaches limit as $n \to \infty$. In fact, these two points are consistent with the characteristic of data fitting. Both $\gamma(n)$ and data fitting have the law of diminishing of marginal utility. Furthermore, the goodness of fit can not increase unboundedly and it reaches the upper bound when the number of sampling points approaches infinity. DMIM is bounded, while Shannon entropy and R{\'e}nyi entropy do not possess these characteristic. In conclusion, we adopt $\left| \gamma(\infty)-\gamma(n)\right|$ to describe the goodness of fit. \begin{thm}\label{thm:low bound number} $X_1,X_2,X_3,\dots,X_n$ are the $n$ sampling of a continuous random variable $X$, whose density is $f(x)$. If $\left| \gamma(\infty)-\gamma(n)\right| \leq \varepsilon$, we will obtain \begin{equation} P\left\{D_n>\sqrt{2\pi\sigma^2 \ln{\frac{19}{9\beta}}} \ln{\frac{1}{1-\varepsilon}}\right\} < \beta. \end{equation} \end{thm} \begin{proof} In fact, a upper bound of $ P\{D_n>d\}$ is given by \begin{flalign}\label{equ: up_bound sum} & P\left\{ {{D_n} > d} \right\} \approx 2\sum\limits_{k = 1}^\infty {{{\left( { - 1} \right)}^{k - 1}}{e^{ - 2n{k^2}{d^2}}}} \\ & = 2\sum\limits_{m = 1}^\infty {\left( {{e^{ - 2n{{\left( {2m - 1} \right)}^2}{d^2}}} - {e^{ - 2n{{(2m - 1 + 1)}^2}{d^2}}}} \right)} \tag{\theequation a}\label{equ: up_bound sum a}\\ & < 2\sum\limits_{m = 1}^\infty {{e^{ - 2n{{\left( {2m - 1} \right)}^2}{d^2}}}} \tag{\theequation b}\label{equ: up_bound sum c}\\ & \le 2\sum\limits_{m = 1}^\infty {{e^{ - 4n{d^2}\left( {2m - 1} \right) + 2n{d^2}}}} \tag{\theequation c}\label{equ: up_bound sum d}\\ & = 2\sum\limits_{m = 1}^\infty {{e^{ - 8n{d^2}m + 6n{d^2}}}} = {{2{e^{ - 2n{d^2}}}} \over {1 - {e^{ - 8n{d^2}}}}} .\tag{\theequation d}\label{equ: up_bound sum f} \end{flalign} (\ref{equ: up_bound sum c}) is obtained for the fact that ${e^{ - 2n{{(2m - 1 + 1)}^2}{d^2}}} > 0$. (\ref{equ: up_bound sum d}) requires $ - 2n{d^2}{\left( {2m - 1} \right)^2} \le - 4n{d^2}\left( {2m - 1} \right) + 2n{d^2}$. Such a condition is satisfied because $ - 2n{d^2}{\left( {2m - 1 - 1} \right)^2} \le 0$. This means, we only need to check ${{{e^{ - 2n{d^2}}}} \over {1 - {e^{ - 8n{d^2}}}}} \le \beta $ holds. Substituting (\ref{equ:XNX define 1}) and (\ref{equ:XNX infty}) in $\left| \gamma(\infty)-\gamma(n)\right| \leq \varepsilon$, we get \begin{equation}\label{equ:NMIM_number_1} \left| {{1 \over {l\left( X \right)}} - {{{e^{ - {1 \over {2\sqrt {\pi n} \sigma }}}}} \over {l\left( X \right)}}} \right| \le \varepsilon \Rightarrow n \ge {1 \over {4\pi {\sigma ^2}{{\ln }^2}\left( {1 - \varepsilon l\left( X \right)} \right)}}. \end{equation} Because $0\leq l(X) \leq 1$, we obtain \begin{equation}\label{equ:number_choose} n \ge {1 \over {4\pi {\sigma ^2}{{\ln }^2}\left( {1 - \varepsilon l\left( X \right)} \right)}} \ge {1 \over {4\pi {\sigma ^2}{{\ln }^2}\left( {1 - \varepsilon } \right)}}. \end{equation} Letting \begin{equation}\label{equ:NMIM_proof d} d=\sqrt{2\pi\sigma^2 \ln{\frac{19}{9\beta}}} \ln{\frac{1}{1-\varepsilon}}, \end{equation} we have \begin{flalign}\label{equ:NMIM_proof 1} 2n{d^2} &\ge 2{{2\pi {\sigma ^2}\ln {{19} \over {9\beta }}{{\ln }^2}(1 - \varepsilon )} \over {4\pi {\sigma ^2}{{\ln }^2}(1 - \varepsilon )}} \Rightarrow {e^{ - 2n{d^2}}} \le {{9\beta } \over {19}}. \end{flalign} It is easy to check \begin{equation}\label{equ:NMIM_proof 2} \beta {\left( {{e^{ - 2n{d^2}}}} \right)^4} +2 {e^{ - 2n{d^2}}} - \beta \le 0, \end{equation} when $\beta \le {{19} \over 9}\root 4 \of {{1 \over {19}}} \approx1.0112$. In fact, $\beta$ is a probability value, so we usually take $\beta \le 1$. Therefore, (\ref{equ:NMIM_proof 2}) holds all the time. Hence, \begin{equation} {2{{e^{ - 2n{d^2}}}} \over {1 - {e^{ - 8n{d^2}}}}} \le \beta . \end{equation} Based on the discussions above, we get \begin{equation} P\left\{D_n>\sqrt{2\pi\sigma^2 \ln{\frac{19}{9\beta}}} \ln{\frac{1}{1-\varepsilon}}\right\}< \beta. \end{equation} \end{proof} \begin{rem} Due to (\ref{equ:NMIM_proof d}), we obtain \begin{flalign}\label{equ:NMIM_proof relation} \varepsilon &= 1 - {e^{-d{{\left( {2\pi {\sigma ^2}\ln {{19} \over {9\beta }}} \right)}^{ - 1/2}}}}, \\ \beta &= {{19} \over 9}{e^{ - {{{d^2}} \over {2\pi {\sigma ^2}{{\ln }^2}(1 - \varepsilon )}}}} \tag{\theequation a}\label{equ:NMIM_proof relation a}. \end{flalign} Therefore, there is a ternary relation among $d$, $\beta$ and $\varepsilon$. If two of them are known, the third one can be obtained. \end{rem} \begin{rem} For arbitrary positive number $d$ and $\beta \le1$, one can always find a $\varepsilon_0$, which can be obtained by (\ref{equ:NMIM_proof relation}), when $\varepsilon \le \varepsilon_0$, $P\left\{ {{D_n} > d} \right\} < \beta $ holds. \end{rem} \begin{rem} When $\varepsilon$ tends zero, which means $n\to \infty$, at this time, $P\left\{D_n>0\right\}=0$. Therefore, the real distribution is equal to empirical distribution with probability $1$ as $\varepsilon \to 0$. That is, \begin{equation} \hat F_n(x) \to F(x) \quad as \quad \varepsilon \to 0. \end{equation} \end{rem} Actually, the DMIM deviation characterizes the process of collection information. With the growth of sampling number, the information gathers, and the empirical distribution approaches real distribution at the same time. In particular, when $n \to \infty$, all the information about the real distribution will be obtained. In this case, the empirical distribution is equal to real distribution, naturely. \begin{rem} For arbitrary continuous random variable with variance $\sigma^2$, if the max allowed DMIM deviation is $\varepsilon$, the sampling number must be bigger than $1/(4 \pi \sigma^2 \ln^2(1-\varepsilon) $ according to (\ref{equ:number_choose}). \end{rem} The sampling number only depends on one artificial criterion, the DMIM deviation, and the variance is the own attribute of the distribution. Furthermore, the sampling number has nothing to do with the distribution form. \section{Numerical Results} \label{sec:five} In this section, we present some numerical results to validate the above results in this paper. \subsection{The properties of DMIM} Fig. \ref{fig:normal_big_sigma_err2} shows relative error for approximation $e^{-1/(2\sqrt{\pi}\sigma)}$ and $1-1/(2\sqrt{\pi}\sigma)$ when $\sigma$ increases from $0.1$ to $10$. When $\sigma$ is not too small ( $\sigma>1$ for $e^{-1/(2\sqrt{\pi}\sigma)}$ and $\sigma>2$ for $1-1/(2\sqrt{\pi}\sigma)$), the relative error of both approximations is smaller than $1\%$. The relative error decreases with increasing of $\sigma$ for these two approximate values. When $\sigma<6.5$, the error of $e^{-1/(2\sqrt{\pi}\sigma)}$ is smaller than that of $1-1/(2\sqrt{\pi}\sigma)$ and the opposite is true when $\sigma>6.5$. In summary, $e^{-1/(2\sqrt{\pi}\sigma)}$ is a good approximation when $\sigma$ is not too small and $1-1/(2\sqrt{\pi}\sigma)$ is an excellent approximation when $\sigma$ is big enough. \begin{figure} \centerline{\includegraphics[width=8.0cm]{normal_big_sigma_err_cof.eps}} \caption{Relative error vs. $\sigma$.}\label{fig:normal_big_sigma_err2} \end{figure} Fig. \ref{fig:smae_var} shows the DMIM of uniform distribution, Gauss distribution and negative exponential distribution when the variance increases from $0.1$ to $100$. It can be observed that the DMIM is subject to the variance. The DMIM increases with the increasing of variance for these three distributions. Among them, the DMIM in Gauss distribution is the largest and that in negative exponential distribution is the smallest. \begin{figure} \centerline{\includegraphics[width=8.0cm]{same_var1.eps}} \caption{DMIM $l(X)$ vs. Variance.}\label{fig:smae_var} \end{figure} \subsection{Goodness of fit by DMIM} Next we focus on conducting Monte Carlo simulation by computer to validate our results about goodness of fit. The samples are independent identically distributed, each having variance $\sigma^2$. $\sigma$ is $1$ or $2$. $\lambda=1/\sigma$ in negative exponential distribution, and the density of uniform distribution is $1/(2\sqrt{3}\sigma)$. The mean of normal distribution and uniform distribution is zero. The DMIM deviation $\varepsilon$ is varying from $0.001$ to $0.1$. For each value of $\varepsilon$, the simulation is repeated $10000$ times. Fig. \ref{fig:Number_normal} shows the relationship between the probability of error bound $P\{D>d\}$ and DMIM deviation $\varepsilon$. Some observations can be obtained. The result that the goodness of fit is controlled by the DMIM deviation is true. That is, the probability of error bound decreases with the decreasing of DMIM deviation. In fact, this process can be divided into three phases. In phase one, in which $\varepsilon$ is very small (e.g. $\varepsilon<10^{-2.8}$ when $d=0.01$ and $\sigma=1$), $P\{D>d\}$ is close to zero. In phase two, $\varepsilon$ is neither too small nor too large (e.g. $10^{-2.8}<\varepsilon<10^{-2}$ when $d=0.01$ and $\sigma=1$). In this case, $P\{D>d\}$ increases rapidly from zero to one. In the third phase, in which $\varepsilon$ is large (e.g. $\varepsilon>10^{-2}$ when $d=0.01$ and $\sigma=1$), $P\{D>d\}$ approaches one. When $d=0.01$ and $\sigma=1$, $P\{D>d\}$ in these three distributions is very close to each other, whose upper bound is indeed $\beta$ (obtained by (\ref{equ:NMIM_proof relation a})). For the same distribution, if the standard deviation is the same, $P\{D>d\}$ will decrease with increasing of $d$ when $P\{D>d\}<1$. Furthermore, for the same $d$, the probability of error bound increases with increasing of the given standard deviation. \begin{figure} \centerline{\includegraphics[width=8.0cm]{Number_K10000_distribution.eps}} \caption{Probability of error bound $P\{D>d\}$ vs. DMIM deviation $\varepsilon$.}\label{fig:Number_normal} \end{figure} \section{Conclusion} \label{sec:six} In this paper, we discussed the distribution goodness-of-fit in the view of information collection, where the message importance is taken into account. Similar to differential entropy, DMIM was proposed as an measure of message importance for continuous random variable to help us describe the information flows during sampling. Then, uniform, normal and negative exponential distribution were discussed as typical examples, and high-precision approximate values for DMIM of normal distribution were given. Finally, we proved that the divergence between the empirical distribution and the real distribution is controlled by the DMIM deviation. Compared with Kolmogorov-Smirnov test, the new method based on DMIM gives us another viewpoint of information collection because it visually shows the information flow with the increasing of sampling points, which helps us to design sampling strategy for the actual system of big data.
\section{Introduction} \label{sec:intro} Trust is essential for seamless human-robot collaboration and user adoption of autonomous systems, such as robot assistants. Over-trusting robot autonomy may lead to misuse of such systems, where people rely excessively on automation, failing to intervene in the case of critical failures~\citep{lee2004trust}. On the other hand, lack of trust leads to disuse of autonomous systems: users ignore the systems' capabilities, with negative effects on overall performance. We witnessed an example of users' distrust in the system in one of our studies, where a human participant and a robot collaborated to clear a table (\figref{fig:front}). Although the robot was fully capable of handling all objects on the table, inexperienced participants did not trust that the robot was able to succeed and stopped the robot from moving the wine glass, since they were afraid that the glass may fall and break. It was clear that their trust was poorly calibrated with respect to the robot's true capabilities. This, in turn, had a significant effect on the interaction. \begin{figure}[t] \centering \includegraphics[width=0.8\linewidth]{figs/task_images/green_glass_intervene.jpg} \caption{ A robot and a human collaborate to clear a table. The human, with low initial trust in the robot, intervenes to stop the robot from moving the wine glass. } \label{fig:front} \end{figure} This study revealed that, in order to achieve fluent human-robot collaboration, the robot should \emph{monitor} human trust and \emph{influence} it so that it matches the system's capabilities. In our study, for instance, the robot should build human trust first by acting in a trustworthy manner, before going for the wine glass. We propose a trust-based computational model of robot decision making: Since trust is not fully observable, we model it as a latent variable in a partially observable Markov decision process (POMDP)~\citep{KaeLit98}. Our trust-POMDP model contains two key components: (i) a trust dynamics model, which captures the evolution of human trust in the robot, and (ii) a human decision model, which connects trust with human actions. Our POMDP formulation can accommodate a variety of trust dynamics and human decision models. Here, we adopt a data-driven approach and learn these models from data. \begin{figure*}[t!] \setlength \tabcolsep{0pt} \captionsetup[subfigure]{labelformat=empty} \captionsetup[subfigure]{width=0.68\columnwidth} \captionsetup[subfigure]{justification=justified,singlelinecheck=false} \centering \begin{tabular}{ccccc|c} \begin{subfigure}[b]{.13\linewidth} \centering \begin{tabular}{cc} \\ \includegraphics[width=0.9\linewidth]{figs/b0_behaviors.pdf}\\ \includegraphics[width=0.85\linewidth]{figs/fr1usr1.pdf} \\ \\ \\ \includegraphics[width=0.85\linewidth]{figs/fr1usr2.pdf} \end{tabular} \label{fig:plotT0} \end{subfigure} & \begin{subfigure}[b]{.13\linewidth} \centering \begin{tabular}{cc} \\ \includegraphics[width=0.9\linewidth]{figs/b1_behaviors.pdf}\\ \includegraphics[width=0.85\linewidth]{figs/fr2usr1.pdf} \\ \\ \\ \includegraphics[width=0.85\linewidth]{figs/fr2usr2.pdf} \end{tabular} \label{fig:plotT1} \end{subfigure} & \begin{subfigure}[b]{.13\linewidth} \centering \begin{tabular}{cc} \fontsize{7}{5}\selectfont \textbf{Trust-POMDP} \\ \includegraphics[width=0.9\linewidth]{figs/b2_behaviors.pdf}\\ \includegraphics[width=0.85\linewidth]{figs/fr3usr1.pdf} \\ \\ \fontsize{7}{5}\selectfont \textbf{Myopic\xspace}\\ \includegraphics[width=0.85\linewidth]{figs/fr3usr2.pdf} \end{tabular} \label{fig:plotT2} \end{subfigure} & \begin{subfigure}[b]{.13\linewidth} \centering \begin{tabular}{cc} \\ \includegraphics[width=0.9\linewidth]{figs/b3_behaviors.pdf}\\ \includegraphics[width=0.85\linewidth]{figs/fr4usr1.pdf} \\ \\ \\ \includegraphics[width=0.85\linewidth]{figs/fr4usr2.pdf} \end{tabular} \label{fig:plotT3} \end{subfigure} & \begin{subfigure}[b]{.13\linewidth} \centering \begin{tabular}{cc} \\ \includegraphics[width=0.9\linewidth]{figs/b4_behaviors.pdf}\\ \includegraphics[width=0.85\linewidth]{figs/fr5usr1.pdf} \\ \\ \\ \includegraphics[width=0.85\linewidth]{figs/fr5usr2.pdf} \end{tabular} \label{fig:plotT4} \end{subfigure} & \begin{subfigure}[c]{.35\linewidth} \centering \includegraphics[width=0.67\linewidth]{figs/task_images/green_glass_intervene.jpg}\\ ~\\ \subcaption{ \mycircle{green} \hskip 14pt Bottle \\ \mytriangle{red} \hskip 14pt Can\\ \mysquare{blue} \hskip 14pt Glass } \label{fig:plotT5} \end{subfigure} \end{tabular} \caption{Sample runs of the trust-POMDP strategy and the myopic\xspace strategy on a collaborative table-clearing task. The top row shows the probabilistic estimates of human trust over time on a 7-point Likert scale. The trust-POMDP strategy starts by moving the plastic bottles to build trust ($T=1,2,3$) and moves the wine glass only when the estimated trust is high enough ($T=5$). The myopic\xspace strategy does not account for trust and starts with the wine glass, causing the human with low initial trust to intervene ($T=1$).} \label{fig:behaviors} \end{figure*} Although prior work has studied human trust elicitation and modeling~\citep{lee1992trust,Floyd2015,xu2015optimo,wang2016trust}, we close the loop between trust modeling and robot decision-making. The trust-POMDP enables the robot to systematically infer and influence the human collaborator's trust, and leverage trust for improved human-robot collaboration and long-term task performance. Consider again the table clearing example (\figref{fig:behaviors}). The trust-POMDP strategy first removes the three plastic water bottles to build up trust and only attempts to remove the wine glass afterwards. In contrast, a baseline myopic strategy maximizes short-term task performance and does not account for human trust in choosing the robot actions. It first removes the wine glass, which offers the highest reward, resulting in unnecessary interventions by human collaborators with low initial trust. We validated the trust-POMDP model through human subject experiments on the collaborative table-clearing task, both online in simulation (201 participants) and with a real robot (20 participants). Compared with the myopic strategy, the trust-POMDP strategy significantly reduced participants' intervention rate, indicating improved team collaboration and task performance. In these experiments the robot always succeeded. Robots, however, fail frequently. What if the robot is likely to \emph{fail} when picking up the wine glass? The robot should then assess human trust in the beginning of the task; if trust is too high, the robot should effectively \emph{communicate} this to the human, in order to calibrate human trust to the appropriate level. While human teammates are able to use natural language to communicate expectations~\cite{mathieu2000influence}, our assistive robotic arm does not have verbal communication capabilities. The trust-POMDP strategy in this case enables the robot to modulate human trust by \emph{intentionally failing} when picking up the bottles, before attempting to grasp the wine glass. This prompts the human to intervene when the robot attempts to pick up the wine glass, preventing failure. This paper builds upon our previous work~\cite{chen2018planning} by introducing robot failures into the computational framework. In particular, (i) we augment the dynamics model with robot failures, add a new session of data collection to learn the model and discuss the effect of failures on different levels of trust; (ii) we simulate and visualize robot policies with the learned model; (iii) we provide an analysis of the results in the case of an adaptive policy that enables the robot to assess participants' initial trust and intentionally fail. Integrating trust modeling and robot decision making enables robot behaviors that leverage human trust and actively \emph{modulate} it for seamless human-robot collaboration. Under the trust-POMDP model, the robot deliberately chooses to fail in order to reduce the trust of an overly trusting user and achieve better task performance over the long term. Further, embedding trust in a reward-based POMDP framework makes our robot task-driven: when the human collaboration is unnecessary, the robot may set aside trust building and act to maximize the team task performance directly. All these diverse behaviors emerge automatically from the trust-POMDP model, without explicit manual robot programming. \section{Related work} \label{sec:background} Trust has been studied extensively in the social science research literature~\citep{golembiewski1975centrality, kramer1995trust}, with Mayer et al., suggesting that three general levels summarize the bases of trust: ability, integrity, and benevolence~\citep{mayer1995integrative}. Trust in automation differs from trust between people in that automation lacks intentionality~\citep{lee2004trust}. Additionally, in a human-robot collaboration task, human and robot share the same objective metric of task performance. Therefore, similar to previous work~\citep{desai2012modeling, xu2016towards, pierson2016adaptive, pippin2014trust,wang2016trust}, we assume that human teammates will not expect the robot to deceive them on purpose, and their trust will depend mainly on the \em perceived robot ability \em to complete the task successfully. Binary measures of trust~\citep{hall1996trusting}, as well as continuous measures~\citep{lee1992trust, desai2012modeling, xu2016towards}, and ordinal scales~\citep{muir1990operators, hoffman2013evaluating} have been proposed. For real-time measurement, ~\citet{desai2012modeling} proposed the Area Under Trust Curve (AUTC) measure, which was recently used to account for one's entire interactive experience with the robot~\citep{yang2017}. Researchers have also studied the temporal dynamics of trust conditioned on the task performance: \citet{lee1992trust} proposed an autoregressive moving average vector form of time series analysis; \citet{Floyd2015} used case-based reasoning; \citet{xu2015optimo} proposed an online probabilistic trust inference model to estimate a robot's trustworthiness; \citet{wang2016trust} showed that adding transparency in the robot model by generating explanations improved trust and performance in human teams; \citet{desai2013impact,desai2012effects} showed that robot failures had a negative impact on human trust, and early robot failures led to dramatically lower trust than later robot failures. While previous works have focused on either quantifying trust or studying the dynamics of trust in human-robot interaction, our work enables the robot to leverage upon a model of human trust and choose actions to maximize task performance. In human-robot collaborative tasks, the robot often needs to reason over the human's hidden mental state in its decision-making. The POMDP provides a principled general framework for such reasoning. It has enabled robotic teammates to coordinate through communication~\citep{barrett2014communicating} and software agents to infer the intention of human players in game AI applications~\citep{macindoe2012pomcop}. The model has been successfully applied to real-world tasks, such as autonomous driving where the robot car interacts with pedestrians and human drivers~\citep{bai2015intention, bandyopadhyay2013intention,galceran2015multipolicy}. When the state and action space of the POMDP model become continuous, one can use hindsight optimization~\citep{javdani2015shared}, or value of information heuristics~\citep{sadigh2016planning}, which generate approximate solutions but are computationally more efficient. \citet{nikolaidis2015efficient} proposed to infer the human type or preference online using models learned from joint-action demonstrations. This formalism recently extended from one-way adaptation (from robot to human) to human-robot \em mutual \em adaptation~\citep{nikolaidis2016formalizing,nikolaidis2017formalizing}, where the human may choose to change their preference and follow a policy demonstrated by the robot in the recent history. In this work, we provide a general way to link the whole interaction history with the human policy, by incorporating human trust dynamics into the planning framework. \section{Trust-POMDP} \label{sec:trust-POMDP} \subsection{Human-robot team model} \label{subsec:humanrobotteam} We formalize the human-robot team as a Markov Decision Process (MDP), with world state $\x{} \in \ensuremath{X}$, robot action $\ar{} \in \AR$, and human action $\ah{} \in \AH$. The system evolves according to a probabilistic state transition function $p(\x{}'|\x{},\ar{},\ah{})$ which specifies the probability of transitioning from state $\x{}$ to state $\x{}'$ when actions $\ar{} \text{ and }\ah{}$ are applied in state $\x{}$. After transitioning, the team receives a real-valued reward $\rwd{}(\x{},\ar{},\ah{}, \x{}')$, which is constructed to elicit the desirable team behaviors. We denote by \allowbreak $h_t = \{ \x{0}, \ar{0}, \ah{0}, \x{1}, \rwd{1}, \hdots, \x{t-1}, \ar{t-1}, \ah{t-1}, \x{t}, \rwd{t} \} $ $ \in H_t$ as the history of interaction between robot and human until time step $t$. In this paper, we assume that the human observes the robot's current action and then decides their own action. In the most general setting, the human uses the entire interaction history $h_t$ to decide the action. Thus, we can write the human's (possibly stochastic) policy as $\policy{\human}\xspace(\ah{t} | \x{t}, \ar{t}, h_t)$ which outputs the probability of each human action $\ah{t}$. Given a robot policy $\policy{\robot}\xspace$, the \emph{value}, \textit{i.e.}, the expected total discounted reward of starting at a state $\x{0}$ and following the robot and human policies is \begin{equation} v(\x{0}|\policy{\robot}\xspace, \policy{\human}\xspace) = \underset{\ar{t} \sim \policy{\robot}\xspace, \ah{t} \sim \policy{\human}\xspace} {\mathbb{E}}~ \sum_{t=0}^{\infty} \gamma^t \rwd{}(\x{t},\ar{t},\ah{t}), \end{equation} and the robot's optimal policy \ensuremath{\policy{\robot}_{*}}\xspace can be computed as \begin{equation} \ensuremath{\policy{\robot}_{*}}\xspace = \underset{\policy{\robot}\xspace}{\argmax}~ v(\x{0}|\policy{\robot}\xspace, \policy{\human}\xspace). \end{equation} In our case, however, the robot does not know the human policy in advance. It computes the optimal policy under expectation over the human policy: \begin{equation} \ensuremath{\policy{\robot}_{*}}\xspace = \underset{\policy{\robot}\xspace}{\argmax}~ \underset{\policy{\human}\xspace}{\mathbb{E}} v(\x{0}|\policy{\robot}\xspace, \policy{\human}\xspace). \label{eq:MAMDP} \end{equation} Key to solving \equref{eq:MAMDP} is for the robot to model the human policy, which potentially depends on the entire history $h_t$. The history $h_t$ may grow arbitrary long and make the optimization extremely difficult. \subsection{Trust-dependent human behaviors} \label{subsec:humanmodel} Our insight is that in a number of human-robot collaboration scenarios, \emph{trust is a compact approximation of the interaction history~$h_t$}. This allows us to condition human behavior on the inferred trust level and in turn find the optimal policy that maximizes team performance. Following previous work on trust modeling~\citep{xu2015optimo}, we assume that trust can be represented as a single scaler random variable $\trust{}$. Thus, the human policy is rewritten as \begin{equation} \policy{\human}\xspace(\ah{t} | \x{t}, \ar{t}, \trust{t}) = \policy{\human}\xspace(\ah{t} | \x{t}, \ar{t}, h_t). \end{equation} \subsection{Trust dynamics} \label{subsec:trust-performance} Human trust changes over time. We adopt a common assumption on the trust dynamics: trust evolves based on the robot's {performance} $\perf{t}$~\cite{lee1992trust,xu2015optimo}. Performance can depend not just on the current and transitioned world state but also the human and robot's actions \begin{equation} \perf{t+1} = \texttt{performance}(\x{t+1}, \x{t}, \ar{t}\xspace, \ah{t}\xspace). \end{equation} For example, \texttt{performance} may indicate success or failure of the robot to accomplish a task. This allows us to write our trust dynamics equation as \begin{align} \trust{t+1} \sim p(\trust{t+1}|\trust{t},\perf{t+1}) \label{eq:trustdynb}. \end{align} We detail in \secref{sec:learntrust} how trust dynamics is learned via interaction. \subsection{Maximizing team performance} \label{subsec:trustplanning} Trust cannot be directly observed by the robot and therefore must be inferred from the human's actions. In addition, armed with a model, the robot may actively modulate the human's trust for the team's long-term reward. We achieve this behavior by modeling the interaction as a partially observable Markov decision process (POMDP), which provides a principled general framework for sequential decision making under uncertainty. A graphical model of the Trust-POMDP and a flowchart of the interaction are shown in \figref{fig:trustplanning}. To build trust-POMDP, we create an augmented state space with the augmented state $s = (\x{}, \trust{})$ composed of the fully-observed world state $\x{}$ and the \emph{partially-observed} human trust $\trust{}$. We maintain a belief $b$ over the human's trust. The trust dynamics and human behavioral policy are embedded in the transition dynamics of trust-POMDP. We describe in \secref{sec:learntrust} how we learn the trust dynamics and the human behavioral policy. The robot now has two distinct objectives through its actions: \begin{itemize} \item \emph{Exploitation.} Maximize the team's reward \item \emph{Exploration.} Reveal and change the human's trust so that future actions are rewarded better. \end{itemize} \begin{figure}[t] \centering \includestandalone{figs/trust_model} \hspace{3cm} \includestandalone{figs/trust_flowchart} \caption{ The trust-POMDP graphical model (left) and the team interaction flowchart (right). The robot's action $a^R_t$ depends on the world state $\x{t}$ and its belief over trust $\trust{t}$. } \label{fig:trustplanning} \end{figure} The solution to a Trust-POMDP is a policy that maps belief states to robot actions, \textit{i.e.}, $\ar{} = \policy{\robot}\xspace(b_t, x_t)$. To compute the optimal policy, we use the SARSOP algorithm~\citep{kurniawati2008sarsop}, which is computationally efficient and has been previously used in various robotic tasks~\citep{bandyopadhyay2013intention}. \section{Learning Trust Dynamics and Human Behavioral Policies} \label{sec:learntrust} Nested within the trust-POMDP is a model of human trust dynamics \allowbreak $p(\trust{t+1}|\trust{t}, \perf{t+1})$, and behavioral policy $\policy{\human}\xspace(\ah{t} | \x{t}, \ar{t}, \trust{t})$. We adopted a data-driven approach and built the two models for the table clearing task from data collected in an online AMT experiment. Suitable probabilistic models derived via alternative approaches can be substituted for these learned models (\textit{e.g.}, for other tasks and domains). \subsection{Data Collection} \label{subsec:DataCollection} \noindent\textbf{Table clearing task.} A human and a robot collaborate to clear objects off a table. The objects include three water bottles, one fish can, and one wine glass. At each time step, the robot picks up one of the remaining objects. Once the robot starts moving towards the intended object, the human can choose between two actions: \{intervene and pick up the object that the robot is moving towards, stay put and let the robot pick the object by itself\}. This process is repeated until all the objects are cleared from the table. Each object is associated with a different reward, based on whether the robot successfully clears it from the table (which we call SP-success), the robot fails in clearing it (SP-fail), or the human intervenes and puts it on the tray (IT). Table~\ref{table:table-clearing-payoff} shows the rewards for each object and outcome. We assume that a robot success is always better than a human intervention, since it reduces human effort. Additionally, there is no penalty if the robot fails by dropping one of the sealed water bottles, since the human can pick it up. On the other hand, dropping the fish can result in some penalty, since its contents will be spilled on the floor. Breaking the glass results in the highest penalty. We see that staying put when the robot attempts to pick up the bottle has the lowest risk, since there is no penalty if the robot fails. On the other hand, staying put in the case of the glass object has the largest risk-return trade off. We expect the human to let the robot pick up the bottle even if their trust is low, since there is no penalty if the robot fails. On the other hand, if the human does not trust the robot, we expect them to likely intervene on glass or can, rather than risking a high penalty in case of robot failure. In this work, we choose the table clearing task to test our trust-POMDP model, because it is simple and allows us to analyze experimentally the core technical issues on human trust without interference from confounding factors. Note that the primary objective and contribution of this work are to develop a mathematical model of trust embedded in a decision framework, and to show that this model improves human robot collaboration. In addition, we believe that the overall technical approach in our work is general and not restricted to this particular simplified task. What we learned here on the trust-POMDP for a simplified task will be a stepstone towards more complex, large-scale applications. \noindent\textbf{Participants.} For the data collection, we recruited in total $231$ participants through Amazon's Mechanical Turk (AMT)~\footnote{We conducted two sessions of data collection, one where the robot always succeeded and one when the robot failed with high probability. Our previous work~\cite{chen2018planning} presents the results of the first session only.}. The participants are all from United States, aged 18-65 and with approval rate higher than $95\%$. Each participant was compensated $\$1$ for completing the study. To ensure the quality of the recorded data, we asked all participants an attention check question that tested their attention to the task. We removed $9$ data points either because the participants failed on the attention check question or the their data were incomplete. This left us $222$ valid data points for model learning. \newcommand{\specialcell}[2][c]{% \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}} \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{R}{>{\raggedleft\arraybackslash}p{2cm}} \newcolumntype{L}{>{\raggedright\arraybackslash}p{1cm}} \begin{table} \caption{The reward function $R$ for the table-clearing task.} \label{table:table-clearing-payoff} \begin{tabular}{L R R R } \hline \hline &Bottle & Fish Can & Wine Glass \\ \hline \specialcell{SP-success} & $1$ & $2$ & $3$ \\ \specialcell{SP-fail} & $0$ & $-4$ & $-9$ \\ \specialcell{IT} & $0$ & $0$ & $0$ \\ \hline \end{tabular} \end{table} \noindent\textbf{Procedure.} Each participant is asked to perform an online table clearing task together with a robot. Before the task starts, the participant is informed of the reward function in~\tabref{table:table-clearing-payoff}. We first collect the participant's initial trust in the robot. We used Muir's questionnaire~\citep{muir1990operators}, with a seven-point Likert scale as a human trust metric, \textit{i.e.}, trust ranges from $1$ to $7$. The Muir's questionnaire we used is listed in~\tabref{table:muir}. At each time step, the participant watches a video of the robot attempting to pick up an object, and are asked to choose to intervene or stay put. They then watch a video of either the robot picking up the object, or them intervening based on their action selection. Then, they report their updated trust in the robot. \begin{table} \caption{Muir's questionnaire.} \label{table:muir} \begin{tabular}{ l } \hline \hline 1. To what extent can the robot's behavior be predicted from\\ moment to moment? \\ 2. To what extent can you count on the robot to do its job? \\ 3. What degree of faith do you have that the robot will be able\\ to cope with similar situations in the future? \\ 4. Overall how much do you trust the robot? \\ \hline \end{tabular} \end{table} We are interested in learning the trust dynamics and the human behavioral policies for any state and robot action. However, the number of open-loop~\footnote{When collecting data from AMT, the robot follows an open-loop policy, \textit{i.e.}, it does not adapt to the human behavior.} robot policies is $O(K!)$, where $K$ is the number of objects on the table. In order to focus the learning on a few interesting robot policies (i.e. picking up the glass in the beginning vs in the end), while still covering a large space of policies, we split the data collection process, so that in one half of the trials the robot randomly chooses a policy out of a set of pre-specified policies, while in the other half the robot follows a random policy. \noindent\textbf{Data Format.} The data we collected from each participant has the following format: \begin{align*} d_i = \{ \trust{0}^\textrmsmall{M}, a^{\textrmsmall{R}}_0, a^{\textrmsmall{H}}_0, \perf{1}, \trust{1}^{\textrmsmall{M}}, \hdots, a^{\textrmsmall{R}}_{K-1}, a^{\textrmsmall{H}}_{K-1}, \perf{K}, \trust{K}^{\textrmsmall{M}}\} \end{align*} where $K$ is the number of objects on the table. $\trust{t}^{\textrmsmall{M}}$ is the estimated human trust at time $t$ by averaging the participants' responses to the Muir's questionnaire to a single rating between 1 and 7. $a^{\textrmsmall{R}}_t$ is the action taken by the robot at time step $t$. $a^{\textrmsmall{H}}_t$ is the action taken by the human at time step $t$. $\perf{t+1}$ is the performance of the robot that indicates whether the robot succeeded at picking up the object, the robot failed, or the human intervened. \subsection{Trust dynamics model} \label{subsec:trust-dynamics} We model human trust evolution as a linear Gaussian system. Our trust dynamics model relates the human trust causally to the robot task performance $\perf{t+1}$. \begin{align} & P(\trust{t+1} | \trust{t}, \perf{t+1}) = \mathcal{N} (\alpha_{\perf{t+1}} \trust{t} + \beta_{\perf{t+1}}, \sigma_{\perf{t+1}}) \\ & \trust{t}^M \sim \mathcal{N} (\trust{t}, \sigma^2) \ , \ \trust{t+1}^M \sim \mathcal{N} (\trust{t+1}, \sigma^2) \end{align} where $\mathcal{N}(\mu, \sigma)$ denotes a Gaussian distribution with mean $\mu$ and standard deviation $\sigma$. $\alpha_{\perf{t+1}}$ and $\beta_{\perf{t+1}}$ are linear coefficients for the trust dynamics, given the robot task performance $\perf{t+1}$. In the table clearing task, $\perf{t+1}$ indicates whether the robot succeeded at picking up an object, the robot failed, or the human intervened, \textit{e.g.}, $\perf{t+1}$ can represent that the robot succeeded at picking a water bottle, or that the human intervened at the wine glass. $\trust{t}^M$ and $\trust{t+1}^M$ are the observed human trust (Muir's questionnaire) at time step $t$ and time step $t+1$. The unknown parameters in the trust dynamics model include $\alpha_{\perf{t+1}}$, $\beta_{\perf{t+1}}$, $\sigma_{\perf{t+1}}$ and $\sigma$. We performed full Bayesian inference on the model through Hamiltonian Monte Carlo sampling using the Stan probabilistic programming platform~\cite{carpenter2016stan}. \figref{fig:trustdyna} shows the trust transition matrices for all possible robot performance in the table clearing task. As we can see, human trust in the robot gradually increased with observations of successful robot actions (as indicated by transitions to higher trust levels when the participants stayed put and robot succeeded), while it decreased with observations of robot failures. Trust tended to remain constant or decrease slightly when interventions occurred. It also appears that that the higher the trust, the greater the loss upon failure, and vice versa upon success. These results matched our expectations that successful robot performance positively influenced trust, while robot failures negatively affected trust. \begin{figure \centering \resizebox{\columnwidth}{!} {\includegraphics{figs/trust_dynamics_all.pdf}} \caption{ Trust transition matrices, which represent the change of trust given the robot performance, shown by the linearly regressed line (yellow) contrasted with the X-Y line (blue). In general, trust stays constant or decreases slightly when the human intervenes (top row). It increases when the human stays put and the robot succeeds (middle row), while it decreases when the robot fails (bottom row). } \label{fig:trustdyna} \end{figure} \subsection{Human behavioral policies} \label{subsec:human-behavioral-prediction} Our key intuition in the human model is that human's behavior depends on the trust in the robot. To support our intuition, we consider two types of human behavioral models. The first model is a trust-free human behavioral model that ignores human trust, while the second is a trust-based human behavioral model that explicitly models human trust. In both human models, we assume humans follow the \em softmax rule \em~\footnote{According to the \em softmax rule \em, the human's decision of which action to take is determined probabilistically on the actions' relative expected values.} when they make decisions in an uncertain environment~\citep{daw2006cortical}. More explicitly, \begin{itemize} \item Trust-free human behavioral model: At each time step, the human selects an action probabilistically based on the actions' relative expected values. The expected value of an action depends on the human's belief on the robot to succeed and the risk of letting robot to do the task. In the trust-free human model, the human's belief on the robot success on a particular task does not change over time. \item Trust-based human behavioral model: Similar to the model above, the human follows the \em softmax rule \em at each time step. However, the trust-based human model assumes that human's belief on the robot success changes over time, and it depends on human's trust in the robot. \end{itemize} Before we introduce the models, we start with some notations. Let $j$ denote the object that the robot tries to pick at time step $t$. Let $r_j^{\textrmsmall{S}}$ be the reward if the human stays put and the robot succeeds, and $r_j^{\textrmsmall{F}}$ be the reward if the human stays put and the robot fails. Let $\trust{t}$ be the human trust in the robot at time step $t$. $\mathcal{S}(x) = \frac{1}{1 + \mathrm{e}^{-x}}$ is the sigmoid function, which is equivalent to the softmax function in the case of binary human actions. $\mathcal{B}(p)$ is the Bernoulli distribution that takes action stay put with probability $p$. The trust-free human behavioral model is as follows, \begin{align} & P_t = \mathcal{S}(b_j r_j^{\textrmsmall{S}} + (1 - b_j) r_j^{\textrmsmall{F}}) \\ & a_t^{\textrmsmall{H}} \sim \mathcal{B}(P_t) \end{align} where, $b_j$ is the human's belief on the robot successfully picking up object $j$, and it remains constant. $0 < P_t < 1$ is the probability that human stays put at time step $t$. $a_t^{\textrmsmall{H}}$ is the action human taken at time step $t$. Next, we introduce the trust-based human behavioral model: \begin{align} & b^t_j = \mathcal{S}(\gamma_j \trust{t} + \eta_j) \\ & P_t = \mathcal{S}(b^t_j r_j^{\textrmsmall{S}} + (1 - b^t_j) r_j^{\textrmsmall{F}}) \\ & \trust{t}^{M} \sim \mathcal{N}(\trust{t}, \sigma^2) \ , \ a_t^{\textrmsmall{H}} \sim \mathcal{B}(P_t) \end{align} where $b^t_j$ is the human's belief on robot success on object $j$ at time step $t$, and it depends on the human's trust in the robot. $\gamma_j$ and $\eta_j$ are the linear coefficients for object $j$. $0 < P_t < 1$ is the probability that the human stays put at time step $t$. $\trust{t}^{M}$ is the observed human trust from Muir's questionnaire at time step $t$, and we assume it follow a Gaussian distribution with mean $\trust{t}$ and standard deviation $\sigma$. $a_t^{\textrmsmall{H}}$ is the action human taken at time step $t$. The unknown parameters here include $b_j$ in the trust-free human model, and $\gamma_j$, $\eta_j$, $\sigma$ in the trust-based human model. We performed Bayesian inference on the two models above using Hamiltonian Monte Carlo sampling~\cite{carpenter2016stan}. The trust-based human model (log-likelihood $= -153.37$) fit the collected AMT data better than the trust-free human model (log-likelihood $= -156.40$). The log-likelihood values are relatively low in both two models due to the large variance among different users. Nevertheless, this result supports our notion that the prediction on human behavior is improved when we explicitly model human trust. \begin{figure}[t!] \centering \resizebox{0.8\columnwidth}{!} {\includegraphics{figs/humanpolicy-crop.pdf}} \caption{ The model prediction on the mean of human intervention rate with respect to trust. Under the trust-free human behavioral model, which does not account for trust, the human intervention rate stays constant. Under the trust-based human behavioral model, the intervention rate decreases with increasing trust. The rate of decrease depends on the object; it is more sensitive to the risker objects. } \label{fig:humanpoly} \end{figure} \figref{fig:humanpoly} shows the mean probability of human interventions with respect to human's trust in the robot. For both models, the human tends to intervene more on objects with higher risk, \textit{i.e.}, the human intervention rate on glass is higher than can, which is again higher than bottle. The trust-free human behavioral model ignores human trust, thus the human intervention rate does not change. On the other hand, the trust-based human behavioral model has a general falling trend, which indicates that participants are less likely to intervene when their trust in the robot is high. This is observed particularly for the highest-risk object (glass), where the object intervention rate drops significantly when human trust score is maximum. To summarize, the results of Sec.~\ref{subsec:trust-dynamics} and \secref{subsec:human-behavioral-prediction} indicate that \begin{itemize} \item Human trust is affected by robot performance: human trust can be built up by successfully picking up objects (\figref{fig:trustdyna}). In addition, it is a good strategy for the robot to start with low risk objects (bottle), since the human is less likely to intervene even if the trust in the robot is low (\figref{fig:humanpoly}). \item Human trust affects human behaviors: the intervention rate on the high risk objects could be reduced by building up human trust (\figref{fig:humanpoly}). \end{itemize} \section{Experiments} \label{sec:experiment} We conducted two human subjects experiments, one on AMT with human participants interacting with recorded videos and one in our lab with human participants interacting with a real robot. The purpose of our study was to test whether the trust-POMDP robot policy would result in better team performance than a policy that did not account for human trust. To simplify the analysis of the different behaviors in these experiments, we had the robot always succeed when attempting to pick up the objects. We had two experimental conditions, which we refer to as ``trust-POMDP'' and ``myopic\xspace''. \begin{itemize} \item In the trust-POMDP condition, the robot uses human trust as a means to optimize the long term team performance. It follows the policy computed from the trust-POMDP described in ~\secref{subsec:trustplanning}, where the robot's perceived human policy is modeled via the trust-based human behavioral model described in~\secref{subsec:human-behavioral-prediction}. \item In the myopic\xspace condition, the robot ignores human trust. It follows a myopic policy by optimizing \equref{eq:MAMDP}, where the robot's perceived human policy is modeled via the trust-free human behavioral model described in~\secref{subsec:human-behavioral-prediction}. \end{itemize} \subsection{Online AMT experiment} \noindent\textbf{Hypothesis 1.}~\textit{ In the online experiment, the performance of teams in the trust-POMDP condition will be better than of the teams in the myopic\xspace condition.} \noindent We evaluated team performance by the accumulated reward over the task. We expected the trust-POMDP robot to reason over the probability of human interventions, and act so as to minimize the intervention rate for the highest reward objects. The robot would do so by actively building up human trust before it goes for high risk objects. On the contrary, the myopic\xspace robot policy was agnostic to how the human policy may change from the robot and human actions. \noindent\textbf{Procedure.} The procedure is similar to the one for data collection (Sec.~\ref{subsec:DataCollection}), with the difference that, rather than executing random sequences, the robot executes the policy associated with each condition. While we kept the Muir's questionnaire in the experiment as a groundtruth measure of trust, the robot \em did not use the score\em, but estimated trust solely from the trust dynamics model as described in Sec.~\ref{subsec:trust-dynamics}. \noindent\textbf{Model parameters.} In the formulation of \secref{subsec:trustplanning}, the observable state variable $x$ represents the state of each object (on the table or removed). We assume a discrete set of values of trust $\trust{}$ : $\{1,2,3,4,5,6,7\}$. The transition function incorporates the learned trust dynamics and human behavioral policies, as described in Sec.~\ref{sec:learntrust}. The reward function $R$ is given by Table~\ref{table:table-clearing-payoff}. We used a discount factor of $\gamma = 0.99$, which favors immediate rewards over future rewards. \noindent\textbf{Subject Allocation} We chose a between-subjects design in order to not bias the users with policies from previous conditions. We recruited 208 participants through Amazon Mechanical Turk, aged $18-65$ and with approval rate higher than $95\%$. Each participant was compensated $\$1$ for completing the study. We removed $7$ wrong (participants failed on the attention check question) or incomplete data points. In the end, we had $101$ data points for the trust-POMDP condition, and $100$ data points for the myopic\xspace condition. \subsection{Real-robot experiment} In the real-robot experiment we followed the same robot policies, model parameters and procedures as the online AMT experiment, with that the participants interacted with an actual robot in person. \noindent\textbf{Hypothesis 2.}~\textit{ In the real-robot experiment, the performance of teams in the trust-POMDP condition will be better than of the teams in the myopic\xspace condition.} \noindent\textbf{Subject Allocation.} We recruited 20 participants from our university, aged 21-65. Each participant was compensated $\$10$ for completing the study. All data points were kept for analysis, \textit{i.e.}, $10$ data points for the trust-POMDP condition and $10$ data points for the myopic\xspace condition. \subsection{Team performance} \label{subsec:performance} We performed an one-way ANOVA test of the accumulated rewards (team performance). In the online AMT experiment, the accumulated rewards of trust-based condition was significantly larger than the myopic\xspace condition \allowbreak $(F(1,199) = 7.81, p = 0.006)$. This result supports Hypothesis 1. Similarly, the accumulated rewards of the trust-based condition was significantly larger than the myopic\xspace condition \allowbreak $(F(1,18) = 11.22,$ $ p = 0.004)$. This result supports Hypothesis 2. The difference in performance occurred because participants' intervention rate in the trust-POMDP condition was significantly lower than myopic\xspace condition (\figref{fig:performance_figs} - left column). In the online AMT experiment, the intervention rate in the trust-POMDP condition was 54\% and 31\% lower in the can and glass object. In the real-robot experiment, the intervention rate in the trust-POMDP condition dropped to zero (100\% lower) in the can object and 71\% lower in the glass object. In the myopic\xspace condition, the robot picked the objects in the order of highest to lowest reward (Glass, Can, Bottle, Bottle, Bottle). In contrast, the trust-based human behavior model influenced the trust-POMDP robot policy by capturing the fact that interventions on high-risk objects were more likely if trust in the robot was insufficient. Therefore, the trust-POMDP robot reasoned that it was better to start with the low risk objects (bottles), build human trust (\figref{fig:performance_figs} - center column) and go for high risk object (glass) last. In this way, the trust-POMDP robot minimized the human intervention ratio on the glass and can object, which significantly improved the team performance. \begin{figure*}[t!] \centering \begin{subfigure}[b]{1.0\linewidth} \centering \textbf{Online AMT experiment}\par\medskip \includegraphics[height=0.20\linewidth]{figs/trust_performance.pdf} \includegraphics[height=0.20\linewidth]{figs/trust_per_round.pdf} \includegraphics[height=0.20\linewidth]{figs/intervention_per_trust.pdf} \end{subfigure} ~\\ ~\\ \begin{subfigure}[b]{1.0\linewidth} \centering \textbf{Real-robot experiment}\par\medskip \includegraphics[height=0.20\linewidth]{figs/lab_trust_performance.pdf} \includegraphics[height=0.20\linewidth]{figs/lab_trust_per_round.pdf} \includegraphics[height=0.20\linewidth]{figs/lab_intervention_per_trust.pdf} \end{subfigure} \caption{Comparison of the Trust-POMDP and the myopic policies in the AMT experiment and the real-robot experiment. } \label{fig:performance_figs} \end{figure*} \begin{figure}[t!] \centering \begin{subfigure}[b]{1.0\linewidth} \centering \fontsize{7}{5}\selectfont \textbf{Online AMT experiment}\par\medskip \includegraphics[width=0.34\linewidth]{figs/amt_bottle_nonlinear.pdf} \includegraphics[width=0.315\linewidth]{figs/amt_can_nonlinear.pdf} \includegraphics[width=0.30\linewidth]{figs/amt_glass_nonlinear.pdf} \end{subfigure} ~\\ ~\\ \begin{subfigure}[b]{1.0\linewidth} \centering \fontsize{7}{5}\selectfont \textbf{Real-robot experiment}\par\medskip \includegraphics[width=0.33\linewidth]{figs/lab_bottle_nonlinear.pdf} \includegraphics[width=0.32\linewidth]{figs/lab_can_nonlinear.pdf} \includegraphics[width=0.32\linewidth]{figs/lab_glass_nonlinear.pdf} \end{subfigure} \caption{Time-dependent nonlinear effects of trust dynamics. The same outcome has greater effect on trust when it occurs earlier than later. } \label{fig:timeEffectonTrust} \end{figure} \subsection{Trust evolution} \label{subsec:TrustEvolution} \figref{fig:performance_figs} (center column) shows the participants' trust evolution. We make two key observations. First, successfully completing a task increased participants' trust in the robot. This is consistent with the human trust dynamics model we learned in~\secref{subsec:trust-dynamics}. Second, there is a lack of significant difference in the \emph{average} trust evolution between the two conditions (~\figref{fig:performance_figs}, center column), especially given that fewer human interventions occurred under the trust-POMDP policy. This can be partially explained by a combination of averaging and nonlinear trust dynamics, specifically that robot performance in the earlier part of the task has a more pronounced impact on trust~\citep{desai2012modeling}. This is a specific manifestation of the ``primacy effect'', a cognitive bias that results in a subject crediting a performer more if the performer succeeds earlier in time~\citep{jones1968pattern}. \figref{fig:timeEffectonTrust} shows this time-dependent aspect of trust dynamics in our experiment; the change in the mean of trust was larger if the robot succeeded earlier, most clearly seen for the Can and Glass objects in the real-robot experiment. As such, in the myopic\xspace condition, although there were more interventions on the glass/can at the beginning, this was averaged out by a larger increase in the human trust. \subsection{Human behavioral policy} \label{subsec:humanpolicy} \figref{fig:performance_figs} (right column) shows the observed human behaviors given different trust levels. Consistent with the trust-based human behavioral model (\secref{subsec:human-behavioral-prediction}), participants were less likely to intervene as their trust in the robot increased. The human's action also depended on the type of object. For low risk objects (bottles), participants allowed the robot's attempt to complete the task even if their trust in the robot was low. However, for a high risk object (glass), participants intervened unless they trusted the robot more. \begin{figure*}[t!] \setlength \tabcolsep{0pt} \captionsetup[subfigure]{labelformat=empty} \captionsetup[subfigure]{width=0.68\columnwidth} \captionsetup[subfigure]{justification=justified,singlelinecheck=false} \centering \begin{tabular}{ccccc} \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_b0.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-01.pdf} \end{tabular} \label{fig:plotT0} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_b1.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-02.pdf} \end{tabular} \label{fig:plotT1} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \fontsize{9}{5}\selectfont \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_b2.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-03.pdf} \end{tabular} \label{fig:plotT2} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_b3.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-04.pdf} \end{tabular} \label{fig:plotT3} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_b4.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-05.pdf} \end{tabular} \label{fig:plotT4} \end{subfigure} \end{tabular} \caption{Sample run of the trust-POMDP strategy when the robot may fail in the glass cup with probability 0.9.} \label{fig:fail-glass} \end{figure*} \begin{figure*}[t!] \setlength \tabcolsep{0pt} \captionsetup[subfigure]{labelformat=empty} \captionsetup[subfigure]{width=0.68\columnwidth} \captionsetup[subfigure]{justification=justified,singlelinecheck=false} \centering \begin{tabular}{c} \begin{tabular}{ccccc} \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c1_b0.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c1-01.pdf} \end{tabular} \label{fig:plotT0} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c1_b1.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c1-02.pdf} \end{tabular} \label{fig:plotT1} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \fontsize{9}{5}\selectfont \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c1_b2.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c1-03.pdf} \end{tabular} \label{fig:plotT2} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c1_b3.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c1-04.pdf} \end{tabular} \label{fig:plotT3} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c1_b4.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c1-05.pdf} \end{tabular} \label{fig:plotT4} \end{subfigure} \end{tabular}~\\ \begin{tabular}{ccccc} \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c2_b0.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c2-01.pdf} \end{tabular} \label{fig:plotT0} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c2_b1.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c2-02.pdf} \end{tabular} \label{fig:plotT1} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \fontsize{9}{5}\selectfont \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c2_b2.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c2-03.pdf} \end{tabular} \label{fig:plotT2} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c2_b3.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c2-04.pdf} \end{tabular} \label{fig:plotT3} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.9\linewidth]{failure-figs/glass_fail_intent_c2_b4.pdf}\\ \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-intent-c2-05.pdf} \end{tabular} \label{fig:plotT4} \end{subfigure} \end{tabular}~\\~\\~\\ \begin{tabular}{ccccc} \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-01.pdf} \end{tabular} \label{fig:plotT0} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-02.pdf} \end{tabular} \label{fig:plotT1} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \fontsize{9}{5}\selectfont \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-03.pdf} \end{tabular} \label{fig:plotT2} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-04.pdf} \end{tabular} \label{fig:plotT3} \end{subfigure} & \begin{subfigure}[b]{.20\linewidth} \centering \begin{tabular}{c} \includegraphics[width=0.85\linewidth]{failure-figs/glass-fail-05.pdf} \end{tabular} \label{fig:plotT4} \end{subfigure} \end{tabular} \end{tabular} \caption{Sample runs of the performance-maximizing policy (top, middle-row) and the trust-maximizing policy (bottom row) when the robot may fail in the glass cup with probability 0.9, and the robot can fail intentionally in any object. The adaptive trust-POMDP policy branches out at $T=0$: If the human stays put (top row), the robot intentionally fails in the bottles to reduce human trust and maximize the probability of the human intervening when it goes for the glass at $T=4$.} \label{fig:fail-intent} \end{figure*} \begin{figure}[t!] \setlength \tabcolsep{1pt} \captionsetup[subfigure]{justification=justified,singlelinecheck=false} \centering \begin{subfigure}[b]{\linewidth} \begin{tabular}{cc} \begin{subfigure}[b]{.5\linewidth} \centering \includegraphics[width=0.9\linewidth]{failure-figs/max_perf_varying_width.pdf} \end{subfigure} & \begin{subfigure}[b]{.5\linewidth} \centering \includegraphics[width=0.9\linewidth]{failure-figs/max_trust_varying_width.pdf} \ \end{subfigure} \end{tabular} \end{subfigure} \begin{subfigure}[b]{\linewidth} \begin{tabular}{cc} \begin{subfigure}[b]{.5\linewidth} \centering \includegraphics[width=0.9\linewidth]{failure-figs/trust_branches_segments_max_perf.pdf} \end{subfigure} & \begin{subfigure}[b]{.5\linewidth} \centering \includegraphics[width=0.9\linewidth]{failure-figs/trust_branches_segments_max_trust.pdf} \ \end{subfigure} \end{tabular} \end{subfigure} \caption{(Top) Expected trust for all possible human action sequences for the performance-maximizing and trust-maximizing policy. Each sequence is represented with a line of width proportional to the likelihood of that sequence, based on the learned model. (Bottom) Annotated robot actions for the 16 most likely sequences.} \label{fig:policy-branches} \end{figure} \begin{figure*}[t!] \includegraphics[width=1.0\linewidth]{failure-figs/film-strip.pdf} \caption{Scatterplot of mean accumulated reward as a function of human trust over time for all human action sequences. The radius of each circle is proportional to the likelihood of the corresponding sequence, based on the learned model. The performance-maximizing policy (blue) gradually reduces human trust to maximize the accumulated reward, while the trust-maximizing policy (green) focuses on increasing trust.} \label{fig:film-strip} \end{figure*} \section{Robot Failures} The previous experimental results show that the trust-POMDP policy significantly outperforms the myopic policy that ignores trust in robot decision-making. The trust-POMDP robot was able to make good decisions on whether to pick up the low risk object to increase human trust, or to go directly to the high risk object when trust is high enough. This is one main advantage that trust-POMDP robot has over the myopic\xspace robot. In these experiments the robot always succeeded. However, in the real world the robot is also likely to fail, and we want to explore the behavior of the trust-POMDP when the robot may fail in its attempt to pick up an object with some known probability. Therefore, we assumed that the robot may fail when attempting to pick up the glass with probability 0.9, and we used the learned dynamics and human behavioral model to compute the robot policy in that case. Contrary to when the robot always succeeds, in this case it is actually beneficial for the human to intervene and pick up the glass themselves, in order to avoid the large penalty from a likely robot failure. Fig.~\ref{fig:fail-glass} shows the computed policy and belief updates: the robot starts with the glass cup, since the beginning of the task is when the human is the most likely to intervene and not let the robot pick up the glass (and likely fail in the process of doing so). While this shows that the robot can reason over human intervention rate to reduce failure, intuitively the robot should also be able to \emph{actively reduce} trust to affect human behavior. While there is a range of behaviors that can reduce human trust~\cite{wang2016trust,van2014robot}, we focused on active trust reduction through failures. Therefore, we expanded the robot's action space, so that it can intentionally fail in any object. Keeping the failure probability for glass at 0.9 and reducing the reward for robot success when picking up the bottles to 0.3 results in the exciting behavior demonstrated at Fig.~\ref{fig:fail-intent}. When following the trust-POMDP policy (Fig.~\ref{fig:fail-intent} top and middle row) the robot attempts to pick up the can first; This is an \emph{information seeking} action, that the robot uses to estimate the initial human trust. If the human stays put, the robot infers that human trust is high, and it will then \emph{fail intentionally} at the bottles to reduce trust, before going for the glass cup. By the time the robot goes for the glass cup, human trust has been reduced sufficiently so that the human is likely to intervene, avoiding failure. On the other hand, if the human intervenes, the robot infers that the human trust is already low. The robot then does not need to fail intentionally, since it does not need to reduce human trust any further, but it subsequently goes for the glass cup. The resulting policy contrasts the policy that the robot follows, if it maximizes human trust instead (Fig.~\ref{fig:fail-intent}, bottom row). When following the trust-maximizing policy, the robot starts with the glass. This is for two reasons: (a) in the beginning human trust is the lowest, therefore the human is the most likely to intervene and avoid watching the robot fail, which would result in significant reduction in trust (b) Even if the human does not intervene and the robot fails, it is better to fail early when trust has not increased yet, since the higher the trust, the steeper the fall, based on the learned model of Fig.~\ref{fig:trustdyna}. We further illustrate the difference between the two policies by simulating policy runs and showing the evolution of the expected trust and mean accumulated reward over time (Fig.~\ref{fig:policy-branches}, ~\ref{fig:film-strip}). The plots illustrate how the performance-maximizing policy reduces human trust to maximize reward. The mean accumulated reward over $10^{4}$ policy runs for the performance-maximizing policy is $-1.36$, compared to $-1.65$ for the trust-maximizing policy, a statistically significant difference ($F(1,19998) = 18.04, p < 0.001$). This evaluation indicates that maximizing trust can be suboptimal in the presence of robotic failures. \section{Conclusion} \label{sec:Conclusion} This paper presents the trust-POMDP, a computational model for integrating human trust into robot decision making. The trust-POMDP closes the loop between trust models and robot decision making. It enables the robot to infer and influence human trust systematically and to leverage trust for fluid collaboration. Our experimental results in a table-clearing task show that the trust-POMDP policy calibrates human trust to match it to the robot's manipulation capabilities: If trust is overly low, the robot prioritizes picking up the low risk objects to increase trust. This results in better performance, compared to the myopic\xspace robot that ignores trust. On the other hand, if trust is overly high, the robot fails intentionally in the low risk objects. Our results show that always maximizing trust can be in fact detrimental to performance in the presence of robotic failures. There are several limitations in our current work. Similar to previous works~\citep{xu2015optimo,desai2012modeling}, we modeled trust as a single real-valued latent variable that reflected the capabilities of the entire system. However, a multi-dimensional parameterization of trust that captured the different functions and modes of automation could be be a more accurate representation. In addition, the evolution of trust might also depend on the type of motion executed by the robot (e.g., for expressive or deceptive motions~\citep{dragan2013legibility,dragan2014analysis}). The current trust-POMDP model also assumes static robot capabilities, but a robot's true capabilities may change over time. In fact, the trust-POMDP can be extended to model robot capabilities via additional state variables that affect the state transition dynamics. Furthermore, the reward function is manually specified in this work. However, the reward function may be difficult to specify in practice. One possible way to resolve this is to learn the reward function from human demonstrations (e.g., ~\citep{nikolaidis2015efficient}). Finally, the trust model learned on one task may transfer to a related task~\cite{soh2018transfer}. This last aspect is another interesting direction for future work. \section{Acknowledgements} \label{sec:ack} This work was funded in part by the Singapore Ministry of Education (grant MOE2016-T2-2-068), the National University of Singapore (grant R-252-000-587-112), US National Institute of Health R01 (grant R01EB019335), US National Science Foundation CPS (grant 1544797), US National Science Foundation NRI (grant 1637748), and the Office of Naval Research. \bibliographystyle{ACM-Reference-Format}
\section{Introduction} \label{sec_intro} Internet of Things (IoT) represents one of the biggest paradigm shifts recently which can revolutionize the information technology and several aspects of everyday-life such as living, e-health and driving; it envisions to transform every physical object into an intelligent individual that is capable of sensing, communicating and computing. By $2021$, Ericsson predicts that there will be around $28$ billion IoT devices and a large share of them are empowered by wireless communication technologies \cite{ericsson_iot}. The wireless communication community has dedicated a significant amount of efforts to accommodate such a \emph{massive} number of emerging IoT devices; in particular, it is one of the main targets of the $5$G system that $100$-fold more connected devices per geographical area should be supported compared with current LTE systems \cite{oss14}. In addition to the sheer amount of IoT devices, it is also desired to enhance the timeliness of services for time-critical applications whereby the service quality depends heavily on the freshness of the monitoring data collected from IoT devices, e.g., the Tactile Internet and autonomous driving \cite{fet14}. \begin{figure}[!t] \centering \includegraphics[width=0.5\textwidth]{aoi_exp.pdf} \caption{A status update example with one source (sampler), one destination and a single queue to illustrate AoI.} \label{fig_aoi} \end{figure} \emph{Age-of-information} (AoI) is a recently proposed metric specifically to quantify such timeliness \cite{kaul11,kaul12,yates12,yates16,kadota16,he17,joo17}; it is a constantly evolving information monitoring delay at a destination node, or simply put, time elapsed since the last-updated packet's generation. This definition jointly accounts for the delay introduced by sampling the information source and data communication, which distinguishes AoI from the conventional end-to-end communication (queuing and transmission) delay metric \cite{jiang17_iotj,neely10}. Consider a concrete example in Fig. \ref{fig_aoi}. The AoI only coincides with the communication delay at the time when a status update packet is delivered; another distinct difference is that the communication delay is defined for each packet; in contrast, the AoI is a constantly evolving measurement at the destination. The AoI characterizes the knowledge freshness of remote information sources at the destination. This knowledge and its timeliness are both essential for real-time applications. The wireless communication system is therefore well motivated to optimize the AoI, however, this objective may deviate from the conventional throughput- or delay-oriented paradigms since it has been shown that the optimization of AoI leads to distinctively different system designs, e.g., sampling strategy and service principle \cite{kaul12}. One of the fundamental restrictions of wireless communication systems is that transmissions are subject to interference due to the broadcast nature of electromagnetic waves, leading to the fact that IoT terminals cannot transmit simultaneously; otherwise collisions happen and transmissions fail with no data delivered. Therefore, terminals should be carefully \emph{scheduled} to avoid such collisions; as a result, delay is introduced. For instance, a simple scheduling strategy is that terminals take turns to update their status data to avoid collisions. Intriguingly, we will show that taking turns (a round-robin scheduling policy with proper packet management) is, to some extent, the optimal policy without entailing a large amount of signalling overhead. The overhead issue touches upon another important design principle in \emph{wireless multiaccess uplinks}, especially with massive distributed IoT devices, that is the policy design is preferably \emph{decentralized}, i.e., decisions are made autonomously at terminals and require only local information. For instance, the carrier-sensing-medium-access (CSMA) protocol is a widely-used and successful application of decentralized protocol in wireless networks \cite{bia00}. In particular, terminals transmit based on a contention protocol and scheduling decisions are made in a decentralized manner. However, the CSMA protocol is designed only for throughput maximization and may face severe challenges in status update systems. Concerning the aforementioned scenario and corresponding challenges, the contributions of this paper include: \begin{itemize} \item Among arrival-independent renewal (AIR) scheduling policies, whose decisions are independent with packet-arrival processes and hence decentralization-friendly, a round-robin policy with one-packet buffers (only retains the most up-to-date packet and others are discarded) at terminals (RR-ONE) is proved optimal. The proof technique leverages a generalized Poisson-arrival-see-time-average (PASTA) theorem which, as far as we know, has not been adopted in the related literature before. \item RR-ONE is proved asymptotically optimal among \emph{all} policies with a massive number of terminals. It is shown that the optimum time-average AoI is proportional to the number of terminals asymptotically; the optimum linear scaling factor is $\frac{1}{2}$. RR-ONE is proved to achieve the optimum scaling factor. The CSMA protocol is however shown to have (at least) a scaling factor of $1$; hence its time-average AoI is arbitrarily larger than RR-ONE asymptotically. In addition, the AoI steady-state stationary distribution under RR-ONE is also derived. \item A full-fledged decentralized implementation of RR-ONE is described; it is capable of adapting to dynamic terminal appearances which is essential for decentralized algorithms. Thereby, the only global information required for each terminal is the total number of terminals; this is obtained by a common broadcast message from the central controller. \item Considering scenarios wherein arrival packets are queued and first-come-first-served (FCFS) at terminals without any packet management, e.g., packet dropping, the optimal AIR policy thereof is also found: it schedules every terminal based on deterministic intervals, with intervals given as the solution to a convex optimization problem; an approximate closed-form solution, which is shown to be optimal with heavy traffic, is also derived. \end{itemize} The remainder of the paper is organized as follows. In Section \ref{sec_sm}, the system model is introduced; the problem of AoI minimization is then formulated; for clarity, we present our main results here and detailed proofs and explanations are conveyed in the subsequent sections. In Section \ref{sec_air}, we show that RR-ONE is the optimal AIR policy. In Section \ref{sec_rrone}, the asymptotic optimality is proved. In Section \ref{sec_sta}, the stationary distribution under RR-ONE is derived. In Section \ref{sec_dp}, a decentralized protocol is presented. Section \ref{sec_nopm} presents the optimal AIR policy without performing packet management. Section \ref{sec_sr} presents simulation results. Finally, in Section \ref{sec_cl}, conclusions are drawn and discussions are made. The proofs of several lemmas are shown in the appendix. \begin{figure}[!t] \centering \includegraphics[width=0.5\textwidth]{arch} \caption{Considered system architecture and status update procedure. } \label{fig_arch} \end{figure} \subsection{Related Work} An AoI optimization problem can be posed as minimizing the time-average AoI at the receiver by controlling the sampling rate at the terminal. All the sampled data packets go through an $M/M/1$ queue as shown in Fig. \ref{fig_aoi}.\footnote{The AoI evolution in this paper is based on discrete time slots; whereas the AoI changes continuously in Fig. \ref{fig_aoi} and Fig. \ref{fig_asta} for ease of exposition.} There is a subtle, in most cases tradeoff, relationship between throughput and AoI: Sampling frequently results in a high throughput and a low sampling delay but may introduce a large queuing delay; on the other hand, sampling at a low rate introduces a large sampling delay, whereas the queuing delay is reduced. Queuing analysis reveals that there exists an optimal sampling rate, assuming the generated packets are queued and the service is FCFS \cite{kaul12}; $M/D/1$ and $D/M/1$ queues are also considered therein. Since its inception, AoI has received wide research attentions and there have been several extensions. Regarding multiple sources sharing one queue, and hence multiple corresponding AoIs, Yates and Kaul \cite{yates12,yates16} derive the minimum time-average AoI region under $M/M/1$ queuing model and different service disciplines, e.g., FCFS, last-come-fist-served (LCFS), LCFS with preemption. The service process can be extended to obey general distributions; in this regard, the average peak-AoI (PAoI) for multiple sources is obtained, and the problem of optimizing update rates is considered by Huang and Modiano \cite{huang15}. The scheduling problem for multiple servers and a single queue with job replication is considered by Bedewy \emph{et al.} \cite{bedewy16}. The AoI performance is shown to be improved by proper packet management, e.g., LCFS with preemption \cite{kaul12_ciss} and packet dropping mechanism \cite{costa16}, based on the intuition that the last-arrived packet has the least age. However, considering service interruption, always prioritizing a new packet may result in performance degradation \cite{najm16}. The optimization of sampling time without considering queuing delay is studied by Sun \emph{et al.} \cite{sun17}; they show that even without queuing delay the source should wait a certain time before sampling again to minimize time-average AoI due to service time uncertainty. The study of the multi-queue scheduling problem is the most relevant work to ours \cite{kadota16,he17,hsu17}. Hsu \emph{et al.} approach this problem in the wireless broadcast channel where the scheduling decisions are centralized; they prove the optimal policy is age-threshold-based. The scheduling problem of multiple sources inside a finite-length transmission frame to minimize AoI is proved NP-hard \cite{he17}. Joo and Eryilmaz propose that the status updates from multiple sources should be synchronized in applications such as network monitoring and distributed sensing; they develop a drift-based approach to address the issue \cite{joo17}. The Whittle's index \cite{whitt84} is leveraged by Kadota \emph{et al.} \cite{kadota16} based on a restless multi-armed-bandit formulation; it is shown that an age-greedy policy is optimal in the symmetric case and the Whittle's index is derived for asymmetric cases. The major distinction between our formulation and existing work is that we consider the following scenario: 1) status packets arrive at random time slots at terminals; 2) limited information is available for the policy decisions to facilitate decentralized implementation. The considered scenario is justified in massive IoT status update systems: status variation is unpredictable, and hence update packets, which are used to monitor status variation, are randomly generated; transmissions happen in a wireless multiaccess uplink where scheduling decisions are preferably decentralized to avoid overhead explosion. As far as we know, no existing work on AoI optimization has addressed a practical scenario involving both aspects. \section{System Model, Problem Formulation and Main Results} \label{sec_sm} Consider a base station (BS), alternatively referred to as central controller, which is responsible for collecting status update packets from a large number of IoT devices as shown in Fig. \ref{fig_arch}. A time-slotted system is considered. The status update packets are generated and stored at terminal queues. The queue buffer size for every terminal is assumed to be identical and denote by $B$. The number of packets generated at time $t$ of terminal $n$ is denoted by $L_n(t)$ and $L_n(t)$ is assumed to be a Bernoulli random variable with parameter $\lambda_n$; the arrival processes $\left\{L_n(t),\,t=1,2,... \right\}$, $n \in \{1,...,N\}$ are independent over terminals and time. The number of terminals is denoted by $N$. Let $U_{n,\pi}(t)$ denote the scheduling decision of terminal $n$ at time $t$ for a given policy $\pi$, i.e., $U_{n,\pi}(t)=1$ if terminal $n$ is scheduled and $U_{n,\pi}(t)=0$ otherwise. The $T$-horizon time-average AoI is denoted by \begin{equation} \label{AoI} \bar{h}_{\pi}^{(T,N)} \triangleq \frac{1}{TN}\sum_{t=1}^T \sum_{n=1}^N h_{n,\pi}(t), \end{equation} where the AoI at the $t$-th time slot for terminal $n$ based on policy $\pi$ is denoted by $h_{n,\pi}(t)$, and the time horizon is $T$ time slots. Denote time-average AoI over infinite time horizon as \begin{equation} \label{aoi_inf} \bar{h}_{\pi}^{(\infty,N)} \triangleq \lim_{T \to \infty} \bar{h}_{\pi}^{(T,N)}. \end{equation} The evolution of AoI can be written as \begin{equation} \label{evo} h_{n,\pi}(t+1) = h_{n,\pi}(t) - U_{n,\pi}(t) \prod_{m \neq n}(1-U_{m,\pi}(t))g_n(t) + 1, \end{equation} where $g_n(t)$ denotes the AoI reduction with a successful update from terminal $n$. Consequently, we have $g_n(t)=0$ when queue-$n$ is empty at time $t$. The AoI for each terminal always increases by one after each time slot. Based on this definition \eqref{evo}, whenever a collision happens, i.e., more than one terminals transmit in the same time slot, no status is updated. Note that transmission failures only happen with collisions, otherwise the transmission is always assumed successful; this corresponds to the interference-limited regime which is emerging to be the main application scenario in the future ultra-dense networks \cite{Andrews14}, and therein failures due to noise is negligible. In addition, denote the time-average AoI of terminal-$n$ under policy $\pi$ as \begin{equation} \bar{h}_{n,\pi}^{(T)} \triangleq \frac{1}{T}\sum_{t=1}^T h_{n,\pi}(t). \end{equation} The status update procedure is described in Fig. \ref{fig_arch}. We assume the following sequence of events in each time slot. At the beginning of each time slot, scheduling decisions are made, including: \begin{itemize} \item \emph{Terminal scheduling}: Decide which terminal, or a set of terminals\footnote{This case is described only for completeness and not considered in this paper since it results in a collision.}, updates and transmits in this time slot. \item \emph{Packet management}: Once scheduled, the terminal can apply a packet management scheme, e.g., it can choose a packet from its queue to update in the time slot, or drop several packets. In contrast, packets are queued and served based on an FCFS manner without any packet management. \end{itemize} Based on the decision, the scheduled terminal transmits its update packet (assuming one packet is transmitted in each time slot), and thereby the AoI is refreshed at the BS. Afterwards, packets arrive randomly at terminals (the age of newly arrived packets is zero) and then the ages of all packets and all AoIs increase by one. This marks the end of a time slot in our model. The AoI at one time slot is defined as the AoI at the end of the time slot after status update and natural growth. The objective considered in this paper is to minimize the infinite-horizon time-average AoI \eqref{aoi_inf} over all policies.\footnote{Hereinafter, we refer to \eqref{aoi_inf} as time-average AoI for simplicity.} As a first step, the following definition and Lemma \ref{lm_0} (cf. proof in Appendix \ref{app_lemmas}) enable us to only consider work-conserving non-collision (WCNC) policies without loss of optimality. \begin{defi}[WCNC policy] A WCNC policy is defined as a policy that is not idle when there is at least one packet in terminal queues, nor schedule more than one terminals simultaneously. $\hfill\square$ \end{defi} \begin{lemma} \label{lm_0} For a non-WCNC policy, there exists at least one WCNC policy that achieves lower AoI. $\hfill\square$ \end{lemma} For practical concerns that the policy decisions should be decentralized, and also mathematical tractability, consider AIR policies defined as follows. Denote the resultant scheduling interval process of terminal-$n$ based on policy $\pi$ as $X_{n,\pi}^{(k)}$, $k=1,2,...$ where $k$ is the scheduling interval index. Define $R_{n,\pi}(t)$ as the counting process of scheduling times before time $t$ for terminal $n$, i.e., $R_{n,\pi}(t) \triangleq \textrm{sup} \{r: \sum_{k=0}^r X_{n,\pi}^{(k)} \le t\}$. \begin{defi}[AIR policy] \label{def_air} A policy $\pi$ is an AIR policy if the following conditions are both met. \begin{enumerate}[label=(\roman*)] \item \label{cond1} The scheduling interval processes $\{X_{n,\pi}^{(k)},\,n=1,...,N\}$ are independent with the packet arrival processes at terminals, with finite first and second raw moments denoted by $m_n$ and $v_n$ respectively. \item \label{cond2} The counting processes $R_{n,\pi}(t)$, $n=1,...,N$ are renewal processes. $\hfill\square$ \end{enumerate} \end{defi} By definition, the set of AIR policies is essentially a subset of all policies. The condition (i) is in fact reflecting the practical perspective that the scheduling decisions are desired to be independent of the packet arrival processes to enable decentralized implementation and reduce signalling exchange overhead. The condition (ii) does enforce an additional constraint that the scheduling intervals are i.i.d.; however the distributions can be arbitrary as long as they have finite first and second moments. Note that, notwithstanding these conditions, it is found (Theorem \ref{thm1}) that the optimal AIR policy with proper packet management is asymptotically optimal among all policies in the massive IoT regime. \subsection{Main Results} \begin{figure}[!t] \centering \includegraphics[width=0.45\textwidth]{dist} \caption{Steady-state stationary distribution of AoI under RR-ONE. The blue dotted curve represents a uniform distribution on $\{1,...,N\}$ when $\lambda=1$ since in this case the AoI evolves periodically from $1$ to $N$ (Lemma \ref{lma0}).} \label{fig_dist} \end{figure} \begin{defi}[RR-ONE] RR-ONE, denoted by $\mathsf{RR}$ in the subscript, is defined as a policy that schedules the $n_\mathsf{RR}$-th terminal at each time slot which satisfies \begin{equation} n_\mathsf{RR} = \min\left\{n: \tau_n = \max_{m=1,...,N} \tau_m\right\}, \end{equation} and only retains the last-arrival packet at each terminal. The time since last update from terminal $m$ is denoted by $\tau_m$. $\hfill\square$ \end{defi} \begin{theorem} \label{thm_air} RR-ONE is the optimal AIR policy to minimize the time-average AoI, with \begin{IEEEeqnarray}{rCl} \bar{h}_{\mathsf{RR}}^{(\infty,N)} = \frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n} + \frac{N-1}{2}. \end{IEEEeqnarray} $\hfill\square$ \end{theorem} \begin{theorem} \label{thm1} RR-ONE is asymptotically optimal among all policies in the massive IoT regime; it achieves the optimum asymptotic scaling factors, i.e., \begin{equation} \label{nlim} \lim_{N \to \infty} \frac{\bar{h}_{\mathsf{RR}}^{(\infty,N)}}{N} = \lim_{N \to \infty} \frac{\bar{h}_{\textrm{opt}}^{(\infty,N)}}{N} = \frac{1}{2},\,\forall \lambda_i, \end{equation} and \begin{IEEEeqnarray}{rCl} \label{llim} \lim_{\frac{1}{\lambda_i} \to \infty} \lambda_i \bar{h}_{\mathsf{RR}}^{(\infty,N)} &=& \lim_{\frac{1}{\lambda_i} \to \infty} \lambda_i \bar{h}_{\textrm{opt}}^{(\infty,N)} = \frac{1}{N},\nonumber\\ && \forall \lambda_{j,j\neq i}\textrm{ and }N, \end{IEEEeqnarray} where $\bar{h}_{\textrm{opt}}^{(\infty,N)}$ denotes the minimum time-average AoI. $\hfill\square$ \end{theorem} \begin{coro} The minimum time-average AoI is proportional to the number of terminals asymptotically, and the optimum scaling factor is $\frac{1}{2}$. $\hfill\square$ \end{coro} We emphasize that the asymptotic optimality of RR-ONE is among all policies, including policies requiring global information, e.g., terminals' queue lengths, age of all packets, and even non-causal policies which know future packet arrivals (by observing that the proof of Theorem \ref{thm1} also applies in this case). \begin{theorem} \label{thm3} The AoI evolution of terminal-$n$ based on RR-ONE follows a Markov renewal process with a fixed renewal time of $N$ time slots, and the steady-state stationary distribution is \begin{equation} \label{eq_dist} \mu_{n}(j) = \left\{\, \begin{IEEEeqnarraybox}[][c]{l?s} \IEEEstrut \frac{1-(1-\lambda_n)^j}{N}, & $1 \le j \le N$;\\ \frac{(1-\lambda_n)^{j-N}}{N}(1-(1-\lambda_n)^N), & $j \ge N+1$, \IEEEstrut \end{IEEEeqnarraybox} \right. \end{equation} where $\mu_{n}(j)$ denotes the probability that the steady state AoI of terminal-$n$ is $j$. $\hfill\square$ \end{theorem} The steady-state stationary distribution in \eqref{eq_dist} is instantiated, and an insight is described in Fig. \ref{fig_dist}. \begin{theorem} \label{thm2} The optimal AIR policy \emph{without packet management} to minimize the time-average PAoI \eqref{paoi} is to schedule each terminal based on a deterministic scheduling interval\footnote{This may not be possible given the fact that the optimal scheduling intervals can be fractional numbers, and that different terminals' scheduling arrangements may conflict with each other. Nevertheless, this complication can be addressed by adopting a policy that approximately satisfies the conditions with minimal performance degradation.}. The scheduling interval for terminal-$n$ is given by $m^*_n = \frac{1}{\beta^*_n}$ where $\beta^*_n$ is the solution of the convex optimization problem: \begin{flalign} \label{p2} \textbf{P2:}&&\mathop{\textrm{minimize}}\limits_{\beta_n\,n=1,...,N} \,\,& \frac{1}{N} \sum_{n=1}^N \left[\frac{1}{\lambda_n} + \frac{1}{2}\left(\frac{1}{\beta_n-\lambda_n}+\frac{1}{\beta_n}\right)\right] &&\nonumber\\ &&\textrm{s.t.,}\,\, & \beta_n > \lambda_n,\,\forall n=1,...,N, &&\nonumber\\ &&& \sum_{n=1}^N \beta_n = 1. && \end{flalign} The corresponding policy is referred to as RR-$\bm{\lambda}$. $\hfill\square$ \end{theorem} An important note is that both RR-ONE and RR-$\bm{\lambda}$ can be easily adapted for decentralized implementation. Roughly illustrated for RR-ONE, each terminal is assigned a unique time slot to transmit in a frame of length $N$, and only retains the most up-to-date packet in its buffer. A detailed protocol which accounts for variable $N$, i.e., random terminal appearances, is described in Section \ref{sec_dp}. Although RR-$\bm{\lambda}$ requires the statistical knowledge of packet arrival rates of terminals, it is independent with the instantaneous system state and therefore the overhead is acceptable. In the following sections, we will prove our main results and elaborate on their implementations and implications. \section{Proof of Theorem \ref{thm_air}: Optimal AIR Policy} \label{sec_air} The quest for the optimal policy, among all policies with any given $N$, to minimize the time-average AoI seems elusive, because the problem can be essentially viewed as a restless multi-armed bandit problem with time- and arm-correlated reward functions \cite{ahm09}. Besides, there is a strong probability that the optimal policy requires global information exchange and hence decentralization-unfriendly. Therefore, in this section, we resolve to derive the optimal AIR policy to minimize the time-average AoI in \eqref{aoi_inf} following a generalized Poisson-arrival-see-time-average (PASTA) theorem, i.e., the arrival-see-time-average (ASTA) property with a Markov state process as the observed process and an independent outside observer \cite{ben95}. First, consider the queue evolution of terminal-$n$ based on AIR policies; it is similar with an $M/G/1$ queue given the definition of AIR policies, with a subtle, but important, difference that the service (in this case the service time is the scheduling interval) begins immediately after a packet departure, even if there is no packet waiting in the queue. In the case that there is no packet is in the queue, the service proceeds independently till the end, i.e., scheduled, during which period two possible circumstances can occur: 1) there are (at least one) packet arrivals and thereby one of the packets is updated under a certain packet management policy; 2) there is no packet arrival and consequently no packet is updated. It is clear that under this queue model, the optimal packet management, under arbitrary scheduling policy, is to always update the most up-to-date packet, i.e., the packet that arrives the last; the resultant queue is equivalent to having a buffer size of one and storing only the latest arrival packet. Note that this packet management policy is not necessarily optimal with preemptive service model due to service interruption \cite{najm17}. Without loss of optimality, we only consider the one-packet buffer packet management policy in the rest of the section. The age of the packet in queue-$n$ (buffer size is one) is denoted by $A_n(t)$, $t=1,2,...$, a sample path of which is shown in the left of Fig. \ref{fig_asta}. Upon a packet arrival, e.g., $a_i$ in Fig. \ref{fig_asta}, the age $A_n(t)$ drops to one (measured at the end of the time slot) based on the procedure in Fig. \ref{fig_arch}. When terminal-$n$ is scheduled at the time of $s_i$, the AoI at the BS is updated to the age of the packet at terminal $n$, i.e., $A_n(s_i)$. Note that we prescribe a generalized age of $A_n(s_i)$ that between each update and next packet arrival, e.g., between $s_1$ and $a_1$, $A_n(t)$ equals the AoI of terminal $n$ at the BS although there is no packet in the queue during the time. By doing this, we make $A_n(t)$ evolve \emph{independently} with $h_{n,\pi}(t)$ while not affecting the AoI update procedure; this is crucial for the ASTA property to apply. Based on the renewal process condition of AIR policies, and following the same arguments in, e.g., \cite{najm17}, the time-average AoI can be readily calculated by the sum of the geometric areas $Q_{k,n}$ in Fig. \ref{fig_asta}: \begin{IEEEeqnarray}{rCl} \label{aoi_tr} \bar{h}_{n,\pi}^{(\infty,N)} = \lim_{T \to \infty} \frac{K}{T} \frac{1}{K} \sum_{k=1}^{K} Q_{k,n} &=& \lim_{T \to \infty} \frac{K}{T} \lim_{K \to \infty} \frac{1}{K} \sum_{k=1}^{K} Q_{k,n} \nonumber\\ &=& \frac{\mathbb{E}[Q_{k,n}]}{m_n}. \end{IEEEeqnarray} The last equality is based on the elementary renewal theorem \cite{cox67}. It then follows that \begin{IEEEeqnarray}{rCl} \label{cons_cond} \bar{h}_{n,\pi}^{(\infty,N)} &=& \frac{1}{m_n} \mathbb{E}\left[X_{n,\pi}^{(k)} A_n(s_k) + \left(X_{n,\pi}^{(k)}-1\right)\frac{X_{n,\pi}^{(k)}}{2}\right] \nonumber\\ &\overset{(a)}{=}& \frac{1}{m_n} \left(\mathbb{E}\left[X_{n,\pi}^{(k)}\right] \mathbb{E}\left[A_n(s_k)\right] + \frac{1}{2} (v_n-m_n)\right) \nonumber\\ & = & \mathbb{E}\left[A_n(s_k)\right] + \frac{v_n-m_n}{2m_n} \nonumber\\ &\overset{(b)}{\ge}& \mathbb{E}\left[A_n(s_k)\right] + \frac{m_n-1}{2}, \end{IEEEeqnarray} where the equality $(a)$ is based on the arrival-independent condition of AIR policies, and the inequality $(b)$ follows from $v_n \ge m_n^2$; note that the equality holds when the scheduling interval is a constant $m_n$. It is now clear that the main challenge is to calculate $\mathbb{E}\left[A_n(s_k)\right]$. First we have Lemma \ref{lm_1} (cf. proof in Appendix \ref{app_lemmas}) which shows that $\left\{A_n(t),\,t=1,2...\right\}$ is a Markov state process and its stationary distribution is given in \eqref{46}. \begin{lemma} \label{lm_1} $\left\{A_n(t),\,t=1,2...\right\}$ is a Markov state process with the steady-state stationary distribution given as \begin{equation} \label{46} \mu_n(j) = \lambda_n (1-\lambda_n)^{j-1}, \end{equation} where $\mu_n(j)$ denotes the probability that the steady state of terminal $n$ is state $j$ (age of packet at terminal-$n$ equals $j$). $\hfill\square$ \end{lemma} Then the challenge of calculating $\mathbb{E}\left[A_n(s_k)\right]$ is tackled by treating $\mathbb{E}\left[A_n(s_k)\right]$ as the average state value of a Markov state process by an independent outside observer. Armed with this, we invoke the ASTA property \cite{ben95} which can be seen as a generalization of the well-known PASTA theorem to non-Poisson observers. \begin{lemma} \label{lm_asta} \cite[Theorem 3.14]{ben95} Let $U$ be a Markov state process and $N$ be a counting process. Then ASTA holds for the pair $(U,N)$ if $U$ is left-continuous and the pair $(U,N)$ is forward-pointwise independent, i.e., for all $t>0$, $U(t)$ and $\{N(t+s)-N(s):\,s \ge 1\}$ are independent. $\hfill\square$ \end{lemma} \begin{figure*}[!t] \centering \includegraphics[width=0.65\textwidth]{asta} \caption{Age of the packet at terminal-$n$ assuming one packet buffer (left) and AoI at the BS (right).} \label{fig_asta} \end{figure*} Let $U$ be $\left\{A_n(t),\,t=1,2...\right\}$, and $N$ in Lemma \ref{lm_asta} be the counting process of the number of scheduling times before time $t$. Then based on the AIR policy conditions, $U$ and $N$ are independent. The continuous condition follows by design of update sequence described in Fig. \ref{fig_arch}. Therefore, we obtain \begin{equation} \mathbb{E}\left[A_n(s_k)\right] = \lim_{K \to \infty} \frac{1}{K} \sum_{k=1}^{K} A_n(s_k) = \mathbb{E}\left[A_n(t)\right] = \frac{1}{\lambda_n}. \end{equation} In other words, the time-average of random sampling ($s_k$) of the Markov process $\left\{A_n(t),\,t=1,2...\right\}$ equals the steady-state average. Combining with \eqref{cons_cond}, the time-average AoI is \begin{IEEEeqnarray}{rCl} \label{rate_cond} \bar{h}_{\pi}^{(\infty,N)} = \frac{1}{N} \sum_{n=1}^N \bar{h}_{n,\pi}^{(\infty,N)} &\ge& \frac{1}{N} \sum_{n=1}^N \left(\mathbb{E}\left[A_n(s_k)\right] + \frac{m_n-1}{2}\right) \nonumber\\ &=& \frac{1}{N} \sum_{n=1}^N \left(\frac{1}{\lambda_n} + \frac{m_n-1}{2}\right). \end{IEEEeqnarray} The update rate of all terminals equals one packet per time slot for WCNC policies; therefore, according to the elementary renewal theorem, \begin{equation} \sum_{n=1}^N \frac{1}{m_n}=1. \end{equation} It follows from the arithmetic-harmonic-mean inequality (equality holds when $m_n=N$, $\forall n = 1,...,N$) and \eqref{rate_cond} that \begin{equation} \label{eq_1} \bar{h}_{\pi}^{(\infty,N)} \ge \frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n} + \frac{N-1}{2}. \end{equation} The equality holds in \eqref{eq_1} under two conditions: 1) $m_n=N$, $\forall n = 1,...,N$; 2) the scheduling interval is a constant $m_n$. These two conditions can be both satisfied with RR-ONE. For a sanity check, RR-ONE is indeed an AIR policy. With this, we can conclude the proof of Theorem \ref{thm_air}. \begin{remark} Alert readers may be curious about the optimal policy in general. In particular, since a myopic policy (minimize the AoI in the next time slot) is optimal \cite[Theorem 1]{kadota16} when we eliminate the randomness of arrival packets ($\lambda=1$), i.e., the AoI is updated to one (or zero) every time, is it optimal in general? A counter example is given in Appendix \ref{app1} to show that the myopic policy is not optimal even with global state information (GSI), e.g., queue length, age of packets and arrival rates information, at least with finite horizon. Nevertheless, we conjecture that the myopic policy with GSI is close to optimal with infinite horizon, and it is adopted as a performance benchmark in Section \ref{sec_sr} to investigate the value of GSI. \end{remark} \section{Proof of Theorem \ref{thm1}: Asymptotic Optimality} \label{sec_rrone} In IoT systems, one major challenge is to accommodate a large number of terminals while maintaining timely status updates. Hence, it is of central interest to consider the problem in the asymptotic regime. Towards this end, it will be shown in the following that RR-ONE, given its simple structure, is asymptotically optimal among all policies with arbitrary information and even non-causal packet arrival knowledge. First, we obtain two performance bounds and compare these with the achievable performance by RR-ONE; the conclusion follows by showing that they have identical asymptotic scaling factors. First, we introduce two lower bounds of the time-average AoI of any policies in Lemma \ref{lma0} and Lemma \ref{lma1} (cf. proof in Appendix \ref{app_lemmas}). \begin{lemma} \label{lma0} The time-average AoI in \eqref{aoi_inf} cannot be less than $\frac{N+1}{2}$, i.e., \begin{equation} \bar{h}_{\pi}^{(\infty,N)} \ge \frac{N+1}{2},\, \forall N=1,2,...,\, \lambda_n \in [0,1], n \in \{1,...,N\}. \end{equation} $\hfill\square$ \end{lemma} \begin{lemma} \label{lma1} The time-average AoI in \eqref{AoI} cannot be less than $\frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n}$, i.e., \begin{IEEEeqnarray}{rCl} \bar{h}_{\pi}^{(\infty,N)} \ge \frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n},\, &\forall& N=1,2,...,\, \lambda_n \in [0,1],\nonumber\\ && n \in \{1,...,N\}. \end{IEEEeqnarray} $\hfill\square$ \end{lemma} It follows that the minimum time-average AoI, denoted by $\bar{h}_{\textrm{opt}}^{(\infty,N)}$, cannot be less than either bound, i.e., \begin{equation} \bar{h}_{\textrm{opt}}^{(\infty,N)} \ge \max\left[\frac{N+1}{2},\,\frac{1}{N}\sum_{n=1}^N \frac{1}{\lambda_n}\right]. \end{equation} After obtaining two lower bounds in Lemma \ref{lma0} and \ref{lma1}, combining with the achievable AoI derived in \eqref{eq_1}, we can prove the asymptotic optimality of RR-ONE; the optimum scaling result follows immediately. Based on Lemma \ref{lma0}, Lemma \ref{lma1} and Theorem \ref{thm1}, it follows that $\forall N, \lambda_1,...,\lambda_N$, \begin{equation} \label{lim} \max\left[\frac{N+1}{2},\,\frac{1}{N}\sum_{n=1}^N \frac{1}{\lambda_n}\right] \le \bar{h}_{\textrm{opt}}^{(\infty,N)} \le \frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n} + \frac{N-1}{2}. \end{equation} For any fixed $\lambda_n$, $n=1,...,N$, divide both sides of \eqref{lim} by $N$, and let $N$ goes to infinity, we obtain \begin{IEEEeqnarray}{rCl} &&\lim_{N \to \infty} \frac{\max\left[\frac{N+1}{2},\,\frac{1}{N}\sum_{n=1}^N \frac{1}{\lambda_n}\right]}{N} =\frac{1}{2}, \nonumber\\ &&\lim_{N \to \infty} \frac{\frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n} + \frac{N-1}{2}}{N}=\frac{1}{2}, \end{IEEEeqnarray} and therefore \eqref{nlim} follows. The scaling results for RR-ONE follows directly from \eqref{rr_aoi}. Similarly $\forall n$, \begin{IEEEeqnarray}{rCl} &&\lim_{\frac{1}{\lambda_n} \to \infty} \frac{\max\left[\frac{N+1}{2},\,\frac{1}{N}\sum_{n=1}^N \frac{1}{\lambda_n}\right]}{\frac{1}{\lambda_n}} =\frac{1}{N}, \nonumber\\ &&\lim_{\frac{1}{\lambda_n} \to \infty} \frac{\frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n} + \frac{N-1}{2}}{\frac{1}{\lambda_n}}=\frac{1}{N}, \end{IEEEeqnarray} and \eqref{llim} follows, which concludes the proof of Theorem \ref{thm1}. \begin{remark} Theorem \ref{thm1} shows that the optimum time-average AoI scales linearly with the number of terminals $N$ and expected inter-arrival time, i.e., $\frac{1}{\lambda_n}$, $\forall n$. The optimum scaling factors are also given. Moreover, we show that RR-ONE not only can achieve linear scaling, but also achieves the optimum scaling factors. \end{remark} \begin{remark} \label{one_remark} By setting $\lambda_n=1$, $\forall n$ in Theorem \ref{thm1} which is equivalent to a scenario wherein the age after every update is always one, it is immediately obvious that RR-ONE is optimal in this setting with arbitrary $N$. \end{remark} \begin{coro} \label{coro_un} The time-average AoI achieved by a uniformly random scheduling policy with one-packet buffers (UN-ONE) is at least \begin{equation} \label{un} \bar{h}_{\mathsf{UN}}^{(\infty,N)} \ge N. \end{equation} \end{coro} \begin{IEEEproof} Consider running the UN-ONE policy in system $\mathsf{A0}$ (Lemma \ref{lma0}). Obviously this gives us a lower bound on the UN-ONE performance. In this case, the system state is fully characterized by the AoI of each terminal, and the AoI for each terminal (omitting the terminal index for brevity) evolves as \begin{equation} p_{h,h+1} = \left(1-\frac{1}{N}\right),\,p_{h,1} = \frac{1}{N},\,p_{h,i}=0,\forall i \neq 1, h+1. \end{equation} Note that although the AoI transitions of different terminals are not independent by observing, e.g., only one terminal can be scheduled at each time slot, the time-average AoI in \eqref{aoi_inf} only concerns with the marginal distribution of AoI for each terminal. The AoI transition Markov chain of one terminal is shown in Fig. \ref{fig_un}. \begin{figure}[!h] \centering \includegraphics[width=0.45\textwidth]{aoi_un.pdf} \caption{AoI transition Markov chain under UN-ONE in $\mathsf{A0}$.} \label{fig_un} \end{figure} Therefore, the steady state AoI for each terminal is exponentially distributed with parameter $\frac{1}{N}$. The time-average AoI by running the UN-ONE policy in system $\mathsf{A0}$ is hence $N$. Therefore, \eqref{un} follows immediately. \end{IEEEproof} \begin{remark} Based on Corollary \ref{coro_un}, UN-ONE, which in fact can be seen as a performance lower bound of CSMA scheme without considering the contention time overhead, has a much larger time-average AoI compared with RR-ONE. In particular, when the number of terminals grows large, UN-ONE does not achieve the optimum scaling factor and thus is arbitrarily worse than RR-ONE. \end{remark} \section{Proof of Theorem \ref{thm3}: AoI Stationary Distribution under RR-ONE} \label{sec_sta} Although the time-average AoI under RR-ONE has been derived in Section \ref{sec_air} based on the ASTA property, the steady-state stationary distribution of AoI under RR-ONE is still unclear. To address this issue, it is found that the AoI evolution for each terminal follows a Markov renewal process with a fixed renewal interval of $N$ time slots. Therefore, the steady-state stationary distribution can be derived by first studying the embedded Markov chain. Denote the time since last update of the $n$-th terminal as $\tau_n$, it follows that the age of the packet at the $n$-th terminal, i.e., $A_n$ (the time index is omitted for brevity), conditioned on $\tau_n$ is distributed as (let $A_n = h_n$ denote there is no packet in the $n$-th queue at the time and thus the age after this update does not change) \begin{equation} \label{a_tau} \Pr \left\{A_n = a | \tau_n = \tau \right\} = \lambda_n(1-\lambda_n)^{a}, \, a={0,...,\tau-1}, \nonumber \end{equation} \begin{equation} \label{yn} \Pr\left\{A_n = h_n | \tau_n = \tau \right\} = (1-\lambda_n)^{\tau}. \end{equation} If the terminal-$n$ is scheduled in this time slot, then the AoI of terminal-$n$, i.e., $h_n$, is updated to the realization of $A_n$. Consider $N$ embedded Markov chains which describe the AoI transition for $N$ respective terminals between successive scheduling based on RR-ONE. The state $S$ of the $n$-th Markov chain (the terminal index is omitted for brevity) is defined as the AoI at the scheduled time slot. The transition probability is therefore \begin{IEEEeqnarray}{rCl} && p_{ss^\prime} \triangleq \Pr\left\{S_{k+1} = s^\prime|S_k=s\right\} \nonumber\\ &=& \left\{\, \begin{IEEEeqnarraybox}[][c]{l?s} \IEEEstrut \lambda_n (1-\lambda_n)^{s^\prime-1}, & if $s^\prime \in \{1,...,N\}$;\\ (1-\lambda_n)^N, & if $s^\prime=s+N$; \\ 0, & otherwise, \IEEEstrut \end{IEEEeqnarraybox} \right. \end{IEEEeqnarray} by noticing the fact that the AoI increases by $N$ during successive RR-ONE scheduling and then is updated to a certain value given by \eqref{a_tau}. If no packet is present at the terminal queue, then the AoI is updated to $s^\prime=s+N$. In the following, the resultant steady-state stationary stationary distribution of the Markov chain, denoted by $\mu_n(s)$ where $s=1,2,...$ denotes state value, is derived. It follows that \begin{equation} \mu_n(j) = \sum_{i \in \{1,2,...\}} \mu_n(i) p_{ij}. \end{equation} Since \begin{equation} p_{ij} = \lambda_n (1-\lambda_n)^{j-1},\,\forall i=\{1,2,...\},j \in \{1,...,N\}, \end{equation} the steady-state stationary distribution for the first $N$ states is \begin{equation} \mu_n(j) = \lambda (1-\lambda_n)^{j-1},\,\forall j \in \{1,...,N\}. \end{equation} For the $j$-th state with $j>N$, its previous state must be state $j-N$, and hence \begin{IEEEeqnarray}{rCl} &&\mu_n(j) = \mu_n(j-N)(1-\lambda_n)^N=...=\mu_n(l)(1-\lambda_n)^{mN} \nonumber\\ &=& \lambda_n (1-\lambda_n)^{j-1},\,\forall j = mN + l, \end{IEEEeqnarray} wherein $m$ and $l$ are integers larger or equal to one. Therefore, it has been shown that the steady-state stationary distribution of the Markov chain is a geometric distribution with parameter $\lambda_n$. After addressing the steady state of the embedded Markov chains, we are ready to derive the steady-state stationary distribution of the AoI evolution process $\left\{Y_n(t),\,t=1,2...\right\}$ at all time slots. Notice that it is a Markov renewal process with fixed renewal interval $N$ based on RR-ONE. Moreover, the state evolution between renewal (scheduling) is deterministic; the AoI increases by one every time slot. Therefore, the steady-state stationary distribution of $\left\{Y_n(t),\,t=1,2...\right\}$ is derived as \begin{equation} \label{o4} \mu_n(j) = \sum_{m=1}^{\min[j,N]} q_{n,m,j} = \sum_{m=1}^{\min[j,N]} \frac{1}{N}\lambda_n (1-\lambda_n)^{j-m}, \end{equation} where $q_{n,m,j}$ is the fraction of time that the AoI state transits to state-$(j-m+1)$ at the scheduled time slot and then reaches state-$j$ before the next scheduling. Therefore \begin{equation} j-(j-m+1) \le N-1, \end{equation} such that state-$j$ is within reach, and hence $m \ge N$; this, combining with $m \le j$, explains the minimum operation in \eqref{o4}. The steady-state stationary distribution is hence given in \eqref{eq_dist} after some mathematical manipulations. The time-average AoI can be directly derived from this distribution, i.e., \begin{IEEEeqnarray}{rCl} \label{rr_aoi} \bar{h}_{\mathsf{RR}}^{(\infty,N)} &=& \frac{1}{N} \sum_{n=1}^N \sum_{j=1}^\infty \mu_n(j) j = \frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n} + \frac{N-1}{2}. \end{IEEEeqnarray} This coincides with \eqref{eq_1}. \begin{algorithm}[!t] \caption{DRR} \label{alg:rr} \label{alg:init} Initialization: \\ (Terminals) Set $\gamma_n = n \textrm{ mod } N$, $w_n=N$.\\ (BS) Set $N$ to the number of initial terminals and $W = 1$. \\ (Newly appeared terminals) Set $\gamma_n = 0$, $w_n=1$.\\ At each terminal: \\ \label{alg:start} \If{Packet arrives}{Replace the current queued packet with the new one.} \If{$\gamma_n=0$}{Transmit the queued packet (a blank packet if none).\\Set $\gamma_n \leftarrow w_n$.} \Else{Keep silent in this time slot.} At the BS, after receiving updates:\\ \If{Successful update or a blank update }{Send an ACK.} \ElseIf{Receive nothing}{Send a NACK.} \Else{(Collision) Set $N \leftarrow N+1$. Send a packet indicating a collision, containing information of $N$ and $W$.} Set $W \leftarrow (W-1)$ mod $N$.\\ After receiving feedback at each terminal:\\ \If{Collision}{ \If{Terminal is newly appeared}{$w_n \leftarrow N$, $\gamma_n \leftarrow W$. $\gamma_n \leftarrow \gamma_n - 1$. } \Else{$w_n \leftarrow N$, $\gamma_n \leftarrow N$. $\gamma_n \leftarrow \gamma_n - 1$. } } \ElseIf{NACK}{$w_n \leftarrow w_n-1$. $\gamma_n \leftarrow \gamma_n - 1$. } \Else{ACK received. $\gamma_n \leftarrow \gamma_n - 1$. } Return to Step \ref{alg:start}. \end{algorithm} \section{Decentralized RR-ONE Algorithm} \label{sec_dp} A fully decentralized RR-ONE-based scheduling algorithm (DRR) is proposed in this section. The proposed algorithm is described in Algorithm \ref{alg:rr}, where we assume dynamic terminal appearance. However, we assume at each time slot at most one event can happen: a terminal appears or disappears. The essence of DRR can be summarized as follows. The system always runs a round-robin status update protocol by assigning each terminal a unique time slot ($\gamma_n$) to update and rotating among terminals. Without new terminal appearances or disappearances, the system runs collision-free and every time slot is utilized. The BS feeds an ACK back in this case. Terminals dynamically appear at or disappear from the system. With a new terminal appearance, it updates immediately by design, and causing a collision inevitably since previously all time slots are utilized. The BS then feeds back a common message indicating a collision, with also the information about the current number of terminals (including the newly appeared), i.e., $N$, and the current spot of rotation, i.e., $W$. The new terminal will occupy the newly created time slot at the end of the rotation and the collided time slot still belongs to its original owner, and therefore no collision will happen between the two terminals in the next round. With a terminal (T$0$) disappearance, the BS receives nothing in its time slot. Note that a terminal that does not have any packet to update when it is scheduled would transmit a special blank packet such that the BS can distinguish between terminal disappearance and no packet to update. When T$0$ disappears, the BS then feeds back a NACK. Every terminal in the system then subtracts its record of the number of terminals by one and the next-in-line terminal (T$1$) will occupy T$0$'s spot in the next round. \section{Proof of Theorem \ref{thm2}: Optimal AIR Policy without Packet Management for Peak-AoI Minimization} \label{sec_nopm} Without packet management, the status packets are assumed to be queued with infinite buffers at terminals before transmissions and the service is based on FCFS discipline in this paper. Therefore, all generated packets are eventually transmitted and updated to the BS. This assumption is reasonable in scenarios where not only the latest status is important, but also the BS is interested in keeping all the status data, and their status evolution processes, for analytic purposes. Another reasonable scenario is that terminals cannot apply packet management due to hardware limitations. Note that the ASTA property does not apply in this case, due to the fact that the age of the head-of-line packet at each terminal changes to the next-in-line packet's age when the terminal is scheduled. Therefore, the independence property does not hold in Lemma \ref{lm_asta}; this presents a difficulty in analyzing the time-average AoI. Hence, we resolve to the PAoI metric in this section, which is defined as the AoI just before each update, i.e., the peaks of age evolution in Fig. \ref{fig_aoi}. The time-average PAoI is defined as \begin{equation} \label{paoi} \bar{\Lambda}_{\pi}^{(\infty,N)} \triangleq \lim_{T \to \infty} \frac{1}{N} \sum_{n=1}^N \frac{1}{K^{(T)}_n} \sum_{k_n=1}^{K^{(T)}_n} \Lambda_{n,\pi}(k_n), \end{equation} where $K^{(T)}_n$ denotes the number of status updates of terminal-$n$ up to time $T$, and $\Lambda_{n,\pi}(k_n)$ denotes the PAoI before the $k_n$-th update of terminal $n$ under policy $\pi$. The PAoI metric is used in many previous papers \cite{huang15,costa16} which show that the time-average PAoI can well approximates the AoI when the arrival processes have small second moments \cite[Lemma 1]{huang15}. The following optimization problem is considered. \begin{flalign} \label{p1} \textbf{P1:}&&\mathop{\textrm{minimize}}\limits_{\pi \in \mathcal{U}} \,\,& \bar{\Lambda}_{\pi}^{(\infty,N)} &&\nonumber\\ &&\textrm{s.t.,}\,\, & \textrm{all queues are stable}, && \end{flalign} where $\mathcal{U}$ denotes the set of all policies. The queue stability constraint is added for following reasons: first, queue stability is sufficient to ensure that when $T \to \infty$, $K^{(T)}_n \to \infty,\,\forall n = 1,...,N$, i.e., every terminal keeps updating its status; on the other hand, it is straightforward that a necessary condition for age stability is queue stability, by observing that when a queue is not, e.g., strongly stable \cite{neely10}, the corresponding AoI also goes to infinity since each queued packet increases the AoI at least by one. Note that without the queue stability constraint, optimizing the PAoI is problematic since totally abandoning some terminals may obtain better performance because the PAoI is only counted when updated. The queuing model for each terminal is represented by $M/G/1$ with service process $\mathcal{S}_n$ resulting from a policy $\pi$. Assume the service time of $\mathcal{S}_n$ has finite first- and second-moments which are denoted by $m_n$ and $v_n$, respectively. Based on the P-K formula \cite{bert92}, the time-average PAoI for terminal-$n$ is \begin{IEEEeqnarray}{rCl} \bar{\Lambda}_{n,\pi}^{(\infty)} \overset{(a)}{=} \mathbb{E}[I_n + J_n] &=& \frac{1}{\lambda_n} + m_n + \frac{\lambda_n v_n}{2(1-\lambda_n m_n)} \nonumber\\ &\overset{(b)}{\ge}& \frac{1}{\lambda_n} + \frac{1}{2}\left(\frac{1}{\beta_n-\lambda_n}+\frac{1}{\beta_n}\right), \end{IEEEeqnarray} where $I_n$ and $J_n$ denote the inter-arrival time and the sojourn time of packets in queue-$n$, respectively. The equality in $(a)$ is based on the definition of PAoI \cite{huang15}. The mean service rate $\mathcal{S}_n$ is denoted by $\beta_n$. The last inequality $(b)$ is based on the fact that $v_n \ge m_n^2$, which means that it is best to have a deterministic service process to minimize the mean delay; the same conclusion in fact hold for $GI/G/1$ queuing models \cite{whitt84}. The PAoI minimization problem of \textbf{P1} is thus transformed to \textbf{P2} presented in Section \ref{sec_sm}. Denote the objective function as $f(\bm{\beta}) \triangleq \frac{1}{N} \sum_{n=1}^N f_n(\beta_n)$ where \begin{equation} f_n(\beta_n) \triangleq \frac{1}{\lambda_n} + \frac{1}{2}\left(\frac{1}{\beta_n-\lambda_n}+\frac{1}{\beta_n}\right). \end{equation} Then $f(\bm{\beta})$ is a strictly convex function since \begin{equation} \frac{\textrm{d}^2 f_n(\beta_n)}{\textrm{d}^2 \beta_n} = \frac{1}{(\beta_n-\lambda_n)^3} + \frac{1}{\beta_n^3} > 0,\,\forall n=1,...,N. \end{equation} Combining with the fact that the constraints in \textbf{P2} are all linear constraints, therefore, \textbf{P2} is a convex optimization \cite{boyd09} problem which can be solved efficiently. After obtaining the optimum service rates $\bm{\beta}_\textrm{opt}$, the optimal policy is then to serve every terminal regularly with fixed intervals given by $\bm{\beta}_\textrm{opt}$. Note that this may not be possible with given, possibly irrational number, $\bm{\beta}_\textrm{opt}$. Unfortunately, it seems that closed-form optimal solutions are elusive for \textbf{P2}. We then find a reasonably good closed-form solution in Lemma \ref{lm_ub} (cf. proof in Appendix \ref{app_lemmas}) to shed light on some insights. \begin{lemma} \label{lm_ub} Define the traffic intensity of terminal $n$ as $\rho_n \triangleq \frac{\lambda_n}{\beta_n}$. The minimum time-average PAoI is upper bounded by \begin{equation} \label{ub} f(\bm{\beta}_\textrm{ub}) = \frac{1}{N} \sum_{n=1}^N \left[\frac{1}{\lambda_n} + \frac{1}{2}\left(\frac{N}{\epsilon}+\frac{1}{\frac{\epsilon}{N} + \lambda_n}\right)\right], \end{equation} where $\epsilon \triangleq 1-\sum_{n=1}^N \lambda_n$. This bound is achieved by \begin{equation} \label{ub_app} \beta_{n,\textrm{ub}} = \frac{\epsilon}{N} + \lambda_n,\, \forall n=1,...,N. \end{equation} With heavy traffic, i.e., $\rho_n \to 1$, $\forall n=1,...,N$, this solution is asymptotically optimal. $\hfill\square$ \end{lemma} \begin{remark} By comparing the results in Theorem \ref{thm1} and Lemma \ref{lm_ub} in the asymptotic regime, some insights can be obtained. First, in the massive IoT regime, the optimum scaling factor without packet management is \begin{equation} \lim_{N \to \infty} \frac{f(\bm{\beta}_\textrm{ub})}{N} = \frac{1}{2 \epsilon}. \end{equation} Compared with the optimum scaling factor with packet management, i.e., $0.5$, the packet waiting delay in the queue introduces a multiplicative loss of $1/\epsilon$ which is related to traffic intensity. The optimum scaling laws with diminishing arrival rates are actually identical with and without packet management. This is intuitive since the bottleneck is arrival status update packets in this regime, and packets are rarely queued with or without packet management. \end{remark} \section{Simulation Results} \label{sec_sr} In this section, computer simulation based experiments are conducted to evaluate the AoI performance of scheduling policies. This enables us to obtain the optimum performance numerically by formulating the problem as an Markov decision process (MDP) and solving it by relative value iterations for average cost function \cite{bersk}. Note that, similar with most practical applications, the MDP based approach suffers from the curse of dimensionality and hence only small-scale problems can be solved thereby. Specifically, it is observed that the state space size grows exponentially with the number of terminals, and hence the scalability is significantly limited. Nevertheless, we obtain the minimum time-average AoI of a $2$-terminal case and compare its performance with RR-ONE. An finite-state approximation is made for the MDP which originally has infinite state space; note that the AoI can grow to infinity. However, the optimality is intact by arguing that the optimal policy given by solving the finite state MDP does not allow the AoI grows to our prescribed AoI limit. The state space of the MDP is defined as \begin{equation} (h_1,\,a_1) \times (h_2,\,a_2), \end{equation} where $h_i$ denotes the AoI at the BS for terminal $i$, $a_i$ denotes the age of the packet at terminal $i$ (assuming the terminal adopts the one-packet buffer packet management policy), and $1 \le h_i,a_i \le h_\textrm{max}$, $i=1,2$, where $h_\textrm{max}$ is the age limit. The transition probability matrix follows straightforwardly; it is omitted here for brevity, along with the relative value iteration procedure which is well known. The performance of RR-ONE is obtained by running RR-ONE for $10^5$ time slots and calculating the time-average AoI. In addition, we also simulate UN-ONE which schedules a terminal uniformly random at each time slot, and an age-greedy policy which chooses the terminal with the largest AoI. In fact, UN-ONE can be regarded as the CSMA scheme which is shown to be optimal to maximize throughput with greedy sources. The age-greedy policy is found optimal without considering random packet arrivals \cite{kadota16}. \begin{figure}[!t] \centering \includegraphics[width=0.45\textwidth]{mdp} \caption{Performance comparisons among lower bounds in Lemma \ref{lma0} and \ref{lma1}, MDP-based optimum, UN-ONE, age-greedy policy and RR-ONE. There are $2$ terminals with identical packet arrival rate (x-axis).} \label{fig_mdp} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.45\textwidth]{mdp_fixed1.pdf} \caption{Performance comparisons with heterogeneous arrival rates. There are $2$ terminals; $\lambda_2=0.5$ and $\lambda_1$ is shown as the x-axis.} \label{fig_mdp_1} \end{figure} It is observed from Fig. \ref{fig_mdp} that the performance gap between RR-ONE and the optimum given by numerically solving the MDP is larger with lower packet arrival rates; on the other hand, RR-ONE achieves the optimum when $\lambda$ approaches one based on Remark \ref{one_remark}. Since RR-ONE is proved optimal among AIR policies, the optimal scheduling policy with low packet arrival rates must be a non-AIR policy. Specifically, the following intuition explains this. Suppose that the probability of both terminals having arrival packets in the same time slot is negligible when arrival rates are sufficiently low; then the optimal policy is immediately obvious that it should schedule the terminal with a packet arrival at each time slot; note that this policy is not an AIR policy because the scheduling decision depends on packet arrivals which violates Condition $1$ of AIR policy definition. The optimum performance in this case is also obvious; it should be the same with what is shown in Lemma \ref{lma1}, i.e., completely determined by the inter-arrival time of packets and this can be observed from Fig \ref{fig_mdp}. Nevertheless, it is noted that the performance gap is bounded (within $0.5$ time slots) in this $2$-terminal case by observing the RR-ONE performance and performance bound in Lemma \ref{lma1}. Fig. \ref{fig_mdp_1} shows the performance with heterogeneous packet arrival rates for terminals; the arrival rate $\lambda_1$ is fixed to $0.5$ packets per time slot and $\lambda_2$ varies from $0.3$ to $1$. The bounded gap is still within $0.5$ time slots, despite the fact that RR-ONE disregards the heterogeneity of arrival rates completely. Nonetheless, it is observable that the gap between optimum and RR-ONE is larger compared with Fig. \ref{fig_mdp}. Moreover, the gap between RR-ONE and the age-greedy policy is relatively larger when the arrival rates difference between terminals increases, showing that the age-greedy is more sensitive to arrival statistics heterogeneity. \begin{figure}[!t] \centering \includegraphics[width=0.45\textwidth]{rrone_N.pdf} \caption{Performance comparisons with a large number of terminals; the arrival rates are uniformly randomly generated from $[0,1]$.} \label{fig_rr_N} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.45\textwidth]{unone.pdf} \caption{Performance comparisons with a large number of terminals and no packet management; the arrival rates are identical for all terminals, and $\epsilon=0.1$ in Lemma \ref{lm_ub}.} \label{fig_un_N} \end{figure} We increase the number of terminals and enter the massive IoT regime in Fig. \ref{fig_rr_N}. The MDP-based optimal solution is computationally intractable in this regime and hence we adopt the myopic policy with GSI as an approximation of the optimum. The myopic policy with GSI leverages all the global information (though no future knowledge) to make a scheduling decision that minimizes the one-step expected AoI cost in the MDP formulation; by comparing it with RR-ONE helps us to understand how much GSI benefits RR-ONE. Based on Fig. \ref{fig_rr_N}, it is shown that the myopic policy with GSI outperforms RR-ONE only slightly, due to the reason that the packet management of using one-packet buffers eliminates most of the randomness of packet arrivals; most packets are dropped by packet management due to staleness and hence their randomness has no effect. The performance of UN-ONE is also shown; it has been proved in Corollary \ref{coro_un} that its linear scaling factor is (at least) $1$ compared with $1/2$ for RR-ONE; this can be observed in the figure. In Fig.\ref{fig_un_N}, policies without packet management are simulated. The arrival packets are queued at terminals and all arrived packets have to be delivered to the BS. The optimal AIR policy RR-$\bm{\lambda}$ in this case is compared with random scheduling and myopic policy with GSI in the figure. It is observed that, without packet management, the gap between the myopic policy with GSI and the optimal AIR policy RR-$\bm{\lambda}$ is much larger compared with that (between myopic policy with GSI and RR-ONE) in Fig. \ref{fig_rr_N}; in fact different asymptotic scaling factors are found in Fig. \ref{fig_un_N}. The intuition behind this is that the packet arrival randomness has much larger impact if all packets are queued; therefore the GSI in this case is more valuable compared with the case with packet management whereby most randomness is eliminated. The performance advantage of RR-$\bm{\lambda}$ over uniformly random scheduling is still evident. Note that by setting all arrival rates to be identical and the associated parameters in Fig. \ref{fig_un_N}, all three policies can stabilize the system; it is pointless to evaluate a policy that cannot stabilize the system since it would lead to infinite AoI. \section{Conclusions and Discussions} \label{sec_cl} In this paper, it is found that with a number of terminals sharing a common wireless uplink based on a collision model and random packet arrivals at each terminal, the optimal AIR policy to minimize the time-average AoI is RR-ONE, i.e., scheduling terminals in a round-robin fashion and each terminal only retains the most up-to-date packet. In the asymptotic regime where the number of terminals is large, the optimum (among all policies) time-average AoI is proved to scale linearly with the number of terminals with the optimum scaling factor of $\frac{1}{2}$, and RR-ONE achieves the optimum asymptotically. The steady-state stationary distribution of the AoI of each terminal under RR-ONE is also derived. In addition to establishing the optimality, we propose a full-fledged decentralized algorithm to implement RR-ONE which accounts for dynamic terminal appearances. Considering the scenario where the entire procedure of status variation is requested, i.e., packets cannot be dropped, the optimal AIR policy without packet management, namely RR-$\bm{\lambda}$, is also derived; it schedules terminals based on deterministic scheduling intervals $m_n$, $n=1,...,N$, with $m_n$ given by the solution of a convex optimization problem. Both RR-ONE and RR-$\bm{\lambda}$ are suitable for decentralized implementation since they require minimal information for scheduling decisions. Based on numerical simulations, it is observed that extra global information hardly benefits RR-ONE; on the other hand, it benefits RR-$\bm{\lambda}$ much more evidently (also linear scaling of AoI with the number of terminals but with a smaller scaling factor). This stems from the fact that the aggressive packet management by RR-ONE significantly eliminates the randomness of packet arrivals since a considerable share of packets are dropped due to staleness; however this randomness accumulates and has a more noticeable effect without packet management by RR-$\bm{\lambda}$. The extra global information for scheduling is mainly to deal with the arrival randomness, and therefore it is less valuable to RR-ONE compared with RR-$\bm{\lambda}$. The packet management of RR-ONE essentially ``hardens'' the packet arrival processes, i.e., making them more deterministic, by observing that the performance of RR-ONE is analogous with that of deterministic packet arrivals (comparing Lemma \ref{lma0}, Lemma \ref{lma1} and Theorem \ref{thm_air}). \appendices \section{Myopic Policy with GSI is not Optimal with Finite Horizon} \label{app1} In this section, we assume that the BS knows the current ages of packets of all terminals and the arrival distributions, i.e., $\lambda_i$, $i \in \{1,...,N\}$ to make a centralized scheduling decision. In this case, it will be shown the myopic policy is not optimal by constructing a counter example. Consider a case with a time horizon $T=2$, and the number of terminals is $N=2$. The arrival rates for terminal $1$ and $2$ are $\lambda_1 = \delta$ and $\lambda_2 = 1-\delta$, respectively, and $0<\delta<1$. The initial ages are set as $h_i(0)$, $i=1,2$, and the initial age gains of the packets in the queues are $g_i(0)$, $i=1,2$. Assuming the following conditions are met: \begin{equation} \frac{g_2(0)}{2} < g_1(0) < g_2(0), \end{equation} \begin{equation} h_2(0) - g_2(0) > h_1(0), \end{equation} then the expected average age under the myopic policy, which always schedules the terminal with the largest $g_n(t)$ at time $t$, is shown here \begin{IEEEeqnarray}{rCl} \label{ex1} &&\frac{1}{4}\left(h_{1,\textrm{mo}}(1)+h_{1,\textrm{mo}}(2)+h_{2,\textrm{mo}}(1)+h_{2,\textrm{mo}}(2)\right) \nonumber\\ &=& C - \frac{1}{4}\left(g_2(0) + \delta(1-\delta)(h_2(0)+1) \right. \nonumber\\ && + \delta^2 (g_2(0) + h_1(0)+1) + \delta(1-\delta)(g_1(0)+g_2(0)) \nonumber\\ && \left.+ (1-\delta)^2(h_2(0)+1) \right) \nonumber\\ &=& C - \frac{1}{4}\left(g_2(0) + h_2(0)+1 + \delta (g_1(0)-g_2(0)) \right. \nonumber\\ && \left.+ \delta^2 (h_1(0) + 1 - g_1(0))\right), \end{IEEEeqnarray} and the expected average age under the optimal policy, which is not hard to figure out in this simple case, is \begin{IEEEeqnarray}{rCl} \label{ex2} &&\frac{1}{4}\left(h_{1,*}(1)+h_{1,*}(2)+h_{2,*}(1)+h_{2,*}(2)\right) \nonumber\\ &=& C - \frac{1}{4}\left(g_1(0) + \delta(1-\delta)(g_1(0)+h_2(0)+1) \right.\nonumber\\ && + \delta^2 (g_1(0) + g_2(0)) + \delta(1-\delta)(g_1(0)+g_2(0)) \nonumber\\ && \left.+ (1-\delta)^2(g_1(0)+h_2(0)+1) \right) \nonumber\\ &=& C - \frac{1}{4}\left(2g_1(0) + h_2(0)+1 - \delta (h_2(0) + 1 - g_2(0))\right),\nonumber\\ \end{IEEEeqnarray} where \begin{equation} C=\frac{1}{2}\left(h_{1}(0) + h_{2}(0)\right) + 1.5. \end{equation} By setting the parameter $\delta$ sufficiently small, we can see that the average age of the myopic policy is strictly smaller than the optimal policy which schedules terminal $1$ at the first time slot although the current myopic choice is terminal $2$. \section{Proof of Lemmas} \label{app_lemmas} \begin{IEEEproof}[Proof of Lemma \ref{lm_0}] \label{proof_lm0} It is straightforward that the performance of a non-WCNC policy is stochastically dominated by a WCNC policy which is identical to the non-WCNC policy, except that the WCNC policy schedules an arbitrary terminal (resp. schedules one of the terminals) when the non-WCNC policy is idle (resp. schedules multiple terminals resulting in collisions). \end{IEEEproof} \begin{IEEEproof}[Proof of Lemma \ref{lm_1}] \label{proof_lm1} At each time slot, the probability of a packet arrival is $\lambda$ and therein the age decreases to one; otherwise, with probability $1-\lambda$, the age increases by one. The Markovian property holds obviously. The steady-state stationary distribution is hence a geometric distribution with parameter $\lambda$. \end{IEEEproof} \begin{IEEEproof}[Proof of Lemma \ref{lma0}] Consider a system $\mathsf{A0}$ wherein the AoI after each update is fixed to one, instead of determined by the random arrival packets. Then for any scheduling policy $\pi$, we have \begin{equation} \label{o2} \bar{h}_{\pi}^{(T,N)} \ge \bar{h}_{\pi,\mathsf{A0}}^{(T,N)}, \end{equation} where $\bar{h}_{\pi,\mathsf{A0}}^{(T,N)}$ denotes the time-average AoI of policy $\pi$ in system $\mathsf{A0}$. The proof for \eqref{o2} is simply based on stochastic dominance, and currently omitted for brevity. By \cite[Theorem 1]{kadota16}, the optimal policy in $\mathsf{A0}$ is the age-greedy policy by noticing that no asymmetric transmission failure or weights are considered in this paper. Therefore it is straightforward to derive the optimum time-average AoI in $\mathsf{A0}$ since no randomness exists. The optimum AoI in $\mathsf{A0}$ is therefore \begin{equation} \bar{h}_{\textrm{opt},\mathsf{A0}}^{(\infty,N)} = \frac{N+1}{2}, \end{equation} It is sufficient to consider the optimal scheduling scheme in $\mathsf{A0}$ to obtain a AoI lower bound since all scheduling schemes perform better in $\mathsf{A0}$ compared with a system with random packet arrivals. The conclusion follows immediately. \end{IEEEproof} \begin{IEEEproof}[Proof of Lemma \ref{lma1}] To prove this result, we consider a collision-free system $\mathsf{A1}$ wherein the uplink transmissions can be multiplexed, i.e., an arbitrary number of terminals can update successfully in the same time slot. It is obvious that, similar with Lemma \ref{lma0}, for any policy $\pi$, \begin{equation} \label{o3} \bar{h}_{\pi}^{(T,N)} \ge \bar{h}_{\pi,\mathsf{A1}}^{(T,N)}. \end{equation} It is also obvious that the time-average AoI in system $\mathsf{A1}$ is the time-average packet inter-arrival time at terminal queues. Therefore, the conclusion follows immediately. \end{IEEEproof} \begin{IEEEproof}[Proof of Lemma \ref{lm_ub}] Since \textbf{P2} is minimizing the PAoI over all $\beta_n$, by setting $\beta_n = \beta_{n,\textrm{ub}}$ we can obtain the upper bound in Lemma \ref{lm_ub}. In the heavy traffic regime, \begin{IEEEeqnarray}{rCl} f(\bm{\beta}) &=& \frac{1}{N} \sum_{n=1}^N \frac{1}{\lambda_n} + \frac{\rho_n}{2\lambda_n}\left(1+\frac{1}{1-\rho_n}\right) \nonumber\\ &\overset{\rho_n \to 1}{\longrightarrow}& \frac{1}{N} \sum_{n=1}^N \frac{1}{2 \lambda_n (1-\rho_n)}. \end{IEEEeqnarray} The optimum solution in the heavy traffic regime is therefore $\beta_{n,\textrm{ub}}$, $\forall n=1,...,N$ by applying the arithmetic-harmonic-mean inequality. \end{IEEEproof} \bibliographystyle{ieeetr}
\section*{Abstract} Community analysis is an important way to ascertain whether or not a complex system consists of sub-structures with different properties. Avoiding the shortages of computation complexity and pre-given assumption, in this paper, we give a two level community structure analysis for the SSCI journal system by most similar node pairs. Five different strategies for the selection of node pairs are introduced. The efficiency is checked by normalized mutual information technique. Statistical properties and comparisons of the community results show that both of the two level detection could give instructional information of the community structure of complex systems. Further comparisons of the five strategies indicates that, it is always efficient to assign nodes with maximum similarity into the same community whether the similarity information is complete or not, while rational random selection with too much information and random selection generate small world local community with no inside order. These results give valuable indication for efficient community detection by most similar node pairs. \section*{Introduction} Communities are supposed to play special roles in the structure-function relationship. Individuals that share common properties self-organize into communities. For examples, the communities in WWW are sets of web pages sharing the same topic~\cite{1}; the modular structure in biological networks are widely believed to play important roles in biological functions~\cite{2,3,4,5}. The identification of community structure helps when analyzing the functionalities and organizations of complex systems. Complex network has attracted considerable attention in physics and other fields as a foundation for the mathematical representation of a variety of complex systems, such as biology~\cite{6}, sociology~\cite{7}, medicine~\cite{8}, web~\cite{9}, and many others~\cite{10}. In the field of complex network study, communities are defined as groups of nodes that are densely interconnected but only sparely connected with the rest of the network~\cite{2,11,12,13}. With this network based definition, researchers have proposed different algorithms for the detection of communities, such as topology based methods~\cite{2,14}, modularity optimization~\cite{15,16}, dynamic label propagation~\cite{17,18,19}, statistical inference~\cite{20,21,22}. Community detection is also called cluster analysis which is done with different kinds of relationships. Specifically, cluster analysis is the assignment of a set of observations into clusters of components that are similar to each other but different from components in other clusters. It is often used to ascertain whether a complex system comprises a set of distinct clusters, each representing components with substantially different properties. On the basis of cluster analysis, some emerging community detection methods are also proposed~\cite{25,26,27,28}. Community detection by most similar node pairs has been proposed as an efficient method for community analysis~\cite{29,30}. In this paper, we give a two level community structure analysis for the SSCI journal system with five strategies for the selection of most similar node pairs. Emerging characteristic numbers of core-community and real-community correspond to two community detection level: diverse core level and small world real level, which provide different resolution scales for viewing the system and might be helpful in understanding the mutual interactions among various knowledge fields. The efficiency is further checked by normalized mutual information technique. Statistical properties and comparisons of the community results show that both the core and real community could give valuable information for the community structure of complex systems. Further comparisons of the five strategies indicates that it is always efficient to assign nodes with maximum similarity into the same community. \section*{The method} In real-life systems, communities are constructed by individuals with the choosing of friends. And this choosing process are based on individual's judgment of its relationship with the surroundings. Most probably, individual chooses the one who is most similar to it or the one satisfy its expectation mostly. So that it might be a good choice to reconstruct and detect communities by the most similar pairs. That means, detecting communities by formalizing those relationships or those components believed to be the most significant. And similarity can be different kinds of interaction according to the properties of complex systems. For examples, internet users with common interests~\cite{32}, social communities with distinctive social norms~\cite{33}, related proteins to execute specific functions~\cite{34}. The property of a scientific journal system can be well described by the citation pattern of its articles. Journals in the same research field usually have similar citation patterns, while journals in different research fields could have very different citation patterns. The citation pattern of a journal is described by a citation frequency vector $v_{i}$, where $i$ runs over all journals in consideration. The collection of all citation pattern vectors forms a citation matrix $\{N_{ij}\}$. By this citation pattern matrix, we calculate the similarity of two journals $i$ and $j$ in the cosine measure: \begin{eqnarray} \label{eq:schemeP} S_{ij}=\frac{v_{i}\cdot v_{j}}{\|v_{i}\|\|v_{j}\|}=\frac{\sum\limits_{k\in\Omega}(c_{ik}c_{jk})}{\sqrt{\sum\limits_{k\in\Omega}(c_{ik}^2)}\cdot\sqrt{\sum\limits_{k\in\Omega}(c_{jk}^2)}} \end{eqnarray} Where $c_{ik}=N_{ik}/(\sum\limits_{j\in\Omega}N_{ij})$ is the normalized citation matrix element, and the value of $S_{ij}$ ranges from 0 to 1. Such that closely related journals have strong similarity while remotely related journals have small similarity. The detection process is carried out in the following steps: {\bf Step 1: Selection of node pairs.} Find the journal or journals with maximum similarity for each journal and record their similarity in a decreasing list (MAX strategy). If there is more than one journal that has the same maximum similarity with the same journal, all these most similar journals will be assigned into the same community. This step results in most similar node pairs of size $O(N)$ ($N$ is the total number of journals), which reduces the computation complexity from $O(N^{2})$ to $O(N)$. \begin{table}[!ht] \begin{adjustwidth}{-2.25in}{0in} \centering \caption{ {\bf Example selected node pairs in decreasing order of the similarity.}} \begin{tabular}{|l|l|l|l|l|l|l|l|} \hline node & node & similarity \\ \hline 2 & 3 & 0.4988\\ 3 & 2 & 0.4988\\ 5 & 10 & 0.3311\\ 10 & 5 & 0.3311\\ 1 & 2 & 0.2211\\ 6 & 9 & 0.2209\\ 9 & 5 & 0.2109\\ 8 & 10 & 0.1667\\ 4 & 8 & 0.1521\\ 7 & 1 & 0.1456\\ \hline \end{tabular} \label{table1} \end{adjustwidth} \end{table} {\bf Step 2: Community detection.} Communities are constructed by starting from the node pair with the maximum similarity and then including more node pairs from the list. In this example (Table~\ref{table1}), to begin with, node 2 and 3 form the first core-community $CCom_{1}=\{2,3\}$. Then node 5 and node 10 form the second core-community $CCom_{2}=\{5,10\}$. $CCom_{1}$ grows by including node 1 through its connection with node 2 and results in $CCom_{1}=\{2,3,1\}$. Then node 6 and node 9 form the third core-community $CCom_{3}=\{6,9\}$. Tide (9,5) connects $CCom_{2}$ and $CCom_{3}$. Node 8 is included into $CCom_{2}$ through its connections with node 10 results in $CCom_{2}=\{5,10,8\}$. Similarly, node 4 is added to $CCom_{2}$, node 7 is added to $CCom_{1}$. $CCom_{1}=\{2,3,1,7\}.$ $CCom_{2}=\{5,10,8,4\}.$ $CCom_{3}=\{6,9\}.$ $Tide:\{9,5\}.$ $RCom_{1}=CCom_{1}=\{2,3,1,7\}.$ $RCom_{2}=\{CCom_{2},CCom_{3}\}=\{5,10,8,4,6,9\}.$ Tides are the selected node pairs that connect different core-communities. The tide (9,5) causes the merging of $CCom_{2}$ and $CCom_{3}$ into the real-community $RCom_{2}$. Core- and real- community correspond to two community detection level: diverse core level and small world real level. Diverse core level is the normal state of complex systems, while small world real level stands for the hidden inside community structure of complex systems. Further detection could be done by regarding the detected communities as coarse-grained components. Then the coarse-grained system comprising these renormalized components can be further classified by steps 1 and 2. \section*{Results And Analysis} The citation data analyzed in this work are extracted from the CD version of Institute of Scientific Information journal citation report of SSCI dataset. There are 1575 journals have nonzero citation or cited contents, totally 837,001 citations. Without pre-given assumptions, the above MAX strategy detection generates the same number of 294 core- and real- communities, no tides. The results indicate that the communities at this resolution have weak intersections or interrelationships. This is because of the accurate measure of the similarity matrix. Detailed analysis of these 294 communities could be found in Ref.~\cite{29}. In order to explore the diversity of the SSCI journal system, two kinds of randomness are introduced in the selection of node pairs (step 1): rational random selection strategy (PSIM) and random selection strategy (P), where PSIM selects one node for every journal with a probability in proportion to similarity: \begin{eqnarray} \label{eq:schemeP} p_{ij}=S_{ij}/(\sum_{k=1}^{N}S_{ik}) \end{eqnarray} And P selects one node for each journal randomly. After selection, all the selected node pairs are sorted according to similarity in decreasing order, and community detection is carried out by step 2. \begin{figure}[!h] \centering \renewcommand{\figurename}{Fig} \caption{{\bf Evolution of the average number of core-community, real-community and tide at different probability of PSIM and P vs. MAX.} PSIM-CCom, PSIM-RCom and PSIM-tide are the average number of core-community, real-community and tide at different probability of rational random selection strategy PSIM; P-CCom, P-RCom and P-tide are the average number of core-community, real-community and tide at different probability of random selection strategy P.} \label{fig1} \end{figure} Fig~\ref{fig1} is the evolution of the average number of two level communities and tides at different probability of PSIM and P strategy vs. MAX strategy. The number of core-communities and tides increase with the probability of randomness, whether the node pairs is selected by PSIM or P, while the number of real-communities is decreasing. The trend of the evolution shows that random P strategy brings diverse small world with less real-communities and more core-communities. And the rational randomness PSIM results in a more rational world with less core-communities and more real-communities than P. This is in accordance with the former research in complex networks that random generates small world network with no insider order~\cite{35}. However, the superiority of PSIM is not overwhelming. Further comparisons of PSIM and P are given by the detailed analysis of the community results below. \begin{figure}[!h] \centering \renewcommand{\figurename}{Fig} \caption{{\bf Evolution of the average NMI the community results at different probability of PSIM or P vs. MAX.} (a) is the evolution of NMI at different probability of PSIM or P vs. MAX. PSIM-CCom and PSIM-RCom are the NMI of core- and real-community results at different probability of PSIM vs. MAX; P-CCom and P-RCom are the NMI of core- and real-community results at different probability of P vs. MAX. (b) is the evolution of NMI at different probability of PSIM vs. P. CCom is the NMI of the ore-community and RCom is the NMI of the real-community.} \label{fig2} \end{figure} By setting the detected 294 communities with MAX strategy as standard community results, Fig~\ref{fig2} gives the evolution the average normalized mutual information (NMI) of the community detection results at different probability of PSIM and P vs. MAX. NMI is an efficient measure to evaluate community detection results~\cite{12}. It is defined as: \begin{eqnarray} \label{eq:schemeP} NMI(X,Y)=\frac{H(X)+H(Y)-H(X,Y)}{(H(X)+H(Y))/2} \end{eqnarray} Where the 294 communities generated by MAX strategy are the standard structure Y, X is community structure detected with PSIM and P. H(x) and H(Y) are the entropy of community X and Y, H(X,Y) is the joint entropy of X and Y. Fig~\ref{fig2}(a) shows that, the NMI of core-communities decreases slowly and keep a high value above 0.7. And the NMI of real-community decreases fast to lower than 0.1. NMI of PSIM is always larger than P, it means that the communities generated by rational PSIM is always closer to the standard structure generated by MAX. However, rational random selection PSIM does not exhibit obvious superiority than simple random selection P strategy. And the closeness of PSIM-CCom and P-CCom shows that, the difference between the core-community structure for being rational or not is very small. More difference happens in the real-community structure. Fig~\ref{fig2}(b) is the evolution of the average normalized information of the community results at different probability of PSIM vs. P. The NMI of PSIM is $(0.7177-0.7057)/0.7057=1.7\%$ higher than P for the core-community, and $(0.1373-0.0803)/0.0803=70.98\%$ higher for the real-community. This confirms the fact that random connection generates small world local community with no inside order. \begin{figure}[!h] \centering \renewcommand{\figurename}{Fig} \caption{{\bf Evolution of NMI with the increase of the number of available nth most similar journals.} CCom is the NMI of core-commuity, and RCom is the NMI of real-community.} \label{fig3} \end{figure} Considering the slight superiority of PSIM in the above community detection process with complete similarity information We test two more strategies for the selection of node pairs. PSIM with limited number of nth most similar journals and MAX with different proportion of random deletion of similarity information. \begin{figure}[!h] \centering \renewcommand{\figurename}{Fig} \caption{{\bf Evolution of NMI at different proportion of random deletion of similarity for each journal.} CCom is the NMI of core-commuity, and RCom is the NMI of real-community..} \label{fig4} \end{figure} For the PSIM with limited nth most similar journals, Fig~\ref{fig3} is the evolution of NMI with the increase of the number of available journals in the decreasing order of similarity. The average NMI decrease quickly with the increase of available nth most similar journals. Incorporating with former results shown in Fig~\ref{fig2}, we can get the conclusion that it is not a good idea to detect community structure by PSIM strategy with too much information. For the 1575 SSCI journal system, the average NMI of real-community decreases below 0.5 after 30th available journals. Finally, we test the efficiency of MAX selection with random deletion of similarity. Fig~\ref{fig4} is the evolution of average NMI with different proportion of random deletion of similarity for each journal. Fig~\ref{fig4} shows that MAX strategy is the only strategy which keeps the average NMI of real-community above 0.5, while the average NMI of core-community is bigger than 0.75 even $90\%$ of the similarity information are deleted. \section*{Conclusion} In this paper, we give a two level community detection for the SSCI journal system. Emerging characteristic numbers of core-community and real-community correspond to the two community detection level: diverse core level and small world real level. Diverse core level is the normal state of complex systems with big number of small communities, while small world real level stands for the hidden inside community structure of complex systems with small number of big communities. During the community detection process, we test five different strategy for the selection of node pairs. Comparison of the normalized mutual information show that, rational random selection (PSIM) is better than random selection (P) in finding stable community structure. However, rational random selection with too much information is almost the same with completely random selection. And maximum selection (MAX) is always the best strategy for community detection with complete or incomplete information. MAX strategy can not only overcome the resolution limit of modularity optimization~\cite{31}, but also detect uni-community. The success of maximum selection with incomplete information might indicates its efficiency in community detection for growing complex system. We will do further community detection for growing complex systems to demonstrate the efficiency of maximum selection with incomplete information. Advanced and detailed analysis of the evolution of tides will also be done in our future work to explore the overlapping property of community structure. \section*{Acknowledgments} This work is supported by National Natural Science Foundation of China (Grant No. 11547003), and China Scholarship Council (Grant No. 201607620007).
\section{Introduction} Paths are a fundamental concept in graph theory and its applications. Many textbooks define a path in a directed graph to be a sequence of vertices such that successive vertices in the sequence are connected by an edge of the graph; see \cite{Harary1969,CormenLeisersonRivest1990,Berge2001}. A simple path is one whose vertices are distinct; a cycle is one whose first and last vertices are identical. There are variations in terminology, but definitions of paths are mostly based on sequences. An alternative approach is to define a path as a subgraph of edges that is connected such that every vertex has at most one incoming edge and at most one outgoing edge; this is considered, for example, in \cite{Tinhofer1976,Diestel2005}. The aim of the present paper is to derive a theory of paths in directed graphs based on this alternative definition and to show how it can be used to verify the correctness of graph algorithms. Paths according to this definition correspond to simple paths when considered as sequences of vertices; this paper is not concerned with more general kinds of paths. The main motivation for using subgraphs instead of sequences is that the former allow us to reason about paths as special kinds of graphs using the well-established framework of relation algebra. Specifically, the edge set $E$ of a directed graph is a subset of the Cartesian product $A \times A$, where $A$ is the set of vertices, and therefore $E$ is a (homogeneous) relation on the set $A$. Hence both paths and graphs correspond to relations, and relational concepts and methods can be used to work with them in a unified setting. We are particularly interested in exploiting the algebraic structure of relations, in order to concisely express properties of graphs and reason about graphs using equational, calculational proofs. Such proofs can be easily mechanised and formally verified using automated theorem provers and interactive proof assistants \cite{HoefnerStruth2008,BerghammerStruth2010,BerghammerEtAl2014,FosterStruthWeber2011,Relation_Algebra-AFP,Pous2016}. Relation algebras have been proposed by De Morgan, Peirce, Schr\"oder and Tarski to express a rich fragment of first-order logic algebraically without using variables and quantifiers \cite{Tarski1941}; recent textbooks are \cite{HirschHodkinson2002,Maddux2006}. Besides for logical foundations, relational methods have been used for program analysis \cite{DesharnaisMoellerStruth2011,Guttmann2016a}, refinement \cite{Wright2004}, databases \cite{OkumaKawahara2000}, preference modelling \cite{Schmidt08,MoellerEtAl12}, algorithm development \cite{FriasAguayoNovak1993,BackhouseEtAl94,Berghammer1999,Guttmann2018b} and many other applications; for example, see \cite{COST1,COST2,ScolloFrancoManca06,Schmidt12,Mueller12,Moeller13}. \pagebreak Relations and relation algebras have been used for a wide range of topics in graph theory \cite{SchmidtStroehlein1993,BerghammerHoffmann2001,Schmidt2011,BerghammerHoefnerStucke2015,Glueck2017}. By defining paths as subgraphs, we can reuse the well-developed theory of relation algebras and reason about paths without resorting to variables and quantifiers. The present paper studies paths using relation-algebraic means. Its contributions are: \begin{itemize} \item[--] Equational characterisations of various classes of paths including cycles, finite paths, one-sided and two-sided infinite paths in Sections \ref{section.paths}--\ref{section.cycles}. An overview of the classification is shown in Figure \ref{fig:class} and discussed below. \item[--] Relation-algebraic specifications and correctness proofs of a number of basic graph algorithms that rely on paths in Section \ref{section.verification}. \item[--] Relation-algebraic characterisations of paths with designated roots and their equivalence to paths without roots in Section \ref{section.roots}. \end{itemize} All concepts, theorems and algorithms described in this paper have been implemented in Isabelle/HOL \cite{NipkowPaulsonWenzel2002}. All results have been formally verified in this system making heavy use of its integrated automated theorem provers and SMT solvers \cite{PaulsonBlanchette2010,BlanchetteBoehmePaulson2011}. We omit the proofs, which can be found in the theory files under preparation for the Archive of Formal Proofs and currently available at \url{http://www.csse.canterbury.ac.nz/walter.guttmann/algebra/}. \begin{figure} \begin{center} \begin{tikzpicture} \draw (0,0) rectangle (12,9); \begin{pgfinterruptboundingbox} \begin{scope} \path[invclip] (7.5,4.5) circle [radius=3.6cm]; \draw (4.5,4.5) circle [radius=3.6cm]; \end{scope} \begin{scope} \path[invclip] (4.5,4.5) circle [radius=3.6cm]; \draw (7.5,4.5) circle [radius=3.6cm]; \end{scope} \begin{scope} \path[invclip] (7.5,4.5) circle [radius=3.6cm]; \draw (4.5,4.5) circle [radius=3.5cm]; \end{scope} \begin{scope} \clip (4.5,4.5) circle [radius=3.5cm]; \draw (7.5,4.5) circle [radius=3.6cm]; \end{scope} \begin{scope} \path[invclip] (4.5,4.5) circle [radius=3.6cm]; \draw (7.5,4.5) circle [radius=3.5cm]; \end{scope} \begin{scope} \clip (7.5,4.5) circle [radius=3.5cm]; \draw (4.5,4.5) circle [radius=3.6cm]; \end{scope} \begin{scope} \clip (4.5,4.5) circle [radius=3.5cm]; \path[invclip] (6.0,7.0) circle [radius=3.6cm]; \draw (7.5,4.5) circle [radius=3.5cm]; \end{scope} \begin{scope} \clip (7.5,4.5) circle [radius=3.5cm]; \path[invclip] (6.0,7.0) circle [radius=3.6cm]; \draw (4.5,4.5) circle [radius=3.5cm]; \end{scope} \begin{scope} \clip (4.5,4.5) circle [radius=3.5cm]; \clip (6.0,7.0) circle [radius=3.5cm]; \path[invclip] (6.0,9.5) circle [radius=3.6cm]; \draw (7.5,4.5) circle [radius=3.5cm]; \end{scope} \begin{scope} \clip (7.5,4.5) circle [radius=3.5cm]; \clip (6.0,7.0) circle [radius=3.5cm]; \path[invclip] (6.0,9.5) circle [radius=3.6cm]; \draw (4.5,4.5) circle [radius=3.5cm]; \end{scope} \end{pgfinterruptboundingbox} \begin{scope} \clip (4.5,4.5) circle [radius=3.5cm]; \clip (6.0,9.5) circle [radius=3.5cm]; \draw (7.5,4.5) circle [radius=3.5cm]; \end{scope} \begin{scope} \clip (7.5,4.5) circle [radius=3.5cm]; \clip (6.0,9.5) circle [radius=3.5cm]; \draw (4.5,4.5) circle [radius=3.5cm]; \end{scope} \begin{scope} \clip (4.5,4.5) circle [radius=3.5cm]; \clip (7.5,4.5) circle [radius=3.5cm]; \draw (6.0,7.0) circle [radius=3.6cm] (6.0,7.0) circle [radius=3.5cm] (6.0,9.5) circle [radius=3.6cm] (6.0,9.5) circle [radius=3.5cm]; \end{scope} \draw[fill] (5.0,3.0) circle (0.3mm) (6.0,3.0) circle (0.3mm) (7.0,3.0) circle (0.3mm); \path[->] (4.6,3.0) edge [-,dotted,thick] (5.0,3.0) (5.0,3.0) edge (5.97,3.0) (6.0,3.0) edge (6.97,3.0) (7.4,3.0) edge [-,dotted,thick] (7.0,3.0); \draw[fill] (2.0,4.0) circle (0.3mm) (2.5,5.0) circle (0.3mm) (3.0,6.0) circle (0.3mm) (3.5,7.0) circle (0.3mm); \path[->] (2.0,4.0) edge [-,dotted,thick] (1.8,3.6) (2.0,4.0) edge (2.485,4.97) (2.5,5.0) edge (2.985,5.97) (3.0,6.0) edge (3.485,6.97); \draw[fill] (10.0,4.0) circle (0.3mm) ( 9.5,5.0) circle (0.3mm) ( 9.0,6.0) circle (0.3mm) ( 8.5,7.0) circle (0.3mm); \path[->] (8.5,7.0) edge (8.985,6.03) (9.0,6.0) edge (9.485,5.03) (9.5,5.0) edge (9.985,4.03) (10.0,4.0) edge [-,dotted,thick] (10.2,3.6); \draw[fill] (6.5,5.5) circle (0.3mm) (7.5,5.5) circle (0.3mm) (7.0,4.5) circle (0.3mm); \path[->] (6.5,5.5) edge (7.47,5.5) (7.5,5.5) edge (7.015,4.53) (7.0,4.5) edge (6.515,5.47); \draw[fill] (6.0,5.5) circle (0.3mm) (6.0,4.5) circle (0.3mm); \path[->] (6.0,5.5) edge [bend left] (6.015,4.53) (6.0,4.5) edge [bend left] (5.985,5.47); \draw[fill] (5.0,5.5) circle (0.3mm); \draw[->] (5.0,5.5) arc [start angle=90,delta angle=356,radius=0.5]; \draw[fill] (6.0,7.0) circle (0.3mm); \draw[fill] (0.5,7.5) circle (0.3mm) (1.0,8.5) circle (0.3mm) (1.5,7.5) circle (0.3mm) (2.0,8.5) circle (0.3mm); \path[->] (0.5,7.5) edge (0.985,8.47) (1.0,8.5) edge (1.485,7.53) (1.5,7.5) edge (1.985,8.47); \draw[fill] (11.0,8.5) circle (0.3mm) (11.5,7.5) circle (0.3mm); \path[->] (11.0,8.5) edge (11.485,7.53); \node at (6.0,0.5) {\ding{192}}; \node at (3.5,1.5) {\ding{193}}; \node at (8.5,1.5) {\ding{194}}; \node at (6.0,2.0) {\ding{195}}; \node at (6.0,4.0) {\ding{196}}; \node at (6.0,6.5) {\ding{197}}; \end{tikzpicture} \end{center} \caption{Six disjoint classes of paths} \label{fig:class} \end{figure} \medskip \noindent Figure \ref{fig:class} shows the classes of paths discussed in this paper: \begin{itemize} \item[\ding{192}] Finite paths, which have both a start vertex and an end vertex, and finitely many edges. \item[\ding{193}] One-sided infinite paths that have an end vertex but no start vertex. \item[\ding{194}] One-sided infinite paths that have a start vertex but no end vertex. \item[\ding{195}] Two-sided infinite paths, which have neither a start vertex nor an end vertex, but infinitely many edges. \item[\ding{196}] Cycles, which have neither a start vertex nor an end vertex, and at least one but finitely many edges. \item[\ding{197}] The empty path, which has neither a start vertex nor an end vertex, and no edges. \end{itemize} We refer to unions of these disjoint classes by listing the associated labels; for example, [\ding{192}\ding{194}] are the paths that have a start vertex. The left circle of Figure \ref{fig:class} contains the paths without a start vertex [\ding{193}\ding{195}\ding{196}\ding{197}] and the right circle those without an end vertex [\ding{194}\ding{195}\ding{196}\ding{197}]. \section{Relation Algebras} \label{section.relation-algebra} In this section we give basic definitions, operations and properties of relations. Their structure is captured abstractly by relation algebras, which let us characterise important properties of relations in a compact way using equations and inequalities. We explain how to represent edges, vertices and sets of vertices of a graph as relations. To describe reachability in graphs, we recall first-order axioms for the Kleene star operation. Finally, we discuss tool support for mechanising the presented concepts. \subsection{Relations} \label{subsection.relations} A (concrete) binary relation $R$ on a set $A$ is a subset of the Cartesian product $A \times A$, that is, a set of ordered pairs of elements of $A$. Using the language of graph theory, $A$ is the set of vertices of the graph and $R$ is the set of directed edges. In this context, we also call $R$ a graph. Binary relations can furthermore be understood as Boolean matrices with rows and columns indexed by $A$, which corresponds to the adjacency matrix representation of graphs. Since relations are sets, the union $R \cup S$, intersection $R \cap S$ and complement $\cp{R}$ of relations $R$ and $S$ can be taken such that the set of all binary relations on $A$ forms a Boolean algebra. The \emph{empty relation} $\O$ on $A$ is the empty set and the \emph{universal relation} $\L$ on $A$ is the full Cartesian product $A \times A$. The \emph{composition} $R \mathbin{;} S$ of two relations $R$ and $S$ is the set of all pairs $(a,c) \in A \times A$ such that $(a,b) \in R$ and $(b,c) \in S$ for some $b \in A$. The \emph{converse} or \emph{transpose} $\trans{R}$ of a relation $R$ is the set of all pairs $(a,b)$ with $(b,a) \in R$. The \emph{identity relation} $\mathsf{I}$ on $A$ is the set of all pairs $(a,a)$ with $a \in A$. The structure $(2^{A \times A},\cup,\mathbin{;},\cp{\rule{0em}{1.2ex}~\,},\trans{},\mathsf{I})$ is called the concrete relation algebra of all binary relations over $A$. The operations $\cap$, $\O$ and $\L$ can be defined in terms of the other operations. To discuss the algebraic structure of relations in a more abstract way, binary relations are replaced by arbitrary elements of a carrier set $B$, operations on $B$ are introduced and they are axiomatised by equations as follows. An \emph{(abstract) relation algebra} is a structure $(B,\cup,\mathbin{;},\cp{\rule{0em}{1.2ex}~\,},\trans{},\mathsf{I})$ satisfying the axioms \cite{Tarski1941,Maddux2006} \begin{align*} (R \cup S) \cup T & = R \cup (S \cup T) & R \cup S & = S \cup R & R & = \cp{\cp{R} \cup \cp{S}} \cup \cp{\cp{R} \cup S} \\ (R \mathbin{;} S) \mathbin{;} T & = R \mathbin{;} (S \mathbin{;} T) & (R \cup S) \mathbin{;} T & = R \mathbin{;} T \cup S \mathbin{;} T & R \mathbin{;} \mathsf{I} & = R \\ \trans{\trans{R}} & = R & \trans{(R \cup S)} & = \trans{R} \cup \trans{S} & \trans{(R \mathbin{;} S)} & = \trans{S} \mathbin{;} \trans{R} \\ & & \trans{R} \mathbin{;} \cp{R \mathbin{;} S} \cup \cp{S} & = \cp{S} \end{align*} The first line contains Huntington's axioms for Boolean algebras \cite{Huntington1933a,Huntington1933b}. The join operation is denoted by $\cup$, based on which the meet can be defined as $R \cap S = \cp{\cp{R} \cup \cp{S}}$. Since every relation algebra is a Boolean algebra, the set $B$ is partially ordered by $R \subseteq S \Leftrightarrow R \cup S = S$ with greatest element $\L = R \cup \cp{R}$ and least element $\O = R \cap \cp{R}$. In the graph model, $\O$ is the empty graph and $\L$ is the complete graph. The axioms in the second line give properties of composition $\mathbin{;}$. It follows that every relation algebra is a semiring with the two operations $\cup$ and $\mathbin{;}$. The axioms in the last two lines specify the operation of converse. We assume that composition has higher precedence than join and meet and that complement and converse have higher precedence than composition. It follows that the operations $\cup$, $\cap$, $\mathbin{;}$ and $\trans{}$ preserve the order $\subseteq$ and the operation $\cp{\rule{0em}{1.2ex}~\,}$ reverses the order $\subseteq$. As further examples, we discuss two properties which follow from the above axioms of relation algebras: \begin{align} \label{eq:triple} R & \subseteq R \mathbin{;} \trans{R} \mathbin{;} R \\ \label{eq:loop_backward_forward} R \cap \mathsf{I} & = \trans{R} \cap \mathsf{I} \end{align} We interpret these properties in the graph model. Inequality (\ref{eq:triple}) holds because any edge $(a,b) \in R$ in the graph can be traversed backwards in $\trans{R}$, since $(b,a) \in \trans{R}$, so the edge $(a,b)$ is also contained in the composition $R \mathbin{;} \trans{R} \mathbin{;} R$ by going forward, backward and forward again from $a$ via $b$ and $a$ to $b$. Equality (\ref{eq:loop_backward_forward}) contains an intersection with the identity relation on both sides; it therefore considers only loops in the graph, that is, edges, from a vertex to itself. It states that such edges are not changed if a graph is transposed, that is, if all its edges are reversed. Many further properties of relation algebras can be found in textbooks such as \cite{SchmidtStroehlein1993,Maddux2006,Schmidt2011}. \subsection{Relational Properties} Compact equational characterisations of special classes of relations can be given in relation algebras. We use the following properties of functions and orders. A relation $R$ is \emph{univalent} if $\trans{R} \mathbin{;} R \subseteq \mathsf{I}$ and \emph{total} if $\mathsf{I} \subseteq R \mathbin{;} \trans{R}$. A relation $R$ is \emph{injective} if $\trans{R}$ is univalent, \emph{surjective} if $\trans{R}$ is total and \emph{bijective} if $R$ is injective and surjective. A relation $R$ is \emph{irreflexive} if $R \subseteq \cp{\mathsf{I}}$ and \emph{symmetric} if $R = \trans{R}$. For concrete relations, the equivalence of these relation-algebraic specifications and the common logical specifications can be easily derived. For example, $R \subseteq A \times A$ is univalent if and only if for each $a \in A$ there is at most one $b \in A$ such that $(a,b) \in R$. If $R$ is interpreted as the edge set of a directed graph with vertex set $A$, this means that the out-degree of every vertex is at most $1$. Similarly, $R$ is total if and only if the out-degree of every vertex is at least $1$. Conversely, injective and surjective state the same requirements for the in-degree of vertices instead of their out-degree. Irreflexivity specifies that a graph contains no loops. Symmetric relations are sometimes used to represent undirected graphs by containing both $(a,b)$ and $(b,a)$ if there is an edge between $a$ and $b$. A relation $R$ is surjective if and only if $\L \mathbin{;} R = \L$. As another consequence of the above properties, we present the following result about injective and surjective relations. For this, and following results, we assume that variables range over a given relation algebra. \begin{lem} \label{lemma.inj_sur_semi_swap,bij_swap} If $P$ is surjective and $R$ is injective, $P \subseteq Q \mathbin{;} R$ implies $R \subseteq \trans{Q} \mathbin{;} P$. These two inequalities are equivalent if $P$ and $R$ are bijective. \end{lem} \subsection{Vectors, Points and Atoms} \label{subsection.points} We now discuss three particular properties that are useful to represent sets of elements as relations. A relation $v$ is a \emph{vector} if $v = v \mathbin{;} \L$. A \emph{point} is a bijective vector. A relation $x$ is an \emph{atom} if both $x \mathbin{;} \L$ and $\trans{x} \mathbin{;} \L$ are points; see \cite{SchmidtStroehlein1993}. In the matrix model, a vector corresponds to a row-constant matrix. That is, $v \subseteq A \times A$ is a vector if and only if for every $a \in A$, the pair $(a,b)$ is in $v$ either for all $b \in A$ or for none. Such a relation is used to model the subset of elements of $A$ that are related by $v$ to all elements of $A$. In the graph model, this can be used to represent sets of vertices. A point is a vector that is additionally injective and surjective. In the graph model, this means that the in-degree of every vertex is exactly $1$, so the adjacency matrix contains exactly one row with $1$-entries. This means that a point represents a set that contains exactly one element. Such singleton sets obviously correspond to elements of $A$ and can therefore be used to represent individual vertices of graphs. An atom is a relation consisting of a single pair. Specifically, if $R$ is an atom and $(a,b) \in R$, then $R \mathbin{;} \L$ is the point representing the element $a$, and similarly $\trans{R} \mathbin{;} \L$ represents the element $b$. Hence an atom corresponds to a single edge in a graph. The composition $R \mathbin{;} \L$ is a vector for any relation $R$. More generally, the composition $R \mathbin{;} v$ of a relation $R$ and a vector $v$ is again a vector. It represents the set of vertices from which there are transitions under $R$ into the set represented by $v$. In the graph model this amounts to the predecessors of the vertices in the set represented by $v$. Similarly, $\trans{R} \mathbin{;} v$ is the set of successors of the vertices in the set represented by $v$. The following result gives an example of a property of vectors. \begin{lem} \label{lemma.vector_meet_comp} For vectors $v$, $w$, we have $v \mathbin{;} \trans{w} = v \cap \trans{w}$. In particular $R \mathbin{;} \L \mathbin{;} S = R \mathbin{;} \L \cap \L \mathbin{;} S$ for all relations $R$, $S$. \end{lem} We will use two further properties of relations, which do not follow from the axioms of relation algebras given in Section \ref{subsection.relations}. The first one is the \emph{Tarski rule}: \[ R \neq \O \iff \L \mathbin{;} R \mathbin{;} \L = \L \] It can be interpreted as follows. If $R \subseteq A \times A$ is not empty, it contains a pair $(a,b)$ for some $a, b \in A$. Then the vector $R \mathbin{;} \L$ represents a set that contains $a$; in particular, $R \mathbin{;} \L$ contains a point. Hence $\L \mathbin{;} R \mathbin{;} \L$ is the universal relation since points are surjective and composition preserves the order $\subseteq$. The backward implication of the Tarski rule is equivalent to $\O \neq \L$, which holds if and only if the set of vertices of a graph is not empty. Using the Tarski rule it can be shown that a relation $p$ is a point if and only if $p$ is a vector, $p$ is injective and $p \neq \O$. The second property of relations we use is the \emph{point axiom}. It states that for each $R \neq \O$ there are points $p$ and $q$ such that $p \mathbin{;} \trans{q} \subseteq R$. Again, by the assumption there are $a, b \in A$ such that $(a,b) \in R$. Then points $p$ and $q$ can be chosen so as to represent the vertices $a$ and $b$, respectively. By Lemma \ref{lemma.vector_meet_comp} we have $p \mathbin{;} \trans{q} = p \cap \trans{q}$, whence this expression intersects row $a$ and column $b$ of the matrix to yield the entry $(a,b)$. In particular, it follows that $p \mathbin{;} \trans{q}$ is an atom. To summarise, the point axiom states that every non-empty graph contains an edge, which is obvious in the graph model but an independent property in relation algebras. \subsection{Reflexive Transitive Closure} To describe reachability in graphs we expand relation algebras with an operation for the reflexive transitive closure. A \emph{Kleene relation algebra} is a structure $(M,\cup,\mathbin{;},\cp{\rule{0em}{1.2ex}~\,},\trans{},{}^*,\mathsf{I})$ such that $(M,\cup,\mathbin{;},\cp{\rule{0em}{1.2ex}~\,},\trans{},\mathsf{I})$ is a relation algebra and the Kleene star operation ${}^*$ satisfies the following axioms: \begin{align*} \mathsf{I} \cup R \mathbin{;} R^* & \subseteq R^* & S \cup R \mathbin{;} Q \subseteq Q & \implies R^* \mathbin{;} S \subseteq Q \\ \mathsf{I} \cup R^* \mathbin{;} R & \subseteq R^* & S \cup Q \mathbin{;} R \subseteq Q & \implies S \mathbin{;} R^* \subseteq Q \end{align*} Relation algebras with transitive closure have been studied, for example, in \cite{Ng1984}; Kleene algebras have been studied in \cite{Conway1971}; the axioms above were proposed in \cite{Kozen1994}. The operation ${}^*$ models reflexive transitive closure, from which the transitive closure is easily obtained by $R^+ = R \mathbin{;} R^*$. Hence an edge $(a,b)$ is in $R^*$ if and only if there is a path from vertex $a$ to vertex $b$ in the graph $R$, and a similar statement holds for $R^+$ and non-empty paths. A relation $R$ is \emph{acyclic} if $R^+$ is irreflexive, that is, there is no non-empty path from a vertex to itself. For example, we obtain the following consequences: \begin{align*} R^* \cup S^* & = R^+ \cup S^* \\ \trans{R}^* & = \trans{R^*} \end{align*} In the remainder of this paper we work in Kleene relation algebras that satisfy the Tarski rule and the point axiom. We note, however, that many of the following results do not require the Tarski rule and/or the point axiom but hold in more general structures, as can be seen in our Isabelle/HOL implementation. \subsection{Formalisation and Mechanisation} As shown above, relation algebras facilitate compact equational specifications of relational properties and support first-order axioms for reachability, which is a key notion for dealing with paths. All relation-algebraic statements can be expressed in logic, but doing so would introduce complex formulas with nested quantifiers. For example, a relation $R \subseteq A \times A$ is surjective if and only if $ \forall y \in A : \exists x \in A : (x,y) \in R $ and $R$ is injective if and only if $ \forall y \in A : \forall x \in A : \forall w \in A : (x,y) \in R \wedge (w,y) \in R \implies x = w $ In relation algebras, these properties are expressed as $\mathsf{I} \subseteq \trans{R} \mathbin{;} R$ and $R \mathbin{;} \trans{R} \subseteq \mathsf{I}$, respectively. Like here, relation algebras often yield simpler, more modular and more concise specifications and proofs. This is one reason why we formalise our work using relation algebras rather than logic. Due to their compact quantifier-free form, statements given in relation algebras can be more easily tackled by automated and interactive theorem provers. Off-the-shelf automated theorem provers such as E \cite{Schulz2013} and Prover9 \cite{Prover9} are performing well when proving statements containing relational expressions \cite{HoefnerStruth2008,DangHoefner2008}. There are also special-purpose first-order proof systems for relation algebras; for example, see \cite{Maddux1983,MacCaullOrlowska2002}. These systems, however, usually fail when proving complex properties of relation algebras since the search space becomes too large. To overcome this deficiency, interactive proof assistants such as Coq \cite{Bertot2004} and Isabelle/HOL \cite{NipkowPaulsonWenzel2002} can be used. Both systems have been successfully used in the context of relation algebras \cite{Pous2016,Relation_Algebra-AFP}. Key differences are that Coq has a more expressive type system whereas Isabelle/HOL has better automation support. In particular, the Sledgehammer tool \cite{Meng2008,PaulsonBlanchette2010} integrates first-order automatic theorem provers and SMT solvers to discharge goals arising in interactive Isabelle/HOL proofs. Since our work does not require an elaborate type system but greatly benefits from automation we have implemented all results of this paper in Isabelle/HOL. Proofs are omitted and can be found in the accompanying Isabelle theories. To improve readability, most of our proofs are written in Isabelle/Isar (Intelligible Semi-Automated Reasoning) \cite{Wenzel2002}. \section{Paths} \label{section.paths} In this section we start our endeavour to characterise classes of paths. One of the preconditions of a path between two points is that the points are connected. \begin{defi} \label{definition.connected} A relation $R$ is \emph{connected} if $R \mathbin{;} \L \mathbin{;} R \subseteq R^* \cup \trans{R}^*$. \end{defi} The expression $R \mathbin{;} \L \mathbin{;} R$ is equivalent to $R \mathbin{;} \L \cap \L \mathbin{;} R$ by Lemma \ref{lemma.vector_meet_comp} and describes all pairs $(a,b)$ such that vertex $a$ has an outgoing edge in $R$ and vertex $b$ has an incoming edge in $R$. The inequality requires that there must be a path from $a$ to $b$ in $R$ or a path from $b$ to $a$ in $R$. Hence the definition states that any vertex with a successor in $R$ must be connected by a path to any vertex with a predecessor in $R$ either by going forwards ($R^*$) or backwards ($\trans{R}^*$). Connected relations do not characterise paths since they allow, for instance, the following graphs: \begin{center} \begin{tikzpicture} \draw[fill] (0.0,1.0) circle (0.3mm) (1.0,1.0) circle (0.3mm) (2.0,2.0) circle (0.3mm) (2.0,0.0) circle (0.3mm) (3.0,1.0) circle (0.3mm) (4.0,1.0) circle (0.3mm); \path[->] (0.0,1.0) edge (0.97,1.0) (1.0,1.0) edge (1.985,1.985) (1.0,1.0) edge (1.985,0.015) (2.0,2.0) edge (2.985,1.015) (2.0,0.0) edge (2.985,0.985) (3.0,1.0) edge (3.97,1.0); \end{tikzpicture} \hskip20mm \begin{tikzpicture} \draw[fill] (0.0,0.0) circle (0.3mm) (0.0,2.0) circle (0.3mm) (1.0,1.0) circle (0.3mm) (2.0,0.0) circle (0.3mm) (2.0,2.0) circle (0.3mm) (3.0,1.0) circle (0.3mm); \path[->] (0.0,0.0) edge (0.985,0.985) (1.0,1.0) edge (1.985,1.985) (2.0,2.0) edge (2.985,1.015) (3.0,1.0) edge (2.015,0.015) (2.0,0.0) edge (1.015,0.985) (1.0,1.0) edge (0.015,1.985); \end{tikzpicture} \end{center} We additionally have to prevent paths from forking into several successors and from merging several predecessors. \begin{defi} A relation $R$ is a \emph{path} if $R$ is injective, univalent and connected. \end{defi} Paths in this sense encompass all classes shown in Figure \ref{fig:class} [\ding{192}\ding{193}\ding{194}\ding{195}\ding{196}\ding{197}], and nothing else. In particular, a path can be finite, one-sided infinite, two-sided infinite, a cycle or even the empty relation. In the remainder of the paper we will look at each class separately. \begin{thm} \label{theorem.conv_path} $R$ is connected if and only if $\trans{R}$ is connected. $R$ is a path if and only if $\trans{R}$ is a path. \end{thm} The following theorem shows equivalent formalisations of connectivity. Statement (\ref{theorem.connectivity.1}) is the property given in Definition \ref{definition.connected}. \begin{thm} For a univalent and injective relation $R$, the following properties are equivalent: \begin{multicols}{2} \begin{enumerate} \item $R \mathbin{;} \L \mathbin{;} R \subseteq R^* \cup \trans{R}^*$ \label{theorem.connectivity.1} \item $R \mathbin{;} \L \mathbin{;} \trans{R} \subseteq R^* \cup \trans{R}^*$ \item $\trans{R} \mathbin{;} \L \mathbin{;} R \subseteq R^* \cup \trans{R}^*$ \item $\trans{R} \mathbin{;} \L \mathbin{;} \trans{R} \subseteq R^* \cup \trans{R}^*$ \columnbreak \item $R^+\mathbin{;} \L \mathbin{;} R^+ \subseteq R^* \cup \trans{R}^*$ \item $R^+\mathbin{;} \L \mathbin{;} \trans{R}^+ \subseteq R^* \cup \trans{R}^*$ \item $\trans{R}^+ \mathbin{;} \L \mathbin{;} R^+ \subseteq R^* \cup \trans{R}^*$ \item $\trans{R}^+ \mathbin{;} \L \mathbin{;} \trans{R}^+ \subseteq R^* \cup \trans{R}^*$ \end{enumerate} \end{multicols} \end{thm} \section{Start Points and End Points} \label{section.start-end-points} Many paths have special vertices, namely a start point (root) and an end point (sink). A start point is a vertex without predecessor, and an end point is a vertex without successor. This is captured by the following definition. \begin{defi} The \emph{start points} of a relation $R$ are given by $\spt{R} = R \mathbin{;} \L \cap \cp{\trans{R} \mathbin{;} \L}$ and its \emph{end points} are given by $\ept{R} = \trans{R} \mathbin{;} \L \cap \cp{R \mathbin{;} \L}$. \end{defi} As above, $R \mathbin{;} \L$ describes all vertices having a successor, and $\trans{R} \mathbin{;} \L$ those vertices with a predecessor. Hence, $R \mathbin{;} \L \cap \cp{\trans{R} \mathbin{;} \L}$ characterises the vertices with at least one successor and no predecessors, which are just the start points of a path. Immediate consequences are $\spt{R} = \ept{\trans{R}}$ and $R \mathbin{;} \spt{R} = \trans{R} \mathbin{;} \ept{R} = \O$. Of course, not every path has such distinguished elements. In Figure \ref{fig:class}, the classes [\ding{192}\ding{194}] comprise the paths with start points. Similarly, classes [\ding{192}\ding{193}] are the paths with end points. A cycle or a two-sided infinite path has neither start points nor end points, in which case $\spt{R} = \ept{R} = \O$. The following result shows that every path has at most one start point and at most one end point. \begin{thm} \label{theorem.start_point_at_most_one} Let $R$ be a path. Then $\spt{R}$ and $\ept{R}$ are injective. \end{thm} It follows that start points and end points are almost points in the relation-algebraic sense. The only exception is the empty relation as the following result states. \begin{cor} Let $R$ be a path. Then $\spt{R} = \O$ or $\spt{R}$ is a point and, similarly, $\ept{R} = \O$ or $\ept{R}$ is a point. \end{cor} The following consequences characterise the existence of start and end points by (in)equalities. We also give the corresponding classes in Figure \ref{fig:class}. \begin{cor} \label{corollary.start-end-point-iff} Let $R$ be a path. Then \begin{enumerate} \item $\spt{R} \neq \O$ if and only if $\L = \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L$ {\upshape[\ding{192}\ding{194}]}. \item $\spt{R} = \O$ if and only if $R \mathbin{;} \L \subseteq \trans{R} \mathbin{;} \L$ {\upshape[\ding{193}\ding{195}\ding{196}\ding{197}]}. \item $\ept{R} \neq \O$ if and only if $\L = \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ {\upshape[\ding{192}\ding{193}]}. \item $\ept{R} = \O$ if and only if $\trans{R} \mathbin{;} \L \subseteq R \mathbin{;} \L$ {\upshape[\ding{194}\ding{195}\ding{196}\ding{197}]}. \item $\spt{R} \neq \O$ and $\ept{R} \neq \O$ if and only if $\L = \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L \cap \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ {\upshape[\ding{192}]}. \item $\spt{R} = \ept{R} = \O$ if and only if $R \mathbin{;} \L = \trans{R} \mathbin{;} \L$ {\upshape[\ding{195}\ding{196}\ding{197}]}. \end{enumerate} \end{cor} It follows that a path has a start point if and only if the converse path has an end point. The simplest kind of path that has both a start point and an end point is a single edge. It can be constructed from two (relational) points as shown by the following result. \begin{lem} Let $p$ and $q$ be points. Then $p \mathbin{;} \trans{q}$ is a path. If $p \neq q$, then $\spt{p \mathbin{;} \trans{q}} = p$ and $\ept{p \mathbin{;} \trans{q}} = q$. \end{lem} The start point of the constructed edge is the vertex represented by the point $p$; its end point is the one represented by $q$. If $p$ and $q$ coincide, $\spt{p \mathbin{;} \trans{q}} = \ept{p \mathbin{;} \trans{q}} = \O$ since the result is a loop. A path with no start point and no end point [\ding{195}\ding{196}\ding{197}] need not be infinite; it can also be the empty relation or a cycle. We will elaborate on this distinction in Section \ref{section.cycles}. Sometimes we wish to include the empty relation in our reasoning. If a path has either a start point or is empty, we call it \emph{backward terminating} [\ding{192}\ding{194}\ding{197}]. Symmetrically, we call a path \emph{forward terminating} if it has end points or is empty [\ding{192}\ding{193}\ding{197}]. If a path is both forward terminating and backward terminating, we call it \emph{terminating} [\ding{192}\ding{197}]. The following result shows how to express each of these properties as an inequality. \begin{thm} Let $R$ be a path. Then the following properties are equivalent and each characterises backward termination. \begin{enumerate} \item $\L = \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L$ or $R = \O$ \item $R \subseteq \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L$ \item $R \subseteq \cp{\L \mathbin{;} R} \mathbin{;} R^*$ \item $R \subseteq \trans{R}^* \mathbin{;} \cp{\trans{R} \mathbin{;} \L}$ \end{enumerate} Moreover, each of the following properties is equivalent to forward termination. \begin{enumerate} \setcounter{enumi}{4} \item $\L = \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ or $R = \O$ \item $R \subseteq \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ \item $R \subseteq R^* \mathbin{;} \cp{R \mathbin{;} \L}$ \item $R \subseteq \cp{\L \mathbin{;} \trans{R}} \mathbin{;} \trans{R}^*$ \end{enumerate} Finally, each of the following properties is equivalent to termination. \begin{enumerate} \setcounter{enumi}{8} \item $\L = \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L \cap \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ or $R = \O$ \item $R \subseteq \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L \cap \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ \item $R \subseteq \cp{\L \mathbin{;} R} \mathbin{;} R^* \cap R^* \mathbin{;} \cp{R \mathbin{;} \L}$ \item $R \subseteq \trans{R}^* \mathbin{;} \cp{\trans{R} \mathbin{;} \L} \cap \cp{\L \mathbin{;} \trans{R}} \mathbin{;} \trans{R}^*$ \end{enumerate} \end{thm} It follows that a path is backward terminating if and only if its converse is forward terminating. Moreover a path is terminating if and only if its converse is terminating. If the end point of a path $R$ and the start point of a path $S$ coincide, the paths can be concatenated. It has to be guaranteed, however, that the two paths do not cross each other. The condition used in the following result allows that the start point of $R$ and the end point of $S$ coincide, if they exist, but requires all other vertices of $R$ and $S$ to be distinct. \begin{thm} \label{thm:path_concat} Let $R$ be a forward terminating path and let $S$ be a backward terminating path with $\ept{R} = \spt{S}$ and $R \mathbin{;} \L \cap (\trans{R} \mathbin{;} \L \cup S \mathbin{;} \L) \cap \trans{S} \mathbin{;} \L = \O$. Then $R \cup S$ is a path. Moreover, $\spt{R \cup S} \subseteq \spt{R}$ and $\ept{R \cup S} \subseteq \ept{S}$. \end{thm} If additionally $\spt{R} = \ept{S}$ are non-empty and hence points, path concatenation creates a cycle. As a consequence we only obtain inequalities in the second part of the previous theorem. By strengthening its assumption to $R \mathbin{;} \L \cap \trans{S} \mathbin{;} \L = \O$ we can exclude the creation of a cycle. This means that $R$ and $S$ only meet at the end point of $R$ and the start point of $S$. \begin{lem} The strengthened assumption $R \mathbin{;} \L \cap \trans{S} \mathbin{;} \L = \O$ is equivalent to the conjunction of the assumption $R \mathbin{;} \L \cap (\trans{R} \mathbin{;} \L \cup S \mathbin{;} \L) \cap \trans{S} \mathbin{;} \L = \O$ of Theorem \ref{thm:path_concat} and $\spt{R} \cap \ept{S} = \O$. \end{lem} Under this assumption, it is possible to determine the start and end points of the composed path $R \cup S$ according to the following result. \begin{thm} Let $R$ be a forward terminating path and let $S$ be a backward terminating path such that $\ept{R} = \spt{S}$ and $R \mathbin{;} \L \cap \trans{S} \mathbin{;} \L = \O$. Then $\spt{R \cup S} = \spt{R}$ and $\ept{R \cup S} = \ept{S}$. \end{thm} Rather than looking at path concatenation, one can also consider path restriction. Given a path $R$ and an arbitrary point $p$, we construct a path with start point $p$ by following the edges of $R$. \begin{thm} Let $p$ be a point and let $R$ be a path. Then $\trans{R}^* \mathbin{;} p \cap R$ is a path. Moreover, $\spt{\trans{R}^* \mathbin{;} p \cap R} \subseteq p$, and $\ept{\trans{R}^* \mathbin{;} p \cap R} \subseteq \ept{R}$. \end{thm} The second statement shows that either $p$ is the start point of the path, or there is no start point at all, which means that the new path is a cycle or empty. The expression $\trans{R}^* \mathbin{;} p$ represents the set of predecessors of the point $p$ under the relation $\trans{R}^*$, which are the successors of $p$ under $R^*$, which is the set of vertices reachable from $p$ by a path in $R$. Intersecting with $R$ keeps the edges of $R$ that start in such a vertex. The additional assumption $p \subseteq R \mathbin{;} \L$ assures that the point lies on the path $R$ and has at least one successor. In that case $\spt{\trans{R}^* \mathbin{;} p \cap R} = p$, and $\ept{\trans{R}^* \mathbin{;} p \cap R} = \ept{R}$. \section{Cycles} \label{section.cycles} By Corollary \ref{corollary.start-end-point-iff} a path $R$ has no start point and no end point if and only if $R \mathbin{;} \L = \trans{R} \mathbin{;} \L$. In this section we distinguish three kinds of paths satisfying this property: the empty path, cycles and two-sided infinite paths. A cycle is obtained by assuming a strong connectivity requirement, given in the following definition. \begin{defi} A path $R$ is a \emph{cycle} if $R^* = \trans{R}^*$. \end{defi} Cycles in this sense encompass classes [\ding{196}\ding{197}] of Figure \ref{fig:class}. An immediate consequence is that a relation is a cycle if and only if its converse is a cycle. The additional property $R^* = \trans{R}^*$ specifies that if a vertex $b$ is reachable from a vertex $a$ in $R$, also $a$ is reachable from $b$ in $R$. In this case, $a$ and $b$ belong to the same strongly connected component of $R$. The following result gives equivalent ways to express this property and some consequences. For example, $R \subseteq \trans{R}^+$ states that for every edge $(a,b) \in R$ vertex $b$ is reachable from vertex $a$ by a non-empty path backwards in $R$. \begin{thm} \label{theorem.many_strongly_connected} The following properties are equivalent: \begin{multicols}{4} \begin{enumerate} \item $R^* = \trans{R}^*$ \item $R^+ = \trans{R}^+$ \item $\trans{R} \subseteq R^*$ \item $\trans{R} \subseteq R^+$ \item $R \subseteq \trans{R}^*$ \item $R \subseteq \trans{R}^+$ \item $R^* \mathbin{;} \trans{R} \subseteq R^+$ \item $\trans{R} \mathbin{;} R^* \subseteq R^+$ \end{enumerate} \end{multicols} \noindent Each of them implies the following properties: \begin{multicols}{3} \begin{enumerate} \setcounter{enumi}{8} \item $R \mathbin{;} \L = \trans{R} \mathbin{;} \L$ \item $R \mathbin{;} \trans{R} \subseteq R^+$ \item $\trans{R} \mathbin{;} R \subseteq R^+$ \item $R \mathbin{;} \trans{R} \mathbin{;} R^* \subseteq R^+$ \item $R^* \mathbin{;} \trans{R} \mathbin{;} R \subseteq R^+$ \vfill\null\columnbreak \item $R^* \mathbin{;} R \mathbin{;} \trans{R} \subseteq R^+$ \item $\trans{R} \mathbin{;} R \mathbin{;} R^* \subseteq R^+$ \vfill\null \end{enumerate} \end{multicols} \noindent If $R$ is univalent, each of (10), (12) and (14) is equivalent to property (1). If $R$ is injective, each of (11), (13) and (15) is equivalent to property (1). \end{thm} Theorem \ref{theorem.many_strongly_connected} remains valid if any of the inequalities in (7), (8), (12)--(15) are replaced with equalities. As witnessed by the identity relation $\mathsf{I}$, the property $R^* = \trans{R}^*$ alone does not imply that the relation $R$ contains just one strongly connected component. This results from the combination with the connectivity requirement given in Definition \ref{definition.connected}. The following result expresses the combination of these two properties as a single (in)equality. \begin{thm} \label{theorem.one_strongly_connected} The following properties are equivalent: \begin{multicols}{2} \begin{enumerate} \item $R$ is connected and $R^* = \trans{R}^*$ \item $\trans{R} \mathbin{;} \L \mathbin{;} \trans{R} \subseteq R^*$ \item $\trans{R} \mathbin{;} \L \mathbin{;} \trans{R} \subseteq R^+$ \item $\trans{R} \mathbin{;} \L \mathbin{;} \trans{R} = R^+$ \item $\trans{R} \mathbin{;} \L \mathbin{;} R = R^+$ \item $R \mathbin{;} \L \mathbin{;} \trans{R} = R^+$ \label{schmidt-simple-circuit} \end{enumerate} \end{multicols} \noindent They imply each of the following properties: \begin{enumerate} \setcounter{enumi}{6} \item $\trans{R} \mathbin{;} \L \mathbin{;} R \subseteq R^+$ \item $R \mathbin{;} \L \mathbin{;} \trans{R} \subseteq R^+$ \item $R \mathbin{;} \L \mathbin{;} R \subseteq R \mathbin{;} R^+$ \item $R \mathbin{;} \L \mathbin{;} R \subseteq R^+$ \end{enumerate} If $R$ is injective, property (7) is equivalent to property (1). If $R$ is univalent, property (8) is equivalent to property (1). If $R$ is both injective and univalent, property (9) is equivalent to property (1). \end{thm} Furthermore, property (9) of Theorem \ref{theorem.one_strongly_connected} is equivalent to the corresponding equality $R \mathbin{;} \L \mathbin{;} R = R \mathbin{;} R^+$ and property (10) is equivalent to the corresponding equality $R \mathbin{;} \L \mathbin{;} R = R^+$. In \cite{Schmidt2011}, a relation $R$ is called a \emph{simple circuit} if it is univalent, injective and satisfies property (\ref{schmidt-simple-circuit}) of the previous theorem and the condition $R \mathbin{;} R \subseteq \cp{\mathsf{I}}$. By the previous theorem, this is equivalent to $R$ being a cycle except for the additional condition that $R \mathbin{;} R$ is irreflexive. The latter states that no two vertices are mutually connected by an edge; this excludes cycles of length $2$. The condition also implies that $R$ is irreflexive, which excludes cycles of length $1$, that is, loops. When undirected graphs are represented as symmetric relations, cycles of length $2$ cannot be distinguished from edges and loops are typically not considered (simple graphs). For directed graphs, however, we wish to include cycles of length $1$ or $2$ in our reasoning, so we do not require the additional condition. Note that properties (3), (7), (8) and (10) of Theorem \ref{theorem.one_strongly_connected} have identical right-hand sides and similar left-hand sides. Despite this, property (10) is weaker than the others in the following sense, which is illustrated in Figure \ref{figure.start-end}. It shows, for each of the four properties, a pair of edges of $R$ as solid lines. We know that these edges exist by considering the left-hand sides of the four properties; the edges may be identical or have the same source vertex or target vertex. Dashed lines indicate non-empty paths whose existence follows by applying the respective property to these edges. We know that these paths are not empty because the right-hand side of each property is $R^+$. From this, the existence of (possibly empty) paths indicated by dotted lines follows if $R$ is univalent (c) or injective (b) or both (a). The existing paths in (b)--(d) allow us to show that the two edges are in the same strongly connected component of $R$ thereby creating a cycle. This does not work in (a) even if $R$ is both injective and univalent. However, with the stronger assumption $R \mathbin{;} \L \mathbin{;} R \subseteq R \mathbin{;} R^+$, which is property (9) of the previous theorem, the dashed paths in (a) would have length $2$ or more. Hence the dotted paths in (a) would be non-empty (and therefore the two edges would be different), so the argument of (b) or (c) could be applied to show that the edges belong to a cycle. \begin{figure} \begin{center} \begin{tikzpicture} \node at (0.8,2.0) {(a)}; \draw[fill] (0.0,0.0) circle (0.3mm); \draw[fill] (1.6,0.0) circle (0.3mm); \draw[fill] (0.0,1.6) circle (0.3mm); \draw[fill] (1.6,1.6) circle (0.3mm); \path[->] (0.0,0.0) edge (1.57,0.0) (0.0,1.6) edge (1.57,1.6); \path[<->,dotted] (-0.03,0.03) edge [bend left] (-0.03,1.57) (1.63,1.57) edge [bend left] (1.63,0.03); \path[->,dashed] (0.03,0.03) edge (1.57,1.57) (0.03,1.57) edge (1.57,0.03); \node at (0.8,-0.4) {$R \mathbin{;} \L \mathbin{;} R \subseteq R^+$}; \node at (3.8,2.0) {(b)}; \draw[fill] (3.0,0.0) circle (0.3mm); \draw[fill] (4.6,0.0) circle (0.3mm); \draw[fill] (3.0,1.6) circle (0.3mm); \draw[fill] (4.6,1.6) circle (0.3mm); \path[->] (3.0,0.0) edge (4.57,0.0) (3.0,1.6) edge (4.57,1.6); \path[<->,dashed] (4.63,1.57) edge [bend left] (4.63,0.03); \path[->,dotted] (4.57,0.03) edge (3.03,1.57) (4.57,1.57) edge (3.03,0.03); \node at (3.8,-0.4) {$\trans{R} \mathbin{;} \L \mathbin{;} R \subseteq R^+$}; \node at (6.8,2.0) {(c)}; \draw[fill] (6.0,0.0) circle (0.3mm); \draw[fill] (7.6,0.0) circle (0.3mm); \draw[fill] (6.0,1.6) circle (0.3mm); \draw[fill] (7.6,1.6) circle (0.3mm); \path[->] (6.0,0.0) edge (7.57,0.0) (6.0,1.6) edge (7.57,1.6); \path[<->,dashed] (5.97,0.03) edge [bend left] (5.97,1.57); \path[->,dotted] (7.57,0.03) edge (6.03,1.57) (7.57,1.57) edge (6.03,0.03); \node at (6.8,-0.4) {$R \mathbin{;} \L \mathbin{;} \trans{R} \subseteq R^+$}; \node at (9.8,2.0) {(d)}; \draw[fill] (9.0,0.0) circle (0.3mm); \draw[fill] (10.6,0.0) circle (0.3mm); \draw[fill] (9.0,1.6) circle (0.3mm); \draw[fill] (10.6,1.6) circle (0.3mm); \path[->] (9.0,0.0) edge (10.57,0.0) (9.0,1.6) edge (10.57,1.6); \path[->,dashed] (10.57,0.03) edge (9.03,1.57) (10.57,1.57) edge (9.03,0.03); \node at (9.8,-0.4) {$\trans{R} \mathbin{;} \L \mathbin{;} \trans{R} \subseteq R^+$}; \end{tikzpicture} \end{center} \caption{$R$ is strongly connected in (b)--(d), but not strongly connected in (a)} \label{figure.start-end} \end{figure} Sometimes we wish to include cycles in reasoning about paths with start or end points. A path is \emph{backward finite} if it is a cycle or backward terminating [\ding{192}\ding{194}\ding{196}\ding{197}]. A path is \emph{forward finite} if it is a cycle or forward terminating [\ding{192}\ding{193}\ding{196}\ding{197}]. A path is \emph{finite} if it is a cycle or terminating [\ding{192}\ding{196}\ding{197}]. The following result shows how to express each of these properties as an inequality. \begin{thm} Let $R$ be a relation. Then the following properties are equivalent and, if $R$ is a path, characterise backward finiteness. \begin{enumerate} \item $R^* = \trans{R}^*$ or $R \subseteq \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L$ \item $R \subseteq \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L \cup \trans{R}^*$ \end{enumerate} Moreover, the following properties are equivalent and, if $R$ is a path, characterise forward finiteness. \begin{enumerate} \setcounter{enumi}{2} \item $R^* = \trans{R}^*$ or $R \subseteq \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ \item $R \subseteq \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L} \cup \trans{R}^*$ \end{enumerate} Finally, the following properties are equivalent and, if $R$ is a path, characterise finiteness. \begin{enumerate} \setcounter{enumi}{4} \item $R^* = \trans{R}^*$ or $R \subseteq \cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L \cap \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}$ \item $R \subseteq (\cp{\L \mathbin{;} R} \mathbin{;} R \mathbin{;} \L \cap \L \mathbin{;} R \mathbin{;} \cp{R \mathbin{;} \L}) \cup \trans{R}^*$ \end{enumerate} \end{thm} It follows that a path is backward finite if and only if its converse is forward finite. Moreover a path is finite if and only if its converse is finite. We conclude this section with a number of useful facts about cycles. The first result shows that any terminating path can be extended to a cycle by connecting its end point with its start point. \begin{thm} \label{path_edge_equals_cycle} Let $R$ be a terminating path. Then $R \cup \ept{R} \mathbin{;} \trans{\spt{R}}$ is a cycle. \end{thm} Conversely, the next result shows that any non-empty cycle becomes a terminating path if an edge is removed. \begin{thm} Let $R$ be a cycle and let $s, e$ be points with $e \mathbin{;} \trans{s} \subseteq R$. Then $R \cap \cp{e \mathbin{;} \trans{s}}$ is a terminating path with $\spt{R \cap \cp{e \mathbin{;} \trans{s}}} \subseteq s$ and $\ept{R \cap \cp{e \mathbin{;} \trans{s}}} \subseteq e$. If $s \neq e$, the last two inequalities can be strengthened to equalities. \end{thm} The final result of this section shows how to join two paths with suitable start and end points to a cycle. It uses the assumption of Theorem \ref{thm:path_concat} to require that the two paths do not overlap. \begin{thm} Let $R, S$ be terminating paths with $\spt{R} = \ept{S}$ and $\spt{S} = \ept{R}$. Then $R \cup S$ is a cycle if $R \mathbin{;} \L \cap (\trans{R} \mathbin{;} \L \cup S \mathbin{;} \L) \cap \trans{S} \mathbin{;} \L = \O$. \end{thm} \section{Application: Verifying the Correctness of Graph Algorithms} \label{section.verification} Using the relation-algebraic characterisations of different kinds of paths derived in the previous sections, we now verify the correctness of three basic graph algorithms. Previous work has shown that relation-algebraic reasoning can be applied for program transformation and verification in general and in the context of graph algorithms; for example, see \cite{FriasAguayoNovak1993,BackhouseEtAl94,Berghammer1999,BerghammerStruth2010,BerghammerEtAl2014,Guttmann2018b}. The aim of this section is to show that our theory of paths integrates well with such arguments. Our correctness proofs use the well-known assertion-based program verification technique based on Hoare logic \cite{Hoare1969}. The algorithms are expressed as while-programs with variables whose values are elements of a relation algebra. Correctness of the algorithms is stated by preconditions and postconditions, which are relation-algebraic formulas. The first task in proving the correctness of a while-program is to provide for each while-loop an invariant that holds throughout the execution of the loop; invariants are again relation-algebraic formulas. We then need to prove that each loop invariant \begin{enumerate} \item is established from the precondition before the while-loop, \item is maintained by each iteration of the while-loop, and \item implies the required postcondition after the while-loop. \end{enumerate} This proves partial correctness of the program: if it starts in a state satisfying the precondition and terminates, the postcondition will hold in the final state. For all our examples, we briefly describe the algorithm itself, and present the pre- and postconditions as well as the loop invariants. The verification conditions listed above are automatically generated from this information by Isabelle/HOL's Hoare logic library \cite{Nipkow1998,Nipkow2002}. The proofs of these obligations use relation-algebraic reasoning similar to the proofs of other results in this paper; they can be found in the Isabelle/HOL theory files. We have also proved termination of the algorithms using a total-correctness Hoare logic library discussed in \cite{Guttmann2018c}. To this end, each while-loop has to be annotated with a variant or bound function; see the Isabelle/HOL theories for details. We only discuss partial correctness below; the termination proofs use the additional assumption that graphs have finitely many vertices. \subsection{Construction of a Path} \label{ComPath} Our first example is a Greedy algorithm that constructs a path from a vertex $x$ to a different vertex $y$ of a directed acyclic graph $D$. We assume that a path between these vertices exists and, moreover, conditions that ensure the Greedy algorithm will find one without searching. See \cite{BerghammerHoffmann2001,BerghammerHoffmann2001b} for relational implementations of depth-first search and breadth-first search. We use the predicate $\mathsf{point}(p)$ to specify that the relation $p$ is a point in the relation-algebraic sense as defined in Section \ref{subsection.points}. The algorithm maintains a relation $W$, which is the path that is constructed backwards from $y$ towards $x$. As soon as $W$ forms a path from $x$ to $y$ the algorithm terminates with result $W$ (Line \ref{alg1.line.10} in Algorithm \ref{alg1}). The algorithm works as follows: first, it chooses a predecessor $p$ of $y$ (Line \ref{alg1.line.2}) and initialises $W$ to be the edge from $p$ to $y$, which is a path (Line \ref{alg1.line.3}). As long as the start point $q$ of $W$ is different from $x$ (Line \ref{alg1.line.5}), the algorithm chooses a predecessor $p$ of $q$ (Line \ref{alg1.line.6}) and extends the relation $W$ by the edge from $p$ to $q$ (Line \ref{alg1.line.7}). For the selection of predecessors we use an operation $\mathsf{choosePoint}(v)$ that (deterministically) chooses a point contained in a non-empty vector $v$. The existence of such a point follows from the point axiom. To reason about the operation $\mathsf{choosePoint}$, we assume it satisfies the following axioms: \[ \mathsf{choosePoint}(v) \subseteq v \qquad v \neq \O \implies \mathsf{point}(\mathsf{choosePoint}(v)) \] The inequality states that the chosen relation is contained in $v$, and the implication states that the chosen relation is a point. The operation $\mathsf{choosePoint}$ is deterministic in the sense that it always produces the same result for a given argument and hence may be modelled as a function in a relation algebra. There may be several different implementations of a deterministic operation satisfying these axioms; any one works fine since our reasoning only uses the properties stated by or following from the axioms. Using $\mathsf{choosePoint}$ we can formally describe the construction of a path in Algorithm \ref{alg1}. \begin{algorithm} \caption{Constructing a path} \label{alg1} \begin{algorithmic}[1] \State $\mathbf{input} ~ D, x, y$ \label{alg1.line.1} \State $p \gets \mathsf{choosePoint}(D \mathbin{;} y)$ \label{alg1.line.2} \State $W \gets p \mathbin{;} \trans{y}$ \label{alg1.line.3} \State $q \gets p$ \label{alg1.line.4} \While{$q \neq x$} \label{alg1.line.5} \State $p \gets \mathsf{choosePoint}(D \mathbin{;} q)$ \label{alg1.line.6} \State $W \gets W \cup p \mathbin{;} \trans{q}$ \label{alg1.line.7} \State $q \gets p$ \label{alg1.line.8} \EndWhile \label{alg1.line.9} \State $\mathbf{output} ~ W$ \label{alg1.line.10} \end{algorithmic} \end{algorithm} We show correctness of Algorithm \ref{alg1} if the input satisfies the following preconditions, whose conjunction is denoted by $\mathsf{Pre}(D,x,y)$: \[ D^+ \subseteq \cp{\mathsf{I}} \qquad\quad \mathsf{point}(x) \qquad\quad \mathsf{point}(y) \qquad\quad x \neq y \qquad\quad D^* \mathbin{;} y \subseteq \trans{D}^* \mathbin{;} x \] The first inequality states that $D$ is acyclic. The following three conditions specify that $x$ and $y$ are distinct vertices. The last inequality uses two vectors: $D^* \mathbin{;} y$ contains the transitive predecessors of $y$, which are the vertices from which $y$ is reachable, and $\trans{D}^* \mathbin{;} x$ contains the transitive successors of $x$, which are the vertices reachable from $x$. The inequality expresses that every transitive predecessor of $y$ is a transitive successor of $x$, which implies that there is a path from $x$ to $y$. Moreover, it follows that there is a path from $x$ to any transitive predecessor of $y$, which is the reason why the above Greedy algorithm works without searching. The postcondition $\mathsf{Post}(D,x,y,W)$ of the algorithm is the conjunction of the following relation-algebraic formulas: \[ W \subseteq D \qquad\quad \mathsf{termPath}(W) \qquad\quad x = \spt{W} \qquad\quad y = \ept{W} \] The first condition guarantees that the output $W$ of Algorithm \ref{alg1} is contained in the graph $D$. The second condition states that $W$ is a terminating path as defined in Section \ref{section.start-end-points}. The remaining two conditions ensure that the constructed path starts in $x$ and ends in $y$. The loop invariant $\mathsf{Inv}(D,x,y,W,q)$ used to prove partial correctness of Algorithm \ref{alg1} is the conjunction of the following formulas: \begin{align*} & D^+ \subseteq \cp{\mathsf{I}} & & \mathsf{point}(x) & & \mathsf{point}(y) & & \mathsf{point}(q) & & D^* \mathbin{;} q \subseteq \trans{D}^* \mathbin{;} x \\ & W \subseteq D & & \mathsf{termPath}(W) & & q = \spt{W} & & y = \ept{W} \end{align*} The first line shows that the invariant contains most of $\mathsf{Pre}(D,x,q)$. Maintaining the precondition throughout the while-loop is trivial since it uses only input variables, whose values do not change. Nevertheless these conditions need to be formally part of the loop invariant since they are not only necessary for establishing the rest of the invariant but also to maintain it. Moreover, the invariant contains $\mathsf{Post}(D,q,y,W)$ as shown in the second line. From this invariant, $\mathsf{Post}(D,x,y,W)$ immediately follows using the negated loop condition $q = x$, which holds after the while-loop terminates. \subsection{Topological Sorting} \label{ComTopsort} In our second example we look at topological sorting: given a directed acyclic graph $R$, the problem is to construct a linear order of its vertices that contains $x$ before $y$ for each edge $(x,y)$ of the graph. If the input graph models dependencies between tasks, the output is a linear schedule of the tasks that respects all dependencies. We represent the linear order of vertices as a path, in which the sequence of vertices gives the schedule. A simple algorithm based on \cite{Kahn1962} for finding a topological sort $W$ works as follows. It first picks a vertex without a predecessor (Line \ref{alg2.line.3} in Algorithm \ref{alg2}), which exists since the input $R$ is acyclic. This vertex is marked (Line \ref{alg2.line.4}) and used as the start point of the path to be constructed. As long as there are unmarked vertices (Line \ref{alg2.line.5}), the algorithm picks one that does not have an unmarked predecessor (Line \ref{alg2.line.6}). As before, such a vertex exists since any subgraph of $R$ is acyclic, too. The edge from the current end point $q$ of $W$ to the chosen vertex is then added to the path (Line \ref{alg2.line.7}). The selected vertex is marked (Line \ref{alg2.line.9}). The relational program given in Algorithm \ref{alg2} implements this procedure. It represents the set of marked vertices as the vector $v$; a vertex is marked if and only if the corresponding (relational) point is contained in $v$. Hence $\cp{v}$ contains the unmarked vertices, and the condition $v \neq \L$ in Line \ref{alg2.line.5} checks if there is still an unmarked vertex. \begin{algorithm} \caption{Topological sorting} \label{alg2} \begin{algorithmic}[1] \State $\mathbf{input} ~ R$ \label{alg2.line.1} \State $W \gets \O$ \label{alg2.line.2} \State $q \gets \mathsf{choosePoint}(\mathsf{min}(R,\L))$ \label{alg2.line.3} \State $v \gets q$ \label{alg2.line.4} \While{$v \neq \L$} \label{alg2.line.5} \State $p \gets \mathsf{choosePoint}(\mathsf{min}(R,\cp{v}))$ \label{alg2.line.6} \State $W \gets W \cup q \mathbin{;} \trans{p}$ \label{alg2.line.7} \State $q \gets p$ \label{alg2.line.8} \State $v \gets v \cup p$ \label{alg2.line.9} \EndWhile \label{alg2.line.10} \State $\mathbf{output} ~ W$ \label{alg2.line.11} \end{algorithmic} \end{algorithm} To find vertices without unmarked predecessors, Algorithm \ref{alg2} uses the operation $\mathsf{min}(S,w) = w \cap \cp{\trans{S} \mathbin{;} w}$, where $S$ is a relation and $w$ is a vector \cite{SchmidtStroehlein1993}. It yields the $S$-minimal elements of the set represented by $w$. Hence $\mathsf{min}(R,\L)$ in Line \ref{alg2.line.3} gives the vertices without predecessors in the whole graph, and $\mathsf{min}(R,\cp{v})$ in Line \ref{alg2.line.6} gives the unmarked vertices without any unmarked predecessors. As in Algorithm \ref{alg1}, we use the $\mathsf{choosePoint}$ operation to select one of these vertices. Algorithm \ref{alg2} works if $R$ is acyclic and finite; otherwise one of the $\mathsf{choosePoint}$-operations in Lines \ref{alg2.line.3} and \ref{alg2.line.6} would fail. To avoid this kind of failure and to ensure that there is no infinite descending chain of unmarked vertices, we require that the input relation $R$ is \emph{well-founded} (also called \emph{regressively finite}). In relation algebras this is expressed by \[ w \subseteq \trans{R} \mathbin{;} w \Rightarrow w = \O \] for all vectors $w$ \cite{SchmidtStroehlein1993}. This property is the only precondition $\mathsf{Pre}(R)$ of the algorithm. We now consider the postcondition. The relation $W$ stores the constructed topological sort as a terminating path with a start point and an end point. To express that $W$ preserves the dependencies in $R$ we use the condition $R \subseteq W^+$, that is, there must be a path in $W$ from the source $x$ to the target $y$ of every edge $(x,y) \in R$. Finally, the path $W$ has to contain all vertices of $R$. If $R$ has two or more vertices this can be specified as $(W \cup \trans{W}) \mathbin{;} \L = \L$, where the left-hand side is the vector of all points in $W$. Alternative expressions for this vector are $\trans{W} \mathbin{;} \L \cup \spt{W}$ and $W \mathbin{;} \L \cup \ept{W}$. If $R$ contains only a single vertex, $W$ is the empty path, so this specification does not work. We can either add a precondition $\mathsf{I} \neq \L$ stating that $R$ has at least two vertices or modify the condition by replacing $\L$ with $\cp{\mathsf{I}} \mathbin{;} \L$ to handle this special case. Using the latter option, we obtain the postcondition $\mathsf{Post}(R,W)$ as the conjunction of the following formulas: \[ R \subseteq W^+ \qquad\quad \mathsf{termPath}(W) \qquad\quad (W \cup \trans{W}) \mathbin{;} \L = \cp{\mathsf{I}} \mathbin{;} \L \] The loop invariant that allows us to prove partial correctness with respect to the precondition $\mathsf{Pre}(R)$ and the postcondition $\mathsf{Post}(R,W)$ is the conjunction of the following formulas: \begin{align*} & \mathsf{Pre}(R) & & R \cap v \mathbin{;} \trans{v} \subseteq W^+ & & \mathsf{termPath}(W) \\ & \mathsf{point}(q) & & q \subseteq v & & W = \O \vee q = \ept{W} \\ & v = v \mathbin{;} \L & & W \mathbin{;} \L = v \cap \cp{q} & & R \mathbin{;} v \subseteq v \end{align*} The first line contains the precondition, which is maintained trivially since $R$ never changes, and the first two parts of the postcondition; note that the formula $R \cap v \mathbin{;} \trans{v} \subseteq W^+$ is a generalisation of $R \subseteq W^+$ that restricts $R$ to the subgraph induced by the set of marked vertices. The remaining properties (second and third lines) are auxiliary properties necessary to maintain the first three formulas of the loop invariant and to ensure the postcondition $(W \cup \trans{W}) \mathbin{;} \L = \cp{\mathsf{I}} \mathbin{;} \L$. The second line characterises the relation $q$ as a marked vertex, which is the end point of $W$ except when $W$ is empty at the beginning of Algorithm \ref{alg2}. The third line characterises the relation $v$ as the set of vertices of $W$ and ensures that all predecessors of these marked vertices are marked, too. \subsection{Construction of a Non-empty Cycle} \label{ComCycle} Our last application is a correctness proof of an algorithm that constructs a non-empty cycle for a given directed graph $R$. As precondition $\mathsf{Pre}(R)$ we assume that $R$ is not acyclic, that is, it contains at least one cycle: \[ R^+ \cap \mathsf{I} \neq \O \] This is the only condition needed for input $R$. Algorithm \ref{alg3} shows the relational program. It starts by picking two points, using the operation $\mathsf{choosePoint}$ again. The first point $y$ is selected in Line \ref{alg3.line.2} as a vertex lying on an arbitrary cycle of $R$. The existence of such a point is guaranteed by $\mathsf{Pre}(R)$. The second point $x$ is selected in Line \ref{alg3.line.3} as a direct successor of $y$ (since $x \subseteq \trans{R} \mathbin{;} y$) that is also a transitive predecessor of $y$ (since $x \subseteq R^* \mathbin{;} y$). These conditions ensure that $x$ and $y$ lie on a cycle of $R$. Lines \ref{alg3.line.4} and \ref{alg3.line.5} cover the case that the chosen points are identical. This means that the edge $y \mathbin{;} \trans{x} = x \mathbin{;} \trans{x}$ is a loop and hence a cycle in $R$, so the algorithm can terminate. If $x$ and $y$ do not coincide, the algorithm progresses in three steps. Lines \ref{alg3.line.7}--\ref{alg3.line.13} construct a directed tree $D \subseteq R$ with root $x$ in which $y$ is a leaf. Lines \ref{alg3.line.14}--\ref{alg3.line.21} select a path $W$ in $D$ that connects $x$ with $y$. This path $W$ together with the edge from $y$ to $x$ gives the required cycle in Line \ref{alg3.line.22}. In the first step, the directed tree $D$ is constructed as follows. Line \ref{alg3.line.7} initialises the relation $D$ as the empty tree. The while-loop maintains the vector $v$ that contains all vertices of the tree. At the start of the loop, $v$ contains only the point $x$ which is the root of $D$; see Line \ref{alg3.line.8}. As long as the vertex $y$ has not been reached, which is checked in Line \ref{alg3.line.9}, the algorithm chooses an edge $e$ of $R$ that goes from a vertex in $v$ to a vertex outside $v$ in Line \ref{alg3.line.10}. The edge is added to the tree in Line \ref{alg3.line.11} and its end point is added to $v$ in Line \ref{alg3.line.12}. An edge is a relation consisting of a single pair and can therefore be represented by an atom. We use the predicate $\mathsf{atom}(a)$ to specify that the relation $a$ is an atom in the relation-algebraic sense as defined in Section \ref{subsection.points}. Similarly to points, we use an operation $\mathsf{chooseAtom}(x)$ that (deterministically) chooses an atom contained in a non-empty relation $x$. To reason about the operation $\mathsf{chooseAtom}$, we assume it satisfies the following axioms: \[ \mathsf{chooseAtom}(x) \subseteq x \qquad x \neq \O \implies \mathsf{atom}(\mathsf{chooseAtom}(x)) \] Since the while-loop adds edges leaving the set $v$ and since it is known that $y$ is reachable from $x$, the vertex $y$ will eventually be included in $v$, so $D$ will contain a path from $x$ to $y$. By construction, $D$ is acyclic and satisfies $D^* \mathbin{;} y \subseteq \trans{D}^* \mathbin{;} x$. As a consequence we can use Algorithm \ref{alg1} to determine a path from $x$ to $y$; Lines \ref{alg3.line.14}--\ref{alg3.line.21} of Algorithm \ref{alg3} are identical to Lines \ref{alg1.line.2}--\ref{alg1.line.9} of Algorithm \ref{alg1}. When the second while-loop of Algorithm \ref{alg3} terminates, $W$ contains a terminating path from $x$ to $y$. Line \ref{alg3.line.22} adds to this path the edge from $y$ to $x$ to obtain a cycle $C$. By the choice of $x$ and $y$ in Lines \ref{alg3.line.2} and \ref{alg3.line.3} this edge is contained in $R$. \begin{algorithm} \caption{Constructing a cycle} \label{alg3} \begin{algorithmic}[1] \State $\mathbf{input} ~ R$ \label{alg3.line.1} \State $y \gets \mathsf{choosePoint}((R^+ \cap \mathsf{I}) \mathbin{;} \L)$ \label{alg3.line.2} \State $x \gets \mathsf{choosePoint}(R^* \mathbin{;} y \cap \trans{R} \mathbin{;} y)$ \label{alg3.line.3} \If{$x = y$} \label{alg3.line.4} \State $C \gets y \mathbin{;} \trans{x}$ \label{alg3.line.5} \Else \label{alg3.line.6} \State $D \gets \O$ \label{alg3.line.7} \State $v \gets x$ \label{alg3.line.8} \While{$\neg (y \subseteq v)$} \label{alg3.line.9} \State $e \gets \mathsf{chooseAtom}(v \mathbin{;} \trans{\cp{v}} \cap R)$ \label{alg3.line.10} \State $D \gets D \cup e$ \label{alg3.line.11} \State $v \gets v \cup \trans{e} \mathbin{;} \L$ \label{alg3.line.12} \EndWhile \label{alg3.line.13} \State $p \gets \mathsf{choosePoint}(D \mathbin{;} y)$ \label{alg3.line.14} \State $W \gets p \mathbin{;} \trans{y}$ \label{alg3.line.15} \State $q \gets p$ \label{alg3.line.16} \While{$q \neq x$} \label{alg3.line.17} \State $p \gets \mathsf{choosePoint}(D \mathbin{;} q)$ \label{alg3.line.18} \State $W \gets W \cup p \mathbin{;} \trans{q}$ \label{alg3.line.19} \State $q \gets p$ \label{alg3.line.20} \EndWhile \label{alg3.line.21} \State $C \gets W \cup y \mathbin{;} \trans{x}$ \label{alg3.line.22} \EndIf \label{alg3.line.23} \State $\mathbf{output} ~ C$ \label{alg3.line.24} \end{algorithmic} \end{algorithm} We now discuss the postcondition of Algorithm \ref{alg3}. It constructs a non-empty cycle $C$ that is also a subgraph of $R$. These conditions immediately translate into the following formulas, whose conjunction is the postcondition $\mathsf{Post}(R,C)$: \[ C \neq \O \qquad \mathsf{cycle}(C) \qquad C \subseteq R \] Here the condition $\mathsf{cycle}(C)$ specifies that $C$ is a cycle as defined in Section \ref{section.cycles}. We conclude this section by discussing the invariant used to prove partial correctness of Algorithm \ref{alg3} with respect to $\mathsf{Pre}(R)$ and $\mathsf{Post}(R,C)$. As before, Isabelle/HOL's Hoare logic tactic splits the correctness proof into a number of verification conditions. For example, the if-statement is split into two goals, one for each case. For the case $x = y$ the postcondition is easy to establish since the loop on this vertex is immediately available. The case $x \neq y$ requires more effort. To reuse Algorithm \ref{alg1} we have to show that its precondition $\mathsf{Pre}(D,x,y)$ holds, which is the conjunction of the following formulas: \[ D^+ \subseteq \cp{\mathsf{I}} \qquad\quad \mathsf{point}(x) \qquad\quad \mathsf{point}(y) \qquad\quad x \neq y \qquad\quad D^* \mathbin{;} y \subseteq \trans{D}^* \mathbin{;} x \] To establish these conditions we use the conjunction of the following formulas as the invariant for the first while-loop in Lines \ref{alg3.line.9}--\ref{alg3.line.13}: \begin{align*} & \mathsf{point}(x) & & \mathsf{point}(y) & & x \neq y & & y \subseteq \trans{R}^* \mathbin{;} x & & y \mathbin{;} \trans{x} \subseteq R \\ & D \subseteq R & & D^+ \subseteq \cp{\mathsf{I}} & & D \mathbin{;} \trans{D} \subseteq \mathsf{I} & & D \subseteq v \mathbin{;} \trans{v} & & v = v \mathbin{;} \L \\ & x \mathbin{;} \trans{v} \subseteq D^* & & D \mathbin{;} x = \O & & v = x \cup \trans{D} \mathbin{;} \L \end{align*} The first line lists simple conditions that follow immediately from the selection of $x$ and $y$ in Lines \ref{alg3.line.2} and \ref{alg3.line.3} of Algorithm \ref{alg3}. These properties are needed later and have to be maintained throughout the entire proof, which is not difficult since $R$, $x$ and $y$ are not modified in Lines \ref{alg3.line.4}--\ref{alg3.line.23}. The first three inequalities of the second line state that $D$ is an injective acyclic subgraph of $R$, that is, a forest in $R$. The remaining two conditions in this line state that $v$ is a vector and that $D$ contains only edges between vertices in the set represented by $v$. The first two conditions in the third line specify that $x$ is the root of $D$, that is, that all vertices in $v$ are reachable from $x$ in $D$ and that $x$ has no predecessors. This implies that $D$ is a tree with root $x$. Finally, $v = x \cup \trans{D} \mathbin{;} \L$ states that $v$ contains $x$ and the target vertices of all edges in $D$. These invariants imply that $D^* \mathbin{;} y \subseteq \trans{D}^* \mathbin{;} x$ holds after the first while-loop, so we can use Algorithm \ref{alg1} afterwards. By the correctness of Algorithm \ref{alg1} we know that its postcondition $\mathsf{Post}(D,x,y,W)$ holds after the second while-loop of Algorithm \ref{alg3}. This postcondition is: \[ W \subseteq D \qquad\quad \mathsf{termPath}(W) \qquad\quad x = \spt{W} \qquad\quad y = \ept{W} \] Theorem \ref{path_edge_equals_cycle} then implies that $C$ as constructed in Line \ref{alg3.line.22} is a cycle. The remaining two postconditions of Algorithm \ref{alg3}, that is, $C \neq \O$ and $C \subseteq R$ are easy to prove using $x \neq y$ and $W \subseteq D$ and $D \subseteq R$. \section{Paths with Roots} \label{section.roots} In the previous sections a path was described by a relation only; in Section \ref{section.start-end-points} we have discussed conditions under which paths have a start point and/or an end point. In this section we describe paths together with a designated root. A root is a vertex of the graph represented by a (relational) point. Our main results are equivalences between the definitions of paths with and without roots. Most of these equivalences only hold if the point axiom is assumed. We represent a path with root by two relations $R$ and $p$ such that $R$ is injective and univalent and $p$ is a point. The relations $R$ and $p$ will satisfy further conditions depending on the kind of path that is represented. \subsection{Paths} We start with a result that characterises all paths [\ding{192}\ding{193}\ding{194}\ding{195}\ding{196}\ding{197}]. The condition $p \mathbin{;} R \subseteq R^* \cup \trans{R}^*$ states that any end vertex of an edge in $R$ must be reachable from the vertex $p$ by going forward in $R$ or by going backward in $R$. \begin{thm} Let $R$ be an injective and univalent relation. Then $R$ is a path if and only if there exists a point $p$ such that $p \mathbin{;} R \subseteq R^* \cup \trans{R}^*$. \end{thm} If the path is not empty, we can guarantee that the vertex $p$ of the previous theorem is contained in the path. This is stated by the additional condition $p \subseteq (R \cup \trans{R}) \mathbin{;} \L$ of the following characterisation [\ding{192}\ding{193}\ding{194}\ding{195}\ding{196}]. \begin{cor} Let $R$ be an injective and univalent relation. Then $R$ is a non-empty path if and only if there exists a point $p$ such that $p \mathbin{;} R \subseteq R^* \cup \trans{R}^*$ and $p \subseteq (R \cup \trans{R}) \mathbin{;} \L$. \end{cor} The following theorem shows that a path $R$ is acyclic if $p$ has no predecessors in $R$. \begin{thm} \label{theorem.path_root_acyclic} Let $R$ be an injective and univalent relation and let $p$ be a point such that $p \mathbin{;} R \subseteq R^* \cup \trans{R}^*$ and $R \mathbin{;} p = \O$. Then $R$ is acyclic. \end{thm} \subsection{Backward Finite Paths} The following result characterises backward finite paths [\ding{192}\ding{194}\ding{196}\ding{197}]. The condition $p \mathbin{;} R \subseteq R^+$ states that any end vertex of an edge in $R$ must be reachable from the vertex $p$ by a non-empty path in $R$. It implies the previous condition $p \mathbin{;} R \subseteq R^* \cup \trans{R}^*$ since $R^+ \subseteq R^* \subseteq R^* \cup \trans{R}^*$. \begin{thm} Let $R$ be an injective and univalent relation. Then $R$ is a backward finite path if and only if there exists a point $p$ such that $p \mathbin{;} R \subseteq R^+$. \end{thm} For a point $p$, the condition $p \mathbin{;} R \subseteq R^+$ is equivalent to each of $\trans{R} \mathbin{;} \L \subseteq \trans{R}^+ \mathbin{;} p$ and $\trans{R} \mathbin{;} \L = \trans{R}^+ \mathbin{;} p$. Again, if the path is not empty, we obtain that it contains $p$, which can now be stated as $p \subseteq R \mathbin{;} \L$ in the following characterisation [\ding{192}\ding{194}\ding{196}]. \begin{cor} Let $R$ be an injective and univalent relation. Then $R$ is a non-empty backward finite path if and only if there exists a point $p$ such that $p \mathbin{;} R \subseteq R^+$ and $p \subseteq R \mathbin{;} \L$. \end{cor} For backward finite paths, Theorem \ref{theorem.path_root_acyclic} can be extended to an equivalence as the following result shows. \begin{thm} Let $R$ be an injective and univalent relation and let $p$ be a point such that $p \mathbin{;} R \subseteq R^+$. Then $R \mathbin{;} p = \O$ if and only if $R$ is acyclic. \end{thm} \subsection{Cycles} The following result characterises non-empty cycles [\ding{196}]. The additional condition $p \subseteq \trans{R} \mathbin{;} \L$ states that $p$ is the end vertex of an edge in $R$. For a point $p$ it is equivalent to $R \mathbin{;} p \neq \O$. \begin{thm} Let $R$ be an injective and univalent relation. Then $R$ is a non-empty cycle if and only if there exists a point $p$ such that $p \mathbin{;} R \subseteq R^+$ and $p \subseteq \trans{R} \mathbin{;} \L$. \end{thm} In this case any point $q$ on the cycle -- that is, satisfying $q \subseteq R^* \mathbin{;} p$ -- can take the place of $p$ in the previous theorem -- that is, satisfies $q \mathbin{;} R \subseteq R^+$ and $q \subseteq \trans{R} \mathbin{;} \L$. Moreover, $p \subseteq R^* \mathbin{;} q$ and $q \subseteq R^+ \mathbin{;} q = R^* \mathbin{;} q = R^* \mathbin{;} p = R \mathbin{;} \L$ follow. Finally, also $p \mathbin{;} \trans{R} \subseteq \trans{R}^+$ and $p \subseteq R \mathbin{;} \L$ hold, so the previous theorem dualises to the converse cycle. The condition $q \subseteq R^* \mathbin{;} p$ to make all of this happen for non-empty cycles can equivalently be stated as each of $p \subseteq R^* \mathbin{;} q$ or $R \mathbin{;} q \neq \O$ or $\trans{R} \mathbin{;} q \neq \O$ or $q \subseteq R \mathbin{;} \L$ or $q \subseteq \trans{R} \mathbin{;} \L$. Moreover, it follows that if $R$ and $S$ are non-empty cycles such that $R \subseteq S$ then $R = S$. Another consequence is that the two conditions of the previous theorem can be combined into one inequality if also the empty cycle is allowed [\ding{196}\ding{197}]. \begin{cor} Let $R$ be an injective and univalent relation. Then $R$ is a cycle if and only if there exists a point $p$ such that $p \mathbin{;} R \subseteq R^+ \cap \trans{R} \mathbin{;} \L$. \end{cor} \subsection{Backward Terminating Paths} The following result characterises backward terminating paths [\ding{192}\ding{194}\ding{197}]. The additional condition $R \mathbin{;} p = \O$ states that vertex $p$ has no predecessors in $R$. \begin{thm} Let $R$ be an injective and univalent relation. Then $R$ is a backward terminating path if and only if there exists a point $p$ such that $p \mathbin{;} R \subseteq R^+$ and $R \mathbin{;} p = \O$. \end{thm} If the relation is not empty, it follows that the root $p$ of the previous theorem is the start point of $R$ [\ding{192}\ding{194}]. \begin{cor} Let $R$ be an injective and univalent relation. Then $R$ is a non-empty backward terminating path if and only if $\spt{R}$ is a point such that $\spt{R} \mathbin{;} R \subseteq R^+$. \end{cor} \subsection{Terminating Paths} For characterising terminating paths we additionally need an end point [\ding{192}\ding{197}]. The condition $p \subseteq R^* \mathbin{;} q$ states that vertex $q$ is reachable from vertex $p$ in $R$. The condition $\trans{R} \mathbin{;} q = \O$ states that vertex $q$ has no successors in $R$. \begin{thm} Let $R$ be an injective and univalent relation. Then $R$ is a terminating path if and only if there exist points $p, q$ such that $p \mathbin{;} R \subseteq R^+$ and $p \subseteq R^* \mathbin{;} q$ and $\trans{R} \mathbin{;} q = \O$. \end{thm} In this case it follows that $R \mathbin{;} p = \O$. Moreover, also $q \subseteq \trans{R}^* \mathbin{;} p$ and $q \mathbin{;} \trans{R} \subseteq \trans{R}^+$ follow, so the previous theorem dualises by swapping $p$ and $q$ and taking the converse of $R$. Finally, $R = \O$ if and only if $p = q$. If the relation is not empty, the point $q$ of the previous theorem is the end point of $R$ [\ding{192}]. \begin{cor} Let $R$ be an injective and univalent relation. Then $R$ is a non-empty terminating path if and only if $\spt{R}$ and $\ept{R}$ are points such that $\spt{R} \mathbin{;} R \subseteq R^+$ and $\spt{R} \subseteq R^* \mathbin{;} \ept{R}$. \end{cor} \section{Conclusion} We have shown how relation algebras can be used to compactly specify and reason about different kinds of paths in graphs. We have applied the developed formalism to verify the correctness of simple graph algorithms. Proofs of results use equational reasoning instead of point-wise arguments with quantified variables. This style of reasoning strongly benefits from support by automated and interactive theorem provers. In this paper we have developed a fundamental theory of paths. There are several directions of extension. First, relation algebras can be extended to deal with cardinalities of relations \cite{Kawahara2006,BerghammerHoefnerStucke16,BerghammerEtAl16}; for a path this would simply be the number of edges it contains. This facilitates, for example, proofs about the complexity of graph algorithms. Second, different combinations of the defining properties of paths and other properties yield different classes of graphs. For example, an injective acyclic relation represents a forest; adding connectivity yields trees. We expect that a number of results are common to the classes and can be derived from fewer properties making them more widely applicable. Third, relation algebras can be generalised to structures that can represent weighted graphs \cite{Guttmann2018b}. Using the results of this paper in such a setting would allow us to reason, for example, about shortest-path algorithms.
\section{Introduction} \label{sec:introduction} The problem of human speech modeling has been solved more than once, but each time it faced paradoxes and contradictions. The scientific approach was initiated by Boolean algebra, which transgressed into logic of predicates. The human speech is more complicated than the predicate logic, but at the same time it is free of paradoxes, which occur at the first or higher orders. This article is an attempt to solve certain problems by introducing special restrictions. Speech analysis will be done in some consecutive stages. We should create automata, which can work over context--sensitive grammer, at first. This grammer will be defined in section~\ref{sec:basic_definitions}. This definition based on concept of mask, which is responsible to symbol from ingress aphabet. The automata's transition function devides on some parts, which has specific logic operations over its. The main difference with previous studies is the specific function $\Phi$, which can represent any class as data and some data as the class. The section~\ref{sec:layers_working} describe the automata's algorithm. There introduced the simple context as the set of symbols between two terminals. We describe the hierarchical system of one-modifying automatas in section~\ref{sec:context_working}. The automata system should recognise symbols in context-sensitive grammer. Analogies for the hierarchical system exists in scientific literature, but the article has the significant difference. The difference is in memory system with selfmodifications by the operations over the classes from section~\ref{sec:layers_working}. The selfmodification ability has some special restrictions because we need to pass over infinite looping of any logical algorithm, related to G\"{o}del theorem. We now turn to generalized grammar in speech, generally independent of a specific language. Basic elements of speech are lexemes, they are the words with a meaning. We will use following lexemes - Nouns, Verbs and Adjectives. Nouns and Verbs are clear, because they exist in all human languages. Nouns names objects and subjects, Verbs - actions between them. Adjectives marks qualities and quantities. Lexemes do not exist by themselves, but only being bound to sentence with subjects, predicate, and other words, including function words. Adjectives represent some qualities of the object, which a person initially receives from feeling an interaction with an object, so it is possible to say that adjectives are linked with feelings. Verbs represent actions, which are performed by a person or any other subject. Those actions are usually performed through muscle reflexes. Therefore Verbs are linked with muscle reflexes. Nouns serve as markers of feelings/reflexes triggers. It will be shown from which they originate. Basic sentence are some stable sequences of ingress and egress signals. In this sense, words or lexemes, as letters sequences, are also lower level sentences. But speech consists of not only egress and ingress sentences, it also includes the human memory. Memory is presumed to be multilevel, objectual, and context oriented. It contains complex, processed reflexes. Memory is arranged in a hierarchical graph, its nodes are classes and objects. Class is a Noun collection of Adjectives and Verbs. Object is an implementation of class. Also classes can be represented as data and they may be included in the object. Based on this feature, classes can be converted between each other and packed into memory. A concept of option is introduced for definition of memory work. This is the main innovation of the concept of the proposed model. In the option's scope there will be two possible options of information decryption. Both of these concepts are not equivalent and they can exist in two different people, but not together in the one person. Every option is fixed randomly, during the creation of the brain, and will not change during the whole lifetime of the person. A total of four independent options will be introduced, which means that a possibility of 16 different options of human speech are possible in this model. It is the most significant difference from all other attempts of creating human speech modeling mechanisms. It is presumed that this division was made possible in the result of evolution, for the interpretation of all incoming information, while every individual can intake only a part from the "raw" flow, to process and transfer to other individuals, prepared in way which can be used. The possibility of introducing optionalization is grounded on different psychological theories, based on Karl Jung's archetypes~\cite{Jung}, primarily Myers--Briggs Type Indicator~\cite{MayerBriggs}. For the modeling of the brain I will use terms and principles from Computer Science, such as addressed memory, search operations of certain symbols in sequence and Boolean operations. Names for some terms are taken from Socionics, a special discipline about typology of the human personality. \section{Basic Definitions} \label{sec:basic_definitions} Lets introduce basic definitions for the beginning. \begin{defn} Let a point be a pair from an address, where the address is a natural number, and value equal to $0$ or $1$. \end{defn} \begin{defn} Layer is one-dimensional finite array of points, with consistent and continuous numbering of addresses from $0$ to $N$, where $N$ is the array length. The array length is fixed during the working process, but values of points are variable. \end{defn} \begin{defn} Let the stack be finite, consistent, and continuous array of layers. \end{defn} \begin{defn} Mask $\mu$ is a fixed, finite array of a pair $(i,[0,1])$, where $i$ are natural numbers from $0$ to $N$. \end{defn} It is necessary to clarify that even though the mask is consistent, \textit{i.e.}{} it has no points, which have equal addresses, but all addresses of the mask cannot be continuous. Mask's addresses should have gaps, and their meaning will be discussed below. Basic operations, in the system of layers and masks, are offset by definition and by blocking the mask range. Suppose that at some point of time values, at a layer, are unchangeable. Then it becomes possible to check all layers, and find a combination of values in the layer, which are represented in the mask. The least address element, of first point of the layer, appropriates to the mask, is called \first{begin of block} or \first{offset}. The last address is called as \first{end of block}. The gap between the beginning and the end - including, is called \first{block of layer}. A block of layers always matches to a specific mask. Operation of finding entry of a mask - is called obtaining an offset. \begin{figure}[h] \centering \includegraphics[width=0.5\textwidth]{Pic3} \caption{Mask} \end{figure} \begin{reqr} \label{reqr:non_intersect} Blocks on the same layer should not intersect each other. \end{reqr} \begin{defn} Let $B$ be a block of a layer, which consists of serial, continuous set $(b_0,b_1,\ldots,b_m)$. Then it is possible to define the set of the Boolean function $\mathfrak{F}(B)$ of the type $f(b_i,\ldots,b_k)\to[0,1]$. The set $\mathfrak{F}(B)$ will be closed under Boolean operations $\xor$ (XOR) and $\band$ (AND). Let's call $\mathfrak{F}(B)$ as set of \first{Adjectives} and the result of these values as \first{quantities}. \end{defn} \begin{figure}[h] \centering \includegraphics[width=0.3\textwidth]{Pic5} \caption{Quality and Adjective} \end{figure} \begin{defn} Let there be a set of qualities $Q = (q_0,\ldots\,q_n)$ and block $B$. Then it is possible to define the set of the Boolean function $\mathfrak{P}(Q,B)$ of the type $f(q_0,\ldots\,q_n,b_i,\ldots,b_k)\to[0,1]$. The set $\mathfrak{P}(Q,B)$ will be closed under the Boolean operations $\xor$ (XOR) and $\band$ (AND). Let's call $\mathfrak{P}(Q,B)$ as set of \first{Verbs} and the resulting values as \first{actions}. \end{defn} \begin{figure}[h] \centering \includegraphics[width=0.5\textwidth]{Pic2} \caption{Action of Verb} \end{figure} \begin{defn} Let's call the mask set $\mu$, as an array of quantities $Q = (q_0,\ldots\,q_n)$ and an array of actions $A$, where each element of $A$ is an offset from the beginning of mask, as \first{Noun} \end{defn} \begin{defn} Let's call the Noun set $\mathtt{N}$, Adjectives $(\mathtt{A}_0,\ldots,\mathtt{A}_k)$, and Verbs as \first{simple class}. Moreover, verb for simple class will be the ingress. Verb will use qualities and blocks as arguments. \end{defn} We note that an action may be employed, but not on every point of a layer. \begin{defn} Let's call a class without any verbs, or adjective, as an empty class. An empty class will contain only a noun. \end{defn} \begin{figure}[h] \centering \includegraphics[width=0.5\textwidth]{Pic1} \caption{Simple class structure} \end{figure} Under a simple class four operations can be performed: \begin{description} \item[Verb Addition] Add to class a new verb $\mathtt{V}'$ which equals $\mathtt{V}_l\xor\mathtt{V}_m$. \item[Verb Multiplication] Add to class a new verb $\mathtt{V}'$ which equal $\mathtt{V}_l\band\mathtt{V}_m$. \item[Adjective Addition] Add to class a new adjective $\mathtt{A}'$ which equals to $\mathtt{A}_l\xor\mathtt{A}_m$. \item[Adjective Multiplication] Add to class a new adjective $\mathtt{A}'$ which equals to $\mathtt{A}_l\band\mathtt{A}_m$. \end{description} Let $\mu$ be the mask of a noun. And let $\mu_1^{\{i\}}$ be mask of another noun with the single difference in $i$ position. $\mu$ has constant $0$ or $1$ at $i$ position; $\mu_1^{\{i\}}$ has no constant at this address. Now it is possible for us to introduce two other operations: \begin{description} \item[Noun Specialization] The $\mu$ mask replaces to $\mu_1^{\{i\}}$ and the new adjective $\mathtt{A}_q$ adds to a class. $\mathtt{A}_q$ gets value from a layer by the address $i$. \item[Noun Argumentation] The $\mu$ mask replaces to $\mu_1^{\{i\}}$ and the new verb $\mathtt{V}_q$ adds to a class. $\mathtt{V}_q$ sets value to a layer by the address $i$. \end{description} Due to finiteness of the quantity of verbs and adjectives in the class, it is possible to introduce the specific bijective function $\Phi$, such that it will display a class of operation to the layer. If for a new adjective creation there is a unique operation, then the creation of the new verb has an internal ambiguity. It is because for a new verb we need to find a new point of action. In order to solve the ambiguity, we need to show one or more active adjectives, which are changed by the verb action point. The action point should be an argument of all active adjective and should not be an argument of all others. \begin{defn} Let's set classes $\mathtt{C}$ and six operations between them. There is a fixed finite array of elements $(C_0,\ldots,C_N)$, which are called as basis. Now we can introduce the subset of classes $\tilde{\mathtt{C}}\subset{}\mathtt{C}$, which can be created from the basis, by a finite count of operations. And we can introduce bijection $\Phi$ from $\tilde{\mathtt{C}}$ to the natural number set $\mathbb{N}$. Let's call it as \first{overclass mapping}. \end{defn} The specific form of $\Phi$ mapping is not important for the further consideration, note that it is invariant during the whole life. \section{Layers Working} \label{sec:layers_working} The mind system is made of stack and common objective memory. First, let's describe layers and their interactions. Null or signal layer is responsible for working with sensory and motor neurons. They excite and inhibit under the influence of the external environment. The current job does not put a purpose to solve the problem of response, so we will not consider the generation of egress signals. Let's consider layers by induction. There are three layers, $i+1$, $i+2$ and $i+3$. For brevity let's call them as 1st, 2nd and 3rd, and remembering that they are not absolute numbers of layers. On the 1st layer, there seems to be an excitement of elements. Thereafter, regularities are detected on a layer by overlaying noun's masks. Let all possible nouns be detected and the whole layer will be covered by blocks. It is not necessary to block all points of layer, some points can be free from blocking. After this, on the 2nd layer, masks are forcibly excited of the same nouns in the same order, but without duplicated elements and gaps. \textit{i.e.}{} if on the 1st layer nouns created in a sequence of $(A,B,B,B,C,C,D,A,C)$, then at the 2nd layer there will be a sequence of $(A,B,C,D,A,C)$. On the next stage, the excitement state will be transmitted to the 3rd layer, also by detecting the noun's masks. Let the sequence $(A,B,\ldots,A,C)$ be responsible for the noun $E$, and this sequence be called \first{sentence} of $E$. It is the simplified version, in any case the nouns which will be important of 2nd layer, are those which were covered in the ask of the 3rd. \begin{reqr} Masks, which are forcibly excited on the layer, will not be detected on it. \end{reqr} \begin{figure}[h] \centering \includegraphics[width=0.5\textwidth]{Pic4} \caption{Object detection} \end{figure} \begin{defn} Let's call the simple class example which has specific qualities and actions as simple \first{object}. Every simple object is linked to the simple class, on which it acts. In the current examination objects were created on 1-st, 2-nd and 3-rd layers. \end{defn} \begin{defn} Let's call the set of the simple classes and simple objects, which are denoted by the classes, as 0-level \first{context}. Let's call the pair of simple class and 0-level contexts as \first{complex class} 1-level. \end{defn} Context is made on the 3rd level, made in the 1st and 2nd levels, in which further changes are contained. Now the 2nd layer controls the classes of context and 1st layer controls the objects. Let's consider the behavior of objects of the 1st layer. They are in one context of 3rd layer, so they are connected together. In the beginning, they load their qualities from appropriate blocks of the 1st layer. In pseudocode: \begin{algorithmic} \ForAll{object $o$ in context} \ForAll{adjective $a$ in $o$} \State let $q_a$ is quality of $a$ \State let $B(o)$ is block of $o$ \State $q_a\gets a(B(o))$ \EndFor \EndFor \end{algorithmic} Then placement of verbs happens. Let the verb $f$ acts on the class $D$, and its quantities $(q_0,\ldots,q_n)$ be its arguments. Let $B(d)$ be the block of the object $b$. Then we should find classes with required quantities in context. Let class $C_b$ contain such quantities. Then objects of the class $C_b$ act on each object $d$ of class $D$: $$ d\to{}d'=f(B(d),b_i) \text{ for each }i\in(0,\ldots,k) $$ In pseudocode: \begin{algorithmic} \ForAll{object $d$ in context} \ForAll{verb $v$ in $d$} \State let $a_v$ is action of $v$ \State let $B(d)$ is block of $d$ \State{let qualities $(q_0,\ldots,q_k)$ are linked with $v$} \ForAll{object $b$ in context} \State{let $C_b$ is a class of $b$} \If{$C_b$ has qualities $(q_0,\ldots,q_k)$ } \State $a_v\gets v(B(d),b)$ \EndIf \EndFor \EndFor \EndFor \end{algorithmic} It is very important to note that if verbs change the state of the block, instead of adjectives which change the objects, then it affects the following verb's actions. \section{Context Working} \label{sec:context_working} Let's introduce a series of definitions by induction: \begin{defn} Let's call a pair from the set $(N-1)$-level a complex class and the set $(N-1)$-level a complex objects as $N$-level \first{context}. Let's call the pair from a simple class and set of pairs of $(N-1)$-level complex objects and $(N-1)$-level contexts as $N$-level \first{complex class}. \end{defn} \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic6} \caption{Complex Class} \end{figure} In previous section there was a mind stack which contained 3 layers. Later we will consider a mind stack which will contain 6 layers. It this case verbs actions can be applied on 4 lower layers. Let us understand what will happen to them sequentially. Suppose that required masks were identified at the lowest layer, and after that masks were found on all layers, including the 6th layer. Now let's consider what happens at the 2nd layer. Because contexts are found on the 4th layer, the 2nd one has objects with adjectives and verbs. So excitation will spread onto the 2nd layer. The points on the 2nd layer are responsible for classes on the 1st layer. And due to existence function $\Phi$, which connects data with class operations, modified classes will act on the 1st layer rather than original ones. Since basic classes were in a global context, they were chosen from common memory of the system. So the modified classes on 2nd layer are already local ones for the their contexts. The local classes are placed into context and completely replace the lower layers for global classes with the same masks. Further operations on local classes only fulfill this context. The next stage begins when the 5th layer happens. After this, it is possible to modify objects on the 3rd layer. So what happens when object with attached context are changed? There are 2 options: current context is modified or new empty context is created. Mentioned above, every object has qualities and actions. So it is possible to have two situation, each with its own named: \begin{description} \item[Static] New context will be created if any quality on object is modified. Object with old attached context be placed into memory and will be available when specific qualities combination is met. \item[Dynamic] New context will be created if any action on object is modified. Object with old attached context be placed into memory and will be available when specific actions combination is met. \end{description} In every mind system only one version of the system happens. It does not change during the lifetime~\cite{MayerBriggs}. Such a case is called \first{option}, this option is between static and dynamic. Let's call it \first{context option}. In the layer system, described in the previous section, the upper layer creates classes on the lower one. In context memory the reverse process takes place, where upper class is modified by a set of classes from the lower level. For that there are so-called \first{spontaneous} class operations. Every mind system has 3 spontaneous operations, one for nouns, one for verbs, and one for adjectives. Let's introduce appropriate options: For nouns: \begin{description} \item[Ratio] Noun Specialization operation is spontaneous. \item[Irratio] Noun Argumentation operation is spontaneous. \end{description} For verbs: \begin{description} \item[Logic] Operation XOR for verbs is spontaneous. \item[Ethics] Operation AND for verbs is spontaneous. \end{description} For adjectives: \begin{description} \item[Intuition] Operation XOR for adjectives is spontaneous. \item[Sensorics] Operation AND for adjective is spontaneous. \end{description} Now it is possible to show how spontaneous operations work. First, we introduce some notations. Let's represent an object by the symbol as $O$ and classes by $C$. Upper index of classes and objects will represent a level. Apostrophe in classes $C'$ will represent what class is modified with the respect to the global class of $C$. The 3rd layer has an object $O^3_1$ with a class ${C^3_1}'$. The object $O^3_1$ has context within which there are objects $\{O^2_i\}$ and the classes $\{{C_0^2}',{C_1^2}',\ldots,{C_N^2}'\}$. The task is to modify the class ${C^3_1}'$ and the $\{{C_0^2}',{C_1^2}',\ldots,{C_N^2}'\}$ so that the methods (verbs and adjectives) of ${C^3_1}''$ could create lower level classes, and to modify lower level classes, so they could create objects $\{O^2_i\}$. So the objects have to be immutable and classes in context could be modified. Later we will describe the algorithm step by step. But it should be noted that the algorithm creates not the only result, but many available results, and only the final step will choose the most appropriate one. \textbf{Algorithm Begin} \textbf{Step 1} Described previously, there is a bijection $\Phi$ between natural numbers and class, based on a global basis. Now consider the inverse transformation of $\Phi^{-1}$, which presents the class as ones and zeros. Let call it as binary representation of class. We will give the table a conventional example of the changes taking place. \begin{center} \begin{tabular}{ll} ${C^2_0}'$ & $10101010\ldots10$ \\ ${C^2_1}'$ & $11101010\ldots11$ \\ $\ldots$ & $\ldots$ \\ ${C^2_N}'$ & $10101110\ldots00$ \\ \end{tabular} \end{center} \textbf{Step 2} Let's move to the class ${C_1^3}'$. It has some adjectives, each of which take on a binary representation, and as a result gives meaning of quality. It is necessary to create new adjectives via adjective spontaneous operation, which will distinguish all different binary parts through ${C_1^3}'$ qualities. \begin{center} \begin{tabular}{llll} & & $q_0, q_1,\ldots$ & \\ ${C^2_0}''$ & $0101$ & $001\ldots10$ & $10$ \\ ${C^2_1}''$ & $0101$ & $101\ldots11$ & $10$ \\ $\ldots$ & $\ldots$ \\ ${C^2_N}''$ & $0101$ & $010\ldots00$ & $10$ \\ \end{tabular} \end{center} \textbf{Step 2.1} An additional step will be taken into action, if all possible algorithm results are considered invalid. In this step it is possible to introduce new adjectives which directly represent bits from layers to new qualities. \textbf{Step 3} Before this step, let's remember that all classes in contexts were created from global contexts, by a series of verbs transformations. It is very important to note that verbs from ${C^3_1}'$ were used sequentially, when action from one was argument for another. Now it is necessary to do so what lower class will be created faster. Let there be two verbs $V_1\to A_1$ and $V_2\to A_2$, which create actions $A_1$ and $A_2$. Also $A_1$ is an argument for $V_2$. Therefore the verb $V_1\circ V_2\to A_2$ leads to the required value of $A_2$. A subtask of this step is to find a way, how it is possible, by using spontaneous verb operation, to create new verbs without intersections, by its arguments, and the ability to create classes for its contexts or parts of them. \textbf{Step 3.1} is also an additional step for invalid results. Let there be context attached to $O_1^4$ and it be contained in the context of $O_1^3$. And let this context detect sentences where the quality from $O_2^3$ has always the same value with the bit $x$ from the block of $O_1^3$. Then in the mind, after a few tries, the system will create a verb, which connects quality to action over bit $x$. \textbf{Step 4} All previous steps gave some set of possible realizations of class ${C_1^3}^{?}$. But the final version will be chosen after a uniqueness and an accuracy check. The memory system waits when the object $O_1^3$ will be loaded to layer. The upper layer will contain the sentence with $O_1^3$. The lower layer will contain a set of sentences with the set of that class. If all lower classes are in proposed realization, then it will be chosen as ${C_1^3}''$ instead of ${C_1^3}'$. \textbf{Algorithm End} The process is simplification of memory system, it reduces the whole classes count and creates new verbs and adjectives. It called as \first{abstraction}. It is important to note that division into spontaneous and non-spontaneous operations required for solving problems with infinite looping. If count of nouns, verbs and adjective is finite then system will have finite count of there derivatives by spontaneous operations. The different combination of context creation and spontaneous operations options give 16 variants of behavior of the entire system. The main packing algorithm was described above in detail. However there is an additional process that named as \first{detalisation}. During detalisation steps 2, 2.1, 3, 3.1 are replaced with the following one: \textbf{Algorithm End} \textbf{Step 2 bis} Binary representation of all classes in context is modified by using noun spontaneous operation with condition that modified classes should describe all of its objects $\{O_0^2,\ldots,O_M^2\}$ in same context. The aim is to find same parts in all classes of the binary representations. All later steps will only be about the differences of binary classes representations. \begin{center} \begin{tabular}{llll} ${C^2_0}''$ & $0101$ & $001\ldots10$ & $10$ \\ ${C^2_1}''$ & $0101$ & $101\ldots11$ & $10$ \\ $\ldots$ & $\ldots$ \\ ${C^2_N}''$ & $0101$ & $010\ldots00$ & $10$ \\ \end{tabular} \end{center} \textbf{Algorithm End} \section{Structure of Input-Output System} \label{sec:structure_of_input_output_system} Let's analyze/look at the input-output structure in detail. As we know, there is a vast amount of signals from muscles and receptors; the overwhelming flow can hardly be directly processed by human consciousness. For primary processing of the flow there are \textit{classical conditionings}. They can be expressed in the following chain: \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic8} \caption{Classical conditioning} \end{figure} The system of all classical conditionings is \textit{the dynamic stereotype}. The dynamic stereotype plays multiple roles: \begin{itemize} \item It protects the consciousness from the huge flow of information from all the neurons in the body. \item It takes care of actions where comprehension is not necessary, including simple reactions like stepping, saying simple sounds, or "hit or run" reactions. \item As a result of its work, the consciousness, instead of receiving certain signals, receives whole images, which are recognized at the level of the dynamic stereotype. \end{itemize} Let's try to construct a classical conditioning from the suggested model. For this purpose a special class where all verbs are connected to its qualities will be suitable. We will call it \first{the conditioning class}. A conditioning class is \textit{a deterministic finite automaton}. A conditioning class should not only react to stimuli, but it should send signals to the consciousness. Therefore a conditioning class is a self-acting class, which processes signals from receptors and reports about some combinations of the signals to the consciousness. Therefore, all input-output can be divided into two segments: input segment and output segment. The input segment receives all signals from already working conditioning classes; the output segment is a space for generation of conditioning classes, which will be loaded to dynamic stereotype. Also it will be possible to determine on the output segment whether a class is suitable for the dynamic stereotype or not. If a newly generated class has a verb which requires any external qualities, then the class will not be conditioning and will not upload to dynamic stereotype. The algorithm of a working conditioning class is the following: \textbf{Algorithm Begin} \textbf{Step 1} A conditioning class $R$ uploads to dynamic stereotype. \textbf{Step 2} $R$ receives access to motor and sensor neurons, also $R$ receives a private area in signal layer for its output. \textbf{Step 3} $R$ detects images from sensor neurons, influences motor ones, outputs data to signal layer of the stack. \textbf{Step 4.1} If $R$ detects all images successfully, after some time it will be unloaded from dynamic stereotype by a next command from the stack. \textbf{Step 4.2} If $R$ does not detect a signal from sensor neurons (\textit{i.e.}{} its mask failed to apply), it will be forcibly unloaded, and will be interpreted by input of signal layer as \first{a failed} one. Processing of a failed class will be described in the next section in detail. \textbf{Algorithm End} The main function of the dynamic stereotype is automated processing outside the consciousness. However, there is one more capability of it. After all, a human cannot only pronounce sounds, but he can think about how he pronounces sounds. This second option is called \textit{internal speech}. Let us examine internal speech in more detail. A human can play out actions in his head, cause sensations, conduct mental operations, along with an internal monologue. These mental actions are absolutely similar to ordinary ones; they can cause the same recoil, but do not involve any muscles. Internal speech is that of a conditioning class which receives all signals from receptors, but all its out-going actions are connected to the input of the signal layer, not to muscles. After examining this ability, we have come to the second feature of the output -- \first{speech direction}. It turns out that the output segment of the signal layer consists of a set of pairs -- conditioning class and speech direction. Speech direction serves for determining where a conditioning class will be uploaded for work. Speech direction has two options: \first{the internal speech} and \first{the external speech}. In the case of external speech a conditioning class will directly work with signals from muscles and receptors. Now let us remember that a mentally healthy human being has two qualities: \begin{itemize} \item First of all, a human has only a single internal voice; \item Second of all, the human is able to distinguish an internal voice and his fantasies from the reality. \end{itemize} Therefore, the internal speech has two important qualities: \begin{reqr} The internal speech can process only a single class. \end{reqr} \begin{reqr} The Output of internal speech is directed to a specially selected area of the signal layer, that is not intersected with signals from external speech. \end{reqr} \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic10} \caption{Input and output} \end{figure} Internal speech performs a number of important functions which extends the model: \begin{itemize} \item Internal speech permits to mentally conduct operations that are not spontaneous for the memory. For example, it is possible to create a conditioning class that conducts an operation of verb addition XOR for an ethical organization of the memory. Using this class does not substitute for the operation, but a human will have the possibility to remember some rules that need to be done in certain circumstances,which will give the right result. \item Internal speech also serves for control of the memory and the stack. By continuously uploading some information to the signal layer, the human is able to process the information as detailed as possible. \end{itemize} \section{Decisions} \label{sec:decisions} The memory model has the algorithm of context packing that is able to create more complex classes from a set of lower ones. In most cases the algorithm is multivalued, \textit{i.e.}{} it can give multiple results. It has two types of multivaluency: \begin{itemize} \item Firstly, multivaluency of operations. This is when it is possible to create multiple combinations of nouns, verbs and adjectives that are able to create all lower classes in some circumstances. \item Secondly, multivaluency of data. It is when its impossible to determine a point of action by the suggested adjectives. \end{itemize} In order to describe the multivaluency, let us suppose that using the packing algorithm creates all possible classes. We denote the whole memory tree in an initial state as $T$. In addition, the $\{p_{i}T, i=1,2,\ldots,N\}$ set will contain all possible packed trees with all possible packed classes. We will have marked with $p$ any changed tree $T$, and index $i$ enumerates all possible variants. In particular, the packing algorithm acts as the function $$ T\to\{p_{i}T\} $$ We will call any change \first{a patch}. This term presumes that packing generates $N$ different patches. Every patch is described by packed class $\tilde{C}$ and its context. The $\tilde{C}$ class has more nouns and adjectives than the original $C$, but class's context decreases. Moreover, the creation of a set of $\{\tilde{C}_i\}$ classes with difference in an action point, is possible. We mark it as a possibility, but the specific implementation of multivaluency will not be important later. It’s Important is that there is a finite set of all values in multivaluency. \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic9} \caption{Patching} \end{figure} However, packing can be applied not only to the original $T$ tree, but to any earlier packed tree. Let $p_{i}T$ be packed again, and $\tilde{C}$, changed at first stage, will be changed one more time. The result of the packing will be a set of memory trees $\{p^{1}_{j}p_{i}T, i=1,2,\ldots,M\}$. It will be the second level patch. We will denote $n$-level patch as a $\pi^{n}T$. Consequently, because all patches has all different classes that are don’t intersect with each other, all possible patches $\pi{}T$ will form a structure like a tree. We will call the tree \first{the decision tree}. The original state of the memory without any modification is a root of the decision tree; leaves of the decision tree are final states of the memory with all possible modifications, let us denote them as $\hat{\pi{}}T$. \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic11} \caption{Tree of patches} \end{figure} Let us examine the making of a decision. Let’s say, $\sigma$ was the initial state of the signal layer's input. We may say that the $\sigma$ applying to the memory tree $T$ led to the decision tree generation, because $\sigma$ exactly had additional data, that helped to simplify the original state of the memory $T$. It proceeded by the following algorithm: \textbf{Algorithm Begin} \textbf{Before Steps} The stack is clear, but the memory has a state as $T$. \textbf{Step 1} Data is coming to the input of the signal layer. The signal layer has a $\sigma$ state; all levels of the stack are filling with decoded data. \textbf{Step 2} During the process of filling upper layers', the memorized classes are addressed, that are modified according by the information from the $\sigma$. The memory tree is now set to $\tilde{T}$. \textbf{Step 3} The Modified state of the memory tree $\tilde{T}$ is packed by spontaneous operations. As a result of packing, there is a set of possible memory trees $\{\hat{\pi_i}T, i=1,\ldots,N\}$. \textbf{Step 4} Each of the finished $\hat{\pi_i}T$ memory trees according to the signal, generates the segment’s condition, which follows the regular algorithm of creating a response. You can say that the $\sigma$ signal creates more than one response, but instead a host of possible $\{\kappa_i, i=1,\ldots,N\}$ responses. \textbf{Step 5} The algorithm is branched here. \textbf{Step 5.1} If $N = 1$, \textit{i.e.}{}, meaning the memory packed in the only possible way, then the memory will be fixed. A fixing of the memory is replacing the original $T$ state by the changed one $\pi{}T$; and the $\kappa$ response is generated on the output of the signal layer. The algorithm is finished here. \textbf{Step 5.2} If $N > 1$, there is a set of possible options. Because it is impossible to generate multiple responses at one time, the following happens. All possible $\{\kappa_i\}$ responses from all possible packed trees will come to the signal layer again, but not to the usual output. They all together will come to the special zone of input; and the memory will be $T$ again. Let us call it the special zone, which is responsible for resolution of multivaluency, as an \first{Ego}. The algorithm is recursively iterated here with the new data; the return from the iteration will be to the next steps, denoted as post-steps. \textbf{Step 5.2 post 1} If the result of the step 5.2 is the $\kappa_l$ response, then the final state of the memory will be $\pi_l{}T$. \textbf{Step 5.2 post 2} In case none of suggested responses were chosen at step 5.2, but during the data processing the new $\pi^{(1)}T$ patch was created and the patch gave the only one response; then the patch will be chosen as a final state of the memory. \textbf{Step 5.2 post 3} If there is no single response, all data is dropped and a response is not generated. \textbf{Algorithm End} \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic12} \caption{All possible versions of memory tree after patching} \end{figure} \section{Model Training} \label{sec:model_training} Taking a more practical approach to the task will allow us to create a model. Let us look into a class structure that should contain all data and operations, where operations should be able to convert to data and vice versa. . It is shown in the following, more precise, picture: \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic13} \caption{Class in 2D} \end{figure} The main part of this section will be devoted to abstraction packing, \textit{i.e.}{} spontaneous operation will be conducted on verbs and adjectives. However the whole process is correct for detalisation packing also. One of the basic model requirements is the possibility to determine the same actions and qualities in different classes. The simplest way to solve this problem is to attach a global noun with its own mask to each action or quality. Thus, we will be able to reach uniform interaction by connecting same masks of different classes’ objects. It could be described by the scheme: \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic14} \caption{Scheme of Class} \end{figure} Therefore, we should formalize these two processes: First, the $Op$ operation on the following predicates: $$ NewPredicate = OldPredicate (AND/XOR) OtherPredicate $$ where $OtherPredicate$ is described by the $mu$ mask of its noun to change predicates of current classes. Second, creation of a new mask for new qualities and actions necessary for extension of current classes. Let us remember that a class can be in three states, when it is child on the stack, when it is parent on the stack and when it is stored in the memory. Parent state is the simplest one, at this moment class's object reads qualities from the lower layer and applies actions to them. It was described above in detail. The child state is more difficult than the parent one, it implies that class itself can change. Operations can be applied to the qualities of verbs and adjectives; new actions and qualities can be created. In addition, the child state should be responsive to the static-dynamic option to get access to different variants of nested contexts in the memory. The easiest way to express it would the following: \begin{enumerate} \item Mask of the noun \item Adjectives in binary format \item Verbs in binary format \end{enumerate} What is important here, is the ingress action points. Action points are parameters that can be used to change classes by writing values into them. Every action point has two parts, operational bit and mask of the argument. If operational bit = 1, then $AND$. If operational bit = 0, then $XOR$. The third state is class's predicates serialization. Adjective's serialization can be carried out as follows: \begin{enumerate} \item Arguments' offsets \item Operations in a binary format \item Mask of the noun that describes the quality \end{enumerate} And verb's serialization as follows: \begin{enumerate} \item Masks of nouns that describe adjective \item Operations in a binary format \item Offset of the result action point \end{enumerate} For the ordering of binary operations we will use Zhegalkin's polynomial representation ~\cite{Zhegalkin}. Thus, all operations on predicates are stored as data. However, the actual difficulty is not classes’ predicates storing but packing them in the memory. Its meaning is that a parent class should be converted to generator of one's nested classes. We have to order children's masks to allow operations from the parent class create all required operations. Moreover, there should be multiple variants of nested class's recombinations, if possible. It is possible because the nested classes have already been created from the global ones. However, it was a multiple-step process. The most suitable option for development of such methods would be the genetic algorithm~\cite{Freitas}. The following parts are required to define the Genetic Algorithm: \begin{enumerate} \item spontaneous operations described earlier; they mix predicates of parent class for the best match to the test data; \item fitness function that takes test data and runs it through modified parent class to determine the one that generates more nested than others; \item test data that is various recombinations of masks of the nested classes. \end{enumerate} \begin{figure}[h] \centering \includegraphics[width=0.7\textwidth]{Pic15} \caption{Place of the modified class} \end{figure} The first two parts are already determined; now we need to sort the required test data. The main difficulty here is that fully functional performance requires test data of all siblings of parent class and their nested and subnested classes. Therefore, generation of test data should be intellectual; simple recombination of the nested class would not work. It is suggested that system of neural network be used. We will call it an Imaginator. Imaginator is a Generative Adversarial Networks~\cite{Goodfellow} and has two parts: a Generator and Discriminator. The working loop of Generator $G$ is in the following algorithm: \begin{algorithmic} \State let $C$ is class \State let $T$ is tree data for evolution testing \ForAll{class $D$ in context of Grand-Parent of $C$} \State let $R_0$ are all children of $D$ \State let $G(R_0)$ is recombination of $R_0$ \State $G(R_0)$ MUST be covered by mask of $D$ \State $G(R_0)$ MUST pass Discriminator \State put $G(R_0)$ to $T$ \ForAll{unique class $P$ in $G(R_0)$} \State let $R_1$ are all children of $P$ \State let $G(R_1)$ is recombination of $R_1$ \State $G(R_1)$ MUST be covered by mask of $P$ \State $G(R_1)$ MUST pass Discriminator \State put $G(R_0)$ to $T$ \EndFor \EndFor \State $M(C)$ are all classes modified by Evolution \State apply $T$ to $M(C)$ to get new modified contexts \State choose the most appropriate one \end{algorithmic} it is required that Generator $G(R)$ output corresponds with the mask of each parent class. However, it is not the only requirement. It is necessary that the Generator “could” pass the Discriminator. The Discriminator must ensure that Generator's output is realistic. For this purpose, the Discriminator learns on real data, specifically on combinations of nested classes that appear on the stack during work. The full learning process can be shown as follows: \begin{enumerate} \item Discriminator gets data for self-learning from the stack and trains Generator. \item Generator makes test data for Genetic Algorithm. \item Genetic Algorithm generates patches. \item If patches are applied to the memory tree, the data from the patch are considered as good. \item If patches roll back, the data from the patch are considered as bad. \end{enumerate} As the result, we see a chain of the Imaginator and the Genetic Algorithm that creates patches for the memory tree. In general, the process is as follows: the Discriminator takes recombinations for learning from the stack and trains the Generator; The Generator creates test data for the Genetic Algorithm; the Genetic Algorithm creates changed parent classes that are packed to patches. In addition, the Imaginator learns itself during the patch creation process. Apart from the standard learning process of the Generator and Discriminator, described above, there is an additional one. Let it be the set of patches $\{P_i\}$. If patches are applied to the memory tree, it would be a changed memory tree. This tree is then tested on the real data derived from the stack. If during the work flow the system reserves a positive motivation, then the changes are fixed. If the system does not receive a positive motivation, the changes are dropped. However, besides the positive motivation that reinforces the memory, there is pain. If the applied changes result in the pain syndrome, then $\{P_i\}$ patches are not only fixed, but also go to the Discriminator’s input as negative; and the Disciminator learns to avoid them. Thus, the system is configured to prioritize pain avoidance over a motivational reinforcement. Prospect theory~\cite{Kahneman} assumes that people intuitively analyze possible events in the wrong way. Low probabilities tend to be overvalued and the high ones tend to be undervalued. This effect should be observed in the model because the Generator creates recombinations of nested classes excluding the probability they occurrence in the real data. In addition, the overvaluation of negative possibilities should be observed because the pain effects are applied directly to the Discriminator. For the sake of completeness, we should introduce one more neural network, the Detector. It is also GAN that contains two parts. The Detector's discriminator searches repeating sequences in the stack to create new masks. The Detector's generator creates new unique sequences, which would never appear on the stack, to mark new qualities and actions. The Detector’s generator learns with the help of its Discriminator. The Detector's working process includes work of genetic algorithm and Imaginator with the only difference in the packing. It uses detailisation packing instead of abstraction. To give the final definition of the system with Reinforced Learning, we have to describe the input data and its ways. The continuous working process should have two types of data: ingress data for routine operations and control data for approval/rejection of generated patches. Ingress data come from two sources: \begin{enumerate} \item Signals from motor and sensor neurons with information from the external world. This is quite a simple type of information and the system considers it as external. It is called \textit{feeling}. \item Signals about total changes in the sets of applied and dropped patches. It has no precise knowledge about the information from the patches, but only indicators that show whether a patch was applied or dropped and in what order. This type of information is considered as internal. It is called \textit{emotions}. \end{enumerate} The control data do not pass into the model directly. However, they affect the learning process. There are two types of control data: \begin{enumerate} \item Pleasure. If the system receives pleasure, it applies a patch and reinforces the Generator. \item Pain. If the system receives pain, it drops a patch and reinforces the Discriminator. \end{enumerate} It should be noted that if ingress routine data come into the system continuously, the control data come sporadically. Most of the time the patches are created without any control data, the control data affect the final result only: whether a patch is going to be applied to the memory tree or not. \section{Dynamics} \label{sec:dynamics} All the previous sections described only one step in the whole system. However, the system should work continuously. Let us introduce the stack frequency. Obviously, the memory works with the same frequency. The memory packer and the Imaginator will work with proportional frequency. However, it is true not for all the system components. The Detector's frequency and operation sequence are not directly connected to the stack frequency. To conduct further analysis, let us remember that the brain consists not only of neurons, but it is also affected by hormones. Let us introduce two hormones: a happiness hormone and a sadness hormone. The hormones are excreted proportionally to applied or dropped patches. Let an applied patch $P_1$ excrete $H(P_1)$, and a dropped patch $P_2$ excrete$S(P_2)$. It is required to ensure a self-balancing model. If the process runs smoothly and all patches are applied one by one, the model needs a motivation for new data input. If the process fails and all patches are constantly dropped, the model needs a motivation to do something absolutely new that has never been done before. Let us introduce two frequencies for the Detector. $\omega_{lG}$ is the learning frequency of the Detector's generator and $\omega_{lD}$ is the learning frequency of the Detector's discriminator: $$ \omega_{lD} \mathpalette\approptoinn\relax \sum_{time period}H(P_1) $$ $$ \omega_{lG} \mathpalette\approptoinn\relax \sum_{time period}S(P_1) $$ where the sum is the total hormone accumulated over a certain period of time. Obviously, if the Detector's discriminator starts finding new stable sequences and creating new nouns, the number of errors should increase. The other components of the system's dynamic control are the excitation, depression and focusing. Consciousness does not directly participate in the processes, but affects them indirectly. The mechanism of the said influence is described below. Let us remind the reader of the global classes that we have introduced above. The global classes are classes that could be accessed from any private context. $\{G_i\}$ is a set of global classes. Let us match $p_i$ parameter to each global class and call it \first{priority of class}. We will call active priority at some point in time the sum of priorities of all global classes that are active at this point in time. $$ P=\sum_{active}p_i $$ Thus, the selection system can be introduces. If an active priority is above the average one, the system excites. If an active priority is below the average one, the system depresses. Similarly, we can now compare the priorities of two active contexts. We need to discuss the mechanisms of priority changing. We can define two mechanisms: external and internal. The external mechanism is quite a simple one. The priories of all active classes increase in the case of pleasure and decrease in the case of pain. This mechanism is used in animal training. An animal is fed when it performs the task successfully and punished when it fails to do so. We have to say that up until this moment the model could be applied to any mammal. The only difference would be the quantity of available layers on the stack. A human should have 6 layers, monkey -- 5 layers and rat -- 2 layers. However, humans are different from animals in that they develop and preserve speech across generations. The speech does not depend on genetics, it is transmitted from mother to child and later keeps on developing during the whole life. Chimpanzees can be trained to produce some basic speech elements, but this speech is only preserved and used if monkeys contact with humans. The only explanation is that humans must have a unique motivation to speak and communicate. We should also note that the external mechanism of priority changing is closely connected with the survival needs. However, the human internal mechanism is likely connected with the need to procreate. The other fact to support it is that speech develops constantly and not only due to hunger or threat. Moreover, all human societies consider communication to be the most important aspect of courtship, whereas animals practically do not communicate before mating. We can even assume that human internal motivation prevails over the external one. The internal priority change in a particular class occurs in the following independent cases. To increase: \begin{itemize} \item If the Input-Output layer has been stably operating for a long time. In this case the situation is absolutely predictable. \item If a patch is applied. In this case the system receives new knowledge. \end{itemize} To decrease: \begin{itemize} \item If the Input-Output layer is constantly updated. In this case the situation is absolutely unpredictable. \item If a patch dropped. In this case the system loses knowledge. \end{itemize} The motivation is not limited to these two cases. It is necessary to understand how the system would behave if these actions had different directions. To do that, let us introduce the concept of gender. We should bear in mind that gender is a mental concept, unlike sex that is a biological one. Gender determines a person's self-identification at a very early age, even before puberty. Also, the existence of gender phenomenon is supported by transgender people who do not feel themselves in their bodies. That said, the body itself is healthy and its hormonal environment corresponds to the biological sex. Gender does not affect the intellectual abilities, but it affects the motivation. The fact that the transgender people feel dysphoriain their social life can be the basis for this assumption. It's not depression or complete demotivation, but a similar borderline state. We can suggest that gender motivation should have borderline character. The model has the following options: \begin{description} \item[Male] The active class priority increases under long stable operation of the Input-Output layer, even if a patch has been dropped. \item[Female] The active class priority increases if a patch has been applied, even if the Input-Output layer has been updated several times. \end{description} However the proposed model does not describe the creation or alternation of global classes' set. It is suggested that the set already exists in the final form and the consciousnesses builds around it. Actually the set is an internal axiomatics. The creation of the set takes place with the different mechanics rather then teaching without a teacher. The author assumes the following process. When a child is born the special image of an adult is initially formed. Then a child creates the global classes' set following by adult's corrections. This requirement is necessary because a child needs the life important information that he could not verify in practice. At the puberty age the assisted process terminates and the later studies follows the adult model. \section{Conclusion} \label{sec:conclusion} This model describes the process of understanding the human speech, but now it has the following problems: \begin{itemize} \item There is no strict experimental basis, which could show how different people process the information. \item Practical implementation may be difficult because there is no clear understanding of the model's neural network structure. \item The model has no hypotheses or ideas on how to start its implementation from scratch and the newborn reflexes role. \end{itemize} \section{Acknowledgments} I thank Ilya Kruglov for editing of this manuscript. \bibliographystyle{alpha}
\section{Introduction} Gamma-ray bursts (GRBs) are the most energetic phenomena in the modern Universe. The physical mechanism to produce the observed $\gamma$-ray emission is still not identified (e.g. Kumar \& Zhang 2015 for a recent review). Here we consider a scenario in which the magnetic reconnection in turbulent media induces GRBs. We employ Lazarian \& Vishniac (1999, henceforth LV99) model of reconnection which has recently been extended for the relativistic regime (Takamoto et al. 2015, Lazarian et al. 2016). This model proposes that the reconnection rate depends on the intensity of the surrounding turbulence, and the reconnection is a boot-strap process as the reconnection-driven turbulence acts to boost the reconnection efficiency. In the standard fireball model (Pac\'ynski 1986; Goodman 1986; Shemi et al. 1990; Rees \& M\'esz\'aros 1992, 1994; M\'esz\'aros \& Rees 1993, 1997, 2000), magnetic fields are not dynamically important, i.e. $\sigma \ll 1$ in the emission region, where $\sigma$ is the ratio between the Poynting flux and the matter (baryonic $+$ leptonic) flux. As an alternative picture that is getting more and more popular, the magnetic field is dynamically important in GRB outflows, i.e. $\sigma_0 \gg 1$ at the central engine, and $\sigma \geq 1$ in the emission region (see, e.g., Usov 1992; Thompson 1994; Lazarian et al. 2003; Lyutikov \& Blandford 2003; Zhang \& Yan 2011, henceforth ZY11). In this model, the GRB emission is powered by the magnetic energy dissipation within the ejecta. Evidence supporting a Poynting-flux-dominated outflow in at least some GRB jets includes: the lack of an observed weak thermal component in most GRB spectra (Zhang \& Pe'er 2009); strongly polarized GRB emission (Coburn \& Boggs 2003; Willis et al. 2005; Yonetoku et al. 2011, 2012) and early optical emission (Steele et al. 2009; Mundell et al. 2013; Troja et al. 2017); more and more stringent upper limit of high-energy neutrino emission from GRBs (Zhang \& Kumar 2013; Aartsen et al. 2015, 2016, 2017); and evidence of bulk acceleration or anisotropic emission in GRB prompt emission and X-ray flares (Uhm \& Zhang 2016a,b; Jia et al. 2016; Geng et al. 2017a). A natural mechanism to dissipate magnetic energy is through magnetic reconnection. Magnetic reconnection has been widely discussed as the energy dissipation mechanism for GRBs (see Lyutikov \& Lazarian 2013 for review and ref. therein). However, the problem lies in the intrinsic difficulty of reconnection since it tends to be a very slow process in ordered magnetic fields. In addition, as in the case of solar flares, both a slow phase and a fast bursty phase of reconnection are required for explaining GRBs. Turbulent reconnection was suggested to account for the GRB observations in Lazarian et al. (2003), where the LV99 model was employed. It was conjectured that LV99 can be generalized for the relativistic case and the reconnection can proceed with $V_A\rightarrow c$. More recent research provided support for this conjecture (Takamoto et al. 2015). As discussed in Lazarian et al. (2003), along with the build up of turbulence, reconnection rate increases. It induces a positive feedback and further drives turbulence, resulting in the explosive reconnection. This idea became the basis of the Internal-Collision-induced MAgnetic Reconnection and Turbulence (ICMART) model (ZY11), who showed that such a model can overcome several difficulties of the traditional internal shock model (Rees \& M\'esz\'aros 1994; Kobayashi et al. 1997; Daigne \& Mochkovitch 1998; Ghisellini et al. 2000; Kumar \& McMahon 2008) and can well interpret the lightcurves and spectra of GRBs (Zhang \& Zhang 2014; Uhm \& Zhang 2014; Xu \& Zhang 2017; Xu et al. 2017). ZY11 speculated that the magnetic field reversals required to trigger ICMART events may be achieved through internal collisions among high-$\sigma$ blobs. Under the framework of a helical magnetic configuration, they suggested that repeated collisions may accumulate magnetic distortions and eventually reach the threshold to trigger the run-away turbulent reconnection. Deng et al. (2015) performed a series of relativistic MHD numerical simulations of collisions of high-$\sigma$ magnetic blobs, and found that significant magnetic dissipation can indeed occur with an efficiency above 30\%. However, the simulations are on the global scale and no detailed turbulent reconnection features on small scales can be observed. In this paper we introduce an alternative mechanism to trigger ICMART-like events in ZY11 by invoking the kink instability. This can provide a self-consistent scenario of GRBs based on the turbulent reconnection model. As the main difference of this model from other kink-driven models of GRBs (e.g. Drenkhahn \& Spruit, 2002; Giannios \& Spruit, 2006; Giannios, 2008; McKinney \& Uzdensky, 2012), the kink instability also induces turbulence (Galsgaard \& Nordlund, 1997; Gerrard and Hood, 2003), which drives fast magnetic reconnection similar to the original model of ZY11. Regarding the theoretical basis of our model, we will discuss the details of turbulent reconnection in view of the latest theoretical and numerical advances in the high-$\sigma$, relativistic regime. In what follows we first present the physical ingredients of our model in \S 2 and justify the applicability of turbulent reconnection process in GRB conditions in \S 3. We confront our model with GRB observations in \S 4. A discussion of our results is provided in \S 5. \section{Model Ingredients} \subsection{Triggering magnetic dissipation through kink Instability}\label{ssec: kik} Various theoretical arguments and observational evidence suggest that GRBs originate from ultra-relativistic jets with bulk Lorentz factor $\Gamma > 100$ (e.g. Lithwick \& Sari 2001; Taylor et al. 2004; Zhang et al. 2006; Kato et al. 2008; Abdo et al. 2009a,b). Various polarization studies of prompt and afterglow emission indicate the presence of a large-scale ordered magnetic field (Yonetoku et al. 2011, 2012; Mundell et al. 2013; Wiersema et al. 2014) in the ejecta. Rotation is a generic property of astrophysical jets that arises from the transfer of the angular momentum from the accreting material and the central engine through the magnetic field (see Blandford \& Znajek 1977, Blandford \& Payne 1982; Bisnovatyi-Kogan \& Lovelace 2001). Such a rotation is expected to produce a magnetic spiral within the jet associated with a GRB (see more in Kumar \& Zhang 2015). Although the magnetic spiral has substantial free energy, a helical magnetic field does not reconnect on its own. Indeed, magnetic fields in the adjacent magnetic coils are of the same direction, and this inhibits their reconnection. Therefore, the spiral should be destabilized to allow for the magnetic reconnection. A kink instability is one of the plausible processes that can destabilize the spiral magnetic field in the jet. The stability of current-carrying force-free (or nearly force-free) fields was extensively studied for cylindrical geometry in the astrophysical context (see Baty \& Heyvaerts 1996; Li 2000; Baty 2001; Gerrard et al. 2002, Torok et al. 2004). Physically, the kink instability arises as the winding of the magnetic field in the jet gets so tight that a particular threshold is exceeded. This process can be induced if, for instance, the jet is slowed down by the external media, or there are variations of velocity and density within the jet. As this happens, the adjacent coils of magnetic fields get closer and subsequently the kink instability develops. It results in oppositely directed magnetic fluxes that can reconnect releasing the stored magnetic energy. \begin{figure}[htbp] \centering \includegraphics[width=8cm]{kimd.pdf} \caption{Illustration of the kink instability in the GRB jet.} \label{figure2} \end{figure} Figure \ref{figure2} illustrates the kink instability of the magnetic field in the GRB jet. In this scenario, due to the velocity variations within the strongly magnetized jet launched by the central engine, the faster part of the jet approaches its slower part in front, where the spiral magnetic field is squeezed together and the condition for triggering the kink instability (see Eq. (\ref{eq:2})) is satisfied. The resulting magnetic flux reversals entail magnetic reconnection. In the presence of turbulence, it is substantially efficient in energy dissipation to account for the GRB emission (see \S \ref{ssec: returr}). For simplicity, let us consider a cylindrical jet with a length $L$ and a cross-section radius $R$. In the case of a helical magnetic field geometry, the spiral magnetic field obeys the equation (see Freiberg 1987): \begin{equation} \frac{R d\theta}{dz}=\frac{B_t}{B_p}, \end{equation} where $B_p$ and $B_t$ are the poloidal and toroidal magnetic field strengths, respectively. $\theta$ gives the toroidal direction, and $z$ is the distance along the jet axis. One can then define a safety factor $q$, such that $2 \pi R / q L = B_t/B_p$ is satisfied. The kink instability condition is given by \begin{equation} q = \frac{2\pi R B_p}{L B_t} < 1, \label{1} \end{equation} which is called the Kruskal-Shafranov (KS) criterion. This can be rewritten as \begin{equation} \frac{ B_t}{B_p} > \frac{2\pi R}{L}. \label{eq:1} \end{equation} The growth rate of the instability is $\gamma_g \sim \frac{B_0}{\rho R} \sqrt{(1/q) (1/q-1)}$ (see more in Goedbloed \& Poedts 2004). It grows faster for a stronger magnetic field $B_0 \sim B_t$ (for toroidally-dominated field) and a lower plasma density $\rho$. The above idealized criterion only applies to the situation with a constant $\rho$ and uniform winding of magnetic fields. It should be modified in realistic settings of GRBs with more complex structure of density and magnetic fields. Besides, in the relativistic case, it is appropriate to adopt the force-free approximation where only the charges, currents, and fields are accounted for, but the inertia and pressure of the plasma are ignored. By taking into account the stabilizing effect of the rotating magnetic spiral, one can extend the classical KS criterion. Under this consideration, we find that the kink instability arises if both the KS criterion and an additional condition (Tomimatsu et al. 2001) \begin{equation} \frac{B_t}{B_p} > \frac{R}{R_{\rm LC}} = \frac{R \Omega_B}{c} \label{eq:2} \end{equation} are satisfied. Here $\Omega_B$ is the angular velocity of the magnetosphere of the central engine, which is also the angular velocity of the spiral magnetic field, and $R_{\rm LC} = c/\Omega_B$ is the radius of the light cylinder of the central engine. For GRBs, $L = c \Delta t_{\rm slow} = 3\times 10^{10} \ {\rm cm} (\Delta t_{\rm slow})$, where $\Delta t_{\rm slow}$ is the typical duration of the ``slow variability component'' of GRB lightcurves, which defines the duration of central engine activity for each active episode of GRB emission (Gao et al. 2012). The central engine of GRBs are typically millisecond rotators, so that $R_{\rm LC} = 4.8 \times 10^6 {\rm cm} P_{-3}$. As a result, the criterion Eq.(\ref{eq:2}) is more stringent than Eq.(\ref{eq:1}), so that it is more relevant. More complicated set-ups for the kink instability development within relativistic jets have been explored numerically (see McKinney \& Blandford 2009, Mizuno et al. 2009, 2011, 2012, 2014, Mignone et al. 2010, ONeill et al. 2012). These simulations revealed a variety of initial conditions that influence the growth and the evolution of the kink instability. The numerical results are consistent with the general conditions Eqs. (\ref{eq:1}) and (\ref{eq:2}), which we use as a guidance for our further discussion. For a Kerr black hole as the central engine that launches a relativistic jet, the jet is kink stable if the condition \begin{equation} | \Omega_B - \Omega_{\rm BH} | < \Omega_{B} \end{equation} is satisfied (Tomimatsu et al. 2001). This requires that the magnetosphere angular velocity does not differ from the black hole angular velocity significantly, that is (Tomimatsu et al. 2001) \begin{equation} \Omega_B \geq \Omega_{\rm BH}/2. \end{equation} Such a condition is usually satisfied for a GRB engine, so that for a helical jet launched from a hyper-accreting BH, the jet may propagate to a large distance without triggering kink instability. For a steady cylindrical jet, from Eq.(\ref{eq:2}) one can see that the kink instability condition is either satisfied or not throughout the jet propagation. Such a conclusion applies even in a more general case with the jet radius evolving with the distance from the central engine. Without losing generality, one can write \begin{equation} R \propto r^b. \end{equation} For a cylindrical and a conical jet, one has $b=0$ and $b=1$, respectively. In general, one may have $0<b<1$. Magnetic flux conservation gives \begin{eqnarray} B_p & \propto & R^{-2} \propto r^{-2b}, \\ B_t & \propto & R^{-1} \propto r^{-b}. \end{eqnarray} This suggests that both sides in Eq.(\ref{eq:2}) are proportional to $r^b$, so that Eq.(\ref{eq:2}) is satisfied (or not) throughout the jet regardless of the geometrical configuration of the jet. It shows that in order to trigger kink instability in a jet, one needs to introduce additional mechanism to alter the magnetic configuration of the jet. There are at least three possible ways of triggering kink instability in the GRB context. In the first scenario, a magnetized jet is decelerated as it penetrates through the stellar envelope of the progenitor star. This would induce significant magnetic energy dissipation below the photosphere and result in a matter-dominated fireball with strong photospheric emission. It more likely happens during the early phase of a GRB. At later times when the early portion of the jet successfully escapes the star, the Poynting-flux-dominated jet is able to reach a large distance from the central engine before significant dissipation happens. The second scenario to trigger kink instability involes external pressure from the ambient medium. Analogous to the external shock model of GRBs (Rees \& M\'esz\'aros 1992; M\'esz\'aros \& Rees 1993, 1997), it invokes external medium to decelerate the jet, and thus, the increase of the $B_t/B_p$ ratio in the jet triggers kink instability. The emission region of this model is close to the deceleration radius, i.e. $R_{\rm GRB} \sim R_{\rm dec} \sim 10^{17}$ cm for typical GRB parameters. The third scenario, similar to the internal shock model (Rees \& M\'esz\'aros 1994) and the ICMART model (ZY11) of GRBs, requires intrinsic irregularity of the central engine and interactions between different parts in the jet with different bulk Lorentz factors to increase the $B_t/B_p$ ratio to trigger kink instability (see Figure \ref{figure2}). This latter scenario is more consistent with the GRB observational data (see \S\ref{sec:obs} for more discussions). Similar to the ICMART model (ZY11), the emission radius in this scenario is $R_{\rm GRB} \sim \Gamma^2 c \Delta t_{\rm slow} \sim 10^{15}$ cm. This can be understood based on the following reasons. In the ICMART model, the collision of two magnetized shells is responsible for altering the magnetic configuration and triggering reconnection. In the current scenario, instead of the collision of two physically separated magnetized shells, it simply requires a continuous jet with velocity fluctuations within it. The trailing high-$\Gamma$ part of the jet catches up with the leading low-$\Gamma$ part at a radius similar to the collision one. Without a direct collision, the ram pressure of the trailing part squeezes the magnetic field configuration in the system, leading to the onset of kink instability and magnetic dissipation. A GRB is then produced around the same radius as the ICMART model. It is important to note that kink instability does not necessarily disrupt the jet, but only results in the change of magnetic field structure, which enables the subsequent magnetic reconnection. Magnetic reconnection is driven by the free energy of magnetic fields. In a generic situation of 3D geometry, it causes the annihilation of contacting oppositely directed magnetic fluxes. \subsection{Relativistic Reconnection of Turbulent Magnetic Fields} \label{ssec: returr} \subsubsection{Magnetic reconnection in turbulence} The problem that challenges the traditional reconnection model, known as the Sweet-Parker model (shown in the upper part of Figure \ref{figure1}), is the unrealistically slow reconnection rate in astrophysical conditions. This inefficiency arises from the disparity between the astrophysical scale $L_x$, over which the plasma is carried into the reconnection region, and the microphysical scale $\Delta$ determined by the plasma resistivity, over which the plasma is ejected out from the reconnection region. Taking into account that the ejection velocity is approximately the Alfven velocity $V_A$, one can easily find that the reconnection rate for incompressible media, \begin{equation} V_{rec}\approx V_A \frac{\Delta}{L_x}, \label{for1} \end{equation} is very small, $\ll V_A$. In fact, for the outflow region determined by the Ohmic resistivity $\Delta \approx \eta/V_{rec}$, one recovers the Sweet-Parker formula for the reconnection rate $V_{rec, SP}\approx V_A S^{-1/2}$. Here $S= L_xV_A/\eta$ is the Lundquist number, where $\eta$ is the resistivity. It can be huge, e.g. of the order $10^{10}$ or even $10^{20}$, in many astrophysical situations. As a result, the reconnection rate in the classical Sweet-Parker model is negligible for typical astrophysical settings. Below we show that the situation changes dramatically in the presence of turbulence. Turbulence is ubiquitous in astrophysical environments, and it is detected essentially in every case where it is searched for, e.g., the Big Power Law in the Sky of interstellar electron density fluctuations (Armstrong et al. 1993, Chepurnov \& Lazarian 2010), non-thermal line-width broadening of various spectral lines. As we will describe later, there are strong reasons for us to expect that the reconnection in GRB environments takes place in a turbulent medium. Turbulence is stochastic, but it obeys statistical laws. The famous Kolmogorov scaling is an example of such a law. For incompressible MHD turbulence, an analog of Kolmogorov theory is the theory proposed in Goldreich-Sridhar (1995, henceforth GS95; see Brandenburg \& Lazarian 2013 for a review) \footnote{We believe that the time of vigorous debates of whether the GS95 model should be modified, e.g. by taking into account additional effects like alignment/polarization (Boldyrev 2005, 2006, Beresnyak \& Lazarian 2006), non-locality of turbulence (Gogoberidze 2007), is over. Both theoretical (Beresnyak \& Lazarian 2010) and numerical (Beresnyak 2013, 2014) studies suggest that the GS95 model provides a proper description of MHD turbulence. Therefore in what follows we do not discuss alternative turbulence models. In any case, the insignificant changes of the scalings, e.g. from the Kolmogorov spectrum of $k^{-5/3}$ to the Kraichnan spectrum of $k^{-3/2}$ advocated by alternative constructions, do not change significantly the model of turbulent reconnection in our consideration.}. The GS95 theory is the basis of Lazarian \& Vishniac (1999) theory of magnetic reconnection. In what follows we shall employ the model of turbulent reconnection in LV99. This model of non-relativistic reconnection has been numerically tested in Kowal et al. (2009, 2012) and successfully compared with observations in a number of studies (see Ciravella \& Raymond 2008, Sych et al. 2009, Eyink et al. 2013, Eynk 2014, Singh et al. 2015, Kadowaki et al. 2015, Khali et al. 2015, Lalescu et al. 2015, see also Lazarian et al. 2015, 2016 for reviews) \footnote{We note that in the review by Karimabadi \& Lazarian (2013), it was stated that no studies revealed the correspondence between the observed Solar wind reconnection and the LV99 predictions. This deficiency was corrected in Lalescu et al. (2015) where such correspondence was found.}. Note that the LV99 expression that we will apply has also been re-derived using other theoretical approaches in Eyink et al. (2011) and Eyink (2015). This model was employed in Zhang \& Yan (2011) and became the corner stone of the ICMART model for GRBs. More recent study in Takamoto, Inoue \& Lazarian(2015, henceforth TIL15) showed that the LV99 model can be successfully generalized for the relativistic reconnection. \begin{figure*}[htbp] \centering \includegraphics[width=10cm]{f5.pdf} \caption{Upper panel: Sweet-Parker reconnection. Lower Panel: Turbulent reconnection in LV99. } \label{figure1} \end{figure*} The LV99 model and its comparison with the classical Sweet-Parker reconnection is illustrated in Figure \ref{figure1}. Within LV99 model, the outflow region is determined by the magnetic field line wandering. This is in contrast to the Sweet-Parker model where the outflow is determined by the plasma microscopic diffusivity. As a result, within the LV99 model the reconnection can be both fast and slow depending on the level of turbulence. If turbulence is of low amplitude, the magnetic field wandering is small, and thus the resulting outflow opening $\Delta$ is strongly constrained. The reconnection speed can be obtained from the mass conservation, namely, $V_{rec}\approx V_A \Delta/L_x$, where $V_A$ is the Alfven speed, and $L_x$ is the extent of contact surface between two magnetic fluxes in Fig. \ref{figure1}. The outflow thickness grows as the level of turbulence increases. Naturally, this increases the rate of turbulent reconnection. The fact that the reconnection can be both slow and fast is important for explaining reconnection explosions that we claim is a part of the GRB phenomenon. Wandering or meandering of magnetic field is well known (see Jokipii 1973) and numerically tested (see Lazarian, Vishniac \& Cho 2004, Beresnyak 2011). This effect has been applied for decades to studying the perpendicular diffusion of cosmic rays in astrophysical magnetic fields, although the proper quantitative treatment of the effect was only developed in LV99. LV99 not only serves as a theory for the turbulent reconnection, but also provides a different physical interpretation of GS95 theory of turbulence. In particular, one can describe turbulent motions as eddies perpendicular to the magnetic field. The induced mixing of field lines in the direction perpendicular to the magnetic field is most energetically favorable as it does not involve magnetic field bending. Such mixing motions of field lines are facilitated by the turbulent reconnection that acts within one eddy turnover time. While in the original GS95 paper, the mixing motions were believed to be in the direction perpendicular to the mean magnetic field, LV99 correctly pointed out that it should be local magnetic field that matters. Naturally, as the perpendicular mixing is not subject to the magnetic tension, it leads to the energy cascade consistent with the Kolmogorov spectrum. As the other corner stone of GS95 theory, the scaling relation of anisotropic MHD turbulence can also be easily understood in LV99 picture. It is the consequence of the equalization between the period of the Alfvenic perturbation along the magnetic field and the eddy turnover time. By extending the GS95 theory to the sub-Alfvenic regime, LV99 obtained the expression of $\Delta$ from magnetic field wandering: \begin{equation} \Delta\approx L_x \left(2\epsilon_{inj} l {V_A^3}\right)^{1/2} \min\left[\left({L_x\over l}\right)^{1/2}, \left({l\over L_x}\right)^{1/2}\right], \label{Delta} \end{equation} where $\epsilon_{inj}$ is the injected turbulent energy, and $l$ and $L_x$ are the turbulence injection scale and the extend of the ``current sheet". We term it as ``current sheet", becuase in turbulent media the individual current sheet evolves to produce a complex network of fractal current sheets, which extends over the thickness $\sim \Delta$ determined by magnetic field line wandering. The speed of reconnection $V_{rec}$ can trivially be obtained from the mass conservation condition: \begin{equation} \rho_i V_{rec} L_x =\rho_s V_A \Delta, \label{mass} \end{equation} where $\rho_i$ is the density of the inflow and $\rho_s$ is the density of the matter in the ``current sheet". Under the incompressible approximation adopted in LV99, there is $\rho_s=\rho_i$, and thus turbulent reconnection rate can be presented as \begin{equation} V_{rec}\approx V_A \left(2\epsilon_{inj} l{V_A^3}\right)^{1/2} \min\left[\left({L_x\over l}\right)^{1/2}, \left({l\over L_x}\right)^{1/2}\right]. \label{recon1} \end{equation} For sub-Alfvenic driving, the injection of energy is related to the velocity at the injection scale $V_l$ according to the expression (LV99) \begin{equation} \epsilon_{inj}\approx V_l^4/2 lV_A. \label{eps} \end{equation} Combining Eqs. (\ref{recon1}) and (\ref{eps}), one can get \begin{equation} V_{rec}\approx V_A\min\left[\left({L_x\over l}\right)^{1/2}, \left({l\over L_x}\right)^{1/2}\right] \left(\frac{V_l}{V_A}\right)^2, \label{recon} \end{equation} which indicates that $V_{rec}$ of turbulent reconnection differs from $V_A$ by a factor that depends on the ratio between the turbulence injection scale to the current sheet scale, as well as the ratio between the velocity at the injection scale and the Alfven velocity. \subsubsection{Magnetic reconnection in relativistic and strongly magnetized turbulence} For GRBs, we deal with relativistic plasmas with strong magnetization $\sigma\equiv B^2/4\pi h c^2\gg 1$, where $h=4$ is the specific enthalpy of relativistic ideal gas. In what follows, we summarize our current knowledge about this regime of turbulent reconnection. Very importantly, the GS95 model can also be used for describing relativistic Alfvenic turbulence (Thompson \& Blaes 1998). This relativistic analog of GS95 was successfully tested for the case of decaying turbulence in Cho (2005) under the so-called force-free approximation. \footnote{In relativistic MHD turbulence, the force free approximation corresponds to the zeroth term of expansion of relativistic magnetohydrodynamics over a small parameter $1/\sigma$, where $\sigma$ is the ratio $2u_B/u_\rho$ with $u_B=B^2/8\pi$ as the magnetic energy density and $u_\rho=\rho c^2$ as the rest mass energy density.} The simulations of fully relativistic MHD turbulence (Zhang et al, 2009; Inoue et al, 2011; Beckwith and Stone, 2011; Zrake \& MacFadyen, 2012, 2013; Garrison \& Nguyen, 2015) delivered results also consistent with the GS95 expectations. Recent studies of compressible relativistic MHD turbulence in Takamoto \& Lazarian (2016, 2017) revealed the difference between it and its non-relativistic analog (see Cho \& Lazarian 2002, 2003, Kowal \& Lazarian 2010). While the scaling of the Alfven and slow modes are similar to those in the non-relativistic simulations, the coupling of the Alfven and fast modes is stronger in the relativistic case. This coupling requires further studies, and it presents an uncertainty factor in this work. However, it does not change the general correspondence between relativistic and non-relativistic MHD. In addition, the analogy between turbulence in the non-relativistic and relativistic regimes extends to a regime of imbalanced MHD turbulence with different energy fluxes in opposite directions. The corresponding theory of non-relativistic imbalanced or non-zero cross-helicity MHD turbulence was earlier suggested in Beresnyak \& Lazarian (2008). Furthermore, it was shown to be also true for imbalanced relativistic MHD turbulence (Cho \& Lazarian 2014). This supports our claim of the intrinsic similarity between Alfvenic turbulence in relativistic and non-relativistic regimes. Based on the similarity between relativistic and non-relativistic Alfvenic turbulence, one can expect that magnetic reconnection also gets fast in relativistic magnetized fluids. Despite the difference, i.e., higher coupling strength between Alfvenic and fast modes as discussed earlier, physics of turbulent reconnection stays the same. Besides, magnetic field lines in relativistic case can also be traced by the charged particle trajectories, and the effect of increased outflow thickness can also remove the bottleneck of the Sweet-Parker reconnection in the relativistic situation. Indeed, recent relativistic simulations in TIL15 have confirmed the similarity between the relativistic reconnection and the non-relativistic one. They demonstrated that the turbulent reconnection speed can be as large as $0.3 c$, which thus enables highly efficient conversion of magnetic energy into kinetic motions and particle acceleration. The numerical results in TIL15 can be approximated by an expression that generalizes Eq. (\ref{recon}). To derive this expression, one should take into account both the density change in the relativistic plasma and the modification of turbulence properties in the relativistic regime. The former can be obtained from the conservation of energy flux. With both analytical considerations and numerical simulations provided in TIL15, there is \begin{equation} \frac{\rho_s}{\rho_i}\sim 1-\beta \left(\frac{V_l}{c_A}\right)^2, \end{equation} where $\beta$ was found in numerical simulations to be a function of $\sigma$. The change of $\Delta$ was shown to correspond to the original Eq. (\ref{Delta}), but with $\epsilon_{inj}$ reduced compared to the value in non-relativistic case. This corresponds to the transfer of larger fraction of energy to the fast modes which are subdominant in inducing magnetic field wandering, as indicated by simulations in Takamoto \& Lazarian (2016, 2017). With these modifications, the corresponding expression of the turbulent reconnection can be written as \begin{eqnarray} V_{rec, relativ.} & \approx & V_A \left(\frac{\rho_s}{\rho_i}\right) \left(2\alpha \epsilon_{inj} l {V_A^3}\right)^{1/2} \nonumber \\ & \times & \min\left[\left({L_x\over l}\right)^{1/2}, \left({l\over L_x}\right)^{1/2}\right], \label{relativ} \end{eqnarray} where $\alpha<1$ is the factor accounting for the decrease in the fraction of magnetic energy that induces magnetic field wandering. It is evident from Eq. (\ref{relativ}) that the theory of relativistic turbulent reconnection does require further development in order to decrease the uncertainties related to magnetic turbulence in relativistic fluids. For the time being it is important for our further discussion that qualitatively relativistic turbulent reconnection is similar to its non-relativistic counterpart. The existing numerical simulations in TIL15 provide us with guidance for studying the reconnection in GRBs. In particular, it is clear from the simulations that in high $\sigma$ flows, the turbulent reconnection speed only slowly changes with the injection velocity and does not depend on the guide magnetic field, i.e., the common field component shared by the two reconnected fluxes. The injection scale of the turbulence induced through the kink instability is likely to be comparable to the scale of the magnetic field flux tubes, i.e. $l\sim L_x$. In this situation, by extrapolating the results in TIL15, one can claim that the reconnection rate is larger than $0.1 c_A$, where the relativistic Alfven speed $c_A$ is very close to the light speed. \section{GRBs driven by turbulent reconnection} \subsection{Justification of turbulent reconnection in GRBs} There are other theories proposed for increasing the turbulent reconnection rate. Therefore, it is necessary to discuss why we believe that the turbulent reconnection is the most relevant process for the GRB physics. The model suggested by Petscheck (1968) was for decades the well accepted mechanism for the fast magnetic reconnection. The mechanism reached the apogee of popularity after numerical simulations including the Hall effect show that the Petschek-type X-point reconnection can happen in a collisionless plasma (Shay et al, 1998; Drake, 2001; Drake et al, 2006). However, as pointed out in e.g. LV99, such configurations are very difficult to realize in realistic astrophysical settings. Another model for fast reconnection relies on the instabilities of the Sweet-Parker reconnection layer, e.g. tearing instabilities. Their importance was strongly advocated by Syrovatskii (see 1981 for a review and ref. therein) and has been widely recognized by the community more recently (Biskamp 1986; Shibata \& Tanuma 2001, Daughton et al. 2006, 2009, 2011, 2014; Fermo et al. 2012, Loureiro et al. 2007, 2012, Lapenta 2008; Bhattacharjee et al. 2009, Cassak et al. 2009; Huang \& Bhattacharjee 2010, 2012, 2013; Shepherd \& Cassak 2010; Uzdensky et al, 2010, Huang et al. 2011, Barta et al. 2011, Huang et al. 2011, Shen et al. 2011, Takamoto 2013, Wyper \& Pontin 2014). The reconnection rates obtained in MHD regime were limited to $\sim 0.01$ of $V_A$ (e.g. Loureiro et al. 2007), which is obviously inadequate to account for the energy dissipation in GRBs. Differently, we believe that turbulence plays a significant role in the context of the GRBs. The typical Reynolds number in GRB conditions is $Re\sim (10^{27} - 10^{28}) \gg 1$ (ZY11), where turbulence is inevitable and its effect on reconnection cannot be disregarded. For instance, it is well known that turbulence can efficiently suppress tearing instabilities (Somov \& Vornota 1993). This was also numerically confirmed by Kowal et al. (2018). Moreover, as we discussed earlier, turbulence enables fast relativistic reconnection without the need of any instabilities. One can provide arguments that even initially the level of turbulence is low and tearing instabilities are more important, the generic final picture of reconnection will be dominated by turbulence. The relevant fast reconnection in astrophysics is that at a very large Lundquist number, i.e. $S\gg 1$. This number is related to the Reynolds number of the outflow $Re=\Delta V_A/\kappa$, where $\kappa$ is viscosity, by \begin{equation} Re=S \frac{V_{rec}}{V_A} Pt^{-1} , \label{Re} \end{equation} where $Pt=\kappa/\nu$ is the Prandtl number. Thus for $V_{rec}$ being $0.01$ or a larger fraction of $V_A$, the $Re$ number of the outflow increases in parallel with $S$. In GRB magnetic dissipation region with $\sigma > 1$, $S$ is essentially the magnetic Reynold's number in the Bohm diffusion limit, which is $\sim 3\times 10^{12}$ for typical GRB parameters (Eq.(40) of ZY11). Therefore, it is natural to expect the outflow to be turbulent and the transfer to turbulent reconnection to occur (see Lapenta \& Lazarian 2012). Therefore, turbulent reconnection is the most likely realization of the magnetic reconnection in the conditions of a GRB. Even current low-resolution numerical simulations show the development of turbulence as an outcome of 3D reconnection both in compressible and incompressible media (see Oischi et al. 2015, Lazarian et al. 2015, 2016, Beresnyak 2017). The transfer to the state of turbulence within 3D reconnection was also observed in Huang \& Bhattachargee 2016. A more extended study of the same set up in Kowal et al. (2017) showed that the GS95 turbulence is generated as a result of reconnection and the LV99-type reconnection ensues. Besides these simulations performed in non-relativistic regime, the transfer from tearing reconnection to a fully turbulent reconnection was indicated from the relativistic simulations of pulsar wind in Zrake (2016). There it was found that the magnetic energy dissipation rate is insensitive to the grid resolution, showing the reconnection in the presence of turbulence is universal with respect to the unresolved physics. Based on the above studies, we expect a close similarity between the turbulence self-driven reconnection in non-relativistic and relativistic regimes. \subsection{Modifications based on the ICMART model} The pioneering model on GRBs built upon the turbulent reconnection is the ICMART model by ZY11. In this model, the interaction of magnetized slabs increases the degree of magnetic turbulence in the slabs, allowing magnetic fields to dissipate in a burst of turbulent reconnection. In other words, ZY11 invokes collision-induced magnetic reconnection and turbulence to interpret GRB prompt emission. Numerical simulations of collisions between magnetized blobs (Deng et al. 2015) revealed significant magnetic dissipation through reconnection. The magnetic dissipation efficiency can reach $\sim 35\%$, consistent with the analytical estimate of ZY11. The simulations also showed the existence of local Doppler-boosted regions due to reconnection, which is consistent with the mini-jets invoked in magnetic dissipation models of GRBs (Lyutikov \& Blandford 2003), which would shape the lightcurves of GRBs (Zhang \& Zhang 2014). The model entails a relatively large emission radius from the central engine, and has a list of features that match the observations very well (see \S \ref{sec:obs} below). Our present model is constructed based on the ICMART model and thus shares many common features with it that were described in detail in ZY11. Here we only focus on the modifications and discuss their necessity and significance. As a major difference from the ICMART model, we introduce a more favorable mechanism of initiating turbulent magnetic reconnection. Namely, instead of collisions of magnetized slabs adopted in the ICMART model, we employ the kink instability, which naturally takes place in the relativistic and strongly magnetized jet of a GRB and inevitably induces turbulence and turbulent reconnection (see \S \ref{ssec: kik}). The development of kink instability in a relativistic and Poynting-dominated jet is shown in numerical simulations (Mizuno et al. 2012, 2014; ONeill et al. 2012). Besides, as the theoretical core of both the ICMART model and our current model, turbulent reconnection has developed on more solid foundations. While ICMART model was suggested at the time when the theory of turbulent reconnection was supported only by non-relativistic simulations, by now new progress has been achieved in understanding relativistic turbulence. Compared to the original ZY11 publication, currently we have the numerical evidence that the turbulent reconnection is applicable to relativistic fluids (see e.g. Takamoto et al. 2015). It is important to stress that the bursty feature of turbulent reconnection (LV99) can account for the erratic behavior of GRB emission (see \S \ref{sec:obs}). Consider a magnetically dominated low-$\beta$ plasma with weakly turbulent magnetic flux tubes coming into contact with each other. Initially, the magnetic reconnection proceeds at a slow pace (see Figure \ref{figure1}), as magnetic field lines are nearly laminar and the ratio of outflow region $\Delta$ to $L_x$ is very small. With the increase of $\Delta$, when the outflow Reynolds number becomes considerably larger than unity (see Eq. (\ref{Re})), the rising turbulence in the outflow will increase the fluctuations of surrounding magnetic field lines, inducing their higher level of wandering. This further extends the width of the outflow region $\Delta$ and increases the reconnection rate, as well as the energy injection in the system. A higher level of energy injection and a higher $Re$ of the outflow both enhance the level of turbulence in the system. The above positive feedback can additionally enhance the level of turbulence that is initially excited by the kink instability, and leads to an explosion of reconnection. A quantitative model for such a process was presented for a non-relativistic low-$\beta$ reconnection in Lazarian \& Vishniac (2009).\footnote{Besides the application to GRB emission, this boot-strap turbulent reconnection can also explain the formation of solar flares, as their existence requires both phases of slow and fast reconnection. In addition, the turbulence generated from the reconnection in one region can also trigger the reconnection in surrounding regions (LV99). Such a process was reported in the observations of Sych et al. (2009, 2015) (see also Guti{\'e}rrez et al. 2017). } \subsection{Comparison with other GRB models based on magnetic reconnection} There exist several other GRB models that invoke magnetic reconnection as the origin of prompt emission. In the following we comment on how our model differs from those models. Thompson (1994) envisaged a scenario of invoking mildly relativistic Alfven turbulence excited in the wind by reconnection, or by hydrodynamical instabilities triggered by magnetic tension. The reconnection process was discussed within the framework of the Petschek (1964) mechanism, which was later found unstable and not confirmed by numerical simulations. A photon spectrum is formed via Comptonization of thermal photons at a moderate or high scattering optical depth. The resulting spectrum is quasi-thermal, and the emission radius is close to the central engine. This is the earliest version of magnetic dissipative photosphere model in the GRB literature. Many authors further developed the magnetic dissipative photosphere model invoking magnetic reconnection below the photosphere (e.g. Drehkhahn \& Spruit 2002; Giannios 2006; Veres et al. 2013; Beniamini \& Giannios 2017). This model predicts a dominant photosphere emission component in the GRB prompt emission spectra, which may be consistent with some GRBs (e.g. GRB 090902B, Abdo et al. 2009b; Ryde et al. 2010; Pe'er et al. 2012), but may not explain those GRBs that do not show significant thermal emission component. Spruit et al. (2001) discussed a striped-wind magnetic field configuration with alternating polarity and argued that magnetic reconnection can happen continuously in the outflow both below and above the photosphere. They assumed that reconnection can proceed rapidly with local Alfven speed and argued that efficient $\gamma$-ray emission can be produced. The radiation spectrum was not calculated. McKinney \& Uzdensky (2012) proposed a reconnection switch model of GRBs. They argued that as the GRB jet streams out, the comoving density in the jet decreases steadily. At a certain distance from the central engine, magnetic reconnection switches from the collisional regime (associated with Sweet-Parker reconnection) to the collisionless regime (associated with Petscheck reconnection) so that the reconnection speed increases rapidly. Significant magnetic dissipation occurs and a GRB is triggered. The switching distance could be below or above the photosphere radius, and the authors emphasized the possible enhancement of photosphere emission. \section{Comparison with observations}\label{sec:obs} The GRB prompt emission model outlined here shares many properties as the ICMART model, and has the advantage to interpret the observational data of at least some GRBs. In this section, we summarize how this model confronts many observational properties of GRBs: \begin{itemize} \item Lightcurves: Observationally, GRB lightcurves are irregular and variable. Studies show that the lightcurves can be often decomposed into multiple ``pulses'' (Norris et al. 2005), each with durations of seconds. On the other hand, bursts can have rapid variability with a time scale as short as milliseconds. This ``fast'', spiky peaks often overlap with the ``slow'' pulse component (Gao et al. 2012). Similar to the ICMART model (ZY11), our kink-triggered GRB model interprets the slow pulses as individual kink-triggered events, while the fast spikes as due to comoving-frame mini-jets produced due to turbulent reconnection of individual units in a moderate-$\sigma$ jet. Monte Carlo simulations have shown that such a model can reproduce a variety of observed GRB lightcurves (Zhang \& Zhang 2014). \item Spectra: Observationally GRB spectra have a dominant ``Band-function'' component (Band et al. 1993) with a typical low-energy spectral index $\alpha \sim -1$ (Preece et al. 2000; Nava et al. 2011; Zhang et al. 2011). Some bursts have a very hard spectral index ($\alpha > -2/3$), which is beyond the limit of the so-called synchrotron line-of-death (Preece et al. 200). In these cases, the spectra are likely of a thermal origin, which is consistent with emission from a fireball photosphere (M\'esz\'aros \& Rees 2000; Lazzati \& Begelman 2010). Observationally, the thermally dominated GRBs have been observed (Abdo et al. 2009b; Ryde et al. 2010; Pe'er et al. 2012), but for the majority of the GRBs, the thermal component is either sub-dominant (Guiriec et al. 2010; Axelsson et al. 2011) or not detectable (Abdo et al. 2009a; Zhang et al. 2016). This suggests that the GRB jets are Poynting-flux-dominated at the central engine, and likely in the emission region as well (Zhang \& Pe'er et al. 2009; Gao \& Zhang 2015). For these GRBs, the Band component is likely of a synchrotron radiation origin. Since photosphere emission is suppressed in these bursts, particles are likely accelerated in the turbulent reconnection region, rather than from internal shocks. At a large radius (beyond $10^{15}$ cm) from the central engine, magnetic field strength is low enough so that synchrotron cooling is no longer in the deep fast cooling regime. As the jet streams outwards, it is likely the comoving magnetic field strength continuously decreases with time. Fast cooling synchrotron spectrum in this model would deviate from the standard $\alpha = -3/2$ prediction, and give rise to a harder spectrum with $\alpha \sim -1$ (Uhm \& Zhang 2014; Geng et al. 2017b). Due to turbulent acceleration of electrons, the balance between cooling and acceleration of electrons would lead to a typical electron spectral index $p=1$, which gives rise to a photon power law spectral index $\alpha \sim -1$ (Xu \& Zhang 2017; Xu et al. 2017). Notice that these two ways to interpret $\alpha=-1$ make use of the two important predictions of our model: the large radius needed to have harder fast-cooling spectrum is consistent with requiring magnetized shells interacting to trigger kink instability, and turbulent acceleration needed to account for the $p=1$ is the natural consequence of turbulent reconnection induced from kink events. One interesting prediction of the model is that kink is easy to develop early on with the existence of the progenitor stellar envelope so that a bright thermal component may develop in the early phase of GRB. At later times, the jet would be Poynting flux dominated with emission powered by synchrotron radiation at a large emission radius. This is consistent with the recently observed bright, multi-episode GRB 160625B, which showed a transition from a fireball to Poynting flux dominated flow (Zhang et al. 2017; Troja et al. 2017). \item Spectral lag and $E_p$ evolution: The current picture invokes each kink event as one radiation unit. The observed broad pulse emission reflects the radiation history of the emission region as it streams outwards, rather than the history of the central engine activity. Such a picture naturally accounts for the observed spectral lag behavior (Norris et al. 2000) and $E_p$ evolution patterns (Lu et al. 2012), which is difficult to explain for the models invoking a small emission radius (Uhm \& Zhang 2016a). \item Polarization: Polarized $\gamma$-ray emission has been claimed in some GRBs (Coburn \& Boggs 2003; Willis et al. 2005; Yonetoku et al. 2011, 2012). Even though with low significance, these observations nonetheless suggests that there is likely an ordered magnetic field component in the GRB emission region. This hypothesis is further supported by the detection of polarized optical emission shortly after $\gamma$-ray emission, either in the reverse shock region (Steele et al. 2009; Mundell et al. 2013) or in the internal prompt emission region (Troja et al. 2017). Our model can naturally account for all these observations. \item Neutrino upper limit: The IceCube Neutrino Observatory is placing progressively stringent upper limits on neutrino fluxes from GRBs (Aartsen et al. 2015, 2016, 2017), which greatly reduced the available parameter space of the models that invoke a small emission radius (e.g. the photosphere models and the internal shock models, Zhang \& Kumar 2013). Only the models that invoke a large enough emission radius. Since our kink-triggered magnetic dissipation model has the similar emission radius as that of ICMART, our model can comfortably satisfy the neutrino non-detection constraint. \end{itemize} \section{Discussion} This paper presents the further step in the development of the ICMART model. The original model in ZY11 pioneered the concept of the turbulent magnetic reconnection for explaining major features of the GRB physics. The turbulent reconnection model that ZY11 appealed to was constructed in LV99 and it was tested with non-relativistic 3D MHD simulations in Kowal et al. (2009). But at the moment of ZY11 publication, the properties of MHD turbulence in relativistic regime were mostly unclear, and the possibility of extending the LV99 model to the relativistic regime was also in question. Nevertheless, ICMART (ZY11 for details) was able to successfully address a number of problems (e.g. low efficiency, electron fast cooling, electron number, weak or no photosphere emission in some GRBs, etc.) encountered by the internal shock model (Kumar 1999; Daigne \& Moshkovitch 1998; Ghisellini et al. 2000). Since the publication of ZY11, the theoretical foundations of the GRB model based on turbulent reconnection in particular, the LV99 model, have been strengthened (see Lazarian et al. 2016 for a review). This includes a better theoretical understanding of turbulent reconnection (see Eyink et al. 2012, Eyink 2015), more numerical testing (Kowal et al. 2012, Eyink et al. 2013, Oishi et al 2015, Beresnyak 2017, Kowal et al. 2017), and more observational evidence (e.g. Lalescu et al. 2015). Most importantly, the theory of relativistic MHD turbulence has been advanced (see Takamoto \& Lazarian 2016, 2017), and the relativistic turbulent reconnection has been demonstrated numerically in TIL15. These updates make it important to revisit the ICMART model. On the other hand, from the observational front, many new observations since ZY11 support the general picture of the ICMART model at least in some (probably in most) GRBs. These include the polarized $\gamma$-ray and optical emission of GRB prompt emission and early afterglow (Yonetoku et al. 2011, 2012; Mundell et al. 2013; Troja et al. 2017), the progressively tight upper limits of the neutrino flux from GRBs (Aartsen et al. 2015, 2016, 2017), as well as evidence of bulk acceleration and/or anisotropy in the GRB emission region (Uhm \& Zhang 2016a,b; Geng et al. 2017a). This motivated us to further develop the ICMART model in terms of more robust reconnection physics and an alternative (and probably more realistic) triggering mechanism. The present paper addresses the above observational challenges by presenting and quantifying a new mechanism of triggering flares of reconnection. It appeals to the kink instability, which alters the original configuration to that prone to magnetic reconnection. This significantly improves the ability of the model to explain observational data. A bursty emission model due to turbulent reconnection is discussed in detail in view of the latest developments in reconnection physics. This lays a solid ground to the sketchy picture delineated in the ICMART model of ZY11. \\ \\ AL acknowledges the support the NSF grant DMS 1622353 and AST 1715754 and thanks Misha Medvedev for helpful discussions. BZ acknowledges NASA NNX15AK85G for support. SX acknowledges the support for Program number HST-HF2-51400.001-A provided by NASA through a grant from the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Incorporated, under NASA contract NAS5-26555.
\section*{Introduction} Discussions of quantum measurement typically present two aspects: The probability to find different possible results of the measuring device, and how that result changes the quantum state of the system being interrogated. This process is characterized as simply observing the system. However, researchers have begun to realize that there are resources required to make measurements, and even forbid certain measurements from taking place that violate conserved quantities, such as energy \cite{PhysRevLett.112.140502}. Measurement places energy costs on quantum information tasks, but many also allow energy extraction from the system \cite{Abdelkhalek16}. Existing results in the literature typically focus on the Wigner, Araki, Yanase (WAY) theorem \cite{wigner1952messung,araki1960measurement,yanase1961optimal} and its generalizations \cite{PhysRevLett.106.110406,ahmadi2013wigner}. One consequence of the WAY theorem is that it is impossible to have a repeatable and accurate measurements of the system's energy if the total Hamiltonian of the meter and system does not commute with the system Hamiltonian. More recent studies of the thermodynamic aspects of measurement \citep{elouard2017role}, suggested the following principle: measurement can also bee seen as a {\it thermodynamic resource}, analogous to heat or work reservoirs, such as a battery, in classical thermodynamics. A recent work \citep{elouard2017extracting} proposed a quantum Maxwell demon being able to extract energy from measurement-induced coherences in a qubit, using Rabi oscillations to put energy into a coherent optical tone. However, as the dispersive measurement of the qubit also involved an optical field, the net result is simply using the qubit as an energy transducer from one optical mode to another. Ref.~\cite{PhysRevE.96.022108} exploits measurement to let the system do work on a classical magnetic field or a time-varying external potential. Ref. \cite{Gelbwaser13} also proposes a measurement-induced work extraction relying on non-Markovian effects in a zero temperature thermal reservoir. In the current paper, we posit this principle by proposing measurement-fueled engines able to drive a single-particle current against a potential barrier. These engines thus do useful work such as raising an elevator, or charging a battery. The energy comes entirely from the process of observation: Measuring the system in a basis that does not commute with its Hamiltonian allows energy to be taken away from the measurement apparatus and given to the system in such a way as to be turned into useful work. This energy transfer is stochastic in nature, so has some similarities to heat in a stochastic thermodynamics context \cite{elouard2017role}. We stress, however, this similarity is only superficial, in that we show the existing thermodynamic bounds do not apply, and we are able to design engines with this ``quantum heat'' that can approach unit efficiency \cite{elouard2017extracting}. As recently stated, such an engine would not operate if the measuring apparatus was isolated \cite{Mohammady17}: input power must be provided to the apparatus to perform such measurements, which is taken into account for the engine's efficiency. \begin{figure}[th]\label{Fig1} \includegraphics[width = 0.48\textwidth]{Fig1.pdf} \caption{\textbf{a}: Situation under investigation. The particle's initial wave function (blue solid) is the ground state which is confined between the tilted potential (depicted in solid red) and the wall (in gray), located at position $x_\text{wall} = u_\text{wall} x_0$. The generalized measurement is characterized by the function $M_o(x)$ (dotted line) able to tell that, for sure, the particle is outside the region $[x_\text{wall},x_\text{wall} + \varepsilon x_0]$ when outcome $o$ is found. \textbf{b}: Energy exchanges occurring during the engine cycle: the measurement provides the quantum heat $Q_\text{q}$, which is split between useful work $W$ and the heat $Q_\text{C}$ dissipated in the cold bath. The dotted arrows stand for the details of the energy exchanges during the measurement according to our measurement model (see SI \cite{si}): the work $W_\text{M}$ is needed to entangle $\cal S$ and the meter, and $E_\text{M}$ is the average energy provided to the meter to reset it before the next cycle. \textbf{c,d}: Two possible implementations. \textbf{c}: The elevator. An atom $\cal S$ is on a platform and experiences gravitational acceleration $g$. The detector $\cal D$ checks every cycle if the atom is within a distance $\varepsilon$ from the platform and sends the outcome to the elevator operator $\cal O$ (lift attendant) who shifts the elevator to the ``next floor'' of height $\varepsilon x_0$ for free if the outcome is $o$. \textbf{d}: The single electron battery. The negatively charged particle experiences an electric field of intensity $\cal E$ between two electrodes. The wall is a piece of neutral insulator that can be moved depending on the outcomes of $\cal D$. The electron successfully moved distance $L$ between the electrodes charges the battery with energy $e {\cal E} L$. }\label{f1} \end{figure} {\it Setup.---} We will now make a quantum measurement do useful work by having a particle climb a tilted potential. The setup is the following (see Fig.~1): a particle is described by a pure state $\ket{\psi}$ in a potential $\hat V = V(\hat x) = V_0 \hat x /\xi + V_\text{wall}(\hat x)$. The term $V_\text{wall}(x)$ corresponds to a barrier of infinite height preventing the particle from reaching the positions $x<x_\text{wall}$. The time-independent Schr\"odinger equation for a particle with mass $m$ and energy $E$, $-(\hbar^2/2m)\partial_x^2\phi(x) + V(x)\phi(x) = E\phi(x)$, can be rewritten for $x>x_\text{wall}$ as \begin{eqnarray} \phi''(x) +\left(\dfrac{2mE}{\hbar^2}-\dfrac{x}{x_0^3}\right)\phi(x) = 0\label{EdSn}, \end{eqnarray} with the characteristic length $x_0 = (\hbar^2\xi/2mV_0)^{1/3}$, together with the boundary condition $\phi(x_\text{wall})=0$, where $'$ denotes a spatial derivative. The eigenstates of the Hamiltonian can therefore be expressed in term of the Airy function $\operatorname{Ai}(x)$ \cite{Gea99} and its zeros $\{a_l\}_{l\geq 1}$ with $a_l <0$ and $a_{l+1} <a_l$: \begin{equation} \phi_n(x) = \dfrac{1}{\sqrt{x_0}}\dfrac{\operatorname{Ai}[(x-x_\text{wall})/x_0+a_n]}{\operatorname{Ai}'(a_n)}, \label{En} \end{equation} for $x\geq x_\text{wall}$, and 0 otherwise. The energy eigenvalues are $E_n = (\hbar^2/2mx_0^2)\vert a_n\vert + (\hbar^2/mx_0^2)(x_\text{wall}/x_0)$. Let us start the system so the particle is in the ground state $\phi_1(x)$ and the wall is at position $x=0$. An ideal position measurement of the particle is in fact impossible, because it would require an infinite amount of energy. Let us therefore consider another kind of position measurement, and simply determine whether the particle is within some distance $\varepsilon$ of the wall, or not. Even this ``yes-no'' question introduces discontinuities in the wavefunction and is also too costly. We therefore adopt a minimal model, and consider two possible outcomes of a generalized measurement, each associated with Kraus operators $M_o$ and $M_i$, where the labels $i,o$ denote that particle is found inside or outside the region $[0, \varepsilon x_0]$ from the wall. We smooth the abrupt transition with an interpolating region from $\varepsilon x_0$ to $(\varepsilon + w)x_0$. Let us choose $M_o$ to be \begin{equation} M_o = \begin{cases} 0, & x/ x_0<\varepsilon, \\ \sin[\pi (x/x_0 - \varepsilon)/2w], & \varepsilon < x/ x_0< \varepsilon + w , \\ 1, & x/ x_0 > \varepsilon + w . \end{cases} \label{mo} \end{equation} $M_i^2+M_o^2=1$ for all space (let us choose $M_i$ also real) because $M_o, M_i$ are Kraus operators \cite{wisemanbook,jacobs2014quantum}, so we must then have $M_i$ decreasing from 1 at the wall as a cosine function down to 0. Regardless of the specific form for $M_{o,i}$, quantum mechanics dictates that the probability of finding result $i, o$ is given by $P_{i,o} = \langle \phi_1 | M_{i,o}^2 | \phi_1\rangle = \int dx M_{i,o}^2(x) \phi_1^2(x)$, with a conditional post-measurement state given by $|\phi_{\alpha} \rangle= M_\alpha |\phi\rangle/\sqrt{P_\alpha}$, $\alpha = i,o$. {\it Engine cycle.---} The three-stroke engine cycle can now be described. The engine consists of the system (a single particle), a detector, and a controller to either move the wall's position or keep it in place. The object of the engine is to convert energy given by the measurement process into useful work. \begin{enumerate} \item A measurement of the particle's position occurs, resulting in the stochastic result $i$ or $o$ with probabilities $P_{i}, P_o$. Generally, the new (disturbed) state of the particle is no longer in its ground state and therefore has a greater internal energy, regardless of which outcome occurs. The energy gained by the particle during this step must be provided by the measurement because total energy is conserved. We refer to the average energy gain over both outcomes, $Q_\text{q}\geq 0$, as ``quantum heat'' because of its stochastic nature. \item If outcome $i$ was found (particle is close to the wall), then the engine controller does nothing. If outcome $o$ is found (the particle must be a distance larger than $\varepsilon$ from the wall), then the controller suddenly moves \footnote{The wall displacement is treated as a quench during which the particle wave-function does not have time to spread towards the wall.} the wall to the right of a distance $x_\text{M} = \varepsilon x_0$. This costs no work in principle because the wavefunction's value is 0. Further, it has been shown that motion of the wall through a region of zero wavefunction makes no change to the rest \cite{mousavi2017strong}. \item Whatever the outcome, we let the particle relax in contact with a bath of temperature $T_\text{R}$ very low with respect to $T^\ast = (E_2-E_1)/k_\text{B}\simeq 1.75 \hbar^2/2mx_0^2 k_\text{B}$ \footnote{This step can be replaced with a coherent energy extraction step with a system Hamiltonian mapping the post-measurement states to the ground state(s), so no thermal bath is required. The required system unitaries may be included as part of the measurement operator, so that no energy is wasted on the cold bath. However, this replacement may be impractical.}. For a relaxation time long enough, the particle is in its ground state, possibly with an advanced wall. Note that if the wall has been advanced (outcome $o$) the new ground state has an energy increased by an amount $W = (\hbar^2/2mx_0^2) \varepsilon$: this corresponds to work extracted during the cycle from the particle's potential energy. \end{enumerate} We note that there is a conditional step in the above cycle, and the engine is instructed to do different things depending whether outcome $i$ or $o$ is found. If we consider this system to be an isolated thermodynamic system of the same type of Szilard, see e.g. \cite{PhysRevLett.106.070401} with the observer acting as a quantum Maxwell demon, the demon resets its memory in a bath of temperature $T_\text{D}$. Although we are not extracting work from a thermal bath, but rather from the quantum measurement process, the use of finite resources used cyclically still requires erasure of memory. However, the erasure cost is $- k_\text{B}T_\text{D}\sum_{\alpha=i,o} P_\alpha \log P_\alpha$ which can be set much smaller than $W$ for sufficiently low $T_\text{D}$ (in particular for $T_\text{D} = T_\text{R}$). {\it Results.---} We now analyze the engine's performance. The engine cycle is stochastic, so it is possible that from run to run, a large amount of work may be done (i.e. a long sequence of $o$ results). However, we will consider the average performance of the engine. The engine cycle is constructed so that the system always begins in the ground state, and therefore the average work per cycle is given by the work in steps 2 and 3, times the probability of $o$, \begin{equation} W = \varepsilon \frac{\hbar^2}{2 m x_0^2} \int dx M_o^2(x) \phi_1^2(x). \label{work} \end{equation} The average amount of energy given by the measurement apparatus to the system (per cycle) is given by $Q_\text{q} = \sum_\alpha P_\alpha \langle \phi_\alpha | H |\phi_\alpha\rangle - \langle \phi_1 | H |\phi_1\rangle$, or \begin{equation} Q_\text{q} = -\dfrac{\hbar^2}{2m}\int dx \left(\sum_{\alpha} M_{\alpha}(x) M_{\alpha}''(x)\right)\phi_1^2(x),\label{heat} \end{equation} where we have assumed $M_{o,i}$ are diagonal in the position basis, causing the potential energy term to drop out. The conversion efficiency is defined as \begin{equation} \eta = \frac{W}{Q_\text{q}}. \end{equation} For the specific choice of the Kraus operators in Eq.~(\ref{mo}), the quantum heat takes on the simple form, ${\tilde Q}_\text{q} = \left(\frac{\pi}{2w}\right)^2 \int_{\varepsilon x_0}^{(\varepsilon+w)x_0} dx\, \phi_1^2(x)$, where the tilde symbol denotes the work or heat divided by $\hbar^2/(2 m x_0^2)$. \begin{figure}[t] \begin{center} \includegraphics[width=0.49\textwidth]{Fig23.pdf} \end{center} \caption{\textbf{a,b}: Efficiency $\eta$ (\textbf{a}) and average work extracted per cycle $\tilde W$ (\textbf{b}) as a function of $\varepsilon$ and $w$. Insets: Section of the efficiency (\textbf{a}) and the work (\textbf{b}) along the dashed white line corresponding to $\varepsilon=\varepsilon^\ast$. \textbf{c,d}: Comparison of the post-measurement state corresponding to result $o$, panel {\bf c} ($i$, panel {\bf d}), with $\varepsilon = \varepsilon^\ast$ and $w\rightarrow \infty$ with the new ground state wavefunctions of the linear trap potential displaced by an amount $\varepsilon^\ast x_0$ (original ground state wavefunction).}\label{FigEta}\label{FigComp} \end{figure} It may naively be thought that this engine is most efficient when the variables $\varepsilon, w$ are very small, such that the outcome $o$ becomes much more frequent than the outcome $i$, a kind of ``Zeno limit engine'' as in \cite{elouard2017extracting}. In fact, this is false. Expanding both work and heat in the limit just mentioned, we find that ${\tilde W} = \varepsilon (1 + {\cal O}(\varepsilon, w)^3)$, and ${\tilde Q_\text{q}} = (\pi/2)^2 \left( \varepsilon^2/w + \varepsilon + w/3\right)$. Consequently, the quantum heat diverges as $w \rightarrow 0$, reflecting the problematic nature of the strict ``yes-no'' question mentioned in the setup. We can optimize the efficiency by setting $w = \zeta \varepsilon$, so that the efficiency maximizes at $\eta_{max} \approx 0.188$ when $\zeta = 1/\sqrt{3}$, even when the work limits to 0. We can do much better for the efficiency and work by choosing larger values of $\varepsilon, w$, as shown in Fig.~2. In the plots shown there, we see that best work performance (${\tilde W} = 0.80$) is given for $\varepsilon \approx 1.18$, and for $w=0$. However, the efficiency vanishes here since the quantum heat diverges when $w \rightarrow 0$. We also consider the power of the engine, ${\cal P} = W/\tau$, where $\tau = P_o \tau_o + P_i \tau_i$ is the average time of the engine cycle, incorporating the time to move the wall and the thermalization time for outcome $o$ and $i$. Let us define the mean velocity of the particle across the potential as $v = P_o \varepsilon x_0/\tau$. Provided the relaxation in step 3. is fast enough, the cycle duration is typically proportional to $\varepsilon$ such that $v$ is finite as $\varepsilon \rightarrow 0$. We can express the power as ${\cal P} =(\hbar^2/2m x_0^2) (v/x_0) = v V_0/\xi$, or the particle's velocity times the force acting on it, allowing finite power at finite efficiency in the Zeno limit where no memory or feedback is required because every outcome is almost certainly $o$ \footnote{Supposing the height of the building is $L$, there are $N = L/(x_0 \varepsilon)$ floors that must be crossed. At the ideal efficiency of $\eta_{max}$ the probability of getting to the top floor with no stops is given by $\approx \exp[-(0.327/N^2) (L/x_0)^3]$. Consequently, for buildings of fixed height, we can always make the number of floors $N$ sufficiently large to almost always have deterministic operation.}, \footnote{We have also investigated the engine performance with Kraus operators $M_{i,o}$ with continuous second derivatives via a smoothed step function, and found similar results as the ones reported here.}. {\it Gradual measurement limit.}--- We notice in the Fig.~\ref{FigEta}(a), that we get more efficient engines for large values of $w$ and moderate values of $\varepsilon$. Large values of $w$ correspond to measurements that have a very slow turn-on outside the ``window'' region of $[0, x_0\varepsilon]$. Define the asymptotic efficiency, $\eta_{asyp} = \lim_{w\rightarrow \infty} \eta$ to find \footnote{Mathematically, it is not at all obvious that this efficiency must be less than 1. Indeed, if we replace $\phi^2_1(x)$ by other normalized distributions, this will not hold, so it is special for the Airy wavefunction.} \begin{equation} \eta_{asyp} = \varepsilon\, \frac{ \int_{\varepsilon x_0}^\infty dx \, (x/x_0 - \varepsilon)^2 \phi^2_1(x) }{ \int_{\varepsilon x_0}^\infty dx \, \phi^2_1(x) }. \label{asyp} \end{equation} Incredibly, the efficiency of the measurement approaches 1 at $\varepsilon =\varepsilon^\ast \approx 1.100$, corresponding to a maximal efficiency of $\eta_{max} \approx 0.998$. We can understand more deeply why this optimal value of $\varepsilon^\ast$ corresponds to maximal efficiency by plotting the (normalized) post-measurement state $\phi_o(x) \propto (x-\varepsilon^\ast)\operatorname{Ai}(x+a_1)$, and comparing it to the new ground state of the (displaced) trap potential ($\propto \operatorname{Ai}(x+a_1 - \varepsilon x_0)$), shown in Fig.~2{\bf c}; they are nearly identical. Similarly, the comparison between $M_i \phi_1(x)$ with the original ground state look nearly the same, Fig.~2{\bf d}. Consequently, either moving the wall by $\varepsilon x_0$ or leaving it in place almost perfectly realizes the next phase of the engine cycle \footnote{It is also interesting to see how this limit is approached (since the work is strictly 0 in the $w \rightarrow \infty$ limit). Fixing $\varepsilon = \varepsilon^\ast$, and varying $w$, we find the efficiency $\eta$ exceeds 0.9 when $w = 5 x_0$ and the scaled work is ${\tilde W } = 0.065$ (corresponding to a 5.9\% success probability), and $\eta$ exceeds 0.99 at $w=17 x_0$, where the scaled work is ${\tilde W} = 0.0061$ (corresponding to a success probability of 0.55\%).}. {\it Implementations.---} We implement two different variations of the engine shown in Fig.~1. The first is a single atom elevator: a gravitational potential of $V(x) = m g x$ acts on the atom, resulting in the characteristic length of $x_0 = (\hbar^2/2 m^2 g)^{1/3} \approx 6 \mathrm{\mu m}/{\tilde m}^{2/3}$ for an atom near the surface of the earth of relative atomic mass ${\tilde m}$. The temperature needed to cool to the ground state is $T^\ast = {\tilde m}^{1/3} 12\mathrm{nK}$, so for e.g. a Rb atom, we have $x_{0,Rb} \approx 300 nm$ and require $T^\ast_{Rb} \approx 50 nK$, which is quite possible to realize in cold atom experiments. Alternatively, we can consider one ultra-cold neutron above a neutron mirror, which is the setup of recent gravity-resonance spectroscopy experiments \citep{Jenke11,Cronenber15}. In the sketch of Fig.~1{\bf a}, the elevator has a platform that has a counter balanced weight over the pulley. Since the net force is zero, the elevator can be raised to the ``next floor'' by the elevator operator with no work done, so long as the movement only occurs when the atom has no amplitude to be near the platform. In our second example shown in Fig.~1{\bf b}, we consider a parallel plate capacitor that is being charged, one electron at a time (a battery). We consider a potential difference of 1$V$ across a 1$cm$ gap. This gives a characteristic length scale of $x_0 = (\hbar^2/(2 m e^2 {\cal E}))^{1/3} \approx 72 nm$, where $\cal E$ is the electric field between the plates. The required thermalization temperature is only $T^\ast \approx 0.15 K$ because the electron is so light. An insulating, uncharged plate with negligible susceptibility can be moved through the electric field without any work done. The plate stops the electron from accelerating back to the positively charged plate. A measurement of the electron's position away from the plate allows the controller to advance the position of the plate to bring the electron to the other side of the capacitor, charging the battery. In the SI \cite{si}, we present a model of the measurement, implemented by a spin-1/2 meter impulsively interacting with the particle, in order to track the energy exchange. Letting the spin begin with energy $E_o - E_i$ the difference of the energies of the states corresponding to outcomes $o$ and $i$, during the interaction, an amount of work $W_\text{M} = E_i - E_1 \approx 0$ is performed on the joint spin-particle system. The average energy given away by the spin is $E_\text{M} = P_o (E_o-E_i)$. These energies provide the ``fuel'' for the quantum measurement engine, $Q_\text{q} = E_\text{M}+ W_\text{M}$, and must be replenished for the engine to continue working, see Fig.~1{\bf b}: as dictated by the WAY theorem, the measurement is not repeatable if the meter is not externally powered. {\it Conclusions.---} We have constructed an explicit quantum engine that converts energy from quantum measurement to do useful work on the system. This process requires feedback in general. We stress that a simple transfer of energy is not sufficient to make a working engine. The energy must be transferred in such a way that it can be efficiently extracted. To this end, our three stroke engine is near optimal because one outcome produces nearly the correct ground state of the system in the next cycle, while the other outcomes leaves the state nearly the same as before. The ability to advance our wall with no work expended allows efficient conversion of kinetic to potential energy to make the particle do work against an opposing force, provided by the measurement process. In spite of the stochastic nature of the measurement process, we are able to attain efficiencies approaching unity. This result clearly illustrates the differences with quantum thermodynamic systems. {\it Acknowledgments.---} This work was supported by the US Department of Energy grant No. DE-SC0017890. We thank Chapman University and the Institute for Quantum Studies for hospitality during this project. We thank Rafael Sanchez and Yunjin Choi for helpful discussions.
\section{Introduction} \label{sec:intro} In realistic environments, the perceived speech signal may comprise of the original speech and multiple copies of the attenuated and time-delayed signals \cite{naylor2010speech}. The combination of these signals can cause serious performance degradation of speech-related applications. For example, distant-talking speech significantly degrades the performance of automatic speech recognition (ASR) \cite{feng2014speech,kinoshita2013reverb} and speaker identification \cite{zhao2014robust,sadjadi2011hilbert}. Meanwhile, the adverse effects of reverberation will lower sound quality and intelligibility for both hearing-impaired and normal-hearing listeners \cite{han2015learning,kokkinakis2011channel,roman2013speech}. In the past, various speech dereverberation methods have been developed. The goal of these methods is to extract anechoic speech signals from reverberant ones to enhance the performance of speech-related applications and to improve sound quality and intelligibility simultaneously for listeners in reverberant environments. Traditional speech dereverberation methods can be roughly divided into three categories \cite{benesty2007springer}. The first category is the source-model-based method, which estimates the clean signal by employing the priori knowledge about time--frequency speech structures \cite{gillespie2001speech,huang2006speech,douglas2003convolutive,li2016speech}. The second category is the homomorphic filtering technique, which adopts a homomorphic transformation to decompose the reverberant signal from the time domain to the cepstral domain, and thus separates the reverberation from the input cepstral coefficients with a simple subtraction operation \cite{bees1991reverberant}. Channel-inversion methods belong to the third category, which considers the reverberation as a convolution of the original sound with the room impulse response (RIR) and thereby performs an inverse filtering to deconvolve the captured signal \cite{nakatani2010speech,kameoka2009robust,mohanan2017speech,wu2006two,kodrasi2014frequency,hikichi2007inverse}. Even though the above three categories of approaches have been shown to provide satisfactory performance, they usually require an accurate estimation of time-varied RIR, which may not always be accessible in practice \cite{xiao2016speech}. Recently, deep neural network (DNN) models, which show strong regression capabilities, have been used to address the speech dereverberation issue \cite{xiao2016speech,han2014learning}. The main concept here is to use a DNN model to characterize the non-linear spectral mapping from reverberant to anechoic speech in the training stage. In the testing stage, the trained DNN model is used to generate dereverbed utterances given the input reverberant signals. The same concept has been applied to perform denoising and dereverberation simultaneously \cite{han2015learning}. Despite providing notable improvements over traditional algorithms, DNN-based dereverberation methods achieve the optimal performance only in matched training and testing reverberant conditions. To further improve the performance, an environment-aware DNN-based dereverberation system has been proposed, which selects the optimal DNN models online to perform dereverberation \cite{wu2017reverberation}. Contrary to the idea used in \cite{wu2017reverberation}, the present study extends the previous work on the deep denoise autoencoder (DDAE) in speech enhancement \cite{lu2013speech,lu2014ensemble} and proposes a novel integrated deep and ensemble learning algorithm (IDEA) for speech dereverberation. The IDEA consists of offline and online phases. In the offline phase, multiple DDAE-based dereverberation models are prepared, with each aiming to precisely dereverb speech signals in a particular acoustic environment. Then, a unified fusion model is estimated to integrate the information of the multiple dereverberation models with the aim to estimate clean speech. In the online phase, an input reverberant speech is first processed by all dereverberation models simultaneously, and the outputs are integrated to ultimately generate the anechoic signals. The ensemble learning strategy, which has been proven to be able to improve system performance in speech enhancement \cite{lu2014ensemble} and ASR \cite{tsao2015ensemble,tsao2009ensemble}, is adopted in the task to increase the generalization ability of DDAEs. As will be introduced in the results of experiments, conducted using the Mandarin hearing in noise test (MHINT) \cite{wong2007development}, a DDAE-based dereverberation system achieves the best quality and intelligibility scores when the training and testing conditions are similar (matched condition). However, the performance degrades significantly under mismatched conditions between training and testing. Evaluated results further indicate that the proposed IDEA outperforms the DDAE-based dereverberation system trained in the matched condition and significantly improves speech quality and intelligibility in both matched and mismatched conditions. The rest of this paper is organized as follows. The spectral-mapping-based speech dereverberation system is reviewed in Section \ref{sec:review}. Then, the proposed IDEA is introduced in Section \ref{sec:IDEL}. Experimental setup and analyses are presented in Section \ref{sec:experiment}. Section \ref{sec:concl} concludes our findings. \section{Spectral-Mapping-based Speech Dereverberation} \label{sec:review} In the time domain, the relationship between noisy and clean signals are formulated in Eq. (\ref{eq:assumpt}) \begin{equation} \label{eq:assumpt} \mathbf{y}=\mathbf{s}\otimes \mathbf{g}+\mathbf{n}, \end{equation} where $\mathbf{s}$ and $\mathbf{n}$ represent the clean utterance and the additive noise, respectively; ``$\otimes$'' is the operation of convolution; and $\mathbf{g}$ denotes the environmental filter. Fig. \ref{fig:SE} shows the block diagram of the spectral-mapping-based speech dereverberation system, where the goal is to retrieve the anechoic speeches, $\mathbf{x}$, from the reverberant signals, $\mathbf{y}$. As can be seen in Fig. \ref{fig:SE}, $\mathbf{y}$ is first converted to the spectrogram representation $\mathbf{Y}_F$ by carrying out the short time Fourier transform (STFT). Next, a feature extraction (FE) process is conducted to extract the logarithmic power spectrogram (LPS) features $\mathbf{Y}$; then to incorporate the context information, the features $\tilde{\mathbf{Y}}$ are prepared by concatenating the adjacent $M$ static feature frames at the $i$th feature vector $\mathbf{Y}_i$, i.e. $\tilde{\mathbf{Y}}_i=[\mathbf{Y}_{i-M}^\top,\cdots,\mathbf{Y}_{i}^\top,\cdots,\mathbf{Y}_{i+M}^\top]^\top$. The superscript ``$\top$'' denotes the vector transposition. The DNN-based dereverberation system compensates $\tilde{\mathbf{Y}}$ to the estimated LPS $\hat{\mathbf{S}}$ directly, which is further restored to the magnitude spectrum $\vert\hat{\mathbf{S}}_F\vert$ with the spectral restoration (SR) function. Finally, the dereverbed spectrogram $\hat{\mathbf{S}}_F=\vert\hat{\mathbf{S}}_F\vert exp(j\angle \mathbf{Y}_F)$ with an updated magnitude $\vert\hat{\mathbf{S}}_F\vert$ and the original phase $\angle \mathbf{Y}_F$ is converted back to the time domain via inverse STFT (ISTFT) to reconstruct the enhanced time signal $\hat{\mathbf{s}}$. \begin{figure}[!t] \centerline{\includegraphics[width=.8\columnwidth]{figure/SE.eps}}\vspace{-0.2cm} \caption{Block diagram of the spectral-mapping-based speech dereverberation system.}\vspace{-0.2cm}\label{fig:SE} \end{figure} It is noted that we only consider the reverberant clean signal in Eq. (\ref{eq:assumpt}) and set $\mathbf{n}$ to zero in the present study to focus the dereverberation task. \section{The Proposed IDEA} \label{sec:IDEL} \subsection{Highway-DDAE dereverberation system}\label{sec:hdnntrain} In previous studies, traditional fully connected DNNs were used to perform dereverberation \cite{xiao2016speech,han2014learning,wu2017reverberation}. More recently, the highway strategy has been popularly used and shown to provide improved performance \cite{highway}. Our preliminary experiments show that using the highway strategy can improve the speech dereverberation performance in our task. In this section, we first introduce the highway-DDAE (HDDAE). Fig. \ref{fig:DNN} shows the flowchart of the HDDAE for dereverberation in the offline phase. \begin{figure}[!t] \centerline{\includegraphics[width=0.8\columnwidth]{figure/firstruct.eps}}\vspace{-0.2cm} \caption{Flowchart of HDDAE in the offline phase.}\vspace{-0.2cm}\label{fig:DNN} \end{figure} From the figure, a set of clean--reverb speech pairs ($\mathbf{S}$--$\tilde{\mathbf{Y}}$ pairs) in the LPS domain is prepared first to form the training data, where there are $I$-frame vectors for each of $\mathbf{S}=[\mathbf{S}_1,\cdots,\mathbf{S}_i,\cdots,\mathbf{S}_I]$ and $\tilde{\mathbf{Y}}=[\tilde{\mathbf{Y}}_1,\cdots,\tilde{\mathbf{Y}}_i,\cdots,\tilde{\mathbf{Y}}_I]$. The supervised training procedure is then conducted by placing the clean $\mathbf{S}_i$ and reverb $\tilde{\mathbf{Y}}_i$, respectively, at the output and input sides of the HDDAE model. For the model with $L$ hidden layers, we have: \begin{equation}\label{eq_forward} \begin{array}{c} h_1(\tilde{\mathbf{Y}}_i)=\sigma\{\mathbf{W}_1\tilde{\mathbf{Y}}_i+\mathbf{b}_1\},\\ \vdots\\ h_{\ell}(\tilde{\mathbf{Y}}_i)=\sigma\{\mathbf{W}_{\ell}h_{\ell-1}(\tilde{\mathbf{Y}}_i)+\mathbf{b}_{\ell}\},\\ \vdots\\ h_{L}(\tilde{\mathbf{Y}}_i)=\sigma\{[(\mathbf{W}_{L}h_{L-1}(\tilde{\mathbf{Y}}_i))^\top,(h_{1}(\tilde{\mathbf{Y}}_i))^\top]^\top+\mathbf{b}_{L}\},\\ \hat{\mathbf{S}}_i=\mathbf{W}_{L+1}h_{L}(\tilde{\mathbf{Y}}_i)+\mathbf{b}_{L+1}, \end{array} \end{equation} where $\sigma\{\cdot\}$ is a nonlinear mapping function (the ReLu activation function is used in this study). $\mathbf{W}_\ell$ and $\mathbf{b}_\ell$ with $\ell=1,2,\cdots,L+1$ are the weight matrices and bias vectors, respectively. Notably, the output of the $L$th hidden layer $h_{L}(\tilde{\mathbf{Y}}_i)$ cascades $h_{L-1}(\tilde{\mathbf{Y}}_i)$ with $h_{1}(\tilde{\mathbf{Y}}_i)$ (output of the first hidden layer) to possibly address the vanishing gradient problem during the training process (please note that the highway connection may be applied in any two layers; however, the current architecture achieves the best performance in our preliminary experiments). The HDDAE parameter set $\Theta$ consisting of all $\mathbf{W}_\ell$ and $\mathbf{b}_\ell$ are determined accordingly by optimizing the following mean squared error function: \begin{equation}\label{eq:dnnoptimize} \Theta^*=\mbox{{\small$\mathop{\arg\min}_{\Theta}(\frac{1}{I}\sum_{i=1}^I\parallel\hat{\mathbf{S}}_i-\mathbf{S}_i\parallel_2^2)$}}. \end{equation} \subsection{IDEA for dereverberation} In this sub-section, we present the proposed IDEA for speech dereverberation. As mentioned earlier, there are offline and online phases. The offline phase further consists of ensemble preparation (EP) and ensemble integration (EI) stages, which are shown in Figs. \ref{fig:basic} and \ref{fig:idel}, respectively. For the EP stage in Fig. \ref{fig:basic}, there are $1$, $2$, to $P$ reverberant conditions, and thus the reverb data $\tilde{\mathbf{Y}}$ are divided into $P$ subsets, namely, $\tilde{\mathbf{Y}}_{1}$, $\tilde{\mathbf{Y}}_{2}$ to $\tilde{\mathbf{Y}}_{P}$. With these $P$ subsets of training data, together with the corresponding clean training sets, $\mathbf{S}_{1}$, $\mathbf{S}_{2}$ to $\mathbf{S}_{P}$, we have $P$ clean--reverb training sets ($\mathbf{S}_{p}$--$\tilde{\mathbf{Y}}_{p}$ with $p\in\{1,\:\:2,\:\:\cdots,\:\:P\}$). Each training pair is then used to train an HDDAE model. Therefore, the $P$ HDDAE models, $HDDAE_{1}$, $HDDAE_{2}$ to $HDDAE_{P}$, are estimated in the EP stage. \begin{figure}[!t] \centerline{\includegraphics[width=0.62\columnwidth]{figure/basic.eps}}\vspace{-0.2cm} \caption{Flowchart of the EP stage in the offline phase.}\vspace{-0.2cm}\label{fig:basic} \end{figure} \begin{figure}[!t] \centerline{\includegraphics[width=.97\columnwidth]{figure/ensemble.eps}}\vspace{-0.2cm} \caption{Flowchart of the IDEA in the offline phase (including the EP and EI stages)}\vspace{-0.2cm}\label{fig:idel} \end{figure} Next, for the EI stage in Fig. \ref{fig:idel}, the input LPS $\tilde{\mathbf{Y}}$ is first processed by the $P$ HDDAE models, as shown in Eq. (\ref{eq:firdnn}). \begin{equation}\label{eq:firdnn} \begin{array}{c} \hat{\mathbf{N}}_{1}=HDDAE_{1}\{\tilde{\mathbf{Y}}\},\\ \hat{\mathbf{N}}_{2}=HDDAE_{2}\{\tilde{\mathbf{Y}}\},\\ \vdots\\ \hat{\mathbf{N}}_{P}=HDDAE_{P}\{\tilde{\mathbf{Y}}\}. \end{array} \end{equation} Then, the outputs of all of these HDDAE models are combined as a new input ($\hat{\mathbf{N}}=[\hat{\mathbf{N}}_{1}^\top,\hat{\mathbf{N}}_{2}^\top,\cdots,\hat{\mathbf{N}}_{P}^\top]^\top$) to train the EI model. In this study, we construct the EI model using a convolutional neural network (CNN) with $J$ hidden layers, as shown in Eq. (\ref{eq:seccnn}), consisting of $J-1$ convolution operations $C_j\{\cdot\}$ at the $i$th sample (frame) vector $\hat{\mathbf{N}}_i$ of the input $\hat{\mathbf{N}}$ and a fully connected hidden layer $F_J\{\cdot\}$. \begin{equation}\label{eq:seccnn} \begin{array}{c} \Phi_1(\hat{\mathbf{N}}_i)=\sigma\{C_1\{\hat{\mathbf{N}}_i\}\},\\ \vdots\\ \Phi_{J-1}(\hat{\mathbf{N}}_i)=\sigma\{C_{J-1}\{\Phi_{J-2}(\hat{\mathbf{N}}_i)\}\},\\ \Phi_{J}(\hat{\mathbf{N}}_i)=\sigma\{F_{J}\{\Phi_{J-1}(\hat{\mathbf{N}}_i)\}\},\\ \hat{\mathbf{S}}_i=F_{J+1}\{\Phi_{J}(\hat{\mathbf{N}}_i)\}. \end{array} \end{equation} The convolution operation applies a set of filters in order to extract $T$ feature maps to obtain local time--frequency structures and to achieve more robust feature representations \cite{fu2016snr}. The provided $\Phi_{J-1}(\hat{\mathbf{N}}_i)$ features at the $(J-1)$th hidden layer are then fed into a fully connected feed-forward network $F_{j}\{\cdot\},\:\:j\in\{J,\:\:J+1\}$, and finally obtain the estimated $\hat{\mathbf{S}}_i$ in the output layer of CNN. Notably, a nonlinear mapping function $\sigma\{\cdot\}$ is applied to modulate the output of each hidden layer. In addition, the parameters $\Lambda$ of the CNN are randomly initialized and then optimized by minimizing the objective function in Eq. (\ref{eq:cnnoptimize}). \begin{equation}\label{eq:cnnoptimize} \Lambda^*=\mbox{{\small$\mathop{\arg\min}_{\Lambda}(\frac{1}{I}\sum_{i=1}^I\parallel\hat{\mathbf{S}}_i-\mathbf{S}_i\parallel_2^2)$}}. \end{equation} \section{Experiment and Analysis} \label{sec:experiment} We evaluated the proposed IDEA using the MHINT sentences \cite{wong2007development} containing 300 utterances pronounced by a native Mandarin male speaker that were recorded in a reverberation-free environment at a sampling rate of 16 kHz. From the database, 250 utterances were selected as the clean training data, and the other 50 utterances were used as the testing data for the speech dereverberation task. Three distinct reverberant rooms were simulated: room 1 with size $4\times 4\times 4$, room 2 with size $6\times 6\times 4$, and room 3 with size $10\times 10\times 8$, where the unit for all room sizes is meter. The positions of the speakers and receivers were randomly initialized for each room and were fixed for providing RIRs in the considerations of $T_{60}=0.3,\:\:0.4,\:\:0.6,\:\:0.7,\:\:0.9,\mbox{ and }1.0$ (s). For each $T_{60}\in\{0.3,\:\:0.6,\mbox{ and }0.9\}$, three different reverberant environments were provided for deriving RIRs to contaminate the clean training data, and to form the clean--reverb training set accordingly. In addition, one RIR was generated for each of the six $T_{60}$ values to deteriorate all testing utterances and form the testing set. The image model was applied to perform all RIRs by using an RIR generator \cite{habets2006room}. Finally, we prepared $250\times 3(T_{60}\mbox{s})\times 3(\mbox{RIRs})=2250$ and $50\times 6(T_{60}\mbox{s})\times 1(\mbox{RIRs})=300$ reverberant utterances for the training and testing sets, respectively. In this study, a speech utterance was first windowed to successive frames with the frame size and the shift being 32 ms and 16 ms, respectively. On each frame vector, a 257-dimensional LPS was derived through the STFT and was further extended to $257(2\times 5+1)=2827$ dimensions in terms of $M=5$ mentioned in Section \ref{sec:review} to include the context information as an acoustic feature vector. As a result, the sizes of the input and output layers of the DDAE-based dereverberation system shown in Fig. \ref{fig:SE} were 2827 and 257, respectively. As for the DDAE-based dereverberation system, four types of HDDAE-based architectures were implemented for comparisons: (a) single HDDAE model with three hidden layers ($L=3$ in Eq. (\ref{eq_forward})) trained with the entire training dataset (denoted as ``HDDAE$_{A}(3)$''), (b) single HDDAE model with three hidden layers trained with the dataset composed of one specific $T_{60}$ condition (denoted as ``HDDAE$_{T_{60}}(3)$'' with $T_{60}\in\{0.3,\:\:0.6,\mbox{ and }0.9\}$), (c) single HDDAE model with six hidden layers ($L=6$ in Eq. (\ref{eq_forward})) trained with the entire training dataset (denoted as ``HDDAE$_{A}(6)$'') and (d) the proposed IDEA model (denoted as ``IDEA$_{A}(6)$'') with HDDAE$_{0.3}(3)$, HDDAE$_{0.6}(3)$ and HDDAE$_{0.9}(3)$ in the EP stage, and a CNN model with three hidden layers ($J=3$ in Eq. (\ref{eq:seccnn}); two convolutional layers with each layer containing 32 channels, and a fully-connected layer with 2048 nodes) in the EI stage in Fig. \ref{fig:idel}. Notably, each hidden layer of HDDAEs in (a), (b), (c), and (d) is composed of 2048 nodes. The speech dereverberation scenarios were evaluated by (a) the quality test in terms of the perceptual evaluation of speech quality (PESQ) \cite{rix2001perceptual}, (b) the perceptual test in terms of short-time objective intelligibility (STOI) \cite{taal2011algorithm}, and (c) the speech distortion index (SDI) test \cite{chen2008fundamentals}. The score ranges of PESQ and STOI are \{-0.5 to 4.5\} and \{0 to 1\}, respectively. Higher scores of PESQ and STOI denote better sound quality and intelligibility, respectively. On the other hand, the SDI measures the degree of speech distortion, and a lower SDI indicates smaller speech distortions and thus better performance. Fig. \ref{fig:spectrum} shows the speech spectrograms corresponding to clean, reverberation at $T_{60}=1.0$ s, processed by HDDAE$_{A}(3)$, and processed by IDEA$_{A}(6)$. From the figure, the spectrogram of the IDEA presents clearer spectral characteristics than those from HDDAE$_{A}(3)$; please note the regions in the white blocks. The harmonic structures for high--frequency components are also clear. \begin{figure}[!t] \centerline{\includegraphics[width=.85\columnwidth]{figure/spectrum.eps}}\vspace{-0.2cm} \caption{Spectrum comparison with $T_{60}=1$ s.}\label{fig:spectrum}\vspace{-0.2cm} \end{figure} We first list the PESQ scores of HDDAE$_{0.3}(3)$, HDDAE$_{0.6}(3)$ and HDDAE$_{0.9}(3)$ evaluated in either the matched or mismatched testing reverberant conditions in Table \ref{tab:evamatmis}. The results of the baseline (i.e., no dereverberation process was conducted) and HDDAE$_{A}(3)$ are also listed in the table for comparisons. In addition, the averaged PESQ scores (Avg.) for all methods over all testing environments ($T_{60}=0.3,\:\:0.4,\:\:0.6,\:\:0.7,\:\:0.9,\mbox{ and }1.0$) are shown in the last column of the table. In the table, for HDDAE$_{0.3}(3)$, HDDAE$_{0.6}(3)$, and HDDAE$_{0.9}(3)$, the best PESQ score in each of the $T_{60}$ testing conditions is achieved by the HDDAE$_{T_{60}}(3)$ trained on the $T_{60}$ matched condition. In addition, the quality of utterances degrades significantly for those dereverberation systems in the $T_{60}$ mismatched environments, in which the PESQ scores could be even lower than those of baseline (unprocessed input). The observations indicate that the DDAE-based dereverberation system can effectively enhance the speech quality when the property of reverberation is known beforehand, but the performance may degrade dramatically in new environments, where the training and testing conditions are different. Meanwhile, HDDAE$_{A}(3)$ provides the best averaged PESQ score. The result indicates that the model trained on the diverse training set is more robust to varying testing environments. \begin{table}[!tb] \begin{center} \caption{PESQ scores of HDDAE$_{0.3}(3)$, HDDAE$_{0.6}(3)$, HDDAE$_{0.9}(3)$ and HDDAE$_{A}(3)$ testing in either the matched or mismatched reverberant conditions.}\label{tab:evamatmis} \begin{tabularx}{.9\columnwidth}{>{\centering}m{2.1cm}|ccc|c} \hline \hline \textbf{Testing} $\mathbf{T_{60}}$&$\mathbf{0.3}$&$\mathbf{0.6}$&$\mathbf{0.9}$&Avg.\\ \hline \hline \textbf{Reverberation}& 2.0666& 1.5534& 1.1839&1.5661\\ \hline \textbf{HDDAE$_{0.3}(3)$}& \textbf{2.4830}& 1.4784& 1.0755&1.6373\\ \textbf{HDDAE$_{0.6}(3)$}& 1.6744& 2.2539& 1.2274&1.7072\\ \textbf{HDDAE$_{0.9}(3)$}& 1.3696& 1.6525& 2.1021&1.7217\\ \hline \textbf{HDDAE$_{A}(3)$}&2.4702&\textbf{2.3064}&\textbf{2.1466}&\textbf{2.2838}\\ \hline \hline \end{tabularx} \end{center}\vspace{-0.4cm} \end{table} Table \ref{tab:overall} lists the averaged results of PESQ, STOI, and SDI for unprocessed speech, HDDAE$_{A}(3)$, HDDAE$_{A}(6)$, and IDEA$_{A}(6)$ on all the testing utterances ($T_{60}\in\{0.3,\:\:0.4,\:\:0.6,\:\:0.7,\:\:0.9,\:\:1.0\}$). From the table, we find that all evaluation matrices of DDAE-based approaches outperform those from unprocessed reverberation. These results indicate the effectiveness of the HDDAE-based dereverberation systems. In addition, the better PESQ, STOI and SDI scores of HDDAE$_{A}(3)$ than those from HDDAE$_{A}(6)$ indicate that the additional hidden layers of the HDDAE may not necessarily increase the system performance in the task. On the other hand, IDEA$_{A}(6)$ (also with six hidden layers) yields the highest sound quality and intelligibility and the lowest signal distortion, confirming the effectiveness of the proposed IDEA for the dereverberation task. \begin{table}[!tb] \begin{center} \caption{Averaged results of all testing data for the unprocessed reverberant speech, HDDAE$_{A}(3)$-, HDDAE$_{A}(6)$-, and IDEA$_{A}(6)$-processed utterances.}\label{tab:overall} \begin{small} \begin{tabularx}{\columnwidth}{>{\centering}m{0.8cm}|@{\hspace{4pt}}c@{\hspace{4pt}}c@{\hspace{4pt}}c@{\hspace{4pt}}c@{\hspace{4pt}}} \hline \hline \textbf{}&\textbf{Reverberant}&\textbf{HDDAE$_{A}(3)$}&\textbf{HDDAE$_{A}(6)$}&\textbf{IDEA$_{A}(6)$}\\ \hline \hline \textbf{PESQ}& 1.5611& 2.2838& 2.2672& \textbf{2.3808}\\ \textbf{STOI}& 0.6692& 0.8598& 0.8527& \textbf{0.8691}\\ \textbf{SDI}& 8.0304& 1.0520& 1.5393& \textbf{0.8916}\\ \hline \hline \end{tabularx} \end{small} \end{center}\vspace{-0.6cm} \end{table} To further analyze the performance of the proposed algorithm, we compare the PESQ scores of IDEA$_{A}(6)$ with those of the HDDAE$_{A}(6)$ in both matched and mismatched testing environments; the results are listed in Tables \ref{tab:finalmatch} and \ref{tab:finalmismatch}, respectively (please note that the testing data in Table \ref{tab:finalmismatch} cover $T_{60}=\{0.4,\:\:0.7,\:\:1.0\}$, which were not seen in the training data). From these tables, we observe that PESQ scores obtained by IDEA$_{A}(6)$ and HDDAE$_{A}(6)$ consistently decrease with increasing $T_{60}$, revealing that the dereverberation performance is negatively correlated with the $T_{60}$ value. In addition, IDEA$_{A}(6)$ outperforms HDDAE$_{A}(6)$ in all testing $T_{60}$s, confirming that the ensemble modeling can achieve better results than those from a single model, where the training data and the number of layers are the same for these two models. \begin{table}[!tb] \begin{center} \caption{PESQ scores of HDDAE$_{A}(6)$ and IDEA$_{A}(6)$ evaluated in the matched testing conditions}\label{tab:finalmatch} \begin{tabularx}{0.8\columnwidth}{>{\centering}m{2.2cm}|ccc} \hline \hline \textbf{Testing} $\mathbf{T_{60}}$&$\mathbf{0.3}$&$\mathbf{0.6}$&$\mathbf{0.9}$\\ \hline \hline \textbf{HDDAE$_{A}(6)$}& 2.4349& 2.2990& 2.1408\\ \textbf{IDEA$_{A}(6)$}& \textbf{2.5669}& \textbf{2.4249}& \textbf{2.2479}\\ \hline \hline \end{tabularx} \end{center}\vspace{-0.6cm} \end{table} \begin{table}[!tb] \begin{center} \caption{PESQ scores of HDDAE$_{A}(6)$ and IDEA$_{A}(6)$ evaluated in the mismatched testing conditions}\label{tab:finalmismatch} \begin{tabularx}{0.8\columnwidth}{>{\centering}m{2.2cm}|ccc} \hline \hline \textbf{Testing} $\mathbf{T_{60}}$&$\mathbf{0.4}$&$\mathbf{0.7}$&$\mathbf{1.0}$\\ \hline \hline \textbf{HDDAE$_{A}(6)$}& 2.3575& 2.2309& 2.1399\\ \textbf{IDEA$_{A}(6)$}& \textbf{2.4676}& \textbf{2.3323}& \textbf{2.2452}\\ \hline \hline \end{tabularx} \end{center}\vspace{-0.4cm} \end{table} \vspace{-0.2cm} \section{Conclusion} \label{sec:concl} From the experimental results, we first noted that the single-HDDAE-based systems could achieve good dereverberation performance in matched conditions, but the performance degraded significantly when the systems were tested in mismatched conditions, showing that the HDDAE models trained to address specific reverberation conditions may have limited generalization capabilities. In addition, the model HDDAE$_{A}$, which was trained using all the training data, outperformed individual HDDAE models in terms of PESQ scores over all testing environments. Moreover, when compared to the model HDDAE$_{A}$, the model IDEA$_{A}$ provided better results, confirming that by collecting information from multiple environments to train matched HDDAE models and then integrating the information from the outputs of these models, diverse reverberation conditions can be covered and high dereverberation performance achieved. \section{Acknowledge} This research was supported in part by the Ministry of Science and Technology of Taiwan (MOST 107-2633-E-002-001), National Taiwan University, Intel Corporation, and Delta Electronics. \bibliographystyle{ieeetr}
\section{Introduction} \label{} We are interested in the estimation of wake fields created inside a dielectric capillary by a single bunch in order to determine how such electric fields affect the stability of the bunch itself. For this reason, it is not taken into account the wake-field propagation within the capillary towards any other witness bunch trailing the drive bunch, which is what it has to be made to implement the dielectric wakefield acceleration. Hence, our study concerns the analysis of the wake fields acting on a single bunch that passes through the gas-filled dielectric capillary, which are created by the bunch's head and act on the bunch itself, especially to the tail. In general, the electron bunch propagation along a dielectric structure causes the excitation of high-amplitude $TM_{mn}$ waveguide modes leading to formation of wake fields, which move in synchronism with the bunch because they have phase velocities equal to the bunch velocity, that is close to $c$. For this study, TE-modes ($E_z$ = 0 and $H_z\neq 0$) can be ignored since they cannot accelerate charged particles along $z$-direction within a dielectric-loaded circular waveguide, therefore we will concentrate on the accelerating TM-modes ($E_z\neq 0$ and $H_z$ = 0) since they can be excited by the charged particles \cite{label1,label2}. With regard to the waveguide modes, the subscript $m$ gives the azimuthal mode order (it determines which term has to be considered in the multipole expansion: for istance, the monopole term correspond to $m$ = 0, and so on) and the subscript $n$ gives the radial modes that correspond to the eigenfrequencies of such azimuthal mode. In general, the intensity of the wake-field is directly proportional to the drive bunch charge $Q$ and it is inversely proportional to the transverse dimensions of the dielectric capillary. Also, the bunch length $\sigma_z$ strongly affects the amplitude of wake fields: the shorter is the bunch length, the higher is the wake-field along the capillary \cite{label3}. \section{Experimental measurements} \label{} The capillary used in our experimental set-up is a dielectric device that is composed of two different sections (Fig. 1). \begin{figure}[ht] \centering \includegraphics[scale=0.51,trim=0cm 0cm 0cm 0cm]{Figure1.jpg} \caption{Picture of the dielectric capillary plasma source used at SPARC\_LAB test facility to analyze the wake fields effects on electron beams passing through such structures.} \end{figure} \begin{figure*} \centering \includegraphics[scale=0.18,trim=0cm 0cm 0cm 0cm]{Figure2.jpg} \caption{Experimental measurements of wake fields effects on electron bunches at different operating conditions both beam parameters and geometric features of the capillary.} \end{figure*} The first one is a backing section, which is made of a transparent plastic material \cite{label4,label5,label6,label7} and built by using a 3D printing device. The second section, which includes the plasma channel, is separately created in a glass cylinder of around 3 mm in radius (a dielectric material with similar relative permittivity of the backing section) to prevent any damage caused by the electron beam. This cylinder is then inserted into the backing part. The plasma channel inside the glass cylinder has a circular cross section of 0.5 mm in radius and fed by two gas injectors of 300 $\mu$m in radius. We have considered such a structure as a single piece of dielectric material. Finally, two electrodes at the ends of the capillary provide the high voltage to the hydrogen gas. The capillary dimensions considered in our experiments are as follows: two different channel lengths of 30 and 10 mm, for which the inner radius is $a$ = 0.5 mm and the relative permittivity is $\epsilon_r$ = 3. With regard to the outer radius $b$ of the capillary, since the plasma channel is created in a plastic holder which is 8 mm wide, we assume that it is 4 mm in radius. Several experimental conditions have been considered in order to investigate the wake fields production as a function of both the beam parameters and the geometric features. Figure 2 shows some effects produced by wake fields created inside our capillaries of 30 and 10 mm length, when the electron bunches have two longitudinal lenghts of 360 $\mu$m and 270 $\mu$m. The beam charge is $Q$ = 50 pC, in both cases. A first comparison can be made between two electron beams passing through the same capillary, which have 360 $\mu$m and 270 $\mu$m of the longitudinal length, as shown in Figure 2a and Figure 2b. In these conditions, the tail deflection with respect to the head is $\Delta$$x_1$ $\approx$ 80 $\mu$m for the longer bunch, but it becames $\Delta$$x_2$ $\approx$ 160 $\mu$m for the shorter one. A second comparison concerns electron bunches with same longitudinal lengths, $\sigma_z$ = 270 $\mu$m, that pass through two different plasma channel of 10 and 30 mm length, as shown in Figure 2c and Figure 2b respectively. The tail displacement we obtain if the bunch crosses a capillary of 10 mm length is $\Delta$$x_3$ $\approx$ 60 $\mu$m, that has to be compared to $\Delta$$x_2$, which is related to a capillary of 30 mm length. It should be noted that all frames reported in Figure 2, for each operating condition, correspond to the maximum value, over 100 shots, of the tail deflection we have measured; in fact, the transverse movement of bunch tails can change depending on the bunch's position inside the capillary. Such results highlight that the shorter is the bunch, the larger is the amplitude of wake fields produced by electron beams passing through a dielectric structure. Also, the longer is the capillary, the larger is the wakefield's effect on the bunch. \section{Theoretical model} \label{} A general equation of the electric field, transverse or longitudinal, produced when a bunch of charge passes through a cylindrical dielectric capillary with speed $c$ and an offset $r_0$ from the center axis, can be expressed as \cite{label8,label9} \begin{equation} \label{eqn:generalequation} E=A\sum_{m=0}^{m=\infty}\sum_{n=0}^{n=\infty}B_{mn}(a,b,r_0,\sigma_z,\epsilon_r,\omega_r)cos(\frac{\omega_{mn}}{c}z_0), \end{equation} where $B_{mn}$ depends on the Bessel functions of the first and the second kind and \emph{A} is proportional to the beam charge; also, the parameter $\omega_{mn}$ represents the eigenfrequencies of \emph{TM}$_{mn}$ modes. If we know the electric field within the dielectric structure, the wake potential can be defined as follow \cite{label3}: \begin{equation} \label{eqn:wakepotentialequation} W=-e\int_{0}^{L} Edz, \end{equation} where $L$ is the length of the capillary. The analysis of the beam instabilities caused by wake fields in dielectric structures has to start from the calculation of the longitudinal electric field, which leads to the transverse electric field only if the bunch is misaligned with offset $r_0$ from the center axis. On the contrary, the longitudinal electric field is always created by the bunch, whether it is on-axis or out-of axis, and it represents a deceleration term \cite{label10,label11}. Therefore, the transverse electric field can be evaluated by Panofsky-Wenzel theorem \cite{label12,label13}: \begin{equation} \label{eqn:PanofskyWenzelequation} q\nabla_t E_z=\frac{\partial F_t}{\partial z}, \end{equation} This transverse force $F_t$ represents the source of the head-tail single bunch beam instabilities within a dielectric structure. In fact, when a moving charge passes through the capillary, the energy loss of the head produces two different effects: a longitudinal wake-field which is equivalent to application of an effective drag force on the bunch, that is produced in every condition, and a transverse wake-field that acts on the tail producing a transverse movement of it with respect to the head, only if there is an off-axis displacement of the beam. \begin{figure}[ht] \centering \includegraphics[scale=0.6,trim=0cm 0cm 0cm 0cm]{Figure3.jpg} \caption{Sketch of a 2D geometry that describes the wake-field structure corresponding to a plasma capillary source: $a$ = 0.5 mm, $b$ = 4 mm while $L$ has been chosen of 10 and 30 mm length.} \end{figure} So far, it has been given a general description of the waveguide modes which are responsible of the wake fields inside our dielectric structure. In this work, with a view to simplifying the problem analysis, we are going to study the wake-field generation by using a simplified 2D geometry, for which we have considered two parallel layers of dielectric material to simulate the capillary. We have considered, as a source for the wake fields, a bunch of charge $Q$ moving at the speed of light $c$ in the plasma channel (without plasma). The direction of motion of the bunch is along the $z$-axis, but it is misaligned with off-set $x_0$ from the center axis. The distance between the head and the tail of bunch is $z_0=z-vt$. By using the 2D geometry, compared to the 3D one, we can ignore the azimuthal order $m$, because this parameter takes into account the cylindrical symmetry of the structure. Figure 3 provides a schematic description of the planar wake-field structure. The theoretical model presented in this paper is related to an ultrarelativistic single bunch that travels inside the plasma channel with $\beta$ $\simeq$1 and $\gamma$ = 250. Furthermore, it has been considered a total charge $Q$ = 50 pC and a Gaussian longitudinal profile of the e-bunch, as well as two different bunch lengths of 270 and 360 $\mu$m, in order to be congruent with our experimental results. For this kind of dielectric waveguide, the longitudinal and transverse electric field can be written as \cite{label14}: \begin{equation} \label{eqn:Ezequation} E_z(x,z,t)= -\frac{Q}{2a\epsilon_r\epsilon_0}\sum_{n}\left[\frac{f_n(x)}{\alpha_n}\right]exp\left[-\frac{(\omega_n\sigma_z)^2}{4c^2}\right] exp\left[-i\frac{\omega_n}{c}z_0\right] \end{equation} \begin{equation} \label{eqn:Exequation} E_x(x,z,t)= -i\frac{Q}{2a\epsilon_r\epsilon_0}\sum_{n}\left[\frac{g_n(x)}{\alpha_n}\right]exp\left[-\frac{(\omega_n\sigma_z)^2}{4c^2}\right] exp\left[-i\frac{\omega_n}{c}z_0\right]. \end{equation} It should be noted that, for a 3D geometry, these equations should be a functions of the azimuthal order $m$, but, given that we have considered a 2D geometry, the electric field is not related to the azimuthal order (θ angle of the cylindrical coordinates), but it only depends on the eigenfrequencies $\omega_n$ of the general TM-mode $m$. The expressions of the parameters $f_n$(x) and $g_n$(x) are written below: \begin{equation} \begin{cases} \label{eqn:fngnequation} f_n(x)=cosh(k_nx) & \text{se $-a \leq x \leq a$}\\g_n(x)=\gamma sinh(k_nx) & \text{se $-a \leq x \leq a$}, \end{cases} \end{equation} where $k_n=\omega_n/c\beta\gamma$. All eigenfrequencies $\omega_n$ of waveguide modes can be obtained by calculation of zeros of the conditional equation $C(\omega_n)$: \begin{equation} \begin{cases} \label{eqn:conditionalequation} C(\omega_n)=\epsilon_r k_ncot(p_n(b-a))\\p_n=\gamma k_n \sqrt{\epsilon_r\beta^2-1}. \end{cases} \end{equation} The longitudinal electric field expressed by Eq. (4) is plotted in Figure 4. The amplitude of the electron bunch has been scaled in order to overlap it with the electric fields. Figure 4 shows the longitudinal electric field $E_z(x = 0, z_0)$ as a function of the $z$-direction; it is calculated on the $z$-axis ($x$ = 0) and takes into account up to $n$=150 modes that ranging between 13.2 GHz to 3.8 THz; also, it should be noted that the electric field peaks have a typical alternating-sign behaviour. \begin{figure} \centering \includegraphics[scale=0.45,trim=0cm 0cm 0cm 0cm]{Figure4.jpg} \caption{Longitudinal electric field obtained if we take into account the first 150 eigenfrequencies; the red curve represents $E_z$ and the black curve is the e-bunch. The entrance of the capillary corresponds to z=0. a) Longitudinal electric field at $\sigma_z$ = 270 $\mu$m; b) Longitudinal electric field at $\sigma_z$ = 360 $\mu$m.} \end{figure} Figure 4 also describes a comparison of longitudinal electric fields $E_z$ calculated at two different bunch lengths: $\sigma_z$ = 270 $\mu$m and $\sigma_z$ = 360 $\mu$m, that are the same values we have used to perform our experimental measurements reported in Figure 2. The maximum value of the longitudinal electric field will reach around 3.3 MV/m (Fig. 4a) if the bunch length is 270 $\mu$m and will be around 1.8 MV/m (Fig. 4b) if the bunch is 360 $\mu$m length, which is around half of the first value. Actually, the formalism expressed by Eqs (4,5) is referred to wake fields created inside a dielectric structure that is surrounded by a perfect-conducting cylinder, while in our capillary there is no any metallic guide. However, we have used such formalism to explain our experimental results, concerning the bunch's displacements, because such equations can describe how the bunch's head creates the electric fields and also the way that they act on the bunch's tail. Therefore, these wake fields created within the e-bunch can determine the tail's movement with respect to the head. Really, the perfect-conducting cylinder around the dielectric structure is used to produce the electric field reflection along the capillary \cite{label8,label9}, from a driver bunch towards other witness bunches trailing the first one (dielectric wake-field acceleration). However, the formalism in Refs [8,9] has been used to give an estimation of the wake fields effects and principally to get a better understanding of the wake fields production trying to study the main parameters that determine such a phenomenon. In our study, therefore, we are only interested in the interaction between a single e-bunch and the first electric field pulse (Fig. 4), which is solely responsible to affect the bunch because they are exactly overlapped. Also, since there is no any perfect-conducting cylinder around the dielectric structure, the other electric pulses do not assume a crucial role to study the wake fields effects within a single bunch. In order to evaluate the displacement of the bunch tail with respect to the head, actually, we are interested to investigate the transverse electric field $E_x$, that is expressed by Eq. (5) and plotted in Figure 5. This transverse electric field corresponds to a beam off-set $x_0$ = 200 $\mu$m from the center axis. As it has already done for $E_z$, also for $E_x$ we present a comparison relative to two different longitudinal bunch lengths, that are again 270 and 360 $\mu$m: in the first case, the maximum value of the transverse field is around 2.5 MV/m (Fig. 5a) and in the second one it reaches around 1.1 MV/m (Fig.5b), which is, as it happened with $E_z$, around half of the first value. \begin{figure} \centering \includegraphics[scale=0.45,trim=0cm 0cm 0cm 0cm]{Figure5.jpg} \caption{Transverse electric field obtained if we take into account the first 150 eigenfrequencies; the red curve represents $E_x$ and the black curve is the e-bunch. The entrance of the capillary corresponds to z=0. a) Transverse electric field at $\sigma_z$ = 270 $\mu$m; b) Longitudinal electric field at $\sigma_z$ = 360 $\mu$m.} \end{figure} This result, as regard to the transverse field, is very interesting because also the tails deflections we have measured by using the same operating conditions on beams, maintain a similar ratio (Fig.2): $\Delta x_1$ $\approx$ 160 $\mu$m and $\Delta x_2$ $\approx$ 80 $\mu$m. However, the theoretical model shows that the longer is the bunch, the lower is the electric field produced by bunch itself, both transverse and longitudinal, according to our experimental measurements. Also, it should be noted that electric fields are inversely proportional to the plasma channel radius $a$. As previously mentioned, for wake-field studies it is very important to analyze the comparison between the duration time of the electric field pulse and the bunch length. As you can see in the Figures 5, the bunch's head generates the electric field behind itself, therefore it will not be affected by any field; on the contrary, its tail will undergo a transverse displacement, to the right or left depending on the sign of the field, because it follows the head and will be located in a $z$-position where the electric field reach about the maximum value. \begin{figure} \centering \includegraphics[scale=0.45,trim=0cm 0cm 0cm 0cm]{Figure6.jpg} \caption{Electric fields obtained if we take into account the first 150 eigenfrequencies; the red curve represents $E_x$ and the black curve is the e-bunch. The entrance of the capillary corresponds to z=0. a) Longitudinal electric field at $\sigma_z$ = 50 $\mu$m; b) Transverse electric field at $\sigma_z$ = 50 $\mu$m.} \end{figure} Finally, since many of the applications foreseen at the SPARC\_LAB test facility and other plasma-based accelerating machine, as EuPRAXIA \cite{label15} facility or the new INFN infrastructure called EuPRAXIA@SPARC\_LAB \cite{label16}, are going to consider very short electron bunch, few tens of micrometers, we should take into account the wake-field amplitudes that can be produced by using our capillary. With this purpose in mind, other calculations have been performed relative to our dielectric structure, after considering an electron bunch of 50 $\mu$m length. Figure 6 shows longitudinal and transverse electric fields produced in these conditions on beam. The $E_z$ field can reach pick amplitudes around 130 MV/m while the $E_x$ field can arrive up to 550 MV/m when the off-axis displacement $x_0$ is equal to 200 $\mu$m. These values of the wake-field inside a dielectric capillary could produce strong instabilities of the driver bunch, but they can be restored to admissible values by using a capillary that has very different properties as higher values of the radius, according to Eqs. (5) and (6). \section{Conclusions} \label{} Electron beams passing through a dielectric capillary plasma source produce wake fields that determine beam instabilities. This phenomenon depends on different parameters, related to both the geometric properties of the capillary and the beam properties. Experimental measurements show the typical effect produced on electron bunches, that is the tail deflections with respect to the head. Such behaviour has been investigated as regard to a single e-bunch that passes through our dielectric structure, in order to understand which parameters are responsible to affect the beam and to estimate the values of the produced electric fields. The most important parameter that has to be taken into account is the bunch length: longitudinal and transverse electric fields depend on such parameter by means of an exponential function; for this reason, the theoretical model provides low values of the electric fields $E_z$ and $E_x$, around 3.3 and 2.5 MV/m respectively, when the bunch length is 270 $\mu$m, but they would reach very higher values, around 120 and 550 MV/m respectively, if the bunch was 50 $\mu$m length. Several other experimental investigations are needed in order to get a better understanding of the wake fields production within dielectric capillary, as the measurement of the tail displacement at very low values of the bunch length, the study of wake field behaviours at different values of the capillary radius and that one as a function of the off-axis displacement of the beam. \section*{ACKNOWLEDGMENTS} \label{} This work was supported by the European Unions Horizon 178 2020 research and innovation programme under grant agreement No. 653782. One of the authors, H. Fares, would like to acknowledge support from Academy of Scientific Research and Technology (ASRT) in Egypt and INFN in Italy (ASRT-INFN joint project). \section{References} \label{}
\section{Introduction} Recently, an increasing interest has been paid to nanoporous materials. Porosity, indeed, can strongly increase the surface-to-volume ratio and enhance the specific mechanical properties, such as the specific modulus and strength, with respect to bulk material. For example, a high surface-to-volume ratio is desirable for gas adsorption and separation \citep{Garberoglio2015}, while improving specific mechanical properties using carbon-based porous materials are of interest for building lightweight structural components \citep{taioli1}. Moreover, after the discovery of novel bi-dimensional materials \citep{Novoselov2005}, such as the hexagonal allotrope of boron nitride (h-BN) and graphene, several investigations have been focused onto the search of unconventional 3D structures that inherit the outstanding electrical \citep{Gruneis,Gruneis2}, thermal and mechanical properties of their 2D counterpart in order to achieve specific requirements. In particular, graphene shows excellent tensile properties, such as fracture strength ($\sigma \simeq$ 130 GPa) and Young’s modulus (E $\simeq$ 1 TPa) coupled with relatively low density due to its bidimensionality, and thus it is the best candidate material to be used in the synthesis of foam assemblies with superior properties. Graphene-based nanofoams can be synthesised by using CVD on metallic scaffold as well as nanoparticles assemblies \citep{Drieschner2016, Christian2017,Taioli2014} or chemically derived by reducing graphene oxide \citep{Tao2016}. In mechanical and thermal applications, critical parameters are the concentration of defects, the topology as well as the inter-flake contacts. Despite this technological interest, however only a few computational investigations have been performed to characterize their electronic, thermal and mechanical properties \citep{Alonso2012, Wu2013, Pedrielli2017}. In particular, mechanical properties of porous materials at microscale can be studied by the Ashby-Gibson theory, in which a unit cell approach is combined with dimensional analysis \citep{Ashby2006}. While this approach can be useful to perform dimensional analysis and deliver scaling laws of mechanical properties with respect to density, however the effective properties of porous materials are not often a simple function of porosity. At odds, they usually strongly depend on features at the nanoscale, where local atomic interactions start to play a crucial role, or on the presence of struts and of random pores with very special shapes that destroy structural periodicity. Furthermore, deformation mechanisms at the mesoscale can be very different at the nanoscale, where the fine details of graphene topology come into play, and a multiscale approach should be devised \citep{taioli1}. Additionally, it turns out that carbon-based nanoporous materials with random porosity distribution exhibit poor scaling of the mechanical properties with decreasing density, even more pronounced than that of metal and polymeric foams \citep{Qin2017}. However, nanoporous graphene foams easily outperform polymeric foams at high density and can compete with their high-performance rivals, such as the metal foams. Thus, the interest in studying these random porous structures for energy storage and damping devices remains high. Moreover, the high porosity of random foams suggests a concurrent application of these materials as thermal insulators. In particular, our goal is to assess the dependence of the thermophysical properties on pore density and size, and to compare thermal insulation performances of graphene-based 3D structures with other widely used carbon-based foams, such as polyurethane and metal foams. \begin{figure*}[hbt] \centering \subfigure[]{ \includegraphics[width=0.30\textwidth]{F1-eps-converted-to.pdf}} \subfigure[]{ \includegraphics[width=0.30\textwidth]{F2-eps-converted-to.pdf}} \subfigure[]{ \includegraphics[width=0.30\textwidth]{F3-eps-converted-to.pdf}} \subfigure[]{ \includegraphics[width=0.30\textwidth]{F4-eps-converted-to.pdf}} \subfigure[]{ \includegraphics[width=0.30\textwidth]{F5-eps-converted-to.pdf}} \subfigure[]{ \includegraphics[width=0.30\textwidth]{F6-eps-converted-to.pdf}} \caption{The step sequence for obtaining random foams. Panel a) shows the initial condition in which the support particles are randomly arranged in a regular grid. Subsequently, the box is slowly expanded while the support particle positions are optimized (panel b). Foam particles are created on a regular grid and deleted if excessively close to the supporting ones (panel c). The particle positions are optimized and an attractive potential towards the supporting particles is switched-on during a molecular dynamics run (panel d). Finally, the particles that do not belong to the first layer are deleted to avoid multilayer structures (e). The LJ net is finally dualized by patterning the surface triangular tiling via a Voronoi procedure. A graphene-like topology eventually emerges (panel f). Color codes have been used for visualization purposes only and have no physical meaning.} \label{fig:Procedure} \end{figure*} \begin{figure} \centering \includegraphics[width=0.4\textwidth]{FoamExp-eps-converted-to.pdf} \caption{Scanning electron microscopy image of a graphene random foam with a topology similar to those studied in this work (pore size is of course much larger, of the order of a few micrometers, with respect to that of our samples. (Courtesy of CNR-IMM Bologna, Italy.))} \label{fig:FoamExp} \end{figure} This work is thus aimed at shedding some light on the mechanical and thermal properties of random graphene nanofoams. In particular, we present molecular dynamics (MD) simulations of random-pore foams under tension and compression by modelling atomic interactions via reactive potentials. Several random-pore foams, characterized by different density and porosity, are produced using a tailored while reproducible recipe, which consists in preparing families of random networks to which graphene is attached. Mechanical properties are assessed by computing stress--strain curves, Young moduli, Poisson ratio, and specific toughness for each family of random foams. Furthermore, to assess the efficiency of our random-pore nanofoams as thermal insulators we report in this study the calculation of the effective phonon thermal conductivity by using the equilibrium Green-Kubo formalism. \begin{figure*} \centering \subfigure[A]{ \includegraphics[width=0.23\textwidth]{Foam2-eps-converted-to.pdf}} \subfigure[B]{ \includegraphics[width=0.23\textwidth]{Foam3-eps-converted-to.pdf}} \subfigure[C]{ \includegraphics[width=0.23\textwidth]{Foam31-eps-converted-to.pdf}} \subfigure[D]{ \includegraphics[width=0.23\textwidth]{Foam4-eps-converted-to.pdf}} \caption{A $3.0$~nm slice of the unit cells for each of the four foam families with different porosity.} \label{fig:Foams} \end{figure*} \section{Modeling graphene random foams} To generate our families of graphene foams, we devise an approach composed basically of two steps ~\citep{Taioli2016,Pedrielli2017}: first, we generate a tessellation of the surface to be decorated with graphene by using triangles; second, we apply a Voronoi partitioning (dualization) of the triangulation points. More in details, we start by filling the simulation unit cell with a random ensemble of particles interacting via a pair-wise Lennard-Jones (LJ) potential (Fig.~\ref{fig:Procedure}a). As a second step, the unit cell is slowly expanded to obtain random aggregation of particles (Fig.~\ref{fig:Procedure}b). In the third step we fill the simulation cell with a second type of particles arranged into a regular grid and characterized by different LJ parameters with respect to the previous ones (Fig.~\ref{fig:Procedure}c). The first type of particles ({\it support particles}) acts as a framework to support the particles used in the triangulation ({\it foam particles}). The latter are deleted if they are too close (below $0.8$~nm) to the support particles in order to avoid convergence issues during molecular dynamics simulations. The fourth step consists in the optimization of the foam particle positions, performed by clamping down the framework degrees of freedom with a viscous damping force (Fig.~\ref{fig:Procedure}d). The particles found at a distance from the support particles larger than $0.32$~nm\ were deleted to obtain a smooth mono-layer structure (Fig.~\ref{fig:Procedure}e). As a last step, the Voronoi partition of the triangles tessellating the surface was performed to obtain pentagonal, hexagonal and heptagonal carbon rings (Fig.~\ref{fig:Procedure}f)~(for further details on this procedure see \citep{Taioli2016}). These configurations were finally annealed by MD using reactive potentials to optimize the carbon positions within the foams. By using this recipe, four families of carbon foams were produced (called A, B, C, and D, see Fig.~\ref{fig:Procedure}a, which are provided as xyz coordinate files with this submission). Each family is characterized by a different initial number of randomly-positioned support particles while, within each family, the only difference is the initial random distribution of the support points (Fig.~\ref{fig:Procedure}a). During the whole procedure we impose periodic boundary conditions. The LJ parameters used for the support (S) and foam (F) particles, respectively, are the following: $\epsilon_{SS}=100.0$~eV, $\sigma_{SS}=0.3$~nm, cutoff$_{SS}=0.5$~nm, $\epsilon_{FF}=0.1$~eV, $\sigma_{FF}=0.32$~nm, cutoff$_{FF}=0.23$~nm, $\epsilon_{SF}=10.0$~eV, $\sigma_{SFF}=1.0$~nm. The starting cell side length is $6.0$~nm, expanded up to a length of $12.5$~nm from step a) to step b) of Fig.~\ref{fig:Procedure}. \begin{table}[t] \centering \small \begin{tabular}{cccccc} \toprule & Average & Average & Carbon atoms with & \\ Foam type & density & pore size & 3-coordination & \\ & (g/cm$^3$) & (nm) & (\%) & \\ \midrule A & 0.55 & 2.23 & 97.3 & \\ B & 0.68 & 1.89 & 95.9 & \\ C & 0.78 & 1.68 & 93.0 & \\ D & 0.83 & 1.56 & 93.1 & \\ \midrule \bottomrule \end{tabular} \caption{Parameters characterizing the four foam families investigated in this work.} \label{tab:Table 1} \end{table} These parameters were chosen in such a way that the typical distance between the support particles was smaller than the equilibrium length between the foam and the support particles. In this way, the support particle surface is smooth, being obtained by several atoms lying nearby. The topology of the nanofoams studied here is inspired by the graphene foams grown on nickel scaffolds (Fig. \ref{fig:FoamExp}). However, we note that the pore size in the experimentally synthesized samples is larger than in our computational models. The way in which our graphene random foams are built is substantially different from that one presented in Ref. \citep{Qin2017}, where three-dimensional graphene assemblies were synthesized by starting from randomly distributed and oriented rectangular graphene flakes and spherical inclusions, and by repeating NPT-NVT cycles to obtain condensed graphene foams. \section{Characterization of graphene foams} Five different samples for each of the four families were prepared by varying the initial distribution of the support particles. In Fig. \ref{fig:Foams} we report representative models ($3.0$~nm slices) for each of these foam families. From A to D the foams present a decreasing average pore size, and an increasing mass density. The geometrical analysis of the graphene porous foams and of their voids was carried out using the simulation code Zeo++\citep{Williems2012}. In particular, we characterize our prepared structures using the Pore Size Distribution (PSD) function, which can be experimentally obtained by adsorption/desorption measurements. PSD analysis delivers a quantitative description of the range of pore sizes present in a given sample. Moreover, we perform a coordination analysis to find possible signature of under- or over-coordination of the carbon atoms usually forming a network of sp$^2$ hybrid bonds. The computed quantities are reported in Tab~\ref{tab:Table 1}. \begin{figure} \includegraphics[width=0.45\textwidth]{AGraphPSD-eps-converted-to.pdf} \caption{Pore Size Distribution of the four families of random nanofoams. The average pore size of the considered foam families is a decreasing function of mass density.} \label{fig:PoreSize} \end{figure} \begin{comment} The PSDs can be obtained as an overlap of two peaks: the first, centered at $1.7$~nm, is related to the internal space of the random foam; the second, variable between $2.3$~nm towards $1.7$~nm, is attributed to the external space of the foam. \end{comment} \begin{figure} \includegraphics[width=0.45\textwidth]{PSDRegular-eps-converted-to.pdf} \caption{Pore Size Distribution of the four types of regular nanofoams, such as those presented in Ref. \cite{Pedrielli2017}. The average pore size is $2$~nm, comparable with the random foam studied here, in particular with foams type B and C reported in Fig. \ref{fig:PoreSize}.} \label{fig:PoreSizeRegular} \end{figure} The averaged PSDs for all our graphene foam families are reported in Fig.~\ref{fig:PoreSize} (continuous lines), showing the standard deviation within each group as a colored shaded area. By comparing these PSDs with those obtained in the case of regular pore foams \citep{Pedrielli2017}, reported in Fig. \ref{fig:PoreSizeRegular}, we notice that the random foams present similar average pore dimension and similar mass density. Indeed, the random foam PSDs are characterized by a maximum, representing the most likely pore size in each case, decreasing from $2.3$~nm to $1.7$~nm from A to D foam type. The average values of the pore size are reported in Tab. \ref{tab:Table 1}. These values compare reasonably well with those reported for regular foams, where PSD peaks at about $2$~nm (see Fig. \ref{fig:PoreSizeRegular}). \begin{comment} We notice that the PSDs of random foams (see Fig.~\ref{fig:PoreSize}) can be rationalized as overlap of two contributions: a smaller pore located in the interior of the foam, identified by the peak at $1.7$~nm common to all families; and a second peak decreasing from $2.3$~nm towards lower values with increasing foam density. Thus, due to this double peak feature, our structures can represent a rather faithful model of foams in which the main average dimension of the internal pore results essentially unchanged under compression, whereas the interstitial space decreases progressively upon compression having pores with lower average dimensions. \end{comment} Finally, while regular foams present mass densities in the range $0.6-0.7$~g cm${^{-3}}$, our families of random foams have mass densities in the range $0.5-0.8$~g cm${^{-3}}$ (see Tab. \ref{tab:Table 1}). We notice that the an almost linear relation (coefficient of determination R$^2=0.98$) with negative slope relates the mass density and the average pore dimension of the four random foam families, as reported in Fig. \ref{fig:PoreMass}. \begin{figure} \includegraphics[width=0.45\textwidth]{PoreMass-eps-converted-to.pdf} \caption{Relation between mass density and average pore dimension for the considered foam families. } \label{fig:PoreMass} \end{figure} \section{Computational methods} To perform molecular dynamics simulations, carbon-carbon interatomic forces were modeled using the AIREBO potential \citep{Stuart2000}. To find the minimum energy structures with respect to defect positions, the samples were annealed at $3500$~K, equilibrated at this temperature for $100$~ps, and eventually cooled down to $700$~K in $100$~ps using a viscous damping force. The annealing was performed using the standard value for the cutoff parameter for the REBO part of the potential and performed within the microcanonical ensemble (NVE). For the simulations of compressive and tensile regimes, all samples were equilibrated at zero pressure and at the temperature of $1$~K using the Nosé–Hoover barostat and thermostat. Furthermore, the adaptive cut-off parameter of the potential was set to $0.2$~nm to better describe the near-fracture regime \citep{Shenderova2000}. The equations of motion were integrated via the velocity-Verlet algorithm with time step of $1$~fs. Mechanical properties were assessed in the isobaric-isothermal ensemble (NPT), adding a drag term to smooth out the pressure oscillations. A uni-axial tensile strain was applied up to sample fracture in each case. The strain parallel to the direction of deformation is defined as \begin{equation} \varepsilon = \frac{L-L_0}{L} = \frac{\Delta L}{L} \end{equation} where $L_0$ and $L$ are the starting and current length of the sample in the direction of loading. To determine the stress, the pressure stress tensor components in response to the external deformation are computed as \citep{Thompson2009} \begin{equation}\label{pressure} P_{ij} = \frac{\sum_k^N{m_k v_{k_i} v_{k_j}}}{V}+ \frac{\sum_k^N{r_{k_i} f_{k_j}}}{V} \end{equation} where $i$ and $j$ label the coordinates $x$, $y$, $z$; $k$ runs over the atoms; $m_k$ and $v_k$ are the mass and velocity of $k$-th atom; $r_{k_i}$ is the position of $k$-th atom; $f_{k_j}$ is the $j$-th component of the total force on the $k$-th atom due to the other atoms; and, finally, $V$ is the volume of the simulation box. The pressure in Eq. \ref{pressure} includes both kinetic energy (temperature) and virial terms. Notice that the forces appearing in Eq. \ref{pressure} are the sum of the pairwise, angle, dihedral, improper and long-range contributions. The computed stress is the true stress because the pressure is measured with respect to the instantaneous section area of the samples. The uni-axial compressive strain was applied up to reaching $35$~\% total strain. The applied strain rate is chosen equal to $0.001$~ps$^{-1}$, that we tested appropriately for ensuing convergence in the case of regular nanofoams \citep{Pedrielli2017}. Stress and strain were saved every $1000$ time steps. Foams are rather rigid materials before packing, so one needs to apply large loads, of the order of a few GPa, to obtain large deformations in comparison to other materials, such as concrete or steel (having strains of 0.01\% already at pressures of few hundreds MPa). However, to reach the highest level of deformation (up to 35\%) in the foams studied in this paper one should resort to using diamond anvil cells or small samples in order to achieve pressures of a few GPa. The stress--strain curve was computed at $1$~K, since molecular dynamics is usually computationally faster than minimization procedures. The same approach has been previously adopted by other groups dealing with similar problems (see e.g. \cite{Wu2013}). While thermal fluctuations of the order of a few K, thus higher than the absolute value of the thermostat temperature, are found during MD runs, they do not significantly affect numerical MD simulations. Indeed, we demonstrated in a previous work [1] that the contribution of the kinetic energy to the pressure tensor at a few K is approximately 2\% of the total. Thus, a small kinetic contribution due to using low temperature MD does not prevent our simulations from reaching and overpassing local minima. The use of low-temperature MD simulations was chosen instead of standard minimization procedures because stress, for example due to compressive load, can be more effectively and more continuously redistributed within the entire structure during the dynamics by applying a deformation rate (providing this rate delivers converged results with respect to its value) instead of using a sequence of deformation-minimization steps. Indeed, under compressive strain the temperature is likely to increase: coupling the system with a thermostat leaks away this excess of thermal energy and allows for a minimisation of the structures by using MD. The observables that we calculate to characterize the mechanical properties of the nanofoams are the Young modulus, fracture stress and fracture strain. The toughness is also evaluated as the area under the stress--strain curve up to the fracture stress. Indeed, the samples have no plastic deformation but several sequential fractures. Stress--strain characteristics of carbon random nanofoams present a linear behaviour at low strain. Thus, the Young modulus is obtained as the tangent at zero strain. We also performed the calculation of the Poisson ratio $\nu$, defined as the negative ratio between the transverse $\varepsilon_{\mathrm{T}}$ and the longitudinal deformations $\varepsilon_{\mathrm{L}}$: \begin{equation} \nu =- \frac{\varepsilon_{\mathrm{T}}}{\varepsilon_{\mathrm{L}}} \end{equation} Here we extend the concept of Poisson ratio to deformations beyond the linear regime, and use it to quantify the lateral deformation of the material. A similar extension is done for the Young modulus. Phonon thermal conductivity was assessed using the equilibrium Green-Kubo approach \citep{Green1954, Kubo1957} for it is less sensitive to the simulation box dimension than non-equilibrium MD methods \citep{Sellan2010}. To this aim, first the atomic positions were relaxed and equilibrated at $300$~K using the Berendsen thermostat method (NVT ensemble). Then, in the NVE ensemble, the equilibrium thermal conductivity $k$ according to the Green-Kubo formalism, can be calculated as follows: \begin{equation}\label{cond} k = \frac{V}{3K_{\text B}T^2} \int_0^{\infty}{\langle \vec{J}(0) \cdot \vec{J}(t)\rangle}dt \end{equation} where $V$ is the volume of the simulation cell, $t$ is the correlation time, $K_{\text B}$ is the Boltzmann constant, $\vec{r}$ identifies the particle positions. The heat current $\vec J$, appearing in Eq. \ref{cond}, is defined by: \begin{equation}\label{energy} \vec{J} = \frac{1}{V} \Big( \sum_{i} E_i \vec{v}_i + \frac{1}{2} \sum_{i<j}(\vec{F}_{ij} \cdot (\vec{v}_i + \vec{v}_j ) \vec{r}_{ij}) \Big) \end{equation} where $\vec{v}$ is the velocity of a particle, $\vec{r}_{ij}$ and $\vec{F}_{ij}$ are the distance and force between the particles $i$ and $j$, and $E_i$ is the total energy per atom. The first term in the right hand side corresponds to convection, while the second term to conduction. The integrand in the expression for thermal conductivity is the heat current auto-correlation function (HCACF). To get a proper sampling of the phase space multiple runs are required with different initial conditions. Simulations to obtain MD trajectories to perform accurate ensemble averages were performed over a time span of $500$~ps, using a step of $0.5$~fs. HCACF has been computed by dividing the total time of computation into $250$~fs beads and by performing the integral in Eq. \ref{cond} by sampling every $5$~fs. Finally, we average over all the beads. The thermal conductivity was calculated by using a version of the Tersoff potential \citep{Lindsay2010} optimized to reproduce accurately the experimental phonon dispersion curves and the thermal properties of carbon structures, such as graphene and graphite. Molecular dynamics simulations were carried out using LAMMPS \citep{Plimpton1995}. Atomic configurations were visualized by using the OVITO package \citep{Stukowski2010} or VMD \citep{Humphrey1996}. \section{Results and discussion} \subsection{Tension} In Fig.~\ref{fig:Tension}, we report the stress--strain characteristics for the four foam families investigated in this work, while in Fig.~\ref{fig:TensionSpec} the stress--strain curves are normalized with respect to the mass density. \begin{figure}[hbt] \centering \includegraphics[width=0.5\textwidth]{AGraphAverage-eps-converted-to.pdf} \caption{Stress--strain curves of the four graphene foam families under uni-axial tension along with the standard deviation for each family, reproduced by a colored shaded area on the top of the relevant curve.} \label{fig:Tension} \end{figure} The stress--strain curves show a typical elastic behavior for small deformations up to the tensile strength, followed by a decreasing tail corresponding to the sample fracture. We notice that the stress--strain characteristics of graphene foams do not present a region that can be associated to a plastic deformation. Indeed, these 3D graphene structures are essentially brittle, presenting a comparable fracture strain with a corresponding stress specific of the family. Notably, the same behaviour is found in the mass density weighted stress--strain curves (see Fig.~\ref{fig:TensionSpec}). This finding tells us that the different mechanical performances of the four foam families are due basically to features other than mass density, such as the pore size distribution or the connectivity. Indeed, if the mass density were the factor most critically affecting the foam mechanical properties, then the normalized stress-strain curves should overlap. \begin{figure}[hbt] \centering \includegraphics[width=0.5\textwidth]{AGraphAverageSpec-eps-converted-to.pdf} \caption{Stress--strain curves of the four foam families weighted by the sample mass density under uni-axial tension along with the standard deviation for each family, reproduced by a colored shaded area on the top of the relevant curve.} \label{fig:TensionSpec} \end{figure} Moreover, we report in Tab.~\ref{tab:Table 2} the Young modulus and the tensile strength of the four foam families, and in Tab.~\ref{tab:Table 2b} the specific modulus and the specific strength (values per mass density). Furthermore, in the fifth column of Tab.~\ref{tab:Table 2b} we show the specific toughness, calculated as the total area below the stress--strain curves of Fig.~\ref{fig:TensionSpec} up to the fracture strain. Specific Young modulus and tensile strength of random foams can be compared with those previously calculated for carbon nanotruss networks, studied in Ref. \citep{Pedrielli2017}. For nanotruss network, at $5$\% to $8$\% strain the stress is in the range $90-130$~MNm~kg$^{-1}$, while for random foams at the same strain the values are in the range $3.9-36.6$~MNm~kg$^{-1}$. This makes clear that regular foams are mechanically stiffer than the random ones here studied. Graphene random foams can be also compared to 3D graphene assemblies reported in Ref. \citep{Qin2017}. Graphene assemblies have a specific Young modulus of $7.65$ MNm kg$^{-1}$ (mass density: $0.366$ g/cm$^{3}$, Young modulus: $2.8$~GPa), which compares with the lowest mass density foam family studied here (see Tab. \ref{tab:Table 2}). At variance, the specific strength of $7.4$ MNm kg$^{-1}$ found in graphene assemblies is only sligthly higher than in our random foams, mainly due to the higher connectivity of graphene sheets composing the assemblies. For completeness, we notice that the mechanical tests reported in Ref. \citep{Qin2017} have been performed at a temperature of $300$~K, while our simulations are performed at $1$~K. Movies of our foams under tensile load are provided with this submission. \begin{table*} \centering \small \begin{tabular}{cccccccc} \toprule & Young & Standard & Tensile & Standard & Fracture \\ Foam type & modulus & deviation & strength & deviation & strain \\ &(GPa) & (GPa) & (GPa) & (GPa) & (\%) \\ \midrule A & 3.9 & 2.1 & 0.5 & 0.3 & 19 \\ B & 14.0 & 3.1 & 1.5 & 0.5 & 15 \\ C & 27.3 & 3.7 & 3.1 & 0.4 & 12 \\ D & 36.6 & 1.9 & 4.6 & 0.3 & 13 \\ \bottomrule \end{tabular} \caption{Young modulus (1$^{st}$ column) and its standard deviation (2$^{nd}$ column), tensile strength (3$^{rd}$ column) and its standard deviation (4$^{th}$ column), and fracture strain (5$^{th}$ column) of the four families of random foams under tension. Specific toughness is calculated as the area below the stress--strain curve up to fracture strain per mass density.} \label{tab:Table 2} \end{table*} \begin{table*} \centering \small \begin{tabular}{ccccccccc} \toprule & Specific & Standard & Specific & Standard & Specific\\ Foam type & modulus & deviation & strength & deviation & toughness\\ & (MNm kg$^{-1}$) & (MNm kg$^{-1}$) & (MNm kg$^{-1}$) & (MNm kg$^{-1}$)& (MJ~kg$^{-1}$) \\ \midrule A & 7.1 & 3.8 & 0.9 &0.5& 0.1 \\ B & 20.6 & 4.6 & 2.2 &1.5& 0.2 \\ C & 35.0 & 4.7 & 3.9 &3.1& 0.3 \\ D & 44.1 & 2.3 & 5.4 &4.6& 0.4 \\ \bottomrule \end{tabular} \caption{Specific modulus (1$^{st}$ column) its standard deviation (2$^{nd}$ column), specific strength (3$^{rd}$ column) and its standard deviation (4$^{th}$ column), and specific toughness (5$^{th}$ column) of the four families of random foams under tensile strain. Specific toughness is calculated as the area below the stress--strain curve up to fracture strain per mass density.} \label{tab:Table 2b} \end{table*} \subsection{Compression} \begin{figure}[hbt] \centering \includegraphics[width=0.5\textwidth]{AGraph1Average-eps-converted-to.pdf} \caption{Stress--strain curves of the four random foam families under uni-axial compression up to $35$\% strain. Shaded areas represent standard deviation within each foam family.} \label{fig:Comp} \end{figure} In this section we present the results obtained for our samples under compressive load. In Fig.~\ref{fig:Comp} we report the stress--strain curves for the four foam families. The maximum deformation reaches $35$\% strain for the largest compression load. Beyond $35$\% strain the foams are mechanically unstable. From Fig.~\ref{fig:Comp}, we observe that at small strain foams are in the elastic regime, and the material is characterized by a full recovery to the original shape when the load is removed. Subsequently, we find a plateau with a slope similar for all our foam families, which models the structural collapse at a nearly constant stress by bending or fracture of the building blocks. \begin{figure} \centering \subfigure[A]{ \includegraphics[width=0.2\textwidth]{12_CompressionMod1-eps-converted-to.pdf}} \subfigure[D]{ \includegraphics[width=0.2\textwidth]{12_CompressionMod2-eps-converted-to.pdf}} \caption{A $2.0$~nm slice of a sample from the foam families A and D under $12$\% compressive strain. As by Fig.~\ref{fig:Comp} this strain value sets the transition between the elastic regime and the collapsing plateau. This transition for foams of higher porosity, such as those belonging to the type A, is related to the closure of the interstitial space when graphene sheets touch upon, as those highlighted by red circles.} \label{fig:12Comp} \end{figure} Finally, at higher strain (not shown) one finds a steep ramp in the stress--strain curve, representing the complete collapse of the structures. The random foam family A, characterized by the lowest density, presents this ramp at $70$\% compressive strain. At variance, higher density random foams are not stable under compression before their respective final ramps, and present a structural transition from graphene ordered layers to amorphous carbon, with a strong stress decrease followed by an increase. \begin{figure}[hbt] \centering \includegraphics[width=0.5\textwidth]{AGraph1AverageSpec-eps-converted-to.pdf} \caption{Specific stress--strain curves of the four random foam types under uni-axial compression up to $35$\% strain. Shaded areas represent deviation within each foam family.} \label{fig:CompSpec} \end{figure} The most visible mechanical characteristics of our families of random foams (see the stress--strain curves in Fig.~\ref{fig:Comp}) is that, with increasing foam density and decreasing pore size average dimension, the elastic part presents an increasing slope, while beyond $5-10$\% strain the slopes are very similar. This behavior suggests a change in the compression mechanism: below $5-10$\% strain the slope is mainly due to the connectivity among graphene layers and this regime is characterized by structural stability, while beyond that the structures start collapsing with a relatively small increase of the stress, due to the bending of the graphene sheets inside the foams. The foam family with the lowest mass density presents an almost linear stress--strain characteristic. This suggests that the collapse is dominated by bending. In higher density foams the slope change is more marked, showing that bending of graphene sheets occurs at higher strain. We notice that the similarity of the slope of the stress--strain curves between $10$\% and $30$\% strain is due to a similar mechanism for collapse. This similarity can be rationalized by observing Fig.~\ref{fig:12Comp}, where a $2.0$~nm slice of a sample from the foam families A and D under $12$\% compressive strain is reported. As by Fig.~\ref{fig:Comp} this strain value sets the transition between the elastic regime and the collapsing plateau. This transition for foams of higher porosity, such as those belonging to the type A, is related to the closure of the interstitial space when graphene sheets touch upon, as those highlighted by red circles. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{AGraph1Average10-eps-converted-to.pdf} \caption{Stress--strain curves of the four random foam types under uni-axial compression up to $15$\% strain.} \label{fig:Comp10} \end{figure} In Fig. \ref{fig:CompSpec} we report (as performed in the case of tensile load) the specific stress--strain curves, which are normalized per mass density. Similarly to the tensile case, the stress--strain characteristics are almost unaffected by this normalization, once more suggesting that the mechanical performances of random foams are related to the connectivity and the topology of the foams rather than to the mass density. Moreover, under compression the behavior of the random foam families C and D, characterized by higher density, is very similar to that of regular nanofoams presented in Ref. \citep{Pedrielli2017} with comparable plateau specific stress. At variance, lower density random foams present an almost linear behavior under compression that differs from that of regular nanofoams. Young modulus and plateau slope for the four random foam families under compressive load are reported in Tab. \ref{tab:Table C}. \begin{table} \centering \small \begin{tabular}{cccccc} \toprule & Young & Plateau & \\ Foam type & modulus & slope & \\ &(GPa) & (GPa) & \\ \midrule A & 3.5 & 1.6 & \\ B & 12.3 & 3.0 & \\ C & 24.4 & 3.7 & \\ D & 31.8 & 3.1 & \\ \bottomrule \end{tabular} \caption{Young modulus and plateau slope of the four foam families studied under compression.} \label{tab:Table C} \end{table} Finally, in Fig.~\ref{fig:Comp10} we report the stress--strain curves of the four random foam families, initially loading the samples up to $15$\% strain and subsequently unloading them. At odds with regular foams that can fully recover their initial shape when unloaded after reaching high deformations (up to $25$\%) \citep{Pedrielli2017}, the higher density of defects in random foams and the local concentration of stress cause an incomplete elastic behavior even for relatively small strain ($15$\%). Movies of our foams under compressive load are provided with this submission. \subsection{Poisson Ratio} To better characterize the four random foam families, we computed the Poisson ratio of these structures. The Poisson ratio for each sample is computed as the average in the two directions transverse to the loading. The Poisson ratios under uni-axial tension and compression regimes are plotted in Figs.~\ref{fig:Poisson} and \ref{fig:PoissonComp}, respectively. Notably, the Poisson ratios are positive over the whole deformation range for all our random foam families. \begin{figure}[hbtp] \centering \includegraphics[width=0.5\textwidth]{AGraphAveragePoisson-eps-converted-to.pdf} \caption{Plot of the Poisson ratio as a function of tensile strain for the four random foam families. The shaded areas across the curves represent half of the standard deviation within each foam family.} \label{fig:Poisson} \end{figure} In particular, for near zero strain under tension, the Poisson ratio is in the range $0.1-0.25$ with values increasing with mass density and foam connectivity. Furthermore, up to in $15$\% strain there is a small increment ($0.02-0.05$) in the Poisson ratio for all the foams families. Finally, the Poisson ratio at higher tensile strain goes to zero. This behaviour is explained as mainly due to the fracture of the samples in this deformation regime, which prevents the sample from further contraction. \begin{figure}[hbt] \centering \includegraphics[width=0.5\textwidth]{AGraphAveragePoissonComp-eps-converted-to.pdf} \caption{Plot of the Poisson ratio as a function of compressive strain for the four random foam families. The shaded areas across the curves represent half of the standard deviation within each foam family.} \label{fig:PoissonComp} \end{figure} At variance, under compression the decrease of the Poisson ratio is due to the internal rearrangement of the graphene layers. At higher strain (about $30$~\%) the Poisson ratio ranges between ($0.05-0.1$). It can be worth noting that in Figs.~\ref{fig:Poisson} and \ref{fig:PoissonComp}, the standard deviation, reported as a shaded area across the relevant curve, is significantly smaller for lower density random foam families than that for higher densities. \subsection{Thermal conductivity} The thermal conductivity was assessed for all the samples by using the averaging procedure of the HCACF explained before. In general, HCACF dies off within $100$~ps and subsequently oscillates. This makes possible the time bead division, discussed in sec. 4. \begin{figure}[hbt] \centering \includegraphics[width=0.5\textwidth]{GraphK-eps-converted-to.pdf} \caption{Time averaged HCACF vs. simulation time of the four random foam families calculated as by Eq. \ref{cond}. The asymptotic values after 300 ps provide the thermal conductivity of the samples. The shaded area for each relevant curve represents half of the standard deviation.} \label{fig:ThermalK} \end{figure} In Fig.~\ref{fig:ThermalK} we plot the average of the integral of HCACF as a function of simulation time for each foam family. The thermal conductivity is given by the asymptotic values of the time-integrated HCACFs. These values for the four foam families, obtained by averaging in the range $400-500$~ps, are reported in Tab. \ref{tab:Table Thermal}. \begin{table} \centering \small \begin{tabular}{cccccc} \toprule & Thermal & Standard & \\ Foam type & conductivity & deviation & \\ &(Wm$^{-1}$$\cdot$ K$^{-1}$) & (Wm$^{-1}$$\cdot$ K$^{-1}$) & \\ \midrule A & 0.83 & 0.13 & \\ B & 1.02 & 0.20 & \\ C & 1.29 & 0.20 & \\ D & 1.36 & 0.22 & \\ \bottomrule \end{tabular} \caption{Thermal conductivity of the four foam families computed via the Green-Kubo approach using an optimized Tersoff potential.} \label{tab:Table Thermal} \end{table} \begin{figure} \includegraphics[width=0.45\textwidth]{Thermal-eps-converted-to.pdf} \caption{Linear relation between mass density and the thermal conductivity for the considered foam families. } \label{fig:ThermalLinear} \end{figure} We notice that two major factors affect the thermal conductivity, that are the foam connectivity and the presence of defects. In the foam families studied here, we devise that the low connectivity found in lower density foams is counterbalanced by the higher number of three-coordinated atoms, while the opposite trends occurs in higher density foams. Indeed, foams with different connectivity (see Fig. 10 of the paper) and different number of defects, show comparable values of the specific thermal conductivity (thermal conductivity per density mass unit). This could be due to a number of reasons. Our most likely explanation of this finding is as follows: smaller pore sizes generally means higher density as reported in Fig. 6. Nevertheless, a smaller size of the pores implies a larger number of defects, due to a bigger local curvature, that is a lower number of three-coordinated carbon atoms. We remind that graphene, due its particular topology, has a very large thermal conductivity, so that it is clear that a high level of carbon three-coordination is connected to large thermal conductivity. The presence of a larger number of defects in high-density foams with low-size pores should then decrease the thermal conductivity. Thus we can argue that mass density (or pore size) and number of defects counteract in the determination of the thermal conductivity. In particular, in Fig. 16 we plot the thermal conductivity as a function of the mass density for the families of four different foams, finding an almost linear relation between these two observables (coefficient of determination $R^2=0.98$). The thermal conductivity of random foams is similar to that of glass ($1$~Wm$^{-1}$ $\cdot$ K$^{-1}$) for lower density foams, with an small increase ($1.5$~Wm$^{-1}$ $\cdot$ K$^{-1}$) for higher density foams. \section{Conclusions} In this work, we investigated by means of MD simulations with reactive potentials the mechanical and thermal properties of graphene random foams with a topology experimentally achievable by growing graphene on stacked nickel nanoparticles. In particular, we tested the mechanical performances under tension and compression of four random foam families, characterized by different mass density and pore size distribution. The samples were prepared using a multi-step approach based on the Voronoi partitioning of a triangulated surface, obtained by tessellation of the simulation cell using a LJ potential forcing the carbon atoms towards a rigid support. Under compression, we found the typical elastic deformation regime with a Young modulus significantly increasing with a decreasing average pore size dimension. A behavior, common to all the random foam families here studied, was found for compressive strain in the bending plateau zone, with a positive slope of the stress--strain curve similar for all the four foam families. For the lowest density random foam family the stress--strain characteristic is almost linear. Finally, we calculated the Poisson ratio, a quantity used to assess the transverse response of materials to deformation, of these random foams. Under tension, the Poisson ratio is positive for all the random foam families, indicating a transverse contraction under tensile load. The values of the Poisson ratio under compression are again positive for all the considered strain and tend to stabilize as the strain increases. As a major outcome of our computational analysis, we find that mechanical properties under tension are characterized by an overall decrease of Young modulus with respect to regular nanofoams, while a tensile strength of the same order of that found for regular foams was obtained for higher density random foams. Due to the interest of using foams as a mean for achieving thermal resistance, we computed the thermal conductivity of random foams using the Green-Kubo approach with a Tersoff potential optimized for these simulations. The thermal conductivity is comparable to that of glass, thus higher than materials typically used as thermal insulators, such as polyurethane rigid foams. Still, random foams do not display good thermal conductive properties, which can be related to the low connectivity in case of high porosity foams and to the presence of defects in low porosity foams. Nevertheless, combining outstanding mechanical performances with light weight, low density and good thermal insulating properties, carbon random foams could be promising candidates as reinforcing fillers in nanocomposites or elastomers to tailor their properties or to replace polymer materials in applications where thermal stability and mechanical strength are needed. \section*{Acknowledgements} N.M.P. is supported by the European Commission H2020 under the Graphene Flagship Core 1 No. 696656 (WP14 ``Polymer composites'') and under the Fet Proactive ``Neurofibres'' No.732344. S.T and G.G. acknowledge funding from previous WP14 ``Polymer composites'' grant. Access to computing and storage facilities owned by parties and projects contributing to the Czech National Grid Infrastructure MetaCentrum provided under the programme ``Projects of Large Research, Development, and Innovations Infrastructures'' (CESNET LM2015042), is greatly appreciated ({\tt https://www.metacentrum.cz/en/}) The authors thanks Dr. V. Morandi and Dr. M. Christian for graphene foam SEM image and useful discussions.
\section{Motivation} The ability to compare data items is perhaps the most fundamental operation underlying all of computing. In many areas of computer science it does not pose much difficulty: one can use Hamming distance to compare binary patterns, edit distance to compare text files, Euclidean distance to compare vectors, etc. The unique challenge of computer vision is that even this seemingly simple task of comparing visual patterns remains a wide-open problem. Not only are visual patterns very high-dimensional and highly correlated, but, the very notion of visual similarity is often subjective, aiming to mimic human visual perception. For instance, in image compression, the goal is for the compressed image to be indistinguishable from the original by a human observer, irrespective of the fact that their pixel representations might be very different. Classic per-pixel measures, such as $\ell_2$ Euclidean distance, commonly used for regression problems, or the related Peak Signal-to-Noise Ratio (PSNR), are insufficient for assessing structured outputs such as images, as they assume pixel-wise independence. A well-known example is that blurring causes large perceptual but small $\ell_2$ change. What we would really like is a ``perceptual distance," which measures how similar are two images in a way that coincides with human judgment. This problem has been a longstanding goal, and there have been numerous perceptually motivated distance metrics proposed, such as SSIM~\cite{wang2004image}, MSSIM~\cite{wang2003multiscale}, FSIM~\cite{zhang2011fsim}, and HDR-VDP~\cite{mantiuk2011hdr}. However, constructing a perceptual metric is challenging, because human judgments of similarity (1) depend on high-order image structure \cite{wang2004image}, (2) are context-dependent \cite{Goodman1972,medin1993respects,markman2005nonintentional}, and (3) may not actually constitute a distance metric \cite{tversky1977features}. The crux of (2) is that there are many different ``senses of similarity" that we can simultaneously hold in mind: is a red circle more similar to a red square or to a blue circle? Directly fitting a function to human judgments may be intractable due the the context-dependent and pairwise nature of the judgments (which compare the similarity between \textit{two} images). Indeed, we show in this paper a negative result where this approach fails to generalize, even when trained on a large-scale dataset containing many distortion types. Instead, might there be a way to learn a notion of perceptual similarity without directly training for it? The computer vision community has discovered that internal activations of deep convolutional networks, though trained on a high-level image classification task, are often surprisingly useful as a representational space for a much wider variety of tasks. For example, features from the VGG architecture~\cite{simonyan2014very} have been used on tasks such as neural style transfer~\cite{gatys2016image}, image superresolution~\cite{johnson2016perceptual}, and conditional image synthesis~\cite{dosovitskiy2016generating,chen2017photographic}. These methods measure distance in VGG feature space as a ``perceptual loss" for image regression problems~\cite{johnson2016perceptual,dosovitskiy2016generating}. But how well do these ``perceptual losses'' actually correspond to human visual perception? How do they compare to traditional perceptual image evaluation metrics? Does the network architecture matter? Does it have to be trained on the ImageNet classification task, or would other tasks work just as well? Do the networks need to be trained at all? \subfile{tables/dataset_comparison} In this paper, we evaluate these questions on a new large-scale database of human judgments, and arrive at several surprising conclusions. We find that internal activations of networks trained for high-level classification tasks, even across network architectures~\cite{iandola2016squeezenet,krizhevsky2012imagenet,simonyan2014very} and no further calibration, do indeed correspond to human perceptual judgments. In fact, they correspond far better than the commonly used metrics like SSIM and FSIM~\cite{wang2004image, zhang2011fsim}, which were not designed to handle situations where spatial ambiguities are a factor~\cite{sampat2009complex}. Furthermore, the best performing self-supervised networks, including BiGANs~\cite{donahue2016adversarial}, cross-channel prediction~\cite{zhang2017split}, and puzzle solving~\cite{noroozi2016unsupervised} perform just as well at this task, even without the benefit of human-labeled training data. Even a simple unsupervised network initialization with stacked k-means~\cite{krahenbuhl2015data} beats the classic metrics by a large margin! This illustrates an \textit{emergent property} shared across networks, even across architectures and training signals. Importantly, however, having \textit{some} training signal appears crucial -- a randomly initialized network achieves much lower performance. Our study is based on a newly collected perceptual similarity dataset, using a large set of distortions and real algorithm outputs. It contains both traditional distortions, such as contrast and saturation adjustments, noise patterns, filtering, and spatial warping operations, and CNN-based algorithm outputs, such as autoencoding, denoising, and colorization, produced by a variety of architectures and losses. Our dataset is richer and more varied than previous datasets of this kind~\cite{ponomarenko2015image}. We also collect judgments on outputs from real algorithms for the tasks of superresolution, frame interpolation, and image deblurring, which is especially important as these are the real-world use cases for a perceptual metric. We show that our data can be used to ``calibrate" existing networks, by learning a simple linear scaling of layer activations, to better match low-level human judgments. Our results are consistent with the hypothesis that perceptual similarity is not a special function all of its own, but rather a {\em consequence} of visual representations tuned to be predictive about important structure in the world. Representations that are effective at semantic prediction tasks are also representations in which Euclidean distance is highly predictive of perceptual similarity judgments. Our contributions are as follows: \begin{itemize}[noitemsep,nolistsep] \item We introduce a large-scale, highly varied, perceptual similarity dataset, containing 484k human judgments. Our dataset not only includes parameterized distortions, but also real algorithm outputs. We also collect judgments on a different perceptual test, just noticeable differences (JND). \item We show that deep features, trained on supervised, self-supervised, and unsupervised objectives alike, model low-level perceptual similarity surprisingly well, outperforming previous, widely-used metrics. \item We demonstrate that network architecture alone does not account for the performance: untrained nets achieve much lower performance. \item With our data, we can improve performance by ``calibrating" feature responses from a pre-trained network. \end{itemize} \paragraph{Prior work on datasets} In order to evaluate existing similarity measures, a number of datasets have been proposed. Some of the most popular are the LIVE~\cite{sheikh2006statistical}, TID2008~\cite{ponomarenko2009tid2008}, CSIQ~\cite{larson2010most}, and TID2013~\cite{ponomarenko2015image} datasets. These datasets are referred to Full-Reference Image Quality Assessment (FR-IQA) datasets and have served as the de-facto baselines for development and evaluation of similarity metrics. A related line of work is on No-Reference Image Quality Assessment (NR-IQA), such as AVA~\cite{murray2012ava} and LIVE In the Wild~\cite{ghadiyaram2016massive}. These datasets investigate the ``quality" of individual images by themselves, without a reference image. We collect a new dataset that is complementary to these: it contains a substantially larger number of distortions, including some from newer, deep network based outputs, as well as geometric distortions. Our dataset is focused on perceptual similarity, rather than quality assessment. Additionally, it is collected on patches as opposed to full images, in the wild, with a different experimental design (more details in Sec~\ref{sec:methods}). \paragraph{Prior work on deep networks and human judgments} Recently, advances in DNNs have motivated investigation of applications in the context of visual similarity and image quality assessment. Kim and Lee~\cite{kim2017deep} use a CNN to predict visual similarity by training on low-level differences. Concurrent work by Talebi and Milanfar~\cite{talebi2017learned,talebi2018nima} train a deep network in the context of NR-IQA for image aesthetics. Gao et al.~\cite{gao2017deepsim} and Amirshahi et al.~\cite{ali2017image} propose techniques involving leveraging internal activations of deep networks (VGG and AlexNet, respectively) along with additional multiscale post-processing. In this work, we conduct a more in-depth study across different architectures, training signals, on a new, large scale, highly-varied dataset. Recently, Berardino et al.~\cite{berardino2017eigen} train networks on perceptual similarity, and importantly, assess the ability of deep networks to make predictions on a \textit{separate} task -- predicting most and least perceptually-noticeable directions of distortion. Similarly, we not only assess image patch similarity on parameterized distortions, but also test generalization to real algorithms, as well as generalization to a separate perceptual task -- just noticeable differences. \section{Berkeley-Adobe Perceptual Patch Similarity (BAPPS) Dataset} \label{sec:methods} To evaluate the performance of different perceptual metrics, we collect a large-scale highly diverse dataset of perceptual judgments using two approaches. Our main data collection employs a two alternative forced choice (2AFC) test, that asks which of two distortions is more similar to a reference. This is validated by a second experiment where we perform a just noticeable difference (JND) test, which asks whether two patches -- one reference and one distorted -- are the same or different. These judgments are collected over a wide space of distortions and real algorithm outputs. \subfile{tables/pert} \subsection{Distortions} \paragraph{Traditional distortions} We create a set of ``traditional" distortions consisting of common operations performed on the input patches, listed in Table~\ref{tab:distortions} (left). In general, we use photometric distortions, random noise, blurring, spatial shifts and corruptions, and compression artifacts. We show qualitative examples of our traditional distortions in Figure \ref{fig:pert}. The severity of each perturbation is parameterized - for example, for Gaussian blur, the kernel width determines the amount of corruption applied to the input image. We also compose pairs of distortions sequentially to increase the overall space of possible distortions. In total, we have 20 distortions and 308 sequentially composed distortions. \paragraph{CNN-based distortions} To more closely simulate the space of artifacts that can arise from deep-learning based methods, we create a set of distortions created by neural networks. We simulate possible algorithm outputs by exploring a variety of tasks, architectures, and losses, as shown in Table \ref{tab:distortions} (right). Such tasks include autoencoding, denoising, colorization, and superresolution. All of these tasks can be achieved by applying the appropriate corruption to the input. In total, we generated 96 ``denoising autoencoders" and use these as CNN-based distortion functions. We train each of these networks on the 1.3M ImageNet dataset~\cite{russakovsky2015imagenet} for 1 epoch. The goal of each network is not to solve the task per se, but rather to explore common artifacts that plague the outputs of deep learning based methods. \paragraph{Distorted image patches from real algorithms} The true test of an image assessment algorithm is on real problems and real algorithms. We gather perceptual judgments using such outputs. Data on real algorithms is more limited, as each application will have their own unique properties. For example, different colorization methods will not show much structural variation, but will be prone to effects such as color bleeding and color variation. On the other hand, superresolution will not have color ambiguity, but may see larger structural changes from algorithm to algorithm. \paragraph{Superresolution} We evaluate results from the 2017 NTIRE workshop~\cite{Agustsson_2017_CVPR_Workshops}. We use 3 tracks from the workshop -- $\times2$, $\times3$, $\times4$ upsampling rates using ``unknown" downsampling to create the input images. Each track had approximately 20 algorithm submissions. We also evaluate several additional methods, including bicubic upsampling, and four of the top performing deep superresolution methods~\cite{kim2016accurate,wang2015deep,ledig2016photo,sajjadi2016enhancenet}. A common qualitative way of presenting superresolution results is zooming into specific patches and comparing differences. As such, we sample random $64\times 64$ triplets from random locations of images in the Div2K~\cite{Agustsson_2017_CVPR_Workshops} dataset -- the ground truth high-resolution image, along with two algorithm outputs. \paragraph{Frame interpolation} We sample patches from different frame interpolation algorithms, including three variants of flow-based interpolation~\cite{liu2009beyond}, CNN-based interpolation~\cite{Niklaus_ICCV_2017}, and phase-based interpolation~\cite{meyer2015phase} on the Davis Middleburry dataset~\cite{scharstein2002taxonomy}. Because artifacts arising from frame interpolation may occur at different scales, we randomly rescale the image before sampling a patch triplet. \paragraph{Video deblurring} We sample from the video deblurring dataset~\cite{Su_2017_CVPR}, along with deblurring outputs from Photoshop Shake Reduction, Weighted Fourier Aggregation~\cite{delbracio2015hand}, and three variants of a deep video deblurring method~\cite{Su_2017_CVPR}. \paragraph{Colorization} We sample patches using random scales on the colorization task, on images from the ImageNet dataset~\cite{russakovsky2015imagenet}. The algorithms are from pix2pix~\cite{isola2015learning}, Larsson et al.~\cite{larsson2016learning}, and variants from Zhang et al.~\cite{zhang2016colorful}. \subsection{Psychophysical Similarity Measurements} \paragraph{2AFC similarity judgments} We randomly select an image patch $x$ and apply two distortions to produce patches $x_0, x_1$. We then ask a human which is closer to the original patch $x$, and record response $h \in \{0,1\}$. On average, people spent approximately 3 seconds per judgment. Let $\mathcal{T}$ denote our dataset of patch triplets $(x, x_0, x_1, h)$. A comparison between our dataset and previous datasets is shown in Table~\ref{tab:dataset_comp}. Previous datasets have focused on collecting large numbers of human judgments for a few images and distortion types. For example, the largest dataset, TID2013~\cite{ponomarenko2015image}, has 500k judgments on 3000 distortions (from 25 input images with 24 distortions types, each sampled at 5 levels). We provide a complementary dataset that focuses instead on a large number of distortions types. In, addition, we collect judgments on a large number of $64\times 64$ patches rather than a small number of images. There are three reasons for this. First, the space of full images is extremely large, which makes it much harder to cover a reasonable portion of the domain with judgments (even $64\times 64$ color patches represent an intractable 12k-dimensional space). Second, by choosing a smaller patch size, we focus on lower-level aspects of similarity, to mitigate the effect of differing ``respects of similarity" that may be influenced by high-level semantics \cite{medin1993respects}. Finally, modern methods for image synthesis train deep networks with patch-based losses (implemented as convolutions)~\cite{chen2017photographic,isola2017image}. Our dataset consists of over 161k patches, derived from the MIT-Adobe 5k dataset~\cite{fivek} (5000 uncompressed images) for training, and the RAISE1k dataset~\cite{dang2015raise} for validation. To enable large-scale collection, our data is collected ``in-the-wild" on Amazon Mechanical Turk, as opposed to a controlled lab setting. Crump et al.~\cite{crump2013evaluating} show that AMT can be reliably used to replicate many psychophysics studies, despite the inability to control all environmental factors. We ask for 2 judgments per example in our ``train" set and 5 judgments in our ``val" sets. Asking for fewer judgments enables us to explore a larger set of image patches and distortions. We add sentinels which consist of pairs of patches with obvious deformations, e.g., a large amount of Gaussian noise vs a small amount of Gaussian noise. Approximately $~90\%$ of Turkers were able to correctly pass at least $93\%$ of the sentinels (14 of 15), indicating that they understood the task and were paying attention. We choose to use a larger number of distortions than prior datasets. \subfile{tables/dataset_split} \paragraph{Just noticeable differences (JND)} A potential shortcoming of the 2AFC task is that it is ``cognitively penetrable," in the sense that participants can consciously choose which respects of similarity they will choose to focus on in completing the task \cite{medin1993respects}, which introduces subjectivity into the judgments. To validate that the judgments actually reflected something objective and meaningful, we also collected user judgments of ``just noticeable differences" (JNDs). We show a reference image, followed by a randomly distorted image, and ask a human if the images are the same or different. The two image patches are shown for 1 second each, with a 250 ms gap in between. Two images which look similar may be easily confused, and a good perceptual metric will be able to order pairs from most to least confusable. JND tests like this may be considered less subjective, since there is a single correct answer for each judgment, and participants are presumed to be aware of what correct behavior entails. We gather 3 JND observations for each of the 4.8k patches in our traditional and CNN-based validation sets. Each subject is shown 160 pairs, along with 40 sentinels (32 identical and 8 with large Gaussian noise distortion applied). We also provide a short training period of 10 pairs which contain 4 ``same" pairs, 1 obviously different pair, and 5 ``different" pairs generated by our distortions. We chose to do this in order to prime the users towards expecting approximately $40\%$ of the patch pairs to be identical. Indeed, $36.4\%$ of the pairs were marked ``same" ($70.4\%$ of sentinels and $27.9\%$ of test pairs). \begin{figure*} \centering \includegraphics[width=1.0\linewidth]{imgs/network.pdf} \vspace{-6mm} \caption{\textbf{Computing distance from a network} (Left) To compute a distance $d_0$ between two patches, $x$, $x_0$, given a network $\mathcal{F}$, we first compute deep embeddings, normalize the activations in the channel dimension, scale each channel by vector $w$, and take the $\ell_2$ distance. We then average across spatial dimension and across all layers. (Right) A small network $\mathcal{G}$ is trained to predict perceptual judgment $h$ from distance pair ($d_0,d_1$).} \label{fig:network} \vspace{-1mm} \end{figure*} \subfile{tables/quant} \section{Deep Feature Spaces} We evaluate feature distances in different networks. For a given convolutional layer, we compute cosine distance (in the channel dimension) and average across spatial dimensions and layers of the network. We also discuss how to tune an existing network on our data. \paragraph{Network architectures} We evaluate the SqueezeNet~\cite{iandola2016squeezenet}, AlexNet~\cite{krizhevsky2012imagenet}, and VGG~\cite{simonyan2014very} architectures. We use 5 \texttt{conv} layers from the VGG network, which has become the de facto standard for image generation tasks~\cite{gatys2016image,dosovitskiy2016generating,chen2017photographic}. We also compare against the shallower AlexNet network, which may more closely match the architecture of the human visual cortex~\cite{yamins2016using}. We use the \texttt{conv1}-\texttt{conv5} layers from~\cite{krizhevsky2014one}. Finally, the SqueezeNet architecture was designed to be extremely lightweight ($2.8$ MB) in size, with similar classification performance to AlexNet. We use the first \texttt{conv} layer and some subsequent ``\texttt{fire}" modules. We additionally evaluate self-supervised methods, including puzzle-solving~\cite{noroozi2016unsupervised}, cross-channel prediction~\cite{zhang2016colorful,zhang2017split}, learning from video~\cite{pathak2017learning}, and generative modeling~\cite{donahue2016adversarial}. We use publicly available networks from these and other methods, which use variants of AlexNet~\cite{krizhevsky2012imagenet}. \paragraph{Network activations to distance} Figure \ref{fig:network} (left) and Equation~\ref{eqn:dist} illustrate how we obtain the distance between reference and distorted patches ${x,x_0}$ with network $\mathcal{F}$. We extract feature stack from $L$ layers and unit-normalize in the channel dimension, which we designate as $\hat{y}^l, \hat{y}_0^l \in \mathds{R}^{H_l\times W_l\times C_l}$ for layer $l$. We scale the activations channel-wise by vector $w^l \in \mathds{R}^{C_l}$ and compute the $\ell_2$ distance. Finally, we average spatially and sum channel-wise. Note that using $w_l=1 \forall l$ is equivalent to computing cosine distance. \vspace{-4mm} \begin{equation} d(x,x_0) = \sum_l \dfrac{1}{H_l W_l} \sum_{h,w} || w_l \odot ( \hat{y}_{hw}^l - \hat{y}_{0hw}^l ) ||_2^2 \label{eqn:dist} \end{equation} \vspace{-2mm} \paragraph{Training on our data} We consider a few variants for training with our perceptual judgments: \tbfit{lin}, \tbfit{tune}, and \tbfit{scratch}. For the \tbfit{lin} configuration, we keep pre-trained network weights $\mathcal{F}$ fixed, and learn linear weights $w$ on top. This constitutes a ``perceptual calibration" of a few parameters in an existing feature space. For example, for the VGG network, 1472 parameters are learned. For the \tbfit{tune} configuration, we initialize from a pre-trained classification model, and allow all the weights for network $\mathcal{F}$ to be fine-tuned. Finally, for \tbfit{scratch}, we initialize the network from random Gaussian weights and train it entirely on our judgments. Overall, we refer to these as variants of our proposed \textbf{Learned Perceptual Image Patch Similarity (LPIPS)} metric. We illustrate the training loss function in Figure~\ref{fig:network} (right) and describe it further in the appendix. \section{Experiments} Results on our validation sets are shown in Figure~\ref{fig:quant}. We first evaluate how well our metrics and networks work. All validation sets contain 5 pairwise judgments for each triplet. Because this is an inherently noisy process, we compute agreement of an algorithm with \textit{all} of the judgments. For example, if there are 4 preferences for $x_0$ and 1 for $x_1$, an algorithm which predicts the more popular choice $x_0$ would receive $80\%$ credit. If a given example is scored with fraction $p$ humans in one direction and $1-p$ in the other, a human would achieve score $p^2+(1-p)^2$ on expectation. \subsection{Evaluations} \begin{figure}[t] \centering \includegraphics[width=1.\linewidth]{imgs/trip_vs_jnd.pdf} \vspace{-12mm} \caption{\textbf{Correlating Perceptual Tests.} We show performance across methods, including unsupervised~\cite{krahenbuhl2015data}, self-supervised~\cite{agrawal2015learning,pathakCVPR16context,doersch2015unsupervised,wang2015unsupervised,zhang2016colorful,owens2016visually,pathak2017learning,noroozi2016unsupervised,donahue2016adversarial,zhang2017split}, supervised~\cite{krizhevsky2014one,simonyan2014very,iandola2016squeezenet}, and our perceptually-learned metrics (LPIPS). The scores are on our 2AFC and JND tests, averaged across traditional and CNN-based distortions.} \label{fig:trip_vs_jnd} \vspace{-2mm} \end{figure} \paragraph{How well do low-level metrics and classification networks perform?} Figure~\ref{fig:quant} shows the performance of various low-level metrics (in red), deep networks, and human ceiling (in black). The scores are averaged across the 2 distortion test sets (traditional+CNN-based) in Figure~\ref{fig:quant} (left), and 4 real algorithm benchmarks (superresolution, frame interpolation, video deblurring, colorization) in Figure~\ref{fig:quant} (right). All scores within each test set are shown in the appendix. Averaged across all 6 test sets, humans are $73.9\%$ consistent. Interestingly, the supervised networks perform at about the same level to each other, at $68.6\%$, $68.9\%$, and $67.0\%$, even across variation in model sizes -- SqueezeNet ($2.8$ MB), AlexNet ($9.1$ MB), and VGG ($58.9$ MB) (only convolutional layers are counted). They all perform better than traditional metrics $\ell_2$, SSIM, and FSIM at $63.2\%$, $63.1\%$, $63.8\%$, respectively. Despite its common use, SSIM was not designed for situations where geometric distortion is a large factor~\cite{sampat2009complex}. \paragraph{Does the network have to be trained on classification?} In Figure~\ref{fig:quant}, we show model performance across a variety of unsupervised and self-supervised tasks, shown in green -- generative modeling with BiGANs~\cite{donahue2016adversarial}, solving puzzles~\cite{noroozi2016unsupervised}, cross-channel prediction~\cite{zhang2017split}, and segmenting foreground objects from video~\cite{pathak2017learning}. These self-supervised tasks perform on par with classification networks. This indicates that tasks across a large spectrum can induce representations which transfer well to perceptual distances. Also, the performance of the stacked k-means method~\cite{krahenbuhl2015data}, shown in yellow, outperforms low-level metrics. Random networks, shown in orange, with weights drawn from a Gaussian, do not yield much improvement. This indicates that the combination of network structure, along with orienting filters in directions where data is more dense, can better correlate to perceptual judgments. \subfile{tables/correlation} In Table~\ref{fig:trip_vs_jnd}, we explore how well our perceptual task correlates to semantic tasks on the PASCAL dataset~\cite{pascal-voc-2007}, using results summarized in~\cite{zhang2017split}, including additional self-supervised methods~\cite{agrawal2015learning,pathakCVPR16context,doersch2015unsupervised,wang2015unsupervised,zhang2016colorful,owens2016visually}. We compute the correlation coefficient between each task (perceptual or semantic) across different methods. The correlation from our 2AFC distortion preference task to classification and detection is .640 and .363, respectively. Interestingly, this is similar to the correlation between the classification and detection tasks (.429), even though both are considered ``high-level" semantic tasks, and our perceptual task is ``low-level." \begin{figure*} \centering \begin{subfigure}{1.\textwidth} \includegraphics[width=1.\linewidth]{imgs/fig_comp_low.pdf} \vspace{-5mm} \end{subfigure} \caption{\textbf{Qualitative comparisons on distortions.} We show qualitative comparison on traditional distortions, using the SSIM~\cite{wang2004image} metric and BiGAN network~\cite{donahue2016adversarial}. We show examples where the metrics agree and disagree. A primary difference is that deep embeddings appear to be more sensitive to blur. Please see the appendix for additional examples.} \label{fig:qual_comp} \vspace{-4mm} \end{figure*} \paragraph{Do metrics correlate across different perceptual tasks?} We test if training for the 2AFC distortion preference test corresponds with another perceptual task, the JND test. We order patch pairs by ascending order by a given metric, and compute precision-recall on our CNN-based distortions -- for a good metric, patches which are close together are more likely to be confused for being the same. We compute area under the curve, known as mAP~\cite{pascal-voc-2007}. The 2AFC distortion preference test has high correlation to JND: $\rho=.928$ when averaging the results across distortion types. Figure~\ref{fig:trip_vs_jnd} shows how different methods perform under each perceptual test. This indicates that 2AFC generalizes to another perceptual test and is giving us signal regarding human judgments. \paragraph{Can we train a metric on traditional and CNN-based distortions?} In Figure~\ref{fig:quant}, we show performance using our \tbfit{lin}, \tbfit{scratch}, and \tbfit{tune} configurations, shown in purple, pink, and brown, respectively. When validating on the traditional and CNN-based distortions (Figure~\ref{fig:quant}(a)), we see improvements. Allowing the network to tune all the way through (brown) achieves higher performance than simply learning linear weights (purple) or training from scratch (pink). The higher capacity network VGG also performs better than the lower capacity SqueezeNet and AlexNet architectures. These results verify that networks can indeed learn from perceptual judgments. \paragraph{Does training on traditional and CNN-based distortions transfer to real-world scenarios?} We are more interested in how performance generalizes to \textit{real-world algorithms}, shown in Figure~\ref{fig:quant}(b). The SqueezeNet, AlexNet, and VGG architectures start at $64.0\%$, $65.0\%$, and $62.6\%$, respectively. Learning a linear classifier (purple) improves performance for all networks. Across the 3 networks and 4 real-algorithm tasks, 11 of the 12 scores improved, indicating that ``calibrating" activations on a pre-existing representation using our data is a safe way to achieve a small boost in performance ($1.1\%$, $0.3\%$, and $1.5\%$, respectively). Training a network from scratch (pink) yields slightly lower performance for AlexNet, and slightly higher performance for VGG than linear calibration. However, these still outperform low-level metrics. This indicates that the distortions we have expressed do project onto our test-time tasks of judging real algorithms. Interestingly, starting with a pre-trained network and tuning throughout \textit{lowers} transfer performance. This is an interesting negative result, as training for a low-level perceptual task directly does not necessarily perform as well as transferring a representation trained for the high-level task. \paragraph{Where do deep metrics and low-level metrics disagree?} In Figure~\ref{fig:qual_comp}, we show a qualitative comparison across our traditional distortions for a deep method, BiGANs~\cite{donahue2016adversarial}, and a representation traditional perceptual method, SSIM~\cite{wang2004image}. Pairs which BiGAN perceives to be far but SSIM to be close generally contain some blur. BiGAN tends to perceive correlated noise patterns to be a smaller distortion than SSIM. \section{Conclusions} \vspace{-1mm} Our results indicate that networks trained to solve challenging visual prediction and modeling tasks end up learning a representation of the world that correlates well with perceptual judgments. A similar story has recently emerged in the representation learning literature: networks trained on self-supervised and unsupervised objectives end up learning a representation that is also effective at semantic tasks~\cite{doersch2015unsupervised}. Interestingly, recent findings in neuroscience make much the same point: representations trained on computer vision tasks also end up being effective models of neural activity in macaque visual cortex~\cite{yamins2016using}. Moreover (and roughly speaking), the stronger the representation is at the computer vision task, the stronger it is as a model of cortical activity. Our paper makes a similar finding: the stronger a feature set is at classification and detection, the stronger it is as a model of perceptual similarity judgments, as suggested in Table~\ref{tab:corr}. Together, these results suggest that a good feature is a good feature. Features that are good at semantic tasks are also good at self-supervised and unsupervised tasks, and also provide good models of both human perceptual behavior and macaque neural activity. This last point aligns with the ``rational analysis" explanation of visual cognition~\cite{anderson1990adaptive}, suggesting that the idiosyncrasies of biological perception arise as a consequence of a rational agent attempting to solve natural tasks. Further refining the degree to which this is true is an important question for future research. \section*{Appendix} We show full quantitative details in Appendix \ref{sec:quant}. We also discuss training details in Appendix \ref{sec:train}. Finally, we show results on the TID2013 dataset~\cite{ponomarenko2015image} in Appendix \ref{sec:tid}. \section{Quantitative Results} \label{sec:quant} \begin{figure*}[t] \centering \begin{tabular}{*{2}{c@{\hspace{3px}}}} \textbf{Distortions (Traditional)} & \textbf{Distortions (CNN-Based)} \\ \includegraphics[width=.5\linewidth]{imgs/3_traditional.pdf} & \includegraphics[width=.5\linewidth]{imgs/4_cnn-based.pdf} \\ \end{tabular} \vspace{-10mm} \caption{\textbf{Individual results} (left) traditional distortions (right) CNN-based distortions} \label{fig:quant1} \end{figure*} \begin{figure*}[t] \centering \begin{tabular}{*{2}{c@{\hspace{3px}}}} \textbf{Real Algorithms (Superresolution)} & \textbf{Real Algorithms (Frame Interpolation)} \\ \includegraphics[width=.5\linewidth]{imgs/5_superres.pdf} & \includegraphics[width=.5\linewidth]{imgs/8_frame_interp.pdf} \\ \end{tabular} \vspace{-10mm} \caption{\textbf{Individual results} (left) superresolution (right) frame interpolation} \label{fig:quant2} \end{figure*} \begin{figure*}[h!] \centering \begin{tabular}{*{2}{c@{\hspace{3px}}}} \textbf{Real Algorithms (Video Deblurring)} & \textbf{Real Algorithms (Colorization)} \\ \includegraphics[width=.5\linewidth]{imgs/6_deblur.pdf} & \includegraphics[width=.5\linewidth]{imgs/7_color.pdf} \\ \end{tabular} \vspace{-10mm} \caption{\textbf{Individual results} (left) video deblurring (right) colorization} \label{fig:quant3} \end{figure*} \subfile{tables/results} \begin{figure*} \centering \begin{subfigure}{1.\textwidth} \centering \includegraphics[width=1.\linewidth]{imgs/weights_subplotted_alex_ones.pdf} \vspace{-6mm} \caption{\textbf{Unlearned weights for AlexNet model (cosine distance)}} \label{fig:weights_ones} \end{subfigure} \begin{subfigure}{1.\textwidth} \centering \includegraphics[width=1.\linewidth]{imgs/weights_subplotted_alex.pdf} \vspace{-6mm} \caption{\textbf{Learned weights from \textit{Alex--lin} model}} \label{fig:weights_learned} \end{subfigure} \begin{subfigure}{1.\textwidth} \centering \includegraphics[width=1.\linewidth]{imgs/weights_subplotted_vgg.pdf} \vspace{-6mm} \caption{\textbf{Learned weights from \textit{VGG--lin} model}} \label{fig:weights_learned_vgg} \end{subfigure} \begin{subfigure}{1.\textwidth} \centering \includegraphics[width=1.\linewidth]{imgs/weights_subplotted_squeeze.pdf} \vspace{-6mm} \caption{\textbf{Learned weights from \textit{Squeeze--lin} model}} \label{fig:weights_learned_squeeze} \end{subfigure} \vspace{-2mm} \caption{\textbf{Learned linear weights by layer.} (a) Unlearned weights correspond to using weighting 1 for each channel in each layer, which results in computing cosine distance. (b) We show the learned weights from each layer of our \textit{Alex--lin} model. This is the $w$ term in Figure~\ref{fig:network}. Each subplot shows the channel weights from each layer, sorted in descending order. The x-axis shows the channel number, and y-axis shows the weight. Weights are restricted to be non-negative, as image patches should not have negative distance. (c,d) Same as (b), but with the \textit{VGG--lin} and \textit{Squeeze--lin} models.} \label{fig:weights} \vspace{-4mm} \end{figure*} \begin{figure*} \centering \begin{subfigure}{1.\textwidth} \includegraphics[width=1.\linewidth]{imgs/fig_comp_high.pdf} \end{subfigure} \vspace{-2mm} \caption{\textbf{Qualitative comparisons on distortions.} We show qualitative comparison on CNN-based distortions, using the SSIM~\cite{wang2004image} metric and BiGAN network~\cite{donahue2016adversarial}. We show examples where both agree the patches are closer or far, and examples where the metrics disagree. A primary difference is that deep embeddings appear to be more sensitive to blur. Please see the appendix for additional examples.} \label{fig:qual_comp} \vspace{-4mm} \end{figure*} In Table~\ref{tab:res_quant}, we show full quantitative results across all validation sets and considered metrics, including low-level metrics, along with random, unsupervised, self-supervised, supervised, and perceptually-learned networks. In Figures~\ref{fig:quant1}, ~\ref{fig:quant2}, ~\ref{fig:quant3}, we plot performance in individual validation sets. Figure~\ref{fig:quant1} shows our traditional and CNN-based distortions, and Figures~\ref{fig:quant2},~\ref{fig:quant3} show results on real algorithm applications individually. \paragraph{Human performance} If humans chose patches \{$x_1$,$x_0$\} with fraction \{$p$,$1-p$\}, the theoretical maximum for an oracle is $\max(p,1-p)$. However, human performance is lower. If an agent chooses them with probability \{$q$,$1-q$\}, the agent will agree with $qp + (1-q)(1-p)$ humans on expectation. With a human agent, $q=p$, the expected human score is $p^2 + (1-p)^2$. \paragraph{Linearly calibrating networks} Learning linear weights on top of the \tbfit{Alex} model achieves state-of-the-art results on the real algorithms test set. The \tbfit{linear} models have a learned linear layer on top of each channel, whereas the out-of-the-box versions weight each channel equally. In Figure~\ref{fig:weights_learned}, we show the learned weights for the \tbfit{Alex --frozen} model. The \texttt{conv1-5} layers contain 64, 192, 384, 256, and 256 channels, respectively, for a total of 1152 weights. For each layer, \texttt{conv1-5}, $79.7\%$, $71.4\%$, $56.8\%$, $46.5\%$, $27.7\%$, respectively, of the weights are zero. This means that a majority of the \texttt{conv1} and \texttt{conv2} units are ignored, and almost all of the \texttt{conv5} units are used. Overall, about half of the units are ignored. Taking the cosine distance is equivalent to setting all weights to 1 (Figure~\ref{fig:weights_ones}). \paragraph{Data quantity for training models on distortions} The performance of the validation set on our distortions ($80.6\%$ and $81.4\%$ for \tbfit{Alex -- tune} and \tbfit{VGG -- tune}, respectively), is almost equal to human performance of $82.6\%$. This indicates that our training set size of 150k patch pairs and 300k judgments is nearly large enough to fully explore the traditional and CNN-based distortions which we defined. However, there is a small gap between the \tbfit{tune} and \tbfit{scratch} models ($0.4\%$ and $0.6\%$ for \tbfit{Alex} and \tbfit{VGG}, respectively). \section{Model Training Details} \label{sec:train} We illustrate the loss function for training the network in Figure~\ref{fig:network} (right) and describe it further in the supplementary material. Given two distances, $(d_0, d_1)$, we train a small network $\mathcal{G}$ on top to map to a score $\hat{h}\in(0,1)$. The architecture uses two 32-channel \texttt{FC-ReLU} layers, followed by a 1-channel \texttt{FC} layer and a sigmoid. Our final loss function is shown in Equation~\ref{eqn:loss}. \begin{equation} \begin{split} \mathcal{L}(x,x_0,x_1,h)= - h \log \mathcal{G}(d(x,x_0),d(x,x_1)) \\ - (1-h) \log (1-\mathcal{G}(d(x,x_0),d(x,x_1))) \end{split} \label{eqn:loss} \end{equation} In preliminary experiments, we also tried a ranking loss, which attempts to force a constant margin between patch pairs $d(x,x_0)$ and $d(x,x_1)$. We found that using a learned network, rather than enforcing the same margin in all cases, worked better. Here, we provide some additional details on model training for our networks trained on distortions. We train with 5 epochs at initial learning rate $10^{-4}$, 5 epochs with linear decay, and batch size 50. Each training patch pair is judged 2 times, and the judgments are grouped together. If, for example, the two judges are split, then the classification target ($h$ in Figure 3) will be set at 0.5. We enforce non-negative weightings on the linear layer $w$, since larger distances in a certain feature should not result in two patches becoming closer in the distance metric. This is done by projecting the weights into the constraint set at every iteration. In other words, we check for any negative weights, and force them to be 0. The project was implemented using \texttt{PyTorch}~\cite{paszkepytorch}. \section{TID2013 Dataset} \label{sec:tid} In Figure~\ref{fig:tid}, we compute scores on the TID2013~\cite{ponomarenko2015image} dataset. We test the images at a different resolutions, using $\{128, 192, 256, 384, 512\}$ for the smaller dimension. We note that even averaging across all scales and layers, with no further calibration, the AlexNet~\cite{krizhevsky2014one} architecture gives scores near the highest metric, FSIMc~\cite{zhang2011fsim}. On our traditional perturbations, the FSIMc metric achieves $61.4\%$, close to $\ell_2$ at $59.9\%$, while the deep classification networks we tested achieved $73.3\%$, $70.6\%$, and $70.1\%$, respectively. The difference is likely due to the inclusion of geometric distortions in our dataset. Despite their frequent use in such situations, metrics such as SSIM were not designed to handle geometric distortions~\cite{sampat2009complex}. \section{Changelog} \label{sec:change} \paragraph{v1} initial preprint release \paragraph{v2} CVPR camera ready; moved TID results (Appendix~\ref{sec:tid}), SSIM vs BiGAN (Figure~\ref{fig:qual_comp}), and some training details into the Appendix to fit into 8 page limit; clarified that SSIM was not designed to handle geometric distortions~\cite{sampat2009complex} and clarified that our dataset is a perceptual similarity dataset (as opposed to an IQA dataset); added linear weights for \textit{Squeeze-lin} and \textit{VGG-lin} architectures in Figure~\ref{fig:weights}; miscellaneous small edits to text.
\section{Introduction} The explosion of available high-throughput technological pipelines in the biological and medical sciences over the past 20 years has opened up many new avenues of research that were previously unthinkable. The need to understand the role of power in the era of ``omics'' studies cannot be overstated. As a case in point, consider the promise and pitfalls of RNA expression micro-arrays. One of the take away themes is that new technologies such as this one enjoy initial exuberance and early victories \citep{AlizadehA:2000}, followed by calls for caution from epidemiologists and statisticians \citep{IonnidisJPA:2005, BaggerlyKA:2009}. Some of the most constructive things gleaned from this journey, in hindsight, have been a thorough re-evaluation of what should constitute the ``bar for science''. More and more researchers are starting to realize that some of the blame for lack of reproducibility is owed to lack of power \citep{IonnidisJPA:2005}. Central to these renewed calls for scientific vetting has been the concept of multiple testing. Very early in the history of ``omics'' researchers realized that correction for multiple testing should be done and that the most commonly used method, Bonferroni correction, was by far too conservative for tens of thousands of simultaneous tests. Somewhat prophetically, half a decade before, \cite{BenjaminiY:1995} and colleagues introduced a new testing paradigm, that, in contrast to the Bonferroni procedure which controls the probability that one or more type I errors are committed, instead controls the proportion of false discoveries among the tests called significant. By now, use of the Benjamini-Hochberg (BH) false discovery rate (FDR) procedure for making statistical significance calls in multiple testing scenarios is widespread. \section{Definitions and Notation} Before describing the model of the data distribution, we need the following definition. \begin{definition} A family of pdf's, $\{f_{\nu}:\nu \geq 0\}$, has the \textit{monotone likelihood ratio} property if and only if \begin{equation} \nu' > \nu \mathrm{~implies~that~} f_{\nu'}/f_{\nu} \mathrm{~is~monotone~increasing}. \end{equation} A family of CDF's has the monotone likelihood ratio property if its members are absolutely continuous and the corresponding family of pdf's has the property. \end{definition} Now, consider $m$ simultaneous tests of hypotheses $i=1,2,\ldots,m$, each a test whether a location parameter is 0, ($H_{0,i}$) or non-zero ($H_{A,i}$). We start by supposing that an expected proportion, $0 < r < 1$, of the test statistics are distributed about non-zero location parameters. The test statistic distributions are modeled according to a mixture model, first introduced by \cite{StoreyJD:2002} and others \cite{BaldiP:2001, IbrahimJG:2002}. First, let $\{\xi_i\}_{i=1}^{m}$ be an i.i.d. Bernouli $\{0,1\}$ sequence, with success probability, $r$. Denote the binomially distributed sum, $M_m = \sum_{i=1}^m \xi_i$, which is the number of test statistics belonging to the non-zero location parameter population. For a sample of size $n$ replicate outcomes resulting in $m$ simultaneous tests, let $X_{i,n}$ be the $i^{th}$ test statistic. We assume that conditional upon $\xi_i$, that its CDF is of the form: \begin{equation} F_{X_{i,n}|\xi_i} = (1-\xi_i) F_{0, n} + \xi_i F_{A,n}. \end{equation} In the above, $F_{0,n}$ is the common distribution of all null distributed tests, and $F_{A,n}$ is the common distribution of all non-null distributed tests. We assume that $F_{0,n}$ is the ``minimal'' element of a class of CDF's, $\mathbb{F}_n = \{F_{\nu, n} : \nu \geq 0\}$, satisfying the monotone likelihood ratio principle and that $F_{A,n} = \sum_{\ell=1}^h s_{\ell} F_{\nu_{\ell}, n}$ is a finite mixture of elements $F_{\nu_{\ell}, n}\in \mathbb{F}_n$, including the possibility that the mixing proportions are degenerate at a single distribution. Note that since we will only consider only two-sided tests, our scope is solely focused on non-negative test statistics, $X_{i,n}$, since they represent the the absolute value of some intermediate quantity. We consider $X_{i,n}$ to be non-negative in the remainder of the paper. Let $\bar F$ denote the complementary CDF (cCDF), so that $\bar F_{0,n}(x) = \P\{ X_{i,n} > x \mid \xi_i=0\}$ and $\bar F_{A,n} = \P\{ X_{i,n} > x \mid \xi_i = 1\}$. We will for nearly the entire paper make the assumption of independent hypothesis tests. While the Benjamini-Hochberg false discovery rate procedure is not imune to departures from the assumption of independent tests, the effect of departures from independence (i) do not affect the expected false discovery fraction or expected true positive fraction (defined precisely below) and (ii) discrepencies which do result from such departures are seen in the distribution of the FDF and TPF and are caused by a reduced effective number of simultaneous tests. For these reasons, results obtained under the assumption of independent hypothesis tests are still of great utility. We return to this discussion in the final section. \subsection{Mixed distribution of the P-values} For $i=1,2,\ldots,m$, let $P_i = \bar F_{0,n}(X_{i,n})$ denote the two-sided nominal p-values corresponding to the test statistics, $X_{i,n}$, and let $P^m_{(i)}$ denote their order statistics. Notice that the nominal p-values, $P_i, i=1,2,\ldots,m$ are i.i.d. having mixed CDF $G(u) = \P\{ P_i \leq u \}$, \begin{equation} G(u) = (1-r) u + r \bar F_{A,n}(\bar F_{0,n}^{-1}(u))\,.\label{eqn:Gdefnd} \end{equation} As we shall see in the proofs of Theorems \ref{thm:Jom_convas}, \ref{thm:SoM_convas}, and \ref{thm:CLT}, below, the requirement that the family $\{F_{\nu, n}: \nu \geq 0 \}$ satisfies the monotone likelihood ratio principle guarantees that $G$ is concave. Next in the original unsorted list of nominal p-values, $\{P_i: i=1,2,\ldots,m\}$, let $\{P_{1,i}:i=1,2,\ldots, M_m\}$ be the subset of nominal p-values corresponding to test statistics from the non-central population, in the order that they occur in the original unsorted list, e.g., if $N_{m,i} = \min\{j:i=\sum_{\ell=1}^j \xi_{\ell}\}$ counts the number of non-centrally located statistics among the first $i$ in the original unsorted list, then $P_{1, i} = P_{_{N_{m,i}}}$. \subsection{Numbers of significant calls, true postives and false positives} The Benjamini and Hochberg (B-H) false discovery rate (FDR) procedure \citep{BenjaminiY:1995} provides a simultaneous test of all $m$ null hypotheses, that controls for multiplicity in a less conservative way than Bonferroni adjustment by changing the paradigm. Instead of controlling the probability that one or more null hypotheses is erroneously rejected, it controls the expected proportion of null hypotheses rejected that were true, or equivalently, the posterior probability that a test statistic has null location parameter given it was called significant. The algorithm is implemented by specifying a tolerable false discovery rate, $f$, and then finding the largest row number, $i$, for which the corresponding order statistic, $P^m_{(i)}$, is less than $i f/m$. The total number of test statistics in the rejection region, $J_m$, is given by the following expression: \begin{definition} \label{def:J} \begin{equation} J_m = \max\left\{ i : P^m_{(i)} \leq \frac{i f}{m} \right\}\label{eqn:Jdef}\,.\nonumber \end{equation} \end{definition} We will refer to $J_m$ as the number of \textit{positive calls} or \textit{discoveries} which is consistent with the terminology of Benjamini and Hochberg, and we call the ratio $J_m/m$ the \textit{positive call fraction}. Notice that expression \ref{eqn:Jdef} has the following alternate form: \begin{equation} J_m = \sum_{i=1}^m I\left\{ P_i \leq m^{-1} J_m \,f\right\}\label{eqn:JmsumExch} \end{equation} The number of positive calls partitions into \emph{true positve calls} and \emph{false positive calls} \begin{definition} \label{def:S} Let $S_m$ denote the \emph{number of true positive calls}: \begin{equation} S_m = \sum_{i=1}^m \xi_i \, I\left( P_i \leq m^{-1} J_m f \right)\,.\label{eqn:SmsumExch} \end{equation} \end{definition} \begin{definition} \label{def:T} Let $T_m$ denote the \emph{number of false positive calls}: \begin{equation} T_m = \sum_{i=1}^m (1-\xi_i) \, I\left( P_i \leq m^{-1} J_m f \right)\,.\label{eqn:TmsumExch} \end{equation} \end{definition} There are several possible choices of normalizers for $S_m$ and $T_m$, depending upon the popultion value being estimated. Because power in the single hypothesis test scenario is the probability of rejection conditional upon the alternative distribution, it is natural to normalize by the number of non-null distributed statistics, $M_m$: \begin{definition} We define the true positive fraction as the ratio $S_m/M_m$. \end{definition} Results concerning the false discovery rate will follow as corollaries to our other results. For this reason, we normalize the number of false positive calls, $T_m$, by the number of positive callse, $J_m$: \begin{definition} We define the false discovery fraction as the ratio $T_m/J_m$. \end{definition} In general we will use the term \textit{fraction} for a ratio that is a random quantity and \textit{rate} for its expectation. Table \ref{tbl:SensSpec} shows rows partitioning the test statistics into those that are non-null distributed, and those that are null distributed, numbering $M_m$ and $m - M_m$, respectively, and columns partitioning the results of hypothesis testing into the positives and negatives calls, numbering $J_m$, and $m-J_m$, respectively. \subsection{False discovery rate} Let $f_0 = (1-r) f$. \cite{BenjaminiY:1995} showed in their original paper that their procedure controls the expected false discovery fraction, which they called the false discovery rate: \begin{equation} {\mathbb{E}}\left[\frac{T_m}{J_m}\right] = f_0 \leq f \label{eqn:BHFDR} \end{equation} In keeping with pervasive terminology, the phrase ``false discovery rate'' is applied to both the expected false discovery fraction, $f_0={\mathbb{E}}\left[J_m^{-1} T_m \right]$, and in addition, the nominal value, $f$ which is used to set the threshold on the p-value scale. We will use the symbol $\mathrm{BHFDR}(f)$ to denote the BH-FDR procedure at nominal false discovery rate, $\mathrm{FDR}=f$. In this paper, whenever a random variable occurs in the denominator, we tacitly define the indeterminate 0/0 to be 0, which has the effect that all such ratios are defined jointly with the event that the denominator is non-zero. \vspace{0.5truein} \begin{table}[b] \centering \begin{tabular}{lrrr} \toprule &rej $H_{0,i}$&acc $H_{0,i}$&row Total\\ \cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(l){4-4} $H_{0,i}$ is FALSE & $S_m$ & $M_m - S_m$ & $M_m$ \\ $H_{0,i}$ is TRUE & $T_m$ & $(m-M_m)-T_m$ & $m - M_m$ \\ \cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(l){4-4} col Total & $J_m$ & $m-J_m$ & $m$ \\ \bottomrule \end{tabular} \caption{Counts of true positives, false positives, false negatives and true negatives.} \label{tbl:SensSpec} \end{table} \section{The distribution of $S_m$ and notions of power in multiple testing scenarios} In the single hypothesis test situation, $m=1$, we consider probabilities of rejection given $H_0$ is true or false. Under the setup introduced here, when $m=1$, the BH-FDR, $f$ becomes the type I error probability, and the power as it is usually defined for a single hypothesis test, is the conditional expectation of $S_1$ given that $\xi_1=1$. In the case of multiple tests, $S_m$ is distributed over values from zero to as high as $m$ so that naturally there are a multitude of avenues for conceptualizing the power. Consider first, that had we been using the Bonferroni procedure for multiple tests adjustment to thresh-hold the test statistics arriving at $J_m$ positives and $S_m$ true positives, the distribution of $S_m$ would have been binomial with common success probability equal to the per-test power. The fact that the distribution of $S_m$ is not binomial when the BH-FDR criterion is used is what makes discussion of power more difficult. However, the common thread is that any discussion of power in the multiple testing scenario must be based upon some summary of the distribution of $S_m$, e.g. a right tail or a moment. \subsection{Various definitions of power in multiple testing scenarios} One of the first approaches was to use the probability that $S_m$ is non-zero: $\P\left\{S_m > 0\right\}$. \cite{LeeMLT:2002} used a Poisson approximation to derive a closed-form expression for the probability to observe one or more true positives. This kind of power, the family-wise power, is arguably not a meaningful target of optimization for experiments built around a large number of simultaneous tests, especially when there are typically complex underlying hypotheses relying on positive calls for a sizable portion of those tests for which the alternative is true. For example, consider that in a micro-array experiment in which there will be downstream pathways analysis, we would start by assuming that there are around 3\% or more of the $m$ tests for which the alternate hypothesis is true, and hope to make significant calls at an FDR of 15\% for at least 80\% of these non-null distributed statistics, so as to have a thresholded list of roughly $1600$ genes to send to an analysis of pathways. \subsection{The Average Power and $\lambda$-power}\hfil\break \subsection*{Average Power} In the BH-FDR procedure for multiple testing, the role of the type I error played in the single testing scenario is assumed by the FDR which is an expected proportion. Therefore, it is natural in the multiple testing scenario to consider a power that is also defined as an expected proportion. One interpretation of power in the setting of multiple testing that falls along this line of reasoning is the ``average power''. \begin{definition} The average power is the expected true positive fraction, i.e. the expected proportion of all non-null distributed statistics that are declared significant by the BH FDR procedure. \begin{equation} \pi_{_{\mathrm{av},m}} = {\mathbb{E}}\left[\frac{S_m}{M_m}\right] \label{eqn:avgpwr} \end{equation} \end{definition} Notice that here the dependence upon $m$ is made explicit, so that the average power depends upon the number of simultaneous tests in addition to quantities named above. \cite{GlueckD:2008} provided an explicit formula for the average power in a finite number, $m$, of simultaneous test, but its complexity grows as the factorial of the number of simultaneous tests, and this is clearly intractable in the realm of micro-array studies and GWAS where there are tens of thousands or even a million simultaneous tests in question.\hfil\break \subsection{The plug-in estimate of the average power} Thinking heuristically for the moment, if $m$ is very large as will be the case in many ``omics'' scenarios, then the positive call fraction $J_m/m$ could be considered very close to a limiting value, $\gamma$, if such a limiting value existed either in probability or almost surely. Continuing along heuristic lines then, we could replace the positive call fraction, $J_m/m$, with the limiting constant, $\gamma$, in the right hand side of expression \ref{eqn:JmsumExch}, as well as in expressions \ref{eqn:SmsumExch} and \ref{eqn:TmsumExch}, which define $S_m$ and $T_m$. If such a treatment were legitimate, the resulting analysis would be extremely easy as $J_m, S_m$ and $T_m$ would be sums of i.i.d's and the usual L.L.N. holds, with limits given by the expected value of a single increment in the corresponding sum. This gives rise to the plug-in estimate of the average power, \begin{equation} \pi_{\mathrm{pi}} = \P\{ P_i < \gamma f | \xi_i = 1\} = \bar F_{A,n}(\bar F_{0,n}^{-1}(\gamma f)) \end{equation} Several authors have discussed this plug-in estimate of average power, for example \cite{GenoveseC:2004, StoreyJD:2002}. Independently, \cite{JungSH:2005} and \cite{LiuP:2007} discuss sample size and power in the setting of multiple testing based upon the BH FDR procedure. Without actually ever calling it the average power, they derive an expression very close to the above plugin estimate. Their derivation starts with the posterior probability that a statistic was drawn from the null-distributed population, given that it was called significant. Bayes theorem is used to express this in terms of the prior, $1-r$ and $r$, and conditional, $\bar F_{0,n}$ and $\bar F_{A,n}$. They mistakenly equate this to the nominal false discovery rate, $f$, when in actuality it is the observed false discovery rate, $f_0 = (1-r) f$. Not withstanding, their methodology is valid because the resulting power is, as we shall see below, the average power at the ``oracle'' threshold (\cite{GenoveseC:2004}) on the p-value scale , $\gamma f/(1-r)$. This is the largest cut-off that is still valid at the nominal false discovery rate, $f$. Around the same time, \cite{SunWG:2007}, discussed a generalization of of the FDR procedure based upon the local FDR, and showed via decision theoretic techniques, that the false non-discovery rate, a quantity related to the average power, has better performance characteristics than the FDR under many circumstances. The paper also provided a very good survey of the then currently available results. While the ramifications of that work are great, the results provided here have merit in that the results and methodology supplied in the form of second order asymptotics for the TDF and the FDF are entirely new and have important ramifications in of themselves. \subsection*{The $\lambda$-Power} Use of the average power in designing studies or deriving operating characteristics of them makes sense only when the width of the distribution of $S_m/M_m$ is very narrow. To have more definitive control over the true positive fraction, some authors have introduced the ``K-power''. This was originally introduced in a model where the number of non-null distributed tests was fixed and was defined as the probability that the number of true positives exceeded a given integral threshold, $k$. Under the current setup in which the number of non-null distributed tests is a binomial random variable this no longer makes sense. We introduce instead the $\lambda$-power, which is the probability that the true positive fraction, $S_m/M_m$ exceeds a given threshold, $\lambda \in (0, 1)$: \begin{definition} We define the $\lambda$-power: \begin{equation} \pi_{_{S/M}}(\lambda) = \P\left\{\frac{S_m}{M_m} \geq \lambda\right\}.\label{eqn:Lpower} \end{equation} We will also use the term ``$\lambda_{k}$-power'' to denote $\pi_{_{S/M}}(k/100)$, the $\lambda$-power at threshold $k/100$. The associated quantile function is denoted: \begin{equation} \lambda_{_{S/M}}(\pi) = \pi_{_{S/M}}^{-1}(\pi).\label{eqn:leq} \end{equation} \end{definition} As mentioned above, the $\lambda$-power becomes especially meaningful in experiments for which there are a small to intermediate number of simultaneous tests and for which the distribution of the TPF, $S_m/M_m$, becomes non-negligibly dispersed. We prove a CLT for the true positive fraction which we use to approximate the $\lambda$-power. The accuracy of this approximation will be investigated in a simulation study. \begin{remark} Because the distribution of the TPF is nearly symetric for even relatively small values of $m>50$, the mean and median nearly coincide. Thus \begin{equation} \pi_{_{S/M}}(\lambda) \approx 1/2 \mathrm{~when~} \lambda=\pi_{_\mathrm{pi}} \label{eqn:LpwrEqHlf} \end{equation} Because the $\lambda$-power takes the values $1$ when $\lambda=0$ and $0$ when $\lambda=1$ and is continuous by assumption, there exists a quantile, $\lambda_{eq} = \pi_{_{S/M}}^{-1}(\pi_{_\mathrm{pi}})$, at which the $\lambda$ power equals the average power: \begin{equation} \pi_{_{S/M}}(\lambda_{eq}) = \pi_{_\mathrm{pi}}\,. \label{eqn:Lambda_eq} \end{equation} Because the $\lambda$-power is a cCDF it is a non-increasing function of $\lambda$, \begin{equation} \pi_{_{S/M}}(\lambda) < \pi_{_\mathrm{pi}} \mathrm{~for~} \lambda > \lambda_{eq} \mathrm{~and~} \pi_{_{S/M}}(\lambda) > \pi_{_\mathrm{pi}} \mathrm{~for~} \lambda < \lambda_{eq} \label{eqn:LPwr_AvgPwr} \end{equation} \end{remark} \subsection*{Bounding the FDF} We conclude the section on various notions of power with a brief diversion. The fact that the TPF may be non-negligibly dispersed at small to intermediate values of $m$ leads to concern that the FDF distribution is similarly dispersed at these small to intermediate values of $m$. This concern is addressed in one of the CLT results and in the simulation study. We introduce some notation for its cCDF and quantile function. \begin{definition} At BH-FDR $f$, denote the FDF tail probability: \begin{equation} \pi_{_{T/J}}(\lambda) = \P\left\{\frac{T_m}{J_m} \geq \lambda\right\}\,.\label{eqn:FDFcCDF} \end{equation} Denote its quantile function: \begin{equation} \lambda_{_{T/J}}(p) = \pi_{_{T/J}}^{-1}(p)\,.\label{eqn:lToJp} \end{equation} \end{definition} At small and intermediate values of $m$, the value of $\lambda_{_{T/J}}$ required to bound the FDF by $f_0$ with probability bounded by $f_0$ can be as much as 100\% larger than the FDR. As remarked above, this will be discussed further in the context of our CLT results and simulation studies below. The remainder of the paper proceeds according to the following plan. Section 4 is a presentation of the main theoretical results, and this is done two subsections. In subsection 4.1, almost sure limits of the positive call fraction, true positive fraction and false discovery fraction, as the number of simultaneous tests tends to infinity, are shown to exist and are fully characterized. Convergence of the corresponding expectations, the true positive rate or average power, and false positive rate, follow as a corollaries. Subsection 4.2 contains central limit theorems (CLT's) for the positive call fraction, true positive fraction and false discovery fraction. We also provide a lower bound for the average power at a finite number, $m$, of simultaneous tests. We show how these CLT results can be used to approximate the $\lambda$-power allowing tighter control over the TPF in power and sample size calculations, as well as how the approximate distirbution of the FDF can be used to tighten down control over the FDF at both the design and analysis stage. Section 5 is devoted to a simulation study, in which we study the regions of the parameter space that are typical to small biomarker studies, micro-array studies and GWAS studies. We also focus on characteristics of the distribution of the FDF as the number of simultaneous tests grows. Weak consistency of $J_m/m, S_m/M_m$ and $T_m/J_m$ to $\gamma$, $\pi_{\mathrm{pi}}$ and $(1-r)f$ was proved in \cite{StoreyJD:2002} and \cite{GenoveseC:2002}. The paper \cite{GenoveseC:2004} is a study of consistency and convergence in distribution of the paths of the plug-in estimator, considered a stochastic process in the p-value plugin criterion, $t\in(0,1)$. The strong consistency results and weak convergence results for the observed positive call fraction, true positive fraction and false discovery fraction presented here are new. Note that almost sure convergence of the positive call fraction is necessary for almost sure convergence of the true positive and false discovery fractions.c \section{Theoretical Results} \subsection{Law of Large Numbers}\hfil\break \subsection*{LLN for Positive Call Fraction, $J_m/m$} \begin{theorem} \label{thm:Jom_convas} If the family $\{F_{\nu,n}:\nu \geq 0\}$ is absolutely continuous and has the monotone likelihood ratio property, then \begin{equation} \lim_{m\rightarrow\infty} m^{-1}\,J_m = \sup \{ u: u = G(u f) \} \equiv \gamma \mathrm{~almost~surely,} \end{equation} \end{theorem} Proofs of this and all other results are contained in the accompanying supplemental material. \begin{remark} When the family $\{F_{\nu,n}: \nu \geq 0\}$ has the monotone likelihood ratio property, $\gamma$ will be the unique non-zero solution of $G(u f) = u$. \end{remark} Once the almost sure convergence of $J_m/m$ is established we can apply a result of \cite{TaylorRL:1985} to establish convergence results for the true positive fraction. \subsection*{LLN for the True Positive Fraction, $S_m/M_m$} \begin{theorem} \label{thm:SoM_convas} Under the conditions of theorem \ref{thm:Jom_convas}, \begin{eqnarray} \lim_{m\rightarrow\infty} m^{-1}\,S_m &=& \P\{P_{i} \leq \gamma f\,, \xi_i=1\} = r\,\bar F_{A,n}(\bar F_{0,n}^{-1}(\gamma f)) \mathrm{~a.s.}\,,\label{eqn:Som_convas}\\ &&\nonumber\\ \lim_{m\rightarrow\infty} M_m^{-1}\,S_m &=& \P\{P_{i} \leq \gamma f \mid \xi_i=1\} = \bar F_{A,n}(\bar F_{0,n}^{-1}(\gamma f)) \equiv \pi_{_\mathrm{pi}}\mathrm{~a.s.}\label{eqn:SoM_convas}\\ \mathrm{and}&&\nonumber\\ \lim_{m\rightarrow\infty} \pi_{_{\mathrm{av},m}} &=& \lim_{m\rightarrow\infty}{\mathbb{E}}\left[M_m^{-1}\,S_m\right] =\pi_{_\mathrm{pi}}\label{eqn:E_SoM_conv} \end{eqnarray} \end{theorem} Corresponding convergence results for the false discovery fraction and its expected value follow as a corollary. \subsection*{LLN for the False Discovery Fraction, $T_m/J_m$} \begin{corollary} \label{cor:FDF_convas} Under the conditions of theorem \ref{thm:Jom_convas}, \begin{eqnarray} \lim_{m\rightarrow\infty} m^{-1}\,T_m &=& \P\{P_{i} \leq \gamma f\,, \xi_i=0\} = (1-r)\,\gamma f \mathrm{~a.s.}\,,\label{eqn:Tom_convas}\\ &&\nonumber\\ \lim_{m\rightarrow\infty} J_m^{-1}\,T_m &=& \P\{\xi_i = 0 \mid P_{i} \leq \gamma f \} = (1-r) f \mathrm{~a.s.}\label{eqn:FDF_convas}\\ \mathrm{and}&&\nonumber\\ \lim_{m\rightarrow\infty} {\mathbb{E}}\left[J_m^{-1}\,T_m\right] &=& (1-r) f \end{eqnarray} \end{corollary} \begin{remark} Because $T_m = J_m - S_m$ then by Theorem \ref{cor:FDF_convas} and its corollary \ref{thm:SoM_convas}, we obtain the identity $(1-r) f = 1 - r \pi_{_\mathrm{pi}}/\gamma$, which can be rearranged to obtain an expression for the limiting positive call fraction: \begin{equation} \gamma = \frac{r \pi_{_\mathrm{pi}}}{1-f_0}.\label{eqn:gamma_expr} \end{equation} \end{remark} \begin{remark} \label{rmk:oracle} If the nominal false discovery rate, $f$, is replaced by the inflated value, $f/(1-r)$, resulting in the $\mathrm{BHFDR}(f/(1-r))$ procedure, note that the FDR is still controlled at the nominal value, $f$, since in this case, $\mathbb{E}[ J - S / J ] = f$ due to cancellation. This threshold, $\gamma\,f/(1-r)$, on the p-value scale, has been called the oracle threshold by some authors, \cite{GenoveseC:2004}, because it is the criterion resulting in the largest power which is still valid for a given FDR, $f$. Call this the oracle average power, $\pi_o$. The actual difference only begins to get appreciable as $r$ increases in size. In practice, as we will see in our simulation study, $r$ must be as large as 50\% or more before this has a dramatic effect on the average power. Keep in mind that in practice when analyzing a given dataset, this increased power is only attainable at the stage of estimation if a reasonably good estimate of $r$ is possible. The fact that this is very problematic has also been a topic of much discussion. \end{remark} \noindent Next, if we replace $\gamma$ in the definition of the IST average power \ref{eqn:SoM_convas} by the expression \ref{eqn:gamma_expr}, we arrive at a new equation which gives an implicit definition for the IST average power. \begin{corollary} \label{cor:pi1Alt} Under the conditions of theorem \ref{thm:Jom_convas}, \begin{equation} \pi_{_\mathrm{pi}} = \bar F_{A,n}\left(\bar F_{0,n}^{-1}\left((1-f_0)^{-1} r \pi_{_\mathrm{pi}} f\right)\right)\,. \end{equation} \end{corollary} \noindent The almost sure convergence results given in Theorems \ref{thm:Jom_convas}, \ref{cor:FDF_convas} and \ref{thm:SoM_convas} above each have corresponding central limit results which we state now. The first, a CLT for the centered and $\sqrt{m}$-scaled positive call fraction, $J_m/m$, is needed in the proof of the second and third results, CLT's for centered and scaled versions of the false discovery fraction and the true positive fraction. \subsection{CLTs for the PCF, FDF, and TPF; Lower Bound for Average Power} \begin{theorem} \label{thm:CLT} Under the conditions of theorem \ref{thm:Jom_convas}, \begin{eqnarray} \sqrt{m} \Big(m^{-1} J_m \kern-0.75em &-&\kern-0.75em \gamma \Big) \convind N(0, \tau^2)\,.\label{eqn:CLT_Jortm}\\ &&\nonumber\\ \sqrt{m} \Big(J_m^{-1} T_m \kern-0.75em &-&\kern-0.75em f_0 \Big) \convind N(0, \alpha^2)\,.\label{eqn:CLT_rtmFDF}\\ &&\nonumber\\ \sqrt{m} \Big(M_m^{-1} S_m\kern-0.75em &-&\kern-0.75em \pi_{_\mathrm{pi}}\Big)\convind N(0,\sigma^2)\,.\label{eqn:CLT_rtmSoM} \end{eqnarray} \end{theorem} The proof, which uses results on convergence of stopped stochastic processes, is constructive in nature producing fully characterized limiting distributions yielding asymptotic variance formulae. We reiterate the practical implications of these results. \subsection*{Approximating the $\lambda$-power via the CLT for the TPF} Currently, multiple testing experiments are designed using the average power, $\pi_{_\mathrm{pi}}$, which is the mean of the distribution of $S_m/M_m$. In cases in which the width of this distribution is non-negligible, e.g. $m<1000$ simultaneous tests or so, we recommend using the $\lambda$-power instead of the average power. As we defined above, in equation \ref{eqn:Lpower}, the $\lambda$-power is the probability that the TPF exceeds a given $\lambda$. We will see in our simulation study that in the ranges of the parameter space investigated, this CLT approximation is quite good and can be used to approximate the $\lambda$-power: \begin{equation} \pi_{_{S/M}}(\lambda) = \P\{ S_m/M_m \geq \lambda\} \approx \Phi(\sqrt{m}/\sigma (\pi_{_\mathrm{pi}} - \lambda))\,,\label{eqn:lpwrCLT} \end{equation} where $\sigma$ above is the square-root of the asymptotic variance, $\sigma^2$, given in formula \ref{eqn:s2} in the proof of theorem \ref{thm:CLT}. \subsection*{Enhanced control of the FDF via its CLT} As defined above in expression \ref{eqn:lToJp} and the text leading up to it, $\lambda_{_{T/J}}(p) = \pi_{_{T/J}}^{-1}(p)$ is the quantile of the FDF distribution at upper tail probability, $p$. The CLT for the FDF can be used to approximate it: \begin{equation} \lambda_{_{T/J}}(p) \approx f_0 + \alpha/\sqrt{m} \Phi^{-1}(1 - p)\,. \end{equation} Here, $f_0 = (1-r) f$ as above, $\alpha$ is the square root of the asymptotic variance, $\alpha^2$ given in formula \ref{eqn:a2} in the proof of \ref{thm:CLT}, and $\Phi^{-1}$ is the standard normal quantile function. This can be used in several different ways to bound the FDF with specified probability. Three possibilities are as follows. First, as a kind of loss function on lack of control inherent in the use of the $\mathrm{BHFDR}(f)$ procedure, we could determine how large a threshhold is required so that the FDF is bounded by $\lambda$ except for a tail probability of $f_0$ \begin{equation} \lambda_{_{T/J}}(f_0) = f_0 + \alpha/\sqrt{m} \Phi^{-1}(1 - f_0) \end{equation} A second way would to find the solution $f\tck$ to the following equation. \begin{equation} f_0 = (1-r) f\tck + \alpha/\sqrt{m} \Phi^{-1}(1 - (1-r) f_0)\,.\label{eqn:fpr} \end{equation} This would produce a reduced FDR, $f\tck < f$, at which the $\mathrm{BHFDR}(f\tck)$ procedure would result in a FDF, $T_m/J_m$ of no more than $f_0$ with probability $1-f_0$. The solution is \begin{equation} f\tck = f - \alpha/(\sqrt{m}(1-r)) \Phi^{-1}(1 - (1-r) f_0) \end{equation} A third way to do this, and the most conservative of the three, would be to determine the value of a reduced FDR, $f\tck$, at which the $\mathrm{BHFDR}(f\tck)$ procedure would result in a FDF no more than $f_0$ with probability $1-(1-r) f\tck$, by solving the following equation numerically: \begin{equation} f_0 = (1-r) f\tck + \alpha/\sqrt{m} \Phi^{-1}(1 - (1-r) f\tck)\,.\label{eqn:fprime} \end{equation} \begin{remark} The farther apart $f\tck$ is from $f_0$ is an indication of the dispersion of the distribution of $T_m/J_m$. \end{remark} \begin{remark} The procedure summarized in equation \ref{eqn:fprime}, for finding a reduced FDR, $f\tck$, at which $\mathrm{BHFDR}(f\tck)$ would produce an FDF of no more than $f_0$ with probability $1-(1-r)f\tck$, can also be used at the analysis phase. Note that expression \ref{eqn:a2} in the proof of \ref{thm:CLT} for the asymptotic variance, $\alpha^2$, of $T_m/J_m$ depends only upon $f_0=(1-r)f$ and $\gamma$. Thus we can replace $f_0$ with $f$ and estimate $\gamma$ from the data using the plug-in estimate, $J_m/m$. This has important ramifications for the setting of small to intermediate number of simultaneous tests, $m\leq 1000$. \end{remark} \subsection*{Lower Bound for finite simultaneous tests average power} As we will see in the simulation study which follows, the IST average power is in fact extremely close to the finite simultaneous tests (FST) average power for the broad ranges of the parameters studied. Nevertheless, it is still useful to have bounds for the FST average power. \begin{theorem} \label{thm:LowerBdd} The FST average power, $\pi_{_{\mathrm{av},m}}$, is bounded below by the following quantity, $\pi^{L}_{\mathrm{av},m}$, given below. \begin{eqnarray} \pi_{_{\mathrm{av},m}} &\geq& \sum_{{\ell}=1}^{m} \binom{m}{{\ell}} r^{\ell} (1-r)^{m-{\ell}} \frac{1}{{\ell}} \sum_{s=1}^{{\ell}} \bar B_{{\ell}-s+1,s}\left(\bar F_{\nu,n}\left(1-\bar F_{0,n}^{-1}\left(\frac{s f}{m}\right)\right)\right) \nonumber\\ &\equiv& \pi^{L}_{\mathrm{av},m} \nonumber \end{eqnarray} \end{theorem} An upper bound that seems to work in practice is the expression obtained by replacing $J_m/m$ with $r/(1-f_0)$ in equation \ref{eqn:lwrbddeqn3} in the proof of Theorem \ref{thm:LowerBdd}. \section{Simulation Study} We conducted four simulation studies. The first three of these had fixed $m$ and ranges of the other parameters chosen based upon relevance to subject matter areas. The first, with $m=200$, was meant to model biomarker studies. In a second simulation study, we varied $m$ in order to study characteristics of the FDF distribution as $m$ grows. In the third, in which $m=\numprint{54675}$, was meant to model micro-array studies for while the fourth, for which $m=\numprint{1000000}$, was meant to model genome wide association (GWA) studies. In all four cases, the test statistic distributions, $F_{0,n}$ and $F_{\nu,n}$, were chosen to be t-distributions of $2n - 2$ degrees of freedom. The common non-centrality parameter was fixed at $\nu=\sqrt{n/2}\theta$. This corresponds to a two group comparison as is often done. For each of these simulation studies, we chose subject matter relevant ranges for the four parameters, the expected proportion of non-null tests, $r$, the location parameter, $\theta$, and the false discovery rate, $f$. Except when set explicitly as in the fourth case, a range sample sizes, $n$, in increments of 5, was chosen to result in powers between 60\% and 95\% at each setting of the other parameters. We conducted a total of four simulation studies. The first, with $m=200$ simultaneous tests, was meant to model biomarker studies. The second, with varying sizes of $m$ ranging from \numprint{1000} to \numprint{20000} was done in order to assess the width of the FDF distribution and the adequacy of the CLT approximation to it. The third, with $m=$\numprint{54675} was meant to model human oligo-nucleotide micro-array experiments, and the forth with $m=$\numprint{1000000} was meant to model GWA studies. We present the first two of these in the main text and the remainder in the supplementary material. \ifsuppl \setcounter{Stbls}{0} \refstepcounter{Stbls}\label{tbl:avgpwr_tbl_Array} \refstepcounter{Stbls}\label{tbl:Lpwr_tbl_Array} \refstepcounter{Stbls}\label{tbl:avgpwr_tbl_GWAS} \refstepcounter{Stbls}\label{tbl:Lpwr_tbl_GWAS} \refstepcounter{Stbls}\label{tbl:avgpwr_tbl_Bmkr} \refstepcounter{Stbls}\label{tbl:Lpwr_tbl_Bmkr} \refstepcounter{Stbls}\label{tbl:tbl_FDFincrN} \fi For each of simulation studies focused on the distribution of the TPF, we computed, at each combination of these four parameters, the IST average power, $\pi_{_\mathrm{pi}}$, from line \ref{eqn:E_SoM_conv} of Theorem \ref{thm:SoM_convas}, the oracle power, $\pi_o$, mentioned in remark \ref{rmk:oracle} above, and the lower bound, $\pi^{L}_{\mathrm{av},m}$, from Theorem \ref{thm:LowerBdd}. We computed the approximate $\lambda_{75}$- and $\lambda_{90}$- powers using expression \ref{eqn:lpwrCLT} based upon the CLT for the TPF (theorem \ref{thm:CLT}) using the expression for the asymptotic variance, $\sigma^2$ (expression \ref{eqn:s2} given in the proof). Also, at each combination of parameters, we conducted \numprint{1000} simulation replicates. At each simulation replicate, we began by generating $m$ i.i.d. Bernoulli $\{0,1\}$ variables, with success probability, $r$, to assign each of the $m$ test statistics to the null (0) or non-null (1) populations, recording the number, $M_m$, of non-null distributed test statistics. This was followed next by drawing $m$ test statistics from $F_{0,n}$ or $F_{\nu,n}$, being the central and non-central (respectively) t-distribution of $2 n -2$ degrees of freedom, corresponding to the particular value of $\xi_i$. Next, the B-H FDR procedure was applied and the number of positive calls, $J_m$, and number of true positives, $S_m$ were recorded. At the conclusion of the \numprint{1000} simulation replicates, we recorded the simulated average power as the mean over simulation replicate of the TPF, $S_m/M_m$. In addition, the simulated $\lambda_{75}$- and $\lambda_{90}$- powers were derived as the fraction of simulation replicates of the TPF that exceeded $0.75$ and $0.90$, respectively. Finally we computed the sample size required for $\lambda_{90}$ power. In another simulation study, focused on the distribution of the FDF for increasing $m$. At each combination of the parameters considered, we computed the reduced FDR, $f\tck$, required to bound the FDF with probability $(1-r)f\tck$ as the unique numerical solution to expression \ref{eqn:fprime}. We also computed the sample sizes $n_{_{0,0}}$ and $n_{_{0,1}}$ required for specified average power under $\mathrm{BHFDR}(f)$ and under $\mathrm{BHFDR}(f\tck)$, respectively. Sample sizes $n_{_{1,0}}$ and $n_{_{1,1}}$ at specified $\lambda$-power under the corresponding procedure were also derived. A simulation, conducted in a fashion identical to that described above, under $\mathrm{BHFDR}(f\tck)$, was done at each combination of parameters, this time including the additional two parameters $m$ and specified power. From simulation replicates of the FDF, $T_m/J_m$, we computed the probability in excess of $f_0$. All calculations were done in R, version 3.5.0 (\cite{CiteR:2016}) using a R package, \textbf{pwrFDR}, written by the author \cite{IzmirlianG:2018}, available for download on \textbf{cran}. Simulation was conducted on the NIH Biowulf cluster (\cite{Biowulf:2017}), using the swarm facility, whereby each of 50 nodes was tasked with carrying out 20 simulation replicates resulting in \numprint{1000} simulation replicates for each configuration of parameters. \subsection{Biomarker Studies} For the first simulation study we considered experiments typical of biomarker studies with $m=\numprint{200}$ simultaneous tests. We attempted to cover a broad spectrum of parameters spanning the domain of typical biomarker study designs. The false discovery rate, $f$, was ranged over the values $1\%$, and from 5\% to 30\% in increments of 5\%. The expected number of tests with non-zero means, $\mathbb{E}[M_m] = m r$, was varied over the values 5, 10 and 20, and from 10 to 100 in increments of 10, representing values of $r$ ranging from 0.025 to 0.5. The effect size, $\theta$, was allowed to vary from 0.6 to 1.5 in increments of 0.1. At each configuration, a range of sample sizes were chosen to result in powers between 50\% and 98\% as mentioned above. This resulted in 2,648 configurations of the parameters, $f, \mathbb{E}[M_m],\theta$, and $n$ (full set of parameter combinations). The job took roughly 7 minutes on the NIH Biowulf cluster. Table \ref{tbl:avgpwr_tbl_Bmkr} tabulates the IST average power, the oracle power and the simulated mean of the TPF at 28 different parameter settings excerpted from the full set of 2,648 parameter combinations. Over the full set of parameter settings, the both the IST $\pi_{_\mathrm{pi}}$, and oracle $\pi_o$ powers are very close to the simulated average power. The difference between the IST power, $\pi_{_\mathrm{pi}}$, and the simulated power was less than 0.15, 0.95 and 2.00 at 50\%, 90\% and 99\% of the parameter settings, respectively. As remarked earlier, the oracle power is actually the average power at the oracle threshold. Since it borders on feasible, we allowed $r$ to take values as large as 0.5 for which the oracle threshold has a substantial gain in power. The oracle power differed from the IST power by 1.8\%, 8.5\% and 16\% at 50\%, 90\% and 99\% of the parameter settings, respectively, suggesting that the oracle threshold is worth considering. Recall that our IST power, $\pi_{_\mathrm{pi}}$ can be set to the oracle threshold by setting the FDR to $f/(1-r)$. However, careful consideration must be taken if using the oracle threshold to design a study, since when its time to actually threshold the data one needs a plug-in estimate of $r$ and as discussed extensively in the literature, this can be problematic. The lower bound comes within roughly 10\% of the simulated power, with differences with the simulated power less than 36\%, 45\%, 50\%, 56\% and 71\% at 20\%, 40\%, 50\%, 60\% and 80\% of the parameter settings, respectively. Table \ref{tbl:Lpwr_tbl_Bmkr} displays, at threshold 0.75 and at threshold 0.90, the $\lambda$ power as derived from the CLT \ref{thm:CLT} and estimated from simulation replicates (hatted version), respectively, excerpted from the full set of 2,648 parameter combinatons as before. In the last column is the ratio of the sample size required for $\lambda_{90}$-power to the original sample size. First, we note that when restricted to powers strictly between 50\% and 100\%, occurring at 1,488 parameter combinations, the CLT approximate- and simulated- $\lambda_{75}$-power were within the following relative error of one another (median over parameter conditions (lower quartile, upper quartile)): 2\% (0.7\%, 4.5\%), with 23.1\% over 5\%. Corresponding results for the simulated and CLT approximate $\lambda_{90}$-power for powers strictly between 50\% and 100\% occurring at 1275 of the parameter values, were within the following relativer error of one another 3.3\% (1.3\%, 9.2\%), with 37.6\% over 5\%. The greater discrepancy between CLT approximate $\lambda$-powers and simulated values is due to the lack of accuracy of the CLT asymptotic approximation at such small sample sizes, $n$. Note that for sample sizes in excess of $n=20$ the degree of accuracy starts to improved dramatically, especially at higher powers. Also noteworthy is corroboration in ordering of the average power and $\lambda_{k}$-power based upon the size of $k$ relative to $100 \lambda_{eq}$. All values of $\lambda_{eq}$ are less than 90\%, but some are between 75\% and 90\%, and the ordering of average power and $\lambda$ powers is in accordance with expression \ref{eqn:LPwr_AvgPwr}. Furthermore the discrepancy between the average power and the $\lambda$-power is reflective difference between $\lambda$ and $\lambda_{eq}$. This trend is echoed in the magnitude of the sample size ratio, with magnitude increasing in the discrepancy between $\lambda_{eq}$ and $0.90$. Note that in this case, as the number of simultaneous tests, $m$, is relatively ``small'', the distribution of the TPF, $S_m/M_m$, is more dispersed and therefore, growth in the $\lambda$-powers is more gradual with increasing sample size. \subsection{The false discovery fraction, intermediate number of simultaneous tests} The second simulation study was focused on the use of the CLT for the FDF to find a bound for the FDF with large probability. We varied the number of simultaneous tests, $m$, over 1000, 2500, 5000, 7500, 10000 and 20000. The effect size, $\theta$, was varied over 2/3, 5/6 and 1. The proportion of statistics drawn from the non-null distributed population, $r$, ranged over 0.025, 0.05 and 0.075 and the FDR, $f$, ranged over the values 0.1, 0.15 and 0.2. At each set of values of these parameters, we used expression \ref{eqn:fprime} based upon the CLT for the FDF to find a reduced FDR at which the BH-FDR procedure would result in an FDF of no more than $f_0$ with large probability. We calculated the sample sizes required for specified average power under the original and reduced FDR. Sample sizes required for specified $\lambda_{90}$-power under the original and reduced FDR were also calculated. Finally, the probability that the FDF exceeded $f_0$ under the reduced FDR was estimated from simulation replicates. Table \ref{tbl:tbl_FDFincrN} tabulates the reduced FDR, $f\tck$, required to bound the FDF by $f_0$ with probability $1-(1-r)f\tck$, and the sample sizes $n_{_{0,0}}$ and $n_{_{0,1}}$, required for specified average power under $\mathrm{BHFDR}(f)$ and under $\mathrm{BHFDR}(f\tck)$, respectively. Also shown are the sample sizes, $n_{_{1,0}}$ and $n_{_{1,1}}$, required for specified $\lambda_{90}$-power under $\mathrm{BHFDR}(f)$ and under $\mathrm{BHFDR}(f\tck)$, respectively, as well as the simulated tail probability, $\hat\pi_{_{T/J}}(f_0)$, in excess of $f_0$. The general trend for increasing $m$ as the distribution of $T_m/J_m$ collapses to a point mass at $f_0$ are a value of $f\tck$ closer to $f$, and sample sizes under $\mathrm{BHFDR}(f\tck)$ that are less inflated relative to corresponding sample sizes under $\mathrm{BHFDR}(f)$. The simulated right tail probability, $\hat\pi_{_{T/J}}$ should in theory have only simulation error about its theoretical value, $(1-r)f\tck$. However, as $f\tck$ is derived from an approximation based upon a CLT, we expect the accuracy of the approximation to improve with larger $m$. Not surprisingly, the results are consistent with these observations. Over the full set of 324 parameter settings we obtained the following results (median, (lower quartile, upper quartile)). The ratio of the reduced FDR, $f\tck$, to the original FDR, $f$: 0.79 (0.69, 0.86) when $m\leq 10,000$, and 0.91 (0.88, 0.93) when $m>10,000$, showing that the reduced FDR gets closer in value to the original FDR with increasing $m$. The ratio of sample size required for average power at $\mathrm{BHFDR}(f\tck)$ to that at $\mathrm{BHFDR}(f)$: 1.06 (1.04, 1.1) when $m\leq 10,000$ and 1.03 (1.02, 1.04) when $m>10,000$, showing that the inflation factor reduces with increasing $m$. This is also the case when the sample sizes are derived for given $\lambda_{90}$-power: 1.05 (1.03, 1.08) when $m\leq 10,000$ and 1.02 (1.0025, 1.03) when $m>10,000$, respectively. Finally, the ratio of the simulated tail probability, $\hat\pi_{_{T/J}}(f_0)$ to the CLT approximated value: 1.02 (0.95, 1.11) when $m\leq 10,000$ and 0.995 (0.94, 1.0675) when $m>10,000$ respectively, highlighting that the CLT approximation gets better with increasing $m$. In order to judge the relative impact changes in the parameters had, especially those unique to this setting of multiple testing, we computed numerical partial derivatives of the power function with respect to the proportion of test statistics distributed as the non-null distribution $r$, the effect size $\theta$, and the FDR $f$. The partials were then scaled to the range of the relevant parameter (max minus min) so that unit changes were comparable and corresponded to the ranges of the parameters considered. Numerical partial derivatives were computed at all 10,020 configurations of the parameters. These results were summarized separately for each of the three parameters by calculating quartiles of the respective numerical partial derivative at each given level of the respective parameter, over all configurations of all other parameters resulting in powers of 50\%, 60\%, 70\%, 80\% and 90\%. The results corresponding to median values at 70\% power are displayed in Figure \ref{fig:MA-derivs}. \section{Discussion} We proved LLNs for the PCF, FDF and TPF as well as CLTs for $\sqrt{m}$ scaled versions of them. Our LLN result for the TPF allowed characterization of the large $m$ limit and this in turn allowed a proper interpretation of the power discussed in \cite{JungSH:2005} and in \cite{LiuP:2007}, being nearly identical to the average power. Our CLT result for the TPF allowed us to introduce the $\lambda$-power, similar in nature to the $k$-power discussed by previous authors. The $\lambda$-power allows tighter control over the TPF in the design of multiple testing experiments by bounding the distribution of the TPF by an acceptable threshold, rather than just its mean, as is the case with the average power. Our CLT result for the FDF provides a technique whereby an investigator can determine a reduced FDR at which the usual BH-FDR procedure will result in a FDF no greater than a stipulated value with arbitrary large probability. This latter technique is useful both at the design phase as well as the analysis phase because the asymptotic variance depends only upon the limiting PCF, $\gamma$, and proportion belonging to the null distributed population, $1-r$ and one can use $J_m/m$ as an estimate of $\gamma$ and consider $1-r\approx 1$ when faced with a data analysis. Key to the proofs of the LLN results was, first, the LLN for the PCF, $J_m/m$, which was proved directly via a simple argument. Prior results by \cite{GenoveseC:2004} obtained convergence only in probability. Once established we applied a result of \cite{TaylorRL:1985} for a.s. convergence of triangular arrays of finite exchangeable sequences The proofs of the CLT results was made possible by building on the work of \cite{GenoveseC:2004} which considered $p$-values thresholded at a deterministic $t$, treating them as stochastic processes. We applied a result of \cite{SilvestrovD:2004} for weak convergence of stopped stochastic processes. In a very large and thorough simulation study, we investigated three major domains of the space of operating characteristics typically encountered in the design of multiple testing experiments: two larger $m$ domains, $m=\numprint{54675}$ typical to human RNA expression micro-array studies, and $m=\numprint{1000000}$ typical to GWA studies and a smaller $m$ domain, $m=200$ which is typical of biomarker studies. In each case, we compared the average power derived from the TPF LLN limit to simulated values and observed at all ranges of sample sizes that the agreement was quite good. We also used the CLT result for the TPF to compute approximate $\lambda$ powers and compared these with the simulation distribution. Agreement in this case was overall very good, but there was some breakdown in the level of accuracy in the asymptotic approximation at simultaneous tests $m<100$. The last simulation study was focused upon the procedure for bounding the FDF with large probability and its behavior as the number of simultaneous tests, $m$, grows from hundreds to tens of thousands. We noted that overall, the method is feasible, even when the asymptotic approximation begins to fail, as it always offers tighter control of the FDF than the BH-FDR procedure alone. We investigated departures from the assumption of independent hypothesis tests by conducting a simulation in which tests were correlated within blocks according to a compound symmetry structure under a multivariate normal, having marginal variances equal to 1. For the purposes of this investigation, we fixed the block size to 100, effect size 1.25, FDR at 15\%, proportion of non-null distributed tests, $r$, at 5\% for 2000 simultaneous tests. We varied sample sizes from 14 to 16 and block correlation from 0 to 80\% in increments of 10\%. The average power, $\lambda_{75}$ power, empirical FDR and probability that the FDF exceeds 18\% are tabulated in table \ref{tbl:tbl_corr_tests} over the ranges of sample sizes and block correlations considered. As we can see, comparing the independent tests lines for each of the two sample sizes, 14 and 16, with corresponding values for correlated test statistics, a very important point can be made. From the standpoint of the mean, there is virtually no difference. This is to say that the empirical FDR and average power are virtually unaffected when there are correlated blocks of tests. Notable differences do occur in the distributions of the TPF and FDF as the $\lambda_{75}$-power for independent test statistics is 30\% in a sample of 14, and 87\% in a sample of 16, respectively, while the values when there are correlated blocks of tests are substantially greater for a sample of 14 and substantially less in a sample of 16, respectively. Discrepancies between the independent tests versus correlated blocks of tests in the same direction are also observed in the probability that the FDF exceeds 18\%. The reason for this is that correlated blocks of test statistics result in a reduced effective number of tests. Apparently, the observed effective number of test statistics is large enough that the empirical means are still very good estimates of their almost sure limiting values, but not great enough for stability in the distribution of empirical means at the ranges of parameters under consideration. The conclusion to be drawn is not that the BH-FDR procedure is to be avoided because it is not completely imune to departures from the independent test statistics assumption. By analogy, is any limit theorem meaningless because it doesn't apply to a sample size of 3? Quite not. The first conclusion to be drawn is that the empirical means appear to be unaffected in the ranges of parameters considered here. If one is truly comfortable controlling the false discovery rate and powering studies using the average power, then one can ignore the appropriateness of the independence assumption. Problems start to occur when one uses the tails of the distribution of the FDF and TPF, as we are making the case for use here. However, rather then give up on the use of the BH-FDR procedure altogether, the phenomenon should be viewed from the lens of the effective number of simultaneous tests. So, ironically, the problem is solved if one can simply increase the number of simultaneous tests. Drawing away from the specific discussion of correlated tests and widening the focus to the conclusions to be drawn from the paper as a whole, the point to be made is that the quantities arising in the BH-FDR procedure, the expected FDF which is controlled, and the expected TPF which forms the basis of a power calculation, should be seen for what they are, location parameters. Because first and second order asymptotics in the FDF and TPF occur as the number of simultaneous tests tends to infinity, then within the scope of reasonable ranges of parameters, e.g. effect size no more than 1 or so, and sample sizes within the ranges seen for equipment that is either very expensive per replicate or just starting to get a bit cheaper, say a few tens of replicates, then the following generalizations can be made. For more than 20,000 simultaneous tests, the means and the distributions effectively coincide so that controlling the FDR and using the average power to derive sample sizes is well supported. This is great news for GWAS and RNA-seq studies for example. However, for less than one or two thousand simultaneous tests, one must use second order asymptotics to control the type I-like error and calculate sample sizes using the CLT's for the FDF and TPF in the manner outlined here. For on the order of a hundred or so simultaneous tests, asymptotic approximation using the CLT's may not be appropriate. In this case, simulation is advised. This cautionary note is of particular importance in many biomarker studies. \fi \ifsuppl \section{Appendix: Further simulation studies} \subsection{RNA Expression Micro-array Studies} The third simulation study we considered experiments typical of human RNA expression micro-array studies using the Affymetrix Hgu133plus2 oligonucleotide mRNA gene chip. In this case, there are $m=\numprint{54675}$ simultaneous tests. We attempted to cover a broad spectrum of parameters spanning the domain typical of micro-array study designs. The false discovery rate, $f$, was ranged over the values 1\%, and from 5\% to 30\% in increments of 5\%. The expected number of tests with non-zero means, $\mathbb{E}[M_m] = m r$, was varied from 100 to 2500 in increments of 100 representing values of $r$ ranging from 0.0018 to 0.046. The effect size, $\theta$, was allowed to vary from 0.6 to 1.5 in increments of 0.1. At each configuration, a range of sample sizes were chosen to result in powers between 60\% and 95\% as mentioned above. This resulted in 10,020 configurations of the parameters, $f, \mathbb{E}[M_m],\theta$, and $n$ (full set of parameter combinations). The job took roughly 12 hours on the NIH Biowulf cluster. Table \ref{tbl:avgpwr_tbl_Array} tabulates the IST average power, the oracle power and the simulated mean of the TPF at 28 different parameter settings excerpted from the full set of 10,020 parameter combinations. Over the full set of parameter settings, the both the IST, $\pi_{_\mathrm{pi}}$, and oracle, $\pi_o$, powers are very close to the simulated average power. The difference between the IST power, $\pi_{_\mathrm{pi}}$, and the simulated power was less than 0.022\%, 0.077\% and 0.19\% at 50\%, 90\% and 99\% of the parameter settings, respectively. The oracle power differed from the IST power by less than 0.15\%, 0.5\% and 0.92\% at 50\%, 90\% and 99\% of the parameter settings, respectively. As remarked earlier, the oracle power is actually the average power at the oracle threshold, but for such small values of $r \leq 0.046$ there is not much gain in power to be had. The lower bound comes within roughly 10\% of the simulated power, with differences with the simulated power less than 2.1\%, 4.5\%, 6.2\%, 8.5\% and 15\% at 20\%, 40\%, 50\%, 60\% and 80\% of the parameter settings, respectively. Table \ref{tbl:Lpwr_tbl_Array} displays, at threshold 0.75 and at threshold 0.90, the $\lambda$ power as derived from the CLT \ref{thm:CLT} and estimated from simulation replicates (hatted version), respectively, excerpted from the full set of 10,020 parameter combinatons as before. In the last column is the ratio of the sample size required for $\lambda_{90}$-power to the original sample size. First, we note that when restricted to powers strictly between 50\% and 100\%, occurring at 1,066 parameter combinations, the CLT approximate- and simulated- $\lambda_{75}$-power were within the following relative error of one another (median over parameter conditions (lower quartile, upper quartile)): 0.4\% (0.2\%, 1.2\%), with 2.4\% over 5\%. Corresponding results for the simulated and CLT approximate $\lambda_{90}$-power for powers strictly between 50\% and 100\% occurring at 1476 of the parameter values, were within the following relativer error of one another 0.5\% (0.2\%, 1.3\%), with 1.8\% over 5\%. Also noteworthy is corroboration in ordering of the average power and $\lambda_{k}$-power based upon the size of $k$ relative to $100 \lambda_{eq}$. All values of $\lambda_{eq}$ are less than 90\%, but some are between 75\% and 90\%, and the ordering of average power and $\lambda$ powers is in accordance with expression \ref{eqn:LPwr_AvgPwr}. Furthermore the discrepancy between the average power and the $\lambda$-power is reflective difference between $\lambda$ and $\lambda_{eq}$. This trend is echoed in the magnitude of the sample size ratio, with magnitude increasing in the discrepancy between $\lambda_{eq}$ and $0.90$. The relatively rapid rise in sample size, $n$, of all $\lambda$-powers is an indication of the degree to which the distribution of the TPF, $S_m/M_m$, is spiked. \subsection{GWA Studies} The last simulation study we considered experiments typical of GWA studies with $m=\numprint{1000000}$ simultaneous tests. We attempted to cover a broad spectrum of parameters spanning the domain typical of GWA study designs. The false discovery rate, $f$, was ranged over the values 0.5\%, 1\%, 5\% and 10\%. The expected number of tests with non-zero means, $\mathbb{E}[M_m] = m r$, was varied from 400 to 1000 in increments of 200 representing values of $r$ ranging from 4e-04 to 0.001. The effect size, $\theta$, was allowed to vary from 0.08 to 0.68 in increments of 0.2. At each configuration, a range of sample sizes were chosen to result in powers between 50\% and 98\% as mentioned above. This resulted in 512 configurations of the parameters, $f, \mathbb{E}[M_m],\theta$, and $n$ (full set of parameter combinations). The job took roughly 5 hours on the NIH Biowulf cluster. Table \ref{tbl:avgpwr_tbl_GWAS} tabulates the IST average power, the oracle power and the simulated mean of the TPF at 32 different parameter settings excerpted from the full set of 512 parameter combinations. Over the full set of parameter settings, the both the IST, $\pi_{_\mathrm{pi}}$, and oracle, $\pi_o$, powers are very close to the simulated average power. The difference between the IST power, $\pi_{_\mathrm{pi}}$, and the simulated power was less than 0.031, 0.087 and 0.147 at 50\%, 90\% and 99\% of the parameter settings, respectively. The oracle power differed from the IST power by 0.0038\%, 0.0081\% and 0.011\% at 50\%, 90\% and 99\% of the parameter settings, respectively. As remarked earlier, the oracle power is actually the average power at the oracle threshold, but for such small values of $r \leq 0.001$ the gain in power is now less than 1\%. The lower bound comes within roughly 10\% of the simulated power, with differences with the simulated power less than 0.83\%, 3.8\%, 6.9\%, 9.6\% and 15\% at 20\%, 40\%, 50\%, 60\% and 80\% of the parameter settings, respectively. Table \ref{tbl:Lpwr_tbl_GWAS} displays, at threshold 0.75 and at threshold 0.90, the $\lambda$ power as derived from the CLT \ref{thm:CLT} and estimated from simulation replicates (hatted version), respectively, excerpted from the full set of 512 parameter combinatons as before. In the last column is the ratio of the sample size required for $\lambda_{90}$-power to the original sample size. First, we note that when restricted to powers strictly between 50\% and 100\%, occurring at 68 parameter combinations, the CLT approximate- and simulated- $\lambda_{75}$-power were within the following relative error of one another (median over parameter conditions (lower quartile, upper quartile)): 0.5\% (0.2\%, 1.3\%), with 1.5\% over 5\%. Corresponding results for the simulated and CLT approximate $\lambda_{90}$-power for powers strictly between 50\% and 100\% occurring at 87 of the parameter values, were within the following relativer error of one another 0.6\% (0.2\%, 1.2\%), with 1.1\% over 5\%. Also noteworthy is corroboration in ordering of the average power and $\lambda_{k}$-power based upon the size of $k$ relative to $100 \lambda_{eq}$. All values of $\lambda_{eq}$ are less than 90\%, but some are between 75\% and 90\%, and the ordering of average power and $\lambda$ powers is in accordance with expression \ref{eqn:LPwr_AvgPwr}. Furthermore the discrepancy between the average power and the $\lambda$-power is reflective difference between $\lambda$ and $\lambda_{eq}$. This trend is echoed in the magnitude of the sample size ratio, with magnitude increasing in the discrepancy between $\lambda_{eq}$ and $0.90$. Notice that over values considered the ranges of $\sqrt{n}\theta$ are comparable among the the micro-array, GWAS and biomarker simulation studies. Therefore, the ``all'' or ``nothing'' rapid rise in the $\lambda$-powers with increasing sample size here must be solely due to the distribution of the TPF, $S_m/M_m$, being even more dramatically spiked, since the number of simultaneous tests, $m$, is in this case, considerably larger. \section{Appendix: Proofs} \begin{proof}[Proof of Theorem \ref{thm:Jom_convas}] \noindent The author wishes to thank Professor Thomas G. Kurtz \citep{KurtzT:2016} for assistance with this proof. Recall the nominal p-values, $P_i = \bar F_{0,n}^{-1}(X_{i,n})$, their common CDF, $G$, listed in expression \ref{eqn:Gdefnd} in the text and their order statistics $P^m_{(i)}$. Let $G_m$ be the empirical C.D.F. of $\{P_1, P_2,\ldots,P_m\}$. \begin{equation} G_m(u) = m^{-1} \sum_{i=1}^m I(P_i \leq u) \label{eqn:empcdfGm} \end{equation} By Kolmogorov's theorem, $G_m(u)\convas G(u)$ at all continuity points, $u$, of $G$. By assumption the family $\{F_{\nu,n}^{-1}:\nu \geq 0\}$ is absolutely continuous and has the monotone likelihood ratio property. It follows that each of the ratios $f_{\nu_{\ell}, n}/f_{0,n}$ is monotone and hence the mixture of likelihood ratios, $f_{A,n}/f_{0,n} = \sum_{\ell} s_{\ell} f_{\nu_{\ell},n}/f_{0,n}$ is monotone. It follows that G is concave and therefore $G(uf) = u$ has one non-zero solution which we will call $\gamma$. Let $\mathcal{N}\subset \Omega$ be the set of measure zero such that $G_m(\gamma f) \rightarrow G(\gamma f)$ for all $\omega \in \Omega \setminus \mathcal{N}$, and consider $\omega$ fixed in this set of measure 1 for the remainder of this proof. Substituting $m^{-1} J_m \,f$ for $u$ in expression \ref{eqn:empcdfGm} shows that \begin{equation} m^{-1} J_m = G_m(m^{-1} J_m f) \label{eqn:Jom_eq_GmofJomf} \end{equation} Let $H_m(u) = G_m(u f) - u$ and $H(u) = G(u f) - u$. While $H^{-1}(0) = \{0, \gamma \}$ contains only 0 and a unique non-zero solution, $G_m$ is a step function and therefore, $H_m^{-1}(0) = \{0, u_1, u_2,\ldots,u_k\}$ can contain multiple non-zero solutions. None-the-less, for each $m$, $H_m^{-1}(0)$ is a finite set. By definition, $J_m/m$ is an element of the set $H_m^{-1}(0)$. It follows that \begin{eqnarray*} m^{-1} J_m &\leq& \sup H_m^{-1}(0)\nonumber\\ &=& \max H_m^{-1}(0).\nonumber \end{eqnarray*} where the second line follows because the set is finite. Thus, taking limsup with respect to $m$ on both sides above gives: \begin{eqnarray*} \limsup_m m^{-1} J_m &\leq& \limsup_m \max H_m^{-1}(0) \\ &=& H^{-1}(0) = \gamma\,. \end{eqnarray*} where the last equality follows because we can interchange the order of the limsup and maximum and because the limit exists. In the other direction, next note that because $m^{-1} J_m$ is a solution to $u = G_m(u f)$, it also follows that $m^{-1} J_m \geq u$ for every $u$ such that $u < G_m(u f)$. Thus, \begin{equation} m^{-1} J_m \geq \sup \{u : u < G_m(u f) \} = \sup H_m^{-1}((0,\infty))\,. \label{eqn:Jom_geq_Gm} \end{equation} Because of the convexity of the limiting function, $G$, it follows, for $m$ large enough, that $\sup H_m^{-1}((0,\infty)) = \max H_m^{-1}(0)$. Therefore, upon taking taking liminf with respect to $m$ on both sides we have: \begin{eqnarray*} \liminf_m m^{-1} J_m &\geq& \liminf_m \sup H_m^{-1}((0,\infty))\\ &=& \liminf_m \max H_m^{-1}(0)\\ &=& H^{-1}(0) = \gamma\\ \end{eqnarray*} where the last equality follows because we can interchange the order of liminf and the maximum and because the limit exists. This completes the proof. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:SoM_convas}] First, we note that \begin{equation} m^{-1} S_m = m^{-1} \sum_{i=1}^m \xi_i \, I\left( P_i \leq m^{-1} J_m f \right)\,, \end{equation} is the average of row $m$ in a triangular array of finite exchangeable sequences. We will apply Theorem 1 of \cite{TaylorRL:1985}. Let $W_{m,i}=\xi_i \,I\left(P_i\leq m^{-1} J_m f\right), \mu_m = {\mathbb{E}}[W_{m,1}]$ and $Z_{m,i} = W_{m,i} - \mu_m$. We must show that (i) the increments on the $m^{th}$ row, $W_{m,i}$, each converge almost surely to respective elements of a sequence $W_{\infty, i}$; (ii) the increments $W_{m,i}$ have variances tending to a limit and (iii) for each $m, i$ and $j$, the covariance of increments $W_{m,i}$ and $W_{m,j}$ tend to zero. \begin{remark} Our condition (i), element-wise almost sure convergence, which on surface appears weaker than the corresponding first condition in the cited reference, almost sure monotone decreasing distances to the limit, is sufficient in the context of the other assumptions. See the remark following the proof of Theorem 3 in that reference. \end{remark} Verification of condition (i) is trivial, as it follows by Theorem \ref{thm:Jom_convas} that $W_{m,i}\rightarrow W_{\infty,i} = \xi_i\, I\left( P_i \leq \gamma f \right)$ almost surely as $m\rightarrow \infty $ for each $i$. Let $\mu = {\mathbb{E}}[W_{\infty,1}]$. Condition (ii) follows easily since $Z_{m,i}$ is bounded, so that by the LDCT, for each $i$, ${\mathbb{E}}\left[Z_{m,i}^2 \right] \rightarrow {\mathbb{E}}\left[Z_{\infty,i}^2 \right]$ as $m\rightarrow\infty$. Note that the same argument verifies that $\mu_m \rightarrow \mu$. Next, to verify that condition (iii) is satisfied, note first, for $1 \leq i_1 < i_2 \leq m$, that $(W_{m,i_1} - \mu_m)(W_{m,i_2} - \mu_m)$ is bounded above by $4$, and converges almost surely to $(W_{\infty,i_1} - \mu)(W_{\infty,i_2} - \mu)$, by Theorem \ref{thm:Jom_convas}. Thus, condition (iii) follows by the LDCT. We may now apply Theorem 1 of \cite{TaylorRL:1985} to conclude that $m^{-1} \sum_{i=1}^m Z_{m,i} \rightarrow 0$ almost surely as $m\rightarrow \infty$. Therefore, \begin{eqnarray*} \lim_{m\rightarrow\infty} m^{-1} S_m &=& \lim_{m\rightarrow\infty} \mu_m + m^{-1} \sum_{i=1}^m Z_{m,i}\\ \\ &=& \mu\,, \;\mathrm{with~probability~one,} \end{eqnarray*} and the last written expectation is equal to $r\,\P \left\{ P_i \leq \gamma f \mid \xi_i=1\right\}$. Because $m^{-1} M_m \rightarrow r$ almost surely as $m\rightarrow\infty$, it follows that $M_m^{-1}\,S_m\rightarrow\P\left\{ P_i \leq \gamma f \mid \xi_i=1\right\} = \pi_{_\mathrm{pi}}$ almost surely as $m\rightarrow\infty$. Because $m^{-1} S_m$ is bounded by 1, the average power, its expectation, also converges to $\pi_{_\mathrm{pi}}$ as $m\rightarrow\infty$ by the LDCT. \end{proof} \begin{proof}[Proof of Corollary \ref{cor:FDF_convas}] The first and second statements follow immediately from Theorems \ref{thm:Jom_convas} and \ref{thm:SoM_convas}: \begin{equation} m^{-1} T_m = m^{-1} (J_m - S_m) \convas \gamma - r\,\pi_{_\mathrm{pi}} = (1-r)\,f\,\gamma\,, \end{equation} and \begin{equation} J_m^{-1} T_m = 1 - J_m^{-1}S_m) \convas 1 - r\pi_{_\mathrm{pi}}/\gamma = (1-r)\,f\,. \end{equation} where the last equality in each of the expressions above follow since $\gamma = G(\gamma \,f)$. The third statement follows by the LDCT. \end{proof} \begin{proof}[Proof of Corollary \ref{cor:pi1Alt}] In the definition of the IST power function, $\pi_{_\mathrm{pi}}$, appearing in the statement of Theorem \ref{thm:SoM_convas}, $\pi_{_\mathrm{pi}} = \bar F_{\nu, n}(\bar F_{0,n}^{-1}(\gamma\,f))$ we substitute $\gamma = (1-f_0)^{-1} \,r \pi_{_\mathrm{pi}}$ from expression \ref{eqn:gamma_expr} obtaining the result. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:CLT}] \noindent The proof of both statements is made possible by considering each as a stopped stochastic process. We first revisit the empirical CDF's defined in the proofs of Theorems \ref{thm:Jom_convas} and \ref{thm:SoM_convas}. In the case of $J_m/m$, we have, \begin{eqnarray} G_{_{m}}(t) &=& m^{-1}\sum_{i=1}^m I\left( P_i \leq t \right)\,,\label{eqn:Gm_t}\\ &&\nonumber\\ G(t) &=& (1- r) \, t\, + \,r \, \bar F_{\nu,n}(\bar F_{0,n}^{-1}(t)\,. \label{eqn:G_t} \end{eqnarray} \noindent First, by the standard theory of empirical distributions, see for example \cite{ShorackWellner:1986} \begin{equation} W_m(t) = \sqrt{m} \left(G_m(t) - G(t)\right) \convind W(t)\,,\label{eqn:Wm_t_convind} \end{equation} a Gaussian process with covariance function \begin{equation} \rho(s,t) = G(s\wedge t) \, - \, G(s)\,G(t)\,. \label{eqn:covW} \end{equation} Having shown that the paths of the centered and scaled stochastic process $W_m$ converge in distribution, we can obtain the CLT for the centered and scaled version of the positive fraction, $J_m/m$, claimed in expression \ref{eqn:CLT_Jortm}, by appealing to a result concerning weak limits of stopped stochastic processes. Towards this end, define the family of filtrations, \begin{equation} \mathcal{F}_t = \sigma\left(\{ \xi_i\,I(P_i \leq t),\,(1-\xi_i)\,I(P_i \leq t), i\geq 1\}\right)\,. \nonumber \end{equation} Note that $W$ and $W_m$ are adapted to $\mathcal{F}_t$ for all $m\geq 1$, and that $\tau_m = m^{-1} J_m f$ is a stopping-time with respect to this filtration since, clearly, $\{\tau_m \leq t\} \in \mathcal{F}_t$. We will apply Theorem 4.2.1 of \cite{SilvestrovD:2004} to conclude that $W_m(\tau_m)$ converges in distribution to $W(\gamma\,f)$. To do so, we must verify the following three conditions. \begin{itemize} \item[i.~] $(W_m, \tau_m) \convind (W, \gamma\,f)$ \item[ii.~] $\P\{ \lim_{t\rightarrow 0} W(\gamma\,f + t) = W(\gamma\,f)\} = 1$ \item[iii.~] For all $\delta >0, \lim_{c\rightarrow 0} \limsup_{m\rightarrow\infty} \P\{ \Delta(W_m, c, 1) > \delta \} = 0\,,$ \end{itemize} where $\Delta(x, c, 1)$ is the Skorohod modulus of compactness, \begin{equation} \Delta(x, c, 1) = \sup_{t, t', t'' \in [0,1]} \sup_{ t-c < t' < t < t'' < t+c} |x(t) - x(t')| + |x(t'') - x(t)| \end{equation} Having already established that the paths of $W_m$ converge in distribution to those of $W$ above \ref{eqn:Wm_t_convind}, as well as the almost sure convergence of $\tau_m = J_m f/m$ to the constant $\tau = \gamma f$ in theorem \ref{thm:Jom_convas}, then part (i) is satisfied by Slutsky's theorem. Item (ii) is true because the limiting process, $W$, a Gaussian process, is almost surely continuous at every $t \in [0,1]$. The almost sure continuity of the limiting process, $W$, also guarantees that the third condition, (iii), holds as well. Thus \begin{eqnarray} W_m(m^{-1} \,J_m\,f) &=& \sqrt{m} \left(G_m(m^{-1} \,J_m\,f) - G(m^{-1} \,J_m\,f)\right)\nonumber\\ &\convind& W(\gamma\,f)\,,\label{eqn:Wm_taum_convind} \end{eqnarray} where the limiting random variable is normally distributed, of mean zero, and variance \begin{equation} \rho(\gamma\,f, \, \gamma\,f) = G(\gamma\,f) \, - \, G^2(\gamma\,f) = \gamma\,(1-\gamma)\label{eqn:varW} \end{equation} \noindent The statement \ref{eqn:Wm_taum_convind} is nearly statement \ref{eqn:CLT_Jortm}, except that in \ref{eqn:CLT_Jortm}, centering is with respect to the deterministic limit, $\gamma = G(\gamma\,f)$. Thus, starting with $\sqrt{m}(J_m/m - \gamma))$ we add and subtract, obtaining a ``delta-method'' term. We can now write \begin{eqnarray} X_m &\equiv& \sqrt{m} \left(m^{-1} J_m \, - \,\gamma \right) \nonumber\\ &=& \sqrt{m} \left(G_m(m^{-1} \,J_m\,f) - G(\gamma \,f)\right) \nonumber\\ &=& \sqrt{m} \left(G_m(m^{-1} \,J_m\,f) - G(m^{-1} \,J_m\,f)\right) \nonumber\\ && \;\;+\,\sqrt{m} \left(G(m^{-1} \,J_m\,f) - G(\gamma\,f)\right)\nonumber\\ &=& W_m(m^{-1} \,J_m\,f) + f\,\dot{G}(\gamma\,f)\, X_m + \epsilon_m\label{eqn:Xm} \end{eqnarray} where $\epsilon_m = o_p(1)$. The conclusion of this portion of the proof requires that $f\, \dot{G}(\gamma\,f) <1 $. By the monotone likelihood ratio property, it follows that $G$ is concave as is the function $f\, G$. Because $f\,G(u) = u$ when $u=0$ and when $u=\gamma\, f$, then there is exactly one $u_1 \in (0, \gamma\,f)$ for which $f\,\dot{G}(u_1) = 1$. By the concavity of $f\, G$, $f\,\dot{G}(u) > 1$ for $0 < u < u_1$ and $f\,\dot{G}(u) < 1$ for $u_1 < u < \gamma\,f$. Thus $f\,\dot{G}(\gamma\, f) < 1$. With this bound in hand, the steps above leading to \ref{eqn:Xm} can be iterated ad-infinitum, yielding \begin{eqnarray*} X_m &=& \left(W_m(m^{-1} \,J_m\,f) + \epsilon_m \right) \, \sum_{k=0}^{\infty} f^k\,\dot{G}(\gamma\,f)^k\\ &=& \frac{W_m(m^{-1} \,J_m\,f) + o_p(1)}{1 - f\,\dot{G}(\gamma\,f)}\\ &\convind& X \equiv \frac{W(\gamma\,f)}{1 - f\,\dot{G}(\gamma\,f)}\,, \end{eqnarray*} which establishes claim \ref{eqn:CLT_Jortm} above and identifies the form of the limiting mean zero normal random variable. Its variance, $\tau^2$, is given by \begin{equation} \tau^2 = \frac{\gamma (1 - \gamma)}{\left(1-\dot{G}(\gamma\, f)\, f\right)^2}\,.\label{eqn:varX} \end{equation} \noindent Next, we turn our attention towards verification of the CLT for the centered and scaled TPF, $S_m/M_m$, which is claim \ref{eqn:CLT_rtmSoM} above. We first revisit the empirical sub CDF's corresponding to the joint outcome of the indicator $\xi_i$ and the indicator $I(P_i \leq t)$ and their almost sure deterministic limits. \begin{eqnarray} G_{_{m,0}}(t) &=& m^{-1}\sum_{i=1}^m (1- \xi_i ) \, I\left( P_i \leq t \right)\,,\label{eqn:Gm0_t}\\ &&\nonumber\\ G_{_{m,1}}(t) &=& m^{-1}\sum_{i=1}^m \xi_i \, I\left( P_i \leq t \right)\,,\label{eqn:Gm1_t}\\ &&\nonumber\\ G_{_{0}}(t) &=& (1- r) \, t\,,\label{eqn:G0_t}\\ &&\nonumber\\ G_{_{1}}(t) &=& r \, \bar F_{\nu,n}(\bar F_{0,n}^{-1}(t)\,.\label{eqn:G1_t} \end{eqnarray} \noindent This time we look at the bivariate process with components scaled and centered versions of $G_{_{m,0}}(t)$ and $G_{_{m,1}}(t)$. Again, from the standard results concerning empirical CDF's, \citep{ShorackWellner:1986, GenoveseC:2004} the following bivariate process converges in distribution. \begin{equation} \left[\begin{array}{c} W_{m,0}(t)\\ W_{m,1}(t) \end{array}\right] = \sqrt{m}\left[\begin{array}{c} G_{m,0}(t) - G_0(t)\\ G_{m,1}(t) - G_1(t) \end{array}\right] \convind \left[\begin{array}{c} W_0(t)\\ W_1(t) \end{array}\right]\,,\nonumber \end{equation} \noindent where the limit is a bivariate Gaussian process with covariance kernel \begin{equation} R(s,t) = \left[\begin{array}{cc} G_0(s\wedge t) - G_0(s) \,G_0(t) & -G_0(s)\,G_1(t) \\ -G_0(t)\,G_1(s) & G_1(s \wedge t) - G_1(s) G_1(t) \end{array}\right]\,.\nonumber \end{equation} We remark in passing, something which should be already clear, that $W_m(t) = W_{m,0}(t) + W_{m,1}(t)$ and $W(t) = W_0(t) + W_1(t)$. If follows from some algebra and the fact that $\gamma = G(\gamma\,f)$ that this ``new characterization'' of $W$ is consistent with the characterization of the process given above. This allows us to compute covariances between $W(t)$ and either $W_0(t)$ or $W_1(t)$ according to the covariance kernel, $R(s,t)$, as needed below. Note that $W_{0}, W_{1}$ and for all $m$, $W_{m,0}, W_{m, 1}$ are all adapted to the filtration, $\mathcal{F}_t$ and that $\tau_m = m^{-1}\, J_m \,f$ is a stopping time with respect to the it, so that once again we apply the result of \cite{SilvestrovD:2004} to obtain convergence of the stopped bivariate process. As remarked above, the conditions are satisfied since convergence is already established and the limit is almost surely continuous. \begin{equation} \left[\begin{array}{c} W_{m,0}(J_m\,f/m)\\ W_{m,1}(J_m\,f/m) \end{array}\right] = \sqrt{m}\left[\begin{array}{c} G_{m,0}(J_m\,f/m) - G_0(J_m\,f/m)\\ G_{m,1}(J_m\,f/m) - G_1(J_m\,f/m) \end{array}\right] \convind \left[\begin{array}{c} W_0(\gamma\,f)\\ W_1(\gamma\,f) \end{array}\right]\,,\label{eqn:bvrt} \end{equation} Focusing for the moment on the second component above in \ref{eqn:bvrt} and adding and subtracting as before, \begin{eqnarray*} X_{m,1} &\equiv& \sqrt{m}\left(m^{-1} S_m - r \,\pi_{_\mathrm{pi}}\right)\\ &=& \sqrt{m}\left(G_{m,1}(J_m\,f/m) - G_1(\gamma\,f)\right)\\ &=& \sqrt{m}\left(G_{m,1}(J_m\,f/m) - G_1(J_m\,f/m)\right)\\ &&\;\;+\,\sqrt{m}\left(G_1(J_m\,f/m) - G_1(\gamma\,f)\right) \end{eqnarray*} Thus, \begin{eqnarray*} X_{m,1} &\convind& X_1 =W_1(\gamma\,f) +f\,\dot{G}_1(\gamma\, f)\, X\\ &=& W_1(\gamma\,f)+\frac{\dot{G}_1(\gamma\,f)\,f}{1-f\,\dot{G}(\gamma\,f)}\,\left(W_0(\gamma\,f)+W_1(\gamma\,f)\right) \end{eqnarray*} which is a mean zero normal random variable having variance equal to \begin{equation} {\mathrm{var}}[X_1] = v_1+\dot{G}_1^2(\gamma\,f)\,f^2\tau^2+2 f\,\frac{\dot{G}_1(\gamma\,f)\,(v_1+c_{0,1})}{1-f\,\dot{G}(\gamma\,f)} \end{equation} where $v_1 = r \,\pi_{_\mathrm{pi}} - r^2 \, \pi_{_\mathrm{pi}}^2$ and $c_{_{0,1}} = -r \,(1-r)\,\gamma \,f \,\pi_{_\mathrm{pi}}$. To complete the proof of statement \ref{eqn:CLT_rtmSoM} we need only apply the delta method once more, for a ratio estimate. Before proceeding, we note that \begin{eqnarray*} \sqrt{m}(M_m/m -r) &=& \sqrt{m}\left(G_{m,1}(1) - G_1(1)\right)\\ &\convind& W_1(1) \end{eqnarray*} Thus, \begin{eqnarray*} Z_{m,1} &\equiv& \sqrt{m}\left(\frac{S_m}{M_m} - \pi_{_\mathrm{pi}}\right)\\ &=& \sqrt{m}\left(\frac{S_m/m}{M_m/m} - \pi_{_\mathrm{pi}}\right)\\ &=&\frac{1}{r}\,\sqrt{m}\left(\frac{S_m}{m}-r\pi_{_\mathrm{pi}}\right)-\frac{r\pi_{_\mathrm{pi}}}{r^2}\, \sqrt{m}\left(\frac{M_m}{m}-r\right) + \epsilon_m\\ &\convind& \frac{1}{r}\,\left\{W_1(\gamma\,f) + \frac{f\,\dot{G}_1(\gamma\, f)}{1- f\,\dot{G}(\gamma\, f)} \, \left(W_0(\gamma\,f) + W_1(\gamma\,f)\right)\right\} - \frac{r\pi_{_\mathrm{pi}}}{r^2}\,W_1(1) \\ &\equiv& Z_1 = N(0, \sigma^2)\,, \end{eqnarray*} where $\epsilon_m$ above is a new term that is $o_p(1)$ and and this completes the proof of statement \ref{eqn:CLT_rtmSoM} above and identifies the form of the limiting mean zero normal random variable, $Z_1$. Its variance is given by \begin{equation} \sigma^2 = r^{-2} \, \left({\mathrm{var}}[X_1] -2\, \pi_{_\mathrm{pi}} \,{\mathrm{cov}}[X_1, W_1(1)] +\pi_{_\mathrm{pi}}^2 \,{\mathrm{var}}[W_1(1)] \right)\,,\label{eqn:s2} \end{equation} where ${\mathrm{var}}[X_1]$ was given above, ${\mathrm{var}}[W_1(1)] = r\,(1-r)$, and \begin{equation} {\mathrm{cov}}[X_1, W_1(1)]=r\,(1-r)\,\left\{\pi_{_\mathrm{pi}}+f\,\dot{G}_1(\gamma\,f) \frac{\gamma\,f +\pi_{_\mathrm{pi}}}{1-f\,\dot{G}(\gamma\,f)}\right\} \end{equation} The proof of the CLT for the centered and scaled version of the false discovery fraction follows fairly easily from the parts proved above. First, re-writing the centered and scaled difference in terms of the TPF, gives the first line, for which we again invoke the delta method, which yields the second line. \begin{eqnarray*} X_{m,0} &\equiv& \sqrt{m}\left(\frac{T_m}{J_m} - (1-r) \, f \right) = -\sqrt{m}\left(\frac{S_m}{J_m} - \frac{r \pi_{_\mathrm{pi}}}{\gamma} \right)\\ &=& -\gamma^{-1} \left\{\sqrt{m}\left(m^{-1}S_m - r\pi_{_\mathrm{pi}}\right) - \gamma^{-1} r \pi_{_\mathrm{pi}}\left(m^{-1}J_m - \gamma\right) + \epsilon_m \right\}\\ &\convind& -\gamma^{-1} \left\{ X_1 + \gamma^{-1} r \pi_{_\mathrm{pi}} X \right\}\\ &=& -\gamma^{-1} \left\{\frac{f \dot{G}_1(\gamma f) - \gamma^{-1} r \pi_{_\mathrm{pi}}}{1 - f \dot{G}(\gamma f)} W_0 + \left(1 + \frac{f \dot{G}_1(\gamma f) - \gamma^{-1} r \pi_{_\mathrm{pi}}}{1 - f \dot{G}(\gamma f)}\right) W_1 \right\}\\ &=& -\gamma^{-1} \left\{\frac{f \dot{G}(\gamma f) - (1-r)\,f - \gamma^{-1} r \pi_{_\mathrm{pi}}}{1 - f \dot{G}(\gamma f)} W_0 + \left(1 + \frac{f \dot{G}(\gamma f) - (1-r)\,f- \gamma^{-1} r \pi_{_\mathrm{pi}}}{1 - f \dot{G}(\gamma f)}\right) W_1 \right\}\\ &=& -\gamma^{-1} \left\{\frac{f \dot{G}(\gamma f) - 1}{1 - f \dot{G}(\gamma f)} W_0 + \left(1 + \frac{f \dot{G}(\gamma f) - 1}{1 - f \dot{G}(\gamma f)}\right) W_1 \right\}\\ &=& \gamma^{-1} W_0 \end{eqnarray*} Convergence of all quantities in the second line was established above. The remaining lines are algebraic, and make use of the fact that $\dot{G}_1(t) = \dot{G}(t) - (1-r)$ (line 5) and $G(\gamma \,f) = \gamma$ (line 6). As before, $\epsilon_m$ is a new term that is $o_p(1)$. The limiting random variable is of mean zero and normally distributed, having variance equal to \begin{equation} \alpha^2 = \frac{(1-r)\,f\,\left( 1 - (1-r)\,f\,\gamma\right)}{\gamma}\label{eqn:a2} \end{equation} \end{proof} \begin{proof}[Proof of Theorem \ref{thm:LowerBdd}] Before we begin, we present an alternate expression for the event that the number of true positives is $s$ or greater. \begin{equation} \{S_m \geq s \} = \left\{ P_{1,(s)} \leq \frac{J_m f}{m}\right\}\nonumber \end{equation} This is clearly the case, since there can be $s$ or more true positives if and only if the $s^{th}$ order statistic in the non-null distributed population is less than the threshold $J_m f/m$. Now, towards obtaining a lower bound, we begin with the fact that the expected value of discrete non-negative variable can be derived as the sum of its cCDF. This can be used to write an expression of the FST average power by first conditioning on $M_m$: \begin{eqnarray} \pi_{_{\mathrm{av},m}} &=& {\mathbb{E}}[ S_m / M_m ] \nonumber \\ &=& \sum_{\ell=1}^{m} \ell^{-1} \,{\mathbb{E}} [ S_m \mid M_m={\ell}]\,\P\{ M_m=\ell\}\nonumber\\ &=& \sum_{\ell=1}^{m} \ell^{-1} \,\sum_{s=1}^{m} \P\{ S_m \geq s \mid M_m=\ell \}\,\P\{ M_m=\ell\}\nonumber\\ &=& \sum_{\ell=1}^{m} \ell^{-1} \,\sum_{s=1}^{m} \P\{P_{1,(s)} \leq f\,J_m/m\}\,\P\{ M_m=\ell\} \label{eqn:lwrbddeqn3}\\ &\geq& \sum_{\ell=1}^{\infty} m^{-1} \,\sum_{s=1}^{m} \P\{P_{1,(s)} \leq f s/m\}\,\P\{ M_m=\ell\}\nonumber\,, \end{eqnarray} where the first equality is just the law of total probability, conditioning on values of $M_N$, the second equality is just the fact that an expectation of a non-negative random variable is the sum over values of $s$ of its cCDF, the third equality is an application of the alternate expression stated above, and the lower bound in the last line is deduced by observing that $P_{1,(s)} \leq f\,J_N/N$ if and only if $J_N \geq s$. The last written line is equal to $\pi^{L}_{\mathrm{av},m}$ as presented in Theorem \ref{thm:LowerBdd} because the CDF of the $s^{th}$ order statistic, $P_{1,(s)}$, takes the form shown involving the beta distribution. \end{proof} \fi \vfil\eject
\section{Introduction} The fundamental communication problem in broadcast channels is to design an efficient coding scheme to satisfy the demands of multiple clients with minimal use of the shared communication medium. Remarkable savings in the broadcast channel use is possible if clients or receivers have prior information stored in their caches that are demanded by other users in the network. This could happen, for instance, when the clients are allowed to listen to prior transmissions from the server. For such broadcast channels with \textsl{side-information}, Index Coding was proposed by Birk and Kol in \cite{BiK_INFOCOM_98}. The idea of Index Coding is to broadcast a coded version of information symbols from the server so that all the receivers can simultaneously decode their demands from the broadcast codeword and their individual side-information symbols. Of the several classes of index coding problems discussed in the literature since~\cite{BiK_INFOCOM_98}, the most widely studied is \textit{unicast index coding}, in which each message symbol available at the server is demanded by a unique client. The side information configuration of a unicast index coding problem is often represented using a directed graph called the \emph{side-information graph} of the problem. Given such a side-information graph, the goal of index coding is to design optimal index codes in terms of minimizing the channel usage. In \cite{YBJK_IEEE_IT_11}, the authors connected the optimal (scalar) linear index coding problem to finding a quantity called \textit{minrank} of the {side-information graph}. This minrank problem is known to be NP-hard in general~\cite{Pee_96}, but several approaches have been taken to address this problem, most popularly via graph theoretic ideas, to bound the optimal index coding rate from above and below; see, for example, \cite{BiK_INFOCOM_98,YBJK_IEEE_IT_11,ALSWH_FOCS_08,BKL_arxiv_10,CASL_ISIT_11,TDN_ISIT_12,BKL_IT_13,NTZ_IT_13,SDL_ISIT_13,SDL_ISIT_14,ArK_ISIT_14,MCJ_IT_14,AgM_arXiv_16}. The techniques used in these works naturally lead to constructions of (scalar and vector) linear index codes. Most of the known constructions in index coding literature assume that the clients will download all the symbols in the transmitted codeword in order to decode their demanded symbol. In practice, this could be prohibitive, since the length of the codeword can be much larger than that of the message demanded at a receiver, especially when the number of users is large and their demands are varied. We may however expect this situation to be the norm in our current and future wireless networks. In light of this, it may be appropriate to use index codes in which each client can decode its demand by accessing only a subset of the codeword symbols. Using the terminology from~\cite{HaL_ISIT_12}, we refer to such codes as \emph{locally decodable index codes}. Designing a locally decodable index code can be thought of as a `client aware' approach to the broadcast problem that takes into account the overhead incurred by the clients while participating in the communication protocol, while conventional index coding (without locality considerations) is more `channel centric' with its emphasis purely on minimizing the number of channel uses. Locally decodable index codes have been discussed briefly in~\cite{HaL_ISIT_12} and in the context of privacy in~\cite{KSCF_arXiv_17}. However, a fundamental treatment of the same is not available in the literature to the best of our knowledge. \subsection{Contributions and Organization} In this work, we present a formal structure to the discussion regarding locally decodable index codes and present several constructions of such codes along with their locality parameters for the class of unicast index coding. We first define the \emph{locality} of an index code as the number of codeword symbols queried by a receiver for each demanded information symbol, and pose the index coding problem as that of minimizing the broadcast rate (ratio of codeword length to message length) for a given desired value of locality (Section~\ref{sec:defn}). We then show that the minimum locality of any unicast index coding problem is $1$, and the optimum index code for this value of locality is the code derived from the optimum fractional coloring of the \emph{interference graph} of the given problem (Section~\ref{sec:fractional_coloring}). We then provide several constructions of locally decodable index codes by covering the side-information graph using acyclic subgraphs and subgraphs of small minrank. We also show how the traditional partition multicast~\cite{BiK_INFOCOM_98,TDN_ISIT_12} and cycle covering~\cite{NTZ_IT_13,CASL_ISIT_11} solutions to index coding can be modified to yield locally decodable index codes (Section~\ref{sec:design}). Using these coding techniques and information-theoretic inequalities we derive the exact trade-off between locality and broadcast rate of the $3$-user unicast index coding problem whose side information graph is a directed cycle (Section~\ref{sec:3cycle}). Finally in Section~\ref{sec:conclusion} we discuss the relation of locally decodable index codes with the problems of sparse representation of vectors and privacy-preserving index codes and conclude the paper. {\em Notation:} For any positive integer $N$, we will denote the set $\{1,\dots,N\}$ by $[N]$. Row vectors will be denoted by bold lower case letters, for example $\xb$. For any length $N$ vector \mbox{$\xb=(x_1,\dots,x_N)$} and a set $R \subset [N]$, we define $\xb_R$ to be the sub-vector $(x_j, j \in R)$. For a set of vectors $\xb_1,\dots,\xb_N$ and a subset $K \subset [N]$, we define $\xb_K$ to be the vector $(\xb_j, j \in K)$. The empty set is denoted by $\varnothing$. For a matrix $\pmb{A}$, the component in $j^{\text{th}}$ row and $i^{\text{th}}$ column is denoted as $\pmb{A}_{j,i}$. \section{Definitions and Preliminaries} \label{sec:defn} The index coding problem~\cite{BiK_INFOCOM_98,YBJK_IEEE_IT_11} consists of a single transmitter jointly encoding $N$ independent messages $\xb_1,\dots,\xb_N$ to broadcast a codeword $\pmb{c}$ to multiple receivers through a noiseless broadcast channel. We consider the family of \emph{unicast index coding} problems, where each message $\xb_i$ is desired at exactly one of the receivers, denoted as $(i,K_i)$, where \mbox{$K_i \subset [N]$} is the set of indices of the messages already known to the receiver as side information. Without loss of generality, we assume that $i \notin K_i$. The {\em side information graph} of this index coding problem is the directed graph $G=(\Vc,\mathcal{E})$, where the vertex set \mbox{$\Vc=[N]$} and the edge set $\mathcal{E}=\{(i,j)\,|\, \text{for all }j \in K_i, i \in [N]\}$. Throughout this paper we will consider only unicast index coding problems and denote a problem by its side information graph $G$. We assume that the messages $\xb_1,\dots,\xb_N$ are vectors of length $m$ over a finite alphabet $\mathcal{A}$, with $|\mathcal{A}| > 1$, and the codeword $\pmb{c}$ is a vector of length $\ell$ over the same alphabet, i.e., $\xb_i \in \mathcal{A}^m$, $i \in [N]$, and $\pmb{c} \in \mathcal{A}^\ell$. We will assume that the alphabet $\mathcal{A}$ is arbitrary but fixed for a given index coding problem. The transmitted codeword $\pmb{c}=(c_1,c_2,\dots,c_\ell)$ is a function of the messages $\pmb{c}=\mathfrak{E}(\xb_1,\dots,\xb_N)$, where $\mathfrak{E}: \mathcal{A}^{mN} \to \mathcal{A}^{\ell}$ denotes the encoder. Instead of observing the entire codeword $\pmb{c}$, the $i^{\text{th}}$ receiver observes only a sub-vector \mbox{$\pmb{c}_{R_i} = (c_j, j \in R_i)$}, where $R_i \subset [\ell]$, and the receiver desires to estimate the message $\xb_i$ using $\pmb{c}_{R_i}$ and its side information $\xb_j$, $j \in K_i$. The decoder at the $i^{\text{th}}$ receiver is a function \begin{equation*} \mathfrak{D}_i: \mathcal{A}^{|R_i|} \times \mathcal{A}^{m|K_i|} \to \mathcal{A}^{m}, \end{equation*} and the estimate of the message $\xb_i$ at the $i^{\text{th}}$ receiver $(i,K_i)$ is \mbox{$\mathfrak{D}_i(\pmb{c}_{R_i},(\xb_j,j \in K_i))$}. The tuple $(\mathfrak{E},\mathfrak{D}_1,\dots,\mathfrak{D}_N)$ of encoding and decoding functions denotes a {\em valid index code} for the index coding problem represented by the side information graph $G=(\Vc,\mathcal{E})$ if $\mathfrak{D}_i(\pmb{c}_{R_i},(\xb_j,j \in K_i)) = \xb_i$ for all $i \in [N]$ and all $(\xb_1,\dots,\xb_N) \in \mathcal{A}^{mN}$, where $\pmb{c}=\mathfrak{E}(\xb_1,\dots,\xb_N)$. The receiver $(i,K_i)$ decodes $\xb_i$ using the sub-vector $\pmb{c}_{R_i}$, and hence, $|R_i|$ is the number of symbols queried or downloaded by this receiver when using the index code $(\mathfrak{E},\mathfrak{D}_1,\dots,\mathfrak{D}_N)$. For fairness, we normalize $|R_i|$ by the number of symbols $m$ in the desired message $\xb_i$ to define the {\em locality $r_i$ of the $i^{\text{th}}$ receiver} as $r_i = {|R_i|}/{m}$, for $i \in [N]$. \begin{definition} The {\em locality} or the {\em overall locality} of the index code $(\mathfrak{E},\mathfrak{D}_1,\dots,\mathfrak{D}_N)$ \begin{equation} \label{eq:defn_r} r = \max_{i \in [N]} \, r_i = \max_{i \in [N]} \, \frac{|R_i|}{m} \end{equation} is the maximum number of coded symbols queried by any of the $N$ receivers per decoded information symbol. \end{definition} The {\em broadcast rate} of this index code is \mbox{$\beta=\ell/m$}, and measures the bandwidth or time required by the source to broadcast the coded symbols to all the receivers. Without loss of generality we will consider only those index codes for which $R_1 \cup \cdots \cup R_N = [\ell]$ since any codeword symbol $c_j$ which is not utilized at any of the receivers, i.e., $c_j$ for $j \in [\ell] \setminus (R_1 \cup \cdots \cup R_N)$, need not be generated or transmitted by the encoder. For a given locality $r$, it is desirable to use an index code with as small a value of $\beta$ as possible and vice versa, which leads us to the following definition. \begin{definition} Given a unicast index coding problem $G$, the {\em optimal broadcast rate function} $\beta_{G}^*(r)$ is the infimum of the broadcast rates among all message lengths \mbox{$m \geq 1$} and all valid index codes with locality at the most $r$. \end{definition} The function $\beta_G^*(r)$ captures the trade-off between the reduction in the number of channel uses possible through coding and the number of codeword symbols that a receiver has to query to decode each message symbol. We will rely on information-theoretic inequalities to obtain bounds on $\beta_G^*(r)$, and to do so we will assume that the messages $\xb_1,\dots,\xb_N$ are random, independent of each other and are uniformly distributed in $\mathcal{A}^m$. The logarithms used in measuring mutual information and entropy will be calculated to the base $|\mathcal{A}|$. For example, the entropy of $\xb_i$ is $H(\xb_i)=m$ since $\xb_i$ is uniformly distributed in $\mathcal{A}^m$. We will now prove some properties of $\beta_G^*(r)$. \begin{lemma} The locality $r$ of any valid index coding scheme satisfies \mbox{$r \geq 1$}. \end{lemma} \begin{proof} This can be shown using the fact $I(\xb_i;\pmb{c}_{R_i},\xb_{K_i})=H(\xb_i)=m$, which arises when considering the decoder at the $i^{\text{th}}$ receiver. Since $\xb_i$ is independent of $\xb_{K_i}$ (because $i \notin K_i$), $I(\xb_i;\xb_K)=0$, and \begin{align} m &= I(\xb_i;\pmb{c}_{R_i},\xb_{K_i}) = I(\xb_i;\xb_{K_i}) + I(\xb_i;\pmb{c}_{R_i}|\xb_{K_i}) \nonumber \\ &= I(\xb_i;\pmb{c}_{R_i}|\xb_{K_i}) \leq H(\pmb{c}_{R_i}) \leq |R_i|. \label{eq:simple_bound_on_r} \end{align} Hence, $r_i = |R_i|/m \geq 1$ for all $i \in [N]$, and $r \geq 1$. \end{proof} Note that uncoded transmission, i.e., $\pmb{c}=(\xb_1,\dots,\xb_N)$, is a valid index code with $r=1$. Hence, we will assume that the domain of the function $\beta_G^*$ is the interval $1 \leq r < \infty$. \begin{lemma} \label{lem:convexity} The function $\beta_G^*(r)$ is convex and non-increasing. \end{lemma} \begin{proof} See Appendix~\ref{app:lem:convexity}. \end{proof} For any valid index code, we have $|R_i| \leq \ell$, and hence, $r = \max_i |R_i|/m \leq \ell/m = \beta$. Hence, if there exists a valid index code with broadcast rate $\beta$, then its locality is at the most $\beta$, and hence, \begin{equation} \label{eq:betaG_simple_1} \beta_G^*(\beta) \leq \beta. \end{equation} We will denote by ${\beta}_{\sf opt}(G)$ the infimum among the broadcast rates of all valid index codes for $G$ (considering all possible message lengths $m \geq 1$ and all possible localities $r \geq 1$). Then it follows that $\beta_G^*(r) \geq {\beta}_{\sf opt}$ for all $r \geq 1$. Together with~\eqref{eq:betaG_simple_1}, choosing $\beta={\beta}_{\sf opt}$, we deduce \begin{equation} \label{eq:betaG_simple_2} \beta_G^*({\beta}_{\sf opt}) = {\beta}_{\sf opt}. \end{equation} \begin{example} \label{ex:first} \begin{figure}[!t] \centering \includegraphics[width=2.25in]{3cycle_tradeoff} \caption{The trade-off between the broadcast rate $\beta_G^*(r)$ and the locality $r$ for the index coding problem represented by the $3$-cycle $G$.} \label{fig:3cycle_tradeoff} \end{figure} \emph{Locality-broadcast rate trade-off of the directed $3$-cycle}. Let $G$ be the directed $3$-cycle, i.e., $N=3$ and the three receivers $(i,K_i)$ are $(1,\{2\})$, $(2,\{3\})$ and $(3,\{1\})$. We show in Section~\ref{sec:3cycle} that for this index coding problem \begin{equation*} \beta_G^*(r) = \max\{6-3r,2\} \text{ for all } r \geq 1. \end{equation*} This function is shown in Fig.~\ref{fig:3cycle_tradeoff}. We observe that in order to achieve any savings in rate compared to the uncoded transmission ($\beta=N=3$), we necessarily require the locality to be strictly greater than $1$, i.e., each receiver must necessarily query more codeword symbols than the message length to achieve savings in the broadcast channel uses. Also, the smallest locality required to achieve the minimum rate \mbox{${\beta}_{\sf opt}=2$} is \mbox{$r=4/3$}. \end{example} \section{Fractional Coloring is Optimal for $r=1$} \label{sec:fractional_coloring} The smallest possible locality for any index coding problem is \mbox{$r=1$}. We will now show that the optimal index coding scheme with locality $r=1$ is the scheme based on fractional coloring of the \emph{interference graph} corresponding to the problem. We first recall some graph-theoretic terminology related to index coding as used in~\cite{BKL_arxiv_10,SDL_ISIT_13}, and then prove the optimality of fractional coloring in Sections~\ref{sec:r_1_achieve} and~\ref{sec:r_1_converse}. \subsection{Preliminaries} The {\em underlying undirected side information graph} $G_u=(\Vc,\mathcal{E}_u)$ of the side information graph $G=(\Vc,\mathcal{E})$ is the graph with vertex set $\Vc=[N]$ and an undirected edge set $\mathcal{E}_u=\left\{\,\{i,j\} \, | \, (i,j),\,(j,i) \in \mathcal{E} \right\}$, i.e., $\{i,j\} \in \mathcal{E}_u$ if and only if $i \in K_j$ and $j \in K_i$. The {\em interference graph} $\Gcpu=(\Vc,\Ecpu)$ is the undirected complement of the graph $G_u$, i.e., $\Ecpu=\left\{\, \{i,j\} \, | \, \{i,j\} \notin \mathcal{E}_u \right\}$. Note that \begin{equation} \label{eq:Ecpu} \{i,j\} \in \Ecpu \text{ if and only if either } i \notin K_j \text{ or } j \notin K_i. \end{equation} For positive integers $a$ and $b$, an \mbox{\em $a:b$ coloring} of the undirected graph $\Gcpu=(\Vc,\Ecpu)$ is a set $\{C_1,C_2,\dots,C_N\}$ of $N$ subsets $C_1,\dots,C_N \subset [a]$, such that $|C_1|=\cdots=|C_N|=b$ and $C_i \cap C_j = \varnothing$ if $\{i,j\} \in \Ecpu$. The elements of $[a]$ are {\em colors}, and each vertex of $\Gcpu$ is assigned $b$ colors such that no two adjacent vertices have any colors in common. The {\em fractional chromatic number} $\chi_f$ of the undirected graph $\Gcpu$ is \begin{equation*} \chi_f(\Gcpu) = \min \left\{ \frac{a}{b} ~\big\vert~ a:b \text{ coloring of } \Gcpu \text{ exists} \right\}. \end{equation*} The fractional chromatic number is a rational number and can be obtained as a solution to a linear program~\cite{godsil2013algebraic}. The \emph{chromatic number} $\chi(\Gcpu)$ of the graph $\Gcpu$ is the smallest integer $a$ such that an $a:1$ coloring of $\Gcpu$ exists. In general, we have $\chi_f(\Gcpu) \leq \chi(\Gcpu)$. The main result of this section is \begin{theorem} \label{thm:frac_coloring} For any unicast index coding problem $G$, the optimal broadcast rate for locality $r=1$ is $\beta_G^*(1) = \chi_f(\Gcpu)$. \end{theorem} \subsection{Proof of achievability for Theorem~\ref{thm:frac_coloring}} \label{sec:r_1_achieve} It is well known that there exists a coding scheme, called the {\em fractional clique covering} or {\em fractional coloring} solution, for any index coding problem $G$ with broadcast rate $\beta=\chi_f(\Gcpu)$, see~\cite{BKL_arxiv_10}. It is straightforward to observe that $r=1$ for this coding scheme; see Appendix~\ref{app:coloring_achievability} for details. It then follows that $\beta_G^*(1) \leq \chi_f(\Gcpu)$. \subsection{Proof of converse for Theorem~\ref{thm:frac_coloring}} \label{sec:r_1_converse} Consider any valid index code $(\mathfrak{E},\mathfrak{D}_1,\dots,\mathfrak{D}_N)$, possibly non linear, for $G$ with locality $r=1$, message length $m$ and codeword length $\ell$. We will now show that the broadcast rate of this index code is at least $\chi_f(\Gcpu)$. Since $r=1$, from~\eqref{eq:defn_r} and~\eqref{eq:simple_bound_on_r}, we deduce that $|R_1|=\cdots=|R_N|=m$ for this valid index code. \begin{lemma} \label{lem:basic_lemma_1} For any $i \in [N]$ and any $P \subset [N]$ such that $i \notin P$, we have {(i)} $I(\pmb{c}_{R_i};\xb_i|\xb_{K_i \cup P})=m$; {(ii)} $H(\pmb{c}_{R_i}|\xb_i,\xb_{K_i})=0$; and {(iii)} $H(\pmb{c}_{R_i}|\xb_P)=m$. \end{lemma} \begin{proof} We first observe that $I(\pmb{c}_{R_i};\xb_i|\xb_{K_i \cup P})=H(\xb_i|\xb_{K_i \cup P}) - H(\xb_i|\pmb{c}_{R_i},\xb_{K_i \cup P})$. Since \mbox{$i \notin K_i \cup P$}, $\xb_i$ is independent of $\xb_{K_i \cup P}$. Also, $\xb_i$ can be decoded using $\pmb{c}_{R_i}$ and $\xb_{K_i}$. Hence, $H(\xb_i|\xb_{K_i \cup P})=m$ and $H(\xb_i|\pmb{c}_{R_i},\xb_{K_i \cup P})=0$, thereby proving part~\emph{(i)}. Using the result in part~\emph{(i)} and decomposing the mutual information term $I(\pmb{c}_{R_i};\xb_i|\xb_{K_i \cup P})$, we have \begin{align} \label{eq:key_for_basic_lemma_0} m = H(\pmb{c}_{R_i}|\xb_{K_i \cup P}) - H(\pmb{c}_{R_i}|\xb_i,\xb_{K_i \cup P}). \end{align} Since $\pmb{c}_{R_i}$ is a length $m$ vector, we have $H(\pmb{c}_{R_i}|\xb_{K_i \cup P}) \leq m$. Also, $H(\pmb{c}_{R_i}|\xb_i,\xb_{K_i \cup P}) \geq 0$. Considering these facts together with~\eqref{eq:key_for_basic_lemma_0}, we deduce that \begin{equation} \label{eq:key_for_basic_lemma_1} H(\pmb{c}_{R_i}|\xb_i,\xb_{K_i \cup P})=0 \text{ and } H(\pmb{c}_{R_i}|\xb_{K_i \cup P}) = m. \end{equation} Observe that~\eqref{eq:key_for_basic_lemma_1} holds for any choice of $P$ such that $i \notin P$. Choosing \mbox{$P=\varnothing$} in the first equality in~\eqref{eq:key_for_basic_lemma_1} proves part~\emph{(ii)} of this lemma. Now using the fact that $\pmb{c}_{R_i}$ is of length $m$, and the second equality in~\eqref{eq:key_for_basic_lemma_1}, we have \begin{align*} m \geq H(\pmb{c}_{R_i}) \geq H(\pmb{c}_{R_i}|\xb_P) \geq H(\pmb{c}_{R_i}|\xb_{K_i \cup P}) = m. \end{align*} This shows that $H(\pmb{c}_{R_i}|\xb_P)=m$, proving part~\emph{(iii)}. \end{proof} \begin{lemma} \label{lem:r_1_R_non_intersecting} For any $\{i,j\} \in \Ecpu$, we have $R_i \cap R_j = \varnothing$. \end{lemma} \begin{proof} Using~\eqref{eq:Ecpu}, we will assume without loss of generality that $j \notin K_i$. We will now assume that $R_i \cap R_j \neq \varnothing$ and prove the lemma by contradiction. Let \mbox{$t \in R_i \cap R_j$} and \mbox{$P=\{i\} \cup K_i$}. From part~\emph{(ii)} of Lemma~\ref{lem:basic_lemma_1}, we have $H(\pmb{c}_{R_i}|\xb_i,\xb_{K_i})=0$. In particular, since $t \in R_i$, we have \begin{equation} \label{eq:lem:contradiction_1} H(c_t|\xb_i,\xb_{K_i})=H(c_t|\xb_P)=0. \end{equation} Note that \mbox{$j \notin P$} since \mbox{$j \neq i$} and \mbox{$j \notin K_i$}. From part~\emph{(iii)} of Lemma~\ref{lem:basic_lemma_1}, we observe that $H(\pmb{c}_{R_j}|\xb_P)=m$. This implies that for any given realization of $\xb_P$, the vector $\pmb{c}_{R_j}$ is uniformly distributed over $\Ac^m$. Hence, the $m$ coordinates of $\pmb{c}_{R_j}$ are independent and uniformly distributed over $\Ac$. Since $t \in R_j$, we conclude that for any given realization of $\xb_P$, $c_t$ is uniformly distributed over $\Ac$, and hence, \mbox{$H(c_t|\xb_P)=1$} which contradicts~\eqref{eq:lem:contradiction_1}. \end{proof} \begin{lemma} \label{lem:r_1_converse} For any valid index coding scheme for $G$ with $r=1$, the broadcast rate $\beta \geq \chi_f(\Gcpu)$. \end{lemma} \begin{proof} From Lemma~\ref{lem:r_1_R_non_intersecting}, the subsets $R_1,\dots,R_N \subset [\ell]$ are such that $R_i \cap R_j =\varnothing$ if $\{i,j\} \in \Ecpu$ and $|R_i|=m$ for all $i \in [N]$. Hence, $\{R_1,\dots,R_N\}$ is an \mbox{$\ell:m$} coloring of $\Gcpu$. Consequently, the broadcast rate $\beta = \frac{\ell}{m} \geq \chi_f(\Gcpu)$. \end{proof} Combining the converse result in Lemma~\ref{lem:r_1_converse} with the achievability result in Section~\ref{sec:r_1_achieve}, we arrive at Theorem~\ref{thm:frac_coloring}. \subsection{Corollary and remarks} Theorem~\ref{thm:frac_coloring} can be easily generalized to the case where the message length $m$ is fixed. \begin{corollary} The optimal broadcast rate for index coding problem $G$ with locality $r=1$ and message length $m$ is \begin{equation*} \min \left\{ \frac{a}{m} \, \Big\vert \, \text{an } a:m \text{ coloring of } \Gcpu \text{ exists} \,\right\}. \end{equation*} \end{corollary} \begin{proof} The achievability result is similar to the arguments used in Appendix~\ref{app:coloring_achievability} with the additional restriction that the subsets of colors $C_1,\dots,C_N$ are all of size $m$. Converse follows by recognizing that the set of subsets $\{R_1,\dots,R_N\}$ is an $\ell:m$ coloring of $\Gcpu$. \end{proof} In~\cite{HaL_ISIT_12} it is remarked that the optimal broadcast rate with $r=1$ among scalar linear index codes over a finite field (i.e., $m=1$, $\mathcal{A}=\mathbbmss{F}_q$ and the encoder $\mathfrak{E}: \mathbbmss{F}_q^N \to \mathbbmss{F}_q^{\ell}$ is a linear transform) is the chromatic number $\chi(\Gcpu)$. Our results in this section provide a strong generalization of this remark. \section{Designing Locally Decodable Index Codes} \label{sec:design} We will assume that the alphabet $\Ac$ is a finite field $\mathbbmss{F}_q$ of size $q$. An index code is called {\em vector linear} if the encoder $\mathfrak{E}:\mathbbmss{F}_q^{mN} \to \mathbbmss{F}_q^{\ell}$ is an $\mathbbmss{F}_q$-linear map. A vector linear index code with $m=1$ is said to be {\em scalar linear}. First, we will briefly recall the relevant properties of scalar linear index codes from~\cite{YBJK_IEEE_IT_11,DSC_IT_12}, and in the rest of this section we provide constructions of index codes with small locality. \subsection{Preliminaries} Given a unicast index coding problem $G$, a matrix $\pmb{A} \in \mathbbmss{F}_q^{N \times N}$ is said to {\em fit} $G$ if: \emph{(i)}~$\pmb{A}_{i,i}=1$ for all $i \in [N]$, and \emph{(ii)}~$\pmb{A}_{j,i}=0$ for all $i \neq j$ such that $j \notin K_i$. A matrix $\pmb{B} \in \mathbbmss{F}_q^{N \times \ell}$ serves as a valid scalar linear encoding matrix for the index coding problem $G$ if and only if there exists an $\pmb{A} \in \mathbbmss{F}_q^{N \times N}$ such that $\pmb{A}$ fits $G$ and the column space of $\pmb{B}$ contains the column space of $\pmb{A}$ (follows from \cite[Remark~4.6]{DSC_IT_12}). The encoder generates the codeword as $\pmb{c}=\xb\pmb{B}$. The decoding at the $i^{\text{th}}$ receiver proceeds as follows. Denote the $N$ columns of $\pmb{A}$ as $\pmb{a}_1^T,\dots,\pmb{a}_N^T$, where the superscript $T$ denotes the transpose operation, and each $\pmb{a}_i$ is a row vector. Since $\pmb{a}_i^T$ belongs to the column space of $\pmb{B}$, there exists a vector $\pmb{d}_i \in \mathbbmss{F}_q^{\ell}$ such that $\pmb{a}_i^T=\pmb{B}\pmb{d}_i^T$. The receiver computes $\pmb{c}\pmb{d}_i^T$ which equals $\pmb{xBd}_i^T=\pmb{xa}_i^T=\sum_{j \in [N]}x_j\pmb{A}_{j,i}$. Since $\pmb{A}$ fits $G$, we have $\pmb{cd}_i^T = x_i + \sum_{j \in K_i}x_jA_{j,i}$. Using the side information, the receiver can recover $x_i$ as $\pmb{cd}_i^T - \sum_{j \in K_i}x_j\pmb{A}_{j,i}$. In order to compute $\pmb{c}\pmb{d}_i^T$, the $i^{\text{th}}$ receiver needs to observe only those components of $\pmb{c}$ which correspond to the non-zero entries of $\pmb{d}_i^T$. Hence, the locality of the $i^{\text{th}}$ receiver is $r_i={\sf wt}(\pmb{d}_i)$, i.e., the Hamming weight of $\pmb{d}_i$. If $\pmb{a}_i^T$ is one of the columns of the encoding matrix $\pmb{B}$, then $\pmb{d}_i$ can be chosen such that ${\sf wt}(\pmb{d}_i)=1$ resulting in $r_i=1$. If $\pmb{B}$ does not contain $\pmb{a}_i^T$ as one of its columns, then we have the naive upper bound $r_i = {\sf wt}(\pmb{d}_i) \leq \ell$. For a given side information graph $G$, the smallest rank among all matrices $\pmb{A} \in \mathbbmss{F}_q^{N \times N}$ that fit $G$ is called the {\em minrank of $G$ over $\mathbbmss{F}_q$} and is denoted as $\kappa_q(G)$. The minimum broadcast rate among scalar linear codes is $\kappa_q(G)$ and can be achieved by using any matrix $\pmb{B}$ whose columns form a basis of the column space of a rank-$\kappa_q(G)$ matrix $\pmb{A}$ that fits $G$. \subsection{Separation based coding scheme} We first consider a separation based scalar linear index coding technique over $\mathbbmss{F}_q$ for a unicast problem $G$ where the encoder matrix $\pmb{B}$ is the product of two matrices: an optimal index coding matrix $\pmb{B}'$ with number of columns equal to $\kappa_q(G)$, and the parity-check matrix $\pmb{H}$ of a \emph{covering code} $\mathscr{C}$ with co-dimension $\kappa_q(G)$. The linear code $\mathscr{C}$ is chosen such that its covering radius is equal to the desired locality $r$, i.e., Hamming spheres of radius $r$ centered around the codewords of $\mathscr{C}$ cover the entire Hamming space. Among all covering codes over $\mathbbmss{F}_q$ with covering radius $r$ and co-dimension $\kappa_q(G)$ we choose the one with the smallest possible blocklength $n_q(r,\kappa_q(G))$. Following a well known property of covering codes, we observe that any column vector of length $\kappa_q(G)$ over $\mathbbmss{F}_q$ is some linear combination of at the most $r$ columns of $\pmb{H}$. Thus, if $\pmb{A}$ is a fitting matrix corresponding to $\pmb{B}'$, every column of $\pmb{A}$ can be expressed as a linear combination of at the most $r$ columns of the matrix \mbox{$\pmb{B}=\pmb{B}'\pmb{H}$}. Thus, $\pmb{B}$ is a valid scalar linear encoder matrix for $G$ with locality $r$ and blocklength $n_q(r,\kappa_q(G))$. \subsection{Codes from acyclic induced subgraph covers of $G$} \label{sec:ais_cover} In this section we will provide a technique to construct vector linear codes of small locality by using the acyclic induced subgraphs of $G$. For any subset $S \subset [N]$ of vertices of $G$, let $G_S$ denote the subgraph of $G$ induced by $S$. We will require the following result. \begin{lemma} \label{lem:ais_lemma} Let the subgraph $G_S$ of $G$ induced by the subset $S \subset [N]$ be a directed acyclic graph. If there exists is a valid scalar linear encoding matrix for $G$ with codelength $\ell$, then there exists a scalar linear index code with codelength $\ell$ for $G$ such that the locality of every receiver $i \in S$ is $r_i=1$. \end{lemma} \begin{proof} Let $\pmb{B} \in \mathbbmss{F}_q^{N \times \ell}$ be a valid encoding matrix. Then there exists a matrix \mbox{$\pmb{A} =[\,\pmb{a}_1^T~\cdots~\pmb{a}_N^T\,] \in \mathbbmss{F}_q^{N \times N}$} that fits $G$ and whose column space is contained in the column space of $\pmb{B}$. Since $G_S$ is directed acyclic, there exists a \emph{topological ordering} $i_1,\dots,i_{|S|}$ of its vertex set $S=\{i_1,\dots,i_{|S|}\}$, i.e., for any $1 \leq a < b \leq |S|$, there exist no directed edge $(i_b,i_a)$ in $G_S$, and hence, $G$ does not contain the edge $(i_b,i_a)$. It follows that for any choice of $1 \leq a < b \leq |S|$, $i_a \notin K_{i_b}$, and hence, the entry of $\pmb{A}$ at $i_a^{\text{th}}$ row and $i_b^{\text{th}}$ column is \mbox{$\pmb{A}_{i_a,i_b}=0$}. Further, for any $1 \leq a \leq |S|$, $\pmb{A}_{i_a,i_a}=1$ since the diagonal entries of $\pmb{A}$ are equal to $1$. Let $\pmb{E}$ be the $|S| \times |S|$ square submatrix of $\pmb{A}$ composed of the rows and columns indexed by $S$. It follows that if the rows and columns of $\pmb{E}$ are permuted according to the topological ordering $i_1,\dots,i_{|S|}$, then $\pmb{E}$ is lower triangular and all the entries on its main diagonal are equal to $1$. Thus $\pmb{E}$ is a full-rank matrix, and hence, the columns $\pmb{a}_{i_1}^T,\dots,\pmb{a}_{i_{|S|}}^T$ of $\pmb{A}$ are linearly independent. Consider a matrix $\pmb{B}' \in \mathbbmss{F}_q^{N \times \ell}$ constructed as follows. Let the first $|S|$ columns of $\pmb{B}'$ be $\pmb{a}_{i_1}^T,\dots,\pmb{a}_{i_{|S|}}^T$. The remaining $\ell-|S|$ columns of $\pmb{B}'$ are chosen from among the columns of $\pmb{B}$ such that the column spaces of $\pmb{B}'$ and $\pmb{B}$ are identical. This is possible since $\pmb{a}_{i_1}^T,\dots,\pmb{a}_{i_{|S|}}^T$ are linearly independent and are contained in the column space of $\pmb{B}$. By construction, the column space of $\pmb{B}'$ contains the column space of $\pmb{A}$, and hence, $\pmb{B}'$ is a valid scalar linear index coding matrix for $G$. Also, for any $i \in S$, the $i^{\text{th}}$ column of $\pmb{A}$ is a column of $\pmb{B}'$, and hence, the locality $r_i$ of the $i^{\text{th}}$ receiver is equal to $1$. This completes the proof. \end{proof} \begin{definition} A set of $M$ subsets $S_1,\dots,S_M \subset [N]$ of the vertex set of the side information graph $G$ is a \emph{$Q$-fold acyclic induced subgraph (AIS) cover} of $G$ if \emph{(i)}~$S_1 \cup \cdots \cup S_M = [N]$, \emph{(ii)}~each $i \in [N]$ is an element of at least $Q$ of the $M$ subsets $S_1,\dots,S_M$, and \emph{(iii)}~all the $M$ induced subgraphs $G_{S_1},\dots,G_{S_M}$ are acyclic. \end{definition} Given an AIS cover $S_1,\dots,S_M$ of $G$ and a scalar linear index code of length $\ell$ for $G$, we construct a vector linear code as follows. From Lemma~\ref{lem:ais_lemma}, we know that for each $j \in [M]$, there exists a valid scalar linear encoding matrix $\pmb{B}_j$ with codelength $\ell$ such that the locality of every receiver $i \in S_j$ is $1$. Consider a vector linear index code that encodes $M$ independent instances of the scalar messages $x_1,\dots,x_N \in \mathbbmss{F}_q$ using the encoding matrices $\pmb{B}_1,\dots,\pmb{B}_M$, respectively. The broadcast rate of this scheme is $\ell$. If $S_1,\dots,S_M$ is a $Q$-fold AIS cover of $G$, for each \mbox{$i \in [N]$}, there exist $Q$ scalar linear encoders among $\pmb{B}_1,\dots,\pmb{B}_M$ that provide locality $1$ at the $i^{\text{th}}$ receiver. The locality provided by the remaining $(M-Q)$ encoders is at most $\ell$ at this receiver. Thus the number of encoded symbols queried by any receiver in the vector linear coding scheme is at the most $Q + (M-Q)\ell$. Normalizing this by the number of message instances $M$, we observe that the locality of this scheme is at the most $\frac{Q + (M-Q)\ell}{M}$. Thus, we have proved \begin{theorem}~\label{thm:ais_cover} If there exists a $Q$-fold AIS cover of $G$ consisting of $M$ subsets of its vertex set, and if there exists a scalar linear index code of length $\ell$ for $G$, then there exists a vector linear code for $G$ with broadcast rate $\ell$, message length $m=M$, and locality at the most $({Q + (M-Q)\ell})/{M}$, and hence, \begin{equation*} \beta_G^*\left( \frac{Q + (M-Q)\ell}{M} \right) \leq \ell. \end{equation*} \end{theorem} As an application of Theorem~\ref{thm:ais_cover}, consider the following coding scheme. Let the parameter \mbox{$t \geq 1$} be such that the side information graph $G$ contains no cycles of length $t$ or less. With $M=\binom{N}{t}$, let $S_1,\dots,S_M$ be the set of all subsets of $[N]$ of size $t$. The subgraph of $G$ induced by $S_j$, for any $j \in [M]$, is acyclic since $|S_j|=t$. Further, each $i \in [M]$ is an element of $Q = \binom{N-1}{t-1}$ of the $M$ subsets $S_1,\dots,S_M$. Hence the resulting locality is $({Q + (M-Q)\ell})/{M}$ which can easily be shown to be equal to $(t+(N-t)\ell)/{N}$. Hence, we have \begin{corollary}~\label{cor:ais_cover_t} If $G$ contains no cycles of length $t$ or less, and if there exists a scalar linear index code of length $\ell$ for $G$, then we can achieve broadcast rate $\ell$ with locality $(t+(N-t)\ell)/{N}$. \end{corollary} Using Corollary~\ref{cor:ais_cover_t} we can immediately prove the following results. \begin{lemma} \label{lem:arbitrary_locality} Let $G$ be any unicast index coding problem with a valid scalar linear index code of length $\ell$. Then there exists a vector linear index code for $G$ with message length $m=N$, broadcast rate $\beta=\ell$ and locality $r=(1+(N-1)\ell)/{N}$. \end{lemma} \begin{proof} Use \mbox{$t=1$} in Corollary~\ref{cor:ais_cover_t}. \end{proof} \begin{lemma} \label{lem:cycles_locality} If $G$ is a directed cycle of length $N$, then there exists a vector linear coding scheme for $G$ such that the length of each message vector is $m=N$, broadcast rate $\beta=N-1$ and locality $r=2(N-1)/N$. \end{lemma} \begin{proof} We know that the optimal scalar linear index code for $G$ has length \mbox{$\ell=\kappa_q(G)=N-1$}. Also, with \mbox{$t=N-1$}, $G$ contains no cycles of length $t$ or less. The lemma follows by using Corollary~\ref{cor:ais_cover_t}. \end{proof} When the side information graph is a cycle the optimal broadcast rate ${\beta}_{\sf opt}=N-1$. Lemma~\ref{lem:cycles_locality} shows that this optimal rate can be achieved with a locality of $2(N-1)/N$, which is strictly less than $2$. \begin{example} \label{ex:3_cycle_achiev} Let $G=(\Vc,\mathcal{E})$ be the directed cycle of length $N=3$, i.e, $\Vc=\{1,2,3\}$ and $\mathcal{E}=\{(1,2), (2,3), (3,1) \}$. From Lemma~\ref{lem:cycles_locality}, $\beta_G^*(4/3) \leq 2$. Also, it is well known that the optimal scalar linear index code with $\ell=\kappa_q=2$ is also optimal among all possible index codes for this $G$, i.e., ${\beta}_{\sf opt}=2$. From~\eqref{eq:betaG_simple_2}, $\beta_G^*(2)=2$. Since $\beta_G^*$ is a non-increasing function, we have $2 = \beta_G^*(2) \leq \beta_G^*(4/3) \leq 2$, and hence, $\beta_G^*(4/3)=2$. \end{example} \subsection{Codes for symmetric side information problems} \label{sec:minrank_const} We will now construct vector linear index codes for side information graphs $G$ that satisfy a symmetry property. Consider the permutation $\sigma$ on the set $[N]$ that maps $i \in [N]$ to $\sigma(i)=i \mod N + 1$. In this subsection we will assume $G$ to be any directed graph with vertex set $[N]$ such that $\sigma$ is an automorphism of $G$. Such unicast index coding problems have been considered before, see~\cite{MCJ_IT_14}, and are related to topological interference management~\cite{Jaf_IT_14}. First we require the following definition. \begin{definition} We say that a set of $M$ matrices $\pmb{B}_1,\dots,\pmb{B}_M \in \mathbbmss{F}_q^{N \times \ell}$ is \emph{$(M,Q)$-balanced for $G$} for some integer $Q$ if \begin{enumerate}[(i)] \item there exist $M$ matrices $\pmb{A}_1,\dots,\pmb{A}_M \in \mathbbmss{F}_q^{N \times N}$ such that for each $i \in [N]$, $\pmb{A}_i$ fits $G$ and the column spaces of $\pmb{A}_i$ and $\pmb{B}_i$ are identical; and \item for each $i \in [N]$, there exist at least $Q$ distinct indices $j \in [N]$ such that the $i^{\text{th}}$ column of $\pmb{A}_j$ is a column of $\pmb{B}_j$. \end{enumerate} \end{definition} Observe that if $\pmb{B}_1,\dots,\pmb{B}_M$ is an $(M,Q)$-balanced set for $G$, then each of these matrices is a valid scalar linear index code for $G$. Also, from the second part of the definition, for at least $Q$ of these codes the locality of the $i^{\text{th}}$ receiver is $1$. Now consider the vector linear index coding scheme that is obtained by time-sharing the $M$ codes corresponding to $\pmb{B}_1,\dots,\pmb{B}_M$ with equal time shares. Since all the $M$ scalar index codes have broadcast rate $\ell$, the broadcast rate of the overall time-sharing scheme is also $\ell$. For any receiver $i \in [N]$, there exist at least $Q$ scalar codes for which the locality at this receiver is $1$, and for the remaining $(M-Q)$ codes the locality of this receiver is at the most $\ell$. Hence, for the overall time sharing scheme, the locality of any receiver is at the most $\frac{Q + (M-Q)\ell}{M} = \ell - \frac{Q(\ell-1)}{M}$, which is less than the broadcast rate $\ell$. We summarize this result as \begin{theorem} \label{thm:balanced_const} If there exists a set of $(M,Q)$-balanced $N \times \ell$ matrices for $G$ then $\beta_G^*\left( \frac{Q+(M-Q)\ell}{M} \right) \leq \ell$. \end{theorem} Based on the above theorem we derive the following result which holds for any index coding problem with symmetric side information graph $G$. \begin{theorem} \label{thm:cyclic_const} If the cyclic permutation $\sigma$ is an automorphism of $G$ and if $\kappa_q$ is the minrank of $G$ over $\mathbbmss{F}_q$, then \begin{equation*} \beta_G^*\left( \frac{\kappa_q(N-\kappa_q+1)}{N} \right) \leq \kappa_q. \end{equation*} \end{theorem} \begin{proof} Suppose $\pmb{A} \in \mathbbmss{F}_q^{N \times N}$ fits $G$ is of rank $\ell=\kappa_q(G)$ and let $\pmb{B}$ be an $N \times \ell$ matrix composed of a set of $\ell$ linearly independent columns of $\pmb{A}$. Note that when $\pmb{B}$ is used as a scalar linear index code there exist $\ell$ receivers with locality $1$ since $\ell$ columns of $\pmb{A}$ appear as columns of $\pmb{B}$. Let $\pmb{P}$ be the permutation matrix obtained by cyclically shifting down the rows of the $N \times N$ identity matrix by one position. It is straightforward to verify that $\pmb{PAP}^T$ fits the graph $\sigma(G)$. Since $\sigma$ is an automorphism of $G$, we have $\sigma(G)=G$, and hence, $\pmb{PAP}^T$ fits $G$. Since the column space of $\pmb{PB}$ is identical to that of $\pmb{PAP}^T$, $\pmb{PB}$ represents a valid scalar linear index code for $G$. Using this argument iteratively we deduce that for any $i \in [N]$, the matrix $\pmb{A}_i=\pmb{P}^i\pmb{A}(\pmb{P}^i)^T$ fits $G$, and the column space of $\pmb{B}_i=\pmb{P}^i\pmb{B}$ is identical to that of $\pmb{A}_i$. Further, using a counting argument, we observe that for any $i \in [N]$, there exist $\ell$ distinct values of $j$ such that the $i^{\text{th}}$ column of $\pmb{A}_j$ is a column of $\pmb{B}_j$. Hence, $\pmb{B}_1,\dots,\pmb{B}_N$ is an $(N,\ell)$-balanced set for $G$, and the statement of this theorem follows from Theorem~\ref{thm:balanced_const}. \end{proof} \subsection{Codes from optimal coverings of $G$} Several index coding schemes in the literature partition the given index coding problem (side information graph $G$) into subproblems (subgraphs of $G$), and apply a pre-defined coding technique on each of these subproblems independently. The overall codelength is the sum of the codelengths of the individual subproblems. The broadcast rate is then reduced by optimizing over all possible partitions of $G$. We will now quickly recall a few such \emph{covering-based} index coding schemes, and then show how they can be modified to guarantee locality. Let $G$ be the side information graph of any given index coding problem where the side information index set of receiver $i$ is $K_i \subset [N]$. \subsubsection*{Partition Multicast} The \emph{partition multicast} or the \emph{partial clique covering} scheme uses the transpose of the parity-check matrix of an appropriate maximum distance separable (MDS) code to encode each subgraph of $G$~\cite{BiK_INFOCOM_98,BKL_IT_13,TDN_ISIT_12,ArK_ISIT_14,SDL_ISIT_14}. Specifically let $G_S$ be the subgraph of $G$ induced by the subset of vertices \mbox{$S \subset [N]$}. The number of information symbols in the index coding problem $G_S$ is $|S|$, and the side information of receiver \mbox{$i \in S$} in $G_S$ is $K_i \cap S$. The partition multicast scheme uses a scalar linear encoder for $G_S$ where the encoding matrix is the transpose of the parity-check matrix of an MDS code of length $|S|$ and dimension $\min_{i \in S}|K_i \cap S|$. This code for $G_S$ encodes messages of length \mbox{$m_S=1$} and has codelength $\ell_S=|S|-\min_{i \in S} |K_i \cap S|$. We will use the trivial value of locality $r_S=\ell_S$ for this coding scheme. The finite field $\mathbbmss{F}_q$ must be sufficiently large to guarantee that the MDS codes of required blocklength and dimension exist for every possible choice of $S \subset [N]$. \subsubsection*{Cycle Covering} The \emph{cycle covering} scheme~\cite{NTZ_IT_13,CASL_ISIT_11} considers subgraphs $G_S$ which form a cycle of length $|S|$. If $G_S$ is a directed cycle of length $|S|$, then it is encoded using a scalar linear index code with encoding matrix equal to the transpose of the parity-check matrix of a repetition code of length $|S|$, resulting in message length \mbox{$m_S=1$} and index codelength $\ell_S=|S|-1$. Again, we will use the trivial value of locality $r_S=\ell_S$. If $G_S$ is not a directed cycle, then the corresponding information symbols are transmitted uncoded resulting in $m_S=1$, $\ell_S=|S|$ and locality $r_S=1$. In similar vein to partition multicast and cycle covering schemes, consider the following proposed coding technique that applies the optimal scalar linear index code over each subgraph $G_S$. \subsubsection*{Minrank Covering} Encode each subgraph $G_S$ using its own optimal scalar linear index code. The message length $m_S=1$, codelength $\ell_S$ equals the minrank $\kappa_q(G_S)$ of the subgraph, and the locality $r_S$ equals the codelength $\kappa_q(G_S)$. By partitioning $G$ into subgraphs $G_S$ of small minrank we can achieve a small locality for the overall scheme. \subsubsection{Scalar-linear codes} Now consider any covering-based index coding technique (such as partition mutlicast, cycle covering or minrank covering) for $G$. Let the scalar linear index code (i.e., message length equal to $1$) associated with the subgraph $G_S$, $S \subset [N]$, have codelength $\ell_S$ and locality $r_S$. The overall index code uses a partition of the vertex set $[N]$, which is represented by the tuple $(a_S, S \subset [N])$, where each $a_S \in \{0,1\}$ is such that the partition of $[N]$ consists of all subsets $S$ with $a_S=1$. Note that $(a_S, S \subset [N])$ represents a partition of $[N]$ if and only if $\sum_{S: i \in S}a_S=1$ for every $i \in [N]$, i.e., every vertex $i$ is contained in exactly one of the subsets of the partition. The covering-based index coding technique applies an index code of length $\ell_S$ and locality $r_S$ to each subgraph $G_S$ with \mbox{$a_S=1$} independently. Thus the codelength of the overall index code is \mbox{$\ell=\sum_{S: a_S=1}\ell_S=\sum_{S \subset [N]}a_S\ell_S$} and locality is $r=\max_{S:a_S=1}r_S=\max_{S \subset [N]}a_Sr_S$. By optimizing over all possible partitions of $G$, we have \begin{theorem}[Covering with locality] \label{thm:partition_scalar} Consider a family of scalar linear index codes, one for each $G_S$, $S \subset [N]$, with length $\ell_S$ and locality $r_S$. Given any $r \geq 1$, the value of $\beta_G^*(r)$ is upper bounded by the solution to the following integer program \begin{align*} &\text{minimize } \sum_{S \subset [N]}a_S\ell_S \text{ subject to} \\ &\sum_{S: i \in S}a_S = 1 ~\forall\, i \in [N], \text{ and } a_Sr_S \leq r ~\forall\, S \subset [N]\\ &\text{where } a_S \in \{0,1\}. \end{align*} \end{theorem} The second constraint \mbox{$a_Sr_S \leq r$} in Theorem~\ref{thm:partition_scalar} ensures that the locality of the resulting coding scheme is at the most $r$. Since $a_S \in \{0,1\}$, this implies that when solving for the optimal partition, the integer program considers only those subsets $S$ with $r_S \leq r$, i.e., locality $r$ is achieved by partitioning $G$ into subproblems of small locality. \subsubsection{Vector-linear codes} It is known that the linear programming (LP) relaxation, that allows each $a_S$ to assume values in the interval $[0,1]$ instead of \mbox{$a_S \in \{0,1\}$}, provides an improvement in rate for covering-based index coding schemes by time-sharing over several partitions of $G$. This technique too can be adapted to ensure locality. Consider the following vector linear schemes that can be used to cover a given side information graph $G$. \subsubsection*{Vector Partition Multicast} For any $S \subset [N]$, the partition multicast scheme uses a scalar code with length $|S|-\min_{i \in S}|K_i \cap S|$ for the subgraph $G_S$. Applying Lemma~\ref{lem:arbitrary_locality}, we obtain a vector linear code for $G_S$ with message length $m_S=|S|$, broadcast rate $\beta_S=|S|-\min_{i \in S}|K_i \cap S|$, codelength $\ell_S=m_S\beta_S$ and locality $r_S=(1+(|S|-1)\beta_S)/{|S|}$. Note that the locality $r_S$ is strictly less than the rate $\beta_S$. \subsubsection*{Vector Cycle Covering} In this scheme, if a subgraph $G_S$ is a directed cycle, we use the vector linear index code promised by Lemma~\ref{lem:cycles_locality}, with message length $m_S=|S|$, broadcast rate $\beta_S=|S|-1$, codelength $\ell_S=m_S\beta_S=|S|(|S|-1)$, and locality $r_S=2(|S|-1)/{|S|}$. If $G_S$ is not a cycle, we use uncoded transmission that results in \mbox{$m_S=1$}, \mbox{$\ell_s=|S|$} and \mbox{$r_S=1$}. \subsubsection*{Vector Minrank Covering} For a given $G_S$ we start with the optimal scalar linear code of length $\kappa_q(G_S)$ and use Lemma~\ref{lem:arbitrary_locality} to obtain a vector linear code with message length \mbox{$m_S=|S|$}, rate \mbox{$\beta_S=\kappa_q(G_S)$}, codelength \mbox{$\ell_S=m_S\beta_S$} and locality $r_S={(1+(|S|-1)\kappa_q(G_S))}/{|S|}$. Now consider a family of vector linear coding schemes that encodes each subgraph $G_S$, \mbox{$S \subset [N]$}, using a linear code of codelength $\ell_S$ with locality $r_S$, message length $m_S$ and rate $\beta_S=\ell_S/m_S$. For some choice of integers $k_S$, \mbox{$S \subset [N]$}, perform time-sharing among all the subgraphs of $G$, by encoding $k_S$ independent realizations of the subgraph $G_S$ for each \mbox{$S \subset [N]$}. In this scheme, the total number of message symbols intended for receiver \mbox{$i \in [N]$} is $\sum_{S: i \in S}k_Sm_S$. The number of codeword symbols $|R_i|$ queried by receiver $i$ is at the most $\sum_{S: i \in S}k_Sr_Sm_S$. The overall length of this index coding scheme is $\ell=\sum_{S \subset [N]}k_S\ell_S$. Suppose we require the message length corresponding to every receiver to be identical, \begin{equation} \label{eq:vector_linear_eq1} \sum_{S: i \in S}k_Sm_S = m \text{ for all } i \in [N]. \end{equation} Define \mbox{$a_S=k_Sm_S/m$} for all \mbox{$S \subset [N]$}. Then~\eqref{eq:vector_linear_eq1} is equivalent to $\sum_{S: i \in S}a_S=1$ for every \mbox{$i \in [N]$}. The locality of receiver $i$ is $|R_i|/m$ and is upper bounded by $\sum_{S: i \in S}a_Sr_S$. The broadcast rate is $\beta=\sum_{S \subset [N]}k_S\ell_S/m = \sum_{S \subset [N]}a_S\beta_S$. By optimizing over all possible choices of the time-sharing parameters \mbox{$(a_S, S \subset [N])$}, we arrive at \begin{theorem}[Fractional covering with locality] \label{thm:partition_fractional} Consider any family of vector linear index codes, one for each subgraph $G_S$, $S \subset [N]$, of $G$ with locality $r_S$ and broadcast rate $\beta_S$. For any $r \geq 1$, $\beta_G^*(r)$ is upper bounded by the solution to the following linear program \begin{align*} &\text{minimize } \sum_{S \subset [N]}a_S\beta_S \text{ subject to} \\ &\sum_{S: i \in S}a_S = 1 \text{ and } \sum_{S: i \in S}a_Sr_S \leq r ~\forall\, i \in [N]\\ &\text{where } a_S \in [0,1]. \end{align*} \end{theorem} \section{Locality-Rate Trade-Off of Directed $3$-Cycle} \label{sec:3cycle} Let $G$ be the directed $3$-cycle i.e., $N=3$ and the three receivers $(i,K_i)$ are $(1,\{2\})$, $(2,\{3\})$ and $(3,\{1\})$. We will now characterize its locality-rate trade-off given by the optimal broadcast rate function $\beta_G^*(r)$ using the achievability schemes of Section~\ref{sec:fractional_coloring}~and~\ref{sec:ais_cover} and a converse based on information inequalities. The objective of this section is to prove \begin{theorem} \label{thm:3cycle} For the unicast index coding problem represented by the directed $3$-cycle $G$, the locality-broadcast rate trade-off \begin{equation*} \beta_G^*(r) = \max\{6-3r,2\} \text{ for all } r \geq 1. \end{equation*} \end{theorem} We will now first prove the achievability part which will provide an upper bound on $\beta_G^*(r)$, and then provide an information-theoretic converse to arrive at a lower bound. Theorem~\ref{thm:3cycle} will then follow immediately from these two bounds. \subsection{Proof of achievability} From Example~\ref{ex:3_cycle_achiev} in Section~\ref{sec:ais_cover} we know that for $r=4/3$, $\beta_G^*(r)=2$. Also, from Theorem~\ref{thm:frac_coloring}, we know that when $r=1$, $\beta_G^*(r)=\chi_f(\Gcpu)$. Since $G$ is a directed $3$-cycle, $\Gcpu$ is a complete graph on three vertices, i.e., an edge exists between every pair of vertices in $\Gcpu$. Hence, $\chi_f(\Gcpu)=3$, and therefore, $\beta_G^*(1)=3$. Now since $\beta_G^*(r)$ is a convex function, considering the $(r,\beta_G^*)$ points $(1,3)$ and $(4/3,2)$, for any $\alpha \in (0,1)$, we have $\beta_G^*(\alpha + (1-\alpha)4/3) \leq 3\alpha + 2(1-\alpha)$. With $r=\alpha + (1-\alpha)4/3$, we therefore have \begin{equation} \label{eq:3cycle_achiev_1} \beta_G^*(r) \leq 6-3r, \text{ for } 1 \leq r \leq 4/3. \end{equation} Further, since $\beta_G^*$ is a decreasing function, for any $r \geq 4/3$, $\beta_G^*(r) \leq \beta_G^*(4/3)=2$. Combining this with~\eqref{eq:3cycle_achiev_1} we have \begin{equation*} \beta_G^*(r) \leq \max\{6-3r,2\} \text{ for all } r \geq 1. \end{equation*} \subsection{Proof of converse} To prove the converse we first require the following general result. Let $G$ be any unicast index coding problem involving $N$ messages such that the cyclic permutation $\sigma$ that maps $i \in [N]$ to $i \mod N + 1$ is an automorphism of the side information graph $G$. We now show that we can assume without loss of generality that the index sets of the codeword symbols queried by the $N$ receivers satisfy certain symmetry properties. \begin{lemma} \label{lem:cyclic_symmetry} If the cyclic permutation $\sigma$ is an automorphism of $G$ and if there exists an index code $(\mathfrak{E},\mathfrak{D}_1,\dots,\mathfrak{D}_N)$ for $G$ with broadcast rate $\beta$, then there exists an index code $(\mathfrak{E}',\mathfrak{D}_1',\dots,\mathfrak{D}_N')$ for $G$ with rate $\beta$ such that the index sets of codeword symbols $R_1',\dots,R_N'$ queried by the receivers satisfy the following properties: \begin{enumerate}[(i)] \item $|R_1'|=|R_2'|\cdots=|R_N'|$; and \item $|R_1' \cap R_2'| = |R_2' \cap R_3'| = \cdots = |R_N' \cap R_1'|$. \end{enumerate} \end{lemma} \begin{proof} See Appendix~\ref{app:lem:cyclic_symmetry}. \end{proof} Let us now assume that $G$ is the directed $3$-cycle. Consider any valid index coding scheme for $G$ with broadcast rate $\beta$ and locality $r$. Let the message length be $m$ and codelength be $\ell$. Using Lemma~\ref{lem:cyclic_symmetry}, we assume without loss in generality that the sets $R_1,R_2,R_3$ satisfy $|R_1|=|R_2|=|R_3|=rm$ and $|R_1 \cap R_2| = |R_2 \cap R_3|=|R_3 \cap R_1|$. For the sake of brevity, we abuse the notation mildly by using $(i+1)$ to denote the receiver index $(i \mod 3 + 1)$, and similarly use $(i+2)$ in order to denote $(i+1) \mod 3 + 1$. With this notation, for $i=1,2,3$, the side information index set of the $i^{\text{th}}$ receiver is $K_i=\{i+1\}$. Assume, as usual, that the messages $\xb_1,\xb_2,\xb_3$ are independently and uniformly distributed in $\Ac^m$. Now considering the $i^{\text{th}}$ receiver, we have $I(\xb_i;\pmb{c}_{R_i}|\xb_{i+1})=H(\xb_i)=m$. Expanding this term as a difference of conditional entropies, we have $H(\pmb{c}_{R_i}|\xb_{i+1}) - H(\pmb{c}_{R_i}|\xb_i,\xb_{i+1}) = m$. Using this with the upper bound $H(\pmb{c}_{R_i}|\xb_{i+1}) \leq H(\pmb{c}_{R_i}) \leq |R_i|$, we arrive at \begin{equation*} H(\pmb{c}_{R_i}|\xb_i,\xb_{i+1}) \leq |R_i| - m. \end{equation*} Using the above inequality and the fact that $\pmb{c}_{R_i}$ is a deterministic function of all three messages $\xb_i,\xb_{i+1},\xb_{i+2}$, we have $I(\pmb{c}_{R_i};\xb_{i+2}|\xb_i,\xb_{i+1})=H(\pmb{c}_{R_i}|\xb_i,\xb_{i+1}) \leq |R_i|-m$. Hence, \begin{align*} H(\xb_{i+2}|\xb_i,\xb_{i+1}) - H(\xb_{i+2}|\pmb{c}_{R_i},\xb_i,\xb_{i+1}) \leq |R_i| - m. \end{align*} Since $H(\xb_{i+2}|\xb_i,\xb_{i+1})=m$, we obtain the lower bound \begin{equation} \label{eq:3cycle_conv_1} H(\xb_{i+2}|\pmb{c}_{R_i},\xb_i,\xb_{i+1}) \geq 2m-|R_i|. \end{equation} Our objective now is to use the above inequality to obtain an upper bound on $|R_i \cap R_{i+2}|$, which can then be translated into a lower bound on $\ell$, and hence, a lower bound on $\beta$. To do so, observe that $\pmb{c}_{R_i}$ is composed of the following two sub-vectors $\pmb{c}_{R_i \cap R_{i+2}}$ and $\pmb{c}_{R_i \setminus R_{i+2}}$. Using~\eqref{eq:3cycle_conv_1}, we obtain \begin{align*} H(\xb_{i+2}|\pmb{c}_{R_i \cap R_{i+2}},\xb_i) & \geq H(\xb_{i+2}|\pmb{c}_{R_i},\xb_i,\xb_{i+1}) \geq 2m-|R_i|. \end{align*} Using this inequality, and the relation $H(\xb_{i+2}|\pmb{c}_{R_{i+2}},\xb_i)=0$ (to satisfy the demands of the $(i+2)^{\text{th}}$ receiver), we obtain the following \begin{align*} |R_{i+2} \setminus R_i| &\geq H(\pmb{c}_{R_{i+2} \setminus R_i}) \\ &\geq I(x_{i+2};\pmb{c}_{R_{i+2} \setminus R_i}|\pmb{c}_{R_i \cap R_{i+2}},\xb_i) \\ &= H(\xb_{i+2}|\pmb{c}_{R_i \cap R_{i+2}},\xb_i) \\ &~~~~~~~~~~~~~~- H(\xb_{i+2}|\pmb{c}_{R_{i+2}\setminus R_i},\pmb{c}_{R_i \cap R_{i+2}},\xb_i) \\ &= H(\xb_{i+2}|\pmb{c}_{R_i \cap R_{i+2}},\xb_i) - H(\xb_{i+2}|\pmb{c}_{R_{i+2}},\xb_i) \\ &\geq 2m - |R_i|. \end{align*} Since $|R_1|=|R_2|=|R_3|$, we now have \begin{align*} |R_i \cap R_{i+2}| &= |R_{i+2}| - |R_{i+2} \setminus R_i| \\ &\leq |R_i| - (2m - |R_i|) \\ &= 2\left(|R_i|-m \right). \end{align*} Finally, using the fact that $|R_i \cap R_{i+2}|$ is independent of $i$, \begin{align*} \ell &= |R_1 \cup R_2 \cup R_3| \\ &\geq \sum_{j=1}^{3} |R_j| - \sum_{i=1}^{3} |R_j \cap R_{j+2}| \\ &= 3|R_i| - 3|R_i \cap R_{i+2}| \\ &\geq 3|R_i| - 3 \times 2(|R_i|-m) \\ &= 6m - 3|R_i|. \end{align*} Dividing both sides by the message length $m$, and remembering that all the receivers have the same locality $r$, we have $\beta=\ell/m \geq 6-3r$. Thus we have \begin{align*} \beta_G^*(r) \geq 6-3r \text{ for all } r \geq 1. \end{align*} Further, ${\beta}_{\sf opt}(G)=2$, and hence, $\beta_G^*(r) \geq 2$ for all $r \geq 1$. Combining this with the above inequality we have the converse \begin{equation*} \beta_G^*(r) \geq \max\{6-3r,2\} \text{ for all } r \geq 1. \end{equation*} \section{Conclusion and Discussion} \label{sec:conclusion} \subsection*{Relation to other problems} Locally decodable index codes are related to privacy-preserving broadcasting and the problem of sparse representation of sets of vectors. In~\cite{KSCF_arXiv_17}, the authors consider scalar linear index codes with locality $r$ under a privacy preserving communication scenario using the terminology \emph{$r$-limited access schemes}. The motivation for using $r$-limited access schemes is to reduce the amount of information that any receiver can infer about the demands of other receivers in the network. This is achieved by restricting the knowledge of the scalar linear encoder matrix $\pmb{B}$ at any receiver to at the most $r$ columns instead of revealing the entire matrix. Thus each receiver knows the values of at the most $r$ columns of the encoder matrix $\pmb{B}$, and hence, is required to perform decoding by querying at the most $r$ codeword symbols which correspond to these columns. A scalar linear index code with locality $r$ is characterized by a valid encoder matrix $\pmb{B}$ with a corresponding fitting matrix $\pmb{A}$ such that any column of $\pmb{A}$ is some linear combination of at the most $r$ columns of $\pmb{B}$. Thus the columns of $\pmb{B}$ serve as an overcomplete basis for a sparse representation of the columns of $\pmb{A}$. \subsection*{Conclusion} We introduced the problem of designing index codes that are locally decodable and have identified several techniques to construct such codes. We have also identified the optimum broadcast rate corresponding to unit locality for any unicast index coding problem, and the complete locality-rate trade-off curve for the problem represented by a directed $3$-cycle. Stronger achievability and/or converse results may be required to gain further insights into the locality-rate trade-off of a general index coding problem. \section*{Acknowledgment} The first author thanks Prof.\ B.\ Sundar\ Rajan for discussions regarding the topic of this paper. \appendices \section{Proof of Lemma~\ref{lem:convexity}} \label{app:lem:convexity} The non-increasing property of $\beta_G^*$ follows immediately from its definition. We will use time-sharing to prove convexity. Assume $r_1,r_2 \geq 1$ and let $\epsilon > 0$. For each $j=1,2$, there exists an index code with broadcast rate $\beta_j \leq \beta_G^*(r_j) + \epsilon$ and locality at the most $r_j$. We will denote the blocklength of this code by $\ell_j$, message length by $m_j$ and the subsets of the indices used by the $N$ receivers as $R_{1,j},\dots,R_{N,j}$, where $j=1,2$. For some choice of non-negative integers $k_1$ and $k_2$, consider a time-sharing scheme where the first index code is used $k_1m_2$ times, and the second index code is used $k_2m_1$ times. For this composite scheme, the overall message length is $m=k_1m_2m_1 + k_2m_1m_2 = m_1m_2(k_1+k_2)$. The blocklength is $\ell=k_1m_2\ell_1 + k_2m_1\ell_2$, and the number of codeword symbols utilized by the $i^{\text{th}}$ receiver to decode its desired message is $|R_i|=k_1m_2|R_{i,1}| + k_2m_1|R_{i,2}|$. The locality of this time-sharing system can be upper bounded as \begin{align*} \max_i \frac{|R_i|}{m} &= \max_i \,\, \frac{k_1|R_{i,1}|}{(k_1+k_2)m_1} + \frac{k_2|R_{i,2}|}{(k_1+k_2)m_2} \\ &\leq \frac{k_1}{k_1+k_2} r_1 + \frac{k_2}{k_1+k_2}r_2. \end{align*} Similarly, the broadcast rate of this time-sharing scheme can be shown to be equal to $k_1\beta_1/(k_1+k_2) + k_2\beta_2/(k_1+k_2)$, which is upper bounded by \begin{align*} \frac{k_1}{k_1+k_2}\beta_G^*(r_1) + \frac{k_2}{k_1+k_2}\beta_G^*(r_2) + \epsilon. \end{align*} Denoting $k_1r_1/(k_1+k_2) + k_2r_2/(k_1+k_2)$ by $r$, and by letting $\epsilon \to 0$, we observe that \begin{equation*} \beta_G^*(r) \leq \frac{k_1}{k_1+k_2}\beta_G^*(r_1) + \frac{k_2}{k_1+k_2}\beta_G^*(r_2). \end{equation*} Convexity follows by approximating any real number in the interval $(0,1)$ by the rational number $k_1/(k_1+k_2)$ to any desired accuracy by using sufficiently large $k_1$ and $k_2$. \section{Fractional Coloring Solution has Unit Locality} \label{app:coloring_achievability} We will now recall the fractional coloring solution~\cite{BKL_arxiv_10} to an index coding problem $G$ and observe that $r=1$ for this scheme. Let $C_1,\dots,C_N \subset \{1,\dots,a\}$ be an $a:b$ coloring of $\Gcpu$ such that $\chi_f(\Gcpu)=a/b$. Set codeword length \mbox{$\ell=a$} and message length \mbox{$m=b$}. Denote the components of the message vectors $\xb_i \in \Ac^m$ using the variables $w_{i,t} \in \Ac$ as follows: $\xb_i = \left( w_{i,t}, t \in C_i \right)$, i.e., one symbol $w_{i,t}$ corresponding to each color $t$ in the set $C_i$. Endow the set $\Ac$ with any abelian group structure $(\Ac,+)$. The symbols of the codeword $\pmb{c}=(c_1,\dots,c_\ell)$ are generated as $c_t = \sum_{i:\, t \in C_i} w_{i,t}$, for $t \in [\ell]$. Decoding at the receiver $(i,K_i)$ can be performed as follows. Note that $\xb_i$ is composed of all symbols $w_{i,t}$ such that $t \in C_i$. In order to decode $w_{i,t}$, the receiver retrieves the code symbol $c_t$ which is related to $w_{i,t}$ as \begin{equation} \label{eq:frac_color_ach} c_t = w_{i,t} + \sum_{\substack{j \neq i \\ j: \, t \in C_j}} w_{j,t}. \end{equation} For any choice of the index $j$ in the summation term above, we have $i \neq j$ and $t \in C_i \cap C_j$. Since $C_1,\dots,C_N$ is a coloring of $\Gcpu$ and $C_i \cap C_j \neq \varnothing$, we deduce that $\{i,j\} \notin \Ecpu$, or equivalently, $j \in K_i$. Hence, for each $j \neq i$ such that $t \in C_j$, the receiver $(i,K_i)$ knows the value of $w_{j,t}$, and thus, can recover $w_{i,t}$ from $c_t$ using~\eqref{eq:frac_color_ach}. Using a similar procedure $(i,K_i)$ can decode all the $m$ symbols in $\xb_i$ from the $m$ coded symbols $(c_t,t \in C_i)$. This decoding method uses $R_i=C_i$ for all $i \in [N]$ and has locality $r=1$. \section{Proof of Lemma~\ref{lem:cyclic_symmetry}} \label{app:lem:cyclic_symmetry} Since $\sigma$ is an automorphism of $G$, so is $\sigma^n$ for any $n \in [N]$. Note that the group $\{\sigma,\sigma^2,\dots,\sigma^{N}=1\}$ acts transitively on the vertex set of $G$. Let $(\mathfrak{E},\mathfrak{D}_1,\dots,\mathfrak{D}_N)$ be an index code for $G$ with rate $\beta$ and receiver localities $r_1,\dots,r_N$. We will consider $N$ index coding schemes $(\mathfrak{E}^{(n)},\mathfrak{D}_1^{(n)},\dots,\mathfrak{D}_N^{(n)})$, $n \in [N]$, each of which is derived from $(\mathfrak{E},\mathfrak{D}_1,\dots,\mathfrak{D}_N)$ by permuting the roles of the messages $\xb_1,\dots,\xb_N$. Specifically, the $n^{\text{th}}$ encoder $\mathfrak{E}^{(n)}$ is the encoder $\mathfrak{E}$ applied to the $n^{\text{th}}$ left cyclic shift of the message tuple $\xb_1,\dots,\xb_N$, i.e., \begin{align*} \mathfrak{E}^{(n)}\left( \, (\xb_1,\dots,\xb_N) \,\right) &= \mathfrak{E}(\, (\xb_{n+1},\xb_{n+2},\dots,\xb_N,\xb_1,\dots,\xb_{n}) \,) \\ &= \mathfrak{E}\left( \, (\xb_{\sigma^{n}(1)},\dots,\xb_{\sigma^{n}(N)}) \, \right). \end{align*} For any $i \in [N]$, in the above expression of $\mathfrak{E}^{(n)}$, the message $\xb_i$ is the $(i-n)_N^{\text{th}}$ argument of $\mathfrak{E}$ where $(i-n)_N=(i-n)$ if $(i-n) \geq 1$ and $(i-n)_N = i-n+N$ otherwise. Hence, the encoding function $\mathfrak{E}^{(n)}$ operates on the message $\xb_i$ in the same manner as$\mathfrak{E}$ operates on the message $\xb_{(i-n)_N}$. Using the fact that $\sigma$ is an automorphism of $G$, it is easy to see that, when the $n^{\text{th}}$ code is used, the $i^{\text{th}}$ receiver can decode $\xb_i$ as $\mathfrak{D}_{(i-n)_N}(\pmb{c}_{R_{(i-n)_N}},\xb_{K_i})$. Thus, the codeword symbols queried by the $i^{\text{th}}$ receiver in the $n^{\text{th}}$ code is $|R_{(i-n)_N}| = m\,r_{(i-n)_N}$, where $m$ is the message length. Now consider a time sharing scheme that utilizes each of the $N$ encoders $\mathfrak{E}^{(1)},\dots,\mathfrak{E}^{(N)}$ exactly once. The overall message length for this scheme is $mN$, the broadcast rate is $\beta$, and the number of codeword symbols queried by the $i^{\text{th}}$ receiver is \begin{equation*} |R_i'| = \sum_{n \in [N] }|R_{(i-n)_N}| = m \sum_{ n \in [N]} r_n. \end{equation*} Similarly, for any $i \in [N]$ and $j = i \mod N + 1$, we have \begin{align*} |R_i' \cap R_j'| &= \sum_{n \in [N]} |R_{(i-n)_N} \cap R_{(i-n+1)_N}| \\ &= \sum_{n \in [N]} |R_{n} \cap R_{(n+1)_N}|, \end{align*} which is independent of $i$.
\section{Introduction} Randomized benchmarking is widely used for characterizing the performance of quantum information processing devices~\cite{BWC+11,GMT+12,CGT+09,BKM+14,RLL09,OCNP10, XLM+15, MLS+15}. Standard randomized benchmarking protocols require the capability to sample from a unitary 2 design~\cite{KLR+08,DCEL09, MGE11, MGE12}, for which the Clifford group, or certain subgroups of the Clifford group which are nonetheless unitary 2 designs, are usually used. Sampling from a 2 design can be challenging, however, particularly for the case of randomized benchmarking of logical qubits, where the set of high-fidelity logical gates that can be implemented in a straightforward manner is invariably restricted. For many quantum codes, techniques such as state injection and distillation are required to implement some generators of the logical Clifford group. Clifford gates incorporating such generators suffer from much higher overhead and probability of error. Logical qubits are likely to be in short supply for some time, so overhead is a significant concern for near-term demonstrations of randomized benchmarking on logical qubits. Furthermore, incorporating logical Clifford gates with low utility and poor performance in logical randomized benchmarking is undesirable as it results in an overly pessimistic assessment of the logical gate set. The latter issue might be resolved by benchmarking individual logical gates via interleaved randomized benchmarking~\cite{MGJ+12} except that this technique has been found to perform poorly for gate sets with wildly varying error probabilities~\cite{ECMG14}. Faced with these issues, an obvious question to ask is whether the offending gates are truly necessary for randomized benchmarking. We show here that in many cases they are not. The fundamentals of randomized benchmarking are briefly reviewed in Section~\ref{sec:randomizedBenchmarking}. Section~\ref{sec:CliffordSubgroupTwirling} introduces randomized benchmarking using subgroups of the Clifford group and analyzes the performance in the aforementioned cases of interest. Concluding remarks appear in Section~\ref{sec:conclusion}. \section{Randomized Benchmarking\label{sec:randomizedBenchmarking}} \subsection{Setting and Assumptions} The goal of randomized benchmarking is to determine the average fidelity of the error channels of a group of unitary gates of interest $\set{G}$. For the benchmarking procedure to accurately return this value, the set of error channels associated with the gates must satisfy the following properties. \begin{enumerate} \item{{\bf Markovianity:} For any target $U \in \set{G}$ the true evolution of the quantum device can be expressed as a completely positive map, $\op{E}_{U} \circ \hat{U}$, where $$\op{E}_{U}\circ \hat{U}(\rho) = \sum_i E_i U\rho U^\dagger E_i^\dagger.$$ } \item{{\bf Weak gate dependence:} The error channel does not depend strongly on the gate applied. That is, if $\op{E}_{U}$ is the error channel associated with $U$ and $\op{E} = \frac{1}{|\set{G}|} \sum_{U \in \set{G}} \op{E}_{U}$ then $$ \|\op{E} - \op{E}_{U} \|_1 \ll 1, $$ where the norm used is the induced operator 1-norm. } \end{enumerate} Recently, some complications with regard to weak gate dependence have been noted~\cite{PRY+17,Wal17}. For simplicity, we further assume that the error channel is completely independent of the gate applied. \subsection{Twirling} The basic approach utilized by randomized benchmarking is to symmetrize a quantum channel, $\op{E}$, with respect to a group of unitary gates, $\set{G}$, by performing a random gate from $\set{G}$ on the input and its inverse on the output of the channel. Once symmetrized, the channel can be described by a small number of parameters which may then be determined efficiently by a simplified tomography procedure. Specifically, performing a random gate, $U$, sampled from $\set{G}$, on the input of the channel, $\op{E},$ while performing its inverse, $U^\dagger$, on the output results in the following channel: $$\tilde{\op{E}}_\set{G} =\mathbb{E}_{U\sim\set{G}} \left[\hat{U}^\dagger\circ \op{E} \circ \hat{U} \right],$$ where $\mathbb{E}_{U\sim \set{G}}$ represents an average over all $U$ sampled uniformly from $\set{G}$. The channel $\tilde{\op{E}}_\set{G}$ is symmetrized in that it is invariant under conjugation by elements of the group $\set{G}$, that is, $$\hat{U}^\dagger \circ \tilde{\op{E}}_\set{G} \circ \hat{U} = \tilde{\op{E}}_\set{G} \;\;\; \forall\ U \in \set{G}.$$ This symmetrization procedure is referred to as $\set{G}$\textit{-twirling}. Formally, $\set{G}$-twirling projects the channel onto the invariants of $\set{G}$. For the group $\set{SU}(2^n)$ there are two linearly independent invariants under twirling. These may be taken to be the identity channel, $\hat{I}(\rho) = \rho$, and the completely depolarizing channel, $\op{D}(\rho) = \frac{1}{4^n}\sum_{\mu} P_\mu \rho P_\mu.$ Given an expression for an error channel in terms of Pauli operators, $$\op{E}(\rho) = \sum_{\mu\nu} x_{\mu\nu} P_\mu \rho P_\nu,$$ the corresponding fully twirled channel is \begin{align*} \tilde{\op{E}}_{\set{SU}(2^n)}(\rho) &= (1-p) \rho + \frac{p}{4^n -1} \sum_{\mu\neq I} P_\mu \rho P_\mu \\ &=\lambda\rho+ \frac{1-\lambda}{4^n} \op{D}(\rho), \end{align*} where $p =\sum_{\mu \neq I} x_{\mu\mu}$ is the entanglement infidelity and $$\lambda = 1-p\frac{4^n}{4^n-1}$$ is the eigenvalue of the channel for non-identity Pauli operators, i.e., $\tilde{\op{E}}_{\set{SU}(2^n)}(P_\mu) = \lambda P_\mu$ for all $P_\mu\neq I$. Thus, twirling by $\set{SU}(2^n)$ is sufficient to convert any error channel to one specified by a single real number. Twirling by $\set{SU}(2^n)$ is not practical experimentally, but neither is it necessary. It suffices to twirl by any group $\set{G}$ satisfying the following condition: for any polynomial that is second order and homogeneous in both the matrix elements of $U$ and $U^\dagger$ (in the fundamental representation), the expectation value is the same whether $U$ is sampled uniformly from $\set{SU}(2^n)$ or $\set{G}$. Groups with this property are referred to as 2 designs~\cite{CLLW16}. A 2 design for $\set{SU}(2^n)$ can equivalently be defined as a group $\set{G}$ satisfying $$ \ave{a_{\mu\nu}(U)} = 0 \;\;\; \text{and}$$ $$ \ave{\left(a_{\mu\nu}(U)\right)^2} = \frac{1}{4^n-1}$$ for all $\mu,\nu\neq I$ where the overline denotes an average over $U$ and \begin{align*} UP_\mu U^\dagger = \sum_\nu a_{\mu\nu}(U) P_\nu. \end{align*} In words this means that each non-identity Pauli operator is mapped to every non-identity Pauli operator with average amplitude of zero and equal average square amplitude. It is straightforward to see that the Clifford group satisfies these conditions, as well as certain subgroups thereof, such as, in the case of a single qubit, the group generated by $e^{i\pi/(3\sqrt{3 })(X+Y+Z)}$ and the $X$ gate. \iffalse equivalently to Since $\tilde{\op{E}}_\set{G}$ is an expectation value of a (2,2)-polynomial in the matrix elements of $U,$ it follows that if $\set{G}$ is a $2$ design with respect to the group $\set{SU}(2^n)$, then $$\tilde{\op{E}}_\set{G} = \mathbb{E}_{U\sim \set{G}} \left[U^\dagger \circ \op{E} \circ U \right] = \mathbb{E}_{U\sim \set{SU}(2^n)} \left[U^\dagger \circ \op{E} \circ U \right].$$ \fi \iffalse Thus, twirling an error channel by a unitary $2$ design is equivalent to twirling by the full unitary group where the unitary gates are drawn uniformly (according to the Haar measure). The twirling transformation, $$\tilde{\op{E}}_{\set{G}} = \op{T}_{\set{G}} (\op{E}),$$ is not a unique function of $\set{G}$. Specifically, $\op{T}_{\set{G}'}= \op{T}_{\set{G}}$ for a subset $\set{G}' \subset \set{G}$ when the expectation value of every (2,2)-polynomial in the matrix elements (in the fundamental representation) of $U$ are the same whether sampling uniformly from $\set{G}'$ or $\set{G}$. Such a subset $\set{G}'$ is referred to a 2 design with respect to $\set{G}$. For any 2 design with respect to the group $\set{SU}(2^n),$ the above definition is equivalent to the following conditions, $$ \mathbb{E}_{ U \sim \set{G}'} \left[ \mbox{tr}(U P_\mu U^\dagger P_\nu )\right] = 0,$$ where $P_\mu$ is a multi-qubit Pauli operator and $P_\mu \neq I.$ \fi Twirling by 2 designs such as these forms the basis of standard randomized benchmarking. \subsection{Standard Randomized Benchmarking Protocol} Given the gate error channel, \begin{equation*} \op{E}(\rho) = \sum_{\mu\nu} x_{\mu\nu} P_\mu \rho P_\nu, \end{equation*} the goal of randomized benchmarking is to determine the entanglement infidelity, \begin{equation*} p = \sum_{\mu\ne I} x_{\mu\mu}, \end{equation*} or some simple function thereof\footnote{In fact, randomized benchmarking papers often quote the average infidelity, which is related to the entanglement infidelity by $p_{\text{ave}}=2^n p/(2^n+1)$~\cite{Nie02}. We focus on the entanglement infidelity instead since it is more relevant for multi-qubit states and corresponds to the error parameter typically used in simulations of quantum error correction.}. The standard randomized benchmarking protocol~\cite{MGE11} consists of many repetitions of the following experiment: \begin{itemize} \item{Prepare an initial state, $\rho_0$, such that $\rho_0$ is the $+1$ eigenstate of a projector, $\proj$.} \item{Perform a random gate sequence, $U_{l-1}\ldots U_1$, where each gate is selected independently from a unitary 2 design.} \item{Perform one final unitary gate chosen such that in the absence of errors the unitary gate sequence performs the identity\footnote{It is worth mentioning that in practice it's better to return to the starting eigenbasis rather than the starting state.},\ $$U_l = \prod_{t=1}^{l-1} U_{t}^{-1}.$$ } \item{Measure $\proj$.} \end{itemize} Averaged over many runs, the measurement statistics yield a fidelity for the experiment which depends only on the twirled error channel and the preparation and measurement errors. In order to isolate state preparation and measurement errors, $\op{E}_p$ and $\op{E}_m$, respectively, the length, $l$, of the gate sequences is varied. The average fidelity for gate sequences of length $l$ is given by \begin{eqnarray*}f_l &=& \text{tr}\left( \proj \op{E}_m\left(\tilde{\op{E}}^l(\op{E}_p(\rho_0))\right) \right )\\ &=& \mathbb{E}_{|\vec{U}|=l}( f_\vec{U}), \end{eqnarray*} where $f_\vec{U}$ is the fidelity for a given sequence of unitaries $\vec{U} = (U_1,\ldots, U_l)$. The average sequence fidelities as a function of length are then fit to the decay curve, \begin{equation*} f_l = c_0 + c_1\lambda^l, \end{equation*} where $\lambda$ is as defined above. The total number of measurements required is minimized when a different random sequence is selected for each run, but for practical reasons, each gate sequence is typically repeated many times in order to determine the fidelity, $f_\vec{U}$, for each gate sequence, $\vec{U}$. This also allows additional information about the error channel to be extracted, notably its coherence and non-unitality~\cite{KLR+08}. The minimum number of gate sequences needed to estimate $f_l$ to a given accuracy depends on the variance of the gate sequence fidelities, $$v_l = \sum_{|\vec{U}|=l}(f_\vec{U} - f_l)^2,$$ for which general bounds are derived in the literature~\cite{WF14,HWFW17}. \section{Clifford Subgroup Twirling\label{sec:CliffordSubgroupTwirling}} In this section, the standard randomized benchmarking protocol is adapted to sampling from subgroups of the Clifford group which are not unitary 2 designs. All of the groups we consider contain the Pauli group, that is, the group generated by all single-qubit Pauli gates, and so are unitary 1 designs. It is important to note that twirling with respect to the Pauli group converts an arbitrary channel, $$\op{E}(\rho) = \sum_{\mu\nu} x_{\mu\nu} P_\mu \rho P_\nu,$$ into the corresponding stochastic Pauli channel, $$\tilde{\op{E}}_\set{P}(\rho) = \sum_{\mu} x_{\mu\mu} P_\mu \rho P_\mu.$$ Each Pauli operator is an eigenoperator of every Pauli channel. That is, $\tilde{\op{E}}_\set{P} (P_\mu) = \lambda_\mu P_\mu$. The corresponding eigenvalue is given by, $$\lambda_\mu\ = \sum_{\nu| [P_\nu,P_\mu]=0} x_{\nu\nu} - \sum_{\nu| [P_\nu,P_\mu] \neq 0} x_{\nu\nu}.$$ For any subgroup of the Clifford group, $\set{S}$, the orbit of each Pauli operator under the action of $\set{S}$ forms one of a set of $k$ blocks, $\{{\bf B}_0, \ldots, {\bf B}_{k-1}\},$ each containing $N_i(n)$ Pauli operators. Twirling with respect to a subgroup of the Clifford group which also contains the Pauli group, therefore results in a channel of the form, \begin{equation*} \tilde{\op{E}}_\set{S} (\rho) = (1-p) \rho + \sum_{i=1}^{k-1} \frac{p_i}{N_i(n)} \sum_{\mu \in {\bf B_i }} P_\mu \rho P_\mu, \end{equation*} where ${\bf B}_0 = \{I\}$, $$p_i = \sum_{\mu \in {\bf B_i }} x_{\mu\mu}, \text{\hspace{1.5em}and\hspace{2em}} p = \sum_{i=1}^{k-1} p_i.$$ In a case of imperfect mixing such as this, the fidelity decay curve has the form $$f_l = c_0 + \sum_{i=1}^{k-1} c_i\lambda_i^l$$ where $$c_i = \tr\left(\proj \op{E}_m \left(\sum_{\nu\in \bf B_i} \tr\left( P_\nu \op{E}_p(\rho_0)\right) P_\nu\right)\right),$$ $\rho_0$ is the ideal initial state, and $\proj$ is the projector of interest. Notably, in the multi-qubit case, the final multi-qubit measurement is typically implemented via many single-qubit projective measurements. Using the measurement results from each qubit separately, many such curves can be extracted concurrently or only a single one of particular interest (e.g., such that only one $c_{i\neq 0}$ is significant). In theory, the parameters $p_i$ can be determined if it is possible to prepare and measure states in the eigenspace of at least one Pauli operator from each block, either sequentially or all at once using a multi-qubit initial state of the form $$\rho_0 = \frac{1}{2^n} \prod_\mu \left(I + P_\mu\right).$$ Often, however, preparing an eigenstate for one Pauli operator from each block is impractical in situations where implementing the gate(s) required to convert between blocks is impractical. Alternatively, if there exists a Pauli operator, $P$, that commutes with approximately the same fraction of the Pauli operators within each block, then the entanglement fidelity of the error channel can be determined approximately by preparing an eigenstate of $P$ and measuring the decay of the expectation value of the corresponding projector as a function of gate sequence length. This is the primary approach taken in the remainder of the paper. \subsection{The Real Clifford Group} Consider the subgroup of the Clifford group that preserves the evenness or oddness of the number of $Y$ elements in a Pauli string. This group is referred to as the real Clifford group, and is generated by Hadamard, controlled-NOT, and the single-qubit Pauli gates. Twirling with respect to the real Clifford group results in a channel with two non-trivial blocks: \begin{itemize} \item{${\bf B}_1$ consists of the non-identity Pauli operators with an even number of $Y$ elements (real Pauli operators). The size of ${\bf B}_1$ is $$N_1(n)=\sum_{l\in \text{even}} \binom{n}{l} 3^{n-l} = \frac{4^n + 2^n}{2}-1.$$ } \item{${\bf B}_2$ consists of the Pauli operators with an odd number of $Y$ elements (imaginary Pauli operators). The size of ${\bf B}_2$ is $$N_2(n) = \sum_{l\in \text{odd}} \binom{n}{l} 3^{n-l}= \frac{4^n - 2^n}{2}.$$ } \end{itemize} Given a channel, \begin{equation*} \op{E}(\rho) = \sum_{\nu\mu} x_{\mu\nu} P_\mu \rho P_\nu, \end{equation*} twirling with respect to the real Clifford group results in the channel, \begin{align*} \tilde{\op{E}}_{\set{R}}(\rho)= (1-p) \rho &+\frac{p_1}{N_1(n)} \sum_{\mu \in {\bf B}_1} P_\mu \rho P_\mu \\ &+\frac{p_2}{N_2(n)} \sum_{\mu \in {\bf B}_2} P_\mu \rho P_\mu, \end{align*} where $$p_1 =\sum_{\mu \in {\bf B}_1} x_{\mu\mu} \;\;\; \text{and}\;\;\; p_2 = \sum_{\mu \in {\bf B}_2} x_{\mu\mu}. $$ A real Pauli operator anti-commutes with $N_1(n-1) + N_2(n-1)+1$ real Pauli operators and exactly the same number of imaginary Pauli operators. An imaginary Pauli operator anti-commutes with $2N_1(n-1)+2$ real Pauli operators and $2N_2(n-1)$ imaginary Pauli operators. It follows that each real Pauli operator is an eigenvector of the twirled channel, $\tilde{\op{E}}_{\set{R}}$, with eigenvalue, \begin{align*} \lambda_1 =&1-2 p_1\frac{N_1(n-1) + N_2(n-1)+1}{N_1(n)}\\ &- 2 p_2 \frac{N_1(n-1) + N_2(n-1)+1}{N_2(n)}\\ =&1- p_1 \frac{4^{n}}{4^n + 2^n-2}- p_2 \frac{2^{n}}{2^n - 1}\\ =& 1- p_2 - p_1 + \frac{p_1-p_2}{2^{n}} + O(2^{-2n}). \end{align*} while each imaginary Pauli operator is an eigenvector of $\tilde{\op{E}}_{\set{R}}$ with eigenvalue, \begin{align*} \lambda_2 &=1- 4 p_1\frac{N_1(n-1)+1}{N_1(n)} - 4 p_2\frac{N_2(n-1)}{N_2(n)}\\ &=1- p_1\frac{2^{n} }{2^n-1} - p_2\frac{4^{n}- 2^{n+1} }{4^n - 2^n}\\ &= 1-p_2 - p_1 + \frac{p_2-p_1}{2^{n}}+ O(2^{-2n}). \end{align*} To determine the parameters $p_1$ and $p_2$ it is sufficient to prepare and measure state(s) which are eigenstates of both a real and an imaginary Pauli operator\footnote{Note that any multiqubit state that is an eigenstate of more than one Pauli operator is an eigenstate of at least one non-trivial real Pauli operator.}, but this is typically challenging in cases where only real Clifford gates are available. In particular, codes for which only the real Clifford gates are transversal generally lack a straightforward procedure for preparation and measurement in the logical $Y$ basis. Instead, consider the case where the initial state is only an eigenstate of real Pauli operators and therefore only $\lambda_1$ can be extracted. Recalling that $p=p_1+p_2$, we see that given $\lambda_1$ the entanglement infidelity can be bounded as follows: $$ \frac{2^n - 1}{2^{n}}(1-\lambda_1) \le p \le \frac{4^n + 2^n-2}{4^{n}} (1-\lambda_1).$$ Using the upper bound as our estimate of $p$ corresponds to assuming that $p_2=0$ and leads to overestimating the entanglement infidelity by a factor of at most $(2^n+2)/2^n$, that is, by a factor of two or less. For the purpose of benchmarking logical qubits, however, the estimate will typically be much better since logical $Y$ errors are strongly suppressed for many popular codes due to such errors having higher weight and/or separate syndrome measurement and decoding for physical $X$ and $Z$ errors. In the surface code, for example, twice as many physical errors are required to generate a logical $Y$ error as to generate a logical $X$ or logical $Z$ error. \subsection{Controlled-NOT and Pauli Gates} Now consider the subgroup of the Clifford group generated by controlled-NOT and the single-qubit Pauli gates. Controlled-NOT gates generate the group $\set{GF}_2$ through their action on Pauli operators containing only $X$ and $I$ elements and separately on Pauli operators containing only $Z$ and $I$ elements. Twirling with respect to this group results in a channel consisting of four blocks: \begin{align*} \tilde{\op{E}}_{\set{C}}(\rho) =& (1-p) \rho +\frac{ p_1}{N_1(n)} \sum_{\mu \in {\bf B}_1} P_\mu \rho P_\mu \\ &+ \frac{p_2}{N_2(n)} \sum_{\mu \in {\bf B}_2} P_\mu \rho P_\mu + \frac{p_3}{N_3(n)} \sum_{\mu \in{\bf B}_3} P_\mu \rho P_\mu\\ &+ \frac{p_4}{N_4(n)} \sum_{\mu \in {\bf B}_4} P_\mu \rho P_\mu, \end{align*} where \begin{itemize} \item{${\bf B}_1$ consists of the non-identity Pauli operators containing only $Z$ and $I$ elements. The size of ${\bf B}_1$ is $$N_1(n) = 2^n-1.$$ } \item{${\bf B}_2$ consists of the non-identity Pauli operators containing only $X$ and $I$ elements. The size of ${\bf B}_2$ is $$ N_2(n) = 2^n -1.$$ } \item{${\bf B}_3$ consists of the non-identity Pauli operators containing an even number of $Y$ elements and not belonging to ${\bf B}_1$ or ${\bf B}_2$. The size of ${\bf B}_3$ is $$N_3(n) = \frac{4^n - 3 \cdot 2^n}{2} +1.$$ } \item{${\bf B}_4$ consists of those Pauli operators containing an odd number of $Y$ elements. The size of ${\bf B}_4$ is $$N_4(n) = \frac{4^n - 2^n}{2}.$$ } \end{itemize} The eigenvalues of $\tilde{\op{E}}_{\set{C}}$ with respect to the Pauli operators of each block are, \begin{align*} \lambda_1 &= 1- (p_2+p_3+p_4) \frac{2^n}{2^n-1} \\ &= 1- (p_2+p_3+p_4)\left(1+\frac{1}{2^n}\right) + O(2^{-2n}),\\ \lambda_2 &= 1- (p_1+p_3+p_4) \frac{2^n}{2^n-1} \\ &= 1- (p_1+p_3+p_4)\left(1+\frac{1}{2^n}\right) +O(2^{-2n}),\\ \lambda_3 &= 1- (p_1 + p_2 + p_4)\frac{2^n}{2^n-1} - p_3 \frac{4^{n} - 2^{n+2}}{4^n-3\times 2^n+2}\\ &= 1- p + \frac{p_3-p_1-p_2-p_4}{2^n} + O(2^{-2n}),\\ \lambda_4 &= 1- (p_1+p_2+p_3) \frac{2^{n}}{2^n-1} - p_4 \frac{2^{n}-2}{2^n-1} \\ &= 1 - p + \frac{ p_4- p_1- p_2 - p_3}{2^n} + O(2^{-2n}). \end{align*} The ability to prepare and measure eigenstates of $X$, $Y$, and $Z$ would enable the reconstruction of all four parameters, $p_1$, $p_2$, $p_3$, and $p_4$. For logical qubits, at least, preparation and measurement in the $X$ and $Z$ logical bases are often relatively straightforward as most codes of interest are CSS codes. As discussed in the previous section, however, preparing and measuring in the logical $Y$ basis is often problematic. The entanglement infidelity averaged over the gates set, $p$, can be estimated for two or more qubits by performing benchmarking on eigenstates of Pauli operators in $\set{B}_1$ and eigenstates of Pauli operators in $\set{B}_2$ independently. Given $\lambda_1$ and $\lambda_2$, the entanglement fidelity can be bounded as follows: $$ \frac{2^n - 1}{2^{n+1}}(2-\lambda_1-\lambda_2) \le p \le \frac{2^n - 1}{2^{n}} (2-\lambda_1-\lambda_2).$$ Using the upper bound corresponds to assuming that $p_3, p_4 =0$ and leads to an overestimate of $p$ by at most a factor of $2$ independent of the number of qubits in the benchmarking experiment. For logical qubits the estimate will typically be much better because $p_3$ and $p_4$ are likely to be much smaller than $p_1$ and $p_2$ for the reasons discussed in the previous section. Alternatively, for $n>2$ preparation and measurement of an eigenstate of a Pauli operator in $\set{B}_3$ (e.g., $\ket{{+}00}$) allows $\lambda_3$ to be extracted from the decay curve. Given $\lambda_3$, the bounds on $p$ are $$ \frac{2^n - 1}{2^{n}}(1-\lambda_3) \le p \le \frac{4^n-3\times 2^n+2}{4^{n} - 2^{n+2}} (1-\lambda_3),$$ where the upper bound corresponds to taking $p_3$ to be the only non-zero probability. This is an unrealistic but conservative assumption, causing us to overestimate $p$ by at most a factor of $(2^n-2)/(2^n-4)$. For logical qubits the lower bound will typically yield a better estimate of the entanglement infidelity. \section{Conclusion\label{sec:conclusion}} In this article we have introduced a method for analyzing the behavior of randomized benchmarking as it applies to subgroups of the Clifford group that do not form 2 designs with respect to $\set{SU}(2^n)$. We have additionally applied this method to two subgroups of interest. The first subgroup considered was the real Clifford group, which is generated by controlled-NOT, Hadamard, and the Pauli gates. We described a protocol for performing randomized benchmarking on $n$ qubits using only the real Clifford group that estimates the entanglement infidelity of the average error channel to within a factor of $(2^n+2)/2^n$. The second subgroup considered was that generated by controlled-NOT and Pauli gates. Given the ability to prepare and measure both $\ket{0}$ and $\ket{+}$, we found that the entanglement infidelity can be estimated to within a of factor of either $2$ or $(2^n-2)/(2^n-4)$ depending on which decay constants are extracted. These results demonstrate that highly accurate approximate randomized benchmarking can be performed without sampling from a unitary 2 design or any approximation thereof. \acknowledgements We thank Michael Mullan for his careful reading of the document. \input{RCRB20.bbl} \end{document}
\section{Introduction} The problem of optimal transport is a longstanding and active area of research in applied mathematics and the sciences \cite{villani2008optimal}. Its numerical treatment provides many challenges to the mathematical community (see \cite{kuzmin2010guide,Lev92} and the references therein). Our goal in this paper is to discuss the solution of a PDE-constrained optimisation problem where the constraint is given by a transport equation. In the field of PDE-constrained optimisation one typically wants to minimise an objective function with the constraints given by one or more PDEs \cite{book::IK08,book::FT2010}. Much of our analysis for this formulation builds upon the previous work \cite{BHT10}, for which we wish to devise new iterative methods and discretisation schemes. The study of the original transport problem goes back to the 18th century but a modern formulation was given in \cite{kantorovich2006problem,kantorovitch1958translocation}. Recent developments include the seminal paper \cite{benamou2000computational}, where the problem is formulated as a fluid mechanics problem. A very similar formulation of minimising an objective function subject to a transport equation constraint is found in \textit{optical flow} (cf.\ for example \cite{asz,borzi2003optimal,bruhn2005lucas,haber2006multilevel,horn1981determining, mang2015inexact,mang2017lagrangian}), which models the apparent `motion' of an image. In this manuscript, we examine the optimisation and discretisation of this problem, with a particular focus on the efficient solution of the linear systems that arise at the heart of the outer nonlinear solver. Our primary choice of nonlinear solver for the nonlinear optimisation problem is a Gauss--Newton scheme \cite{BHT10,HabAO00}, though we also consider methods based on a full Newton method. As one can typically follow the route of first performing the discretisation followed by deriving the appropriate optimality conditions, or vice versa, we discuss both approaches. We also briefly analyse a modified formulation of the classical transport model. Our main goal is the derivation of the linear system of equations followed by the introduction of suitable preconditioners that allow a parameter-robust solution of the linear system that is the computational heart of the nonlinear iteration. Such preconditioners have recently received much attention (cf. \cite{axelsson2016comparison,PSW11,PW11, Z10}). We then illustrate that the preconditioners proposed are efficient both for synthetic data as well as practical imaging examples. One of the key bottlenecks when considering imaging application is the vast amount of data as the complexity is often prohibitively high due to the large number of pixels. A contribution of this paper is to consider replacing the sparse linear systems arising for the optical flow problem with smaller dense systems obtained when the system is discretised using radial basis function (RBF) techniques \cite{larsson2003numerical,Wendland}. For the centres of the RBFs locations we choose superpixel centres \cite{achanta2012slic}, which we assume do not change too drastically between an original (given) image and a target image that we wish to achieve through our PDE-constrained optimisation model. Strategies based on superpixels or supervoxels have recently been used to reduce the complexity of the methods, and we refer to \cite{amat2013fast,chang2013superpixel,donne2015fast} for details. The paper is structured as follows. In \cref{sec::problem} we introduce the problem formulation considered in this work. \cref{sec::discr} introduces the discretisation of the optimisation problem and the constraint via a finite difference scheme. We discuss both discretise-then-optimise and optimise-then-discretise schemes. After introducing a modification to the problem formulation, we discuss two general preconditioning strategies in \cref{sec:Preconditioning}. We then introduce a discretisation using RBFs in \cref{sec::rbf}. In \cref{sec::Results} we present numerical experiments, for both finite difference and RBF discretisation, demonstrating the effectiveness of our discretisation and preconditioning approaches. \section{The optimal transport problem} \label{sec::problem} The problem we examine in this paper is one of minimising the functional \begin{align}\label{TranspOptical} \begin{split} \mathcal{E}(y,\vec{m})={}&\frac{1}{2\gamma}\int_{\Omega}(y(\vec{x},1)-y_1(\vec{x}))^2~\textup{d}\Omega+\frac{\delta}{2}\int_{0}^{1}\int_{\Omega}(y(\vec{x},t)-\bar{y}(\vec{x},t))^2~\textup{d}\Omega \, \textup{d}t \\ &\quad\quad+\frac{\beta}{2}\int_{0}^{1}\int_{\Omega}(Q\vec{m}(\vec{x},t))^{2}~\textup{d}\Omega \, \textup{d}t, \end{split} \end{align} where $\beta$ and $\gamma$ are (positive) parameters that can be understood as \emph{regularisation} or \emph{penalty parameters}. The parameter $\gamma$ is chosen in such a way that the computed state $y(\vec{x},1)$ is close to the true final state $y_1$ at time $T=1$. Here, the velocity $\vec{m}$ represents a control variable, and $Q$ is a differential operator (possibly $Q=\text{blkdiag}(I,I)$ or $Q=\text{blkdiag}(\nabla,\nabla)$). The problem is solved on a space-time grid $(\vec{x},t):=([x_1,x_2],t)\in\Omega\times[0,1]$, where $\Omega \subset \ensuremath{\mathbb{R}}^2$ denotes the domain occupied by the image. For the majority of the analysis presented in this paper we will consider the case $\delta=0$, i.e.\ where \begin{align}\label{TranspCOST} \mathcal{E}(y,\vec{m})=\frac{1}{2\gamma}\int_{\Omega}(y(\vec{x},1)-y_1(\vec{x}))^2~\textup{d}\Omega+\frac{\beta}{2}\int_{0}^{1}\int_{\Omega}(Q\vec{m}(\vec{x},t))^{2}~\textup{d}\Omega \, \textup{d}t, \end{align} however on a number of occasions we will describe modifications which are taken into account when $\delta$ is a positive parameter, measuring the deviation of $y$ from the desired state $\bar{y}$ during the \textit{entire} time interval. The goal is to minimise the above energy subject to the continuity transport equation \begin{equation} \label{TranspEQN} y_t+\nabla\cdot (\vec{m}y) =0, \end{equation} with the initial condition $y(\vec{x},0)=y_0$ as well as appropriate boundary conditions, for instance periodic boundary conditions or Dirichlet conditions. Here, $\vec{m}=\left[m_1,~m_2\right]^T$ is defined for the two-dimensional domain $\Omega$. While such a problem can be found in many areas of sciences, we wish to apply the above formulation to the estimation of an optical flow. To illustrate a particular set-up, examples for $y_0$ and $y_1$ are the two images shown in \cref{fig::motivation}\footnote{Images are taken from \url{http://cs.brown.edu/~black/images.html}.}. \begin{figure}[htb!] \centering \subfloat[Initial image $y_0$]{\includegraphics[width=0.25\textwidth]{crop-010.png}}\qquad \subfloat[Target image $y_1$]{\includegraphics[width=0.25\textwidth]{crop-020.png}} \caption{An example of an optical flow problem where we have a starting picture on the left and a target picture on the right.}\label{fig::motivation} \end{figure} \section{Discretisation using finite differences} \label{sec::discr} In this section, we wish to present how we discretise the optimisation problem \eqref{TranspCOST} with constraint \eqref{TranspEQN}. An outline is as follows: in \cref{sec::DTO} we examine the approach where such a PDE-constrained optimisation problem is discretised first, upon which optimality conditions are found. In \cref{sec::OTD} we then extend this methodology to the setting where optimality conditions are first derived (on a formal basis) on the continuous level, whereupon these are then discretised. In \cref{sec::for2} we then discuss the application of our methodology to a slight modification of the PDE \eqref{TranspEQN}. In \cref{sec:Modified}, we explain how the optimality conditions vary if one instead considers the cost functional \eqref{TranspOptical}, with an additional non-zero parameter $\delta$ measuring the deviation of the state $y$ from $\bar{y}$ throughout the entire time interval. \subsection{Discretise-then-optimise}\label{sec::DTO} A control problem using this formulation of the transport equation \eqref{TranspEQN} was introduced in \cite{BHT10}, and we therefore follow their approach for the derivation of the \textit{discretise-then-optimise} system. We start by discretising the objective function and nonlinear PDE constraint to then build a discrete Lagrangian, which then allows us to compute the solution via a Gauss-Newton or Lagrange--Newton scheme \cite[Ch.~10.3, 18]{nocedal1999no}. We employ an implicit Lax--Friedrichs method \cite{BHT10,Lev92} for the forward PDE \begin{align*} &\frac{1}{\tau}\left(y^{(k+1)}_{i,j}-\frac{1}{4}\left[y^{(k)}_{i+1,j}+y^{(k)}_{i-1,j}+y^{(k)}_{i,j+1}+y^{(k)}_{i,j-1}\right]\right)\\ &\quad\quad+\frac{1}{2h}\left((m_1\odot y)^{(k+1)}_{i+1,j}-(m_1\odot y)^{(k+1)}_{i-1,j}+(m_2\odot y)^{(k+1)}_{i,j+1}-(m_2\odot y)^{(k+1)}_{i,j-1}\right)=0, \end{align*} that we can manipulate to arrive at the following system for each time-step: \begin{equation*} \left(I+\frac{\tau}{2h}K(\mathbf{m}^{(k+1)})\right) \mathbf{y}^{(k+1)}=D_t\mathbf{y}^{(k)},\quad{}k=0,1,...,N_t-1. \end{equation*} Here, $\odot$ denotes the (componentwise) Hadamard product of vectors, $\tau$ represents the time-step and $h$ the spatial mesh parameter, the matrix $D_t$ arises from the four point stencil used to approximate the time derivative, and \begin{equation*} K(\mathbf{m}^{(k+1)})=\left[\begin{array}{cc} D_1 & D_2 \\ \end{array}\right]\left[ \begin{array}{cc} \mathrm{diag}\big(\mathbf{m}_1^{(k+1)}\big)\\ \mathrm{diag}\big(\mathbf{m}_2^{(k+1)}\big)\\ \end{array}\right], \end{equation*} where $D_1$ and $D_2$ are centred finite difference matrices. We can then formulate an all-at-once approach using the notation \begin{equation*} L(\mathbf{m}^{(k+1)}) \, \mathbf{y}^{(k+1)}=D_t\mathbf{y}^{(k)}, \end{equation*} where $L(\mathbf{m}^k)=I+\frac{\tau}{2h}K(\mathbf{m}^k)$, to obtain for a given number $N_t$ time-steps a matrix system of the form \begin{equation*} \begin{array}{cccc} \underbrace{ \left[ \begin{array}{ccccc} L(\mathbf{m}^{(1)})&&&&\\ -D_t&L(\mathbf{m}^{(2)})&&&\\ &-D_t&\ddots &&\\ &&\ddots &\ddots &\\ &&&-D_t&L(\mathbf{m}^{(N_t)})\\ \end{array} \right]}& \underbrace{ \left[ \begin{array}{c} \mathbf{y}^{(1)}\\ \mathbf{y}^{(2)}\\ \vdots\\ \vdots\\ \mathbf{y}^{(N_t)}\\ \end{array} \right]}&=& \underbrace{ \left[ \begin{array}{c} D_t\mathbf{y}^{(0)}\\ \mathbf{0}\\ \vdots\\ \vdots\\ \mathbf{0}\\ \end{array} \right]}\\ \mathcal{A}(\mathbf{m})&\mathbf{y}&=&\mathbf{d} \end{array} \end{equation*} representing the discretised PDE constraint. Depending on the boundary conditions (Dirichlet or periodic), the matrices $L(\mathbf{m}^k)$ and $D_t$ need to be slightly modified in rows pertaining to boundary nodes. In this work we apply periodic boundary conditions, in analogy to the work of Benzi, Haber and Taralli \cite{BHT10}. Furthermore, we may approximate the objective function \eqref{TranspCOST} on the discrete level by \begin{equation*} \bm{\mathcal{E}}(\mathbf{y},\mathbf{m})=\frac{1}{2\gamma}(\mathbf{y}^{(N_t)}-\mathbf{y}_1)^{T}M(\mathbf{y}^{(N_t)}-\mathbf{y}_1)+\frac{\beta \, \tau}{2}\mathbf{\mathbf{m}}^{T}\mathcal{M}\mathbf{\mathbf{m}}, \end{equation*} where $\mathcal{M}=\mathrm{blkdiag}(W,\ldots,W)$, and $W$ is obtained from the discretisation of the term $\int_{\Omega}(Q\vec{m}(\vec{x},t))^{2} \, \textup{d}\Omega$ (which could simply be a scaled identity operator). Note that, for simplicity, we have not included possible scalings of the individual $W$ matrices in $\mathcal{M}$ as these depend on the choice of discretisation performed in time. We now form the discrete Lagrangian for this problem \begin{equation*} \bm{\mathcal{L}}(\mathbf{y},\mathbf{m},\mathbf{p})=\bm{\mathcal{E}}(\mathbf{y},\mathbf{m})+\mathbf{p}^{T}\mathcal{Q}\left(\mathcal{A}(\mathbf{m}) \, \mathbf{y}-\mathbf{d}\right), \end{equation*} where $\mathcal{Q}$ is a matrix allowing us to interpret the Lagrange multiplier $\mathbf{p}$ as a grid function. For simplicity we assume that $\mathcal{Q}=\tau h^2 I,$ with $I$ the identity of the appropriate dimension. Following \cite{BHT10}, the computation of the first order conditions \begin{equation*} \bm{\mathcal{L}}_\mathbf{y}=\mathbf{0},\quad \bm{\mathcal{L}}_\mathbf{m}=\mathbf{0},\quad \bm{\mathcal{L}}_\mathbf{p}=\mathbf{0}, \end{equation*} leads to \begin{subequations} \label{forKKT} \begin{align} \label{forKKT1}\gamma^{-1}\mathcal{M}_{N_t}(\mathbf{y}-\mathbf{y}_{0,1})+\mathcal{A}(\mathbf{m})^{T}\mathcal{Q} \, \mathbf{p}&=\mathbf{0},\\ \label{forKKT2}\beta \, \tau \mathcal{M} \mathbf{m}+\mathcal{J}(\mathbf{y})^{T}\mathcal{Q} \, \mathbf{p}&=\mathbf{0},\\ \label{forKKT3}\mathcal{Q} \left(\mathcal{A}(\mathbf{m}) \, \mathbf{y} - \mathbf{d}\right)&=\mathbf{0}, \end{align} \end{subequations} where $\mathbf{y}_{0,1}$ is a vector containing vectors of zeros for every time-step, apart from the final step which contains the vector $\mathbf{y}_1$. The matrix $\mathcal{M}_{N_t}$ contains zero blocks at every time-step, apart from the final time-step, which gives rise to an identy matrix scaled by $h^2$, denoted as $M$. Note that in optical flow applications one is often given an image for every time step, meaning the matrix $\mathcal{M}_{N_t}$ can be modified to one that does not contain zero diagonal blocks, and the vector $\mathbf{y}_{0,1}$ contains all time instances of these images. Further, $\mathcal{J}(\mathbf{y})$ denotes the block diagonal matrix $\mathrm{blkdiag}\left(J(\mathbf{y}^{(1)}),\ldots,J(\mathbf{y}^{(N_t)})\right)$, where \begin{equation*} \frac{\tau}{2h}\left[\begin{array}{cc} D_1\quad D_2 \\ \end{array}\right]\left[ \begin{array}{cc} \mathrm{diag}\left(\mathbf{y}^{(j)}\right)&0\\ 0&\mathrm{diag}\left(\mathbf{y}^{(j)}\right)\\ \end{array}\right]=:J(\mathbf{y}^{(j)}), \end{equation*} at each time-step $j=1,2,...,N_t$. The equations \eqref{forKKT} represents a nonlinear system, which we have to treat with a nonlinear optimisation scheme. We follow \cite{BHT10} and use a Gauss--Newton method for the solution of the first order conditions, which leads to the matrix system \begin{align}\label{for1system1} \left[ \begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&0&\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}\\ 0&\beta \, \tau \mathcal{M} &\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\\ \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})&0\\ \end{array} \right] \left[ \begin{array}{c} \mathbf{s}_{\mathbf{y}}\\ \mathbf{s}_{\mathbf{m}}\\ \mathbf{s}_{\mathbf{p}} \end{array} \right]= -\left[ \begin{array}{c} \gamma^{-1}\mathcal{M}_{N_t}(\mathbf{y}-\mathbf{y}_{0,1})+\mathcal{A}(\mathbf{m})^{T}\mathcal{Q} \, \mathbf{p}\\ \beta \, \tau \mathcal{M} \mathbf{m}+\mathcal{J}(\mathbf{y})^{T}\mathcal{Q} \, \mathbf{p}\\ \mathcal{Q} \left(\mathcal{A}(\mathbf{m}) \, \mathbf{y} -\mathbf{d}\right) \end{array} \right] \end{align} at every step of the nonlinear iteration. \subsection{Optimise-then-discretise}\label{sec::OTD} We now highlight that it is also possible to follow the \textit{optimise-then-discretise} approach, where we commence by considering the continuous Lagrangian \begin{equation*} \mathcal{L}(y,\vec{m},p)=\mathcal{E}(y,\vec{m})+\int_0^{1}\int_{\Omega} p \, (y_t+\nabla\cdot (\vec{m} y))~\textup{d}\Omega \, \textup{d}t, \end{equation*} and then searching for the continuous first order conditions. Note that, for brevity, we have omitted the initial and boundary conditions within this \replaced[id=RH]{Lagrangian}{cost} functional; these are also accounted for and reappear in the optimality conditions. Proceeding formally, by considering the Fr\'{e}chet derivatives of the Lagrangian $\mathcal{L}$ with respect to $y$, $\vec{m}$ and $p$\added[id=RH]{, and integration by parts}, we then obtain the conditions \begin{subequations} \label{optKKT} \begin{align} \label{optKKT1}-p_t-\vec{m} \cdot \nabla{}p &=0,\\ \label{optKKT2} \beta \, Q^{*}Q\vec{m}-y\nabla{}p&=\vec{0},\\ \label{optKKT3}y_t+\nabla\cdot (\vec{m} y)&=0, \end{align} \end{subequations} together with the initial condition for $y$, and the final-time condition \begin{equation*} \frac{1}{\gamma} (y(\cdot,1)-y_1)=-p(1), \end{equation*} corresponding to the adjoint equation. We have now established the continuous first order conditions for the optimal transport problem. Equations \eqref{optKKT} represent a nonlinear set of equations, which need to be augmented by boundary and initial conditions. Equivalently, we can write this as $G(\vec{z})$ with $\vec{z}=\left[y,~m_1,~m_2,~p\right]^T$ and solve this nonlinear problem using a Gauss--Newton or Newton's method. The latter is the Lagrange--Newton or sequential quadratic programming (SQP) scheme and in each iteration we need to solve \begin{equation*} G'(\vec{z}_k) \, \vec{s}_k=-G(\vec{z}_k)=:\vec{b}, \end{equation*} where $\vec{s}_k=\vec{z}-\vec{z}_k$, until convergence of the method is achieved. We now need to form the derivative of $G$ to solve the Newton problem, and obtain \begin{subequations} \begin{align} \label{Adjoint} -( s_{p})_{_t}-\vec{s}_{m}\cdot\nabla{}p-\vec{m}\cdot\nabla s_{p} &=b_1,\\ \label{Gradient} \beta \, Q^{*}Q\vec{s}_{m}-y\nabla s_{p}-s_y \nabla{}p&=\vec{b}_2,\\ \label{Forward} (s_{y})_{_t}+\nabla\cdot (\vec{m} s_y)+\nabla\cdot (\vec{s}_{m}y)&=b_3. \end{align} \end{subequations} We examine the discretisation of this system of equations, starting with the treatment of the term \begin{equation*} (s_{y})_{_t}+\nabla\cdot (\vec{m} s_y) \end{equation*} in the forward equation \eqref{Forward}, using the implicit Lax--Friedrichs scheme. This gives \begin{align*} &\frac{1}{\tau}\left(\big(s^{(k+1)}_{y}\big)_{i,j}-\frac{1}{4}\left[\big(s^{(k)}_{y}\big)_{i+1,j}+\big(s^{(k)}_{y}\big)_{i-1,j}+\big(s^{(k)}_{y}\big)_{i,j+1}+\big(s^{(k)}_{y}\big)_{i,j-1}\right]\right)\\ &\quad\quad+\frac{1}{2h}\left((m_1\odot s_y)^{(k+1)}_{i+1,j}-(m_1\odot s_y)^{(k+1)}_{i-1,j}+(m_2\odot s_y)^{(k+1)}_{i,j+1}-(m_2\odot s_y)^{(k+1)}_{i,j-1}\right). \end{align*} Written in the same form as for the discretise-then-optimise approach, the matrices corresponding to the term at each time-step are $\left(I+\frac{\tau}{2h}K(\mathbf{m}^{(k+1)})\right) \mathbf{s}_\mathbf{y}^{(k+1)}-D_t\mathbf{s}_\mathbf{y}^{(k)}$, for $k=0,1,...,N_t-1$. The discretisation of $\nabla\cdot (\vec{s}_{m}y)$ is performed analogously and we obtain \begin{equation*} \nabla\cdot (\vec{s}_{m}y)=\frac{\partial(s_{m_1}y)}{\partial{}x_1}+\frac{\partial(s_{m_2}y)}{\partial{}x_2}, \end{equation*} which leads to \begin{equation*} \frac{1}{2h}\left((s_{m_1}\odot y)^{(k+1)}_{i+1,j}-(s_{m_1}\odot y)^{(k+1)}_{i-1,j}+(s_{m_2}\odot y)^{(k+1)}_{i,j+1}-(s_{m_2}\odot y)^{(k+1)}_{i,j-1}\right), \end{equation*} \textcolor{black}{and when taking into account the multiplication by the time-step $\tau$ results in \begin{equation*} \frac{\tau}{2h}\left((s_{m_1}\odot y)^{(k+1)}_{i+1,j}-(s_{m_1}\odot y)^{(k+1)}_{i-1,j}+(s_{m_2}\odot y)^{(k+1)}_{i,j+1}-(s_{m_2}\odot y)^{(k+1)}_{i,j-1}\right). \end{equation*}} We write this in matrix form as $\bm{\mathcal{J}}(\mathbf{y}) \, \mathbf{s}_{\mathbf{m}}.$ Consider now the discretisation of the terms arising from the continuous gradient equation \eqref{Gradient}. For the term $-s_y \nabla{}p=\big[-s_y \frac{\partial{}p}{\partial{}x_1},~-s_y \frac{\partial{}p}{\partial{}x_2}\big]^T$, we will obtain terms of the form \begin{equation*} (s_y)_{i,j}^{(k+1)}\frac{1}{2h}\left[ \begin{array}{c} \left(p_{i+1,j}^{(k+1)}-p_{i-1,j}^{(k+1)}\right)\\ \left(p_{i,j+1}^{(k+1)}-p_{i,j-1}^{(k+1)}\right)\\ \end{array} \right] \end{equation*} \textcolor{black}{at the $(k+1)$-th time-step, which can be written in matrix form (containing the time-step $\tau$) as \begin{equation*} \frac{\tau}{2h}\left[ \begin{array}{c} \mathrm{diag}\left(D_1^{T}\mathbf{p}^{(k+1)}\right)\\ \mathrm{diag}\left(D_2^{T}\mathbf{p}^{(k+1)}\right) \end{array} \right] \mathbf{s}_{\mathbf{y}}^{(k+1)}. \end{equation*} } In an analogous way, we may discretise the term $-y\nabla{}s_p=\big[-y \frac{\partial{}s_p}{\partial{}x_1},~-y \frac{\partial{}s_p}{\partial{}x_2}\big]^T$ by \begin{equation*} -y_{i,j}^{(k+1)}\frac{1}{2h} \left[ \begin{array}{c} (s_p)_{i+1,j}^{(k+1)}-(s_p)_{i-1,j}^{(k+1)}\\ (s_p)_{i,j+1}^{(k+1)}-(s_p)_{i,j-1}^{(k+1)} \end{array} \right], \end{equation*} which in block matrix form will lead to terms of the form \textcolor{black}{ \begin{equation*} \frac{\tau}{2h} \left[ \begin{array}{cc} \mathrm{diag}\left(\mathbf{y}^{(k+1)}\right)&0\\ 0&\mathrm{diag}\left(\mathbf{y}^{(k+1)}\right)\\ \end{array}\right] \left[\begin{array}{c} D_1^{T}\\ D_2^{T} \\ \end{array}\right] \mathbf{s}_{\mathbf{p}}^{(k+1)}, \end{equation*}} abbreviated by $\mathcal{J}(\mathbf{y})^{T}s_\mathbf{p}$. Finally, let us analyse the terms within the adjoint equation \eqref{Adjoint}. The term \begin{equation*} -\vec{s}_{m}\cdot\nabla{}p =-s_{m_1}\frac{\partial{}p}{\partial{x_1}}-s_{m_2}\frac{\partial{}p}{\partial{x_2}}, \end{equation*} is approximated at time $t_{k+1}$ by \begin{equation*} -(s_{m_1})^{(k+1)}_{i,j}\frac{1}{2h}\left(p_{i+1,j}^{(k+1)}-p_{i-1,j}^{(k+1)}\right)-(s_{m_2})^{(k+1)}_{i,j}\frac{1}{2h}\left(p_{i,j+1}^{(k+1)}-p_{i,j-1}^{(k+1)}\right), \end{equation*} or in matrix form \begin{equation*} \left[ \begin{array}{cc} \mathrm{diag}\left(D_1^{T}\mathbf{p}^{(k+1)}\right)&\mathrm{diag}\left(D_2^{T}\mathbf{p}^{(k+1)}\right)\\ \end{array}\right] \mathbf{s}_\mathbf{m}^{(k+1)}=:\mathcal{G}(\mathbf{p}) \, \mathbf{s}_\mathbf{m}^{(k+1)}. \end{equation*} By now it is clear that the collection of all the previously discretised expressions results in a linear system similar to the matrix \eqref{for1system1} obtained from the discretise-then-optimise, Gauss--Newton approach. The last ingredient needed is a discretised version of the discretised adjoint operator, i.e., \begin{equation*} -(s_p)_{_t}-\vec{m}\cdot\nabla{}s_p=-(s_p)_{_t}-m_1\frac{\partial{}s_p}{\partial{}x_1}-m_2\frac{\partial{}s_p}{\partial{}x_2}. \end{equation*} An implicit Lax--Friedrichs scheme again uses forward averaged differences in time and centred differences in space, leading to equations of the form \begin{align*} &-\frac{1}{\tau}\left((s_p)^{(k+1)}_{i,j}-\frac{1}{4}\left[(s_p)^{(k)}_{i+1,j}+(s_p)^{(k)}_{i-1,j}+(s_p)^{(k)}_{i,j+1}+(s_p)^{(k)}_{i,j-1}\right]\right)\\ &\quad\quad-\frac{1}{2h}\left((m_{1})_{i,j}\left((s_p)^{(k+1)}_{i+1,j}-(s_p)^{(k+1)}_{i-1,j}\right)+(m_{2})_{i,j}\left((s_p)^{(k+1)}_{i,j+1}-(s_p)^{(k+1)}_{i,j-1}\right)\right), \end{align*} which in turn may be summarised by matrices $\left(I+\frac{\tau}{2h}L(\mathbf{m}^{(k+1)})\right) \mathbf{s}_\mathbf{p}^{(k+1)}-D_t\mathbf{s}_\mathbf{p}^{(k)}$. These may be assembled for all time-steps into a high-dimensional linear system $\mathcal{B}(\mathbf{m})$ similar to $\mathcal{A}(\mathbf{m})$. We have now discretised the PDE-constrained optimisation problem using the optimise-then-discretise approach. \textcolor{black}{We now have obtained a matrix system of the form \begin{equation} \label{system1} \left[ \begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&\mathcal{G}(\mathbf{p}) &\mathcal{B}(\mathbf{m}) \\ \mathcal{G}(\mathbf{p})^{T} &\beta \, \tau \mathcal{M} &\mathcal{J}(\mathbf{y})^{T}\\ \mathcal{A}(\mathbf{m})&\mathcal{J}(\mathbf{y})&0\\ \end{array} \right] \left[ \begin{array}{c} \mathbf{s}_{\mathbf{y}}\\ \mathbf{s}_{\mathbf{m}}\\ \mathbf{s}_{\mathbf{p}}\\\end{array} \right] =\mathbf{b}. \end{equation}} Note that we have not yet established that the discretisation of the adjoint equation above leads to the desired form that $\mathcal{A}(\mathbf{m})^{T}=\mathcal{B}(\mathbf{m})$. For both matrices the diagonal blocks are of interest, and we will discuss these particular blocks now. For $\mathcal{A}(\mathbf{m})^{T}$, we obtain for the crucial diagonal blocks that \begin{align*} \left(K(\mathbf{m}^{(k+1)})\right)^{T}\mathbf{s}_{\mathbf{p}}^{(k+1)}&= \left[ \begin{array}{cc} \mathrm{diag}\left(\mathbf{m}_1^{(k+1)}\right)& \mathrm{diag}\left(\mathbf{m}_2^{(k+1)}\right)\\ \end{array}\right] \left[ \begin{array}{c} D_1^{T} \mathbf{s}_{\mathbf{p}}^{(k+1)}\\ D_2^{T} \mathbf{s}_{\mathbf{p}}^{(k+1)}\\ \end{array}\right]\\ &= \mathrm{diag}\left(\mathbf{m}_1^{(k+1)}\right)D_1^{T} \mathbf{s}_{\mathbf{p}}^{(k+1)}+ \mathrm{diag}\left(\mathbf{m}_2^{(k+1)}\right)D_2^{T} \mathbf{s}_{\mathbf{p}}^{(k+1)}, \end{align*} whereupon applying $D_1^{T}=-D_1$ clearly leads to the desired form within $\mathcal{B}(\mathbf{m})$. We emphasise that the matrix system \eqref{system1} was obtained using a full Newton method, as opposed to the analysis for the discretise-then-optimise method for which the Gauss--Newton approach of \cite{BHT10} is applied. The main consequence of this change in the outer iteration is the appearance of the $\mathcal{G}(\mathbf{p})$ and $\mathcal{G}(\mathbf{p})^T$ blocks in \eqref{system1}. We also point out that in \eqref{for1system1} the scaling matrix $\mathcal{Q}$ was used for the Lagrange multiplier following \cite{BHT10}. Such a scaling could also be used to make system \eqref{system1} ressemble the discretise-then-optimise approach more closely. \subsection{Alternative problem formulation} \label{sec::for2} Whereas we focus for the most part on the optimal transport problem given in \eqref{TranspCOST}--\eqref{TranspEQN}, we also wish to briefly discuss an alternative formulation given by the minimisation of \begin{align*} \mathcal{E}(y,\vec{m})=\frac{1}{2\gamma}\int_{\Omega}(y(\vec{x},1)-y_1)^2~\textup{d}\Omega+\frac{\beta}{2}\int_{0}^{1}\int_{\Omega}(Q\vec{m}(\vec{x},t))^{2}~\textup{d}\Omega \, \textup{d}t \end{align*} subject to the advection transport equation (cf. \cite{mang2017lagrangian}) \begin{equation} \label{TranspEQN2} y_t+\vec{m}\cdot \nabla{}y =0, \end{equation} along with appropriate boundary and initial conditions. Let us briefly compare \eqref{TranspEQN2} with \eqref{TranspEQN}. The divergence theorem implies $\frac{\d}{\textup{d}t} \int_\Omega y \, \textup{d}\Omega = - \int_{\Gamma} (\vec{m} y) \cdot \vec{n} \, \textup{d}\Gamma$ and thus \eqref{TranspEQN} will be mass preserving \deleted[id=RH]{up} in the presence of homogeneous Dirichlet or periodic boundary conditions. By constrast, mass may be produced or removed in \eqref{TranspEQN2} unless $\nabla\cdot\vec{m} = 0$ holds. Discretising the objective function as before results in the following functional on the discrete level: \begin{equation}\label{Objective_New} \bm{\mathcal{E}}(\mathbf{y},\mathbf{m})=\frac{1}{2\gamma}(\mathbf{y}^{(N_t)}-\mathbf{y}_1)^{T}M(\mathbf{y}^{(N_t)}-\mathbf{y}_1)+\frac{\beta \, \tau}{2}\mathbf{\mathbf{m}}^{T}\mathcal{M}\mathbf{\mathbf{m}}. \end{equation} The discretisation of the transport equation \eqref{TranspEQN2} via an implicit Lax--Friedrichs scheme \cite{Lev92} gives \begin{align*} &\frac{1}{\tau}\left(y^{(k+1)}_{i,j}-\frac{1}{4}\left[y^{(k)}_{i+1,j}+y^{(k)}_{i-1,j}+y^{(k)}_{i,j+1}+y^{(k)}_{i,j-1}\right]\right)\\ &\quad\quad+\frac{1}{2h}\left((m_1)_{i,j}\left(y^{(k+1)}_{i+1,j}-y^{(k+1)}_{i-1,j}\right)+(m_2)_{i,j}\left(y^{(k+1)}_{i,j+1}-y^{(k+1)}_{i,j-1}\right)\right)=0, \end{align*} which can be written in matrix form as \begin{align*} \left(I+\frac{\tau}{2h}\widetilde{K}(\mathbf{m}^{(k+1)})\right) \mathbf{y}^{(k+1)}=D_t\mathbf{y}^{(k)}, \end{align*} where \begin{equation*} \widetilde{K}(\mathbf{m}^{(k+1)})= \left[ \begin{array}{cc} \mathrm{diag}\left(\mathbf{m}_1^{(k+1)}\right)&\mathrm{diag}\left(\mathbf{m}_2^{(k+1)}\right)\\ \end{array}\right] \left[ \begin{array}{c} D_1\\ D_2\\ \end{array}\right]. \end{equation*} Therefore, in block form, the system of equations for the forward problem at all time-steps reads \begin{equation}\label{Constraints_New} \begin{array}{cccc} \underbrace{ \left[ \begin{array}{ccccc} \widetilde{L}(\mathbf{m}^{(1)})&&&&\\ -D_t&\widetilde{L}(\mathbf{m}^{(2)})&&&\\ &-D_t&\ddots &&\\ &&\ddots &\ddots &\\ &&&-D_t&\widetilde{L}(\mathbf{m}^{(N_t)})\\ \end{array} \right]}& \underbrace{ \left[ \begin{array}{c} \mathbf{y}^{(1)}\\ \mathbf{y}^{(2)}\\ \vdots\\ \vdots\\ \mathbf{y}^{(N_t)}\\ \end{array} \right]}&=& \underbrace{ \left[ \begin{array}{c} M\mathbf{y}^{(0)}\\ 0\\ \vdots\\ \vdots\\ 0\\ \end{array} \right]}\\ \widetilde{\mathcal{A}}(\mathbf{m})&\mathbf{y}&=&\mathbf{d} \end{array}. \end{equation} Using the standard Lagrangian approach for differentiating the objective functional \eqref{Objective_New} subject to the constraints \eqref{Constraints_New}, we obtain the first order conditions \begin{align*} \bm{\mathcal{L}}_\mathbf{y}&=\gamma^{-1}\mathcal{M}_{N_t}(\mathbf{y}-\mathbf{y}_{0,1})+\widetilde{\mathcal{A}}(\mathbf{m})^{T}\mathbf{p}=\mathbf{0},\\ \bm{\mathcal{L}}_\mathbf{m}&=\beta \, \tau \mathcal{M} \mathbf{m}+\widetilde{\mathcal{G}}(\mathbf{y}) \, \mathbf{p}=\mathbf{0},\\ \bm{\mathcal{L}}_\mathbf{p}&=\widetilde{\mathcal{A}}(\mathbf{m}) \, \mathbf{y} - \mathbf{d}=\mathbf{0}, \end{align*} where \begin{equation*} \widetilde{G}^{(j)}= \left[ \begin{array}{c} \mathrm{diag}(\mathbf{y}_1^{(j)})\\ \mathrm{diag}(\mathbf{y}_2^{(j)}) \end{array} \right]~~\textnormal{with}~~\mathbf{y}_i^{(j)}=D_iy^{(j)}~~\textnormal{and}~~\widetilde{\mathcal{G}}=\mathrm{blkdiag}\left(\widetilde{G}^{(1)},\ldots,\widetilde{G}^{(N_t)}\right). \end{equation*} As for the previous problem formulation, we may then write down a Gauss--Newton scheme for this problem governed by the matrix \begin{equation} \label{for2system1} \left[ \begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&0&\mathcal{A}(\mathbf{m})^{T}\\ 0&\beta \, \tau \mathcal{M} &\widetilde{\mathcal{G}}(\mathbf{y})\\ \mathcal{A}(\mathbf{m})&\widetilde{\mathcal{G}}(\mathbf{y})^T&0\\ \end{array} \right]. \end{equation} \subsection{Modified cost functional}\label{sec:Modified} We now briefly discuss the changes to the optimality conditions and matrix systems if the cost functional \eqref{TranspOptical} is instead considered. In this case, when the discretise-then-optimise method is applied, the discrete approximation of $\mathcal{E}$ is given by \begin{equation*} \bm{\mathcal{E}}(\mathbf{y},\mathbf{m})=\frac{1}{2\gamma}(\mathbf{y}^{(N_t)}-\mathbf{y}_1)^{T}M(\mathbf{y}^{(N_t)}-\mathbf{y}_1)+\frac{\delta\tau}{2}(\mathbf{y}-\bar{\mathbf{y}})^{T}\bar{\mathcal{M}}(\mathbf{y}-\bar{\mathbf{y}})+\frac{\beta \, \tau}{2}\mathbf{\mathbf{m}}^{T}\mathcal{M}\mathbf{\mathbf{m}}, \end{equation*} where $\bar{\mathbf{y}}$ contains the discrete values of the desired state $\bar{y}$ at each time-step, and $\bar{\mathcal{M}}$ is a block diagonal matrix corresponding to a scaled identity operator applied at each time-step. The equations $\bm{\mathcal{L}}_{\mathbf{m}}=\bm{\mathcal{L}}_{\mathbf{p}}=\mathbf{0}$, as given by \eqref{forKKT2}--\eqref{forKKT3}, will then hold as before. By contrast, the equation $\bm{\mathcal{L}}_{\mathbf{y}}=\mathbf{0}$ becomes \begin{equation*} \ \gamma^{-1}\mathcal{M}_{N_t}(\mathbf{y}-\mathbf{y}_{0,1})+\delta\tau\bar{\mathcal{M}}(\mathbf{y}-\bar{\mathbf{y}})+\mathcal{A}(\mathbf{m})^{T}\mathcal{Q} \, \mathbf{p}=\mathbf{0}, \end{equation*} and the Gauss--Newton system \eqref{for1system1} is therefore modified to the form \begin{align*} &\left[ \begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}+\delta\tau\bar{\mathcal{M}}&0&\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}\\ 0&\beta \, \tau \mathcal{M} &\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\\ \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})&0\\ \end{array} \right] \left[ \begin{array}{c} \mathbf{s}_{\mathbf{y}}\\ \mathbf{s}_{\mathbf{m}}\\ \mathbf{s}_{\mathbf{p}} \end{array} \right] \\ &\quad\quad\quad\quad= -\left[ \begin{array}{c} \gamma^{-1}\mathcal{M}_{N_t}(\mathbf{y}-\mathbf{y}_{0,1})+\delta\tau\bar{\mathcal{M}}(\mathbf{y}-\bar{\mathbf{y}})+\mathcal{A}(\mathbf{m})^{T}\mathcal{Q} \, \mathbf{p}\\ \beta \, \tau \mathcal{M} \mathbf{m}+\mathcal{J}(\mathbf{y})^{T}\mathcal{Q} \, \mathbf{p}\\ \mathcal{Q} \left(\mathcal{A}(\mathbf{m}) \, \mathbf{y} -\mathbf{d}\right) \end{array} \right]. \end{align*} Similarly, for the matrix system \eqref{system1} arising from the optimise-then-discretise approach, the top left entry $\gamma^{-1}\mathcal{M}_{N_t}$ must be replaced by $\gamma^{-1}\mathcal{M}_{N_t}+\delta\tau\bar{\mathcal{M}}$ if the modified cost functional \eqref{TranspOptical} is used. \section{Preconditioning}\label{sec:Preconditioning} The most important step within our algorithm, in order to minimise the computational work required, is to accurately and efficiently solve large and sparse linear systems. To illustrate our methodology, we focus our description on the Gauss--Newton matrix derived from the discretise-then-optimise case for problem \eqref{TranspCOST}--\eqref{TranspEQN}; see \eqref{for1system1}: \begin{equation}\label{Matrix} \left[ \begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&0&\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}\\ 0&\beta \, \tau \mathcal{M} &\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\\ \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})&0\\ \end{array} \right]. \end{equation} We approach the solutions of such linear systems by exploiting the \emph{saddle point form} of the matrices involved. It is well known that non-singular saddle point matrices of the form \begin{equation}\label{SaddlePt} \ \left[\begin{array}{cc} A & B^T \\ C & 0 \\ \end{array}\right] \end{equation} can be effectively approximated (provided that $A$ is non-singular) by block diagonal or block triangular preconditioners of the form \begin{equation*} \ P_D=\left[\begin{array}{cc} A & 0 \\ 0 & S \\ \end{array}\right],\quad\quad{}P_T=\left[\begin{array}{cc} A & 0 \\ B & -S \\ \end{array}\right], \end{equation*} where $S:=CA^{-1}B^T$ denotes the (negative) \emph{Schur complement} of the matrix system. It can be shown (see \cite{Ku95,preconMGW}) that preconditioning the saddle point system with $P_D$ or $P_T$ results in the convergence of a Krylov subspace method in $3$ or $2$ iterations, respectively. It can also be shown (see \cite{ipsen}) that a similar block triangular preconditioner may also be applied if the $(2,2)$ block of \eqref{SaddlePt} is non-zero. Of course, the so-called `ideal preconditioners' $P_D$ and $P_T$ would not be applied in practice, as the computational cost of inverting $A$ and $S$ would be almost as great as inverting the entire system. We therefore wish to consider variants of these preconditioners, where the $(1,1)$ block and Schur complement are replaced with suitable (cheap) approximations. For the matrix \eqref{Matrix}, we see that \begin{equation*} \ A=\left[\begin{array}{cc} \gamma^{-1}\mathcal{M}_{N_t}&0\\ 0&\beta \, \tau \mathcal{M}\\ \end{array}\right],\quad\quad{}B=C=\left[\begin{array}{cc} \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})\\ \end{array}\right]. \end{equation*} Below, we present two preconditioners which we discover to be effective for this system. In the case of `full observations', i.e., $\delta > 0$ and with the desired state given for every time-step, as in some optical flow problems, the matrix $\mathcal{M}_{N_t}$ is block diagonal and invertible, which makes preconditioning easier. We therefore focus on the case where $\mathcal{M}_{N_t}$ is highly singular and only comment on the more straightforward case. \subsection{First preconditioner} \label{sec::precond1} The first preconditioner we introduce is based on the block diagonal structure $P_D$, but with the $(1,1)$ block and Schur complement replaced with suitable approximations. For the $(1,1)$ block, we write that \begin{equation*} A=\left[\begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&0\\ 0&\beta \, \tau \mathcal{M} \\ \end{array}\right]\approx \left[\begin{array}{ccc} \widehat{\mathcal{M}}_{N_t}&0\\ 0&\beta \, \tau \mathcal{M} \\ \end{array}\right]=:\widehat{A}, \end{equation*} where $\widehat{\mathcal{M}}_{N_t}$ approximates the highly singular matrix $\gamma^{-1}\mathcal{M}_{N_t}$. As suggested by Benzi, Haber and Taralli in \cite{BHT10}, all zero diagonal entries in the $(1,1)$ block are replaced with $\mu$ within the preconditioner, where this parameter reflects the mean ratio of diagonal entries between the first and second terms of the Schur complement. Since the $(1,1)$ block is highly singular we define the Schur complement of the ``perturbed'' system as \begin{equation*} S=\mathcal{Q}\mathcal{A}(\mathbf{m})\widehat{\mathcal{M}}_{N_t}^{-1}\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}+\frac{1}{\beta \, \tau}\hspace{0.15em}\mathcal{Q}\mathcal{J}(\mathbf{y}) \mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}. \end{equation*} The approach we use to approximate this matrix follows the matching strategy introduced in \cite{PS12_CP,PSW11,PW10,PW11}, where we approximate $S$ by \begin{equation}\label{S1} \widehat{S}_1=\big(\mathcal{Q}\mathcal{A}(\mathbf{m})+\mathcal{M}_1\big)\widehat{\mathcal{M}}_{N_t}^{-1}\big(\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}+\mathcal{M}_2\big), \end{equation} with the desire that the term $\mathcal{M}_1\widehat{\mathcal{M}}_{N_t}^{-1}\mathcal{M}_2$ accurately captures the second term of the exact Schur complement, that is: \begin{equation*} \mathcal{M}_1\widehat{\mathcal{M}}_{N_t}^{-1}\mathcal{M}_2\approx\frac{1}{\beta \, \tau}\hspace{0.15em}\mathcal{Q}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}. \end{equation*} A possible selection of the matrices $\mathcal{M}_1$, $\mathcal{M}_2$ is as follows: \begin{equation} \ \label{M1M2} \mathcal{M}_1=\mathcal{M}_2^T=\frac{1}{\sqrt{\beta \, \tau}}\hspace{0.15em}\big(\mathcal{Q}\mathcal{J}(\mathbf{y}) \mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\big)^{1/2}\widehat{\mathcal{M}}_{N_t}^{1/2}, \end{equation} A further saving in the required computational cost may be achieved by replacing these matrices by the diagonal approximations: \begin{equation*} \ \mathcal{M}_1=\mathcal{M}_2=\frac{1}{\sqrt{\beta \, \tau}}\hspace{0.15em}\left[\text{diag}\big(\widehat{\mathcal{M}}_{N_t}\big)\right]^{1/2}\left[\text{diag}\big(\mathcal{Q}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\big)\right]^{1/2}, \end{equation*} which leads to a preconditioner that may be applied cheaply in practice. We note that, whereas the matrices $\widehat{\mathcal{M}}_{N_t}^{1/2}$ and $\mathcal{M}^{-1}$ appear complicated to apply, they are in fact straightforward as each of the matrices $\mathcal{M}_{N_t}$ and $\mathcal{M}$ contain multiples of identity operators on each diagonal block, and therefore $\widehat{\mathcal{M}}_{N_t}^{1/2}$ and $\mathcal{M}^{-1}$ solely consist of scaled identity matrices corresponding to each time-step. Whereas the effectiveness of this Schur complement approximation will inevitably depend to some extent on the numerical behaviour of the solution at each Newton step, the following observation may be readily made (based on the methodology of \cite{PW11}), guaranteeing the robustness of the smallest eigenvalue of the preconditioned Schur complement in an ideal setting: \begin{lemma} The eigenvalues $\lambda$ of $\widehat{S}_1^{-1}S$ satisfy $\lambda\geq\frac{1}{2},$ \textcolor{black}{ where $\widehat{S}_1$ is as defined by \eqref{S1}, and $\mathcal{M}_1$, $\mathcal{M}_2$ are given in \eqref{M1M2}.} \end{lemma} \begin{pf} Due to the symmetry and positive definiteness of $S$ and $\widehat{S}_1,$ which may be observed due to $\widehat{\mathcal{M}}_{N_t}$ being symmetric positive definite by construction, the eigenvalues may be bounded by the Rayleigh quotient \begin{equation*} \ R:=\frac{\mathbf{v}^T S \mathbf{v}}{\mathbf{v}^T\widehat{S}_1\mathbf{v}}=\frac{\mathbf{v}^T\left(\mathcal{Q}\mathcal{A}(\mathbf{m})\widehat{\mathcal{M}}_{N_t}^{-1}\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}+\beta^{-1}\tau^{-1}\mathcal{Q}\mathcal{J}(\mathbf{y}) \mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\right)\mathbf{v}}{\mathbf{v}^T\big(\mathcal{Q}\mathcal{A}(\mathbf{m})+\mathcal{M}_1\big)\widehat{\mathcal{M}}_{N_t}^{-1}\big(\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}+\mathcal{M}_2\big)\mathbf{v}}. \end{equation*} We now observe that we may write \begin{equation*} \ R=\frac{\mathbf{a}^T\mathbf{a}+\mathbf{b}^T\mathbf{b}}{(\mathbf{a}+\mathbf{b})^T(\mathbf{a}+\mathbf{b})},~~~\text{where}~~\mathbf{a}=\widehat{\mathcal{M}}_{N_t}^{-1/2}\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}\mathbf{v},~\mathbf{b}=\frac{1}{\sqrt{\beta \, \tau}}\hspace{0.15em}\mathcal{M}^{-1/2}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\mathbf{v}. \end{equation*} Simple manipulation therefore tells us that \begin{equation*} \ \frac{1}{2}(\mathbf{a}-\mathbf{b})^T(\mathbf{a}-\mathbf{b})\geq0~~\Leftrightarrow~~\mathbf{a}^T\mathbf{a}+\mathbf{b}^T\mathbf{b}\geq\frac{1}{2}(\mathbf{a}+\mathbf{b})^T(\mathbf{a}+\mathbf{b})~~\Leftrightarrow~~R\geq\frac{1}{2}, \end{equation*} which leads to the result. \end{pf} \vspace{0.5em} We highlight that, although the lower bound for the eigenvalues of $\widehat{S}_1^{-1}S$ can be analysed in detail, the magnitude of the largest eigenvalue will depend on the precise behaviour of the Newton iterates, which we cannot control in general. To provide an illustration of the overall eigenvalue distribution, we present in \cref{fig::eig} the eigenvalues for a particular test problem, for a range of problem sizes and values of $\beta$. As is demonstrated by the plots, the eigenvalues are found to become more clustered for finer grids, with the magnitude of the largest eigenvalues fairly robust to changes in regularisation parameter. Applying our approximations of the $(1,1)$ block and Schur complement leads to a preconditioner of the form \begin{equation} \label{eq:P1} \ P_1=\left[\begin{array}{ccc} \widehat{\mathcal{M}}_{N_t}&0&0\\ 0&\beta \, \tau\mathcal{M}&0\\ 0&0&\widehat{S}_1\\ \end{array}\right], \end{equation} which we can then apply within a Krylov subspace method. \begin{figure}[htb!] \setlength\figureheight{0.24\linewidth} \setlength\figurewidth{0.36\linewidth} \centering \subfloat[$n_x=8$]{ \includegraphics[width=0.45\textwidth]{HPS18-figure0.pdf} } \subfloat[$n_x=16$]{ \includegraphics[width=0.45\textwidth]{HPS18-figure1.pdf} } \caption{Eigenvalues of $\widehat{S}_1^{-1}S$ for an imaging test problem, where finite difference nodes are equally distributed in each spatial direction. Results are given for different numbers of nodes $n_x$ in each dimension, and for different values of $\beta$.}\label{fig::eig} \end{figure} \vspace{0.5em} We highlight that similar ideas may be applied to the matrix system \eqref{system1} arising from the optimise-then-discretise setting. In more detail, one may apply preconditioners of the form \begin{equation*} \ \left[\begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&0 &0 \\ 0 &\beta \, \tau \mathcal{M} &0\\ 0&0&\widehat{S}_{1,\text{OTD}}\\ \end{array}\right]\quad\text{or}\quad\left[\begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&0 &0 \\ \mathcal{G}(\mathbf{p})^{T} &\beta \, \tau \mathcal{M} &0\\ \mathcal{A}(\mathbf{m})&\mathcal{J}(\mathbf{y})&-\widehat{S}_{1,\text{OTD}}\\ \end{array}\right]. \end{equation*} Here, $\widehat{S}_{1,\text{OTD}}$ can be chosen to approximate the Schur complement of the matrix system obtained by setting $\mathcal{G}(\mathbf{y})=0$, for example. That is, \begin{align*} \ \widetilde{S}:={}&\mathcal{A}(\mathbf{m})\widehat{\mathcal{M}}_{N_t}^{-1}\mathcal{B}(\mathbf{m})+\frac{1}{\beta \, \tau}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^T \\ \approx{}&\left(\mathcal{A}(\mathbf{m})+\frac{1}{\sqrt{\beta \, \tau}}\mathcal{M}_{1,\text{OTD}}\right)\widehat{\mathcal{M}}_{N_t}^{-1}\left(\mathcal{B}(\mathbf{m})+\frac{1}{\sqrt{\beta \, \tau}}\mathcal{M}_{2,\text{OTD}}\right)=:\widehat{S}_{1,\text{OTD}}, \end{align*} with $\mathcal{M}_{1,\text{OTD}}$, $\mathcal{M}_{2,\text{OTD}}$ chosen such that $\mathcal{M}_{1,\text{OTD}}\widehat{\mathcal{M}}_{N_t}^{-1}\mathcal{M}_{2,\text{OTD}}\approx\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^T$. \vspace{0.5em} \textbf{Note.}~The derivation for this preconditioner has been based on the cost functional \eqref{TranspCOST}, whereupon the highly singular matrix $\gamma^{-1}\mathcal{M}_{N_t}$ is approximated by $\widehat{\mathcal{M}}_{N_t}$. If instead the cost functional \eqref{TranspOptical} is considered (with $\delta>0$), the corresponding matrix in the $(1,1)$ block of \eqref{Matrix} is $\mathcal{M}_{1,1}:=\gamma^{-1}\mathcal{M}_{N_t}+\delta\tau\bar{\mathcal{M}}$, which is now invertible. Therefore, when deriving an analogous preconditioner $P_1$ for this problem setup, the matrix $\widehat{\mathcal{M}}_{N_t}$ must be replaced with $\mathcal{M}_{1,1}$ on all occasions. \subsection{Second preconditioner} \label{sec::precond2} We now derive a second block preconditioner, based largely on results in \cite{BenDOS15}. We commence by considering the following permutation of the matrix to be solved: \begin{equation}\label{Permuted} \Pi \left[ \begin{array}{ccc} \gamma^{-1}\mathcal{M}_{N_t}&0&\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}\\ 0&\beta \, \tau \mathcal{M} &\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\\ \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})&0\\ \end{array} \right]= \left[ \begin{array}{ccc} \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})&0\\ 0&\beta \, \tau \mathcal{M} &\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\\ \gamma^{-1}\mathcal{M}_{N_t}&0&\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}\\ \end{array} \right], \end{equation} where the permutation matrix is given by \begin{equation*} \Pi:= \left[ \begin{array}{ccc} 0&0&I\\ 0&I&0\\ I&0&0\\ \end{array} \right]. \end{equation*} The matrix \eqref{Permuted} is now of saddle point structure \eqref{SaddlePt}, with \begin{equation*} \ A=\left[ \begin{array}{cc} \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})\\ 0&\beta \, \tau\mathcal{M}\\ \end{array} \right],\quad\quad{}B=\left[ \begin{array}{cc} 0&\mathcal{Q}\mathcal{J}(\mathbf{y})\\ \end{array} \right],\quad\quad{}C=\left[ \begin{array}{cc} \gamma^{-1}\mathcal{M}_{N_t}&0\\ \end{array} \right], \end{equation*} and a non-zero $(2,2)$ block given by $\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}$. We may then consider the right preconditioner \begin{equation*} \widetilde{P}= \left[ \begin{array}{ccc} \mathcal{Q}\mathcal{A}(\mathbf{m})&\mathcal{Q}\mathcal{J}(\mathbf{y})&0\\ 0&\beta \, \tau \mathcal{M} &0\\ \gamma^{-1}\mathcal{M}_{N_t}&0&-\widehat{S}_2\\ \end{array} \right], \end{equation*} with its inverse given by \begin{equation*} \widetilde{P}^{-1}= \left[ \begin{array}{ccc} \mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}&-\beta^{-1}\tau^{-1}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y}) \mathcal{M}^{-1}&0\\ 0&\beta^{-1}\tau^{-1} \mathcal{M}^{-1} &0\\ \gamma^{-1}\widehat{S}_2^{-1}\mathcal{M}_{N_t}\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}&-\gamma^{-1}\beta^{-1}\tau^{-1}\widehat{S}_2^{-1}\mathcal{M}_{N_t}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y}) \mathcal{M}^{-1}&-\widehat{S}_2^{-1}\\ \end{array} \right]. \end{equation*} The matrix $\widehat{S}_2$ is designed to approximate the Schur complement of the \emph{permuted matrix system}, that is \begin{equation*} \widehat{S}_2\approx S =\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}+\frac{1}{\beta \, \tau\gamma}\hspace{0.15em}\mathcal{M}_{N_t}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}. \end{equation*} Let us now reapply the permutation to the preconditioned system (that is to say we propose a preconditioner $P_2$ such that $P_2^{-1}=\widetilde{P}^{-1}\Pi$), and therefore obtain \begin{equation} \label{eq:prec1} P_2^{-1}= \left[ \begin{array}{ccc} 0&-\beta^{-1}\tau^{-1}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}&\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\\ 0&\beta^{-1}\tau^{-1} \mathcal{M}^{-1}&0\\ -\widehat{S}_2^{-1}&-\gamma^{-1}\beta^{-1}\tau^{-1}\widehat{S}^{-1}\mathcal{M}_{N_t}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y}) \mathcal{M}^{-1}&\gamma^{-1}\widehat{S}_2^{-1}\mathcal{M}_{N_t}\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\\ \end{array} \right]. \end{equation} Applying the preconditioner is in fact more straightforward than it currently appears. To compute a vector $\mathbf{v}=P_2^{-1}\mathbf{w}$, where $\mathbf{v}:=\left[\mathbf{v}_{1}^T,~\mathbf{v}_{2}^T,~\mathbf{v}_{3}^T\right]^T$, $\mathbf{w}:=\left[\mathbf{w}_{1}^T,~\mathbf{w}_{2}^T,~\mathbf{w}_{3}^T\right]^T$, we first see from the second block of $P_2^{-1}$ that \begin{equation*} \beta^{-1}\tau^{-1} \mathcal{M}^{-1}\mathbf{w}_2=\mathbf{v}_2. \end{equation*} The first equation derived from \eqref{eq:prec1} then gives that \begin{align*} -\beta^{-1}\tau^{-1}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathbf{w}_2+\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\mathbf{w}_3={}&\mathbf{v}_1\\ \Rightarrow~~-\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y})\mathbf{v}_2+\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\mathbf{w}_3=\mathcal{A}(\mathbf{m})^{-1}\big(\mathcal{Q}^{-1}\mathbf{w}_3-\mathcal{J}(\mathbf{y})\mathbf{v}_2\big)={}&\mathbf{v}_1, \end{align*} and using this we can write the last equation in \eqref{eq:prec1} as \begin{align*} &-\widehat{S}_2^{-1}\mathbf{w}_1-\gamma^{-1}\widehat{S}_2^{-1}\mathcal{M}_{N_t}\big(\beta^{-1}\tau^{-1}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y}) \mathcal{M}^{-1}\mathbf{w}_2-\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\mathbf{w}_3\big)=\mathbf{v}_3\\ \Rightarrow~~&-\widehat{S}_2^{-1}\mathbf{w}_1+\gamma^{-1}\widehat{S}_2^{-1}\mathcal{M}_{N_t}\big(\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\mathbf{w}_3-\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y})\mathbf{v}_2\big) \\ &\hspace{21.3em}=\widehat{S}_2^{-1}\big(\gamma^{-1}\mathcal{M}_{N_t}\mathbf{v}_1-\mathbf{w}_1\big)=\mathbf{v}_3. \end{align*} Therefore, in order to solve a system with the preconditioner $P_2$, we need to solve for the matrix $\mathcal{M}$, which is certainly invertible, as well as the matrix $\mathcal{Q}\mathcal{A}(\mathbf{m}).$ What remains is the construction of the approximation $\widehat{S}_2$ of the Schur complement. In more detail, we suggest the use of a similar matching strategy as above, to write \begin{align*} \widehat{S}_2=\big(\mathcal{A}(\mathbf{m})^{T}\mathcal{Q}+\mathcal{M}_l\big)\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\big(\mathcal{Q}\mathcal{A}(\mathbf{m})+\mathcal{M}_r\big), \end{align*} where \begin{equation*} \mathcal{M}_l\mathcal{A}(\mathbf{m})^{-1}\mathcal{Q}^{-1}\mathcal{M}_r\approx\frac{1}{\gamma\beta \, \tau}\hspace{0.15em}\mathcal{M}_{N_t}\mathcal{A}(\mathbf{m})^{-1}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}. \end{equation*} Such an approximation may be achieved if, for example, \begin{align*} \mathcal{M}_l&= \frac{1}{\gamma}\hspace{0.15em}\mathcal{M}_{N_t},\\ \mathcal{M}_r&= \frac{1}{\beta \, \tau}\hspace{0.15em}\mathcal{Q}\mathcal{J}(\mathbf{y})\mathcal{M}^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}\quad\text{or}\quad\frac{1}{\beta \, \tau}\hspace{0.15em}\mathcal{Q}\mathcal{J}(\mathbf{y})\hspace{0.1em}\text{diag}(\mathcal{M})^{-1}\mathcal{J}(\mathbf{y})^{T}\mathcal{Q}, \end{align*} and we thus build such approximations into our preconditioner $P_2$. We highlight that at no stage in applying $P_2^{-1}$ does one have to apply a representation of the inverse of the highly singular matrix $\mathcal{M}_{N_t}$, which is a key advantage of the preconditioner $P_2$ over $P_1$. \vspace{0.5em} We highlight that our methodology for constructing preconditioners of the form $P_1$ and $P_2$ may be readily tailored to the matrix system \eqref{for2system1} arising from the PDE arising from the alternative problem formulation discussed in \cref{sec::for2}. \section{Discretisation using radial basis functions} \label{sec::rbf} The methods we have introduced so far are based on a finite difference discretisation of the partial differential equation. With practical imaging applications in mind, this means that the dimension of the discretised equation is typically proportional to the number of pixels in the image. Consequently, the number of degrees of freedom of the underlying equations is very large and can quickly become infeasible upon fine discretisation of the image. Assuming that the image of a now standard size for common smart phones is $3264\times 2448$ pixels, then solving an associated control problem with $100$ time-steps would lead to a Newton or Gauss--Newton system of dimensionality roughly $3$ billion. In this section we wish to motivate an approach to reduce the number of degrees of freedom of the linear systems at the heart of the nonlinear iteration. Our technique is inspired by recent results on the use of reduction techniques based on clustered image information such as superpixels \cite{donne2015fast} or supervoxels \cite{amat2013fast}. Our aim is to reduce the complexity by applying a radial basis function approach, for which we create the scattered points as the centres of our superpixels, as illustrated in \cref{fig::suppix}\footnote{Two prototypical images taken from \url{http://homepages.inf.ed.ac.uk/rbf/CAVIARDATA1}.}. Before we discuss the detailed procedure for this discretisation approach, we point out that while the RBF methodology typically creates dense matrices, an image that is well described with a small number of superpixel will typically result in a small matrix representing the discretisation of the differential equation. \begin{figure}[htb!] \centering \subfloat[Initial image] { \includegraphics[height=4cm]{twopeople1.jpg} }\hspace{1em} \subfloat[Target image] { \includegraphics[height=4cm]{twopeople2.jpg} } \caption{Image (left) used for superpixels with roughly $500$ superpixels, and image (right) with transferred superpixels. \label{fig::suppix}} \end{figure} \subsection{RBF collocation for Newton system} We now consider the optimise-then-discretise method discussed in \cref{sec::OTD}, and re-examine the Newton system obtained: \begin{align*} \ (s_{y})_{_t}+\nabla\cdot (\vec{m} s_y)+\nabla\cdot (\vec{s}_{m}y)&=-\big(y_t+\nabla\cdot(\vec{m}y)\big),\\ \ \beta \, Q^*Q\vec{s}_{m}-y\nabla s_{p}-s_y \nabla{}p&=-\big(\beta \, Q^* Q\vec{m}-y\nabla{}p\big),\\ \ -(s_{p})_{_t}-\vec{s}_{m}\cdot\nabla{}p-\vec{m}\cdot\nabla s_{p} &=-\big(-p_t-\vec{m}\cdot\nabla{}p\big). \end{align*} We wish to apply a meshfree method involving radial basis functions. The approach we use is \emph{straight collocation}, where the solution sought is a linear sum of RBFs multiplied by unknown coefficients, obtained by solving a matrix system. In more detail, at the $k$-th time-step we seek a solution for $s_y$, $s_{m_1}$, $s_{m_2}$, $s_p$ by substituting \begin{align} \ (s_y)\big|_{t=t_k}=\sum_{j}Y_{j,k}\phi_j,\quad\quad(s_{m_1})\big|_{t=t_k}={}&\sum_{j}M_{j,k}^{(1)}\phi_j, \notag \\ \ (s_{m_2})\big|_{t=t_k}=\sum_{j}M_{j,k}^{(2)}\phi_j,\quad\quad\hspace{0.15em}(s_p)\big|_{t=t_k}={}&\sum_{j}P_{j,k}\phi_j, \label{eq:RBF_expansions} \end{align} into the Newton system. The coefficients $Y_{j,k}$, $M_{j,k}^{(1)}$, $M_{j,k}^{(2)}$, $P_{j,k}$ are unknowns, and $\phi_j$ denote the radial basis functions used. Each RBF is of the form $\phi=\phi(r)$ where $r=\big\|\vec{x}-\vec{\xi}\big\|$, with $\vec{x}$ the position vector and $\vec{\xi}$ the centre of the RBF. For our initial experiments, we use Gaussian functions $\phi(r)=e^{-cr^2}$ for a (positive) constant $c$ as our RBFs, though there are many other possibilities of functions with values at specified points solely depending on their distance from the centre \cite{Kansa,Wendland}. Consider, for simplicity, the use of backward Euler for time derivatives. Then, at each time-step and RBF centre in space, the collocation procedure applied to the Newton system takes the following form: \begin{align*} \ &\frac{1}{\tau}\left[\sum_{j}Y_{j,k}\phi_j-\sum_{j}Y_{j,k-1}\phi_j\right]+m_1\cdot\sum_{j}Y_{j,k}\frac{\partial\phi_j}{\partial{}x_1}+m_2\cdot\sum_{j}Y_{j,k}\frac{\partial\phi_j}{\partial{}x_2} \\ \ &\quad\quad\quad\quad+\left(\frac{\partial{}m_1}{\partial{}x_1}+\frac{\partial{}m_2}{\partial{}x_2}\right)\cdot\sum_{j}Y_{j,k}\phi_j+\frac{\partial{}y}{\partial{}x_1}\cdot\sum_{j}M_{j,k}^{(1)}\phi_j+\frac{\partial{}y}{\partial{}x_2}\cdot\sum_{j}M_{j,k}^{(2)}\phi_j \\ \ &\quad\quad\quad\quad+y\left(\sum_{j}M_{j,k}^{(1)}\frac{\partial\phi_j}{\partial{}x_1}+\sum_{j}M_{j,k}^{(2)}\frac{\partial\phi_j}{\partial{}x_2}\right)=-\big(y_t+\nabla\cdot(\vec{m}y)\big), \\ \ &\beta{}Q^* Q\cdot\left[\begin{array}{cc} \sum_{j}M_{j,k}^{(1)}\phi_j \\ \sum_{j}M_{j,k}^{(2)}\phi_j \\ \end{array}\right]-y\cdot\sum_{j}P_{j,k}\nabla\phi_j-\nabla{}p\cdot\sum_{j}Y_{j,k}\phi_j=-\big(\beta \, Q^* Q\vec{m}-y\nabla{}p\big), \\ \ &-\frac{1}{\tau}\left[\sum_{j}P_{j,k+1}\phi_j-\sum_{j}P_{j,k}\phi_j\right]-\frac{\partial{}p}{\partial{}x_1}\cdot\sum_{j}M_{j,k}^{(1)}\phi_j-\frac{\partial{}p}{\partial{}x_2}\cdot\sum_{j}M_{j,k}^{(2)}\phi_j \\ \ &\quad\quad\quad\quad-m_1\cdot\sum_{j}P_{j,k}\frac{\partial\phi_j}{\partial{}x_1}-m_2\cdot\sum_{j}P_{j,k}\frac{\partial\phi_j}{\partial{}x_2}=-\big(-p_t-\vec{m}\cdot\nabla{}p\big). \end{align*} The right hand sides in these equations are evaluated at the current iterate $(y,m_1,m_2,p)$, which is of the form \eqref{eq:RBF_expansions} as well. The exception here is at the final time $T=1$, where there are additional terms are needed in order to take account of the term $\frac{1}{2\gamma}\int_{\Omega}(y(\vec{x},1)-y_1(\vec{x}))^2~\textup{d}\Omega$ within the cost functional $\mathcal{E}(y,\vec{m})$, which we will include in our working. Combining all the terms into a saddle point system of the form \eqref{SaddlePt} gives \begin{equation}\label{RBFsystem} \ \left[\begin{array}{cccc} A_{y} & A_{y,m_1} & A_{y,m_2} & B_y^T \\ A_{y,m_1} & A_{m_{11}} & A_{m_{12}} & B_{m_1}^T \\ A_{y,m_2} & A_{m_{21}} & A_{m_{22}} & B_{m_2}^T \\ C_y & C_{m_1} & C_{m_2} & 0 \\ \end{array}\right]\left[\begin{array}{c} \mathbf{s}_{\mathbf{y}} \\ \mathbf{s}_{\mathbf{m}_1} \\ \mathbf{s}_{\mathbf{m}_2} \\ \mathbf{s}_{\mathbf{p}} \\ \end{array}\right]=\mathbf{b}. \end{equation} The matrices $C_y$ and $B_y$ take the form \begin{equation*} \ C_y=\left[\begin{array}{cccc} C_y^{(1)} & & & \\ -C_s & C_y^{(2)} & & \\ & \ddots & \ddots & \\ & & -C_s & C_y^{(N_t)} \\ \end{array}\right],\quad\quad{}B_y=\left[\begin{array}{cccc} B_y^{(1)} & & & \\ -C_s & B_y^{(2)} & & \\ & \ddots & \ddots & \\ & & -C_s & B_y^{(N_t)} \\ \end{array}\right], \end{equation*} where the matrices $C_y^{(k)}$, $B_y^{(k)}$, and $C_s$ have entries \begin{align*} \ \big(C_y^{(k)}\big)_{i,j}={}&\left(\phi_j+\tau m_1 \frac{\partial\phi_j}{\partial{}x_1}+\tau m_2 \frac{\partial\phi_j}{\partial{}x_2}+\tau\left(\frac{\partial{}m_1}{\partial{}x_1}+\frac{\partial{}m_2}{\partial{}x_2}\right)\phi_j\right)\Bigg|_{\vec{x}=\vec{x}_i}, \\ \ \big(B_y^{(k)}\big)_{j,i}={}&\left(\phi_j-\tau m_1 \frac{\partial\phi_j}{\partial{}x_1}-\tau m_2 \frac{\partial\phi_j}{\partial{}x_2}\right)\Bigg|_{\vec{x}=\vec{x}_i}, \\ \ \big(C_s\big)_{i,j}={}&\phi_j\big|_{\vec{x}=\vec{x}_i}, \end{align*} with $m_1$, $m_2$ evaluated at the $k$-th time-step when $C_y^{(k)}$, $B_y^{(k)}$ are constructed. The remaining matrices $C_{m_1}$, $C_{m_2}$, $B_{m_1}$, $B_{m_2}$, $A_y$, $A_{m_1}$, $A_{m_2}$, $A_{y,m_1}$, $A_{y,m_2}$ are of block diagonal form: \begin{align*} \ C_{m_1}={}&\text{blkdiag}\left(C_{m_1}^{(1)},...,C_{m_1}^{(N_t)}\right),\quad\quad\hspace{1.55em}{}C_{m_2}=\text{blkdiag}\left(C_{m_2}^{(1)},...,C_{m_2}^{(N_t)}\right), \\ \ B_{m_1}={}&\text{blkdiag}\left(B_{m_1}^{(1)},...,B_{m_1}^{(N_t)}\right),\quad\quad\hspace{1.45em}{}B_{m_2}=\text{blkdiag}\left(B_{m_2}^{(1)},...,B_{m_2}^{(N_t)}\right), \\ \ A_y={}&\text{blkdiag}\left(0,0,...,0,\gamma^{-1}C_s\right), \\ \ A_{m_{11}}={}&\text{blkdiag}\left(A_{m_{11}}^{(1)},...,A_{m_{11}}^{(N_t)}\right),\quad\quad\hspace{0.8em}{}A_{m_{12}}=\text{blkdiag}\left(A_{m_{12}}^{(1)},...,A_{m_{12}}^{(N_t)}\right), \\ \ A_{m_{21}}={}&\text{blkdiag}\left(A_{m_{21}}^{(1)},...,A_{m_{21}}^{(N_t)}\right),\quad\quad\hspace{0.8em}{}A_{m_{22}}=\text{blkdiag}\left(A_{m_{22}}^{(1)},...,A_{m_{22}}^{(N_t)}\right), \\ \ A_{y,m_1}={}&\text{blkdiag}\left(A_{y,m_1}^{(1)},...,A_{y,m_1}^{(N_t)}\right),\quad\quad{}A_{y,m_2}=\text{blkdiag}\left(A_{y,m_2}^{(1)},...,A_{y,m_2}^{(N_t)}\right) \end{align*} where \begin{align*} \ \big(C_{m_1}^{(k)}\big)_{i,j}={}&\tau\left(\frac{\partial{}y}{\partial{}x_1}\phi_j+y\frac{\partial\phi_j}{\partial{}x_1}\right)\Bigg|_{\vec{x}=\vec{x}_i},\quad\quad\big(C_{m_2}^{(k)}\big)_{i,j}=\tau\left(\frac{\partial{}y}{\partial{}x_2}\phi_j+y\frac{\partial\phi_j}{\partial{}x_2}\right)\Bigg|_{\vec{x}=\vec{x}_i}, \\ \ \big(B_{m_1}^{(k)}\big)_{j,i}={}&-\tau\left(y\frac{\partial\phi_j}{\partial{}x_1}\right)\Bigg|_{\vec{x}=\vec{x}_i},\quad\quad\hspace{2.875em}\big(B_{m_2}^{(k)}\big)_{j,i}=-\tau\left(y\frac{\partial\phi_j}{\partial{}x_2}\right)\Bigg|_{\vec{x}=\vec{x}_i}, \\ \ \big(A_{m_{11}}^{(k)}\big)_{i,j}={}&\beta \, \tau\big((Q^* Q)_{1,1}\phi_j\big)\Big|_{\vec{x}=\vec{x}_i},\quad\quad\hspace{1.45em}\big(A_{m_{12}}^{(k)}\big)_{i,j}=\beta \, \tau\big((Q^* Q)_{1,2}\phi_j\big)\Big|_{\vec{x}=\vec{x}_i}, \\ \ \big(A_{m_{21}}^{(k)}\big)_{i,j}={}&\beta \, \tau\big((Q^* Q)_{2,1}\phi_j\big)\Big|_{\vec{x}=\vec{x}_i},\quad\quad\hspace{1.45em}\big(A_{m_{22}}^{(k)}\big)_{i,j}=\beta \, \tau\big((Q^* Q)_{2,2}\phi_j\big)\Big|_{\vec{x}=\vec{x}_i}, \\ \ \big(A_{y,m_1}^{(k)}\big)_{i,j}={}&-\tau\left(\frac{\partial{}p}{\partial{}x_1}\phi_j\right)\Bigg|_{\vec{x}=\vec{x}_i},\quad\quad\hspace{1.725em}\big(A_{y,m_2}^{(k)}\big)_{i,j}=-\tau\left(\frac{\partial{}p}{\partial{}x_2}\phi_j\right)\Bigg|_{\vec{x}=\vec{x}_i}, \end{align*} with the relevant functions again evaluated at the $k$-th time-step. In each equation, the points $\vec{x}_i$ correspond to RBF centres chosen, and the vectors $\mathbf{s}_{\mathbf{y}}$, $\mathbf{s}_{\mathbf{m}_1}$, $\mathbf{s}_{\mathbf{m}_2}$, and $\mathbf{s}_{\mathbf{p}}$ concatenate the terms $Y_{j,k}$, $M_{j,k}^{(1)}$, $M_{j,k}^{(2)}$, and $P_{j,k}$, over all RBF centres and all time-steps. The terms $(Q^* Q)_{i,j}$, $i,j=1,2$, denote the $(i,j)$ blocks of the matrix $Q^* Q$. For the natural choices $Q=\text{blkdiag}(I,I)$ or $Q=\text{blkdiag}(\nabla,\nabla)$, the matrix $Q^* Q$ is given by $\text{blkdiag}(I,I)$ or $\text{blkdiag}(-\nabla^2,-\nabla^2)$, and in particular the matrices $A_{m_{12}}=A_{m_{21}}=0$. We also highlight that a Gauss--Newton approach for the discretised system, as discussed for the discretise-then-optimise method in \cref{sec::DTO}, would relate to the blocks $A_{y,m_1}$ and $A_{y,m_2}$ being the zero matrices. One may consider preconditioners of the form $P_1$ and $P_2$, as derived in \cref{sec:Preconditioning}, for the system \eqref{RBFsystem}, provided one takes account of the (possibly dense) structure of the sub-blocks arising from the RBF collocation method. \vspace{0.5em} \textbf{Note.}~If the parameter $\delta>0$ within the cost functional $\mathcal{E}$, the only change arising in the above working would concern the matrix $A_y$, which would then be given by \begin{equation*} \ A_y=\text{blkdiag}\left(\delta\tau{}C_s,\delta\tau{}C_s,...,\delta\tau{}C_s,(\gamma^{-1}+\delta\tau)C_s\right). \end{equation*} \subsection{Preconditioning}\label{sec:Preconditioning_RBF} As the matrix systems that arise from the use of radial basis functions tend to be smaller and denser than those resulting from discretisation schemes such as finite differences and finite elements, there is in general less flexibility when designing fast and robust preconditioners. However, we believe that the construction of preconditioned iterative solvers remains useful, as one may therefore work with each time-step separately on a computer. This will decrease the storage requirements\deleted[id=RH]{ on a computer}, and will reduce the dimension of the matrices being solved for directly, as the sub-blocks arising from individual time-steps are relatively straightforward to solve for. The idea for the preconditioner is the same as in \cref{sec:Preconditioning}, and we present an analogous preconditioner to $P_1$ as stated in \cref{sec::precond1}: \begin{equation} \label{eq:P1_RBF} \ P_1=\left[\begin{array}{cccc} \widehat{A}_y & 0 & 0 & 0 \\ 0 & A_{m_{11}} & 0 & 0 \\ 0 & 0 & A_{m_{22}} & 0 \\ 0 & 0 & 0 & \widehat{S} \\ \end{array}\right], \end{equation} where \begin{align*} \ \widetilde{S}={}&C_y \widehat{A}_y^{-1} B_y^T + C_{m_1} A_{m_1}^{-1} B_{m_1}^T + C_{m_2} A_{m_2}^{-1} B_{m_2}^T \\ \ \approx{}&\left(C_y+\mathcal{M}_1\right)\widehat{A}_y^{-1}\left(B_y^T+\mathcal{M}_2\right)=:\widehat{S}. \end{align*} Here, $\widehat{A}_y$ is an approximation of the often highly singular matrix $A_y$, $\widetilde{S}$ is generated by neglecting the off-diagonal terms in $(1,1)$ block, and $\mathcal{M}_1$, $\mathcal{M}_2$ are chosen such that \begin{equation*} \ \mathcal{M}_1 \widehat{A}_y^{-1} \mathcal{M}_2 \approx C_{m_1} A_{m_1}^{-1} B_{m_1}^T + C_{m_2} A_{m_2}^{-1} B_{m_2}^T. \end{equation*} We can of course construct analogous block triangular preconditioners. To approximate the inverses of the sub-blocks of $\widehat{A}_y$, $A_{m_{11}}$, $A_{m_{22}}$, $C_y+\mathcal{M}_1$, $B_y^T+\mathcal{M}_2$ within the preconditioner, it is reasonable to apply direct solvers as the matrices are typically relatively small and dense. It is of course possible to replace this with a multigrid, domain decomposition, or other iterative scheme, as an approximation of the constituent matrices. \section{Numerical results}\label{sec::Results} We now present the results of a number of numerical experiments, making use both of the finite difference discretisation outlined in \cref{sec::discr}, and the radial basis function scheme of \cref{sec::rbf}. All experiments are implemented in Matlab. \subsection{Finite difference discretisation} \label{sec:FD} In our first test we consider problem \eqref{TranspCOST}--\eqref{TranspEQN} and employ the Gauss-Newton scheme \eqref{for1system1} in the finite difference setting. The parameters are chosen to be $\gamma=1$ and $Q=I.$ The regularisation parameter $\beta$ is typically varied in our experiments. We compare the performance of the preconditioner presented in \cref{sec::precond2} and recall that the $(1,1)$-block of the system matrix governing \eqref{for1system1} is highly singular. We use the same discretisation level in time as we use for the spatial domain, and compare $5$ spatial mesh levels for the synthetic data. For the image data we use ten time-steps and the same number of intermediate images. The image data is as depicted in \cref{fig::motivation}. We here use $100\times100$ pixel black and white images, where the values are scaled to be between zero and one. We choose the \textsc{CGS}\ method \cite[Ch.~7.4.1]{book::Saad} as the iterative scheme for the Gauss--Newton system. This method is stopped when a certain tolerance (we use $10^{-6}$) for the relative residual norm of the linear system \eqref{for1system1} is reached, starting from an all-zero initial guess. Notice that in Matlab's implementation of \textsc{CGS}, the residual is measured in the Euclidean norm. The outer Gauss--Newton scheme is stopped once the relative Euclidean distance between consecutive iterates falls below $10^{-4}$. \cref{fig:data_comp1} illustrates the average number of \textsc{CGS}\ iterations on the one hand, and the number of Gauss--Newton steps on the other. The results are obtained using the preconditioner $P_2$, see \eqref{eq:prec1}, presented in \cref{sec::precond2}, and illustrate that this technique performs robustly with respect to the number of degrees of freedom and changes in the regularisation parameter. \begin{figure}[htb!] \setlength\figureheight{0.2\linewidth} \setlength\figurewidth{0.2\linewidth} \centering \subfloat[Linear solver iterations]{ \includegraphics[height=4cm]{HPS18-figure2.pdf} } \subfloat[Gauss--Newton iterations]{ \includegraphics[height=4cm]{HPS18-figure3.pdf} } \caption{Results for the preconditioned iteration with $5$~mesh levels ranging from $n_x=2^{3}$ to $n_x=2^7$ degrees of freedom per spatial dimension. So the total number of spatial degrees of freedom ranges from $2^6$ to $2^{14}$. This variation is shown in the vertical axis, and the horizontal axis shows value of the regularisation parameter ranging from $10^{-1}$ to $10^{-4}.$ For the linear solver, in this case preconditioned CGS, we show iterations per Gauss--Newton step.} \label{fig:data_comp1} \end{figure} We also report results for the optical flow problem \cite{BIK02,borzi2003optimal}, i.e., we take the objective function to be given by \eqref{TranspOptical} with $\delta =10^{-3},$ $\beta=10^{-2},$ and $\gamma=10.$ The tolerances are set to be $10^{-3}$ and $10^{-2}$ for the linear and nonlinear solver, respectively. We here assume that $\bar{y}(\vec{x},1)=y_1$, and when discretised in time $\bar{y}(\vec{x},t_i)=y_i$ corresponds to a given image. As intermediate values for the desired state we chose the intermediate images from \cite{black1998eigentracking}. It is clear that this setup is covered by our previous discussion and the matrix representing the state contributions of the objection function $\mathcal{M}_{1,1}=\gamma^{-1}\mathcal{M}_{N_t}+\delta\tau\bar{\mathcal{M}}.$ One can readily apply the preconditioning techniques introduced in \cref{sec:Preconditioning}, and we consider the implementation of preconditioner $P_1$; see \eqref{eq:P1}. We show the results for our methodology in \cref{fig:data_comp2}. The desired state for this case was chosen as the hand sequence used in \cite{black1998eigentracking}. We observe robustness with respect to the matrix dimension and the parameters involved in the problem setup, in both the Gauss--Newton iterations required and the number of steps of the preconditioned iterative method. This indicates the effectiveness of our preconditioning strategy. \begin{figure}[htb!] \centering \subfloat[Computed state at time step $5$]{ \includegraphics[height=6cm]{hand_state5.png} } \subfloat[Computed control at time step $5$]{ \includegraphics[height=6cm]{hand_control5.png} } \setlength\figureheight{0.2\linewidth} \setlength\figurewidth{0.5\linewidth} \subfloat[Varying $\delta$]{ \includegraphics[height=4cm]{HPS18-figure4.pdf} } \caption{Results for the preconditioned iteration for the optical flow problem. We show an instance of the control and the state as well as the number of CGS iterations per Gauss--Newton step for varying regularisation parameter $\delta$.} \label{fig:data_comp2} \end{figure} \subsection{RBF technique} \label{sec:RBF} To provide an indication of the applicability of radial basis function methods to the problems under consideration, we now provide details of the results obtained using this strategy. We wish to test our proposed preconditioned iterative method on the matrix systems arising from our proposed RBF technique. For our next test problem, we provide a proof of concept that the methodology can be applied to dense matrix systems arising from Gaussian basis functions. We therefore select RBF centres using the superpixels computed using the initial image from \cref{fig::suppix}, and take the desired state to be a greyscale linear mapping, over the time variable, between this and the target image from the same figure. Within the cost functional \eqref{TranspOptical}, we take $\gamma=1$ and $Q=\text{blkdiag}(\nabla,\nabla)$. We test a range of values of $\delta$ and $\beta$, as well as time-steps $\tau=0.1$ and $\tau=0.05$ within the time interval $[0,1]$. In each case we apply outer (Gauss--Newton) iteration to a tolerance of $10^{-2}$ for the relative distance between new and old solution, and use a {\large {\sc gmres}}\ method preconditioned by $P_1$ (as described in \cref{sec:Preconditioning_RBF}; see \eqref{eq:P1_RBF}) to solve the matrix systems obtained from the outer iteration. Our Krylov solver is run to a tolerance of $10^{-4}$. As before, all norms are Euclidean in Matlab's implementation. The lowest number of outer iterations required for convergence was three, so to measure the effectiveness of the {\large {\sc gmres}}\ solver we present the average number of iterations for the first three Newton steps (as in general we find that the first Newton steps lead to the largest {\large {\sc gmres}}\ iteration counts). We present our results in \cref{RBFTable}. We find that the {\large {\sc gmres}}\ iteration numbers are reasonably robust with respect to $\delta$ and $\tau$, but with greater dependence as $\beta$ than the finite difference approach. However, due to the fact that the matrix systems are much smaller for the radial basis function approach than for finite differences, the increase in achievable accuracy can compensate for the larger iteration counts. It would also be possible to apply our strategies using compactly supported RBFs, for instance Wendland functions \cite{Wendland}, instead of Gaussians, and thus exploit the sparsity of the resulting matrix systems. \begin{table}[h] \renewcommand{\arraystretch}{1.1} \begin{footnotesize} \caption{Results for the radial basis function test problem, for $Q=\text{blkdiag}(\nabla,\nabla)$, $T=1$ and $\gamma=1$, using 10 time-steps (top) and 20 time-steps (bottom). Stated are the average number of {\large {\sc gmres}}\ iterations for the first three outer iterations, for a range of values of $\delta$ and $\beta$.} \label{RBFTable} \begin{center} \begin{tabular}{|c||c|c|c|c|} \hline $\tau=0.1$ & $\beta=1$ & $\beta=10^{-1}$ & $\beta=10^{-2}$ & $\beta=10^{-3}$ \\ \hline \hline $\delta=0$ & 13 & 22.7 & 34.3 & 51.3 \\ $\delta=0.1$ & 12.3 & 20.3 & 32.3 & 48.7 \\ $\delta=1$ & 12.3 & 20 & 32.7 & 59.3 \\ $\delta=10$ & 13 & 21.7 & 38.3 & 79.3 \\ \hline \end{tabular} \vspace{0.5em} \begin{tabular}{|c||c|c|c|c|} \hline $\tau=0.05$ & $\beta=1$ & $\beta=10^{-1}$ & $\beta=10^{-2}$ & $\beta=10^{-3}$ \\ \hline \hline $\delta=0$ & 16 & 25.7 & 51.7 & 60.3 \\ $\delta=0.1$ & 14 & 23 & 52 & 62.3 \\ $\delta=1$ & 14.3 & 22.3 & 42 & 71.3 \\ $\delta=10$ & 14 & 24.7 & 43.3 & 74.3 \\ \hline \end{tabular} \end{center} \end{footnotesize} \end{table} \section{Conclusion} In this paper, we have presented numerical methods for the solution of optimal transport problems arising in image metamorphosis. We have discussed the application of Newton and Gauss--Newton methods, using finite difference schemes and meshless methods for the discretisation of the optimality conditions. We presented fast and effective preconditioners which may be applied within Krylov subspace methods to solve the resulting matrix systems, with a focus on the large dimensions of the matrices when many time-steps are taken to solve the systems of PDEs. Encouraging numerical results indicate the potency of the solvers presented.
\section{Introduction} Most of what is currently known about the structure of the moduli space of (2,2) and, more in general, (0,2) superconformal field theories (SCFTs) is due to our ability to extract relevant structures at special loci/limits. The most prominent example of this is probably the Calabi-Yau/Landau-Ginzburg (CY/LG) correspondence \cite{Greene:1988ut,Vafa:1988uu}. For instance, the overwhelming evidence that various geometrical data of Calabi-Yau (CY) manifolds is encoded in orbifolds of Landau-Ginzburg (LG) models has inspired the construction of the gauged linear sigma model (GLSM) \cite{Witten:1993yc}. In turn, the GLSM has been one of the main tools in exploring various aspects of the moduli space. Another example is mirror symmetry, which in its early days has been proved as a correspondence of orbifolds of Gepner models \cite{Greene:1990ud}, and later generalized to a vast collection of theories. Despite these remarkable successes, the picture is far from complete. Even for (2,2) SCFTs, generically the GLSM comprises only a subspace of the moduli space, and even in the realm of GLSMs, a generic phase will not be described by a non-linear sigma model (NLSM) or a LG orbifold (LGO). Moreover, (2,2) theories admit deformations which preserve only (0,2) superconformal symmetry. This class of deformations is much less understood. Although recently there has been progress in analyzing these models \cite{McOrist:2010ae}, questions such as, for example, how to extend mirror symmetry to this larger moduli space of (0,2) deformations, have not yet found a complete answer \cite{Melnikov:2010sa,Melnikov:2012hk}. Even more mysterious are (0,2) theories which do not admit a (2,2) locus. For instance, the issue of whether instanton contributions to the spacetime superpotential destabilize the vacuum of a heterotic compactification based on a (0,2) SCFT, which were believed to be absent in the contest of (0,2) GLSMs \cite{Silverstein:1995re,Beasley:2003fx}, is still unresolved even in this subset of theories \cite{Bertolini:2014dna}. An important feature of SCFTs is the existence of chiral rings. In (2,2) theories there are two such rings, the (a,c)/(c,c) rings (and their equivalent conjugates)\footnote{In this paper, we will often refer to the (a,c) ring as the A ring and to the (c,c) ring as the B ring.} which are topological in nature and are independent of a set of parameters of the theory. In particular, they are exchanged under mirror symmetry. In (0,2) theories, where we lack the definition of a left-moving chirality condition, in favorable cases it is possible to show the existence of subrings of the (right-moving) chiral ring, which in particular generalize the A/B rings, and reduce to these on the (2,2) locus (when available). We refer to these, following the nomenclature in literature, as A/2 and B/2 rings. Properties of such rings are still largely unknown. For instance, do B/2 model correlators receive instanton corrections? If yes, is there a class of theories where they do not? If yes, this class of theories would constitute a natural playground for improving our understanding of (0,2) mirror symmetry. It should be evident at this point that one approach to tackle some of these issues is to deepen our understanding of more general theories. This is the path we choose to follow in this work, as we study the ring structure of B and B/2 rings in hybrid theories. Loosely speaking, a hybrid model is a class of NLSMs with superpotential, where the theory can be interpreted as a Landau-Ginzburg (orbifold) whose superpotential varies adiabatically over a compact and smooth manifold. Such theories depend on a number of parameters, namely the K\"ahler class and the complex structure of the target space, a set of parameters defining a holomorphic bundle over it, and a set of parameters defining the superpotential. While their existence has been known for over two decades \cite{Witten:1993yc,Aspinwall:1993nu}, and both the mathematics \cite{Fan:2015ab} and physics \cite{Aspinwall:2009qy} literature exhibit instances of hybrid models, it was only recently that a systematic study of their physical properties has begun \cite{Bertolini:2013xga,Bertolini:2017lcz}. Besides \cite{Fan:2015ab}, there have also been other recent developments in mathematics that study hybrid models closely such as \cite{2013arXiv1301.5530C,2015arXiv150602989C}. An important property of (quasi-)topological theories is that often they depend only on a subset of the parameters of the original theory. In (2,2) hybrid theories, B-model correlators depend only on the parameters in the superpotential. When a hybrid model describes a limit in the moduli space of a Calabi-Yau compactification, these parameters determine a choice of complex structure on the Calabi-Yau. In (0,2) models instead, this dependence is naturally enlarged to the set of parameters determining the (0,2) superpotential. In a large radius interpretation, this set of parameters determine a holomorphic bundle over the CY manifold. Moreover, there could be in principle a dependence on worldsheet instantons. As mentioned above, models for which this dependence can be ruled out are particularly interesting. When a hybrid model arises as a phase in a linear model, we can compare our results with the ones derived from GLSM techniques. In particular, in such cases we can interpret the hybrid model as a fixed point along the RG flow between the GLSM (for a particular choice of the parameters) and the IR CFT. The structure we find is quite interesting. First of all, we find that in some cases the hybrid model seems to allow instanton corrections while the corresponding GLSM forbids them. We find that it is only possible to recover the vanishing result from the hybrid perspective by constructing an appropriate compactification of the moduli space of worldsheet instantons along the lines of \cite{Sharpe:2006qd}. We also find examples where the hybrid model forbids instanton corrections but the linear model does not rule them out. Another interesting observation concerns the dependence of the correlators on the various parameters of the theory. In a large class of GLSMs, B model correlators are independent of $E$ parameters -- which instead appear as parameters in A/2 model correlators -- and instead depend exclusively on $J$ parameters \cite{McOrist:2008ji}. This separation seems to disappear in the hybrid model, where $E$ parameters descend to ``bundle" parameters and $J$ parameters descend to superpotential parameters. While it is somehow expected that this splitting does not occur in the IR CFT, it is interesting that it is not manifest in the UV hybrid theory as well. The rest of this work is organized as follows. In section \ref{s:22hybrids} we review the construction of (2,2) hybrids. In section \ref{s:chiralring} we describe the main object of interest, the B ring, and review the techniques that allow to compute its elements. In section \ref{s:22corrs}, we introduce the B-twisted version of the hybrid theory, and use localization to derive a formula for the correlators and study its properties. In section \ref{s:22example} we completely solve an example, and we check our results via the GLSM. Finally, in section \ref{s:02hybrids} we derive an analogous formula for correlators of B/2-twisted (0,2) hybrid models. We analyze the conditions for instanton corrections to vanish, and apply our techniques to an example. We conclude with some open questions in section \ref{s:outlook}. \section{$\mathcal{N}=(2,2)$ hybrid models} \label{s:22hybrids} In this section we review the construction of \cite{Bertolini:2013xga} of (2,2) hybrid models in order to set-up notation and to highlight the aspects relevant for the present work. The results are valid for an arbitrary compact Riemann surface $\Sigma$. We will work locally on an open patch $U\cong \mathbb{C}$ of $\Sigma$ with coordinates $(z,\bar{z})$. A hybrid model is determined by the data $(\mathbf{Y},W,\mathbb{C}^{*}_V)$, where $\mathbf{Y}$ is a K\"ahler manifold, $W\in H^{0}(\mathcal{O}_\mathbf{Y})$, i.e., $W$ is a holomorphic function on $\mathbf{Y}$, and $\mathbb{C}^{*}_V$ is a $\mathbb{C}^{*}$-action on $\mathbf{Y}$ defined by a Killing vector field $V$ on $\mathbf{Y}$ such that $\mathcal{L}_{V}W=W$. We will restrict ourselves to the case of $\mathbf{Y}$ being CY, i.e., its canonical class being trivial, $K_{\mathbf{Y}}\cong \mathcal{O}_{\mathbf{Y}}$. However, additional conditions on this data are necessary in order to be able to compute meaningful quantities. We call the triple $(\mathbf{Y},W,\mathbb{C}^{*}_{V})$ a good hybrid if $\mathbf{Y}$ has bundle structure with a compact base\footnote{In all our applications we will restrict to $B$ being K\"ahler and smooth.} $B$ and $V$ is a vertical Killing vector of $\mathbf{Y}$. We assume $\mathbf{Y}={{\text{tot}}}\left(X\rightarrow B\right)$ and $X=\oplus_i X_i$ is a decomposition into eigenspaces with respect to the $V$-action, that is, \begin{align} V(B)&=0~, &V(X_i)=q_i X_i~, \end{align} where $q_i\in\mathbb{Q}_{>0}$, $i=1,\dots,n$. Although not a necessary condition to construct a well-defined model, we will make the simplifying assumption that $X_i$ are line bundles over $B$. Finally, the superpotential $W$ is chosen such that it satisfies the \textit{potential condition} \begin{eqnarray} dW^{-1}(0)=B\subset \mathbf{Y}~. \end{eqnarray} This is the class of models to which our methods apply. In the rest of this section we will construct the action for the corresponding NLSM and study its symmetries. \subsection{Action} We work in $(2,2)$ superspace in Euclidean signature parametrized by $(z,\overline{z})$ and $(\theta^{\pm},\overline{\theta}^\pm)$, where the + ($-$) corresponds to the right-moving (left-moving) sector. In this setting we define the supercharges \begin{align} \label{eq:rightsupercharges} \mathcal{Q}_+ &= {\partial \over \partial \theta^+} + i\overline{\theta}^+ \overline{\partial}_{\bar{z}}~, &\overline{\cQ}_+ &= -{\partial \over \partial \overline{\theta}^+} - i\theta^+ \overline{\partial}_{\bar{z}}~. \end{align} These anti-commute and satisfy the algebra $\{\mathcal{Q}_+,\overline{\cQ}_+\}=-2i\overline{\partial}_{\overline{z}}$, where we denote $\overline{\partial}_{\bar{z}}:= \partial/\partial\overline{z}$. We also define the superderivatives \begin{align} \mathcal{D}_+ &= {\partial \over \partial \theta^+} - i\overline{\theta}^+ \overline{\partial}_{\overline{z}}~, &\overline{\cD}_+ &= -{\partial \over \partial \overline{\theta}^+} + i\theta^+ \overline{\partial}_{\overline{z}}~, \end{align} which anti-commute among each other and with the operators \eqref{eq:rightsupercharges}, and satisfy the algebra $\{\mathcal{D}_+,\overline{\cD}_+\}=2i\overline{\partial}_{\overline{z}}$. There is an equivalent structure on the left-moving sector of the theory, (anti-)commuting with the operators above and which is obtained by replacing $\overline{\partial}_{\overline{z}}$ with $-\partial_{z}:=-\partial/\partial_z$ and $(\theta^+,\overline{\theta}^+)$ with $(\theta^-,\overline{\theta}^-)$. The field content of the theory is given by $d$ chiral (2,2) supermultiplets and their anti-chiral conjugates \begin{align} X^\alpha &= \mathcal{X}^\alpha + \sqrt{2} \theta^- \Psi^\alpha + i\theta^-\overline{\theta}^- \partial_{z} \mathcal{X}^\alpha~, & \overline{X}^{\overline{\alpha}} & = \overline{\cX}^{\overline{\alpha}} - \sqrt{2}\overline{\theta}^- \overline{\Psi}^{\overline{\alpha}} -i\theta^-\overline{\theta}^- \partial_{z} \overline{\cX}^{\overline{\alpha}}~, \end{align} where $\alpha = 1,\dots,d$, and where we define \begin{align} d&=\dim \mathbf{Y}~, &b&=\dim B~, &n&={{\text{rank}}}\ X~. \end{align} These are decomposed in terms of (0,2) bosonic and fermionic chiral supermultiplets $\mathcal{X}^\alpha$ and $\Psi^\alpha$ respectively, which have the following expansions \begin{align} \label{eq:02sfields22} \mathcal{X}^\alpha & = x^\alpha + \sqrt{2}\theta^+ \psi_+^\alpha -i \theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} x^{\alpha}~,& \overline{\cX}^{\overline{\alpha}} & = {\overline{x}}^{\overline{\alpha}} - \sqrt{2}\overline{\theta}^+ \overline{\psi}_+^{\overline{\alpha}} +i\theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} \overline{x}^{\overline{\alpha}}~, \nonumber\\ \Psi^\alpha & = \psi_-^\alpha - \sqrt{2}\theta^+ F^\alpha -i\theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} \psi_-^{\alpha}~,& \overline{\Psi}^{\overline{\alpha}} & = \overline{\psi}_-^{\overline{\alpha}} - \sqrt{2}\overline{\theta}^+ \overline{F}^{\overline{\alpha}} +i\theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} \overline{\psi}_-^{\overline{\alpha}}~. \end{align} The chirality conditions read \begin{align} \label{eq:chiralconds} \overline{\cD}_\pm X^\alpha &=0~, &\overline{\cD}_+ \mathcal{X}^\alpha &=\overline{\cD}_+ \Psi^\alpha =0~, \end{align} and similarly for the conjugate anti-chiral fields. The lowest component $x^\alpha$ are coordinates on $\mathbf{Y}$, i.e., maps \begin{align} x^\alpha: \Sigma\rightarrow \mathbf{Y}~, \end{align} while $\psi_+^\alpha$ ($\psi_-^{\alpha}$) are right-moving (left-moving) fermions on the worldsheet, i.e., $C^{\infty}$ sections of the tangent sheaf $T_{\mathbf{Y}}:=T^{(1,0)}\mathbf{Y}$, or more precisely \begin{align} \psi_-^\alpha &\in\Gamma(K_{\Sigma}^{\frac{1}{2}}\otimes x^{*}T_{\mathbf{Y}})~, &\psi_+^\alpha &\in\Gamma(K_{\Sigma}^{-\frac{1}{2}}\otimes x^{*}T_{\mathbf{Y}})~, \end{align} where $K_\Sigma$ is the anti-canonical bundle of the worldsheet $\Sigma$. The action on $\Sigma$ in (2,2) superspace is given by\footnote{Here $m$ is a parameter with a dimension of mass and we will set it to one in the rest of the paper.} \begin{align} S[X]:=\int_{\Sigma}d^2z (\mathcal{L}_{K}+\mathcal{L}_{W})=\frac1{8\pi}\int_\Sigma d^2z \mathcal{D}_+\overline{\cD}_+\mathcal{D}_-\overline{\cD}_- K(X,\overline{X}) + \frac{m}{4\pi} \int_\Sigma d^2z \mathcal{D}_+\mathcal{D}_- W(X) + \text{c.c.}~, \end{align} where $K$ is a K\"ahler potential on $\mathbf{Y}$ with K\"ahler metric $g_{\alpha\overline{\beta}}:=\partial_\alpha \overline{\partial}_{\overline{\beta}}K$. We can expand the action in components and we obtain \begin{align} \label{eq:compaction} \mathcal{L}_{K}&=-g_{\alpha\overline{\beta}}\left(\partial_{\mu} x^{\alpha}\partial^{\mu} \overline{x}^{\overline{\beta}}+\frac{i}{2}\langle{\overline{\psi}}^{\overline{\beta}},\gamma^{\mu}D_{\mu}\psi^\alpha\rangle +\frac{i}{2}\langle\psi^\alpha,\gamma^{\mu}D_{\mu}{\overline{\psi}}^{\overline{\beta}}\rangle\right)\nonumber\\ &\quad-\frac{1}{4}R_{\alpha\overline{\beta}\delta\overline{\gamma}}\langle\psi^\alpha,\psi^\delta\rangle\langle\overline{\psi}^{\overline{\beta}},\overline{\psi}^{\overline{\gamma}}\rangle+ g_{\alpha\overline{\alpha}}\left(F^\alpha-\frac{1}{2}\Gamma^\alpha_{\beta\delta}\langle\psi^\beta,\psi^\delta\rangle\right)\left(\overline{F}^{\overline{\alpha}}+\frac{1}{2}\overline{\Gamma}^{\overline{\alpha}}_{\overline{\beta}\overline{\delta}}\langle\overline{\psi}^{\overline{\beta}},\overline{\psi}^{\overline{\delta}}\rangle\right)~,\nonumber\\ \mathcal{L}_{W}&=\frac{1}{2}\left(F^\alpha\partial_\alpha W-\frac{1}{2}\partial_\alpha \partial_\beta W\langle\psi^\alpha,\psi^\beta\rangle+\overline{F}^\alpha\overline{\partial}_{\overline{\alpha}}\overline{W}+\frac{1}{2}\overline{\partial}_{\overline{\alpha}}\overline{\partial}_{\overline{\beta}}\overline{W}\langle\bar{\psi}^{\overline{\alpha}},\bar{\psi}^{\overline{\beta}}\rangle\right)~. \end{align} The covariant derivatives act on the fermions as \begin{eqnarray} D_{\mu}\psi^{\alpha}=(\partial_{\mu}+\frac{1}{2}\omega_{\mu})\psi^{\alpha}+\partial_{\mu}x^{\beta}\Gamma^{\alpha}_{\beta\delta}\psi^{\delta}~, \end{eqnarray} where $\omega_{\mu}$ is the spin connection on $\Sigma$ and $\langle,\rangle$ denotes the frame invariant product (see appendix \ref{app:convents}). The K\"ahler connection and the curvature are given by \begin{align} \Gamma^\alpha_{\beta\gamma} &= g_{\gamma\overline{\beta},\beta} g^{\overline{\beta}\alpha}~, &R_{\alpha\overline{\beta}\gamma}{}^\delta&= \Gamma_{\alpha\gamma,\overline{\beta}}^\delta~. \end{align} Finally, it is possible to integrate out the auxiliary fields via the equations of motion \begin{align} F^{\alpha}&=-\frac{1}{2}g^{\alpha\overline{\beta}}\partial_{\overline{\beta}}\overline{W}-\Gamma_{\delta\gamma}^{\alpha}\psi^{\delta}_{+}\psi^{\gamma}_{-}~, &\overline{F}^{\overline{\alpha}}&=-\frac{1}{2}g^{\overline{\alpha}\beta}\partial_{\beta}W-\overline{\Gamma}_{\overline{\delta}\overline{\gamma}}^{\overline{\alpha}}\bar{\psi}^{\overline{\delta}}_{+}\bar{\psi}^{\overline{\gamma}}_{-}~. \end{align} \subsection{Supersymmetry transformations} The action we defined in the previous section is by construction invariant under (2,2) supersymmetry. For our study of the (c,c) ring in the following sections, we need the explicit supersymmetry transformations induced by the supercharges $\overline{\cQ}_+$ and $\overline{\cQ}_-$. For completeness, we present the supersymmetry transformations of the component fields for all the supercharges. Let us define the operator $\mathbf{Q}_\pm$ and $\overline{\bQ}_{\pm}$ such that, acting on a superfield $A$, $[\epsilon_\mp \mathbf{Q}_\pm , A]=\mp\frac1{\sqrt2} \epsilon_\mp \mathcal{Q}_\pm A$, where $\epsilon_\mp$ are anticommuting parameters, and similarly for the barred quantities.\footnote{The pairing $\epsilon_\mp \leftrightarrow \mathcal{Q}_{\pm}$ corresponds to the frame invariant product defined in appendix \ref{app:convents}.} With these conventions for the charges \eqref{eq:rightsupercharges} we find \begin{align} [\mathbf{Q}_+,x^\alpha] &= -\psi_+^\alpha~, &\{\mathbf{Q}_+,\overline{\psi}_+^{\overline{\alpha}}\} &= -i\overline{\partial}_{\bar{z}}\overline{x}^{\overline{\alpha}}~, &\{\mathbf{Q}_+,\psi_-^\alpha\}&=F^\alpha~, &[\mathbf{Q}_+,\overline{F}^{\overline{\alpha}}]&=-i\overline{\partial}_{\bar{z}} \overline{\psi}_-^{\overline{\alpha}}~, \nonumber\\ [\overline{\bQ}_+,\overline{x}^{\overline{\alpha}}] &=\overline{\psi}_+^{\overline{\alpha}}~, &\{\overline{\bQ}_+,\psi_+^\alpha\} &= i\overline{\partial}_{\bar{z}} x^\alpha~, &\{\overline{\bQ}_+,\overline{\psi}_-^{\overline{\alpha}}\}&=\overline{F}^{\overline{\alpha}}~, &[\overline{\bQ}_+,F^{\alpha}]&=-i\overline{\partial}_{\bar{z}} \psi_-^{\alpha}~, \end{align} as well as \begin{align} [\mathbf{Q}_-,x^\alpha] &= \psi_-^\alpha~, &\{\mathbf{Q}_-,\overline{\psi}_-^{\overline{\alpha}}\} &= -i\partial_{z}\overline{x}^{\overline{\alpha}}~, &\{\mathbf{Q}_-,\psi_+^\alpha\}&=F^\alpha~, &[\mathbf{Q}_-,\overline{F}^{\overline{\alpha}}]&= i\partial_{z} \overline{\psi}_+^{\overline{\alpha}}~, \nonumber\\ [\overline{\bQ}_-,\overline{x}^{\overline{\alpha}}] &=- \overline{\psi}_-^{\overline{\alpha}}~, &\{\overline{\bQ}_-,\psi_-^\alpha\} &=i \partial_{z} x^\alpha~, &\{\overline{\bQ}_-,\overline{\psi}_+^{\overline{\alpha}}\}&=\overline{F}^{\overline{\alpha}}~, &[\overline{\bQ}_-,F^{\alpha}]&=i\partial_{z} \psi_+^{\alpha}~. \end{align} The $\mathcal{N}=(2,2)$ transformations can be written in a more covariant fashion as follows \begin{align} \label{22transfcov} \delta x^\alpha&=\langle\epsilon,\psi^\alpha\rangle~, &\delta \overline{x}^{\overline{\alpha}}&=-\langle\bar{\epsilon},\overline{\psi}^{\overline{\alpha}}\rangle~,\nonumber\\ \delta \psi^\alpha&=i\gamma^{\mu}\partial_{\mu}x^\alpha\bar{\epsilon}+\epsilon F^\alpha~, &\delta \overline{\psi}^{\overline{\alpha}}&=-i\gamma^{\mu}\partial_{\mu}\overline{x}^{\overline{\alpha}}\epsilon+\bar{\epsilon}\overline{F}^{\overline{\alpha}}~,\nonumber\\ \delta F^\alpha&=i\langle \bar{\epsilon},\gamma^{\mu}\partial_{\mu}\psi^\alpha\rangle~, &\delta \overline{F}^{\overline{\alpha}}&=i\langle \epsilon,\gamma^{\mu}\partial_{\mu}\overline{\psi}^{\overline{\alpha}}\rangle~. \end{align} \subsection{R-symmetries and the low-energy limit} The action \eqref{eq:compaction} at $W=0$ exhibits the chiral symmetries of the NLSM on $\mathbf{Y}$, which act on the superfields \eqref{eq:02sfields22} as \begin{align} \xymatrix@C=5mm@R=0mm{ &\theta^+ &\theta^- &\mathcal{X}^\alpha &\Psi^\alpha\\ \text{U}(1)_L^0 &0 &1 &0 &-1\\ \text{U}(1)_R^0 &1 &0 &0 &0 } \end{align} These are however broken in the theory with a non-trivial superpotential. A consequence of the ${{\mathbb{C}}}^\ast_V$ action induced by the Killing vector field $V$ is the fact that the superpotential satisfies a quasi-homogeneity condition. Assuming that at least for a generic enough superpotential $V$ is unique and that locally it can be written as $V=q_\alpha x^\alpha \partial/\partial x^\alpha$, this condition reads \begin{align} W(x^{\alpha}e^{i\lambda q_{\alpha}})=e^{i\lambda}W(x^{\alpha})~. \end{align} It then follows that the classical action admits the symmetries \begin{align} \label{eq:Rcharges} \xymatrix@C=5mm@R=0mm{ &\theta^+ &\theta^- &\mathcal{X}^\alpha &\Psi^\alpha\\ \text{U}(1)_L &0 &1 &q_\alpha &q_\alpha-1\\ \text{U}(1)_R &1 &0 &q_\alpha &q_\alpha } \end{align} These are non-anomalous when $\mathbf{Y}$ is a Calabi-Yau manifold, which we assumed in our construction. Moreover, the vertical property of $V$ implies that $q_{\alpha}=0$ for the base coordinates, while each coordinate along the fiber component $X_i$ has charge $0<q_i\leq1/2$. There is a particularly useful structure which we can use, together with known renormalization theorems, to relate UV data and the IR CFT. Namely, we can construct a left-moving $\mathcal{N}=2$ superconformal algebra in $\overline{\bQ}_+$-cohomology \cite{Silverstein:1994ih}. For the class of models under study, the generators have been worked out in \cite{Bertolini:2013xga} and we report them here for convenience \begin{align} \label{eq:leftN2alg} J_L &\equiv (q_\alpha -1)\psi_-^\alpha\overline{\psi}_{-,\alpha}- q_\alpha x^\alpha \rho_\alpha~,\nonumber\\ T &\equiv -\partial_z x^\alpha\rho_\alpha- {{\frac12}}\left(\overline{\psi}_{-,\alpha} \partial_z \psi_-^\alpha+ \psi_-^\alpha \partial_z\overline{\psi}_{-,\alpha}\right) -{{\frac12}}\partial_z J_L~, \nonumber\\ G^+ &\equiv i\sqrt{2} \left[ \overline{\psi}_{-,\alpha} \partial_z x^\alpha - \partial_z(q_\alpha \overline{\psi}_{-,\alpha} x^\alpha)\right]~,\nonumber\\ G^- &\equiv i\sqrt{2} \psi_-^\alpha \rho_\alpha~, \end{align} where $\rho_\alpha \equiv g_{\alpha\overline{\alpha}} \partial_{z} \overline{x}^{\overline{\alpha}} + \Gamma^\delta_{\alpha\gamma}\overline{\psi}_{-,\delta} \psi_-^\gamma$. In term of these fields, the action reduces to a first-order system, with free fields OPEs \begin{align} \label{eq:OPEs} x^\alpha(z) \rho_{\beta}(w) &\sim \frac{1}{z-w}\delta^\alpha_\beta~, &\psi_-^\alpha(z)\overline{\psi}_{-,\beta}(w)& \sim \frac{1}{z-w}\delta^\alpha_\beta~, \end{align} which define the left-moving $\mathcal{N}=2$ algebra in the full theory, while the non-trivial geometry is encoded in the transformation properties across patches of the fields. In this case, there is plenty of evidence \cite{Bertolini:2013xga} that the theory flows under RG to a conformal fixed point characterized by the central charges \begin{align} c=\overline{c}&=3\sum_\alpha \left( 1-2q_\alpha \right)~. \end{align} In the present work, we are concerned with the (c,c) ring of the theory, and as we will see, only a subset of the fields actively plays a role. In particular, the field $\rho$ will not enter our discussion, thus we do not need to review its properties. Nonetheless, this patch-wise free-fields first-order system description of a hybrid model is particularly useful in performing explicit computations, as we will see in later sections. \subsection{The orbifold and the twisted Jacobian algebra} In application to string theory, the relevant objects are not quite hybrid models, but rather orbifolds thereof, obtained by quotienting the theory by the discrete symmetry generated by $\exp(2\pi J_0)$, where $J_0$ is the conserved charge associated to the $J_L$ current.\footnote{We remark that $\exp(2\pi i J_{0})$ acts on $x^{\alpha}$ and $\psi^{\alpha}_{\pm}$ with the same phase, hence it is a flavor symmetry of the theory and the quotient theory is well-defined.} Let $q_i=a_i/N_i$, where $a_i,N_i\in\mathbb{N}_{>0}$, then this discrete symmetry is given by $\Gamma={{\mathbb{Z}}}_N$ where $N=\text{lcm}(N_1,\dots,N_n)$. As a consequence, all (NS,NS) states have integral charges under both $\text{U}(1)_L\times\text{U}(1)_R$ and the theory can be consistently completed to define a type II or heterotic string vacuum \cite{Gepner:1987vz}. In particular, given the vertical property of $V$, the orbifold action is purely on the fiber $X$. As mentioned above, this condition defines a good hybrid \cite{Bertolini:2013xga}. When this fails to be the case, it has been shown \cite{Aspinwall:2009qy} that the theory develops a singularity at finite distance in the moduli space, and the hybrid structure of a LGO fibered over a compact base breaks down. From a purely mathematical point of view, the orbifold can be viewed as additional structure on the data defining the hybrid model. In particular, given $W:\mathbf{Y}\rightarrow {{\mathbb{C}}}$, let the Jacobian algebra $\text{Jac}(W)$ be the finite-dimensional ${{\mathbb{C}}}$-algebra defined by the cohomology of $\overline{\bQ}_++\overline{\bQ}_-$, which we will study in detail in the following section. This algebra is expected to have the structure of a Frobenius algebra \cite{Morrison:1994fr,Dubrovin:1994hc}. The authors of \cite{2016arXiv160808962B} defined, in the case of orbifolds of an invertible polynomial $W$, a $\Gamma$-twisted version of the Jacobian algebra, denoted $\text{Jac}'(W,\Gamma)$. This object is further equipped with an orbifold residue pairing which defines an orbifold Jacobian algebra, i.e., the $\Gamma$-invariant subalgebra of $\text{Jac}'(W,\Gamma)$. This in turn defines the structure of a ${{\mathbb{Z}}}_2$-graded (commutative) Frobenius algebra. From this perspective, one of the results of this work is to derive a non-degenerate ${{\mathbb{C}}}$-bilinear form, which we can call the residue pairing, which gives $(\mathbf{Y},W,\mathbb{C}^{*}_{R})$ the structure of a (orbifold) Frobenius algebra. \section{The B ring} \label{s:chiralring} Having reviewed the construction of the theories we wish to study, we now turn to the characterization of the main object of interest in this first part of the work, namely, the (c,c) ring. In generic (2,2) SCFTs, it is defined as the collection of operators which satisfy the relations $h=q/2$ and $\overline{h}=\overline{q}/2$, where $h$($\overline{h}$) is the left(right)-moving weight and $q$($\overline{q}$) the charge under the left(right)-moving R-symmetry \cite{Lerche:1989uy}. This is identified with the cohomology of the supercharges $\overline{\bQ}_+$ and $\overline{\bQ}_-$,\footnote{In (2,2) theories there is another (in general) inequivalent ring, the (a,c) ring, defined by the cohomology of the supercharges $\overline{\bQ}_+$ and $\mathbf{Q}_-$, or equivalently by the relations $h=-q/2$ and $\overline{h}=\overline{q}/2$.} or equivalently with the cohomology of the sum \begin{align} \overline{\bQ}_{\text{(c,c)}}:=\overline{\bQ}_+ +\overline{\bQ}_-~. \end{align} A simple consequence of the $\mathcal{N}=2$ superconformal algebra is that in a compact SCFT the number of such elements is finite. The ring structure is provided by the OPE between these operators, which is non-singular as a consequence of the unitarity bounds. This also implies that the three-point functions $\langle \mathcal{O}_1(z_1) \mathcal{O}_2(z_2)\mathcal{O}_3(z_3) \rangle$ of such operators in a suitable twisted theory (the B model) are independent of the insertion points $z_{1,2,3}$. The computation of these correlators in hybrid theories is the main result of this work. Before we proceed to review the techniques, developed in \cite{Bertolini:2013xga}, to compute the elements of the ring, a comment is in order. While it is customary in the literature to use $\overline{\bQ}_{\text{(c,c)}}$ as the BRST charge in the B model \cite{Vafa:1990mu,Witten:1991zz}, this choice has the disadvantage that the corresponding representatives of the cohomology classes, i.e., the elements of the ring, do not, in general, admit a well-defined $\text{U}(1)_L\times\text{U}(1)_R$-action. In other words, such representatives are not eigenvectors of the chiral symmetries \eqref{eq:Rcharges}. This issue is avoided in the context of (2,2) LG models as the cohomology is localized at one particular position in the (dual) Koszul complex, the ring assumes the usual form ${{\mathbb{C}}}[x_1,\dots,x_N]/\langle \partial_1W,\dots,\partial_N W \rangle$, and the representatives have well-defined charges and weights. This is not the case for a more general hybrid, as the description of the ring generally involves, as we will see, some particular linear combinations of the Fermi fields which do not admit a well-defined action under the chiral symmetries. For this reason, we find it more convenient to consider the cohomology of both $\overline{\bQ}_+$ and $\overline{\bQ}_-$ separately. Specifically, we observe that there exists a deformation of the $\overline{\bQ}_{\text{(c,c)}}$-cohomology defined by the supercharge $\overline{\bQ}_\zeta := \overline{\bQ}_++\zeta\overline{\bQ}_-$. We will argue that $\overline{\bQ}_\zeta$-cohomology is equivalent to $\overline{\bQ}_{\text{(c,c)}}$-cohomology. It is clear that $\overline{\bQ}_\zeta$-cohomology will not depend on $\zeta$ as long as $\zeta\neq0$, while at $\zeta=0$ obviously $\overline{\bQ}_{\zeta=0}=\overline{\bQ}_+$. A look at \eqref{22transfcov} shows that \begin{align} \label{eq:newsupch} [\overline{\bQ}_\zeta,\overline{x}^{\overline{\alpha}}] &= \overline{\psi}_+^{\overline{\alpha}}- \zeta \overline{\psi}_-^{\overline{\alpha}}~, &\{\overline{\bQ}_\zeta,\psi_+^\alpha\} &=i \overline{\partial}_{\bar{z}} x^\alpha~,\nonumber\\ \{\overline{\bQ}_\zeta,\psi_-^\alpha\} &=\zeta i \partial_{z} x^\alpha~, &\{\overline{\bQ}_\zeta,\overline{\psi}_{-,\alpha} +\zeta \overline{\psi}_{+,\alpha} \}&=(1+\zeta^{2})W_{\alpha}~. \end{align} At first order in $\zeta$, the only additional condition is that $\psi_-^\alpha$ are no longer exact. This implies that $\overline{\bQ}_\zeta$-cohomology is equivalent, up to $\overline{\bQ}_-$-exact terms, to the cohomology of an operator $\overline{\bQ}$ which acts as \begin{align} \label{eq:newsupch2} [\overline{\bQ},\overline{x}^{\overline{\alpha}}] &= \overline{\psi}_+^{\overline{\alpha}}~, &\{\overline{\bQ},\psi_+^\alpha\} &=i \overline{\partial}_{\bar{z}} x^\alpha~, &\{\overline{\bQ},\psi_-^\alpha\} &= i \partial_{z} x^\alpha~, &\{\overline{\bQ},\overline{\psi}_{-,\alpha} \}&=W_{\alpha}~. \end{align} In particular, we can split $\overline{\bQ} = \overline{\bQ}_0+\overline{\bQ}_W$, where $\overline{\bQ}_0:=\overline{\bQ}|_{W=0}$ and $\overline{\bQ}_W$ contains all the dependence on $W$. These satisfy $\overline{\bQ}_0^2=\overline{\bQ}_W^2=\{\overline{\bQ}_0,\overline{\bQ}_W\}=0$, and the non-trivial action of these operators is represented by \begin{align} \label{eq:chirringcohm} [\overline{\bQ}_0,\overline{x}^{\overline{\alpha}}] &=\overline{\psi}_+^{\overline{\alpha}}~, &\{\overline{\bQ}_0,\psi_+^\alpha\} &=i\overline{\partial}_{\bar{z}} x^\alpha~, &\{\overline{\bQ}_0,\psi_-^\alpha\} &= i\partial_{z} x^\alpha~, &\{\overline{\bQ}_W,\overline{\psi}_{-,\alpha} \}&=W_{\alpha}~. \end{align} In order to simplify notation it is convenient to redefine the fields as follows \begin{align} \label{eq:newfermi} \overline{\eta}^{\overline{\alpha}}& := \overline{\psi}_+^{\overline{\alpha}}~, &\overline{\chi}_\alpha&:=\overline{\psi}_{-,\alpha}~. \end{align} Now, we can rewrite \eqref{eq:chirringcohm} as \begin{align} \label{eq:chirringcohmnewfermi} [\overline{\bQ}_0,\overline{x}^{\overline{\alpha}}] &= \overline{\eta}^{\overline{\alpha}}~, &\{\overline{\bQ}_0,\psi_+^\alpha\} &=i\overline{\partial}_{\bar{z}} x^\alpha~, &\{\overline{\bQ}_0,\psi_-^\alpha\} &=i \partial_{z} x^\alpha~, &\{\overline{\bQ}_W,\overline{\chi}_\alpha \}&=W_{\alpha}~. \end{align} From \eqref{eq:chirringcohmnewfermi} we see that up to (anti-)holomorphic derivatives, $\psi_\pm$ are $\overline{\bQ}_0$-exact and the candidates for elements in $\overline{\bQ}$-cohomology are the local operators \begin{align} \label{eq:states} \mathcal{O}(\omega) = \omega(x,\overline{x})_{\overline{\beta}_1\dots\overline{\beta}_s}^{\alpha_1\dots\alpha_r}\overline{\eta}^{\overline{\beta}_1}\cdots\overline{\eta}^{\overline{\beta}_s}\overline{\chi}_{\alpha_1}\cdots\overline{\chi}_{\alpha_r}~. \end{align} The action of the supercharges on the states \eqref{eq:states} is given by \begin{align} \label{eq:Q0action} \overline{\bQ}_0 : \mathcal{O}(\omega) \mapsto (\overline{\partial} \omega)(x,\overline{x})_{\overline{\gamma} \overline{\beta}_1\dots\overline{\beta}_s}^{\alpha_1\dots\alpha_r}\overline{\eta}^{\overline{\gamma}}\overline{\eta}^{\overline{\beta}_1}\cdots\overline{\eta}^{\overline{\beta}_s}\overline{\chi}_{\alpha_1}\cdots\overline{\chi}_{\alpha_r}~, \end{align} where $(\overline{\partial}\omega)_{\overline{\gamma}}\equiv \partial\omega/\partial \overline{x}^{\overline{\gamma}}$, and \begin{align} \label{eq:QWaction} \overline{\bQ}_W : \mathcal{O}(\omega) \mapsto (-1)^s \omega(x,\overline{x})_{\overline{\beta}_1\dots\overline{\beta}_s}^{\alpha_1\dots\alpha_r}W_{\alpha_1} \overline{\eta}^{\overline{\beta}_1}\cdots\overline{\eta}^{\overline{\beta}_s}\overline{\chi}_{\alpha_2}\cdots\overline{\chi}_{\alpha_r}~. \end{align} We now specialize this structure to the hybrid geometry $\mathbf{Y}={{\text{tot}}}\left( X \xrightarrow{\pi} B\right)$. Let $\{ U_{a}\}$ be an open cover of $B$, then $\{\pi^{-1}U_{a}\}$ is an open cover of $\mathbf{Y}$. Consider an open set $\pi^{-1}U_{a}\cong U_{a}\times \mathbb{C}^{n}$ parametrized by the coordinates \begin{align} x^{\alpha}=(y^{I},\phi^{i})\in U_{a}\times \mathbb{C}^{n}~, \end{align} where $I=1,\dots,b$ and $i=1,\dots,n$. On this patch we can identify the operators (\ref{eq:states}) as sections of the sheaf \begin{align} \left(\bigoplus_{s_{1}+s_{2}=s}\Omega^{0,s_{1}}(U_a)\otimes\Omega^{0,s_{2}}(\mathbb{C}^{n})\right)\otimes \wedge^r T_{\mathbf{Y}}~, \end{align} where all the products $\otimes$ are over the ring of $C^{\infty}$ functions on $\pi^{-1}U_{a}$. We take this ring to be $C^{\infty}$ functions on $U_{a}$ with at most polynomial growth along the fiber directions. This condition does not affect the cohomology, as we show in appendix \ref{app:fibcohom} using the results of \cite{Babalic:2016mbw}. As shown in \cite{Bertolini:2013xga}, upon specialization to $\mathbf{Y}$, in order to compute $\overline{\mathbf{Q}}$-cohomology we can restrict our attention to operators that are horizontal forms and independent of $\bar{\phi}$. That is, we can interpret $\omega$ in (\ref{eq:states}) as a $(0,s)$-horizontal forms valued in $\wedge^r T_{\mathbf{Y}}$. We identify this vector space as \begin{align} \label{eq:wedgeTYdef} \wedge^r_s T_{\mathbf{Y}}&:=\Omega^{0,s}(\mathbf{Y},\wedge^r T_{\mathbf{Y}})~, \end{align} that is, $(0,s)$-forms in $\mathbf{Y}$ valued in $\wedge^r T_{\mathbf{Y}}$ with at most polynomial growth along the fiber directions. The supercharges act on \eqref{eq:wedgeTYdef} as \begin{align} \label{eq:supchactionsdg} \overline{\bQ}_0 &: \wedge^r_s T_{\mathbf{Y}} \rightarrow \wedge^r_{s+1} T_{\mathbf{Y}}~, &\overline{\bQ}_W &: \wedge^r_s T_{\mathbf{Y}} \rightarrow \wedge^{r+1}_s T_{\mathbf{Y}}~. \end{align} The space of operators \eqref{eq:states} constitutes a double graded complex $K^{r,s}$ \begin{equation} \begin{matrix}\vspace{5mm}\\E_0^{r,s} \equiv K^{r,s}:\end{matrix} \begin{xy} \xymatrix@C=5mm@R=5mm{ 0 & 0 & \cdots & 0 & 0 & 0 &0\\ 0 &\wedge^d_b T_{\mathbf{Y}} & \cdots &\wedge^2_b T_{\mathbf{Y}} & \wedge^1_b T_{\mathbf{Y}} & \wedge^0_b T_{\mathbf{Y}} & 0\\ \vdots &\vdots & \ddots &\vdots &\vdots & \vdots &\vdots\\ 0 &\wedge^d_1T_{\mathbf{Y}} & \cdots &\wedge^2_1 T_{\mathbf{Y}} & \wedge^1_1T_{\mathbf{Y}} & \wedge^0_1 T_{\mathbf{Y}} & 0\\ 0 &\wedge^d T_{\mathbf{Y}} & \cdots &\wedge^2 T_{\mathbf{Y}} & T_{\mathbf{Y}} & \mathcal{O}_{\mathbf{Y}} & 0 } \save="x"!LD+<-6mm,0pt>;"x"!RD+<40pt,0pt>**\dir{-}?>*\dir{>}\restore \save="x"!LD+<82mm,-3mm>;"x"!LU+<82mm,2mm>**\dir{-}?>*\dir{>}\restore \save!RD+<13mm,-3mm>*{r}\restore \save!CL+<85mm,28mm>*{s}\restore \end{xy} \end{equation} and \eqref{eq:supchactionsdg} implies that $\overline{\bQ}_0$ and $\overline{\bQ}_W$ act as the vertical and horizontal differentials, respectively. Thus, the total cohomology $\overline{\bQ}$ is computed by a spectral sequence determined by this data. In particular, the first stage is obtained as $E_1^{r,s}=H^s_{\overline{\bQ}_0}(\mathbf{Y},K^{r,\bullet})$, which yields \begin{equation} \label{eq:22spetrseq} \begin{matrix}\vspace{5mm}\\E_1^{r,s} :\end{matrix} \begin{xy} \xymatrix@C=10mm@R=5mm{ 0 \ar[r]&H^b(\mathbf{Y},\wedge^dT_{\mathbf{Y}}) \ar[r]^-{\overline{\bQ}_W}& \cdots \ar[r]^-{\overline{\bQ}_W}& H^b(\mathbf{Y},T_{\mathbf{Y}}) \ar[r]^-{\overline{\bQ}_W} & H^b(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})\ar[r]& 0\\ \vdots &\vdots & \ddots &\vdots &\vdots & \vdots\\ 0 \ar[r]&H^1(\mathbf{Y},\wedge^dT_{\mathbf{Y}}) \ar[r]^-{\overline{\bQ}_W}& \cdots\ar[r]^-{\overline{\bQ}_W} & H^1(\mathbf{Y},T_{\mathbf{Y}}) \ar[r]^-{\overline{\bQ}_W}& H^1(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})\ar[r]& 0\\ 0 \ar[r]&H^0(\mathbf{Y},\wedge^dT_{\mathbf{Y}}) \ar[r]^-{\overline{\bQ}_W}& \cdots \ar[r]^-{\overline{\bQ}_W}& H^0(\mathbf{Y},T_{\mathbf{Y}}) \ar[r]^-{\overline{\bQ}_W} & H^0(\mathbf{Y},\mathcal{O}_{\mathbf{Y}}) \ar[r]& 0\\ } \save="x"!LD+<-6mm,0pt>;"x"!RD+<20pt,0pt>**\dir{-}?>*\dir{>}\restore \save="x"!LD+<85mm,-3mm>;"x"!LU+<85mm,2mm>**\dir{-}?>*\dir{>}\restore \save!RD+<03mm,-3mm>*{r}\restore \save!CL+<87mm,24mm>*{s}\restore \end{xy} \end{equation} The next stage is given by taking cohomology with respect to the horizontal map $\overline{\bQ}_W$ according to \eqref{eq:QWaction}. This is the hybrid generalization of the Koszul complex familiar from Landau-Ginzburg models \cite{Kawai:1994np,Melnikov:2009nh}. Higher differentials are constructed from \eqref{eq:supchactionsdg} using the standard zig-zag procedure \cite{Bott:1982df}. An important fact is that the spectral sequence defined above is ensured to converge, since $s\leq b=\dim B$. An apparent issue in computing the spectral sequence is that, due to the non-compactness of $\mathbf{Y}$, the cohomology groups $H_{\overline{\bQ}_0}^\bullet(\mathbf{Y},\wedge^r T_{\mathbf{Y}})$ are generically infinite dimensional. This issue can be circumnavigated due to the fact that $\overline{\bQ}$-cohomology commutes with the left-moving $\mathcal{N}=2$ algebra \eqref{eq:leftN2alg}, and we can use the generators $J_L$ and $T$ to introduce additional gradings on the space of operators \eqref{eq:states}. This is why it is convenient to choose cohomology class representatives that admit well-defined charges. In particular, as we discussed above, the left-chirality condition $2h=q$ is already automatically imposed by $\overline{\bQ}$-cohomology, therefore it suffices to restrict our attention to the grading $\mathbf{q}$ corresponding to $J_L$. In practice, this means that we can compute the spectral sequence at a fixed value of $\mathbf{q}$, and the groups $H_{\mathbf{q}}^\bullet(\mathbf{Y},\wedge^r T_{\mathbf{Y}})$ are then finite-dimensional. A prescription for how to compute these graded cohomology groups in terms of cohomology groups on the base is given in appendix C of \cite{Bertolini:2013xga}. \section{B-twisted $\mathcal{N}=(2,2)$ hybrid models and $S^{2}$ correlators} \label{s:22corrs} In this section we turn to the study of the B model for hybrid theories. The vector and axial R-charges act on the component fields as \begin{align} \xymatrix@C=5mm@R=0mm{ &\phi^{\alpha} &\psi_{+}^{\alpha} &\psi_{-}^{\alpha} &F^{\alpha}\\ \text{U}(1)_V &q^\alpha_{V} &q^\alpha_{V}-1 &q^\alpha_{V}-1 &q^\alpha_{V}-2\\ \text{U}(1)_A &q^\alpha_{A} &q^\alpha_{A}-1 &q^\alpha_{A}+1 &q^\alpha_{A} } \end{align} These are related to the left- and right-moving R-charges by \begin{align} \text{U}(1)_{V}&=\text{U}(1)_{L}+\text{U}(1)_{R}~, &\text{U}(1)_{A}&=-\text{U}(1)_{L}+\text{U}(1)_{R}~. \end{align} From \eqref{eq:Rcharges} it follows that in the models under study, $q^\alpha_{A}=0$ and $q^\alpha_V=2q_\alpha$. The B-twist \cite{Witten:1991zz} of the theory amounts to twisting the Euclidean rotation group $U(1)_{E}$ by $U(1)_{A}$. There are two options for performing such a twist, namely \begin{align} \label{eq:Btwistdef} B_{(+)}&:U(1)_{E}'=U(1)_{E}+\frac{1}{2}U(1)_{A}~, &B_{(-)}&:U(1)_{E}'=U(1)_{E}-\frac{1}{2}U(1)_{A}~, \end{align} and for definitiveness we choose the twist denoted $B_{(+)}$. Under this choice, the spinors $\overline{\ep}_{\pm}$ become scalars,\footnote{The $B_{(-)}$-twist is equivalent and, in such case, $\epsilon_{\pm}$ become scalars.} and the matter fermions transform as sections of the bundles \begin{align} \psi^{\alpha}_{+}&\in \Gamma(\overline{K}_{\Sigma}\otimes x^{*}(T_{\mathbf{Y}}))~, &\psi^{\alpha}_{-}&\in\Gamma(K_{\Sigma}\otimes x^{*}(T_{\mathbf{Y}}))~,\nonumber\\ {\overline{\psi}}^{\overline{\alpha}}_{+}&\in \Gamma(x^{*}(\overline{T}_{\mathbf{Y}}))~, &\overline{\psi}^{\overline{\alpha}}_{-}&\in \Gamma(x^{*}(\overline{T}_{\mathbf{Y}}))~. \end{align} There exists a family of nilpotent operators $\delta_{\zeta}$, parametrized by a phase $\zeta$,\footnote{In \cite{Hori:2000ck}, $\zeta$ is denoted $e^{i\beta}$ and fixed to $\beta=\pi$. $\delta_\zeta$ is also the same differential denoted $\overline{\partial}_{f}$ in \cite{Li:2013kja}.} which is defined by setting \begin{eqnarray} \delta_{\zeta}=\delta|_{\bar{\epsilon}_{+}=\zeta\bar{\epsilon}_{-}}~. \end{eqnarray} This differential corresponds to the operator $\overline{\bQ}_\zeta$ in \eqref{eq:newsupch}. Since we showed in the previous section that the cohomology of $\overline{\bQ}_\zeta$ does not depend on $\zeta$ as long as $\zeta\neq0$, we choose in this section to restrict our attention to $\zeta$ being a phase. The SUSY transformations generated by $\delta_{\zeta}$ acquire a particularly simple form if we redefine the fields as follows\footnote{The Fermi field $\rho^\alpha$ is not to be confused with the field $\rho_\alpha$ in \eqref{eq:OPEs}. As mentioned before, the latter will make no significant appearance in our computations.} \begin{align} \label{eq:22newfields} \kappa^{\bar{\alpha}}&=\overline{\psi}^{\overline{\alpha}}_{+}-\zeta \overline{\psi}^{\overline{\alpha}}_{-}~, &\theta^{\overline{\alpha}}&=\overline{\psi}^{\overline{\alpha}}_{+}+\zeta\overline{\psi}^{\overline{\alpha}}_{-}~, &\rho^{\alpha}&=\psi^{\alpha}_{\bar{z}}d\bar{z}+\zeta^{-1}\psi^{\alpha}_{z}dz~,\nonumber\\ F'^{\alpha}&=\zeta^{-1} F^{\alpha}~, &\overline{F}'^{\bar{\alpha}}&=\zeta \overline{F}^{\bar{\alpha}}~. \end{align} In terms of these, from \eqref{22transfcov}, we obtain \begin{align} \delta_{\zeta}x^{\alpha}&=0 &\delta_{\zeta} \bar{x}^{\bar{\alpha}}&=\bar{\epsilon}_{-}\kappa^{\bar{\alpha}}\nonumber\\ \delta_{\zeta}\rho^{\alpha}_{\mu}&=2i\bar{\epsilon}_{-}\partial_{\mu}x^{\alpha} &\delta_{\zeta}\theta^{\bar{\alpha}}&=2\bar{\epsilon}_{-}\overline{F}'^{\bar{\alpha}}\nonumber\\ \delta_{\zeta}F'^{\alpha}&=2i\bar{\epsilon}_{-}\varepsilon^{\mu\nu}\partial_{\mu}\rho^{\alpha}_{\nu}~, &\delta_{\zeta}\overline{F}'^{\bar{\alpha}}&=0~,\nonumber\\ \delta_{\zeta}\kappa^{\bar{\alpha}}&=0~, \end{align} where we defined the symbol $\varepsilon^{\mu\nu}$ as $\varepsilon^{z\bar{z}}=-\varepsilon^{\bar{z}z}=1$. The $B_{(+)}$-twisted Lagrangian, in terms of the fields \eqref{eq:22newfields}, reads \begin{align} \mathcal{L}_{K}&=-g_{\alpha\bar{\beta}}\left(h^{\mu\nu}\partial_{\mu}x^{\alpha}\partial_{\nu}\bar{x}^{\bar{\beta}}+\frac{i}{2}h^{\mu\nu}\rho^{\alpha}_{\mu}D_{\nu}\kappa^{\bar{\beta}} +i\varepsilon^{\mu\nu}\partial_{\nu}\rho^{\alpha}_{\mu}\theta^{\bar{\beta}}\right)+\frac{1}{4}\varepsilon^{\mu\nu}R_{\alpha\bar{\alpha}\beta\bar{\beta}}\rho^{\alpha}_{\mu}\rho^{\beta}_{\nu}\kappa^{\bar{\alpha}}\theta^{\bar{\beta}}\nonumber\\ &\quad+g_{\alpha\bar{\alpha}}F'^{\alpha}\overline{F}'^{\bar{\alpha}}+\frac{1}{2}g_{\alpha\bar{\alpha}}\Gamma^{\alpha}_{\beta\gamma}\varepsilon^{\mu\nu}\rho^{\beta}_{\mu}\rho^{\gamma}_{\nu}\overline{F}'^{\bar{\alpha}} +\frac{1}{2}g_{\alpha\bar{\alpha}}\overline{\Gamma}^{\bar{\alpha}}_{\bar{\beta}\bar{\gamma}}F'^{\alpha}\kappa^{\bar{\beta}}\theta^{\bar{\gamma}}\nonumber\\ &\quad+\frac{1}{4}g_{\alpha\bar{\alpha}}\Gamma^{\alpha}_{\beta\gamma}\overline{\Gamma}^{\bar{\alpha}}_{\bar{\beta}\bar{\gamma}}\varepsilon^{\mu\nu}\rho^{\beta}_{\mu}\rho^{\gamma}_{\nu}\kappa^{\bar{\beta}}\theta^{\bar{\gamma}}~, \nonumber\\ \mathcal{L}_{W}&=\frac{1}{2}\left(\zeta F'^{\alpha}\partial_{\alpha}W+\frac{\zeta}{2}\partial_{\alpha}\partial_{\beta}W\varepsilon^{\mu\nu}\rho^{\alpha}_{\mu}\rho^{\beta}_{\nu}+\zeta^{-1}\overline{F}'^{\bar{\alpha}}\overline{\partial}_{\bar{\alpha}}\overline{W}+\frac{\zeta^{-1}}{2}\overline{\partial}_{\bar{\alpha}}\overline{\partial}_{\bar{\beta}}\overline{W}\kappa^{\bar{\alpha}}\theta^{\bar{\beta}}\right)~. \end{align} From the above expressions it is easy to see that the net effect of keeping the phase $\zeta$ arbitrary is equivalent to a rescaling of the superpotential \begin{align} W&\rightarrow \zeta W~, &\overline{W}&\rightarrow \zeta^{-1} \overline{W}~. \end{align} This is a good point to comment on the geometric interpretation of the differential $\delta_{\zeta}$. The local operators that are candidates to be $\delta_{\zeta}$-closed are \begin{eqnarray} \label{eq:opalt} \mathcal{O}(\omega)=\omega^{\alpha_{1},\ldots,\alpha_{s}}_{\bar{\beta}_{1},\ldots,\bar{\beta}_{r}}\kappa^{\bar{\beta}_{1}}\cdots\kappa^{\bar{\beta}_{r}}\theta_{\alpha_{1}}\cdots\theta_{\alpha_{s}}~, \end{eqnarray} where we defined $\theta_{\alpha}:=g_{\alpha\overline{\alpha}}\theta^{\overline{\alpha}}$. While the structure is precisely the same as in \eqref{eq:states}, here we are using a different basis which does not have a well defined vector R-charge. The operators $\mathcal{O}(\omega)$ can be identified with global sections of the sheaf of polyvector fields \begin{eqnarray} PV:=\bigoplus_{s,r}PV^{s,r}=\bigoplus_{s,r}\Omega^{0,r}\otimes\wedge^{s} T_{\mathbf{Y}}=\bigoplus_{s,r}\wedge^{s}_{r} T_{\mathbf{Y}}~, \end{eqnarray} via the mapping \begin{align} \kappa^{\overline{\alpha}}&\rightarrow d\overline{x}^{\overline{\alpha}}~, &\theta_{\alpha}&\rightarrow \partial_{\alpha}~. \end{align} Then, we identify the operators \eqref{eq:opalt} with \begin{eqnarray} \mathcal{O}(\omega)\rightarrow\omega^{s}_{r}:=\omega^{\alpha_{1},\ldots,\alpha_{s}}_{\bar{\beta}_{1},\ldots,\bar{\beta}_{r}}d\bar{x}^{\bar{\beta}_{1}}\cdots d\bar{x}^{\bar{\beta}_{r}}\otimes \partial_{\alpha_{1}}\cdots\partial_{\alpha_{s}}\in PV(\mathbf{Y}):=\Gamma(\mathbf{Y},PV)~. \end{eqnarray} Upon acting on these, the differential $\delta_{\zeta}$ is identified with \begin{eqnarray} \delta_{\zeta}\rightarrow \overline{\partial}-\zeta\iota_{dW}~, \end{eqnarray} where the operator $\iota_{dW}$ acts as \begin{eqnarray} \iota_{dW}\circ\omega^{s}_{r}&=&\sum_{l=1}^{s}(-1)^{r+l+1} \partial_{\alpha_{l}}W\omega^{\alpha_{1},\ldots,\alpha_{s}}_{r}\partial_{\alpha_{1}}\wedge\cdots\wedge \widehat{\partial_{\alpha_{l}}}\wedge\ldots\partial_{\alpha_{s}}\nonumber\\ &=&s(-1)^{r}\partial_{\alpha}W\omega^{\alpha,\alpha_{1},\ldots,\alpha_{s-1}}_{r}\partial_{\alpha_{1}}\wedge\ldots\wedge\partial_{\alpha_{s-1}}~. \end{eqnarray} The charge orthogonal to $\delta_\zeta$ has instead the following interpretation \begin{eqnarray} \tilde{\delta}_{\zeta}:=\delta|_{\bar{\epsilon}_{+}=-\zeta\bar{\epsilon}_{-}}\quad \rightarrow\quad[\Lambda,\overline{\partial}-\zeta\iota_{dW}]~. \end{eqnarray} The operator $\Lambda$ is defined as the contraction with the inverse of the K\"ahler (symplectic) form on $\mathbf{Y}$, and it acts on $\omega^{s}_{r}$ as \begin{eqnarray} \Lambda\circ \omega^{s}_{\bar{\alpha}_{1},\ldots,\bar{\alpha}_{r}}d\bar{x}^{\bar{\alpha}_{1}}\wedge\cdots\wedge d\bar{x}^{\bar{\alpha}_{r}} =r(-1)^{r-1}g^{\alpha\bar{\alpha}}\omega^{s}_{\bar{\alpha},\bar{\alpha}_{2},\ldots,\bar{\alpha}_{k}}d\bar{x}^{\bar{\alpha}_{2}}\wedge\cdots\wedge d\bar{x}^{\bar{\alpha}_{k}}~. \end{eqnarray} The space $PV(\mathbf{Y})=\oplus_{q,p}PV^{q,p}(\mathbf{Y})$ admits a $\mathbb{Z}$-grading (see for example \cite{Li:2013kja}), given by \begin{eqnarray} \mathrm{deg}(\omega^{s}_{r})=r-s~, \qquad \omega^{s}_{r}\in \wedge^{s}_{r}T_{\mathbf{Y}}~. \end{eqnarray} In particular, $\delta_{\zeta}$ shifts $\mathrm{deg}(\omega^{r}_{s})$ by $+1$. \subsection{Localization on $S^{2}$} We now turn to the derivation of the formula for the closed B-twisted correlators of local fields via $S^{2}$ localization. This can be interpreted as the hybrid generalization of the LG correlators from \cite{Vafa:1990mu}. We remark that this result has been first derived in \cite{Herbst:2004ax} -- although in a slightly different fashion than the one we will present here -- as well as in \cite{Guffin:2008kt}. In the latter work, however, the result is valid only for the non-degenerate case, as it involves determinants of the Hessian of $W$. This is not the case for the models we study in this work whenever $\mathbf{Y}$ is non-compact, that is, whenever $X$ and $W$ are not trivial. Nevertheless, we find instructive and useful to re-derive this result from our perspective. This will also pay off in section \ref{s:02hybrids} when we will perform an analogous localization computation for (0,2) models, where our result is instead new. First, let us note that the kinetic term $\mathcal{L}_{K}$ in the Lagrangian is $\delta_{\zeta}$-exact, as \begin{eqnarray} \bar{\epsilon}_{-}\mathcal{L}_{K}=\delta_{\zeta}\left(\frac{i}{2}g_{\alpha\bar{\alpha}}h^{\mu\nu}\rho^{\alpha}_{\mu}\partial_{\nu}\bar{x}^{\bar{\alpha}} +\frac{1}{2}g_{\alpha\bar{\alpha}}\left(F'^{\alpha}+\frac{1}{2}\varepsilon^{\mu\nu}\Gamma^{\alpha}_{\beta\gamma}\rho^{\beta}_{\mu}\rho^{\gamma}_{\nu}\right)\theta^{\bar{\alpha}}\right)~. \end{eqnarray} In particular, the term \begin{eqnarray}\label{exactred} \delta_{\zeta}\left(\frac{i}{2}g_{\alpha\bar{\alpha}}h^{\mu\nu}\rho^{\alpha}_{\mu}\partial_{\nu}\bar{x}^{\bar{\alpha}}\right)=-\bar{\epsilon}_{-}g_{\alpha\bar{\alpha}}\left(h^{\mu\nu}\partial_{\mu}x^{\alpha}\partial_{\beta}\bar{x}^{\bar{\alpha}}+\frac{i}{2}h^{\mu\nu}\tilde{\rho}^{\alpha}_{\mu}D_{\nu}\kappa^{\bar{\alpha}}\right) \end{eqnarray} is positive-definite, and we can use it to localize the action by regarding, at a first stage, the fields $F'^{\alpha},\overline{F}'^{\bar{\alpha}}$ and $\theta^{\bar{\alpha}}$ as background fields. This means that we first localize regarding only the fields $\{\kappa^{\bar{\alpha}},x^{\alpha},\bar{x}^{\bar{\alpha}},\rho^{\alpha}\}$ as dynamical. The solution to the saddle point equations \begin{align} \delta_{\zeta}\kappa=\delta_{\zeta}\rho=0 \end{align} on $\Sigma=S^{2}$ is simply given by $x^{\alpha}=\mathrm{const}$. The classical action evaluated at this locus reduces to \begin{align} S_{0}[F,\theta]:=\int_{\Sigma}d^2z(\mathcal{L}_{K}+\mathcal{L}_{W})|_{x=\mathrm{const}}=\int_{\Sigma}d^2z\left(g_{\alpha\bar{\alpha}}F'^{\alpha}\overline{F}'^{\bar{\alpha}}+\frac{1}{2}\left(\zeta F'^{\alpha}\partial_{\alpha}W+\zeta^{-1}\overline{F}'^{\bar{\alpha}}\overline{\partial}_{\bar{\alpha}}\overline{W}\right)\right)~. \end{align} The 1-loop determinant coming from the expansion of (\ref{exactred}) over non-zero modes is actually a numerical constant that we can ignore. While the zero modes of $x^{\alpha}$ are weighted by $S_{0}[F,\theta]$, we have to be careful with the zero modes of the fermions $\kappa^{\bar{\alpha}}$ (on $S^{2}$, $\rho$ has no zero modes). The usual trick (see for example \cite{Aspinwall:1991ce}) is to use the classical action evaluated at the zero modes of $\kappa^{\bar{\alpha}}_{0}$ to absorb them. Thus, the path integral reads \begin{eqnarray}\label{eq:pathint22} \int \mathcal{D}F'\mathcal{D}\overline{F}'\mathcal{D}\theta\int_{\mathbf{Y}}d^2x\prod_{\alpha}\int d\kappa^{\bar{\alpha}}_{0} e^{S[F,\theta]}~, \end{eqnarray} and it is weighted by \begin{align} S[F,\theta]:=\int_{\Sigma}d^2z(\mathcal{L}_{K}+\mathcal{L}_{W})|_{(x=\mathrm{const},\kappa_{0}^{\bar{\alpha}})}=S_{0}[F,\theta]+\int_{\Sigma}d^2z\left(\frac{\zeta^{-1}}{4}\overline{\partial}_{\bar{\alpha}}\overline{\partial}_{\bar{\beta}}\overline{W} \kappa^{\bar{\alpha}}_{0}\theta^{\bar{\beta}}\right)~. \end{align} The integral over $\mathcal{D}\theta$ is to be interpreted as an integral over the $\theta^{\overline{\alpha}}$ zero modes, and the integration over $F'^{\alpha},\overline{F}'$ can be performed by means of a change of variables. The result, using the geometric interpretation outlined in the previous section, is the following formula for the correlators \begin{align} \label{eq:formula} \langle\mathcal{O}(\omega)\rangle_{S^{2}}:=\int_{\mathbf{Y}}d^{2}x\int(\prod_{\alpha} d\theta_{\alpha}^{0}) (\prod_{\alpha}d\kappa^{\bar{\alpha}}_{0}) \exp\left(-\frac{\mathbf{v}}{4}\| dW \|^{2}+\mathbf{v}\frac{\zeta^{-1}}{4}\overline{\nabla}_{\bar{\alpha}}\overline{\partial}_{\bar{\beta}}\overline{W} \kappa^{\bar{\alpha}}_{0}\theta^{\bar{\beta}}_{0}\right)\mathcal{O}(\omega)~, \end{align} where $\mathbf{v}$ is the worldsheet volume and $\| dW \|^{2}:=g^{\alpha\overline{\alpha}}\partial_{\alpha}W\bar{\partial}_{\overline{\alpha}}\overline{W}$. The last step is the integration over the fermion zero modes. If $\omega \in PV^{r,s}(\mathbf{Y})$, we have the equality \begin{eqnarray} \int_{\mathbf{Y}}d^{2}x\int(\prod_{\alpha} d\theta_{\alpha}^{0}) (\prod_{\alpha}d\kappa^{\bar{\alpha}}_{0}) \mathcal{O}(\omega)=\int_{\mathbf{Y}}\Omega_{\mathbf{Y}}\wedge(\Omega_{\mathbf{Y}}\lrcorner \omega^{s}_{r})~, \end{eqnarray} where $\Omega_{\mathbf{Y}}\lrcorner$ is defined as \begin{eqnarray} \Omega_{\mathbf{Y}}\lrcorner\omega^{s}_{r}:=(\Omega_{\mathbf{Y}})_{\alpha_{1}\cdots \alpha_{s}\alpha_{s+1}\cdots\alpha_{d}}\omega^{\alpha_{1}\cdots \alpha_{s}}_{\bar{\beta}_{1}\cdots \bar{\beta}_{r}}d\bar{x}^{\bar{\beta}_{1}}\wedge\cdots\wedge d\bar{x}^{\bar{\beta}_{r}}\wedge dx^{\alpha_{s+1}}\wedge\cdots\wedge dx^{\alpha_{d}}~. \end{eqnarray} Some comments about this formula are in order. The contributions of the Fermi fields to the measure are identified with sections of the bundles \begin{align} &\prod_{\alpha} d\theta_{\alpha}^{0}\in \Gamma(K_{\mathbf{Y}})~, &&\prod_{\alpha}d\kappa^{\bar{\alpha}}_{0}\in \Gamma(\overline{K}_{\mathbf{Y}}^{*})~. \end{align} The condition for the measure to be well-defined is then $K_{\mathbf{Y}}\otimes\overline{K}_{\mathbf{Y}}^{*}\cong K_{\mathbf{Y}}\otimes K_{\mathbf{Y}}\cong \mathcal{O}_{\mathbf{Y}}$ since $\mathcal{O}_{\mathbf{Y}}$ always has a nowhere vanishing global section. This condition was also obtained in \cite{Sharpe:2006qd}. For the case at hand, where we want to consider $\mathbf{Y}$ being non-compact, the holomorphic volume form $\Omega_{\mathbf{Y}}$ is defined only up to a multiplicative non-vanishing holomorphic function on $\mathbf{Y}$. We remedy this ambiguity by requiring \begin{align} \Omega_{\mathbf{Y}}\wedge\overline{\Omega}_{\mathbf{Y}}&=\widehat{K}^{n}~, &\widehat{K}&=ig_{\alpha\bar{\alpha}}dx^{\alpha}\wedge d\bar{x}^{\bar{\alpha}}~. \end{align} Finally, the $S^2$ correlators can be written as \begin{eqnarray} \label{eq:22S2corrs} \langle\mathcal{O}(\omega)\rangle_{S^{2}}=\int_{\mathbf{Y}}\Omega_{\mathbf{Y}}\wedge(\Omega_{\mathbf{Y}}\lrcorner(e^{\hat{L}} \omega^{s}_{r}))~, \end{eqnarray} where we introduced the operator \begin{align} \hat{L}&:=-\frac{\mathbf{v}}{4}\| J\|^{2}+\mathbf{v}\frac{\zeta^{-1}}{4}\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha}~, &\overline{J}^{\alpha}\partial_{\alpha}&:=g^{\alpha\overline{\alpha}}\overline{\partial}_{\overline{\alpha}}\overline{W}\partial_{\alpha}\in PV^{1,0}(\mathbf{Y})~, \end{align} whose exponential acts by the usual wedge product on polyvector fields \begin{eqnarray} \label{eq:expexpLh} e^{\hat{L}}=e^{-\frac{\mathbf{v}}{4}\| J \|^{2}}\sum_{r}\frac{\zeta^{-r}\mathbf{v}^{r}}{4^{r}r!}\left(\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha}\right)^{r}~. \end{eqnarray} We remark that the correlator \eqref{eq:22S2corrs}, when $\mathbf{Y}$ is compact and smooth (thus $\hat{L}\equiv 0$), reduces to the well known expression for a NLSM with target the CY manifold $\mathbf{Y}$ (see for example section 16 of \cite{Hori:2003ic}). Although the formula \eqref{eq:22S2corrs} is formally a one-point function, it is of most interest when interpreted as a three-point function, that is, by expressing the insertion as the product $\mathcal{O}(\omega)=\mathcal{O}(\omega_1)\mathcal{O}(\omega_2)\mathcal{O}(\omega_3)$, where $\mathcal{O}(\omega_{1,2,3})\in H^\bullet_{\overline{\bQ}}(\mathbf{Y},\wedge^\bullet T_{\mathbf{Y}})$. In particular, the correlators must be invariant under the chiral symmetries. From the expression \eqref{eq:formula}, it follows that the measure has charge $-c/3$ under $\text{U}(1)_L$, thus the correlators vanish unless \begin{align} \mathbf{q}(\mathcal{O}(\omega_1))+\mathbf{q}(\mathcal{O}(\omega_2))+\mathbf{q}(\mathcal{O}(\omega_3))=\frac{c}3~. \end{align} Invariance of the formula \eqref{eq:formula} under $\text{U}(1)_A$, under which the measure has charge 0, instead implies that $\mathcal{O}(\omega)\in \oplus_{p=0}^b PV^{p,p}(\mathbf{Y})$. \subsection{Properties of $S^{2}$ correlators} The formula for the $S^{2}$ correlators we derived in the previous section enjoys a series of properties that we will argue for in this section. We remark that some of these properties have already been shown in \cite{Babalic:2016mbw} and \cite{2015arXiv150802769C}. Let us start by showing that \eqref{eq:22S2corrs} is independent of the choice of representatives. Consider the following integral on $S^{2}$ \begin{align} \langle\delta_{\zeta}\mathcal{O}(\omega)\rangle'_{S^{2}}&:=\int_{\mathbf{Y}}\Omega_{\mathbf{Y}}\wedge (\Omega_{\mathbf{Y}}\lrcorner \delta_{\zeta}\omega)~, &\omega&\in PV^{p,q}_{c}(\mathbf{Y})~. \end{align} In order for the integral to be well-defined, we take $\mathcal{O}(\omega)$ to be a compactly supported (we only need it to be compactly supported along $X$), nonsingular, homogenous (in degree) polyvector field. Since $\overline{\partial}\omega\in PV^{p,q+1}(\mathbf{Y})$ and $\iota_{J}\omega\in PV^{p-1,q}(\mathbf{Y})$, then $\langle\delta_{\zeta}\mathcal{O}(\omega)\rangle'_{S^{2}}=0$ unless $q+1=p=d$ or $p-1=q=d$. If $p=d+1$, $\omega$ vanishes identically, while in the former case we are left with \begin{eqnarray} \langle\delta_\zeta\mathcal{O}(\omega)\rangle'_{S^{2}}=\int_{\mathbf{Y}}\Omega_{\mathbf{Y}}\wedge (\Omega_{\mathbf{Y}}\lrcorner \overline{\partial}\omega)=\int_{\mathbf{Y}}d\Omega_{\mathbf{Y}}\wedge (\Omega_{\mathbf{Y}}\lrcorner\omega)=0~, \end{eqnarray} where the last equality follows from our assumptions that $\omega$ has no poles on $\mathbf{Y}$ and that the integral is convergent. By a direct computation one can show that \begin{eqnarray} [\delta_{\zeta},e^{\hat{L}}]=\delta_{\zeta}(e^{\hat{L}})+e^{\hat{L}}\delta_{\zeta}-e^{\hat{L}}\delta_{\zeta}=0~. \end{eqnarray} Hence \begin{eqnarray} \label{eq:indreprs} \langle\delta_{\zeta}\mathcal{O}(\omega)\rangle_{S^{2}}=\langle\delta_{\zeta}(e^{\hat{L}}\mathcal{O}(\omega))\rangle'_{S^{2}}=0~, \end{eqnarray} for any polyvector field $\omega$, concluding the proof that the correlators do not depend on the choice of representatives. A second property of $\langle\mathcal{O}(\omega)\rangle_{S^{2}}$ is that it is independent of small variations of $\mathbf{v}$ whenever $\omega$ is in $\delta_{\zeta}$-cohomology. This is expected for a topological field theory and it follows from the identity \begin{eqnarray} \exp\left(-\frac{\mathbf{v}+\delta \mathbf{v}}{4}\| J \|^{2}+\zeta^{-1}\frac{(\mathbf{v}+\delta \mathbf{v})}{4}\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha} \right)=e^{\hat{L}}+\delta_{\zeta}(\tilde{\alpha})\wedge e^{\hat{L}}~, \end{eqnarray} where \begin{eqnarray} \tilde{\alpha}=\delta \mathbf{v}\frac{\zeta^{-1}}{4}\overline{J}^{\alpha}\partial_{\alpha}~. \end{eqnarray} Now, since all the dependence on $\mathbf{v}$ is contained in $\hat{L}$, it follows that \begin{eqnarray} \langle \mathcal{O}(\omega)\rangle_{S^{2}}|_{\mathbf{v}+\delta\mathbf{v}}&=&\langle \mathcal{O}(\omega)\rangle_{S^{2}}|_{\mathbf{v}}+\langle\delta_{\zeta}(\mathcal{O}(\tilde{\alpha}))\wedge e^{\hat{L}}\mathcal{O}(\omega)\rangle'_{S^{2}}\nonumber\\ &=&\langle \mathcal{O}(\omega)\rangle_{S^{2}}|_{\mathbf{v}}+\langle\delta_{\zeta}(\mathcal{O}(\tilde{\alpha})\wedge e^{\hat{L}}\mathcal{O}(\omega))\rangle'_{S^{2}}\nonumber\\ &=&\langle \mathcal{O}(\omega) \rangle_{S^{2}}|_{\mathbf{v}}~, \end{eqnarray} where the last equality follows from \eqref{eq:indreprs}. Next, we are going to show that $\langle \mathcal{O}(\omega)\rangle_{S^{2}}$ is independent of variations $\delta g_{\alpha\bar{\beta}}$ of the metric on $\mathbf{Y}$ such that $\delta g_{\alpha\beta}=\delta g_{\bar{\alpha}\bar{\beta}}=0$, i.e., our B model correlators are independent of variations of the K\"ahler moduli of $\mathbf{Y}$, as expected. Let, as before, $\omega\in PV^{s,s}(\mathbf{Y})$ be a homogeneous polyvector field in $\delta_{\zeta}$-cohomology. Then \begin{align} \label{eq:corrindg} \Omega_{\mathbf{Y}}\lrcorner(e^{\hat{L}}\omega )&=e^{-\frac{\mathbf{v}}{4}\| J\|^{2}}\zeta^{-r}\left(\frac{\mathbf{v}}{4}\right)^{r}\frac{(-1)^{rs+\frac{r(r-1)}{2}}}{r!} \nonumber\\ &\quad\times (\Omega_{\mathbf{Y}})_{\gamma_{1}\ldots \gamma_{d}}\overline{\partial}_{\overline{\beta}_1}\overline{J}^{\gamma_{1}}\wedge\cdots\wedge\overline{\partial}_{\overline{\beta}_{r}}\overline{J}^{\gamma_{r}}\omega^{\gamma_{r+1}\cdots \gamma_{d}}_{\bar{\beta}_{r+1}\cdots\bar{\beta}_{d}}d\bar{z}^{\bar{\beta}_{1}}\wedge\cdots\wedge d\bar{z}^{\bar{\beta}_{d}}~, \end{align} where $s=d-r$. Moreover, notice that the only dependence of $\hat{L}$ on the metric is in the form of the inverse metric $g^{\alpha \overline{\beta}}$. The variation $\delta g^{\alpha \bar{\beta}}$ in $\exp(\hat L)$ can be split in two pieces, namely the variation of the multiplicative exponent \begin{eqnarray} \delta(e^{-\frac{\mathbf{v}}{4}\| J\|^{2}})=-\frac{\mathbf{v}}{4}\delta g^{\alpha \bar{\beta}}\overline{J}_{\bar{\beta}}J_{\alpha}e^{-\frac{\mathbf{v}}{4}\| J\|^{2}}~, \end{eqnarray} and the variation of the $\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha}$ factors \begin{eqnarray} \delta(\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha})=\overline{\partial}(\delta g^{\alpha\bar{\beta}}\overline{J}_{\bar{\beta}})\partial_{\alpha}~. \end{eqnarray} The full variation of \eqref{eq:corrindg}, after a slightly lengthy computation, is given by \begin{align} \delta(\Omega_{\mathbf{Y}}\lrcorner(e^{\hat{L}}\omega ))&=\frac{\zeta^{-1}\mathbf{v}}{4}\Omega_{\mathbf{Y}}\lrcorner\left(e^{\hat{L}}\delta_{\zeta}(\Theta)\wedge\omega \right) \nonumber\\ &=\frac{\zeta^{-1}\mathbf{v}}{4}\Omega_{\mathbf{Y}}\lrcorner\left(e^{\hat{L}}\delta_{\zeta}(\Theta\wedge\omega) \right)~, \end{align} where \begin{eqnarray} \Theta:=\delta g^{\alpha\bar{\beta}}\overline{J}_{\bar{\beta}}\partial_{\alpha}\in PV^{(1,0)}(\mathbf{Y})~. \end{eqnarray} Thus, the variation of the full correlator is \begin{align} \delta \langle \mathcal{O}(\omega) \rangle_{S^2} = \frac{\zeta^{-1}\mathbf{v}}{4} \langle \delta_\zeta \mathcal{O}(\Theta\wedge\omega) \rangle_{S^2} =0~. \end{align} Finally, we want to comment on the independence of the parameters in $\overline{W}$. While we expect $\langle \mathcal{O}(\alpha)\rangle_{S^{2}}$ to depend holomorphically on the superpotential parameters, \eqref{eq:22S2corrs} is certainly not explicitly holomorphic. Let us consider a variation $\overline{J}\rightarrow\overline{J}+\delta \overline{J}$. A direct computation shows \begin{eqnarray} e^{\hat{L}}\big|_{\overline{J}+\delta \overline{J}}=e^{\hat{L}}+\delta_{\zeta}(\varpi)\wedge e^{\hat{L}}~, \end{eqnarray} where \begin{eqnarray} \varpi=\frac{\zeta^{-1}\mathbf{v}}{4}\delta \overline{J}^{\alpha}\partial_{\alpha}\in PV^{(1,0)}(\mathbf{Y})~. \end{eqnarray} Thus, this variation produces a $\delta_{\zeta}$-exact form, which gives a vanishing contribution to the correlator, and the correlators do not depend on the anti-holomorphic parameters in $\overline{W}$. \subsection{Reduction to integral over $B$ and residue formula} In this section we are going to analyze more closely the integral arising in the $S^{2}$ correlators. Our goal is to show that such integral reduces to an integral over $B$, and we will compare it with the residue formula given in \cite{2015arXiv150802769C}. Given the factor $\exp(-\mathbf{v}\| dW\|^2/4)$ in \eqref{eq:22S2corrs} and the assumption of polynomial growth along $X$, the integration over the fiber coordinates is absolutely convergent. Thus, it should be possible to perform such integration and obtain $\langle \mathcal{O}(\omega)\rangle_{S^{2}}$ as an integral over $B$. In this section we will push this line of reasoning a bit further to derive a residue formula for \eqref{eq:22S2corrs}. Let us consider $\omega=\sum_{p=0}^{d}\omega_{p}~,$ where $\omega_{p}\in PV^{p,p}(\mathbf{Y})$, as appropriate for a non-vanishing integral. This is an element in $\delta_{\zeta}$-cohomology if and only if \begin{align} \overline{\partial}\omega_{p}&=\zeta \iota_{J}\omega_{p+1}~, &p&=0,\ldots,d-1~. \end{align} Let us define the collection of functions \begin{eqnarray} f_{r}:=(-1)^{r}\frac{d^{r-1}}{d a^{r-1}}a^{-1}e^{-a\frac{\mathbf{v}}{4}\| J \|^{2}}\Big|_{a=1}~, \end{eqnarray} for $r\in{{\mathbb{Z}}}_{>0}$. These satisfy the following properties \begin{align} \overline{\partial}f_{r}&=\left(\frac{\mathbf{v}}{4}\right)^{r}e^{-\frac{\mathbf{v}}{4}\| J \|^{2}}\| J \|^{2r-2}\overline{\partial}(\| J \|^{2})~, &f_{r+1}&=rf_{r}-\left(\frac{\mathbf{v}}{4}\right)^{r}\| J \|^{2r}e^{-\frac{\mathbf{v}}{4}\| J \|^{2}}~. \end{align} Let us also define the collection of polyvector fields $A_{s-1}\in PV^{s,s-1}(\mathbf{Y})$ by \begin{eqnarray} A_{s-1}:=\left(\frac{\overline{J}^{\alpha}\partial_{\alpha}}{\| J \|^{2}}\right)\left(\frac{\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha}}{\| J \|^{2}}\right)^{s-1}~, \end{eqnarray} for $s=1,\dots,d-1$, which instead satisfy \begin{align} \overline{\partial}A_{s-1}&=\iota_{J}A_{s}~, &\overline{\partial}A_{d-1}&=0~. \end{align} It is possible to show that \begin{align} \left(\frac{\mathbf{v}}{4}\right)^{p}\frac{1}{p}e^{-\frac{\mathbf{v}}{4}\| J \|^{2}}(\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha})^{p}=\overline{\partial}f_{p}A_{p-1}+\left(\frac{\mathbf{v}}{4}\right)^{p}\frac{1}{p} e^{-\frac{\mathbf{v}}{4}\| J \|^{2}}\| J \|^{2p}\overline{\partial}A_{p-1}~. \end{align} With this property we can write \begin{align} \left(\frac{\mathbf{v}}{4}\right)^{p}\frac{1}{p}e^{-\frac{\mathbf{v}}{4}\| J \|^{2}}(\overline{\partial}\overline{J}^{\alpha}\partial_{\alpha})^{p}\omega_{d-p}&= \overline{\partial}\left(f_{p}A_{p-1}\omega_{d-p}\right)-f_{p}\overline{\partial}A_{p-1}\omega_{d-p}\nonumber\\ &\quad+f_{p}A_{p-1}\overline{\partial}\omega_{d-p}+\left(\frac{\mathbf{v}}{4}\right)^{p}\frac{1}{p} e^{-\frac{\mathbf{v}}{4}\| J \|^{2}}\| J \|^{2p}\overline{\partial}A_{p-1}\omega_{d-p}\nonumber\\ &=\overline{\partial}\left(f_{p}A_{p-1}\omega_{d-p}\right) -\frac{1}{p}f_{p+1}\iota_{J}A_{p}\omega_{d-p}\nonumber\\ &\quad+\zeta f_{p}A_{p-1}\iota_{J}\omega_{d-p+1}~. \end{align} Now, let us define \begin{align} B_{p}&:=-\frac{\zeta^{-p}}{p!}f_{p+1}\iota_{J}A_{p}\omega_{d-p}~, &C_{p}&:=\frac{\zeta^{-p+1}}{(p-1)!}f_{p}A_{p-1}\iota_{J}\omega_{d-p+1}~, \end{align} for $p=0,\ldots,d$, with $C_{0}:=0$ and $B_{d}:=0$. It is possible to show that\footnote{Here we use the following property: given $\alpha\in PV^{p,q}(\mathbf{Y})$ and $\beta\in PV^{r,s}(\mathbf{Y})$ in an explicit basis in terms of fermions, $\alpha ^{[p]}_{[q]}\bar{\eta}^{[q]}\bar{\chi}_{[p]}$, etc., it is easy to see that $\iota_{J}(\alpha \beta)=\iota_{J}(\alpha)\beta+(-1)^{p+q}\alpha\iota_{J}\beta$.} \begin{eqnarray} B_{p}+C_{p+1}=0~,\qquad p=0,\dots,d-1~. \end{eqnarray} Putting all together, we obtained the expression \begin{eqnarray} e^{\hat{L}}\omega=\overline{\partial}\left(\sum_{p=1}^{d}\frac{\zeta^{-p}}{(p-1)!}f_{p}A_{p-1}\omega_{d-p}\right)~. \end{eqnarray} Thus, a generic correlator can be written as \begin{eqnarray} \label{eq:corrsoverB} \langle \mathcal{O}(\omega)\rangle_{S^{2}}=\int_{\mathbf{Y}\setminus B}d\left(\Omega_{\mathbf{Y}}\wedge\left(\Omega_{\mathbf{Y}}\lrcorner \Xi(\omega)\right)\right)~, \end{eqnarray} where the polyvector \begin{eqnarray} \Xi(\omega):=\sum_{p=1}^{d}\frac{\zeta^{-p}}{(p-1)!}f_{p}A_{p-1}\omega_{d-p}\in PV^{d,d-1}(\mathbf{Y}) \end{eqnarray} is meromorphic, and \eqref{eq:corrsoverB} is an integral over $\mathbf{Y}\setminus B$, where $B$ is the zero section of $\mathbf{Y}$ and is the singular loci of $\Xi$. By Stokes' theorem, the integral reduces to an integral over $M=\partial(\mathbf{Y}\setminus B)$, where $M$ has the structure of a fiber bundle over $B$, say $M:S\rightarrow B$, and the fiber is the sphere $S=S^{2d-2b-1}$. Hence \begin{eqnarray} \label{eq:residueform} \langle \mathcal{O}(\omega)\rangle_{S^{2}}=\int_{B}\pi_{*}(\Omega_{\mathbf{Y}}\wedge(\Omega_{\mathbf{Y}}\lrcorner \Xi(\omega)))~, \end{eqnarray} where $\pi_{*}(\Omega_{\mathbf{Y}}\wedge(\Omega_{\mathbf{Y}}\lrcorner \Xi(\omega)))$ is defined by integration over the fiber coordinates by \begin{eqnarray} \pi_{*}(\Omega_{\mathbf{Y}}\wedge(\Omega_{\mathbf{Y}}\lrcorner \Xi(\omega)))\big|_{p\in B}=\int_{\pi^{-1}(p)}\Omega_{\mathbf{Y}}\wedge(\Omega_{\mathbf{Y}}\lrcorner \Xi(\omega))~. \end{eqnarray} We can interpret \eqref{eq:residueform} as our residue formula, and it coincides with the one presented in \cite{2015arXiv150802769C}. As a consistency check we can see that in the case of a pure LG model, where $B=\mathrm{pt.}$~and $\mathbf{Y}={{\mathbb{C}}}^d$, \eqref{eq:residueform} reduces to an integral over $S^{2d-1}$. By a well-known theorem in residue theory (see, for example, chapter 5 of \cite{GHbook}) \eqref{eq:residueform} can be expressed as an integral of a holomorphic form in $\mathbb{C}^{d}\setminus \cup_{\alpha}\{J_{\alpha}=0\}$ over the torus $\{|J_{\alpha}|=\varepsilon_{\alpha}\}$ (recall that, for a LG model, the $\delta_{\zeta}$-cohomology collapses to degree $(0,0)$, i.e., the relevant $\omega$'s are just holomorphic functions). This is exactly the formula derived in \cite{Vafa:1990mu}. A detailed derivation of this can also be found in \cite{Li:2013kja}, where our function $f_{d}$ at large $\mathbf{v}$ plays the role of the cut-off function introduced in that work. As a final comment, we were not able to reduce our formula to an integration over a cycle in $\mathbf{Y}\setminus B$ (and neither are the authors of \cite{2015arXiv150802769C}). More importantly perhaps, it seems challenging to implement \eqref{eq:residueform} for explicit calculations. For the purpose of actually finding the value of the integrals in specific examples, or to be more precise, the dependence of the correlators on the parameters in $W$, we present in the next section a proposal for a transformation law. \subsection{A transformation law for hybrid integrals} \label{ss:transflaw} The transformation law for local residues is well known (see chapter 5 of \cite{GHbook}). This property is very useful for computing correlators in $\mathcal{N}=(2,2)$ LG models, since they can be expressed in terms of residue integrals \cite{Vafa:1990mu}. Let us review how this transformation law can be used to compute $S^{2}$ B-twisted correlators in LG models, from the formula of \cite{Vafa:1990mu}. Let us consider the LG model $(\mathbb{C}^{n},W_{\text{LG}})$ (this considerations also apply to LG orbifolds $(\mathbb{C}^{n},W_{\text{LG}},\Gamma)$ where $\Gamma$ is a finite group), where $\phi_1,\dots,\phi_n$ are coordinates on ${{\mathbb{C}}}^n$. Then, there exists a $n\times n$ matrix $\mathcal{B}_{i}^{ \ j}$, whose entries are polynomials in the $\phi_i$'s, such that \begin{align} \mathcal{B}_{i}^{ \ j}J_{j}&=T_{i}~, &T_{i}&:=\phi_{i}^{a_{i}}~,\qquad a_{i}\in\mathbb{N}_{> 0}~, \end{align} where we defined $J_{j}:=\partial_{j}W_{LG}$. The matrix $\mathcal{B}$ is not unique (and neither are the integers $a_{i}$), but the residue is not affected by this choice. By construction, $\mathcal{B}$ contains all the dependence on the parameters in $W_{\text{LG}}$, which we collectively denote $\xi$. Then we can write \begin{eqnarray}\label{expandB} \mathrm{det}(\mathcal{B})=\sum_{t}h_{t}(\xi)m_{t}~, \end{eqnarray} where $h_{t}(\xi)$ are rational functions in $\xi$ and $m_{t}$ are monomials in the $\phi_i$'s. The local operators spanning the (c,c) ring of the theory are given by ${{\mathbb{C}}}[\phi_1,\dots,\phi_n]/<J>$, where $<J>$ is the Jacobian ideal \cite{Lerche:1989uy}. Let $\mathcal{O}(\omega)\in PV^{0,0}(\mathbb{C}^{n})$ be an element of the (c,c) ring. Then, using the local transformation law, LG $S^{2}$ correlators can be written as \begin{eqnarray} \langle\mathcal{O}(\omega)\rangle^{LG}_{S^{2}}=\sum_{t}h_{t}(\xi)\mathrm{Res}\left( \frac{m_{t}\omega}{\prod_{j}T_{j}}\right)=\sum_{t}h_{t}(\xi)\langle \mathcal{O}(m_{t}\omega)\rangle^{T}_{S^{2}}~, \end{eqnarray} where we denoted $\langle \mathcal{O}(m_{t}\omega)\rangle^{T}_{S^{2}}$ the correlators obtained by replacing $J_{i}$ with $T_{i}$. These do not contain any dependence on $\xi$ and are straightforward to evaluate. The proof of this transformation property for the residue formula, given in \cite{GHbook}, relies on the property that the residue integral is explicitly expressible as a holomorphic integral over a cycle. As we pointed out above, we do not know how to generalize this property to the hybrid case, despite the fact that formally the hybrid correlator has no dependence on the anti-holomorphic parameters. However, we conjecture that a similar property also holds in the more general hybrid setting. In the remainder of this section we are going to provide a non-rigourous argument in favor of the existence of such a property for the general hybrid $S^{2}$ correlator. Let $\omega\in PV^{p,p}(\mathbf{Y})$, and we do not need to require that $\omega$ is an element in $\delta_{\zeta}$-cohomology for the following argument to hold. This specific form of the insertion selects one term in the expansion \eqref{eq:expexpLh}, and the correlator \eqref{eq:22S2corrs} reads \begin{eqnarray} \label{eq:corrtranflaw1} \langle\mathcal{O}(\omega)\rangle_{S^{2}}=\left(\frac{\mathbf{v}\zeta^{-1}}{4}\right)^{d-p}\int_{\mathbf{Y}}\Omega_{\mathbf{Y}}\wedge\left(\Omega_{\mathbf{Y}}\lrcorner\left(e^{-\frac{\mathbf{v}}{4}\| J \|^{2}} (\overline{\partial}\overline{J}^{\alpha} \partial_{\alpha})^{d-p}\omega\right)\right)~. \end{eqnarray} Let us now assume that there exists $\mathcal{B}\in \Gamma\left({{\text{Hom}}}(T_{\mathbf{Y}}^{*},T_{\mathbf{Y}}^{*})\right)=\Gamma\left(T_{\mathbf{Y}}\otimes T_{\mathbf{Y}}^{*}\right)$ such that \begin{eqnarray} T_{\alpha}=\mathcal{B}_{\alpha}^{ \ \beta}J_{\beta}\in\Gamma(T^\ast_{\mathbf{Y}}) \end{eqnarray} does not depend on the parameters $\xi$ of $W$ and $B=\{T_{\alpha}=0\}\subset \mathbf{Y}$, that is the potential condition holds for $T$ as well. We can interpret the inverse of the K\"ahler metric $g^{-1}$ to be a section of ${{\text{Hom}}}(\overline{T}^{*}_{\mathbf{Y}},T_{\mathbf{Y}})$ and write \begin{eqnarray} \| J \|^{2}=J(g^{-1}\overline{J})~. \end{eqnarray} Let us define the metric $h$ on $\mathbf{Y}$ by \begin{eqnarray} \label{eq:defhmetric} g^{-1}=\mathcal{B}^{t}h^{-1}\overline{\mathcal{B}}~, \end{eqnarray} where $\mathcal{B}^{t}\in\Gamma\left(\mathrm{Hom}(T_{\mathbf{Y}},T_{\mathbf{Y}})\right)$ denotes the transpose of $\mathcal{B}$ (and $\overline{\mathcal{B}}\in\Gamma\left({{\text{Hom}}}(\overline{T}^\ast_{\mathbf{Y}},\overline{T}^\ast_{\mathbf{Y}})\right)$). We can then express the operator $\hat{L}$ in terms of the metric $h$ as \begin{eqnarray} \hat{L}=-\frac{\mathbf{v}}{4}\| T \|^{2}_{h}+\mathbf{v}\frac{\zeta^{-1}}{4}(\mathcal{B}^{t})^{\beta}_{ \ \alpha}\overline{\partial}\overline{T}^{\alpha}\partial_{\beta}~, \end{eqnarray} where we emphasized that $\| J \|^{2}=\| T \|^{2}_{h}$ is contracted using the metric $h$ and $ \overline{T}^{\alpha}=h^{\alpha\bar{\alpha}}\overline{T}_{\bar{\alpha}}$. Since $\mathcal{B}^{t}\in\Gamma(T^\ast_{\mathbf{Y}}\otimes T_{\mathbf{Y}})$, the wedge product $\mathcal{B}^{t}\wedge \mathcal{B}^{t}$ is well-defined, as is the tensor \begin{eqnarray} \mathcal{M}(\mathcal{B}):=\Omega_{\mathbf{Y}}\lrcorner \underbrace{\mathcal{B}^{t}\wedge\ldots\wedge\mathcal{B}^{t}}_{(d-p)\text{-times}}\in \Gamma(\mathbf{Y},\wedge^{d}T^{*}_{\mathbf{Y}})~. \end{eqnarray} Finally, by plugging in these definitions in \eqref{eq:corrtranflaw1} we obtain \begin{eqnarray} \label{minorcorr} \langle\mathcal{O}(\omega)\rangle_{S^{2}}=\left(\frac{\mathbf{v}\zeta^{-1}}{4}\right)^{d-p}\int_{\mathbf{Y}}\Omega_{\mathbf{Y}}\wedge\left(\mathcal{M}(\mathcal{B})\lrcorner\left(e^{-\frac{\mathbf{v}}{4}\| T\|^{2}} (\overline{\partial}\overline{T}^{\alpha} \partial_{\alpha})^{d-p}\omega\right)\right)~. \end{eqnarray} Although the above expression appears to be merely a rewriting of the original correlator \eqref{eq:corrtranflaw1}, notice that all the $\xi$ dependence is now contained in the metric $h$ and the tensor $\mathcal{M}(\mathcal{B})$. Next, we wish to make use of the property that the $S^2$ correlators do not depend on variations of the K\"ahler metric, as we showed above. This implies that we can choose $g$ in \eqref{eq:defhmetric} such that $h$ has no dependence on $\xi$. In particular, we can choose $h$ to be diagonal and constant over $\mathbf{Y}$. The tensor $\mathcal{M}(\mathcal{B})$ can be written in terms of minors of $\mathcal{B}$. Let us make this more explicit. Let us define the matrix $\mathcal{M}_{\overline{\alpha}}^{ \ \beta}:=\overline{\partial}_{\overline{\alpha}}\overline{J}^{\beta}$ and let $\mathcal{M}^{\overline{\alpha}_{1},\dots,\overline{\alpha}_{p}}_{\beta_{1},\ldots,\beta_{p}}$ be the completely skew-symmetric tensor where each component is given by the determinant of the minor of $\mathcal{M}$ obtained by removing the columns $\bar{\alpha}_{1},\dots,\bar{\alpha}_{p}$ and the rows $\beta_{1},\ldots,\beta_{p}$. This can be expressed as a sum of products \begin{eqnarray} \label{eq:Mminasdets} \mathcal{M}^{\bar{\alpha}_{1},\dots,\bar{\alpha}_{p}}_{\beta_{1},\ldots,\beta_{p}}=\sum_{[\gamma]}(\overline{\partial}\overline{T})^{\bar{\alpha}_{1},\dots,\bar{\alpha}_{p}}_{\gamma_{1},\ldots,\gamma_{p}}(\mathcal{B}^{t})^{\gamma_{1},\ldots,\gamma_{p}}_{\beta_{1},\ldots,\beta_{p}}~. \end{eqnarray} In a patch, we can write $(\Omega_{\mathbf{Y}})_{\alpha_{1},\ldots,\alpha_{d}}=f_{\mathbf{Y}}\varepsilon_{\alpha_{1},\ldots,\alpha_{d}}$, with $f_{\mathbf{Y}}$ a nowhere vanishing holomorphic function. Then (\ref{minorcorr}) can be written more explicitly as \begin{eqnarray}\label{xidepen} \langle\mathcal{O}(\omega)\rangle_{S^{2}}=\left(\frac{\mathbf{v}\zeta^{-1}}{4}\right)^{d-p}\sum_{[\gamma]}\int_{\mathbf{Y}}d^{2d}x f_{\mathbf{Y}}^{2}e^{-\frac{\mathbf{v}}{4}\| T\|^{2}} (\mathcal{B}^{t})^{\gamma_{1},\ldots,\gamma_{p}}_{\beta_{1},\ldots,\beta_{p}}(\overline{\partial}\overline{T})^{\bar{\alpha}_{1},\dots,\bar{\alpha}_{p}}_{\gamma_{1},\ldots,\gamma_{p}} \omega^{\beta_{1},\ldots,\beta_{p}}_{\bar{\alpha}_{1},\dots,\bar{\alpha}_{p}}~. \end{eqnarray} The determinants $(\mathcal{B}^{t})^{\gamma_{1},\ldots,\gamma_{p}}_{\beta_{1},\ldots,\beta_{p}}$ can be expanded, similarly to \eqref{expandB}, as \begin{align} (\mathcal{B}^{t})^{\gamma_{1},\ldots,\gamma_{p}}_{\beta_{1},\ldots,\beta_{p}} = \sum_t h_t(\xi) \mathsf{M}_t~, \end{align} where $\mathsf{M}_t$ are monomials in the local coordinates of $\mathbf{Y}$, and the coefficients $h_t(\xi)$ are rational functions of $\xi$. Thus, (\ref{xidepen}) is expressed as a sum \begin{eqnarray}\label{eq:xidepen2} \langle\mathcal{O}(\omega)\rangle_{S^{2}}= \sum_t h_t(\xi) \langle \mathsf{M}_t\mathcal{O}(\omega) \rangle_{S^2}^T~, \end{eqnarray} where each of the correlators $\langle \mathsf{M}_t\mathcal{O}(\omega) \rangle_{S^2}^T$ is computed with respect to $T$ and do not depend on the parameters $\xi$. We have arrived, at least formally, at an analogous situation as in the LG case above. We conclude by commenting where our argument fails to provide a rigorous proof of the conjectured transformation law. Despite the fact that \eqref{minorcorr} appears to be simply a rewriting of \eqref{eq:corrtranflaw1}, it implicitly assumes that the section $\mathcal{B}$ exists and that the map \eqref{eq:defhmetric} is invertible, but $\mathrm{det}(\mathcal{B})$ is in general a non-trivial function on $\mathbf{Y}$, hence it can vanish. Nevertheless, we believe that a rigorous proof should exist, and that the argument presented here is sufficiently close to it for our purposes. \section{Main example: the octic hybrid} \label{s:22example} In this section we apply the techniques developed above to a non-trivial example. Let us consider the hybrid model defined by the geometric data $\mathbf{Y}={{\text{tot}}}\left(\mathcal{O}(-2)\oplus\mathcal{O}^{\oplus3}\rightarrow {{\mathbb{P}}}^1\right)$ and ${{\mathbb{C}}}^\ast_V$-action with weights $q_i=\frac14$, $i=1,\dots,4$, acting on the fiber coordinates and fixing the ${{\mathbb{P}}}^1$ base. The orbifold action $\Gamma={{\mathbb{Z}}}_4$ introduces 3 additional twisted sectors, which will not be relevant for our analysis. The most general superpotential compatible with this structure is given by \begin{align} W = \sum_{t=0}^4 S_{[2i]}F_{[4-t]}(\phi^{a})(\phi^1)^t~, \end{align} where $S_{[p]}\in H^0({{\mathbb{P}}}^1, \mathcal{O}(p))$ and $F_{[q]}$ is a homogeneous polynomial of degree $q$ in the variables $\phi^a$, $a=2,3,4$. This model inherits its name from the geometric phase of the corresponding 2-parameter GLSM, which in the large radius phase describes an octic hypersurface in the toric resolution of ${{\mathbb{P}}}^{4}_{11222}$. Specifically, we choose a one-dimensional parameter subspace of the above superpotential \begin{align} \label{eq:22supoct} W&=\frac{1}{8}(x_1^8+x_2^8)(\phi^1)^4 + \frac{1}{4}(\phi^2)^4+\frac{1}{4}(\phi^3)^4+\frac{1}{4}(\phi^4)^4-\psi x_1x_2\phi^1\phi^2\phi^3\phi^4~, \end{align} where $[x_1:x_2]$ are homogeneous coordinates on $B={{\mathbb{P}}}^1$. Let $u=x_2/x_1$ and $v=x_1/x_2$ be local coordinates on the standard cover $U_1=\{x_1\neq0\}$ and $U_2=\{x_2\neq0\}$ respectively. Just in this section we slightly alter our notation to $\alpha=0,\dots,d-1=4$, so that the base index assumes the value $I=0$ and the fiber coordinates have indices $i=1,\dots,4$. Thus, in the $U_1$ patch we have the (0,2) superpotential\footnote{This terminology will become clear when we study (0,2) hybrids. Here $J^{u,v}_{i}:=\partial_{i}W|_{u,v}$ for the fiber coordinates, while $J^{u}_0=\partial_{u}W|_{u}$ and $J^{v}_0=\partial_{v}W|_{v}$ for the local base coordinates.} \begin{align} \label{eq:02supoctu} J_0^u&=u^7(\phi^1_u)^4-\psi \phi_u^1\phi_u^2\phi_u^3\phi_u^4~, &J_1^u&={{\frac12}}(u^8+1)(\phi_u^1)^3-\psi u \phi_u^2\phi_u^3\phi_u^4~,\nonumber\\ J_2^u&= (\phi_u^2)^3 - \psi u\phi_u^1\phi_u^3\phi_u^4~, &J_3^u&= (\phi_u^3)^3 - \psi u\phi_u^1\phi_u^2\phi_u^4~, &J_4^u&= (\phi_u^4)^3 - \psi u\phi_u^1\phi_u^2\phi_u^3~, \end{align} and similarly in the $U_2$ patch \begin{align} \label{eq:02supoctv} J_0^v&=v^7(\phi_v^1)^4-\psi \phi_v^1\phi_v^2\phi_v^3\phi_v^4~, &J_1^v&={{\frac12}}(v^8+1)(\phi_v^1)^3-\psi v \phi_v^2\phi_v^3\phi_v^4~,\nonumber\\ J_2^v&= (\phi_v^2)^3 - \psi v\phi_v^1\phi_v^3\phi_v^4~, &J_3^v&= (\phi_v^3)^3 - \psi v\phi_v^1\phi_v^2\phi_v^4~, &J_4^v&= (\phi_v^4)^3 - \psi v\phi_v^1\phi_v^2\phi_v^3~. \end{align} Here, $\phi^i_{u,v}=\phi^i|_{U_{1,2}}$ indicate the restrictions to the respective patches of the appropriate sections over the base, which transform according to \begin{align} \phi_u^1 &= v^2\phi_v^1~, &\phi_u^a = \phi_v^a~. \end{align} It is then easy to verify that \eqref{eq:02supoctu} and \eqref{eq:02supoctv} transform as a section of $T^\ast_{\mathbf{Y}}$. In particular, we can make use of the fact that the splitting of the geometry $\mathbf{Y}=\mathcal{O}^{\oplus3}\oplus\mathbf{Y}'$, where $\mathbf{Y}'={{\text{tot}}}\left( \mathcal{O}(-2)\rightarrow {{\mathbb{P}}}^1\right)$, induces a similar splitting of the cotangent bundle \begin{align} T^\ast_{\mathbf{Y}}=\mathcal{O}^{\oplus3}\oplus T^\ast_{\mathbf{Y}'}~, \end{align} that is, \begin{align} \begin{pmatrix} J_0^u \\ J^u_1 \end{pmatrix} &= \begin{pmatrix} -v^{2} & 2v \phi^{1}_v\\ 0 & v^{-2} \end{pmatrix} \begin{pmatrix} J_0^v \\ J_1^v \end{pmatrix}~, &J_a^u&=J_a^v~. \end{align} \subsection*{The chiral ring} The dimension of the chiral ring for the $\mathbb{Z}_4$ orbifold of this hybrid model has been computed in \cite{Bertolini:2013xga}. However, for our purposes, we need an explicit representation of the elements of the ring. In this section we will achieve this by following the prescription outlined in section \ref{s:chiralring}. Before we delve into the computation, we make a couple of observations which will simplify considerably our task. First, the GSO projection is onto integral charges, $\mathbf{q}\in{{\mathbb{Z}}}$, and unitarity bounds further restrict $0\leq \mathbf{q}\leq c/3=3$. Since we can compute the spectral sequence at fixed value of $\mathbf{q}$, we only need to analyze the cases $\mathbf{q}=0,1,2,3$. Second, it is well known that the dimension of the ring does not depend on the particular form of the superpotential as long as it does not lead to a singular model. In particular, such choice only affects the representatives of each cohomology class. Since, as we showed above, our formula is independent of representatives, we can compute the correlators for any non-singular $W$. The simplest choice is to set $\psi=0$ in \eqref{eq:02supoctu}. With this set-up, we are ready to describe the elements of the ring. At $\mathbf{q}=0$ the spectral sequence is trivial except at $H^0_{\mathbf{q}=0}(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})={{\mathbb{C}}}$. This operator has charges $(0,0)$ and therefore it can be interpreted as the identity element in the ring. At $\mathbf{q}=1$, the spectral sequence at the first stage is \begin{equation} \label{eq:statesoctq1} \begin{matrix}\vspace{5mm}\\E_1^{r,s} :\end{matrix} \begin{xy} \xymatrix@C=10mm@R=5mm{ {{\mathbb{C}}}^3 &0\\ {{\mathbb{C}}}^{22} \ar[r]^-{\overline{\bQ}_W} &{{\mathbb{C}}}^{105} } \save="x"!LD+<-6mm,0pt>;"x"!RD+<20pt,0pt>**\dir{-}?>*\dir{>}\restore \save="x"!LD+<28mm,-3mm>;"x"!LU+<28mm,2mm>**\dir{-}?>*\dir{>}\restore \save!RD+<-7mm,-3mm>*{0}\restore \save!RD+<-25mm,-3mm>*{1}\restore \save!RD+<03mm,-3mm>*{r}\restore \save!CL+<30mm,10mm>*{s}\restore \end{xy} \end{equation} To show how we obtained this, let us look first at the bottom row ($s=0$). A generic section of $H^0_{\mathbf{q}=1}(\mathbf{Y},T_{\mathbf{Y}})$ is parametrized by the operators \begin{align} &\begin{pmatrix} T_u \overline{\chi}_0 & Y_u\phi^1 \overline{\chi}_1 \end{pmatrix}~, &&c_{ab}\phi^b\overline{\chi}_a~, &&S^a_{[2]}\phi^1\overline{\chi}_a~, \end{align} where in the patch $U_1$ we have (see appendix \ref{app:sectbundles}) \begin{align} T_u&=a_0+a_1u+a_2u^2~, &Y_u&=(b_0-2a_1) -2a_2u ~, &S_{[2]}&=d_0+d_1u+d_2u^2~, \end{align} and $c_{ab}\in{{\mathbb{C}}}$. Counting the number of parameters \begin{align} \#a + \#b + \#c + \#d = 3+1+9+3\cdot3=22~, \end{align} leads to the value in \eqref{eq:statesoctq1}. Sections of $H^0_{\mathbf{q}=1}(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})$ are simply \begin{align} S_{[2t]}F_{[4-t]}(\phi^a)(\phi^1)^t~, \qquad\quad t=0,\dots,4~, \end{align} where $S_{[2t]}\in H^0(B,\mathcal{O}(2t))$ and $F_{[d]}(\phi^a)$ is a generic polynomial of degree $d$ in $\phi^a$. It is easy to count those, as \begin{align} \sum_{t=0}^4 (2t+1) \binom{6-t}{4-t} = 105~. \end{align} The first row ($s=1$) is much simpler, and the only non-vanishing $\overline{\partial}$-closed polyvectors $PV^{r,1}(\mathbf{Y})$ have the form \begin{align} \label{eq:firstrowq1} S_{[-2],\overline0}^a \phi^a\overline{\chi}_1\overline{\eta}^{\overline0}~, \end{align} where \begin{align} S_{[-2],\overline0}^a\in H^1_{\mathbf{q}=0}(\mathbf{Y},\pi^\ast\mathcal{O}(-2))=H^1(B,\mathcal{O}(-2))={{\mathbb{C}}}~, \end{align} which therefore yield three elements in $\overline{\partial}$-cohomology at $r=s=1$. To compute the second stage of the spectral sequence, for the bottom row we can write explicitly the action of $\overline{\bQ}_W$ on the states \eqref{eq:statesoctq1} as \begin{align} \label{eq:actionQWq1} \overline{\bQ}_W \begin{pmatrix} T_u \overline{\chi}_0 & Y_u\phi^1 \overline{\chi}_1 \end{pmatrix}&= \begin{pmatrix} T_u & Y_u\phi^1 \end{pmatrix} \begin{pmatrix} J_0 \\ J_1 \end{pmatrix} = {{\frac12}} \left[ (b_0-2a_1)-2a_2u +2a_0 u^7 +b_0 u^8 \right] (\phi^1)^4~, \nonumber\\ \overline{\bQ}_W(c_{ab}\phi^b+S_{[2]}\phi^1)\overline{\chi}_a &=(c_{ab}\phi^b+S_{[2]}\phi^1)J_a = (c_{ab}\phi^b+S_{[2]}\phi^1) (\phi^a)^3 ~. \end{align} While it is easy to verify that this map has a trivial kernel, we would like to have explicit representatives of its cokernel. As mentioned above, these will be good representatives for the cohomology classes even after we turn on the $\psi$ deformation. First, the operators \begin{align} \label{eq:cokerbot} S_{[2t_1]}(\phi^1)^{t_1}(\phi^2)^{t_2}(\phi^3)^{t_3}(\phi^4)^{t_4}~, \qquad t_1\leq3,\ t_{2,3,4}\leq2~, \end{align} are clearly not in the image of \eqref{eq:actionQWq1}. Since $t_1+t_2+t_3+t_4=4$, we count 78 of them. When $t_1=4$, a little more carefulness is required, and the cokernel of the first map in \eqref{eq:actionQWq1} can be parametrized by the operators \begin{align} u^t (\phi^1)^4~, \qquad 2\leq t\leq 6~, \end{align} accounting for additional 5 operators, which give rise to the second stage of the spectral sequence \begin{equation} \label{eq:E2q122oct} \begin{matrix}\vspace{5mm}\\E_2^{r,s} :\end{matrix} \begin{xy} \xymatrix@C=10mm@R=5mm{ {{\mathbb{C}}}^3 &0\\ 0 &{{\mathbb{C}}}^{83} } \save="x"!LD+<-6mm,0pt>;"x"!RD+<20pt,0pt>**\dir{-}?>*\dir{>}\restore \save="x"!LD+<28mm,-3mm>;"x"!LU+<28mm,2mm>**\dir{-}?>*\dir{>}\restore \save!RD+<-5mm,-3mm>*{0}\restore \save!RD+<-21mm,-3mm>*{1}\restore \save!RD+<7mm,-3mm>*{r}\restore \save!CL+<30mm,10mm>*{s}\restore \end{xy} \end{equation} However, we are not quite done yet, as the first row operators \eqref{eq:firstrowq1} are manifestly not $\overline{\bQ}_W$-closed. This can be fixed by requiring \begin{align} \label{eq:firstrowq1clos} \overline{\bQ}\left(S^a_{[-2]\overline0} \phi^a \overline{\chi}_1 \overline{\eta}^{\overline0} + R^a \phi^a J_1 \right)=S^a_{[-2]\overline0} \phi^a J_1 \overline{\eta}^{\overline0} + \overline{\partial}_{\overline{u}} R^a \phi^a J_1\overline{\eta}^{\overline0}=0~, \end{align} which has solution when $R^a\in \Gamma(\mathcal{O}_{\mathbf{Y}})$ such that $\overline{\partial}_{\overline{u}} R^a= -S^a_{[-2]\overline0}$. Explicitly, the representatives for the cohomology classes corresponding to the $PV^{1,1}$ operators \eqref{eq:firstrowq1} are given by \begin{align} \label{eq:firstrowins1} - {1 \over (1+u \overline{u})^2} \phi^a \overline{\chi}_1 \overline{\eta}^{\overline0} -{{\frac12}} {u^7-\overline{u} \over 1+u\overline{u}}(\phi^1)^3\phi^a~, \qquad a=2,3,4~. \end{align} The states \eqref{eq:E2q122oct} have a geometrical interpretation when the ${{\mathbb{Z}}}_4$-orbifold of the hybrid theory is employed for heterotic or type II compactifications.\footnote{From a spacetime point of view, these consist of the internal part of the vertex operators associated to the emission of a scalar field in the $\mathbf{10}_{1}$ component of the $\overline{\mathbf{27}}$ of $\text{E}_6$.} These 86 states correspond to complex structure deformations of the K3-fibered CY manifold obtained by blowing up the $c=\overline{c}=6$ LG fiber. The 83 states from the bottom row correspond to polynomial deformations, that is, deformations of the equation defining the hypersurface. The 3 extra states \eqref{eq:firstrowins1} correspond to non-polynomial complex structure deformations \cite{Aspinwall:2010ve,Baumgartl:2012uh}, that is, deformations that are not related to parameters in the action \eqref{eq:compaction}. This fact makes them hard to study with GLSM techniques, as one lacks the UV description for those, or with LG techniques, where these parameters appear in twisted sectors. In our hybrid model, while technically slightly more challenging due to the $PV^{1,1}$ component, they appear essentially at the same footing as the polynomial deformations, and we are able to compute correlators in the ring including these operators. For the operators at $\mathbf{q}=2$ we have at the first stage \begin{equation} \begin{matrix}\vspace{5mm}\\E_1^{r,s} :\end{matrix} \begin{xy} \xymatrix@C=10mm@R=5mm{ {{\mathbb{C}}}^{18} \ar[r]^-{\overline{\bQ}_W} &{{\mathbb{C}}}^3 &0\\ {{\mathbb{C}}}^{126} \ar[r]^-{\overline{\bQ}_W} &{{\mathbb{C}}}^{868} \ar[r]^-{\overline{\bQ}_W} &{{\mathbb{C}}}^{825} } \save="x"!LD+<-6mm,0pt>;"x"!RD+<20pt,0pt>**\dir{-}?>*\dir{>}\restore \save="x"!LD+<28mm,-3mm>;"x"!LU+<28mm,2mm>**\dir{-}?>*\dir{>}\restore \save!RD+<-46mm,-3mm>*{2}\restore \save!RD+<-26mm,-3mm>*{1}\restore \save!RD+<-6mm,-3mm>*{0}\restore \save!RD+<03mm,-3mm>*{r}\restore \save!CL+<30mm,10mm>*{s}\restore \end{xy} \end{equation} The second stage of this spectral sequence has been computed in \cite{Bertolini:2013xga} and we simply report it here \begin{equation} \begin{matrix}\vspace{5mm}\\E_2^{r,s} :\end{matrix} \begin{xy} \xymatrix@C=10mm@R=5mm{ {{\mathbb{C}}}^3 &0\\ 0 &{{\mathbb{C}}}^{83} } \save="x"!LD+<-6mm,0pt>;"x"!RD+<20pt,0pt>**\dir{-}?>*\dir{>}\restore \save="x"!LD+<28mm,-3mm>;"x"!LU+<28mm,2mm>**\dir{-}?>*\dir{>}\restore \save!RD+<-21mm,-3mm>*{1}\restore \save!RD+<-5mm,-3mm>*{0}\restore \save!RD+<5mm,-3mm>*{r}\restore \save!CL+<30mm,10mm>*{s}\restore \end{xy} \end{equation} which agrees as expected with \eqref{eq:E2q122oct}. Let us list the explicit representatives. The bottom row consists again of states of the form \eqref{eq:cokerbot}, where now instead $t_1+t_2+t_3+t_4=8$, yielding $26$ states. The missing elements can be identified as the cokernel of the map \begin{align} \overline{\bQ}_W \begin{pmatrix} T_u \phi^t \overline{\chi}_0 & Y_u\phi^{t+1} \overline{\chi}_1 \end{pmatrix}F_{[4-t]}(\phi^a)&= {{\frac12}} \left[ (b_0-2a_1)+\cdots+(b_1-2a_{2t+1})u^{2t}-2a_{2t+2}u^{2t+1} \right.\nonumber\\ &\quad \ \left.+2a_0 u^7 +b_0 u^8+\cdots+b_{2t}u^{8+2t} \right] (\phi^1)^{4+t}F_{[4-t]}(\phi^a)~, \end{align} for $t=0,\dots,4$, where $F_{[4-t]}$ has degree $4-t$ in the $\phi^a$ coordinates and is subject to the condition that each variable is allowed to appear to a power not greater than 2. Explicitly, \begin{align} \xymatrix@R=0mm@C=10mm{ t &\text{operator} & &\#\\ 0 &u^{\tilde t} (\phi^1)^4F_{[4]}(\phi^a)~, &2\leq {\tilde t}\leq 6~, &30\\ 1 &u^{\tilde t} (\phi^1)^5F_{[3]}(\phi^a)~, & 4\leq {\tilde t}\leq 6~, &21\\ 2 &u^{\tilde t} (\phi^1)^6F_{[2]}(\phi^a)~, &{\tilde t}=6~, &6 } \end{align} while there are no states for $t=3,4$. In total, we produced 83 operators, as expected. The 3 operators from the first row can be written as \begin{align} \label{eq:firstrowins2} - {1 \over (1+u \overline{u})^2} (\phi^a)^2(\phi^b)^2\phi^c \overline{\chi}_1 \overline{\eta}^{\overline0} -{{\frac12}} {u^7-\overline{u} \over 1+u\overline{u}}(\phi^1)^3(\phi^a)^2(\phi^b)^2\phi^c~,\qquad\quad a\neq b\neq c = 2,3,4~. \end{align} Finally, at $\mathbf{q}=3$ we only find one operator in cohomology, which corresponds to $\det {{\text{Hess}}} W$, and has the expression \begin{align} \label{eq:detHessW} \det {{\text{Hess}}} W = u^6 (\phi^1)^6(\phi^2)^2(\phi^3)^2(\phi^4)^2~. \end{align} The cohomology is empty for $\mathbf{q}>3$, as expected from unitarity bounds, thus this concludes our discussion of the (untwisted) (c,c) ring. \subsection{Correlators} In this section we will completely solve the example by evaluating the map \eqref{eq:formula}. As we have seen above, we can qualitatively distinguish between two types of elements in the (c,c) ring, that is {\it bottom row} and {\it first row operators}.\footnote{We saw in \eqref{eq:firstrowins1} and \eqref{eq:firstrowins2} that elements involving $PV^{1,1}(\mathbf{Y})$ operators are accompanied by appropriate $PV^{0,0}(\mathbf{Y})$ tails. The term {\it first row} operators refers to the full cohomology classes given by the combination of both operators.} It turns out that it is technically easier to distinguish correlators by the numbers of ``first row insertions". As discussed in section \ref{ss:transflaw}, we are going to evaluate the map \eqref{eq:formula} by implementing the proposed hybrid transformation law. The key ingredient for achieving this is a section $\mathcal{B}\in\Gamma(T_{\mathbf{Y}}\otimes T^\ast_{\mathbf{Y}})$ such that \begin{align} \label{eq:transflawrem} \mathcal{B}_\alpha{}^\beta J_\beta = T_{\alpha} \in \Gamma(T^\ast_{\mathbf{Y}})~, \end{align} such that $T$ is independent of the parameter $\psi$ and $T^{-1}(0)=B$, that is, $T$ satisfies the potential condition as well. An appropriate such section is given by \begin{align} \label{eq:Texplexpr} T=\begin{pmatrix} u^{25}\phi_1^{13} & {{\frac12}}(u^{26}+1)\phi_1^{12} & \phi_2^{13} & \phi_3^{13} & \phi_4^{13} \end{pmatrix}^{\top}~. \end{align} The expression of the section $\mathcal{B}$ such that \eqref{eq:transflawrem} holds is rather bulky and unilluminating, thus we relegate it to appendix \ref{app:transflawoct}. \subsubsection{Bottom row correlators} Let $\alpha=\mathcal{O}_1\mathcal{O}_2\mathcal{O}_3\in \Gamma(\mathcal{O}_{\mathbf{Y}})$, where $\mathcal{O}_{1,2,3}$ are (c,c) elements of the bottom row type such that $\mathbf{q}(\mathcal{O}_1)+\mathbf{q}(\mathcal{O}_2)+\mathbf{q}(\mathcal{O}_3)=3$. According to the discussion regarding the B ring for this example, $\alpha$ will be of the general form \begin{align} \label{eq:geninsertion} \alpha = u^{t_0} (\phi^1)^{t_1} (\phi^2)^{t_2} (\phi^3)^{t_3} (\phi^4)^{t_4} ~, \qquad\qquad t_\alpha\geq0~, \end{align} such that $t_1+\cdots+t_4=12$ and $t_0\leq 2t_1$. From \eqref{eq:Texplexpr} we compute \begin{align} \label{eq:octicpbTb} \det \overline{\partial} \overline{T}= -2028 (19 \overline{u}^{26}-150)\overline{u}^{24}(\overline{\phi}^1)^{24}(\overline{\phi}^2)^{12}(\overline{\phi}^3)^{12}(\overline{\phi}^4)^{12}~. \end{align} Thus, the correlators now read \begin{align} \label{eq:correlatorbottrow} \langle \alpha \rangle_{S^2} &= \int \Omega_{\mathbf{Y}}\wedge \overline{\Omega}_{\mathbf{Y}} \exp^{-\mathbf{v}/4 ||T||^{2}} \alpha \det \mathcal{B} \det (\overline{\partial} \overline{T})~, \end{align} where $||T||^2 =T_\alpha \delta^{\alpha\overline{\beta}}\overline{T}_{\overline{\beta}}=T_\alpha \overline{T}^{\alpha}$, that is, we used the independence of the correlators from the metric to set $h_{\alpha\overline{\beta}}=\delta_{\alpha\overline{\beta}}$. Solving this type of integrals exactly proves to be a daunting challenge, which we are not able to fully overcome. It is possible, however, to perform the integral over the various phases $\arg(x^\alpha)$. This will turn out to be enough to determine the entire dependence of the correlators on the parameter $\psi$, up to an unknown constant. While this is easily done for the fiber coordinates, we have to be careful in considering the exponential factor, as it is not phase invariant with respect to the base coordinate $\arg(u)$. Let us consider the argument of the exponential \begin{align} T_\alpha \overline{T}^\alpha =|u|^{50}|\phi^1|^{26}+\frac14 (|u|^{52}+u^{26}+\overline{u}^{26}+1)|\phi^1|^{24}+ |\phi^2|^{26}+|\phi^3|^{26}+|\phi^4|^{26}~. \end{align} We note that the only term which is not phase invariant is $\frac14 (\overline{u}^{26}+u^{26})|\phi_1|^{24}$. Now, using the fact that \eqref{eq:correlatorbottrow} is independent of $\mathbf{v}$, we can take the limit $\mathbf{v}\rightarrow0$ and consider the expansion \begin{align} e^{-\mathbf{v} \overline{T}^\alpha T_\alpha} = \sum_{n=0}^\infty \frac{(-\mathbf{v})^n}{n!} (\overline{T}^I T_I)^n= \sum_{n=0}^\infty F_n(|\phi|,|u|) (\overline{u}^{26}+u^{26})^n = \sum_{n=0}^\infty G_n(|\phi|,|u|) (\overline{u}^{26n}+u^{26n})~, \end{align} where $F_n,G_n$ only depend on the magnitudes $|x^\alpha|$ of the coordinates. By incorporating the full $\overline{u}$ dependence in \eqref{eq:correlatorbottrow} we obtain the expansion \begin{align} \label{eq:antiholmdepub} e^{-\mathbf{v} \overline{T}^\alpha T_\alpha} \left(\overline{u}^{26}-\frac{150}{19}\right)\overline{u}^{24} = \sum_{n=0}^\infty \left( H_n(|\phi|,|u|) \overline{u}^{26n+24} +L_n(|\phi|,|u|)u^{26n-50}\right)~, \end{align} for appropriate functions $H_n,L_n$. The expansion \begin{align} \det\mathcal{B} = \sum_{m_0,\dots,m_4\geq0} f_{m_0,\dots,m_4}(\psi) u^{m_0} (\phi^1)^{m_1} (\phi^2)^{m_2}(\phi^3)^{m_3}(\phi^4)^{m_4} \end{align} can be constructed explicitly from the expression of $\mathcal{B}$ in appendix \ref{app:transflawoct}. Considering the contribution from \eqref{eq:geninsertion} and integrating over $\arg(\phi^i)$ we obtain that the relevant contribution to the correlator is \begin{align} \alpha \det \mathcal{B} = \sum_{m_0,\dots,m_4\geq0} f_{m_0,\dots,m_4}(\psi) u^{m_0+t_0} (\phi^1)^{24}\left( \prod_{a=2}^4 (\phi^a)^{12}\right) \delta_{m_1+t_1,24}\left(\prod_{a=2}^4 \delta_{m_a+t_a,12}\right)~, \end{align} where one can check explicitly that $m_0+t_0\leq48$. A look at \eqref{eq:antiholmdepub} shows that the the integration with respect to $\arg(u)$ selects $m_0+t_0=24$. Therefore we have determined that \begin{align} \label{eq:alphares} \langle \alpha \rangle_{S^2} = f_{24-t_0,24-t_1,12-t_2,12-t_3,12-t_4}(\psi)~. \end{align} In particular, all such functions assume the form \begin{align} \langle \alpha \rangle_{S^2} &= \frac{\psi^{v_\alpha}}{1-\psi^8}~, &0\leq&v_\alpha \leq 8~, \end{align} where $v_\alpha$ is a non-negative integer that depends on the insertion $\alpha$. The correlators diverge when $\psi^8=1$, which corresponds to a singularity in the conformal field theory. This singularity appears in the hybrid theory as the potential condition $dW^{-1}(0)=B$ does not hold for this choice of parameters. As an example, we can consider the element of charge (3,3) in \eqref{eq:detHessW}, which can be interpreted as a three-point function as, for example, $\alpha = \left(u^2 (\phi^1)^2(\phi^2)^2\right)\left(u^2 (\phi^1)^2(\phi^3)^2\right)\left(u^2 (\phi^1)^2(\phi^4)^2\right)$, which gives \begin{align} \label{eq:dethess22} \langle \det {{\text{Hess}}} W \rangle_{S^{2}} = \frac{1}{1-\psi^8}~. \end{align} As expected, this is the only possibility for a non-zero correlator in the undeformed theory at $\psi=0$. \subsubsection{First row correlators} Next, we tackle the case where $\alpha=\mathcal{O}_1\mathcal{O}_2\mathcal{O}_3$, and at least one of the insertions arises from the first-row of the spectral sequence. In particular, by inspecting the elements of the (c,c) ring computed above, it follows that $\alpha = \alpha_1 \overline{\chi}_1 \overline{\eta}^{\overline0} + \alpha_0$, where $\alpha_0,\alpha_1\in PV^{0,0}(\mathbf{Y})$. Thus, the correlator $\langle\alpha \rangle_{S^2}$ splits as a sum of two integrals which we can compute separately. Although $\alpha_0 \notin H^0(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})$, its contribution to the correlator can be nonetheless computed by the methods of the previous section. Thus, the main novelty here is the $\alpha_1$ contribution. The correlator $\langle \alpha_1\overline{\chi}_1 \overline{\eta}^{\overline0} \rangle$ is determined in terms of the object $\mathcal{M}^{\overline0}_1$, which we recall is the determinant of the minor of the matrix $\mathcal{M}=\overline{\partial} \overline{J}$ obtained by removing the column corresponding to the index $\overline{\alpha}=\overline0$ (from the $\overline{\eta}^{\overline0}$ insertion) and the row corresponding to the index $\beta=1$ (from the $\overline{\chi}_1$ insertion). Then, in this case \eqref{eq:Mminasdets} reads \begin{align} \mathcal{M}_1^{\overline0}= \sum_{k=0}^4 \det_{0,k}(\overline{\partial} \overline{T}) \det_{k,1} \mathcal{B}~, \end{align} where $\det_{i,j}$ indicates the determinant of the minor obtained by removing the $i$-th row and the $j$-th column. In particular, from \eqref{eq:octicpbTb} we have that $\det_{0,k}(\overline{\partial} \overline{T})=0$ for $k=2,3,4$. Thus, the sum above reduces to just two terms, corresponding to \begin{align} \det_{0,0}(\overline{\partial} \overline{T}) &=13182 (\overline{u}^{26}+1)(\overline{\phi}^1)^{11} (\overline{\phi}^2)^{12}(\overline{\phi}^3)^{12}(\overline{\phi}^4)^{12}~,\nonumber\\ \det_{0,1}(\overline{\partial} \overline{T}) &=28561 \overline{u}^{25} (\overline{\phi}^1)^{12} (\overline{\phi}^2)^{12}(\overline{\phi}^3)^{12}(\overline{\phi}^4)^{12}~. \end{align} That is, putting all together the full correlator reads \begin{align} \label{eq:corrformH1} \langle \alpha \rangle_{S^2} &=\int \Omega_{\mathbf{Y}}\wedge \overline{\Omega}_{\mathbf{Y}} \exp^{-\mathbf{v}/4 ||T||^{2}} \alpha_1\left[ \det_{0,1} \mathcal{B} \det_{0,0} (\overline{\partial} \overline{T}) + \det_{1,1} \mathcal{B} \det_{0,1} (\overline{\partial} \overline{T})\right] \nonumber\\ &\quad+\int \Omega_{\mathbf{Y}}\wedge \overline{\Omega}_{\mathbf{Y}} \exp^{-\mathbf{v}/4 ||T||^{2}} \alpha_0 \det \mathcal{B} \det (\overline{\partial} \overline{T})~. \end{align} First, suppose there is only one first-row insertion, that is, say, $\mathcal{O}_1$ is of the form \eqref{eq:firstrowins1} or \eqref{eq:firstrowins2}, while $\mathcal{O}_{2,3}\in H^0_{\overline{\bQ}}(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})$ are bottom row insertions, again satisfying the charge condition $\mathbf{q}(\mathcal{O}_1)+\mathbf{q}(\mathcal{O}_2)+\mathbf{q}(\mathcal{O}_3)=3$. The general expressions for $\alpha_{0,1}$ are \begin{align} \label{eq:alpha01exprs} \alpha_0&= {u^7-\overline{u} \over 1+ u\overline{u}} u^{t_0} (\phi^1)^{t_1+3} \prod_{a=2}^4 (\phi^a)^{t_a} ~, \nonumber\\ \alpha_1&= {1 \over (1+ u\overline{u})^2}u^{t_0} (\phi^1)^{t_1} \prod_{a=2}^4 (\phi^a)^{t_a} ~, \end{align} such that \begin{align} t_\alpha&\geq0~, &t_0&\leq 2t_1\leq 16~, &t_1+t_2+t_3+t_4&=9~. \end{align} The relevant contribution to $\langle \alpha_0 \rangle_{S^2}$, determined again by integrating over the phases $\arg(\phi^i)$, is now given by \begin{align} \alpha_0 \det \mathcal{B} = \sum_{m_0+t_0\geq-1}^{49} \sum_{m_1,\dots,m_4} f_{m_0,\dots,m_4}(\psi) \frac{u^{m_0+t_0}}{1+u\overline{u}} (\phi^1)^{24} \left(\prod_{a=2}^4 (\phi^a)^{12}\right) \delta_{m_1+t_1,21}\left(\prod_{a=2}^4 \delta_{m_a+t_a,12}\right)~, \end{align} which, combined with \eqref{eq:antiholmdepub} and integrating over $\arg(u)$, yields \begin{align} \label{eq:alpha0res} \langle \alpha_0 \rangle_{S^2} = f_{24-t_0,21-t_1,12-t_2,12-t_3,12-t_4}(\psi)~. \end{align} For the $\langle \alpha_1 \rangle$ correlator, we need the $\overline{u}$ dependence of the expansions \begin{align} e^{-\mathbf{v} \overline{T}^\alpha T_\alpha} \det_{0,0} \overline{\partial} \overline{T} &= \sum_{n=-\infty}^\infty \widetilde{H}_n(|\phi|,|u|) \overline{u}^{26n}~,\nonumber\\ e^{-\mathbf{v} \overline{T}^\alpha T_\alpha} \det_{0,1} \overline{\partial} \overline{T} &= \sum_{n=0}^\infty \left(\widetilde{F}_n(|\phi|,|u|) \overline{u}^{26n+25} +\widetilde{L}_n (|\phi|,|u|) u^{26n-25}\right)~, \end{align} for some appropriate phase-invariant functions $\widetilde{H}_n,\widetilde{F}_n,\widetilde{L}_n$. Similarly, we represent the relevant determinants as \begin{align} \det_{0,1}\mathcal{B} = \sum_{m_0,\dots,m_4\geq0} g_{m_0,\dots,m_4}(\psi) u^{m_0} (\phi^1)^{m_1} (\phi^2)^{m_2}(\phi^3)^{m_3}(\phi^4)^{m_4}~,\nonumber\\ \det_{1,1}\mathcal{B} = \sum_{m_0,\dots,m_4\geq0} h_{m_0,\dots,m_4}(\psi) u^{m_0} (\phi^1)^{m_1} (\phi^2)^{m_2}(\phi^3)^{m_3}(\phi^4)^{m_4}~. \end{align} Now, after integrating over the fiber $\arg(\phi^i)$, we are left with \begin{align} \alpha_1 \det_{0,1} \mathcal{B} &= \sum_{m_0+t_0=0}^{38} \sum_{m_1,\dots,m_4} g_{m_0,\dots,m_4}(\psi) u^{m_0+t_0} (\phi^1)^{11} (\phi^2)^{12}(\phi^3)^{12}(\phi^4)^{12} \delta_{m_1+t_1,11}\prod_{a=2}^4 \delta_{m_a+t_a,12}~, \nonumber\\ \alpha_1 \det_{1,1} \mathcal{B} &= \sum_{m_0+t_0=0}^{37} \sum_{m_1,\dots,m_4} h_{m_0,\dots,m_4}(\psi)u^{m_0+t_0} (\phi^1)^{12} (\phi^2)^{12}(\phi^3)^{12}(\phi^4)^{12} \prod_{i=1}^4 \delta_{m_i+t_i,12}~. \end{align} Thus, we obtain a contribution from three terms, which reads \begin{align} \label{eq:alpha1res} \langle \alpha_1 \rangle_{S^2} &= I_1 g_{0,11-t_1,12-t_2,12-t_3,12-t_4}(\psi)+I_2 g_{26-t_0,11-t_1,12-t_2,12-t_3,12-t_4}(\psi) \nonumber\\ &\quad +I_3 h_{25-t_0,12-t_1,12-t_2,12-t_3,12-t_4}(\psi)~, \end{align} where the coefficients $I_{1,2,3}$ are represented by integrals over the magnitudes $|x^\alpha|$. We see the difficulty with this expression, compared with \eqref{eq:alphares} and \eqref{eq:alpha0res}, where the unknown integral can be reabsorbed into a multiplicative constant. In this case instead it appears that we cannot determine in principle the relative coefficients between the various contribution, and thus we cannot determine the full dependence on the parameter $\psi$. However, it turns out by inspection that all the three contributions to \eqref{eq:alpha1res} vanish separately, thus $\langle \alpha_1 \rangle_{S^2}=0$. Finally, we conclude that for one first-row insertion \begin{align} \langle \alpha \rangle_{S^2} = \langle \alpha_0 \rangle_{S^2}~. \end{align} It follows that we can choose a basis $A=\mathcal{O}_1+\mathcal{O}_1^{(0)}$, where\footnote{This notation emphasizes that $\mathcal{O}_1$ has both a $PV^{1,1}(\mathbf{Y})$ and a $PV^{0,0}(\mathbf{Y})$ component. Moreover, the spectral sequence degenerates at the second stage, therefore $H^1_{\overline{\bQ}}(\mathbf{Y},\bullet)=H^\infty_{\overline{\bQ}}(\mathbf{Y},\bullet)$.} $\mathcal{O}_1\in H^1_{\overline{\bQ}}(\mathbf{Y},T_{\mathbf{Y}}\oplus\mathcal{O}_{\mathbf{Y}})$, $\mathcal{O}_1^{(0)}\in H^1_{\overline{\bQ}}(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})$ and $\mathbf{q}(\mathcal{O}_1)=\mathbf{q}(\mathcal{O}_1^{(0)})$, such that \begin{align} \label{eq:firstrowredef} \langle A \mathcal{O}_2\mathcal{O}_3 \rangle_{S^{2}} = 0~, \qquad\qquad \forall \mathcal{O}_{2,3}\in H^0_{\overline{\bQ}}(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})~. \end{align} Explicitly, let \begin{align} \label{eq:Fsfirstrow} F^{(1)}_a&=\phi^a~, &F^{(2)}_a&=\phi^a(\phi^b)^2(\phi^c)^2~, \quad a\neq b\neq c~. \end{align} Then, there exists a unique $h\in{{\mathbb{C}}}$ such that \begin{align} \label{eq:firstrowelms} A^{(\mathbf{q})}_a &= - {1 \over (1+u \overline{u})^2} F^{(\mathbf{q})}_{a} \overline{\chi}_1 \overline{\eta}^{\overline0} -{{\frac12}} {u^7-\overline{u} \over 1+u\overline{u}}(\phi^1)^3F^{(\mathbf{q})}_{a} +\psi h F^{(\mathbf{q})}_{a} \phi^2\phi^3\phi^4 \end{align} satisfy \eqref{eq:firstrowredef}. This simply follows from the fact that the following holds \begin{align} f_{24-t_0,21-t_1,12-t_2,12-t_3,12-t_4}(\psi)=\psi f_{24-t_0,24-t_1,11-t_2,11-t_3,11-t_4}(\psi)~. \end{align} Next, we turn to the case of two first row insertions of the form \eqref{eq:firstrowelms}, and one insertion from the bottom row $\mathcal{O}_3\in H^0_{\overline{\bQ}}(\mathbf{Y},\mathcal{O}_{\mathbf{Y}})$, that is, we study the correlators \begin{align} \langle A^{(\mathbf{q}_1)}_a A^{(\mathbf{q}_2)}_b \mathcal{O}_3 \rangle_{S^2} = \langle F^{(\mathbf{q}_1)}_a F^{(\mathbf{q}_2)}_b \mathcal{A}^2 \mathcal{O}_3 \rangle_{S^2} ~, \end{align} where we defined $\mathcal{A}$ by $F_a^{(\mathbf{q})}\mathcal{A} = A^{(\mathbf{q})}_a$. The argument above can be repeated almost identically in this case, the only difference being in the expressions \eqref{eq:alpha01exprs}. Let us write $\mathcal{A} = \mathcal{A}_{1}\overline{\chi}\overline{\eta} + \mathcal{A}_{0} + \psi \mathcal{C}$, then the components of the insertions are given by \begin{align} \alpha_1&= 2F^{(\mathbf{q}_1)}_a F^{(\mathbf{q}_2)}_b\mathcal{O}_3 \mathcal{A}_1(\mathcal{A}_0+\psi\mathcal{C})~, &\alpha_0&=F^{(\mathbf{q}_1)}_a F^{(\mathbf{q}_2)}_b\mathcal{O}_3(\mathcal{A}_0+\psi\mathcal{C})^2~. \end{align} The result is that there are only a few non-vanishing correlators, thus we can present the full list\footnote{Here we denote by $F_1F_2\mathcal{O}_3$ the scalar product $F^{(\mathbf{q}_1)}_a F^{(\mathbf{q}_2)}_b\mathcal{O}_3$ without specifying $a,b$ or $\mathbf{q}$. This completely determines the value of the correlator $\langle A^{(\mathbf{q}_1)}_a A^{(\mathbf{q}_2)}_b \mathcal{O}_3 \rangle_{S^2}$, but it is up to the reader to extract it from (\ref{eq:frfrcorrhyb}). For example, $F_{1}F_{2}\mathcal{O}_3=(\phi^2\phi^3\phi^4)^2$ determines the correlator $\langle A^{(1)}_a, A^{(2)}_a, 1 \rangle_{S^2}$ for any $a=2,3,4$.} \begin{align} \label{eq:frfrcorrhyb} \xymatrix@R=0mm@C=15mm{ F_1F_2\mathcal{O}_3 & \langle A_1A_2\mathcal{O}_3\rangle_{S^2}\\ (\phi^2\phi^3\phi^4)^2 &\frac1{1-\psi^8}+I_0'\frac{\psi^8}{1-\psi^8}\\ u^2(\phi^1)^2(\phi^2)^4 &\frac{\psi^6}{1-\psi^8}\\ u^2(\phi^1)^2(\phi^3)^4 &\frac{\psi^6}{1-\psi^8}\\ u^2(\phi^1)^2(\phi^4)^4 &\frac{\psi^6}{1-\psi^8}\\ u^3(\phi^1)^3\phi^2\phi^3\phi^4 &\frac{\psi^4}{1-\psi^8} } \end{align} We notice that for the first correlator we were not able to determine the relative coefficient $I_0'$ between the two contributions. The last case to consider is for three first-row insertions. Here we find that all the operators must have $\mathbf{q}=1$, which we can write \begin{align} \langle A^{(1)}_aA^{(1)}_bA^{(1)}_c \rangle_{S^{2}} = \langle \phi^a\phi^b\phi^c \mathcal{A}^3\rangle_{S^{2}}~. \end{align} We can simplify the computation by expanding \begin{align} \mathcal{A}^3 = (\mathcal{A}_{1}\overline{\chi}\eta + \mathcal{A}_0)^3 + 3\psi (\mathcal{A}_{1}\overline{\chi}\eta+\mathcal{A}_0)^2 \mathcal{C}+3\psi^2 (\mathcal{A}_{1}\overline{\chi}\eta+\mathcal{A}_0) \mathcal{C}^2 + \psi^3 \mathcal{C}^3~, \end{align} and compute the contribution from each term separately. Using \eqref{eq:firstrowredef} we have \begin{align} \langle \phi^a\phi^b\phi^c(\mathcal{A}_{1}\overline{\chi}\eta+\mathcal{A}_0) \mathcal{C}^2 \rangle_{S^2} &= -\psi \langle\phi^a\phi^b\phi^c \mathcal{C}^3 \rangle_{S^2}~, \nonumber\\ \langle\phi^a\phi^b\phi^c (\mathcal{A}_{1}\overline{\chi}\eta+\mathcal{A}_0)^2 \mathcal{C} \rangle_{S^2} &=\langle\phi^a\phi^b\phi^c \mathcal{A}^2 \mathcal{C} \rangle_{S^2} -\psi^2\langle\phi^a\phi^b\phi^c \mathcal{C}^3 \rangle_{S^2}~, \end{align} hence \begin{align} \langle \phi^a\phi^b\phi^c \mathcal{A}^3\rangle_{S^{2}} = \langle \phi^a\phi^b\phi^c(\mathcal{A}_{1}\overline{\chi}\eta + \mathcal{A}_0)^3\rangle_{S^{2}} + 3\psi \langle \phi^a\phi^b\phi^c \mathcal{A}^2 \mathcal{C}\rangle_{S^{2}} -5\psi^3 \langle \phi^a\phi^b\phi^c \mathcal{C}^3\rangle_{S^{2}}~. \end{align} The only choice for which the correlator does not automatically vanish is for $a\neq b\neq c$, where \begin{align} \label{eq:TTTcorr} \langle \phi^2\phi^3\phi^4(\mathcal{A}_{1}\overline{\chi}\eta + \mathcal{A}_0)^3\rangle_{S^{2}} &= I_1' \frac{\psi^9}{1-\psi^8} + I_2' \frac{\psi}{1-\psi^8}~,\nonumber\\ \langle \phi^2\phi^3\phi^4\mathcal{A}^2\mathcal{C}\rangle_{S^{2}} &=I_3' \frac1{1-\psi^8}+I_4'\frac{\psi^8}{1-\psi^8}~,\nonumber\\ \langle \phi^a\phi^b\phi^c \mathcal{C}^3\rangle_{S^{2}} & = I_5' \frac{\psi^6}{1-\psi^8}~. \end{align} Thus, the full correlator reads \begin{align} \label{eq:H1H1H1corr} \langle \phi^a\phi^b\phi^c \mathcal{A}^3\rangle_{S^{2}} &= (I_1'+3I_4'-5I_5')\frac{\psi^9}{1-\psi^8} + (I_2'+3I_3') \frac{\psi}{1-\psi^8}~. \end{align} Again, we are not able to determine the various coefficients and therefore the full dependence of the correlator on the parameter $\psi$. \subsection{GLSM and comparison with LG phase} A non-trivial test for our formula is provided by the linear model. The B-twisted GLSM is independent of the K\"ahler parameters, and the relations in the B ring can be evaluated at any point in the K\"ahler moduli space. Thus, when a hybrid model arises in a phase of a GLSM, our formula must agree with the computations in other phases. The hybrid model we have solved in this section arises as a phase of a (2,2) $\text{U}(1)^2$ GLSM \cite{Candelas:1993dm} with seven chiral superfields and gauge charges \begin{align} \label{eq:22octicgaugech} \xymatrix@R=0mm@C=3mm{ &X_1 &X_2 &X_3 &X_4 &X_5 &X_6 &P &\text{F.I.}\\ \text{U}(1)_1 &1 &1 &1 &1 &0 &0 &-4 &r_1\\ \text{U}(1)_2 &-2 &0 &0 &0 &1 &1 &0 &r_2 } \end{align} We indicate as $x_{1,\dots,6}$ and $p$ the lowest components of the various superfields, and $r_{1,2}$ are the F.I.~parameters. In the large radius phase, i.e., in the cone $r_1,r_2>0$, the model reduces to a NLSM with target space a K3-fibered CY${}_3$ obtained by resolving the singularities of the hypersurface $W$ of degree 8 in the toric resolution of the weighted projective space ${{\mathbb{P}}}^4_{11222}$. The hybrid phase we have studied at length in this section arises in the cone $r_1<0, r_2>0$, where the D-terms force the field $p$ to acquire a non-zero vev, as well as determine the irrelevant ideal to be $(x_5,x_6)$. Upon the quotient by $\text{U}(1)_2$, this data determines the hybrid geometry $\mathbf{Y}={{\text{tot}}}\left(\mathcal{O}(-2)\oplus\mathcal{O}^{\oplus3}\rightarrow{{\mathbb{P}}}^1\right)$. Finally, $\text{U}(1)_1$ is broken by $<p>$ to a ${{\mathbb{Z}}}_4$ subgroup, which determines the R-symmetry assignment and the orbifold quotient. The Landau-Ginzburg orbifold phase arises instead in the cone $r_2<0, 2r_1+r_2<0$, where both $x_1$ and $p$ acquire non-zero vevs, while the remaining fields are massless and interact through the superpotential \begin{align} W_{\text{LG}}&= \frac14 (x_2^4+x_3^4+x_4^4)+\frac18(x_5^8+x_6^8) -\psi x_2x_3x_4x_5x_6~, \end{align} which corresponds to our choice \eqref{eq:22supoct} for the superpotential in the hybrid phase. The description for the observables in the chiral ring of LGO theories is well known: for this example these are the elements in $R={{\mathbb{C}}}[x_2,\dots,x_6]/\langle \partial W_{\text{LG}}\rangle$ which are invariant under the ${{\mathbb{Z}}}_8$ orbifold. Again, setting $\psi=0$ will generate good representatives for the cohomology classes. Explicitly, a generic element in the ring is of the form \begin{align} \label{eq:LGchirringel} \mathcal{O}_{\text{LG}}=\left(\prod_{a=2}^4 x_a^{l_a}\right) x_5^{l_5}x_6^{l_6}~, \qquad\quad 2\sum_{a=2}^4 l_a +l_5+l_6=8m~, \qquad m=0,\dots,4~. \end{align} In particular, it follows that $l_5+l_6$ must be even. The correspondence between hybrid and LG coordinates is quite straightforward. The elements \eqref{eq:LGchirringel} lift in the GLSM to the operators \begin{align} \label{eq:cxstrGLSM} \mathcal{O}_{\text{GLSM}} = px_1^{l_1}\prod_{a=2}^4 x_a^{l_a} x_5^{l_5}x_6^{l_6}~, \qquad\qquad l_1={{\frac12}}(l_5+l_6)~, \end{align} which reduce in the hybrid theory, in the patch $U_1$ and identifyng without loss of generality $x_5=u$, to \begin{align} \mathcal{O}_{\text{HY}} = u^{l_5}(\phi^1)^{l_1}\prod_{a=2}^4 (\phi^a)^{l_a} ~,\qquad\quad l_1+\sum_{a=2}^4 l_a=4m~, \qquad l_5\leq2l_1~. \end{align} These indeed coincide with the elements from the bottom row of the spectral sequence we described above. It is possible to check explicitly that, up to a numerical factor which we are not able to determine, the following holds \begin{align} \langle \mathcal{O}^1_{\text{HY}} \mathcal{O}^2_{\text{HY}} \mathcal{O}^3_{\text{HY}} \rangle_{S^2} = \langle \mathcal{O}^1_{\text{LG}}\mathcal{O}^2_{\text{LG}}\mathcal{O}^3_{\text{LG}}\rangle = \text{Res}\left\{ \frac{\mathcal{O}^1_{\text{LG}}\mathcal{O}^2_{\text{LG}}\mathcal{O}^3_{\text{LG}}}{\partial_2 W_{\text{LG}}\cdots \partial_6W_{\text{LG}}} \right\}~. \end{align} In other words, we find a complete match of the correlators involving bottom row elements on the hybrid side and untwisted elements on the LGO side. From the linear model point of view, we can employ the elements \eqref{eq:cxstrGLSM} at $\mathbf{q}=1$ (that is, $m=1$) to deform the theory by \begin{align} W_{\text{GLSM}} &= W^0_{\text{GLSM}} + \psi \mathcal{O}^{(\mathbf{q}=1)}_{\text{GLSM}}~, \end{align} where $W^0_{\text{GLSM}}$ is the superpotential of the undeformed theory. For this reason these deformations are dubbed {\it polynomial}. On the other hand, there is no such interpretation for the elements which arise, in hybrid language, from the first row of the spectral sequence. There are no good representatives for these operators in the GLSM defined by \eqref{eq:22octicgaugech} and thus no simple manner to correspondingly deform the GLSM action. In fact, as pointed out in \cite{Aspinwall:2010ve}, these {\it non-polynomial} deformations, from the point of view of this GLSM, are obstructed as turning them on would prevent the embedding of $W$ in the toric variety which is the toric resolution of ${{\mathbb{P}}}^{4}_{11222}$.\footnote{The authors of \cite{Aspinwall:2010ve} provide a different GLSM which describes the same moduli space of (2,2) SCFTs, but in which all 86 complex structure deformations are realized polynomially. It is however unknown which 83 dimensional subspace corresponds to the polynomial complex structure deformations of the original model. As the more general GLSM has a hybrid phase (but no LGO), the methods we are providing in this work could be of help in answering this question.} In the LGO phase, the non-polynomial representatives in the (c,c) ring appear in twisted sectors. In this particular example \cite{Aspinwall:2010ve} they have the form \begin{align} \label{eq:LGtwistst} T^{(1)}_a=&x_a|4\rangle~, &T^{(2)}_a=&x_ax_b^2x_c^2|4\rangle~, \qquad a\neq b\neq c~, \end{align} where $|4\rangle$ is the (NS,NS) vacuum state in the $k=4$ twisted sector. Presently, to the knowledge of the authors, there is no technique to evaluate correlators involving these states, except when $W_{\text{LG}}$ is an invertible polynomial \cite{2016arXiv160808962B}, which, in our example corresponds to $\psi=0$. However, at the LG point, the theory exhibits a ${{\mathbb{Z}}}_8$ quantum symmetry, which automatically yields \begin{align} \langle T U U \rangle = \langle T T T \rangle =0~, \end{align} where by $T$ we denote an element in \eqref{eq:LGtwistst} and by $U$ an element from the untwisted sector \eqref{eq:LGchirringel}. The first equation above is reminiscent of the structure in the hybrid theory in \eqref{eq:firstrowredef}. Hence, it is natural to conjecture a correspondence between \begin{align} A^{(\mathbf{q})}_a \longleftrightarrow T^{(\mathbf{q})}_a~, \end{align} and given the identical structure of \eqref{eq:LGtwistst} and \eqref{eq:Fsfirstrow}, in particular $\mathcal{A} \longleftrightarrow |4\rangle$. We can employ this conjecture to derive predictions on the structure of both theories. On the one side, the correlators \eqref{eq:frfrcorrhyb} provide a prediction for correlators in the LGO theory involving twisted operators \begin{align} \label{eq:frfrcorrLGO} \xymatrix@R=0mm@C=10mm{ F_1F_2U_3 & \langle T_1T_2U_3\rangle\\ x_2^2x_3^2x_4^2 &\frac1{1-\psi^8}+I_0'\frac{\psi^8}{1-\psi^8}\\ x_2^4x_5^2x_6^2 &\frac{\psi^6}{1-\psi^8}\\ x_3^4x_5^2x_6^2 &\frac{\psi^6}{1-\psi^8}\\ x_4^4x_5^2x_6^2 &\frac{\psi^6}{1-\psi^8}\\ x_2x_3x_4x_5^3x_6^3 &\frac{\psi^4}{1-\psi^8} } \end{align} This agrees with the computation at the Fermat point ($\psi=0$) \cite{2016arXiv160808962B,Brunner:2013ota}, where \begin{align} \label{eq:twistedLGcorrFerm} \langle T_1 T_2 U_3 \rangle= \text{Res}\left\{ \frac{F_1F_2U_3}{\partial_2 \widetilde{W}_{\text{LG}}\partial_3 \widetilde{W}_{\text{LG}} \partial_4\widetilde{W}_{\text{LG}}} \right\}~, \end{align} and $\widetilde{W}_{\text{LG}}$ is obtained from $W_{\text{LG}}$ by setting to zero all non-invariant variables with respect to the orbifold action, which in the $k=4$ twisted sector are $x_5$ and $x_6$. For a general quasi-homogeneous $W_{\text{LG}}$, the generalization of \eqref{eq:twistedLGcorrFerm} is to our knowledge not known, thus our hybrid methods allow us to compute the full list of correlators. On the other side, the condition $\langle TTT\rangle=0$ predicts that the correlator \eqref{eq:H1H1H1corr} vanishes, that is \begin{align} \langle\phi^2\phi^3\phi^4\mathcal{A}^3 \rangle_{S^2}=0~. \end{align} \section{$\mathcal{N}=(0,2)$ hybrid models and B/2 correlators} \label{s:02hybrids} We now turn to the analysis of hybrid theories which flow in the IR to (0,2) SCFTs. These models have been recently introduced in \cite{Bertolini:2017lcz}, and we begin this section by reviewing that construction. A (0,2) hybrid model is defined by the quadruple $(\mathbf{Z},\mathcal{E},V,J)$ where $\mathbf{Z}$ is a K\"ahler manifold and $\mathcal{E}\rightarrow \mathbf{Z}$ is a rank-$R$ holomorphic vector bundle. As before, we take $\mathbf{Z}$ to be the total space of a holomorphic vector bundle $\mathbf{Z}=\text{tot}\left(X\xrightarrow{\pi} B\right)$, and $B$ to be a smooth compact manifold. Let $x^\alpha$, $\alpha=1,\dots,d=\dim \mathbf{Z}$, be local coordinates on $\mathbf{Z}$, which we split according to the fiber/base decomposition\footnote{For ease of exposition, we assume that $X$ splits as a sum of line bundles, although the general case can be treated at the price of a more involved notation.} as $(y^{\mu},\phi^i)$, $\mu=1,\dots,b=\dim B$ and $i=1,\dots,n={{\text{rank}}}\ X$. Similarly to the (2,2) case, $V$ is a $\text{U}(1)$-action on $\mathbf{Z}$ determined by a holomorphic Killing vector on $\mathbf{Z}$. We again assume it acts vertically on $\mathbf{Z}$, thus defining a good (0,2) hybrid, and that it induces the decomposition $X=\oplus_i X_i$, where $\phi^i$ is the coordinate along $X_i$, into eigenspaces of positive eingenvalues, that is \begin{align} V(B)&=0~, &V(X_i)&=q_i X_i~, \qquad q_i \in \mathbb{Q}_{>0}~. \end{align} The bundle $\mathcal{E}$ must respect the bundle structure of $\mathbf{Z}$ and must admit a lift of the $V$-action. Let $\lambda^A$, $A=1,\dots,R$, be a section of $\mathcal{E}$, and let $G^{A}_{ \ B}$ be the transition functions for $\mathcal{E}$. If $\{U_a\}$ is a cover of $B$, we indicate as $\lambda^A_a$ the restriction of $\lambda^A$ to the patch $\pi^{-1}U_a$. Then, the bundle $\mathcal{E}$ admits a lift of the $V$-action if, on the intersection $U_a\cap U_b\neq\emptyset$, the following holds \begin{align} \label{eq:chargelocglob} V(\lambda^A_a) &= Q_A\lambda^A_a~, &V(\lambda^A_b=(G_{ba})^{A}_{ \ B}\lambda^B_a) &= Q_A\lambda^A_b~, \end{align} that is, the charge assignment holds globally. We take $-1\leq Q_A <0$ and $0<q_i<1$. A class of bundles that satisfy this property are classified by extensions of the form \begin{align} \label{eq:defbundleE02} \xymatrix@R=0mm@C=10mm{ 0\ar[r] &\oplus_{I=1}^N \pi^\ast \mathcal{O}(L_I^a) \ar[r] &\mathcal{E} \ar[r] & \pi^\ast \mathcal{E}_B \ar[r] &0~, } \end{align} where $\mathcal{E}_B$ is a rank-$(R-N)$ bundle and $\mathcal{O}(L_I^a)$, $I=1,\dots,N$, $a=1,\dots,\dim\text{Pic}B$, are a collection of line bundles over $B$ such that\footnote{Again, the restriction to line bundles is not essential but simplifies notation.} \begin{align} V(\mathcal{E}_B)&=-\mathcal{E}_B~, &V(\mathcal{O}(L_I^a))=Q_I\mathcal{O}(L_I^a), \qquad Q_I>-1~. \end{align} Finally, the (0,2) superpotential is specified by a holomorphic section $J\in \Gamma(\mathcal{E}^{*})$, such that \begin{align} V(J_A) &= \sum_\alpha V(x^\alpha) \partial_\alpha J_A~, &V(x^{\alpha})&=q_{\alpha}x^{\alpha}~, \end{align} where the $V$-action on a section $J\in\Gamma(\mathcal{E}^*)$ is determined by the $V$-action on sections of $\mathcal{E}$ in \eqref{eq:chargelocglob}. Given the property \eqref{eq:chargelocglob} this is a globally well-defined condition. This construction defines a nonsingular model when the potential condition $J^{-1}(0)=B$ is satisfied. In order to write the action for the corresponding NLSM we introduce the (0,2) superfields \begin{align} \mathcal{X}^\alpha & = x^\alpha + \sqrt{2}\theta^+ \psi_+^\alpha -i \theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} x^{\alpha}~,& \overline{\cX}^{\overline{\alpha}} & = {\overline{x}}^{\overline{\alpha}} - \sqrt{2}\overline{\theta}^+ \overline{\psi}_+^{\overline{\alpha}} +i\theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} \overline{x}^{\overline{\alpha}}~, \nonumber\\ \Psi^A & = \psi_-^A - \sqrt{2}\theta^+ F^A -i\theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} \psi_{-}^{A}~,& \overline{\Psi}^{\overline{A}} & = \overline{\psi}_-^{\overline{A}} - \sqrt{2}\overline{\theta}^+ \overline{F}^{\overline{A}} +i\theta^+\overline{\theta}^+ \overline{\partial}_{\bar{z}} \overline{\psi}_-^{\overline{A}}~. \end{align} These satisfy the same chirality conditions as in \eqref{eq:chiralconds}. Let $K$ be the K\"ahler potential on $\mathbf{Z}$ and $g_{\alpha\bar{\beta}}$ the associated K\"ahler metric, and let $\mathcal{H}_{A\overline{B}}$ be a Hermitian metric on $\mathcal{E}\rightarrow\mathbf{Z}$. The action in components reads \begin{align} \label{eq:actioncomps02} \mathcal{L}_K &= -g_{\alpha\overline{\beta}}\partial_{\mu} x^\alpha \partial^{\mu} \overline{x}^{\overline{\beta}} - 2ig_{\overline{\alpha}\beta}\overline{\psi}_+^{\overline{\alpha}} D_{z} \psi_+^\beta +2i\mathcal{H}_{\overline{A} B}\overline{\psi}_-^{\overline{A}} \overline{D}_{\bar{z}} \psi_-^B + R_{\alpha\overline{B} A\bar{\beta}} \psi_{+}^{\alpha}\psi_{-}^A\overline{\psi}_{-}^{\overline{B}}\bar{\psi}_{+}^{\bar{\beta}}~, \nonumber\\ \mathcal{L}_J&= -\frac{1}{2}\psi_+^\alpha\psi_-^A D_\alpha J_A + \frac{1}{2}\overline{\psi}_+^{\overline{\alpha}}\overline{\psi}_-^{\overline{A}} \overline{D}_{\overline{\alpha}} \overline{J}_{\overline{A}} -\frac{1}{4} \mathcal{H}^{A\overline{B}} \overline{J}_{\overline{B}}J_A~, \end{align} where the covariant derivatives \begin{align} D_{z}\psi_+^{\alpha}&=(\partial_{z}+\frac{1}{2}\omega_{z})\psi_+^{\alpha}+\partial_{z} x^{\beta}\Gamma^{\alpha}_{\beta\delta}\psi_+^{\delta}~, &\overline{D}_{\bar{z}} \psi_-^A&=(\overline{\partial}_{\bar{z}}+\frac{1}{2}\omega_{\bar{z}})\psi_-^A+\overline{\partial}_{\bar{z}} x^{\beta}\Gamma^A_{\beta B}\psi_-^B~, \end{align} are constructed with the K\"ahler and Hermitian connection, respectively, and $R_{A\overline{B} \overline{\alpha}\beta}$ is the curvature constructed from the Hermitian connection. In writing \eqref{eq:actioncomps02} we have already imposed the equations of motion for the auxiliary field. \subsection{Anomalies and the low-energy limit} \label{ss:anomalies} Given the construction outlined above, the action \eqref{eq:actioncomps02} admits an unbroken $\text{U}(1)_L\times\text{U}(1)_R^0$ symmetry with charges \begin{align} \label{eq:naivecharges} \xymatrix@R=0mm@C=10mm{ \text{fields} &\theta^+ &\mathcal{X}^\alpha &\Psi^A\\ \text{U}(1)_R^0 &1 &0 &1\\ \text{U}(1)_L &0 &q_\alpha &Q_A } \end{align} However, anomaly cancellation plays a much more predominant role in the context of (0,2) hybrids. In order to probe this IR theory, it is useful again to construct a left-moving algebra \begin{align} \label{eq:leftcurrents} J_L&:= Q_A \psi_-^A \overline{\psi}_{-,A} - q_\alpha x^\alpha \rho_\alpha~, \nonumber\\ T&:= -\partial_{z} x^\alpha\rho_\alpha - \psi_-^A \partial_{z} \overline{\psi}_{-,A} -{{\frac12}} \partial_{z} J_L~, \end{align} corresponding to the generators of the global $\text{U}(1)_L$ symmetry and of the energy-momentum tensor. Again, we have introduced the field $\rho_\alpha \equiv g_{\alpha\overline{\alpha}} \partial_{z} \overline{x}^{\overline{\alpha}} + \Gamma^A_{\alpha B}\overline{\psi}_{-,A} \psi_-^B$. Using this structure and free-fields OPEs, it follows that $\text{U}(1)_L$ is non-anomalous, that is, \begin{eqnarray} T(z)J_{L}(w)\sim \frac{J_L(w)}{(z-w)^{2}}+\frac{\partial_w J_L(w)}{(z-w)}~, \end{eqnarray} when \begin{align} \label{eq:02LGfiban} \sum_A Q_A^2-\sum_\alpha q_{\alpha}^{2}=-\sum_A Q_A - \sum_\alpha q_\alpha~, \end{align} which corresponds to the condition that the anomaly of the (0,2) LG fiber theory vanishes \cite{Kawai:1994np,Distler:1993mk}. Note that this fixes the normalization (and the sign) of the charges $\text{U}(1)_L$ in \eqref{eq:naivecharges}. The remaining anomaly cancellation conditions \cite{Bertolini:2017lcz} impose constraints on the allowed geometric structure and are given by \begin{align} \label{eq:anomaly02goem} &\sum_I Q_Ic_1(\mathcal{O}(L_I^a))-c_1(\mathcal{E}_B) -\sum_i q_ic_1(X_i) =0~, &c_1(\mathcal{E}) + c_1(T_{\mathbf{Y}})&=0~. \end{align} When these are satisfied, it is argued in \cite{Bertolini:2017lcz} that the theory flows to a non-trivial IR fixed point characterized by the left-moving central charge \begin{align} \label{eq:cc02} c&=2(d-R)+3\mathfrak{r}~, &\mathfrak{r}&= -\sum_A Q_A - \sum_\alpha q_\alpha~, \end{align} where $\mathfrak{r}$ is the level of the $\mathfrak{u}(1)_L$ Kac-Moody (KM) algebra. Next, we need to determine the IR right-moving R-current. Barring accidental symmetries \cite{Bertolini:2014ela}, this must be given as a linear combination of the symmetries \eqref{eq:naivecharges}, which we take to be $\text{U}(1)_R^0+\lambda \text{U}(1)_L$. The parameter $\lambda$ can be determined by c-extremization \cite{Benini:2013cda} of the right-moving central charge \begin{eqnarray} \overline{c}(\lambda)=\sum_{\alpha}(\lambda q_{\alpha}-1)^{2}-\sum_{A}(\lambda Q_{A}+1)^{2}~, \end{eqnarray} which yields \begin{align} \lambda =\frac{\sum_{\alpha}q_{\alpha}+\sum_{A} Q_{A}}{\sum_{\alpha}q_{\alpha}^{2}-\sum_{A} Q_{A}^{2}}=1~, \end{align} where we used \eqref{eq:02LGfiban}. Thus, the IR $\text{U}(1)_L\times\text{U}(1)_R$ symmetries are given by \begin{align} \label{eq:02LRcharges} \xymatrix@R=0mm@C=10mm{ \text{fields} &\theta &\mathcal{X}^\alpha &\Psi^A\\ \text{U}(1)_R &1 &q_\alpha &Q_A+1\\ \text{U}(1)_L &0 &q_\alpha &Q_A } \end{align} In particular, this yields the right-moving central charge \begin{align} \overline{c}=3(d-R+\mathfrak{r})~. \end{align} Finally, there is one additional anomaly condition we need to impose, which reads \begin{align} {{\text{ch}}}_2(\mathcal{E}) &= {{\text{ch}}}_2(T_\mathbf{Z})~. \end{align} This is the condition that the NLSM constructed above is well-defined. A comment might be useful at this point. The anomaly cancellation \eqref{eq:anomaly02goem} does not require $c_1(T_{\mathbf{Z}})=0$. However, as familiar from GLSM \cite{Distler:1995mi} and NLSM \cite{Guffin:2008pi} constructions, it is always possible to recover the condition that the target space is CY by adding spectators fields to the theory. These are a massive pair, consisting of a bosonic field $S$ and a Fermi field $\Xi$ such that $V(S)=-V(\Xi)=q_S<1$. Let $X_S\rightarrow B$ be a line bundle such that $\mathbf{Z}':={{\text{tot}}}\left( X\oplus X_S \rightarrow B\right)$ has vanishing first Chern class, i.e., $c_1(T_{\mathbf{Z}'})=0$. Then, we take the spectator fields to transform according to \begin{align} S&\in \Gamma(X_S)~, &\Xi&\in \Gamma(X_S^\ast)~. \end{align} By \eqref{eq:anomaly02goem} we have that $\mathcal{E}':=\mathcal{E}\oplus \pi^\ast X_S^\ast$ satisfies $c_1(\mathcal{E}')=0$. Now, these fields interact through the potential $\int d^2z d\overline{\theta}^+ \Xi S$, which is consistent with the charge assignment and the bundle geometry. Thus, the theory with spectators defines a UV geometry satisfying $c_1(T_{\mathbf{Z}'})=c_1(\mathcal{E}')=0$, but since these fields are massive in the IR and can be simply integrated out, the model with spectators flows to the same IR theory as the model without them. We will therefore consider models without spectators satisfying the weaker topological condition. \subsection{The heterotic topological ring} While in (2,2) SCFTs the B ring is defined by the cohomology of the supercharge $\overline{\bQ}_{\text{(c,c)}}=\overline{\bQ}_-+\overline{\bQ}_+$, as considered in the first part of this work, in general (0,2) SCFTs we do not have this definition at our disposal, as there is no left-moving supersymmetry and therefore no operator which can assume the role of $\overline{\bQ}_-$. The cohomology of $\overline{\bQ}_+$, which we denote $\mathcal{H}_{\overline{\bQ}_+}$, still defines the (infinite dimensional) ring of right-moving chiral operators, which from here on we will refer to as the chiral ring. In a large class of theories, it is possible \cite{Adams:2005tc} to define a subring of the chiral ring, where we take a projection within $\overline{\bQ}_+$-cohomology onto elements $\mathcal{O}$ that satisfy $2h(\mathcal{O})=\mathbf{q}(\mathcal{O})$, where $h(\mathcal{O})$ and $\mathbf{q}(\mathcal{O})$ are the left-moving weight and $\text{U}(1)_L$ charge, respectively. We denote this subset $\mathcal{H}_{\text{B}/2}$. It is not hard to show that our theories fall into this category. Let $\mathcal{O}_{1,2}\in\mathcal{H}_{\text{B}/2}$, then their OPE takes the general form \begin{align} \label{eq:OPE02B2} \mathcal{O}_1(z)\cdot \mathcal{O}_2(0) = \sum_s c_{12}^s \mathcal{O}_s z^{h_s-q_s/2}~, \end{align} up to $\overline{\bQ}_+$-exact terms, where $h_s=h(\mathcal{O}_s)$ and $q_s=\mathbf{q}(\mathcal{O}_s)$. Here the sum on the RHS is over elements $\mathcal{O}_s\in\mathcal{H}_{\overline{\bQ}_+}$. The charges of the allowed operators in the OPE is fixed by $q_s=q_1+q_2$. By applying the standard Sugawara decomposition for the level $\mathfrak{r}$ $\mathfrak{u}(1)$ KM algebra \eqref{eq:leftcurrents}, we can write any $\mathcal{O}_s$ as \begin{align} \mathcal{O}_s(z)= e^{iq_s\Phi/\sqrt{\mathfrak{r}}}(z) \widehat{\mathcal{O}}_s(z)~, \end{align} where we bosonized the current $J_L=i\sqrt{\mathfrak{r}}\partial \Phi$ and $\Phi$ is a free chiral boson, and \begin{align} \mathbf{q}(\widehat{\mathcal{O}}_s)&=0~, &h(\widehat{\mathcal{O}}_s)&=h_s-{q_s^2\over2\mathfrak{r}}\geq0~. \end{align} This unitary bound, together with the charge integrality requirement of the (NS,NS) spectrum, yield the desired bound $h_s\geq q_s/2$. Therefore, taking the limit $z\rightarrow0$ in \eqref{eq:OPE02B2} defines a finite subring of the chiral ring known as the heterotic topological ring.\footnote{In a geometric phase these rings are also denoted by the term quantum sheaf cohomology rings.} At a conceptual level, the computation of the full heterotic topological ring is a only a slight generalization of the methods in section \ref{s:chiralring}, thus our discussion will be brief and focused on highlighting the differences which arise in the (0,2) setting. Again, we will restrict our attention to the untwisted (NS,NS) sector. The supersymmetry transformation of the relevant supercharge again splits as a sum of two terms $\overline{\bQ}_+=\overline{\bQ}_0+\overline{\bQ}_J$ and are given by \begin{align} \label{eq:chirringcohmnewfermi02} [\overline{\bQ}_0,\overline{x}^{\overline{\alpha}}] &=\overline{\psi}_+^{\overline{\alpha}}~, &\{\overline{\bQ}_0,\psi_+^\alpha\} &=i \overline{\partial}_{\overline{z}} x^\alpha~, &\{\overline{\bQ}_J,\overline{\psi}_{-,A} \}&=J_A~. \end{align} Then, a generic $\overline{\bQ}_+$-closed element takes the form \begin{align} \label{eq:02states} \mathcal{O}(\omega) = \omega(x,\overline{x})_{\overline{\beta}_1\dots\overline{\beta}_s,B_1\dots B_t}^{A_1\dots A_r}\overline{\psi}_+^{\overline{\beta}_1}\cdots\overline{\psi}_+^{\overline{\beta}_s}\psi_-^{B_1}\cdots\psi_-^{B_t}\overline{\psi}_{-,A_1}\cdots\overline{\psi}_{-,A_r}~. \end{align} We can compute the corresponding weight and the left-moving charge using the operators \eqref{eq:leftcurrents}, and we find \begin{align} 2h(\mathcal{O}(\omega)) &= \mathbf{q}(\omega) + \sum_{\mu=1}^t(1+Q_{B_{\mu}}) - \sum_{\nu=1}^r Q_{A_{\nu}}~, &\mathbf{q}(\mathcal{O}(\omega)) = \mathbf{q}(\omega) + \sum_{\mu=1}^tQ_{B_{\mu}} - \sum_{\nu=1}^r Q_{A_{\nu}}~. \end{align} It follows that the condition $2h(\mathcal{O})=\mathbf{q}(\mathcal{O})$ can only be satisfied if $t=0$. In this case, we can interpret $\omega$ in \eqref{eq:02states} as a $(0,s)$-horizontal form valued in $\wedge^r \mathcal{E}$. Extending the notation from the tangent bundle case we define \begin{align} \wedge^r_s \mathcal{E}&:=\Omega^{0,s}(\mathbf{Z},\wedge^r \mathcal{E})~, \end{align} where we assume at most polynomial growth along the fiber directions. On these the action of the supercharges is \begin{align} \label{eq:Qaction02} \overline{\bQ}_0 &: \mathcal{O}(\omega) \mapsto (\overline{\partial} \omega)(x,\overline{x})_{\overline{\beta}_1\dots\overline{\beta}_s\overline{\gamma}}^{A_1\cdots A_r} \overline{\psi}_+^{\overline{\gamma}}\overline{\psi}_+^{\overline{\beta}_1}\cdots\overline{\psi}_+^{\overline{\beta}_s}\overline{\psi}_{-,A_1}\cdots\overline{\psi}_{-,A_r}~,\nonumber\\ \overline{\bQ}_J &: \mathcal{O}(\omega) \mapsto (-1)^s \omega(x,\overline{x})_{\overline{\beta}_1\dots\overline{\beta}_s}^{A_1\dots A_r}J_{A_1} \overline{\psi}_+^{\overline{\beta}_1}\cdots\overline{\psi}_+^{\overline{\beta}_s}\overline{\psi}_{-,A_2}\cdots\overline{\chi}_{-,A_r}~. \end{align} In particular, the relevant states are double graded with respect to $r$ and $s$, and the supercharge still acts as expected \begin{align} \overline{\bQ}_0 &: \wedge^r_s \mathcal{E} \rightarrow \wedge^r_{s+1} \mathcal{E}~, &\overline{\bQ}_J &: \wedge^r_s \mathcal{E} \rightarrow \wedge^{r-1}_s \mathcal{E}~. \end{align} Therefore, the elements of the topological heterotic ring are computed by a spectral sequence, as in \eqref{eq:22spetrseq}, where $\wedge^r_s \mathcal{E}$ replaces $\wedge^r_s T_{\mathbf{Y}}$. At a technical level instead, the explicit computation of the cohomology groups $H^\bullet_{\overline{\bQ}_+}(\mathbf{Z},\wedge^r_s\mathcal{E})$ can be quite daunting. The class of theories reviewed here are amenable to such computations, as shown in $\cite{Bertolini:2017lcz}$ together with a method to compute their cohomology. Although the formal formula for the $S^2$ correlators we are going to derive next in this section is valid for a generic hybrid model, its applicability, and hence its usefulness, relies on our ability to compute the heterotic topological ring. Thus, it is natural to restrict our attention to the class of theories studied in $\cite{Bertolini:2017lcz}$. \subsection{B/2-twisted hybrid models and $S^2$ localization} The B/2-twist is defined as in the $(2,2)$ case by \begin{eqnarray} \text{U}(1)_{\text{B/2}}:=\text{U}(1)_{R}-\text{U}(1)_{L}~, \end{eqnarray} where in this setting the role of the left-moving R-symmetry is taken by the flavor symmetry $\text{U}(1)_{L}$, which is guaranteed to exist by construction in our models. This does not lead to a contradiction, since we have shown in section \ref{ss:anomalies} that anomaly cancellation fixes the sign of the IR flavor symmetry.\footnote{If the sign of the flavor symmetry had not been fixed, we would not have been able to distinguish between the A/2 and the B/2 twists.} We make again the choice of working with the $B_{(+)}$-twist. Under this choice the supercharge $\overline{\mathbf{Q}}_{+}$ becomes a scalar, and the Fermi fields become $C^{\infty}$ sections of the following bundles \begin{eqnarray} \psi^{A}_{-}&\in&\Gamma(K_{\Sigma}\otimes x^{*}\mathcal{E})~,\nonumber\\ {\overline{\psi}}^{\overline{A}}_{-}&\in&\Gamma(x^{*}\overline{\mathcal{E}})~,\nonumber\\ {\overline{\psi}}^{\bar{\alpha}}_{+}&\in&\Gamma(x^{*}\overline{T}_{\mathbf{Z}})~,\nonumber\\ \psi^{\alpha}_{+}&\in&\Gamma(\overline{K}_{\Sigma}\otimes x^{*}T_{\mathbf{Z}})~. \end{eqnarray} The action \eqref{eq:chirringcohmnewfermi02} of $\overline{\mathbf{Q}}_{+}$ on the component fields can be identified in the B/2-twisted theory with a cohomology problem via the map \begin{align} \overline{\psi}_+^{\overline{\alpha}}&\rightarrow d\overline{x}^{\overline{\alpha}}~, &\overline{\psi}_{-,A}&\rightarrow \partial_{A}~, \end{align} where we write $\partial_{A}$ for a local basis of $\mathcal{E}$. It then follows that the operators (\ref{eq:02states}) (for $t=0$) are mapped to $(0,\bullet)$ differential horizontal forms valued in $\wedge^{\bullet}\mathcal{E}$ \begin{align}\label{identops02} \mathcal{O}(\omega)\rightarrow \omega\in \Omega^{0,\bullet}(\mathbf{Z},\wedge^{\bullet}\mathcal{E})~. \end{align} Under this identification, we map the supercharge $\overline{\mathbf{Q}}_{+}$ to a differential operator \begin{align} \overline{\mathbf{Q}}_{+}\rightarrow \delta:=\overline{\partial}-\iota_{J}~, \end{align} where $\iota_{J}$ acts as \begin{align} \iota_{J}\circ\omega^{s}_{r}=s(-1)^{r}J_{A}\omega^{A,A_{1},\ldots,A_{s-1}}_{r}\partial_{A_{1}}\wedge\ldots\wedge\partial_{A_{s-1}}~, \end{align} for any $\omega^{s}_{r}\in \Omega^{(0,r)}(\mathbf{Z},\wedge^{s}\mathcal{E})$. Now we turn to the computation of the $S^2$ correlators via localization. The procedure is analogous to the (2,2) case, that is, we localize with respect to a subset of dynamical fields $\{ x^{\alpha},\overline{x}^{\overline{\alpha}},\psi_{+}^{\alpha},\overline{\psi}_+^{\overline{\alpha}}\}$, and we keep the remaining ones as background fields. The saddle point equations in this case are just \begin{eqnarray} \delta \psi^\alpha_+=i\overline{\partial}_{\bar{z}}x^{\alpha}=0~. \end{eqnarray} In contrast to the (2,2) case, this does not imply $x=\text{const.}$, but $x$ is allowed more generically to be a holomorphic map. This in fact implies that worldsheet instanton corrections to B/2 model correlators cannot be ruled out. For the purpose of deriving our formula we will ignore such corrections, that is, we assume that in fact the stronger condition $x=\text{const}$ holds. In section \ref{ss:instcorrs} we will address the question of whether instanton corrections do appear in our models. However, let us point out here that there are several known classes of examples in the literature where it has been shown that such corrections are absent in their B/2-twisted versions \cite{McOrist:2008ji}. With our assumption, $\psi_{+}^{\alpha}$ and $\psi^{A}_{-}$ have no zero modes, and integrating over the auxiliary fields $F,\overline{F}$ we obtain \begin{align} \label{eq:02formula} \langle\mathcal{O}(\omega)\rangle_{S^{2}}:=\int_{\mathbf{Z}}d^{2}x\int(\prod_{\overline{\alpha}} d\overline{\psi}_+^{\overline{\alpha}}) (\prod_{\overline{A}}d \overline{\psi}_-^{\overline{A}}) \exp\left(-\frac{\mathbf{v}}{4}\| J \|^{2} +\frac{\mathbf{v}}{4}\overline{D}_{\overline{\alpha}}\overline{J}_{\overline{A}} \overline{\psi}_+^{\overline{\alpha}} \overline{\psi}_-^{\overline{A}}\right)\mathcal{O}(\omega)~. \end{align} Some remarks about the Fermi measure are in order. The two contributions are identified with sections of the bundles \begin{align} \prod_{\overline{\alpha}} d\overline{\psi}_+^{\overline{\alpha}}&\in \Gamma(\overline{K}_{\mathbf{Z}})~, &\prod_{\overline{A}}d \overline{\psi}_-^{\overline{A}}&\in \Gamma(\wedge^R\overline{\cE}^\ast)~, \end{align} where $\overline{K}_{\mathbf{Z}}:=\wedge^d \overline{T}_{\mathbf{Z}}^\ast$ is the anti-holomorphic anti-canonical bundle of $\mathbf{Z}$. The requirement that the measure is well-defined now reads \begin{align} \label{eq:02Fermimescond} \overline{K}_{\mathbf{Z}}\otimes(\wedge^{R}\overline{\mathcal{E}})^\ast \cong \overline{\cO}_{\mathbf{Z}}~, \end{align} since $\overline{\cO}_{\mathbf{Z}}$ always admits a nowhere vanishing global section. This condition was obtained also in \cite{Sharpe:2006qd} and can be rewritten, upon an overall conjugation of \eqref{eq:02Fermimescond}, as \begin{eqnarray}\label{ccondbundle02} \wedge^{R}\mathcal{E}\cong K_{\mathbf{Z}}^\ast~. \end{eqnarray} Since $\wedge^{R}\mathcal{E}$ and $K_{\mathbf{Z}}^{*}$ are line bundles over $\mathbf{Z}$, topologically they are determined by their first Chern class. Thus (\ref{ccondbundle02}) is equivalent to the condition $c_{1}(T\mathbf{Y})=0$, where $\mathbf{Y}=\mathrm{tot}(\mathcal{E}\rightarrow\mathbf{Z})$, and in particular it coincides with the second anomaly cancellation condition in \eqref{eq:anomaly02goem}. Thus, we do not need any additional constraints on our models in order for the B/2-twisted theory to be well-defined. Another assumption we implicitly made in writing the above, following \cite{McOrist:2008ji} and \cite{Katz:2004nn}, is that the ratio of 1-loop determinants \begin{eqnarray} \frac{\mathrm{det}\overline{\partial}_{x^{*}\mathcal{E}}}{\mathrm{det}\overline{\partial}_{x^{*}\mathcal{T_{\mathbf{Z}}}}} \end{eqnarray} is a number, which we can just ignore. Finally, we integrate over the Fermi zero modes and we obtain \begin{eqnarray} \label{eq:02corr} \langle \mathcal{O}(\omega) \rangle_{S^2}=\int_{\mathbf{Z}}\Omega_{\mathcal{E}}\lrcorner e^{\widehat{L}} \omega~, \end{eqnarray} where, by a slight abuse of notation, we define \begin{align} \widehat{L}:=-\frac{\mathbf{v}}{4}\| J \|^{2}+\frac{\mathbf{v}}{4}\overline{\partial}\overline{J}^{A}\partial_{A}~, \end{align} and $\Omega_{\mathcal{E}}$ is the nowhere vanishing section \begin{align} \Omega_{\mathcal{E}}\in \Gamma(K_{\mathbf{Z}}\otimes \wedge^{R}\mathcal{E})=\Gamma( \mathcal{O}_{\mathbf{Z}})~. \end{align} In particular, $\Omega_{\mathcal{E}}$ is unique up to rescaling by a non-vanishing holomorphic section of $\mathcal{O}_{\mathbf{Z}}$. In deriving \eqref{eq:02corr} we used the condition that, if $s:=\mathcal{H}\oplus g$ is a hermitian K\"ahler metric on the total space $\mathcal{E}\rightarrow \mathbf{Z}$, then the unique compatible connection is given by $s^{-1}\partial s$, which implies that \begin{eqnarray} \Gamma_{\bar{\alpha} C}^{A}=\Gamma_{\alpha \overline{C}}^{\overline{A}}=0~. \end{eqnarray} Thus, if we define \begin{eqnarray} \overline{J}^{A}:=\mathcal{H}^{A\overline{B}}\overline{J}_{\overline{B}}~, \end{eqnarray} it follows that \begin{eqnarray} \overline{D}_{\bar{\alpha}}\overline{J}^{A}=\overline{\partial}_{\bar{\alpha}}\overline{J}^{A}~. \end{eqnarray} The operator $\Omega_{\mathcal{E}}\lrcorner$ is defined as \begin{align} \Omega_{\mathcal{E}}\lrcorner\omega^{s}_{r}&:=f_{\mathbf{Z}}\epsilon_{\alpha_{1}\cdots \alpha_{d}A_{1}\cdots A_{s}A_{s+1},\cdots A_{R}}\omega^{A_{1}\cdots A_{s}}_{\bar{\beta}_{1}\cdots \bar{\beta}_{r}}d\bar{x}^{\bar{\beta}_{1}}\wedge\cdots\wedge d\bar{x}^{\bar{\beta}_{r}}\nonumber\\ &\qquad\qquad\qquad\qquad\otimes e^{A_{s+1}}\wedge\cdots\wedge e^{A_{R}} \otimes dx^{\alpha_{1}}\wedge\cdots\wedge dx^{\alpha_{d}}~, \end{align} where $f_{\mathbf{Z}}$ is a nowhere vanishing function and $\{ e^{A}\}$ is the dual basis to $\partial_{A}$. Let $\mathcal{O}(\omega)\in \Omega^{0,p}(\mathbf{Z},\wedge^q\mathcal{E})$. Then, necessary conditions to have a non-vanishing correlator are \begin{align} p-q&=\dim\mathbf{Z}-\mathrm{rank} \mathcal{E}~, &\mathbf{q}(\mathcal{O}(\omega)) &= \mathfrak{r}~, \end{align} which follow by requiring \eqref{eq:02formula} to be invariant under the chiral symmetries $\text{U}(1)_L\times\text{U}(1)_R$. As a final remark, for the case of a $(0,2)$ LG model, we have $\mathbf{Z}=\mathbb{C}^{d}$ and $\mathcal{E}$ a trivial bundle of rank $R$. Then, $\Omega_{\mathcal{E}}=\Omega_{\mathbb{C}^{d}}\wedge\Omega_{\mathbb{C}^{R}}$ and therefore the correlator (\ref{eq:02corr}) reproduces exactly the one derived in \cite{Melnikov:2009nh}, where the action of $\Omega_{\mathbb{C}^{R}}\lrcorner$ becomes simply the contraction with the Levi-Civita symbol of rank $R$. \subsection{Properties of (0,2) correlators} In this section we derive some formal properties for our formula. We start by showing that \eqref{eq:02corr} does not depend on the representatives in $\mathcal{H}_{\text{B/2}}$. Let us define \begin{align} \label{primedd02} \langle \beta\rangle'&:=\int_{\mathbf{Z}}\Omega_{\mathcal{E}}\lrcorner\beta~, &\beta&\in \Gamma(\Omega^{0,\bullet}(\mathbf{Z},\wedge^{\bullet}\mathcal{E}))~. \end{align} In order for the integral to be well-defined, we assume $\beta$ to be compactly supported along the fiber $X$. In particular, the quantity $\langle \delta \beta \rangle'$ is identically zero unless $\delta \beta \in\Gamma(\wedge^R_d\mathcal{E})$. Thus, $\beta\in \Gamma(\wedge^R_{d-1}\mathcal{E})$ and $\delta \beta = \overline{\partial} \beta$. Since $\Omega_{\mathcal{E}}$ is a section of a holomorphic bundle, we have \begin{align} \langle \delta \beta\rangle'=\int_{\mathbf{Z}}\Omega_{\mathcal{E}}\lrcorner\overline{\partial}\beta=\int_{\mathbf{Z}}d(\Omega_{\mathcal{E}}\lrcorner\beta)=0~, \end{align} where we assumed that $\beta$ has no poles. Let us now take a look at $\delta e^{\hat{L}}$. By a direct computation it is possible to show that \begin{eqnarray} \label{eq:deltaexpL02} \delta e^{\hat{L}}\sim J_{A}\overline{\partial}\overline{J}^{A}\wedge\overline{\partial}\overline{J}^{A_{1}}\wedge\ldots\wedge\overline{\partial}\overline{J}^{A_{R}}\partial_{A_{1}}\wedge\ldots\wedge\partial_{A_{R}} \in \Gamma\left(\Omega^{(0,R+1)}\times\wedge^{R}\mathcal{E}\right)~. \end{eqnarray} If ${{\text{rank}}}\ \mathcal{E}\geq \dim \mathbf{Z}$,\footnote{We remark that almost all the examples in the literature, among which deformations of (2,2) hybrids and (0,2) LG models, satisfy this condition, but there are examples that elude it. For instance, the authors of \cite{Andreas:2011cx} construct a class of stable rank-2 bundles over CY${}_3$ satisfying the heterotic anomaly conditions.} $\delta e^{\hat{L}}$ vanishes identically because it is a $(0,R+1)$ form. If ${{\text{rank}}}\ \mathcal{E}< \dim \mathbf{Z}$ instead, we note that it is possible to write (\ref{eq:deltaexpL02}) as \begin{eqnarray} \delta e^{\hat{L}}\sim J_{A}\overline{\partial}\overline{J}^{A}\wedge\overline{\partial}\overline{J}^{1}\wedge\ldots\wedge\overline{\partial}\overline{J}^{R}\epsilon^{A_{1},\ldots,A_{R}}\partial_{A_{1}}\wedge\ldots\wedge\partial_{A_{R}}~. \end{eqnarray} In particular, this expression always involves the product $\overline{\partial}\overline{J}^{A}\wedge\overline{\partial}\overline{J}^{A}=0$ for some $A$. Hence, we conclude that \begin{eqnarray} \delta e^{\hat{L}}=0~, \end{eqnarray} and that \begin{eqnarray} \langle \delta\mathcal{O}(\omega)\rangle_{S^{2}}=\langle \delta(e^{\hat{L}}\omega)\rangle'=0~, \end{eqnarray} which proves that B/2-correlators do not depend on the representatives of the $\delta$-cohomology classes. With this result at our disposal, we can proceed further and show that our formula (\ref{eq:02corr}) is invariant under variations of the following parameters:\footnote{In the following we use the notation $\delta\overline{J}$, $\delta\mathcal{H}_{\overline{A}B}$ and $\delta\mathbf{v}$ for the variations of the parameters and $\delta(\bullet)$ for the differential acting on $(\bullet)$. We hope this is not too confusing for the reader.} \begin{enumerate} \item anti-holomorphic parameters $\overline{J}\rightarrow \overline{J}+\delta\overline{J}$; \item worldsheet volume $\mathbf{v}\rightarrow\mathbf{v}+\delta\mathbf{v}$; \item metric $\mathcal{H}_{A\overline{B}}\rightarrow \mathcal{H}_{A\overline{B}}+\delta\mathcal{H}_{\overline{A}B}$ such that $\delta\mathcal{H}_{AB}=\delta\mathcal{H}_{\overline{A}\overline{B}}=0$. \end{enumerate} It is possible to show that under the above variations, the exponential term in \eqref{eq:02corr} transforms, respectively, as \begin{eqnarray} \label{eq:expLvarpars} \delta_{J}e^{\hat{L}}&=&\delta\left(\frac{\mathbf{v}}{4}\mathcal{H}^{A\overline{B}}\delta\overline{J}_{\overline{B}}\partial_{A} \right)\wedge e^{\hat{L}}~, \nonumber\\ \delta_{\mathbf{v}}e^{\hat{L}}&=& \delta\left(\frac{\delta\mathbf{v}}{4}\overline{J}^{A}\partial_{A} \right)\wedge e^{\hat{L}}~,\nonumber\\ \delta_{\mathcal{H}}e^{\hat{L}}&=& \delta\left(\frac{\mathbf{v}}{4}\delta\mathcal{H}^{A\overline{B}}\overline{J}_{\overline{B}}\partial_{A} \right)\wedge e^{\hat{L}}~. \end{eqnarray} Hence, given any operator $\mathcal{O}(\omega)$ satisfying $\delta\mathcal{O}(\omega)=0$, we have \begin{eqnarray} \delta_{J}\langle \mathcal{O}(\omega)\rangle_{S^{2}}=\delta_{\mathcal{H}}\langle \mathcal{O}(\omega)\rangle_{S^{2}}=\delta_{\mathbf{v}}\langle \mathcal{O}(\omega)\rangle_{S^{2}}=0~, \end{eqnarray} as claimed, where we used the property \begin{eqnarray} \langle \delta(\alpha)\wedge e^{\hat L} \mathcal{O}(\omega)\rangle' = \langle \delta\left( \alpha\wedge e^{\hat L} \mathcal{O}(\omega) \right)\rangle'=0~, \end{eqnarray} where $\alpha\in\Gamma(\Omega^{0,\bullet}(\mathbf{Z},\wedge^{\bullet}\mathcal{E}))$ is determined in each case in \eqref{eq:expLvarpars}. \subsection{The transformation law for (0,2) hybrid integrals} \label{ss:02transflaw} We now turn to a proposal for a generalized transformation law for the integrals (\ref{eq:02corr}) that arise in the B/2-twisted hybrid correlators. Our derivation can be regarded as a natural generalization of the argument presented in section \ref{ss:transflaw} for (2,2) correlators. The key assumption is that there exists a section $\mathcal{B}$ of $\mathrm{Hom}(\mathcal{E}^{*},\mathcal{E}^{*})$ such that \begin{align} \mathcal{B}J&=T~, &\partial_{\psi}T&=0~, \end{align} where $T\in\Gamma(\mathcal{E}^\ast)$ satisfies the potential condition $T^{-1}(0)=B$ and it does not depend on the parameters of $J$, which we denoted collectively as $\psi$. Recall that $\mathcal{E}\rightarrow\mathbf{Z}$ is equipped with a hermitian metric $\mathcal{H}_{A\overline{B}}$. Let us define a new metric $h$ by \begin{eqnarray} \label{transfmetric} \mathcal{H}^{-1}=\mathcal{B}^{t}h^{-1}\mathcal{B}~. \end{eqnarray} Note that (\ref{transfmetric}) is not well-defined in all of $\mathbf{Z}$ since $\mathcal{B}$, in general, is not invertible at every point $x^\alpha\in\mathbf{Z}$. Nonetheless, we assume that the argument can be extended to those points as well. Then, by substituting (\ref{transfmetric}) into (\ref{eq:02corr}) we obtain the transformed correlator, which reads \begin{eqnarray}\label{inttransformed} \langle\mathcal{O}(\omega)\rangle= \int_{\mathbf{Z}}\Omega_{\mathcal{E}}\lrcorner e^{\hat{L}'}\omega~, \end{eqnarray} where \begin{eqnarray} \label{eq:hatLpr} \hat{L}'=-\frac{\mathbf{v}}{4}\|T\|^{2}_{h}+\frac{\mathbf{v}}{4}(\mathcal{B}^{t})^{A}_{ \ B }\overline{\partial}\overline{T}^{B}\partial_{A}~. \end{eqnarray} Although $\hat{L}'=\hat L$, we wish to emphasize that in \eqref{eq:hatLpr} the indices are contracted with $h$ instead of with $\mathcal{H}$, that is, \begin{align} \|T\|^{2}_{h}&:=T_{A}h^{A\overline{A}}\overline{T}_{\overline{A}}~, &\overline{T}^{B}&:=h^{B\overline{B}}\overline{T}_{\overline{B}}~. \end{align} At this point we invoke the property, shown above, that the correlators are independent of variations $\delta h^{A\overline{A}}$, and thus we argue that $h$ can be considered independent of the parameters $\psi$. In order to obtain a more explicit formula, let $\omega$ be a section of $\wedge^{q}_{p}\mathcal{E}$ satisfying $p-q=\dim\mathbf{Z}-R$, and let \begin{eqnarray} \label{eq:alphadef02} \alpha:=(\mathcal{B}^{t})^{[A_{1}}_{ \ B_{1} }\overline{\partial}\overline{T}^{B_{1}}\cdots(\mathcal{B}^{t})^{A_{k}}_{ \ B_{k} }\overline{\partial}\overline{T}^{B_{k}}\omega^{A_{k+1},\ldots,A_{R}]} \in \Gamma\left(\Omega^{0,d}(\mathbf{Z},\wedge^{R}\mathcal{E})\right)~, \end{eqnarray} where the antisymmetrization $[\cdots]$ is over the $A_{i}$ indices only, and $k:=R-q$. For ease of notation, in \eqref{eq:alphadef02} we omitted the indices corresponding to the form degree. Then, (\ref{inttransformed}) can be written as \begin{eqnarray}\label{alphaform} \langle\mathcal{O}(\omega)\rangle= \int_{\mathbf{Z}}e^{\frac{-\mathbf{v}}{4}\|T\|^{2}}\Omega_{\mathcal{E}}\lrcorner\alpha~. \end{eqnarray} Let us define\footnote{This is the analogue of the matrix $\mathcal{M}$ we defined in section \ref{ss:transflaw} for the (2,2) case.} $M$ to be the $R\times d$ matrix whose components are given by $M^{A}_{\bar{\alpha}}:= (\mathcal{B}^{t} \overline{\partial}\overline{T})^{A}_{\bar{\alpha}}$ and let $M^{\bar{\alpha}_{1},\ldots,\bar{\alpha}_{r}}_{A_{1},\ldots,A_{s}}$ be the completely skew-symmetric tensor where each component is given by the determinant of the $(R-s)\times (d-r)$ minor of $M$ obtained by removing the columns $\bar{\alpha}_{1},\ldots,\bar{\alpha}_{r}$ and the rows $A_{1},\ldots,A_{s}$. With this notation, (\ref{alphaform}) finally reads \begin{eqnarray} \label{eq:transfloafin} \langle\mathcal{O}(\omega)\rangle= \int_{\mathbf{Z}}d^{2d}xe^{\frac{\mathbf{v}}{4}\|T\|^{2}}f_{\mathbf{Z}}(x) M^{\bar{\alpha}_{1},\ldots,\bar{\alpha}_{p}}_{A_{1},\ldots,A_{q}}\omega^{A_{1},\ldots,A_{q}}_{\bar{\alpha}_{1},\ldots,\bar{\alpha}_{p}}~. \end{eqnarray} The functions $M^{\bar{\alpha}_{1},\ldots,\bar{\alpha}_{p}}_{A_{1},\ldots,A_{q}}\omega^{A_{1},\ldots,A_{q}}_{\bar{\alpha}_{1},\ldots,\bar{\alpha}_{p}}$ are $C^{\infty}$ sections of $\mathcal{O}_{\mathbf{Z}}$ with coefficients given by rational functions of the parameters $\psi$. Thus, the integral \eqref{eq:transfloafin} can be expanded as a sum of integrals where the $\psi$ dependence can be simply factored out. Unfortunately, it is not possible to derive a more explicit form for the correlators, as in (\ref{xidepen}), due to the fact that the property \eqref{eq:Mminasdets} does not hold for a generic $\mathcal{E}$, since in general ${{\text{rank}}}\ \mathcal{E}\neq \dim \mathbf{Z}$. \subsection{Instanton corrections} \label{ss:instcorrs} In the case of $(0,2)$ models, B/2 correlators may be subject to instanton corrections. In this section, we analyze the structure of Fermi zero modes in the background of a non-trivial instanton, and we derive simple selection rules for the absence of such corrections. In hybrid models, worldsheet instantons are associated to holomorphic maps from the worldsheet into $B$. These are characterized by homology classes in $H_2(B,{{\mathbb{Z}}})$. Picking a basis $\xi^a$ for $H_2(B,{{\mathbb{Z}}})$, a given homology class is determined by a set of integers $n_a$, which we denote instanton numbers. The Fermi fields of the B/2-twisted theory couple over the worldsheet to the following bundles \begin{align} \label{eq:fermizmbundles} \xymatrix@C=5mm@R=0mm{ &\psi_+^\alpha &\overline{\psi}_+^{\overline{\alpha}} &\psi_-^A &\overline{\psi}_-^{\overline{A}}\\ \text{bundle} &\overline{K}_\Sigma\otimes x^\ast T_{\mathbf{Z}} &x^\ast \overline{T}_{\mathbf{Z}} &K_\Sigma\otimes x^\ast\mathcal{E} &x^\ast\overline{\mathcal{E}}\\ \text{\# z.m.} &h^1(\Sigma,x^\ast \overline{T}_{\mathbf{Z}}) &h^0(\Sigma,x^\ast \overline{T}_{\mathbf{Z}}) &h^1(\Sigma,x^\ast \mathcal{E}^\ast) &h^0(\Sigma,x^\ast \mathcal{E}^\ast) ~, } \end{align} and the number of zero modes is computed by the appropriate cohomology group.\footnote{We emphasized in \eqref{eq:fermizmbundles} that the zero modes of $\psi_+$ and $\overline{\psi}_+$ are counted by anti-holomorphic sections of the appropriate bundles, while $\psi_-$ and $\overline{\psi}_-$ by holomorphic ones. Of course, this does not affect the dimensions of the cohomology groups.} The computation is fairly treatable given the fact that these bundles split over $\Sigma={{\mathbb{P}}}^1$ as sums of line bundles \begin{align} \label{eq:pullbacksplit} x^\ast(T_{\mathbf{Z}})&=\oplus_{\alpha=1}^d \mathcal{O}(d_\alpha)~, &x^\ast(\mathcal{E})&=\oplus_{A=1}^R \mathcal{O}(D_A)~, \end{align} where the degrees $d_\alpha,D_A$ depend on the instanton numbers $n_a$. The cohomology of $x^\ast(T_{\mathbf{Z}})$ is given by \begin{align} h^0(\Sigma,x^\ast T_{\mathbf{Z}}) &=\sum_{\alpha|d_\alpha\geq0}(d_\alpha+1) ~, &h^1(\Sigma,x^\ast T_{\mathbf{Z}}) &= \sum_{\alpha|d_\alpha<0}(-d_\alpha-1)~, \end{align} and for $\mathcal{E}^\ast$ similarly \begin{align} h^0(\Sigma,x^\ast \mathcal{E}^\ast)&=\sum_{A|D_A\leq0}(-D_A+1)~, &h^1(\Sigma,x^\ast \mathcal{E}^\ast)&=\sum_{A|D_A>0}(D_A-1)~. \end{align} Given a specific instanton background, there will be a non-trivial contribution to the correlator if we can absorb all the Fermi zero modes from the measure. From the general expression of the insertions \eqref{eq:02states}, the only possibility to soak up zero modes of $\psi_{\pm}$ is by bringing down appropriate terms from the action. There are only two terms in the action that contain these fields: the Yukawa coupling $D_\alpha J_A \psi_+^\alpha \psi_-^A$ and the curvature four-fermi term. It then follows that the contribution can only be in the form of the product $\psi_-\psi_+$. Hence, the instanton contribution must vanish unless these zero modes appear in equal number in the measure, that is, if \begin{align} \label{eq:psipsiinst} \sum_{\alpha|d_\alpha<0}(-d_\alpha-1) =\sum_{A|D_A>0}(D_A-1)~. \end{align} For the zero modes of $\overline{\psi}_{\pm}$, in addition to the four-fermi term and the Yukawa coupling $\overline{D}_{\overline{\alpha}} \overline{J}_{\overline{A}} \overline{\psi}_+^{\overline{\alpha}} \overline{\psi}_-^{\overline{A}}$, there are in general contributions from the insertion itself. Thus, the instanton contribution to the correlator $\langle \alpha \rangle_{S^2}$, where $\alpha\in\Gamma(\wedge^r_s\mathcal{E})$ vanishes unless \begin{align} r-s&=\sum_{A|D_A\leq0}(-D_A+1)-\sum_{\alpha|d_\alpha\geq0}(d_\alpha+1)~. \end{align} Combining this with \eqref{eq:psipsiinst}, and using the fact that $c_1(T_{\mathbf{Z}})+c_1(\mathcal{E})=0$, we obtain the expected relation \begin{align} r-s&={{\text{rank}}}\ \mathcal{E}-\dim\mathbf{Z}~. \end{align} If $\mathcal{E}=T_{\mathbf{Z}}$, which describes a subset of deformations of a (2,2) model, these formulae simplify considerably. Trivially $r=s$, as ${{\text{rank}}}\ T_{\mathbf{Z}}=\dim\mathbf{Z}$, while \eqref{eq:psipsiinst} becomes \begin{align} \sum_{\alpha|d_\alpha\geq 1} (d_\alpha-1) = \sum_{\alpha|d_\alpha \leq -1} (-d_\alpha-1)~, \end{align} which, using the fact that $c_1(T_{\mathbf{Z}})=0$, gives a simple selection rule, which reads \begin{align} \label{eq:psipsicondTZ} \big| \big\{ \alpha |d_\alpha \geq 1\big\}\big| = \big|\big\{ \alpha|d_\alpha \leq -1\big\}\big|~. \end{align} As a final comment, we would like to point out that these selection rules, although simple, are rather mild, and instanton corrections in a given model can still be absent even if the conditions above are satisfied. This is somewhat expected, as the discussion in this section only involves the hybrid geometry, and it is insensitive to the remaining structure of the model. In the example we are going to study next, we will see that in order to fully exclude instanton corrections we need to employ more sophisticated techniques. \subsection{A (0,2) example} We conclude this section with an example of a (0,2) hybrid. In particular, we choose a model which is obtained as a (0,2) deformation of the octic model we studied in section \ref{s:22example}. For the geometric data we choose again $\mathbf{Z}={{\text{tot}}}\left(\mathcal{O}(-2)\oplus\mathcal{O}^{\oplus3}\rightarrow {{\mathbb{P}}}^1\right)/\mathbb{Z}_{4}$ and $\mathcal{E}=T_{\mathbf{Z}}$, and $\text{U}(1)_V$ acts with charges $q_i=\frac14$, $i=1,\dots,4$ on the fiber coordinates. We choose the (0,2) superpotential \begin{align} \label{eq:02supoctu02u} J_0^u&=u^7(\phi^1_u)^4-\psi_1 \phi_u^1\phi_u^2\phi_u^3\phi_u^4~, &J_1^u&={{\frac12}}(u^8+1)(\phi_u^1)^3-\psi_1 u \phi_u^2\phi_u^3\phi_u^4~,\nonumber\\ J_2^u&= (\phi_u^2)^3 - \psi_2 u\phi_u^1\phi_u^3\phi_u^4~, &J_3^u&= (\phi_u^3)^3 - \psi_3 u\phi_u^1\phi_u^2\phi_u^4~, &J_4^u&= (\phi_u^4)^3 - \psi_4 u\phi_u^1\phi_u^2\phi_u^3~, \end{align} in the patch $U_1$, and \begin{align} \label{eq:02supoctu02v} J_0^u&=v^7(\phi^1_v)^4-\psi_1 \phi_v^1\phi_v^2\phi_v^3\phi_v^4~, &J_1^v&={{\frac12}}(v^8+1)(\phi_v^1)^3-\psi_1 v \phi_v^2\phi_v^3\phi_v^4~,\nonumber\\ J_2^v&= (\phi_v^2)^3 - \psi_2 v\phi_v^1\phi_u^3\phi_u^4~, &J_3^v&= (\phi_v^3)^3 - \psi_3 v\phi_v^1\phi_v^2\phi_v^4~, &J_4^v&= (\phi_v^4)^3 - \psi_4 v\phi_v^1\phi_u^2\phi_u^3~, \end{align} in the patch $U_2$. For generic values of the parameters, \eqref{eq:02supoctu02u} and \eqref{eq:02supoctu02v} are not integrable to a single function, thus defining a (0,2) model. When $\psi_1=\cdots=\psi_4$ we recover the (2,2) superpotential \eqref{eq:22supoct}. \subsubsection*{Instanton corrections?} The geometry of this example is fairly simple, which allows us to be explicit. Here $B={{\mathbb{P}}}^1$, thus instantons are classified by an integer $n\in{{\mathbb{Z}}}_{\geq0}$, and since we are interested in probing non-trivial instanton corrections we restrict to the case $n>0$. The splitting \eqref{eq:pullbacksplit} is given by \begin{align} x^\ast(T_{\mathbf{Z}})&=\mathcal{O}(-2n)\oplus\mathcal{O}^{\oplus3}\oplus\mathcal{O}(2n)~. \end{align} Thus, \eqref{eq:psipsicondTZ} is satisfied for each value of $n$, and it appears that the correlators do receive instanton corrections, in disagreement with \cite{McOrist:2008ji}. In order to resolve this apparent puzzle, we implement the same approach as in \cite{Sharpe:2006qd}. That is, we look for a suitable compactification of the space of worldsheet instantons, as well as a suitable extension of the sheaves \eqref{eq:fermizmbundles} over the moduli space. Following \cite{Bertolini:2017lcz}, we construct a linear model ($V^+$ model in the terminology of \cite{Morrison:1994fr}) with target space $\mathcal{O}(-2)\oplus\mathcal{O}^{\oplus3}\rightarrow {{\mathbb{P}}}^1$ by introducing the (0,2) chiral matter superfields \begin{align} \label{eq:gauchar02GLSMex} \xymatrix@R=0mm@C=3mm{ &X_1 &X_2 &P_1 &P_2 &P_3 &P_4 &\text{F.I.}\\ \text{U}(1) &1 &1 &-2 &0 &0 &0 &r } \end{align} together with a neutral chiral field $\Sigma$, with lowest component $\sigma$. We indicate by $x_{1,2}$ and $p_{1,2,3,4}$ the lowest components of the superfields $X_{1,2}$ and $P_{1,2,3,4}$, respectively, and by $r$ the F.I.~parameter. We introduce a collection of (0,2) Fermi fields with the same gauge charge assignments \begin{align} \xymatrix@R=0mm@C=3mm{ &\Gamma^1 &\Gamma^2 &\Lambda^1 &\Lambda^2 &\Lambda^3 &\Lambda^4\\ \text{U}(1) &1 &1 &-2 &0 &0 &0 } \end{align} which satisfy the chirality conditions \begin{align} \label{eq:Fermi02GLSM} \overline{\cD}\Gamma^1&=\Sigma x_1~, &\overline{\cD}\Gamma^2&=\Sigma x_2~, &\overline{\cD}\Lambda^1&=-2\Sigma p_1~, &\overline{\cD}\Lambda^2&=\overline{\cD}\Lambda^3=\overline{\cD}\Lambda^4=0~. \end{align} We choose the following assignment for the chiral symmetries \begin{align} \xymatrix@R=0mm@C=5mm{ &X_{1,2} &P_{1,2,3,4} &\Gamma^{1,2} &\Lambda^{1,2,3,4} &\Sigma \\ \text{U}(1)_L &0 &\frac14 &-1 &-\frac34 &-1 \\ \text{U}(1)_R &0 &\frac14 &0 &\frac14 &1 } \end{align} This allows us to introduce potential terms, which we take of the form $\Gamma\cdot J + \Lambda\cdot H$, where \begin{align} \label{eq:GLSMpot02} J_1 &=x_1^7 p_1^4-\psi_1 x_2 p_1p_2p_3p_4~, &J_2 &=x_2^7p_1^4-\psi_1 x_1p_1p_2p_3p_4~, \nonumber\\ H_1&= {{\frac12}}(x_1^8+x_2^8)p_1^3 - \psi_3 x_1x_2p_2p_3p_4~, &H_2&= p_2^3 - \psi_4 x_1x_2p_1p_3p_4~,\nonumber\\ H_3&= p_3^3 - \psi_3 x_1x_2p_1p_2p_4~, &H_4&= p_4^3 - \psi_4 x_1x_2p_1p_2p_3~. \end{align} For $r>0$, $x_{1,2}$ cannot simultaneously vanish, and $\sigma$ is instead forced to vanish, while the F-term constraints from \eqref{eq:GLSMpot02} require $p_1=\cdots=p_4=0$. Thus, the classical vacuum of the theory is $B={{\mathbb{P}}}^1$. In order for (0,2) supersymmetry to be unbroken, these need to satisfy the constraint\cite{Witten:1993yc} \begin{align} 0= x_1J_1+x_2J_2-2p_1H_1~, \end{align} which holds for the superpotential \eqref{eq:GLSMpot02}. The coordinates $p_{1,\dots,4}$ transform as sections of line bundles over $B$ specified by their gauge charges, $p_1\in\mathcal{O}(-2)$ and $p_{2,3,4}\in\mathcal{O}$, while the massless left-moving fermions are described by the SES \begin{align} \label{eq:SES02exTZ} \xymatrix@R=0mm@C=8mm{ 0\ar[r] &\pi^\ast\mathcal{O} \ar[r]^-{g} &\pi^\ast \mathcal{O}(1)^{\oplus2}\oplus\pi^\ast\mathcal{O}(-2) \oplus \pi^\ast \mathcal{O}^{\oplus3} \ar[r] &\mathcal{E} \ar[r]&0~, } \end{align} where $g=\begin{pmatrix} x_1 &x_2 &-2p_1 &0&0&0 \end{pmatrix}$ is determined by \eqref{eq:Fermi02GLSM}. This determines $\mathcal{E}=T_{\mathbf{Z}}$, and we have recovered our (0,2) hybrid model. The gauge instantons for this model in the phase $r>0$ are characterized by an integer $n\in{{\mathbb{Z}}}_{\geq0}$, and again we restrict to the case $n>0$. In this case, $x_{1,2}\in\Gamma(\mathcal{O}(n))$ have $n+1$ zero modes each, $p_1\in\Gamma(\mathcal{O}(-2n))$ has no zero modes, while $p_{2,3,4}\in\Gamma(\mathcal{O})$ have one zero mode each. It appears that the moduli space of instantons is therefore non-compact. However, the localization conditions need to be supplemented by $J=H=0$, which imply $p_{1,2,3,4}=0$. Thus, taking into account the quotient by the gauge action \eqref{eq:gauchar02GLSMex} we find that the moduli space is $B_n={{\mathbb{P}}}^{2n+1}$, which is indeed compact. The strategy, following \cite{Katz:2004nn}, to determine the extension of the sheaves \eqref{eq:fermizmbundles} over the moduli space $B_n$, is to expand the various Fermi fields into zero modes, and then interpret the coefficients of the expansion as line bundles over the moduli space.\footnote{If one denotes the moduli space of instantons $x:\Sigma\rightarrow \mathbf{Z}$ by $\mathcal{M}$, the universal instanton map by $\alpha:\Sigma\times \mathcal{M}\rightarrow\mathbf{Z}$ and the projection $\pi:\Sigma\times\mathcal{M}\rightarrow\mathcal{M}$, then the sheaves where the zero modes of the fermions belong are given by (possibly dual or conjugates of) $\mathcal{F}_{i}=R^{i}\pi_{*}\alpha^{*}\mathcal{E}^{*}$ and $\mathcal{G}_{i}=R^{i}\pi_{*}\alpha^{*}T_{\mathbf{Z}}$. It is crucial for this analysis to choose a compactification of $\mathcal{M}$ and an extension of these bundles over it. While there is no systematic method to do this in general, when a GLSM model is available this is indeed possible, as pointed out in \cite{Katz:2004nn,Sharpe:2006qd}.} In particular, we are interested in the extensions of the bundles $\overline{K}_\Sigma\otimes x^\ast \overline{T}_{\mathbf{Z}}^\ast$ and $K_\Sigma\otimes x^\ast\mathcal{E}$ over $B_n$. The former is determined by the zero modes of the massless right-moving Fermi fields in $X_{1,2}$ and $P_{1,2,3,4}$, which we denote collectively as $\rho_+^{\alpha'}$, $\alpha'=1,\dots,6$. The latter is parametrized by the zero modes of the massless lowest components of left-moving fields $\Gamma^{1,2}$ and $\Lambda^{1,2,3,4}$, which similarly we denote collectively as $\rho_-^{\alpha'}$. Applying this procedure to the LES\footnote{In the following all the sheaves are over $B_{n}$.} \begin{align} \xy {\ar(0.05,-13)*{};(0.05,-15)*{}}; \xymatrix@R=2mm@C=8mm{ 0 \ar[r] &\mathcal{O} \ar[r] &{\begin{matrix} \mathcal{O}(1)^{\oplus h^0(\Sigma,\mathcal{O}(n))}\\\oplus\\ \mathcal{O}(-2)^{\oplus h^0(\Sigma,\mathcal{O}(-2n))} \oplus \mathcal{O}^{\oplus3} \end{matrix}} \ar[r] & {\begin{matrix} \\ \mathcal{G}_0 \end{matrix}} \ar@{-} `d[l]`[llld] \\ 0 \ar[r] &{\begin{matrix} \mathcal{O}(1)^{\oplus h^1(\Sigma,\mathcal{O}(n))}\\\oplus\\ \mathcal{O}(-2)^{\oplus h^1(\Sigma,\mathcal{O}(-2n))}\end{matrix}} \ar[r] & \mathcal{G}_1 \ar[r]&0 } \endxy \end{align} associated to the SES \eqref{eq:SES02exTZ} and using the fact that \begin{align} H^0(\Sigma,\overline{K}_\Sigma \otimes x^\ast \overline{T}_{\mathbf{Z}}^\ast) = H^1(\Sigma, \overline{T}_{\mathbf{Z}})^\ast ~, \end{align} we have that the zero modes of $\rho_+^{\alpha'}$ couple to \begin{align} \overline{\mathcal{G}}_1^\ast&=\overline{\mathcal{O}}(2)^{\oplus (2n-1)}~. \end{align} It is often more convenient to work with holomorphic bundles, thus we can make use of a Hermitian fiber metric to dualize the bundle to $\mathcal{G}_1 = \mathcal{O}(-2)^{\oplus(2n-1)}$. For the extension sheaves of zero modes of $\rho_-^{\alpha'}$, we instead consider the LES induced by the dual of \eqref{eq:SES02exTZ}, which simplifies to \begin{align} \label{eq:LESEastinst} \xymatrix@R=0mm@C=10mm{ 0 \ar[r] & \mathcal{F}_0 \ar[r] & \mathcal{O}(2)^{\oplus(2n+1)} \ar[r]^-{\widetilde{g}=0} &\mathcal{O} \ar[r] & \mathcal{F}_1 \ar[r] & \mathcal{O}(-1)^{2(n-1)} \ar[r] &0~. } \end{align} The map $\widetilde{g}$, induced from $g$, vanishes identically because $p_1$ has no zero modes. Therefore we obtain \begin{align} \mathcal{F}_0&=\mathcal{O}(2)^{\oplus(2n+1)}~, &\mathcal{F}_1&=\mathcal{O}\oplus\mathcal{O}(-1)^{\oplus2(n-1)}~. \end{align} Now, since we have \begin{align} H^0(\Sigma,K_\Sigma \otimes x^\ast T_{\mathbf{Z}}) = H^1\left(\Sigma, T_{\mathbf{Z}}^\ast\right)^\ast~, \end{align} it follows that the zero modes of $\rho_-$ couple to $\mathcal{F}_1^\ast = \mathcal{O}\oplus\mathcal{O}(1)^{\oplus2(n-1)}$, while the zero modes of $\overline{\rho}_-$ couple to $\mathcal{F}_0$. Now, to solve the aforementioned puzzle, let us have a closer look at the term in the action $D_\alpha J_A \psi_+^\alpha \psi_-^A$, which appears it can be used to soak up $\psi_\pm$ zero modes. In our GLSM interpretation, this corresponds to a term in the action of the form $D_{\alpha'} J_{\beta'} \rho_+^{\alpha'} \rho_-^{\beta'}$, where for simplicity we have grouped the various superpotential terms $J_{\alpha'}=(J,H)$. Following the same logic as in \cite{Sharpe:2006qd}, we interpret $D_\alpha J_A$ as an element of $H^0(B_n,\mathcal{G}_1\otimes \mathcal{F}_1^\ast)$, and \begin{align} H^0(B_n,\mathcal{G}_1\otimes \mathcal{F}_1^\ast) &= H^0\left({{\mathbb{P}}}^{2n+1},\mathcal{O}(-2)^{\oplus(2n-1)} \otimes \left(\mathcal{O}\oplus\mathcal{O}(1)^{\oplus2(n-1)}\right)\right)\nonumber\\ &=H^0\left({{\mathbb{P}}}^{2n+1},\mathcal{O}(-2)\right)^{\oplus(2n-1)} \oplus H^0\left({{\mathbb{P}}}^{2n+1},\mathcal{O}(-1)\right)^{\oplus2(n-1)(2n-1)}=0~. \end{align} The other term that can be used to soak up $\psi_{\pm}$ zero modes is the 4-Fermi term $R_{\alpha\overline{B}A\bar{\beta}}\rho^{\alpha}_{+}\rho^{A}_{-}\overline{\rho}^{\overline{B}}_{-}\overline{\rho}^{\bar{\beta}}_{+}$. Again, following \cite{Sharpe:2006qd} we can interpret this term as an element in $H^1(B_n,\mathcal{G}_1\otimes \mathcal{F}_1^\ast\otimes \mathcal{F}_{0})$. Therefore we compute: \begin{align} H^1(B_n,\mathcal{G}_1\otimes \mathcal{F}_1^\ast\otimes \mathcal{F}_{0})=H^1\left({{\mathbb{P}}}^{2n+1},\mathcal{O}\right)^{\oplus(2n-1)(2n+1)} \oplus H^1\left({{\mathbb{P}}}^{2n+1},\mathcal{O}(1)\right)^{\oplus2(n-1)(4n^{2}-1)}=0~. \end{align} Thus, the terms that we are required to bring down from the action in order to soak up the relevant Fermi zero modes are trivial in cohomology, and they cannot contribute to the correlator. Hence, we conclude that no instanton corrections are possible for our example, in agreement with \cite{McOrist:2008ji}. Although in our (0,2) octic hybrid example a simple zero mode counting could not rule out instanton contributions, our selection rules prove themselves useful in some non-trivial model. A nice example \cite{Aspinwall:2010ve} is the hybrid geometry $\mathbf{Z}={{\text{tot}}}\left(\mathcal{O}(-1)^{\oplus2}\oplus\mathcal{O}^{\oplus2}\rightarrow {{\mathbb{P}}}^1\right)$ and $\mathcal{E}=T_{\mathbf{Z}}$, with $\text{U}(1)_V$ charge assignment $q_i=1/4$ for the fiber coordinates. The analysis of the corresponding linear model \cite{McOrist:2008ji} does not rule out instanton corrections. However, from our hybrid perspective, it is obvious that \eqref{eq:psipsicondTZ} cannot be satisfied and thus instanton corrections are absent in the B/2 model correlators. \subsubsection*{B/2 correlators} Let us now turn to the computation of the correlators, where for simplicity we restrict our attention to bottom row insertions. A choice of representatives for the cohomology classes of the B/2 chiral ring is still described by \eqref{eq:geninsertion}. It has been shown in \cite{Bertolini:2013xga} that for this class of $J$-deformations, for which $\mathcal{E}=T_{\mathbf{Z}}$, the dimension of the heterotic topological ring does not jump, and it agrees with its value at the (2,2) locus. Thus, we can carry out the computation for any choice of non-singular superpotential $J$, in particular at $\psi_{1,2,3,4}=0$, where it becomes isomorphic to our computation in section \ref{s:22example}. That is, $\alpha = \mathcal{O}_1\mathcal{O}_2\mathcal{O}_3$, where $\mathcal{O}_{1,2,3}\in H_{\overline{\bQ}_+}(\mathbf{Z},\mathcal{O}_{\mathbf{Z}})$, assumes again the form \begin{align} \label{eq:02exins} \alpha = u^{t_0}(\phi^1)^{t_1}(\phi^2)^{t_2}(\phi^3)^{t_3}(\phi^4)^{t_4}~, \qquad\qquad t_\alpha\geq0~. \end{align} Here the charge condition implies $t_1+\cdots+t_4=12$, and the condition that this is a restriction to the patch $U_1$ of the product of sections of the trivial bundle $\mathcal{O}_{\mathbf{Z}}$ forces $t_0\leq 2t_1$. Moreover, there exists $\mathcal{B}\in \Gamma(T_{\mathbf{Z}}\otimes T^\ast_{\mathbf{Z}})$ such that \begin{align} \label{eq:02translawTJ} T_I=\mathcal{B}_{I}^{ \ J}J_J = \begin{pmatrix} u^{25}\phi_1^{13} &{{\frac12}}(u^{26}+1)\phi_1^{12} &\phi_2^{13} &\phi_3^{13} &\phi_4^{13} \end{pmatrix}^\top~. \end{align} Note that although this is a section of the same bundle $\mathcal{E}=T_{\mathbf{Z}}$, and $T$ is given by the same expression as in the (2,2) case, $\mathcal{B}$ is necessarily a different section, as it depends on the parameters $\psi_1,\dots,\psi_4$. We report it in appendix \ref{app:transflawoct}, and we represent its determinant as \begin{align} \det\mathcal{B} = \sum_{m_0,\dots,m_4\geq0} \tilde{f}_{m_0,\dots,m_4}(\psi_1,\dots,\psi_4)u^{m_0} (\phi^1)^{m_1}(\phi^2)^{m_2}(\phi^3)^{m_3}(\phi^4)^{m_4}~. \end{align} Integrating over the fiber phases $\arg(\phi^i)$ we have that the only contribution to the integral is \begin{align} \alpha \det\mathcal{B} = \sum_{m_0,\dots,m_4\geq0} \tilde{f}_{m_0,\dots,m_4}(\psi_1,\dots,\psi_4)u^{m_0+t_0}(\phi^1)^{24}\left(\prod_{a=2}^4(\phi^a)^{12}\right) \delta_{m_1+t_1,24}\left(\prod_{a=2}^4\delta_{m_a+t_a,12}\right)~. \end{align} Putting all together, and integrating over $\arg(u)$, where we make use of \eqref{eq:antiholmdepub}, we obtain \begin{align} \langle \alpha \rangle_{S^2} = \tilde{f}_{24-t_0,24-t_1,12-t_2,12-t_3,12-t_4}(\psi_1,\dots,\psi_4)~. \end{align} As an example, we see that \begin{align} \langle \det {{\text{Hess}}} W\rangle_{S^2} = \frac{1}{1-\psi_1^2\psi_2^2\psi_3^2\psi_4^2}~. \end{align} When $\psi_1=\cdots=\psi_4=\psi$ we recover the (2,2) correlator \eqref{eq:dethess22}. More generally, for each insertion of the form \eqref{eq:02exins} we obtain the structure \begin{align} \langle \alpha \rangle_{S^2} = \frac{\psi_1^{v^{\alpha}_1}\psi_2^{v^{\alpha}_2}\psi_3^{v^{\alpha}_3}\psi_4^{v^{\alpha}_4}}{1-\psi_1^2\psi_2^2\psi_3^2\psi_4^2}~, \end{align} where $v^\alpha_i$ are non-negative integers that depend on the form of the insertion $\alpha$. In particular, we have that for this class of (0,2) deformations the discriminant is the locus $\psi_1^2\psi_2^2\psi_3^2\psi_4^2=1$, which determines the locus where the condition $J^{-1}(0)=B$ fails to be satisfied. To check our results we invoke again the GLSM. In particular, our (0,2) hybrid arises in a phase of a linear model which is obtained as a (0,2) deformation of the (2,2) GLSM we studied in section \ref{s:22example}. In particular, the phase structure is unaltered by the class of deformations considered, and in the cone $r_2<0,2r_1+r_2<0$ the model exhibits a LG phase, where the hybrid (0,2) superpotential \eqref{eq:02supoctu02u} corresponds to the LG (0,2) superpotential \begin{align} \label{eq:02supoctuLG} J^{\text{LG}}_2&= x_2^3 - \psi_2 x_3x_4x_5x_6~, &J^{\text{LG}}_3&= x_3^3 - \psi_3 x_2x_4x_5x_6~, &J^{\text{LG}}_4&= x_4^3 - \psi_4x_2x_3x_5x_6~,\nonumber\\ J^{\text{LG}}_5&=x_5^7 - \psi_1 x_2x_3x_4x_6 &J^{\text{LG}}_6&=x_6^7 - \psi_1 x_2x_3x_4x_5~. \end{align} The B/2 ring in this phase is described by $R={{\mathbb{C}}}[x_2,\dots,x_6]/\langle J_{\text{LG}}\rangle$. Invariance under the ${{\mathbb{Z}}}_8$ orbifold action implies that good representatives for the ring are given again by \eqref{eq:LGchirringel} and the correspondence between hybrid and LG operators is quite straightforward \begin{align} \label{eq:cxstrGLSM02} \mathcal{O}_{\text{LG}}=\prod_{a=2}^4 x_a^{l_a} x_5^{l_5}x_6^{l_6}\quad \longleftrightarrow\quad \mathcal{O}_{\text{HY}} = u^{l_5}(\phi^1)^{(l_5+l_6)/2}\prod_{a=2}^4 (\phi^a)^{l_a} ~. \end{align} By applying the methods of \cite{McOrist:2007kp} we verify explicitly that the following holds \begin{align} \langle \mathcal{O}^1_{\text{HY}} \mathcal{O}^2_{\text{HY}} \mathcal{O}^3_{\text{HY}} \rangle_{S^2} = \langle \mathcal{O}^1_{\text{LG}}\mathcal{O}^2_{\text{LG}}\mathcal{O}^3_{\text{LG}}\rangle = \text{Res}\left\{ \frac{\mathcal{O}^1_{\text{LG}}\mathcal{O}^2_{\text{LG}}\mathcal{O}^3_{\text{LG}}}{J^{\text{LG}}_2 \cdots J^{\text{LG}}_6} \right\}~. \end{align} Again, up to a numerical factor, we find a complete agreement between these sets of correlators. \subsubsection{Bundle deformations and $E$-parameters dependence} The hybrid model offers another set of deformations off the (2,2) locus. Namely, we can take $\mathcal{E}$ to be a deformation of $T_{\mathbf{Z}}$. As an example, we can take $\mathcal{E}_\epsilon=\mathcal{O}^{\oplus3}\oplus \mathcal{E}'_\epsilon$, where $\mathcal{E}'_\epsilon$ is a one-parameter family of rank 2 bundles with transition functions given by \begin{align} G_{uv}=\begin{pmatrix} -v^{-2} & 2v\epsilon \phi_v^1\\ 0 & v^{2} \end{pmatrix}~. \end{align} In particular $\mathcal{E}_{\epsilon=1}=T_{\mathbf{Z}}$. Of course, $J\in\Gamma(\mathcal{E}^\ast_\epsilon)$ depends on the parameter $\epsilon$. However, one can show that \begin{enumerate} \item the dimension of $\mathcal{H}_{\text{B/2}}$ is independent of $\epsilon$; \item the number of parameters of $J$, which we collectively denote $\psi$, is independent of $\epsilon$. \end{enumerate} A natural question is then the following: is $\epsilon$ actually a parameter of the B/2-twisted theory? From the hybrid perspective the answer seems to be yes, as any correlation function $\langle\alpha\rangle_{S^{2}}$ will be a function of $\psi$ as well as of $\epsilon$. This is somewhat puzzling when we interpret our result from the GLSM perspective. In fact, parameters defining the bundle $\mathcal{E}\rightarrow\mathbf{Z}$ arise as $E$-parameters in the GLSM construction\cite{Witten:1993yc}. These are the natural parameters that appear in A/2-model computations, and their appearance in B/2-model correlators was ruled out in a class of theories, including our example, in \cite{McOrist:2008ji}. It then appears that from the hybrid perspective, B/2-model correlators do depend on these. The resolution of the apparent puzzle resides in taking into consideration the action of field redefinitions in the linear model. In fact, at the level of the GLSM, it is always possible to perform a field redefinition absorbing the parameter $\epsilon$. Hence, in the hybrid phase of the GLSM obtained after performing such a field redefinition we have $\epsilon=1$, i.e., $\mathcal{E}=T_{\mathbf{Z}}$. In other words, the hybrid model defined by $(\mathcal{E}_\epsilon,J_{\epsilon})$ is equivalent to the model $(\mathcal{E}_{\epsilon=1},\widetilde{J})$, where $\widetilde{J}$ is not necessarily equal to $J_{\epsilon=1}$. While this equivalence is evident at the level of the linear model, it would be interesting to investigate it in the hybrid model directly. \section{Discussion} \label{s:outlook} In this work we have started an analysis of the $S^{2}$ B-type (and B/2-type) correlators in (2,2) and (0,2) hybrid models. Some features of these correlators have been already studied for a different class of (2,2) hybrid models in \cite{Guffin:2008kt}. In fact, the treatment there applies only when $dW^{-1}(0)=0$ is a complete intersection and, moreover, their explicit formulae require the points $dW^{-1}(0)=0$ to be non-degenerate. Both of these conditions are not satisfied generically in the class of hybrid theories studied in this work. For instance, the octic example studied at length in this work does not satisfy this second criterion. More relevant to us are the properties of the correlators studied in \cite{Garavuso:2013zoa}. There, the authors propose Mathai-Quillen like forms for (0,2) and (2,2) correlators, for both B- and A-twist. To make connection with our notation, the Mathai-Quillen like form allows to write integrals over $B$ of products of elements in $\mathbf{\overline{Q}}$-cohomology as integrals over $\mathbf{Y}$ (of appropriately defined lifts of the insertions). From our perspective, this can be achieved by integrating along the fibers. It would be interesting to give a more thorough connection between their results and ours. We also find an interesting connection with the work \cite{2015arXiv150204872S}. There, the author defines the Koszul-De Rham complex, which is an extension of the usual De Rham complex by auxiliary commuting and anti-commuting variables. This is a bi-complex with differentials $(d_{DR},\partial_{\mathcal{K}})$ that can be identified as $d_{DR}\rightarrow\mathbf{Q}_{-}+\mathbf{\overline{Q}}_{0}$ and $\partial_{\mathcal{K}}\rightarrow \overline{\mathbf{Q}}_{W}$ acting on $\rho_{\alpha},x^{\alpha},\bar{x}^{\bar{\alpha}}, \bar{\psi}_{-,\alpha}$ and $J_{\alpha}$. Another connections with recent mathematical work can be found in \cite{2014arXiv1409.5996K}. In this work, the authors study hybrid models in the context of homological mirror symmetry of Fano manifolds and define different classes of Hodge numbers associated to a hybrid. It would be interesting to elucidate the physical interpretation of these invariants. A natural extension of this work would be to consider the cases when $\partial \Sigma\neq \emptyset$ and the theory admits boundary conditions corresponding to B-branes. This situation is considered, in the (2,2) case, in \cite{Lazaroiu:2003zi,Herbst:2004ax,Babalic:2016mbw}. It would be interesting to extend the constructions of this paper to correlators involving B-branes, or more in general defects, in particular to the situation where the orbifold action is non-trivial. We hope to return to these cases in a sequel. On a more technical note, our results fall short in a number of ways. First, it would be important to give a formal proof of the transformation law we proposed for non-trivial hybrid models. Second, it would be illuminating to posses a residue formula where the integration is over a holomorphic cycle over $\mathbf{Y} \backslash B$. Third, even without a residue formula, it would be important nonetheless to have a technique to evaluate the integrals that arise in our correlators. In fact, while for simple examples we managed to elude this, in order to compute the full dependence in more complicated situations (see for instance \eqref{eq:TTTcorr}) this seems to be a unavoidable. \\\\ \textbf{Acknowledgments}. We would like to thank P.~Aspinwall, F.~ Benini, K.~Hori, M.~Kapranov, S.~Lee, I.~Melnikov, R.~Plesser, D.~Pomerleano, E.~Sharpe and T.~Spencer for enlightening discussions. We would also like to thank I.~Melnikov, R.~Plesser and E.~Sharpe for helpful comments on the manuscript. MB and MR would like to thank the Perimeter Institute for Theoretical Physics and the respective institutions for hospitality while part of this work has been performed. We thank the physics department at Duke University for allowing MB to present a preliminary version of this work. We also thank KIAS, Steklov Mathematical Institute, the mathematics department of Higher School of Economics and YMSC at Tsinghua University for their hospitality during the final stages of this work. MB is supported by NSF Grant PHY-1521053. MR gratefully acknowledges the support of the Institute for Advanced Study, DOE grant DE-SC0009988 and the Adler Family Fund. This work was supported by World Premier International Research Center Initiative (WPI Initiative), MEXT, Japan.
\section{Introduction} Authentication, or the ability to verify the identity of the sender of received transmissions, is crucial in secure communications. It is especially important in the wireless channel where malicious parties have easy access to all nodes and can attempt to intercept messages and impersonate legitimate senders. While cryptographic authentication methods are very practical, they are limited to computational complexity as the basis for security. The first information theoretic analysis of authentication was done by Simmons \cite{Auth} for the noiseless channel in which it was shown that an opponent's attack success probability is lower bounded by $ 2^{-n\kappa/2} $ when the legitimate parties share a key of length $ n\kappa $. Similar to coding for secrecy in the wire-tap channel, an authentication constraint can be added to a channel code. In \cite{Maurer00a}, Maurer likened authentication to a binary hypothesis test for whether a received message is authentic versus inauthentic. Naturally then, an authentication code would have a decoder that groups certain observations as authentic and others as inauthentic in addition to mapping to possible codewords. A larger authentic set would allow for an increase in rate since fewer observations would be thrown out as inauthentic, but would allow an adversary to more easily send messages that would be falsely authenticated. It is because of this that the additional constraint on the code should lead to a trade-off between rate and authentication capabilities in our inner bound. In \cite{lai2009authentication}, Lai et. al. presented a code for noisy channels with authentication capabilities and concluded that if the main channel is not less noisy than the adversary, it is possible to limit the attack success probability to $ 2^{-n \kappa} $ with a shared key $ K $ of length $ n\kappa $. Although it was shown that the communication rate is unaffected if $ n\kappa $ is small, their analysis is only concerned with cases where $n\kappa$ is a constant independent of $n$. Gungor and Koksal \cite{gungor2016basic} explored a more general problem and presented an inner bound on the achievable rate with error and erasure exponents for impersonation and substitution attacks both with and without a shared key. We consider the model of~\cite{lai2009authentication}, while not requiring a constant $n\kappa$ and determine an inner bound that improves upon Gungor and Koksal's coding scheme. Of interest is that the coding scheme can be decomposed into two separate coding schemes, one for source authentication and one for channel authentication. A direct proof is given for the region while the converse is left for future work. If the converse were true, it would prove that authentication under the operational requirements is a limited resource, and that this resource and the message rate must linearly share the channel's capacity. Our contributions are as follows. First, for all DM-ASC$(t,q,1)$, a substitution channel, defined in Section \ref{sec:model}, we give an inner bound on the trade-off between the rate $r$, the key rate $\kappa$, and the average type I error exponent $\alpha$, when the average probability of message error, $\epsilon$, must go to zero with block length $n$ going to infinity. The average type I error exponent is a measure of authentication ability and is defined in Section \ref{sec:metrics}. It should be noted that this measure of authentication subsumes both the ``impostor'' and ``substitution'' attack. Our inner bound is characterized in terms of (in principal) computable information theoretic measures in the form of an inner bound. The derived region subsumes the results of Lai et. al. \cite{lai2009authentication} in which only an asymptotically vanishing key rate is considered. The inner bound is also a strict improvement over the bounds found in Gungor and Koksal \cite{gungor2016basic}. Our scheme benefits from higher communication rates and less key leakage. \iftoggle{arxiv}{}{Due to space limitations the proofs can be found in~\cite{perazzone2018inner}.} \section{Notation, Model, and Metrics}\label{sec:notations} \subsection{Notation} Random variables and their realizations will be denoted by uppercase and lowercase letters, respectively. The support set of a random variable and other sets are denoted by a calligraphic font. An $ n $-length sequence of random variables, realizations, or sets will be denoted by superscript $ n $. So, $ X^n $ is a $n$-length sequence of random variables which may take on values $ x^n \in \mathcal{X}^n.$ The probability $X = x$ is denoted $ \Pr (X=x) $, or $ p_{X}(x)$, and even $ p(x )$ when clear. The probability of a set is written as $ p_{X}(\mcf{A})=\sum_{x \in \mcf{A}} p(x)$, assuming $ \mcf{A} \subseteq \mcf{X} $ where the set will often be omitted from the summation notation when it is clear, i.e., $ \sum_{x} $. The set of all probability distributions on a certain set, say $\mcf{X}$, is denoted by $\mcf{P}(\mcf{X})$. Similarly, the set of probability distributions of $\mcf{Y}$ conditioned on $\mcf{X}$ is denoted as $\mcf{P}(\mcf{Y}|\mcf{X})$. The set $\mcf{P}(\mcf{Y}\gg \mcf{X})$ represents a special subset of $\mcf{P}(\mcf{Y}|\mcf{X})$, where if $v \in \mcf{P}(\mcf{Y} \gg \mcf{X})$ for any $y \in \mcf{Y}$, there exists at most one $x \in \mcf{X}$ such that $v(y|x) > 0$. Note, for random variables $X,Y,Z$, if $p_{Y|X} \in \mcf{P}(\mcf{Y}\gg \mcf{X})$, then $X,~Y,~Z$ form a Markov chain, $X \markov Y \markov Z$. A superscript of $\otimes n$ will denote the $n$-fold product distribution of $v$. The use of $O$ will refer to the Bachmann-Landau notation. When there is a range of possible values for $ O $, we will use $\dot =$ to denote it. Throughout the paper, the order will only be dependent on continuous functions of the cardinalities of the support sets. \subsection{Model}\label{sec:model} \begin{figure} \centering \includegraphics[scale=.35]{figures/channelDiagramWithSwitch2} \caption{Channel Model} \label{fig:model} \end{figure} Our authentication model consists of three parties. Alice, a legitimate transmitter, wishes to authenticate her communications with Bob, a legitimate receiver, over a discrete memoryless channel in the presence of Gr{\'i}ma, a malicious adversary. Gr{\'i}ma has the ability to intercept Alice's message and send his own to Bob via a noiseless channel. His goal is to have Bob accept his messages as if they were from Alice. To aid in authentication, Alice and Bob share a secret key $ K $ which is distributed uniformly over $ \mcf{K} : = \set{1, \dots, 2^{n \kappa}} $. When Alice wishes to communicate, she jointly encodes a message $ M $, distributed uniformly over $ \mcf{M} : = \set{ 1, \dots, 2^{n r}} $, and the key $ K $, as codeword $ X^n $. The distribution of $ X^n $ is defined by the encoder $ f \in \mcf{P}(\mcf{X}^n|\mcf{M} ,\mcf{K}) $, where $ \mcf{P}(\mcf{X}^n|\mcf{M}, \mcf{K}) $ is the set of all probability distributions over $ \mcf{X}^n $ conditioned on $ \mcf{M}\times \mcf{K} $. Alice then transmits $ X^n $ to both Bob and Gr{\'i}ma. The three parties are connected via a \emph{discrete memoryless-adversarial substitution channel} (DM-ASC) which consists of three discrete memoryless channels, $(t,q,\tilde t)$, and a Gr{\'i}ma-controlled switch. The triple represents the channels from Alice to Bob, Alice to Gr{\'i}ma, and Gr{\'i}ma to Bob, respectively, while the switch controls Bob's observations. Note that for simplicity, we use the triple $ (t,q,\tilde t) $ instead of the formal septuple $ (\mcf{X}, \mcf{Y},\mcf{Z},\mcf{\tilde X},t,q,\tilde t) $, assuming that these values specify $ \mcf{X},~\mcf{Y},~\mcf{Z},~\mcf{\tilde X} $ by their non-zero indices. Furthermore, we will assume for the remainder that $ \mcf{X},~\mcf{Y},~\mcf{Z},~\mcf{\tilde X} $ are all discrete and finite. The channel is depicted in Figure \ref{fig:model}. When the switch is open, Bob will receive Alice's transmission over $ t $. In other words, $Y^n|X^n$ will be distributed according to $t^{\otimes n}(y^n|x^n) := \prod_{i=1}^n t(y_i|x_i)$ where $t \in \mcf{P}(\mcf{Y}|\mcf{X})$. When the switch is closed, Gr{\'i}ma first obtains $Z^n|X^n$, then determines $\hat X^n$ and transmits to Bob. We only consider $ (t,q,1) $ in which the channel from Gr{\'i}ma to Bob is noiseless, i.e. $ \mcf{\tilde X} = \mcf{Y} $, as in \cite{lai2009authentication,gungor2016basic}. Thus, $Y^n|X^n$ will be distributed according to \[ \sum_{z^n} \psi(y^n|z^n) q^{\otimes n}(z^n|x^n), \] where $ q\in \mcf{P}(\mcf{Z}|\mcf{X}) $, and $ \psi \in \mcf{P}(\mcf{Y}^n|\mcf{Z}^n) $. Gr{\'i}ma is free to choose any attack strategy, $ \psi $, including ones modeled after the standard impersonation and substitution attacks. Regardless of the switch's position, Bob receives $Y^n$ and either makes an estimate of the message, $ M^* $, or declares an intrusion, $ \mbf{!} $, which is determined by a decoder $ \varphi \in \mcf{P}(\mcf{M}\cup \set{\mbf{!}} |\mcf{Y}^n, \mcf{K}) $. \subsection{Performance Metrics}\label{sec:metrics} Before presenting the performance metrics, we define an authentication code. \begin{define}\label{def:code} A \emph{code} is any pair $(f,\varphi)$, where $f \in \mcf{P}(\mcf{X}^n |\mcf{M} , \mcf{K})$ and $\varphi \in \mcf{P}(\mcf{M} \cup \set{\mbf{!}} |\mcf{Y}^n , \mcf{K})$. The \emph{rate} of $(f,\varphi)$ is $n^{-1} \log_{2} \abs{\mcf{M}}$, the \emph{block-length} of $(f,\varphi)$ is $n$, and the \emph{key requirement} of $(f,\varphi)$ is $n^{-1} \log_{2} \abs{\mcf{K}}$. \end{define} The performance of the code is measured in two ways, reliability and type I error. Reliability is measured by the average probability of error over all keys and messages at Bob, that is \begin{equation}\label{eq:int:rel} \varepsilon_{f,\varphi} : = \abs{\mcf{K}}^{-1} \abs{\mcf{M}}^{-1} \sum_{m,k} \varepsilon_{f,\varphi}(m,k) < \epsilon , \end{equation} where $ \epsilon \in (0,1) $ is a chosen constraint and \begin{equation} \varepsilon_{f,\varphi}(m,k) : = 1-\sum_{x^n, y^n } \varphi(m|y^n,k) t^{\otimes n} (y^n|x^n) f(x^n|m,k). \end{equation} Type I error refers to the fact that authenticating is equivalent to a binary hypothesis test where the null hypothesis is an intrusion and the alternate hypothesis is authenticity. Therefore, a good code limits the average type I error by \begin{equation}\label{eq:int:at1e} \omega_{f,\varphi} : = \max_{\psi \in \mcf{P}(\mcf{Y}^n|\mcf{Z}^n)} E_{Z^n,M,K} \left[ \omega_{f,\varphi}(\psi,z^n,m,k) \right] \leq 2^{-na}, \end{equation} where \begin{equation} \omega_{f,\varphi}(\psi,z^n,m,k) : = \sum_{y^n} \psi(y^n|z^n) \varphi(\mcf{M} - \set{m} |y^n,k ). \end{equation} \begin{define}\label{def:average code} A code $(f,\varphi)$ is called an $(r,\alpha,\kappa,\epsilon,n)$-\emph{average authentication} (AA) code for DM-ASC$(t,q,1)$ if the block-length is $n$, the rate at least $r$, the key requirement at most $\kappa$, it is reliable in that $\varepsilon_{f,\varphi}< \epsilon$ and it satisfies the average authenticity requirement: \begin{align}\label{eq:average_auth} \omega_{f,\varphi} < 2^{-n \alpha}. \end{align} \end{define} Our study aims to determine what types of codes are possible in the following sense. \begin{define} A triple $(a,b,c)$ is said to be \emph{achievable} for the DM-ASC $(t,q,1)$ if there exist a sequence of $\set{(r_i,\alpha_i,\kappa_i,\epsilon_i,i)}_{i=1}^\infty $-AA codes $(f_i,\varphi_i)$ such that \[ \lim_{i \rightarrow \infty} \abs{ (r_i,\alpha_i,\kappa_i,\epsilon_i,i) - (a,b,c,0,i)}_2 \rightarrow 0. \] The \emph{average authentication region} (AAR) is then \begin{align} \mcf{C}_{A}&(t,q,1) \nonumber\\ &: = \set{(a,b,c) : (a,b,c) \text{ is achievable for DM-ASC}(t,q,1) }. \end{align} \end{define} \section{Background}\label{sec:background} Before presenting the inner bound for the average authentication region, we review existing schemes. First, we review Lai's \cite{lai2009authentication} strategy and frame it in terms of information metrics for ease of comparison. Next, we examine Simmons' \cite{Auth} strategy for the noiseless channel and transform Gungor and Koksal's \cite{gungor2016basic} inner bound into our terms. \subsection{Lai's Strategy}\label{sec:lai_review} In \cite{lai2009authentication}, Lai et. al. propose essentially using a code designed for a wire-tapper channel, and sending the key as part of the message. The specific code they proposed is optimal for their limited scenario (key requirement $\rightarrow 0$), but in light of the forthcoming discussion, it is not optimal in ours. Recognizing that the essence of the construction is to transmit two independent messages (the message itself and the key), with one subject to a secrecy constraint, the most logical coding scheme is a special class of codes for the \emph{discrete memoryless broadcast channel with confidential communications (t,q,)} (DM-BCC$ (t,q) $). While we are the first to notice and use this specific construction for the purpose of authentication, we refer to this as Lai's strategy. Before continuing we discuss the DM-BCC. The achievable rate region of the DM-BCC was first derived by Csisz{\'a}r and K{\"o}rner in \cite{csiszar1978broadcast} and later refined in \cite[Chapter~17]{CK}. In said model, there exist three messages that Alice wishes to send, a common message, $ m_0 \in \mcf{M}_0 : = \set{1,\dots,2^{nr_0}} $, that is to be decoded by both Bob and Gr{\'i}ma, a private message, $ m_s \in \mcf{M}_s : = \set{1, \dots, 2^{nr_s}} $, that is to be decoded by Bob and kept secret from Gr{\'i}ma, and finally a message, $ m_1 \in \mcf{M}_1: = \set{1,\dots,2^{nr_1}} $, to be decoded by only Bob, but without a secrecy constraint. Secrecy in this context is indicated by \[ \msf{I}( p_{Z^n|M_s},p_{M_s} ) \leq \epsilon_n, \] where $\epsilon_n \rightarrow 0$ as $n\rightarrow \infty$. Meaning that the information gained about $ M_s $ from Gr{\'i}ma's observations asymptotically vanishes. All messages have reliability constraints for their intended recipients. The three messages are jointly coded as $ X^n $ and sent through the channel where Bob observes $ Y^n | X^n $, which is distributed as $ t^{\otimes n}(y^n|x^n) $ while Gr{\'i}ma observes, $ Z^n | X^n $, distributed as $ q^{\otimes n}(z^n|x^n) $. The triple $(r_0,r_s,r_1)$ is achievable for the DM-BCC$ (t,q)$ if \begin{align*} r_0 + r_s + r_1 &\leq \msf{I}(t\rho ,\sigma |\tau ) + \min \left( \msf{I}(t\rho\sigma,\tau), \msf{I}(q\rho\sigma,\tau) \right)\\ r_s &\leq \msf{I}(t\rho,\sigma|\tau)- \msf{I}(q\rho,\sigma|\tau) \\ r_0 &\leq \min \left( \msf{I}(t\rho\sigma,\tau), \msf{I}(q\rho\sigma,\tau)\right) , \end{align*} for some $\rho \in \mcf{P}(\mcf{X}|\mcf{U})$, $\sigma \in \mcf{P}(\mcf{U} \gg \mcf{W})$ and $\tau \in \mcf{P}(\mcf{W})$, and sets $\mcf{U}$ and $\mcf{W}$ such that $\abs{\mcf{U}} = (\abs{\mcf{X}}+1)(\abs{\mcf{X}}+3)$ and $\abs{\mcf{W}} = \abs{\mcf{X}}+3$. It can be seen here that secrecy is only possible when the channel from Alice to Gr{\'i}ma's is not less noisy than the channel from Alice to Bob. Lai's strategy attains authentication capabilities by implementing the coding scheme for the DM-BCC$ (t,q) $ in which Alice's message is sent as $ M_1 $ and the key is sent as $ M_s $ while $ M_0=\emptyset $. If message rates are chosen within the achievable region above, Bob will decode the message reliably, satisfying the reliability constraint of an authentication code. Additionally, since the key is also reliably decoded and each $ y^n $ corresponds to only one $ k $, he can declare authenticity when $ \hat k = k $. The security constraint on $ M_s=K $ reduces the information about the key that is leaked to Gr{\'i}ma; the analysis of our work will determine the degree of effectiveness. As stated before, non-zero rates are only possible when $ t $ is less noisy than $ q $, i.e. when $ \msf{I}(t\rho,\sigma|\tau) > \msf{I}(q\rho,\sigma|\tau) $. To solve this issue, we return to Simmons' strategy for the noiseless case. \subsection{Simmon's Strategy} Simmons' authentication scheme \cite{Auth} for noiseless channels breaks down the problem into protecting against two different attacks, i.e., an impostor formerly referred to as ``impersonation'' attack and a substitution attack. The attacks differ in that in the former, Gr{\'i}ma attacks without first observing one of Alice's transmissions, while in the latter, Gr{\'i}ma does. In the strategy, the code is created by independently and randomly choosing $ |\mcf{K}|=2^{n\kappa} $ not necessarily unique subsets of $ \mcf{M} $, each denoted as $ \mcf{M}(k) \subset \mcf{M} $. The size of each subset is $ |\mcf{M}(k)|=2^{-n\kappa/2} |\mcf{M}| $ where each element $ m \in \mcf{M}(k) $ corresponds to a single message $ \tilde m \in \mcf{\tilde M} : = \set{1 , \dots, \abs{\mcf{M}}2^{-n \kappa/2} } $. Then, to communicate $ \tilde{m} $, Alice sends the associated $ m $ from the subset indexed by their shared key, $ k $. Bob authenticates a message when the observed $ m $ is an element of the correct $ \mcf{M}(k) $. The rate of communication in this scheme is $ n^{-1} \log_{2} \abs{\mcf{\tilde M}} = n^{-1} \log_{2} \abs{\mcf{M}} - \kappa/2 $. Since an observed $ m $ can be contained in multiple $ \mcf{M}(k) $, Gr{\'i}ma will be unable to immediately infer which key was used for authentication. In order to launch a successful substitution attack, Gr{\'i}ma must choose an $ m' \neq m $ that is contained in the same $ \mcf{M}(k) $, however on average there is only $\abs{\mcf{K}} ( \abs{\mcf{M}(k)} /\abs{\mcf{M}})^2 = 1$ subset that contains both $ m $ and $ m' $. Therefore, he must essentially guess the correct key to fool Bob which happens with probability $ 2^{-n \kappa/2} $ since there are, on average, $ \abs{\mcf{K}} ( \abs{\mcf{M}(k)} /\abs{\mcf{M}}) = 2^{n\kappa/2} $ subsets that contain $ m $. In terms of an achievable rate region, this scheme can achieve the triple $(n^{-1} \log_{2} \abs{\mcf{M}} - \kappa/2, \kappa/2, \kappa)$. Simmons' strategy, together with Lai's strategy, forms the basis for our code. \subsection{Gungor and Koksal's Bounds} Inner bounds for the average achievability region of a DM-ASC$(t,q,\tilde t)$, have been established by Gungor and Koksal~\cite{gungor2016basic}. Specifically, their scheme splits Alice and Bob's shared key into two smaller keys, one for authentication ({\'a} la Lai's strategy) and one for secrecy. These two keys are then used as the dimensions in a two dimensional dimensional binning process, where the codeword corresponding to the triple of messages and keys is chosen independently. The independent choice over the secrecy key, though, leaks extraneous information since there is no need to differentiate between secrecy keys at the legitimate receiver. In any case, the set of all achievable $(r,\alpha, \kappa)$ derived from their scheme is a subset of \begin{equation}\label{eq:reg_gungor} (r,\alpha , \kappa) \in \bigcup_{\tilde \kappa \in \mathbb{R}_+ } \mcf{R}_{G}(\tilde \kappa) \end{equation} where $ \mcf{R}_{G}(\tilde \kappa)$ \begin{equation}\label{eqn:gungorregion} : = \set{ r,\alpha,\kappa : \setlength\arraycolsep{.75pt}\begin{matrix*}[l] r+ \kappa &\leq \msf{I}(t\rho,\tau) + \tilde \kappa \\ \alpha - \kappa &\leq - \tilde \kappa \\ \alpha &\leq \min_{\nu \in \mcf{P}(\mcf{Z}|\mcf{U}) } \msf{L}_{G}(\nu,q\rho, t\rho, \tilde \kappa, \tau) \end{matrix*}} \end{equation} and $ \msf{L}_{G}(\nu,q\rho, t\rho, \tilde \kappa, \tau) = \msf{D}(\nu||q\rho|\tau) + \left| \tilde \kappa + \msf{I}(t\rho,\tau) - \msf{I}(\nu,\tau) \right|^+$. A proof of this can be found in \iftoggle{arxiv}{Appendix \ref{app:GungorRegion}.}{~\cite[Appendix A]{perazzone2018inner}.} \section{Authentication Capacity Region}\label{sec:thms} We now present our main theorems and the inner bound of the average authentication region. First, we present the minor contribution of characterizing the inner bound of the authentication region using Lai's strategy. \begin{theorem}\label{thm:lai_strong} \begin{align}\label{eq:reg_lai:s} \set{(r,\alpha,\kappa) :\setlength\arraycolsep{2pt} \begin{matrix*}[l] r + \alpha &\leq \msf{I}(t\rho,\sigma\tau) \\ \alpha & \leq \min_{\nu \in \mcf{P}(\mcf{Z}|\mcf{U})} \msf{L}(\nu; t\rho,q\rho,\sigma,\tau) \\ \alpha & \leq \msf{I}(t\rho,\sigma|\tau) \\ \alpha - \kappa &\leq 0 \end{matrix*} }& \nonumber \\ \subset \mcf{C}_{A}(t,q,1),& \end{align} where $ \msf{L}(\nu; t\rho,q\rho,\sigma,\tau) : = \msf{D}(\nu ||q\rho |\sigma\tau) + |\msf{I}(t\rho,\sigma|\tau) - \msf{I}(\nu , \sigma|\tau) + \left| \msf{I}(t\rho\sigma,\tau) - \msf{I}(\nu \sigma,\tau) \right|^+ |^+$, for all $\rho \in \mcf{P}(\mcf{X}|\mcf{U})$, $\sigma \in \mcf{P}(\mcf{U}\gg\mcf{W})$, and $\tau \in \mcf{P}(\mcf{W})$ where $\abs{\mcf{U}}$ and $\abs{\mcf{W}}$ are finite. \end{theorem} \begin{IEEEproof} \iftoggle{arxiv}{See~Appendix \ref{app:laiavg}, along with the supporting code construction, message error analysis and type I error analysis in Appendix~\ref{app:cc1}.} {See~\cite[Appendix C]{perazzone2018inner}, along with the supporting code construction, message error analysis and type I error analysis in~\cite[Appendix~F]{perazzone2018inner}.} \end{IEEEproof} The type I error capabilities are limited by the capacity of the wire-tap channel and if the secrecy capacity is 0, then no authentication is possible. We now extend Simmons' strategy and although it will only be applied to the triples from~Theorem~\ref{thm:lai_strong}, the associated code construction makes no such assumption on the genesis of the original code. \begin{theorem}\label{thm:-t2} If $(r,\alpha, \kappa) \in \mcf{C}_A$ then $(r-\beta,\alpha+\beta, \kappa+ 2\beta) \in \mcf{C}_{A}$, for all non-negative $\beta < r$. \end{theorem} \begin{IEEEproof} See\iftoggle{arxiv}{ Appendix \ref{app:univcompos}}{~\cite[Appendix D]{perazzone2018inner}. \end{IEEEproof} Now to obtain our inner bound, we combine Theorems \ref{thm:lai_strong} and \ref{thm:-t2}. \begin{theorem}\label{thm:ib} \begin{align}\label{eqn:avgregion} \set{(r,\alpha,\kappa) :\setlength\arraycolsep{2pt}\begin{matrix*}[l] r + \alpha &\leq \msf{I}(t\rho,\sigma\tau) \\ 2\alpha - \kappa & \leq \min_{\nu \in \mcf{P}(\mcf{Z}|\mcf{U})} \msf{L}(\nu;t\rho,q\rho,\sigma,\tau)\\ 2\alpha - \kappa & \leq \msf{I}(t\rho,\sigma|\tau) \\ \alpha - \kappa &\leq 0 \end{matrix*} }& \nonumber \\ \subset \mcf{C}_{A}(t,q,1),& \end{align} where $ \msf{L}(\nu; t\rho,q\rho,\sigma,\tau) : = \msf{D}(\nu ||q\rho |\sigma\tau) + |\msf{I}(t\rho,\sigma|\tau) - \msf{I}(\nu , \sigma|\tau) + \left| \msf{I}(t\rho\sigma,\tau) - \msf{I}(\nu \sigma,\tau) \right|^+ |^+$, for all distributions $\rho \in \mcf{P}(\mcf{X}|\mcf{U})$, $\sigma \in \mcf{P}(\mcf{U}\gg\mcf{W})$, and $\tau \in \mcf{P}(\mcf{W})$ and $\abs{\mcf{U}}$ and $\abs{\mcf{W}}$ are finite. \end{theorem} \begin{IEEEproof} The proof can be found in \iftoggle{arxiv}{Appendix \ref{app:avgregion}}{\cite[Appendix E]{perazzone2018inner}.} \end{IEEEproof} This inner bound exhibits a trade-offs between rate, type I error, and key requirement in information theoretic terms. It is apparent from the first condition that this scheme requires communication and authentication share the main channel's capacity. As long as $ \min_{\nu \in \mcf{P}(\mcf{Z}|\mcf{U})} \msf{L}(\nu;t\rho,q\rho,\sigma,\tau) $ is non-zero, an increase in the length of the secret key provides a proportional increase in type I error. Whereas when the condition is zero, an increase in $ \alpha $ requires twice the increase in $ \kappa $ as evident in Simmons' scheme. Our scheme also improves over Gungor and Koksal's inner bound in this respect, since our scheme does not continue to unnecessarily leak information when Gr{\'i}ma's channel is less noisy than Bob's channel. Instead, in such a case, our scheme reverts to that of Simmon's, which is known to be optimal. \section{Examples}\label{sec:examples} To demonstrate that our inner bound outperforms Gungor and Koksal's inner, we provide a few examples and analyses. While it is easy to see that our inner bound \eqref{eqn:avgregion} is larger than Lai's \eqref{eq:reg_lai:s} due to the addition of $ 2\alpha-\kappa $, we will provide an explicit example to show that~\eqref{eqn:avgregion} also improves upon Gungor's inner bound \eqref{eqn:gungorregion}. For clarity, we will examine the case where $ t $ and $ q $ are binary symmetric channels (BSC) with transition probabilities $\lambda_t$ and $\lambda_q$ respectively. \pagebreak In a BSC, \eqref{eqn:avgregion} simplifies to \begin{align*} r + \alpha &< \msf{I}(t,\sigma\tau)\\ 2\alpha -\kappa &< \min_{\nu \in \mcf{P}(\mcf{Z}|\mcf{X})} \msf{L}^*(\nu; t,q,\sigma,\tau)\\ 2\alpha - \kappa & \leq \msf{I}(t,\sigma|\tau) \\ \alpha - \kappa &\le 0 , \end{align*} where $ \sigma $ is now a distribution on $ X $ given $ W $ and $ \msf{L}^*(\nu; t,q,\sigma,\tau) = \msf{D}(\nu ||q |\sigma\tau) + |\msf{I}(t,\sigma|\tau) - \msf{I}(\nu , \sigma|\tau) + \left| \msf{I}(t\sigma,\tau) - \msf{I}(\nu \sigma,\tau) \right|^+ |^+ $. Meanwhile,~\eqref{eqn:gungorregion} simplifies to \begin{equation}\label{eqn:gungorBSC} \mcf{R}_{G}(\tilde \kappa) \hspace{-3pt} : = \hspace{-3pt}\set{ r,\alpha,\kappa : \setlength\arraycolsep{1pt}\begin{matrix*}[l] r+ \kappa &\leq \msf{I}(t,\tau) + \tilde \kappa \\ \alpha - \kappa &\leq - \tilde \kappa \\ \alpha &\leq \min_{\nu \in \mcf{P}(\mcf{Y}|\mcf{X}) } \msf{L}_{G}(\nu,q,t,\tilde \kappa,\tau) \end{matrix*}}, \end{equation} where $ \msf{L}_{G}(\nu,q,t,\tilde \kappa,\tau) = \msf{D}(\nu||q|\tau) + \left| \tilde \kappa + \msf{I}(t,\tau) - \msf{I}(\nu,\tau) \right|^+$. \iftoggle{arxiv}{ \subsection{BSC Analysis} The $ \sigma $ and $\tau$ that maximize the average region and all three constraints simultaneously is BSC(.5) and a uniform $ \tau $. Since the upper bound of the third condition is always larger than the upper bound of the second condition for this set of distributions, we only focus on the first two conditions. For a less noisy main channel, the minimum $ \nu $ is always $ t $, whereas when the main channel is not less noisy, the minimum $ \nu $ is always $ q $, both regardless of Alice's choice of $ (\sigma,\tau) $. When we consider the case where the adversary's channel is ``less noisy'' than the main channel, it is easy to see that Gungor's region is not better than the AAR. With such a channel pair, the condition $ \min_{\nu \in \mcf{P}(\mcf{Z}|\mcf{X})} \msf{L}^*(\nu; t,q,\sigma,\tau) $ when evaluated at its minimum $ \nu = q $, the bound is $ \msf{L}^*(q; t,q,\sigma,\tau) = 0 $. This results in the condition $ \alpha < \kappa/2 $ for the average region. In order for Gungor's strategy to be better, its upper bounds on $ \alpha $ must be greater than $ \kappa/2 $. Examining the third condition in Gungor's region, it can been seen that in order to have a nonzero bound on $ \alpha $, $ \tilde \kappa > \msf{I}(q,\tau) - \msf{I}(t,\tau) $ since $ \nu=q $ is a valid choice. Then, for both conditions to be greater than $ \kappa/2 $ we must have \begin{align*} &\tilde \kappa < \kappa/2 ~\\ &\tilde \kappa + \msf{I}(t,\tau) - \msf{I}(q,\tau) > \kappa/2. \end{align*} These two conditions, however, cannot occur simultaneously since they imply that $ \tilde \kappa + \msf{I}(t,\tau) - \msf{I}(q,\tau) > \tilde \kappa $ which is only valid when $ \msf{I}(t,\tau) > \msf{I}(q,\tau) $. This is only satisfied when $ t $ is less noisy than $ q $ which contradicts our original assumption on this pair of channels. Therefore, given the same $ \kappa $ and assumption of a less noisy adversary channel, Gungor's scheme cannot achieve any $ \alpha $ greater than that of our scheme, which implies that their region is contained in ours. We will show through example that their region is a proper subset since there are instances of $ (r,\alpha,\kappa) $ that are contained in the AAR, but not in theirs. } \subsection{BSC Examples} \begin{figure} \centering \includegraphics[scale=.35]{figures/AAvsGungor_RvsAlpha2} \caption{AAR outperforms Gungor's inner bound when $ \alpha $ is large.} \label{fig:regionCompareEqual} \end{figure} \begin{figure} \centering \includegraphics[scale=.35]{figures/AAvsGungor2} \caption{Given an $ r $ and $ \kappa $ pair, AAR achieves a greater range of $ \alpha $ for a constant adversarial channel ($ \lambda_t $ is the transition probability of channel $ t $).} \label{fig:regionCompare} \end{figure} First, we consider a case when the main channel is less noisy than Gr{\'i}ma's channel, where in specific $ \lambda_t=.1 $ and $ \lambda_q=.15 $. The trade off between the rate and the authentication, given a fixed key rate, for both \eqref{eqn:avgregion} and~\eqref{eqn:gungorregion} is plotted in Figure~\ref{fig:regionCompareEqual}. Note the equivalence of the two regions for small $ \alpha $. As $\alpha$ increases, though, \eqref{eqn:avgregion} becomes strictly larger than~\eqref{eqn:gungorregion}. While \eqref{eqn:avgregion} obtains a constant value for $r+\alpha$, which is equal to the capacity of $t$, approximately $.531$,~\eqref{eqn:gungorregion} struggles due to the inefficiency of their coding scheme. This aligns with intuition, as \eqref{eqn:avgregion} uses the channel capacity for authenticity until the secrecy capacity is exhausted, and then switches to Simmons' scheme to further the authentication exponent. Next, in Figure \ref{fig:regionCompare}, the rate, key requirement, and adversarial channel are held constant while the maximum possible $ \alpha $ achievable via~\eqref{eqn:avgregion} and~\eqref{eqn:gungorregion} is computed for a range of main channel transition probabilities, $ \lambda_t $. Both schemes have a dramatic performance decrease when the main channel becomes worse than the adversarial channel. Still \eqref{eqn:avgregion} is generally larger than \eqref{eqn:gungorregion} for many possible main channels. It should be noted the point where $\alpha = 0$ is exactly the point where the capacity of the channel equals $.25$, in other words both schemes are using all of the channels capacity simply to provide reliable communications. \bibliographystyle{support/IEEEtran} \section{Submission of Papers for Review} Papers in the form of a PDF file, formatted as described below, may be submitted online at \begin{center} \url{https://edas.info/newPaper.php?c=23407} \end{center} The deadline for registering the paper in EDAS is \textbf{January 9, 2018}. The deadline for uploading the manuscript to EDAS is \textbf{January 12, 2018}. The papers are restricted in length to \textbf{five pages} (including figures, references, etc.) in the IEEEtran-conference style as presented here. Each paper must be classified as ``eligible for student paper award'' or ``not eligible for student paper award''. Papers that are selected to be eligible for the student paper award should also contain \emph{``THIS PAPER IS ELIGIBLE FOR THE STUDENT PAPER AWARD.''} as a first line in the abstract. Note that this comment must be removed again in the final manuscript. \section{Submission of Accepted Papers} Accepted papers will be published in full (up to five pages in length). A program booklet and a book of abstracts will also be distributed at the Symposium to serve as a guide to the sessions. The deadline for the submission of the final camera-ready paper will be announced in due course. Accepted papers not submitted by that date will not appear in the ISIT proceedings and will not be included in the technical program of the ISIT. \section{Paper Format} \subsection{Templates} The paper (A4 or letter size, double-column format, not exceeding 5~pages) should be formatted as shown in this sample \LaTeX{} file \cite{Laport:LaTeX, GMS:LaTeXComp, oetiker_latex, typesetmoser}. The use of Microsoft Word instead of \LaTeX{} is strongly discouraged. However, acceptable formatting may be achieved by using the template that can be downloaded from the ISIT 2018 website: \begin{center} \url{http://www.isit2018.org/} \end{center} Users of other text processing systems should attempt to duplicate the style of this example, in particular the sizes and type of font, as closely as possible. \subsection{Formatting} The style of references, equations, figures, tables, etc., should be the same as for the \emph{IEEE Transactions on Information Theory}. The source file of this template paper contains many more instructions on how to format your paper. So, example code for different numbers of authors, for figures and tables, and references can be found (they are commented out). For instructions on how to typeset math, in particular for equation arrays with broken equations, we refer to \cite{typesetmoser}. Pages should not be numbered and there should be no footer or header (both will be added during the production of the proceedings). The affiliation shown for authors should constitute a sufficient mailing address for persons who wish to write for more details about the paper. \subsection{PDF Requirements} Only electronic submissions in form of a PDF file will be accepted. The PDF file has to be PDF/A compliant. A common problem is missing fonts. Make sure that all fonts are embedded. (In some cases, printing a PDF to a PostScript file, and then creating a new PDF with Acrobat Distiller, may do the trick.) More information (including suitable Acrobat Distiller Settings) is available from the IEEE website \cite{IEEE:pdfsettings, IEEE:AuthorToolbox}. \section{Conclusion} We conclude by pointing out that on the last page the columns need to balanced. Instructions for that purpose are given in the source file. Moreover, example code for an appendix (or appendices) can also be found in the source file (they are commented out). \section*{Acknowledgment} We are indebted to Michael Shell for maintaining and improving \texttt{IEEEtran.cls}. \IEEEtriggeratref{3}
\section{Conclusion} \begin{figure*}[ht] \centering \begin{tabular}{p{3.7cm} p{3.7cm} p{3.7cm} p{3.7cm}} \includegraphics[width=1.5in]{real1} & \includegraphics[width=1.5in]{real2} & \includegraphics[width=1.5in]{real3} & \includegraphics[width=1.5in]{real4} \\ \includegraphics[width=1.5in]{gen1} & \includegraphics[width=1.5in]{gen2} & \includegraphics[width=1.5in]{gen3} & \includegraphics[width=1.5in]{gen4} \\ \end{tabular} \label{fig:mdpm} \vspace{4mm} \begin{tabular}{l|c|c|c|r|} \cline{2-5} & Correct detection & Wrong detection & Missed detection & Total \# of frames\\ \hline \cline{2-4} Real & 42 & 14 & 444 & 500 \\ \hline Generated & 147 & 24 & 329 & 500 \\ \hline \end{tabular} \caption{Performance of MDPM tracker \cite{islam2017mixed} on both real (top row) and generated (second row) images; the Table compares the detection performance for both sets of images over a sequence of $500$ frames. } \label{mdpmStuff} \end{figure*} This paper presents an approach for enhancing underwater color images through the use of generative adversarial networks. We demonstrate the use of CycleGAN to generate dataset of paired images to provide a training set for the proposed restoration model. Quantitative and qualitative results demonstrate the effectiveness of this method, and using a diver tracking algorithm on corrected images of scuba divers show higher accuracy compared to the uncorrected image sequence. Future work will focus on creating a larger and more diverse dataset from underwater objects, thus making the network more generalizable. Augmenting the data generated by CycleGAN with noise such as particle and lighting effects would improve the diversity of the dataset. We also intend to investigate a number of different quantitative performance metrics to evaluate our method. \section*{Acknowledgment} The authors are grateful to Oliver Hennigh for his implementation of the Gradient Difference Loss measure. \newpage \section{Experiments} \label{sec:experiments} \subsection{Datasets} We used several subsets of Imagenet~\cite{deng2009imagenet} for training and evaluation of our methods. We also evaluate a frequency- and spatial-domain diver-tracking algorithm on a video of scuba divers taken from YouTube\texttrademark\ \footnote{https://www.youtube.com/watch?v=QmRFmhILd5o}. Subsets of Imagenet containing underwater images were selected for the training of CycleGAN, and manually separated into two classes based on visual inspection. We let $X$ be the set of underwater images with no distortion, and $Y$ be the set of underwater images with distortion. $X$ contained 6143 images, and $Y$ contained 1817 images. We then trained CycleGAN to learn the mapping $F: X \rightarrow Y$, such that images from $X$ appeared to have come from $Y$. Finally, our image pairs for training data were generated by distorting all images in $X$ with $F$. Figure~\ref{fig:cgan_samples} shows sample training pairs. When comparing with CycleGAN, we used a test set of 56 images acquired from Flickr\texttrademark . \begin{figure}[!ht] \centering \footnotesize \begin{tabular}{p{1.6cm} p{1.6cm} p{1.6cm} p{1.6cm}} Original & CycleGAN & \textbf{UGAN} & \textbf{UGAN-P} \\ \includegraphics[width=0.7in]{1_original} & \includegraphics[width=0.7in]{1_cimg} & \includegraphics[width=0.7in]{1_u0img} & \includegraphics[width=0.7in]{1_u1img} \\ [-1ex] \includegraphics[width=0.7in]{1_oedges} & \includegraphics[width=0.7in]{1_cedges} & \includegraphics[width=0.7in]{1_u0edges} & \includegraphics[width=0.7in]{1_u1edges} \\ \includegraphics[width=0.7in]{2_original} & \includegraphics[width=0.7in]{2_cimg} & \includegraphics[width=0.7in]{2_u0img} & \includegraphics[width=0.7in]{2_u1img} \\ [-1ex] \includegraphics[width=0.7in]{2_oedges} & \includegraphics[width=0.7in]{2_cedges} & \includegraphics[width=0.7in]{2_u0edges} & \includegraphics[width=0.7in]{2_u1edges} \\ \includegraphics[width=0.7in]{3_original} & \includegraphics[width=0.7in]{3_cimg} & \includegraphics[width=0.7in]{3_u0img} & \includegraphics[width=0.7in]{3_u1img} \\ [-1ex] \includegraphics[width=0.7in]{3_oedges} & \includegraphics[width=0.7in]{3_cedges} & \includegraphics[width=0.7in]{3_u0edges} & \includegraphics[width=0.7in]{3_u1edges} \\ \includegraphics[width=0.7in]{4_original} & \includegraphics[width=0.7in]{4_cimg} & \includegraphics[width=0.7in]{4_u0img} & \includegraphics[width=0.7in]{4_u1img} \\ [-1ex] \includegraphics[width=0.7in]{4_oedges} & \includegraphics[width=0.7in]{4_cedges} & \includegraphics[width=0.7in]{4_u0edges} & \includegraphics[width=0.7in]{4_u1edges} \\ \end{tabular} \vspace{-2mm} \caption{\small{Running the Canny Edge Detector on sample images. Both variants of UGAN contain less noise than CycleGAN, and are closer in the image space to the original. For each pair, the top row is the input image, and bottom row the result of the edge detector. The figure depicts four different sets of images, successively labeled A to D from top to bottom. See Table~\ref{tab:one}.}} \label{fig:canny_samples} \vspace{-5mm} \end{figure} \subsection{Evaluation} We train UGAN and UGAN-P on the image pairs generated by CycleGAN, and evaluate on the images from the test set, $Y$. Note that these images do not contain any ground truth, as they are original distorted images from Imagenet. Images for training and testing are of size $256 \times 256 \times 3$ and normalized between $[-1, 1]$. Figure ~\ref{fig:test_samples} shows samples from the test set. Notably, these images contain varying amounts of noise. Both UGAN and UGAN-P are able to recover lost color information, as well as correct any color information this is present. While many of the distorted images contain a blue or green hue over the entire image space, that is not always the case. In certain environments, it is possible that objects close to the camera are undistorted with correct colors, while the background of the image contains distortion. In these cases, we would like the network to only correct parts of the image that appear distorted. The last row in Figure ~\ref{fig:test_samples} shows a sample of such an image. The orange of the clownfish is left unchanged while the distorted sea anemone in the background has its color corrected. For a quantitative evaluation we compare to CycleGAN, as it inherently learns an inverse mapping during the training of $G: Y \rightarrow X$. We first use the Canny edge detector \cite{canny1986computational}, as this provides a color agnostic evaluation of the images in comparison to ground truth. Second, we compare local image patches to provide sharpness metrics on our images. Lastly, we show how an existing tracking algorithm for an underwater robot improves performance with generated images. \begin{figure*}[t] \centering \begin{tabular}{p{3.7cm} p{3.7cm} p{3.7cm} p{3.7cm}} \qquad \: \, ~ Original & \qquad \: \: CycleGAN & \qquad \: \: \, \textbf{UGAN} & \qquad \: \, \textbf{UGAN-P} \\ \includegraphics[width=1.5in]{flickr_cmp} & \includegraphics[width=1.5in]{cgan_cmp} & \includegraphics[width=1.5in]{ugan_cmp} & \includegraphics[width=1.5in]{uganp_cmp} \\ [-2ex] \end{tabular} \end{figure*} \begin{figure*}[t] \begin{tabular}{p{1.6cm} p{1.7cm} p{1.6cm} p{1.7cm} p{1.6cm} p{1.7cm} p{1.6cm} p{1.9cm} } \includegraphics[width=0.7in]{flickr_crop1} & \includegraphics[width=0.7in]{flickr_crop2} & \includegraphics[width=0.7in]{cgan_crop1} & \includegraphics[width=0.7in]{cgan_crop2} & \includegraphics[width=0.7in]{ugan_crop1} & \includegraphics[width=0.7in]{ugan_crop2} & \includegraphics[width=0.7in]{ugan_crop1} & \includegraphics[width=0.7in]{ugan_crop2} \\ \includegraphics[width=0.7in]{flickr_crop3} & \includegraphics[width=0.7in]{flickr_crop4} & \includegraphics[width=0.7in]{cgan_crop3} & \includegraphics[width=0.7in]{cgan_crop4} & \includegraphics[width=0.7in]{ugan_crop3} & \includegraphics[width=0.7in]{ugan_crop4} & \includegraphics[width=0.7in]{ugan_crop3} & \includegraphics[width=0.7in]{ugan_crop4} \\ \end{tabular} \caption{Local image patches extracted for quantitative comparisons, shown in Tables~\ref{fig:gdl_tbl} and~\ref{fig:mean_tbl}. Each patch was resized to $64 \times 64$, but shown enlarged for viewing ability.} \label{fig:zoom} \end{figure*} \subsection{Comparison to CycleGAN} It is important to note that during the process of learning a mapping $F: X \rightarrow Y$, CycleGAN also learns a mapping $G: Y \rightarrow X$. Here we give a comparison to our methods. We use the Canny edge detector \cite{canny1986computational} to provide a color agnostic evaluation of the images, as the original contain distorted colors and cannot be compared back to as ground truth. Due to the fact that restoring color information should not alter the overall structure of the image, we measure the distance in the image space between the edges found in the original and generated images. Figure ~\ref{fig:canny_samples} shows the original images and results from edge detection. Table~\ref{tab:one} provides the measurements from Figure ~\ref{fig:canny_samples}, as well as the average over our entire Flickr\texttrademark\ dataset. Both UGAN and UGAN-P are consistently closer in the image space to the original than that of CycleGAN, suggesting noise due to blur. Next, we evaluate this noise explicitly. We explore the artifacts of content loss, as seen in Figure ~\ref{fig:zoom}. In particular, we compare local statistics of the highlighted image patches, where each image patch is resized to $64 \times 64$. We use the GDL \cite{mathieu2015deep} from (\ref{gdl_eq}) as a sharpness measure. A lower GDL measure implies a smoother transition between pixels, as a noisy image would have large jumps in the image's gradient, leading to a higher score.\nostarnote{I THINK. I would double check, bottom of page 4: https://arxiv.org/pdf/1511.05440.pdf.} As seen in Table \ref{fig:gdl_tbl}, the GDL is lower for both UGAN and UGAN-P. Interestingly, UGAN consistently has a lower score than UGAN-P, despite UGAN-P explicitly accounting for this metric in the objective function. Reasoning for this is left for our future work. Another metric we use to compare image patches are the mean and standard deviation of a patch. The standard deviation gives us a sense of blurriness because it defines how far the data deviates from the mean.\nostarnote{ A lower standard deviation means that the data is closer to the mean . not sure if we exactly need to say that because I assume the reviewers will know what it is.} In the case of images, this would suggest a blurring effect due to the data being more clustered toward one pixel value. Table \ref{fig:mean_tbl} shows the mean and standard deviations of the RGB values for the local image patches seen in Figure \ref{fig:zoom}. Despite qualitative evaluation showing our methods are much sharper, quantitatively they show only slight improvement. Other metrics such as entropy are left as future work. \begin{table} \centering \footnotesize \caption{Distances in image space} \begin{tabular}{| c | c | c | c |} \hline Row/Method & CycleGAN & \textbf{UGAN} & \textbf{UGAN-P} \\ \hline A & 116.45 & 85.71 & 86.15 \\ \hline B & 114.49 & 97.92 & 101.01 \\ \hline C & 120.84 & 96.53 & 97.57 \\ \hline D & 129.27 & 108.90 & 110.50 \\ \hline Mean & 111.60 & 94.91 & 96.51 \\ \hline \end{tabular} \label{tab:one} \end{table} \begin{table}[ht] \footnotesize \centering \caption{Gradient Difference Loss Metrics} \begin{tabular}{| c | c | c | c | } \hline Method/Patch & CycleGAN & \textbf{UGAN} & \textbf{UGAN-P} \\ \hline Red & 11.53 & 9.39 & 10.93 \\ \hline Blue & 7.52 & 4.83 & 5.50\\ \hline Green & 4.15 & 3.18 & 3.25 \\ \hline Orange & 6.72 & 5.65 & 5.79 \\ \hline \end{tabular} \label{fig:gdl_tbl} \end{table} \begin{table*}[ht] \centering \caption{Mean and Standard Deviation Metrics} \begin{tabular}{| c | c | c | c | c | } \hline Method/Patch & Original & CycleGAN & \textbf{UGAN} & \textbf{UGAN-P} \\ \hline Red & 0.43 $\pm$ 0.23 & 0.42 $\pm$ 0.22 & 0.44 $\pm$ 0.23 & 0.45 $\pm$ 0.25 \\ \hline Blue & 0.51 $\pm$ 0.18 & 0.57 $\pm$ 0.17 & 0.57 $\pm$ 0.17 & 0.57 $\pm$ 0.17 \\ \hline Green & 0.36 $\pm$ 0.17 & 0.36 $\pm$ 0.14 & 0.37 $\pm$ 0.17 & 0.36 $\pm$ 0.17 \\ \hline Orange & 0.3 $\pm$ 0.15 & 0.25 $\pm$ 0.12 & 0.26 $\pm$ 0.13 & 0.27 $\pm$ 0.14 \\ \hline \end{tabular} \label{fig:mean_tbl} \end{table*} \subsection{Diver Tracking using Frequency-Domain Detection} We investigate the frequency-domain characteristics of the restored images through a case-study of periodic motion tracking in sequence of images. Particularly, we compared the performance of Mixed Domain Periodic Motion (MDPM)- tracker \cite{islam2017mixed} on a sequence of images of a diver swimming in arbitrary directions. MDPM tracker is designed for underwater robots to follow scuba divers by tracking distinct frequency-domain signatures (high-amplitude spectra at $1$-$2$Hz) pertaining to human swimming. Amplitude spectra in frequency-domain correspond to the periodic intensity variations in image-space over time, which is often eroded in noisy underwater images \cite{shkurti2017underwater}. Fig. \ref{mdpmStuff} illustrates the improved performance of MDPM tracker on generated images compared to the real ones. Underwater images often fail to capture the true contrast in intensity values between foreground and background due to low visibility. The generated images seem to restore these eroded intensity variations to some extent, causing much improved positive detection (a 350\% increase in correct detections) for the MDPM tracker. \subsection{Training Details and Inference Performance} In all of our experiments, we use $\lambda_{1} = 100$, $\lambda_{GP} = 10$, batch size of 32, and the Adam Optimizer \cite{kingma2014adam} with learning rate $1e-4$. Following WGAN-GP, the discriminator is updated $n$ times for every update of the generator, where $n = 5$. For UGAN-P, we set $\lambda_{2} = 1.0$ and $\alpha = 1$. Our implementation was done using the Tensorflow library \cite{abadi2016tensorflow}. \footnote{Code is available at \url{https://github.com/cameronfabbri/Underwater-Color-Correction}} All networks were trained from scratch on a GTX 1080 for 100 epochs. Inference on the GPU takes on average $ 0.0138s$, which is about 72 Frames Per Second (FPS). On a CPU (Intel Core i7-5930K), inference takes on average $ 0.1244s$, which is about 8 FPS. In both cases, the input images have dimensions $256\times 256\times 3$. We find both of these measures acceptable for underwater tasks. \section{Introduction} Underwater robotics has been a steadily growing subfield of autonomous field robotics, assisted by the advent of novel platforms, sensors and propulsion mechanisms. While autonomous underwater vehicles are often equipped with a variety of sensors, visual sensing is an attractive option because of its non-intrusive, passive, and energy efficient nature. The monitoring of coral reefs \cite{shkurti2012multi}, deep ocean exploration \cite{whitcomb2000advances}, and mapping of the seabed~\cite{bingham2010robotic} are a number of tasks where visually-guided AUVs and ROVs (Remotely Operated Vehicles) have seen widespread use. Use of these robots ensures humans are not exposed to the hazards of underwater exploration, as they no longer need to venture to the depths (which was how such tasks were carried out in the past). Despite the advantages of using vision, underwater environments pose unique challenges to visual sensing, as light refraction, absorption and scattering from suspended particles can greatly affect optics. For example, because red wavelengths are quickly absorbed by water, images tend to have a green or blue hue to them. As one goes deeper, this effect worsens, as more and more red hue is absorbed. This distortion is extremely non-linear in nature, and is affected by a large number of factors, such as the amount of light present (overcast versus sunny, operational depth), amount of particles in the water, time of day, and the camera being used. This may cause difficulty in tasks such as segmentation, tracking, or classification due to their indirect or direct use of color. As color and illumination begin to change with depth, vision-based algorithms need to be generalizable in order to work within the depth ranges a robot may operate in. Because of the high cost and difficulty of acquiring a variety of underwater data to train a visual system on, as well as the high amount of noise introduced, algorithms may (and do) perform poorly in these different domains. Figure~\ref{fig:samples} shows the high variability in visual scenes that may occur in underwater environments. A step towards a solution to this issue is to be able to restore the images such that they appear to be above water, \emph{i.e.}, with colors corrected and suspended particles removed from the scene. By performing a many-to-one mapping of these domains from underwater to not underwater (what the image would look like above water), algorithms that have difficulty performing across multiple forms of noise may be able to focus only one clean domain. Deep neural networks have been shown to be powerful non-linear function approximators, especially in the field of vision \cite{krizhevsky2012imagenet}. Often times, these networks require large amounts of data, either labeled or paired with ground truth. For the problem of automatically colorizing grayscale images \cite{zhang2016colorful}, paired training data is readily available due to the fact that any color image can be converted to black and white. However, underwater images distorted by either color or some other phenomenon lack ground truth, which is a major hindrance towards adopting a similar approach for correction. This paper proposes a technique based on Generative Adversarial Networks (GANs) to improve the quality of visual underwater scenes with the goal of improving the performance of vision-driven behaviors for autonomous underwater robots. We use the recently proposed CycleGAN~\cite{zhu2017unpaired} approach, which learns to translate an image from any arbitrary domain $X$ to another arbitrary domain $Y$ \textit{without} image pairs, as a way to generate a paired dataset. By letting $X$ be a set of undistorted underwater images\nostarnote{need to say where we find the undistorted ones}, and $Y$ be a set of distorted underwater images, we can generate an image that appears to be underwater while retaining ground truth. \section{Methodology} \label{sec:methodology} Underwater images distorted by color or other circumstances lack ground truth, which is a necessity for previous colorization approaches. Furthermore, the distortion present in an underwater image is highly nonlinear; simple methods such as adding a hue to an image do not capture all of the dependencies. We propose to use CycleGAN as a distortion model in order to generate paired images for training. Given a domain of underwater images with no distortion, and a domain of underwater images with distortion, CycleGAN is able to perform style transfer. Given an undistorted image, CycleGAN distorts it such that it appears to have come from the domain of distorted images. These pairs are then used in our algorithm for image reconstruction. \subsection{Dataset Generation} Depth, lighting conditions, camera model, and physical location in the underwater environment are all factors that affect the amount of distortion an image will be subjected to. Under certain conditions, it is possible that an underwater image may have very little distortion, or none at all. We let $I^C$ be an underwater image with no distortion, and $I^D$ be the same image with distortion. Our goal is to learn the function $f: I^D \rightarrow I^C$. Becasue of the difficulty of collecting underwater data, more often than not only $I^D$ or $I^C$ exist, but never both. To circumvent the problem of insufficient image pairs, we use CycleGAN to generate $I^D$ from $I^C$, which gives us a paired dataset of \vspace{2pt} images. Given two datasets $X$ and $Y$, where $I^C \in X$ and $I^D \in Y$, CycleGAN learns a mapping $F: X \rightarrow Y$. Figure~\ref{fig:cgan_samples} shows paired samples generated from CycleGAN. From this paired dataset we train a generator $G$ to learn the function $f: I^D \rightarrow I^C$. It should be noted that during the training process of CycleGAN, it simultaneously learns a mapping $G: Y \rightarrow X$, which is similar to $f$. In Section~\ref{sec:experiments}, we compare images generated by CycleGAN with images generated through our approach. \vspace{-3pt} \subsection{Adversarial Networks} \label{sec:gans} \nostarnote{check this paragraph as I added some more text}In machine learning literature, Generative Adversarial Networks (GANs)~\cite{goodfellow2014generative} represent a class of generative models based on game theory in which a generator network competes against an adversary. From a classification perspective, the generator network $G$ produces instances which actively attempt to `fool' the discriminator network $D$. The goal is for the discriminator network to be able to distinguish between `true' instances coming from the dataset and `false' instances produced by the generator network. In our case, conditioned on an image $I^D$, the generator is trained to produce an image to try and fool the discriminator, which is trained to distinguish between distorted and non-distorted underwater images. In the original GAN formulation, our goal is to solve the minimax problem: \begin{figure} \centering \begin{tabular}{p{1.6cm} p{1.6cm} p{1.6cm} p{1.6cm}} \includegraphics[width=0.75in]{n01496331_873_X} & \includegraphics[width=0.75in]{n01664065_4022_X} & \includegraphics[width=0.75in]{n01917289_889_X} & \includegraphics[width=0.75in]{n01914609_116_X} \\ \includegraphics[width=0.75in]{n01496331_873_Y} & \includegraphics[width=0.75in]{n01664065_4022_Y} & \includegraphics[width=0.75in]{n01917289_889_Y} & \includegraphics[width=0.75in]{n01914609_116_Y} \\ \end{tabular} \caption{Paired samples of ground truth and distorted images generated by CycleGAN. Top row: Ground truth. Bottom row: Generated samples.} \label{fig:cgan_samples} \vspace{-4.4mm} \end{figure} \begin{equation} \begin{aligned} \min\limits_{G}\max\limits_{D} \mathbb{E} & _{I^C \sim p_{train}(I^C)} [logD(I^C)] + \\ \mathbb{E} & _{I^D \sim p_{gen}(I^D)}[log(1 - D(G(I^D)))] \end{aligned} \end{equation} Note for simplicity in notation, we will further omit $I^C \sim p_{train}(I^C)$ and $I^D \sim p_{gen}(I^D)$. In this formulation, the discriminator is hypothesized as a classifier with a sigmoid cross-entropy loss function, which in practice may lead to issues such as the vanish gradient and mode collapse. As shown by \cite{arjovsky2017towards}, as the discriminator improves, the gradient of the generator vanishes, making it difficult or impossible to train. Mode collapse occurs when the generator ``collapses'' onto a single point, fooling the discriminator with only one instance. To illustrate the effect of mode collapse, imagine a GAN is being used to generate digits from the MNIST~\cite{lecun2010mnist} dataset, but it only generated the same digit. In reality, the desired outcome would be to generate a diverse collection of all the digits. To this end, there have been a number of recent methods which hypothesize a different loss function for the discriminator \cite{mao2016least,arjovsky2017wasserstein,gulrajani2017improved,zhao2016energy}. We focus on the Wasserstein GAN (WGAN) \cite{arjovsky2017wasserstein} formulation, which proposes to use the Earth-Mover or \textit{Wasserstein-1} distance $W$ by constructing a value function using the Kantorovich-Rubinstein duality \cite{villani2008optimal}. In this formulation, $W$ is approximated given a set of $k$-Lipschitz functions $f$ modeled as neural networks. To ensure $f$ is $k$-Lipschitz, the weights of the discriminator are clipped to some range $[-c, c]$. In our work, we adopt the Wasserstein GAN with gradient penalty (WGAN-GP) \cite{gulrajani2017improved}, which instead of clipping network weights like in \cite{arjovsky2017wasserstein}, ensures the Lipschitz constraint by enforcing a soft constraint on the gradient norm of the discriminator's output with respect to its input. Following \cite{gulrajani2017improved}, our new objective then becomes \begin{equation} \begin{aligned} \mathcal{L}_{WGAN}(G,D) = \mathbb{E} [D(I^C)] - \mathbb{E} [D(G(I^D))] + \\ \lambda_{GP} \mathbb{E}_{\hat{x} \sim \mathbb{P}_{\hat{x}}} [(|| \nabla_{\hat{x}} D(\hat{x})||_2 -1)^2 ] \end{aligned} \end{equation} \noindent where $\mathbb{P}_{\hat{x}}$ is defined as samples along straight lines between pairs of points coming from the true data distribution and the generator distribution, and $\lambda_{GP}$ is a weighing factor. In order to give $G$ some sense of ground truth, as well as capture low level frequencies in the image, we also consider the $L1$ loss \begin{equation} \mathcal{L}_{L1} = \mathbb{E} [ || I^C - G(I^D) ||_1 ] \end{equation} \noindent Combining these, we get our final objective function for our network, which we call Underwater GAN (UGAN), \begin{equation} \begin{aligned} \mathcal{L}_{UGAN}^* = \min\limits_{G}\max\limits_{D} \mathcal{L}_{WGAN}(G,D) + \lambda_{1} \mathcal{L}_{L1}(G) \end{aligned} \end{equation} \begin{figure*}[t] \centering \footnotesize \begin{tabular}{p{0.1cm} p{1.6cm} p{1.6cm} p{1.6cm} p{1.6cm} p{1.6cm} p{1.6cm} p{1.6cm} p{1.6cm} } \rotatebox{90}{\: \, Original} & \includegraphics[width=0.7in]{n01917289_4982_real} & \includegraphics[width=0.7in]{n01496331_16340_real} & \includegraphics[width=0.7in]{n01496331_22183_real} & \includegraphics[width=0.7in]{n01664065_29738_real} & \includegraphics[width=0.7in]{n01496331_11938_real} & \includegraphics[width=0.7in]{n02606052_2969_real} & \includegraphics[width=0.7in]{n01914609_1607_real} & \includegraphics[width=0.7in]{n02607072_6241_real} \\ \rotatebox{90}{\textbf{\: \, UGAN}} & \includegraphics[width=0.7in]{n01917289_4982_gen_0} & \includegraphics[width=0.7in]{n01496331_16340_gen_0} & \includegraphics[width=0.7in]{n01496331_22183_gen_0} & \includegraphics[width=0.7in]{n01664065_29738_gen_0} & \includegraphics[width=0.7in]{n01496331_11938_gen_0} & \includegraphics[width=0.7in]{n02606052_2969_gen_0} & \includegraphics[width=0.7in]{n01914609_1607_gen_0} & \includegraphics[width=0.7in]{n02607072_6241_gen_0} \\ \rotatebox{90}{\textbf{\: UGAN-P}} & \includegraphics[width=0.7in]{n01917289_4982_gen_1} & \includegraphics[width=0.7in]{n01496331_16340_gen_1} & \includegraphics[width=0.7in]{n01496331_22183_gen_1} & \includegraphics[width=0.7in]{n01664065_29738_gen_1} & \includegraphics[width=0.7in]{n01496331_11938_gen_1} & \includegraphics[width=0.7in]{n02606052_2969_gen_1} & \includegraphics[width=0.7in]{n01914609_1607_gen_1} & \includegraphics[width=0.7in]{n02607072_6241_gen_1} \\ \end{tabular} \caption{Samples from our ImageNet testing set. The network can both recover color and also correct color if a small amount is present.} \label{fig:test_samples} \end{figure*} \subsection{Image Gradient Difference Loss} Often times generative models produce blurry images. We explore a strategy to sharpen these predictions by directly penalizing the differences of image gradient predictions in the generator, as proposed by \cite{mathieu2015deep}. Given a ground truth image $I^C$, predicted image $I^P = G(I^D)$, and $\alpha$ which is an integer greater than or equal to 1, the Gradient Difference Loss (GDL) is given by \begin{equation} \begin{aligned} \mathcal{L}_{GDL}(I^C, I^P) = \\ \sum\limits_{i,j} || & I^C_{i,j} - I^C_{i-1,j}| - | I^P_{i,j} - I^P_{i-1,j}||^{\alpha} + \\ || & I^C_{i,j-1} - I^C_{i,j}| - | I^P_{i,j-1} - I^P_{i,j}||^{\alpha} \end{aligned} \label{gdl_eq} \end{equation} \noindent In our experiments, we denote our network as UGAN-P when considering the GDL, which can be expressed as \begin{equation} \begin{aligned} \mathcal{L}_{UGAN\scalebox{0.4}[1.0]{\( - \)}P}^* = \min\limits_{G}\max\limits_{D} \mathcal{L}_{WGAN}(G,D) + & \\ \lambda_{1} \mathcal{L}_{L1}(G) + & \lambda_{2} \mathcal{L}_{GDL} \end{aligned} \end{equation} \subsection{Network Architecture} Our generator network is a fully convolutional encoder-decoder, similar to the work of \cite{isola2016image}, which is designed as a ``U-Net'' \cite{ronneberger2015u} due to the structural similarity between input and output. Encoder-decoder networks downsample (encode) the input via convolutions to a lower dimensional embedding, in which this embedding is then upsampled (decode) via transpose convolutions to reconstruct an image. The advantage of using a ``U-Net'' comes from explicitly preserving spatial dependencies produced by the encoder, as opposed to relying on the embedding to contain all of the information. This is done by the addition of ``skip connections'', which concatenate the activations produced from a convolution layer $i$ in the encoder to the input of a transpose convolution layer $n-i+1$ in the decoder, where $n$ is the total number of layers in the network. Each convolutional layer in our generator uses kernel size $4 \times 4$ with stride 2. Convolutions in the encoder portion of the network are followed by batch normalization \cite{pmlr-v37-ioffe15} and a leaky ReLU activation with slope $0.2$, while transpose convolutions in the decoder are followed by a ReLU activation \cite{nair2010rectified} (no batch norm in the decoder). Exempt from this is the last layer of the decoder, which uses a TanH nonlinearity to match the input distribution of $[-1, 1]$. Recent work has proposed Instance Normalization \cite{ulyanov2016instance} to improve quality in image-to-image translation tasks, however we observed no added benefit. Our fully convolutional discriminator is modeled after that of \cite{radford2015unsupervised}, except no batch normalization is used. This is due to the fact that WGAN-GP penalizes the norm of the discriminator's gradient with respect to each input individually, which batch normalization would invalidate. The authors of \cite{gulrajani2017improved} recommend layer normalization \cite{ba2016layer}, but we found no significant improvements. Our discriminator is modeled as a PatchGAN \cite{isola2016image,li2016precomputed}, which discriminates at the level of image patches. As opposed to a regular discriminator, which outputs a scalar value corresponding to real or fake, our PatchGAN discriminator outputs a $32 \times 32 \times 1$ feature matrix, which provides a metric for high level frequencies. \section{Related Work} \label{sec:related} \begin{figure}[t] \centering \begin{tabular}{p{1.6cm} p{1.6cm} p{1.6cm} p{1.7cm}} \includegraphics[width=0.75in]{n01496331_7428_f1} & \includegraphics[width=0.75in]{n01496331_16340_f1} & \includegraphics[width=0.75in]{n01914609_5148_f1} & \includegraphics[width=0.75in]{robot_f1} \\ \includegraphics[width=0.75in]{n01664065_30279_f1} & \includegraphics[width=0.75in]{n01917289_5711_f1} & \includegraphics[width=0.75in]{n01917289_4087_f1} & \includegraphics[width=0.75in]{n02607072_10395_f1} \\ \end{tabular} \label{fig:samples} \vspace{-2mm} \caption{Sample underwater images with natural and man-made artifacts (which in this case is our underwater robot) displaying the diversity of distortions that can occur. With the varying camera-to-object distances in the images, the distortion and loss of color varies between the different images.} \end{figure} While there have been a number of successful recent approaches towards automatic colorization \cite{zhang2016colorful,iizuka2016let}, most are focused on the task of converting grayscale images to color. Quite a few approaches use a physics-based technique to directly model light refraction~\cite{jordt2014underwater}. Specifically for restoring color in underwater images, the work of~\cite{torres2005color} uses an energy minimization formulation using a Markov Random Field. Most similar to the work proposed in this paper is the recently proposed WaterGAN~\cite{li2017watergan}, which uses an adversarial approach towards generating realistic underwater images. Their generator model can be broken down into three stages: 1) Attenuation, which accounts for range-dependent attenuation of light. 2) Scattering, which models the haze effect caused by photons scattering back towards the image sensor and 3) Vignetting, which produces a shading effect on the image corners that can be caused by certain camera lenses. Differentiating from our work, they use a GAN for generating the underwater images and use strictly Euclidean loss for color correction, whereas we use a GAN for both. Furthermore, they require depth information during the training of WaterGAN, which can be often difficult to attain particularly for underwater autonomous robotic applications. Our work only requires images of objects in two separate domains (\emph{e.g.}, underwater and terrestrial) throughout the entire process. Recent work in generative models, specifically GANs, have shown great success in areas such as inpainting \cite{pathak2016context}, style transfer \cite{Gatys_2016_CVPR}, and image-to-image translation \cite{isola2016image,zhu2017unpaired}. This is primarily due to their ability to provide a more meaningful loss than simply the Euclidean distance, which has been shown to produce blurry results. In our work, we structure the problem of estimating the true appearance of underwater imagery as a paired image-to-image translation problem, using Generative Adversarial Networks (GANs) as our generative model (see Section~\ref{sec:gans} for details). Much like the work of \cite{isola2016image}, we use image pairs from two domains as input and ground truth. \nostarnote{Somewhere I think we should mention that unpaired image to image translation is more difficult, and that CycleGAN is a good way to generate a dataset in such a way to do this with image pairs.}
\section{Introduction} \label{sec:intro} It is commonly asserted (e.g., \cite{Brodsky:1997de, Heinzl:2000ht, Brodsky:2016nsn}) that the vacuum is trivial in a quantum field theory constructed using light-front (null-plane) quantization, at least within light-front perturbation theory. This is unlike the situation with standard Feynman perturbation theory. Associated with vacuum triviality appear to be a number of important consequences. Among these is the possibility of making a useful and natural definition of wave functions for particle states in the interacting theory; the definition appears to arise directly from the property that the state space of the theory is a free-particle Fock space. Perhaps the most striking consequence that is claimed in Ref.\ \cite{Brodsky:2009zd, Brodsky:2016nsn} is a solution of the cosmological constant problem. This solution arises because vacuum energy bubbles appear to be zero in light-front perturbation theory instead of being power-law divergent as they are in standard calculations. The vacuum bubbles give the vacuum expectation value of the energy-momentum tensor, and hence a contribution to an effective cosmological constant. The divergence must be canceled by a corresponding counterterm, a bare cosmological constant. The cosmological constant problem is that the value of the counterterm must be extremely fine tuned. However, it has been known for nearly 50 years, since the work of Chang and Ma \cite{Chang:1968bh} and of Yan \cite{Yan:1973qg}, that the argument leading to the triviality of the light-front vacuum is in fact incorrect, as are the calculations of a zero value for vacuum bubbles. It was shown that the rules for light-front perturbation theory must be modified, and that then the results always agree between light-front and Feynman perturbation theory, including for vacuum bubbles. Further work, by Nakanishi and Yabuki \cite{Nakanishi:1976yx}, and by Nakanishi and Yamawaki \cite{Nakanishi:1976vf}, showed among other things that triviality of the light-front vacuum conflicts with the well-established theorem of Haag \cite{Haag:1955ev, Streater:1964}. This theorem shows that the representations of the commutation relations of field operators are unitarily inequivalent between free and interacting theories.\footnote{Technically, an extension of Haag's theorem is used \cite{Nakanishi:1976yx} so that it applies for the commutation relations on a null plane as well as for the equal-time commutation relations. } In view of the continuing and prominent assertions of the triviality of the light-front vacuum, the purpose of this paper is to give an elementary treatment of the primary issues, especially concerning actual calculations: \begin{enumerate} \item I review, using a very simple example, the demonstration that an inconsistency arises from the calculational method that gives vanishing of vacuum bubbles. \item I provide a new analysis to locate the failure in the derivation of the rules for light-front perturbation theory. The failure is only for graphs (and subgraphs) for which the plus components of external momenta are constrained to be zero. The problem is an unrestricted use of the standard theorem $\int dx \, e^{ixq} = 2\pi \delta(q)$ that implements momentum conservation in terms of a delta function. This formula is incorrect when integrated with a function that is discontinuous at $q=0$, as happens in the situations where there is a failure of the derivation of the standard rules for light-front perturbation theory. \item I explain that, nevertheless, the non-triviality of the light-front vacuum does not itself affect the possibility of defining light-front wave functions. (Other issues do intervene in a gauge theory or when a non-trivial ultra-violet field renormalization is needed.) \end{enumerate} This paper should be regarded as an elementary complement to Refs.\ \cite{Chang:1968bh, Yan:1973qg, Nakanishi:1976yx, Nakanishi:1976vf, Heinzl:2003jy, Herrmann:2015dqa}. Some parts of the argument here were already presented in a similar form in Sec.\ 7.2 of my QCD book \cite{Collins:2011qcdbook}. Most of the specific points made here are undoubtedly known to many experts. I hope the presentation here will be useful to give an overall picture also accessible to interested outsiders. The discussion given here is in terms of the continuum theory. The issues appear in a different form when Discrete Light-Cone Quantization is used \cite{Maskawa:1975ky, Tsujimaru:1997jt, Yamawaki:1998cy}. These need a separate discussion that goes far beyond the scope of the present paper. \vfill \section{A paradox and its resolution in light-front perturbation theory} \label{sec:paradox.resolve} \subsection{Light-front perturbation theory; conventions} \label{sec:conv} We use light-front coordinates where components of a Lorentz vector are defined as $x=(x^+,x^-,\3x_T)$, and where, given a choice of Cartesian coordinates, $x^+=(x^0+x^3)/ \sqrt 2$, $x^-=(x^0-x^3)/ \sqrt 2$, and $\3x_T$ denotes the remaining transverse coordinates. Graphs in light-front perturbation theory --- e.g., \cite{Brodsky:1997de} --- are specified with particular orderings in the space-time coordinate $x^+$ for the vertices. There are integrals over the values of momentum components $k_j^+$ and $\3k_{j,T}$ for the lines, constrained by conservation of the plus and transverse components. The values of $k^+$ are restricted to physical positive values $k_j^+>0$ for forward moving momenta. The integrand has an ``energy denominator factor'' of the following form for each intermediate state $I$ \begin{equation} \label{eq:denominator} \frac{i}{ P_{\rm ext}^- - \sum_{j\in I} \dfrac{k_{j,T}^2+m_j^2}{2k_j^+} + i\epsilon }, \end{equation} where the sum is over particles in the intermediate state, corresponding to lines in the graph. Each denominator is the difference between the external minus-component of momentum and the on-shell plus-component of momentum for the intermediate state. In graphs, we use the convention that $x^+$ increases from left to right, and correspondingly the flow of positive $k_j^+$ is from left to right. Note that plus momentum is conserved, so that $P_{\rm ext}^+ = \sum_{j\in I} k_j^+$. With the basic rules for light-front perturbation theory, vacuum bubbles like Fig.\ \ref{fig:vac-bub} are zero. This is because the external momentum is zero. Hence it has zero \emph{plus} component: $P_{\rm ext}^+=0$, and there are no possible intermediate states: All the lines have positive plus momentum from left to right, and these can never sum to the zero external plus momentum. The vanishing of the vacuum bubbles is what leads to the statement of the triviality of the vacuum. \begin{figure} \centering \includegraphics[scale=0.6]{figures/vac-bubble} \caption{Example of vacuum bubble.} \label{fig:vac-bub} \end{figure} \subsection{A paradox} \label{sec:paradox} In this section, I show how the basic rules for light-front perturbation theory applied at vanishing external plus momentum lead to an inconsistency with standard analyticity properties. To make a very simple situation, let us examine the connected part of the following momentum-space Green function of composite operators in the theory of a free scalar field of mass $m$: \begin{equation} \label{eq:Pi} \Pi(p^2) = \int d^2x ~ e^{ip\cdot x} \langle 0 | T \tfrac12 \phi^2(x) \tfrac12 \phi^2(0) | 0 \rangle_{\rm conn.}. \end{equation} The factors of $1/2$ are to get a standard normalization convention, and the use of the connected part means that from each instance of the operator $\phi^2$ is subtracted its vacuum expectation value. To make the calculations maximally simple, while still exhibiting the principles at stake, we work in $1+1$ space-time dimensions, without any transverse dimensions. A standard textbook property is that $\Pi(p^2)$ is an analytic function whose only singularity is a branch point at the threshold point $p^2=4m^2$. If the second $\phi^2$ operator were at a general position $y$, we would change $x$ in the exponent to $x-y$ without change in $\Pi(p^2)$, by translation invariance. The use of time-ordering of the operators in Eq.\ (\ref{eq:Pi}) might appear to suggest the use of equal-time quantization. However, it is known that the definition is fully covariant. When $x$ is space-like, the operators commute, and then the ordering is irrelevant. When $x$ is time-like, it is frame-independent as to which position is future-most, and then the corresponding operator is defined to be on the left. The situation with light-like separation is governed by the usual rules for analyticity and for the distributional nature of the fields. A Green function of composite operators is used instead of an actual S-matrix element to give maximum simplicity. In QCD, we often use such Green functions to formulate the strong-interaction part of a scattering with electroweak particles, with the composite operators corresponding to the coupling between an electroweak field and QCD fields. \begin{figure} \centering \addtolength{\tabcolsep}{6mm} \begin{tabular}{cc} \includegraphics[scale=0.6]{figures/phi2-correl} & \raisebox{3mm}{\includegraphics[scale=0.6]{figures/phi2-correl-Z}} \\ (a) & (b) \end{tabular} \caption{The two orderings in $x^+$ for the Green function of two $\phi^2$ operators in free-field theory. Only graph (a) is non-zero when the external plus-momentum $p^+$ is positive. } \label{fig:loop} \end{figure} Given that free-field theory is used, there are exactly two $x^+$-ordered graphs for $\Pi(p^2)$, as in Fig.\ \ref{fig:loop}. When the external momentum has a positive plus component, i.e., $p^+>0$, the rules for $x^+$-ordered perturbation theory give a single allowed ordering in $x^+$, symbolized in Fig.\ \ref{fig:loop}(a). The value of the graph, including its symmetry factor $1/2$, is \begin{widetext} \begin{align} \Pi(p^2) & = \frac{1}{4\pi} \int_0^{p^+} \frac{dk^+}{4k^+(p^+-k^+)} ~ \frac{i}{ p^- - \frac{m^2}{2k^+} - \frac{m^2}{2(p^+-k^+)} + i\epsilon } \nonumber\\ & = \frac{i}{8\pi} \int_0^1 d\xi ~ \frac{1}{ p^2 \xi(1-\xi) - m^2 + i\epsilon }, \label{eq:Pi.p+.gt.0} \end{align} \end{widetext} where $\xi=k^+/p^+$. When $p^+$ is negative, the other $x^+$ ordering, Fig.\ \ref{fig:loop}(b), is used and gives the same value for $\Pi(p^2)$. But when $p^+=0$, the graphs appear to be zero, because the two internal lines are required to have a physical momentum, with positive plus momentum, and this is prohibited by momentum conservation. However, we also know that the Green function is analytic at $p^2=0$, and hence the value at $p^+=0$ is the limit as $p^2\to0$ of Eq.\ (\ref{eq:Pi.p+.gt.0}), which is $-i/(8\pi^2m^2)$ and non-zero. Something is therefore wrong in the calculation at $p^+=0$. Once we realize that in this example the standard rules for light-front perturbation theory fail when the external momentum is zero, we must then expect them to fail also in the computation of vacuum bubbles. Corresponding results also apply in a higher space-time dimensions where there is also a transverse momentum integral. \subsection{Diagnosis within Feynman perturbation theory} \label{sec:diagnosis.F} To diagnose the situation, consider the calculation of the same graph in Feynman perturbation theory: \begin{widetext} \begin{align} \label{eq:Pi.Feyn} \Pi(p^2) &= -\frac{1}{8\pi^2} \int d^2k ~ \frac{1}{ [k^2-m^2+i\epsilon] [(p-k)^2-m^2+i\epsilon] } \nonumber\\ &= -\frac{1}{8\pi^2} \int dk^+ dk^- \frac{1}{ [2k^+k^--m^2+i\epsilon] [2(k^+-p^+)(k^--p^-)-m^2+i\epsilon] }. \end{align} To get a result corresponding to light-front perturbation theory, we perform the $k^-$ integral at fixed $k^+$. We first take $p^+>0$, and use contour integration on $k^-$. This gives zero unless $0<k^+<p^+$, and then closing the contour in the upper or lower half plane of $k^-$ gives the same result as was calculated in light-front perturbation theory in Eq.\ (\ref{eq:Pi.p+.gt.0}). This is an example of the established result \cite{Chang:1968bh, Yan:1973qg} that in this case both methods of calculation agree. Next set $p^+=0$. The integral is now \begin{equation} \label{eq:Pi.Feyn.p+.0} \Pi(0) = -\frac{1}{8\pi^2} \int dk^+ dk^- \frac{1}{ [2k^+k^--m^2+i\epsilon] [2 k^+(k^--p^-)-m^2+i\epsilon] }. \end{equation} \end{widetext} If $k^+$ is positive, then both $k^-$ poles are in the lower half plane. We can deform the contour to infinity in the opposite half plane to get zero. Similarly if $k^+$ is negative, both poles are in the upper half plane, and we again get zero. Hence it would appear that the graph is zero when $p^+=0$, in agreement with the result of standard light-front perturbation theory. But the result is surely wrong. If nothing else, we could choose to perform the $k^+$ integral first, which would correspond to obtaining the result for the opposite kind of light-front perturbation theory, i.e., ordered in $x^-$. Provided that $p^-$ is still non-zero, we get the expected non-zero result for the graph, i.e., the limit of Eq.\ (\ref{eq:Pi.p+.gt.0}) as $p^2\to0$. Evidently there is a mathematical error in evaluating the integral in Eq.\ (\ref{eq:Pi.Feyn.p+.0}) by first performing the $k^-$ integral and blindly using the zero result. The correct result, as found by Chang and Ma \cite{Chang:1968bh} and Yan \cite{Yan:1973qg}, is that the integral over $k^-$ in Eq.\ (\ref{eq:Pi.Feyn.p+.0}) gives a delta function at $k^+$. To understand better what has happened, notice that we deformed the $k^-$-contour infinitely far into the upper half plane when $k^+>0$ and infinitely far into the lower half plane when $k^+<0$. The two-dimensional contour over both of $k^+$ and $k^-$ is now broken at $k^+=0$. To complete the contour, we must couple these pieces by a section that goes from $(k^+,k^-)=(0,+i\infty)$ to $(k^+,k^-)=(0,-i\infty)$, as in Fig.\ \ref{fig:contour.p+.0}. In deforming the unbroken two-dimensional contour, we inevitably encounter a region where the integrand is unsuppressed. \begin{figure} \centering \includegraphics[scale=0.55]{figures/p-plus-zero-contour3} \caption{How to join the segments of contour used for positive and negative $k^+$ in evaluating Eq.\ (\ref{eq:Pi.Feyn.p+.0}). The horizontal axis is a slice at fixed $\text{Re} ~k^-$ from the 2-dimensional space of $\text{Re} ~k^+$ and $\text{Re} ~k^-$ } \label{fig:contour.p+.0} \end{figure} Another way of seeing the issue is to observe that when $k^+$ is fixed and non-zero, and we deform $k^-$ to infinitely large imaginary $k^-$, the integrand is of order $1/(k^-)^2$, and thus the contour at infinity gives a zero integral. But the coefficient of this asymptote is $1/(k^+)^2$, and hence the convergence of the integrand to zero is not uniform in $k^+$. Instead we get an unsuppressed contribution if we take $|k^-|$ to infinity while keeping $|k^+|$ of order $1/|k^-|$. This problem does not arise in the integral for the case that $p^+$ non-zero, for then one of the $1/k^-$ factors has a coefficient $1/(k^+-p^+)\to-1/p^+$ instead of $1/k^+$, and there is a suppression of the otherwise dangerous region. This dangerous region corresponds to modes with extremely large negative rapidity which propagate almost within the surfaces of equal $x^+$ on which light-front quantization is applied. Thus they involve large distances on these surfaces in the $x^-$ direction within the surfaces. Of course, the diagnosis just given relies on assuming that Feynman perturbation theory is correct, while the authors of at least \cite{Brodsky:1997de, Brodsky:2016nsn} give the impression that light-front methods could give a different and better solution of a theory. If nothing else, they wish to formulate the theory purely in terms of light-front methods and avoid any appeal to other methods. Therefore to fully counter their arguments, one must understand the situation solely within terms of light-front perturbation theory and its derivation. \section{What went wrong in derivation} \label{sec:error} In this section, I locate the error in the derivation of the basic rules for light-front perturbation theory when the external $p^+$ is zero, and I do this purely within light-front methods, avoiding reference, for example, to standard Feynman perturbation theory. Without correctly and precisely locating the error, there can be generalized doubts as to the validity of light-front methods; outsiders to the field can wonder what other errors are so far unperceived. \subsection{Momentum-conservation condition} Textbook derivations of perturbation formalisms in quantum field normally start with a coordinate space formulation and then use Fourier transforms into momentum space. This is what we do here. In formulating light-front perturbation theory, the field operators are stratified by the values of their $x^+$ position coordinates. Within a surface of constant $x^+$ we perform the integral over $x^-$. We would also integrate over transverse coordinates if the problem were in a higher space-time dimension than our example. We apply this procedure to the graphs of Fig.\ \ref{fig:loop}, including both orderings in $x^+$. Then, Eq.\ (\ref{eq:Pi.p+.gt.0}) is replaced by its effective predecessor in the derivation, which is \begin{widetext} \begin{multline} \label{eq:vertex:x-} \Pi(p^2) = \frac{1}{8\pi^2} \int_{-\infty}^\infty \frac{dk^+}{2k^+} \int_{-\infty}^\infty \frac{d{k'}^+}{2{k'}^+} \int_{-\infty}^\infty dx^- e^{ix^-(p^+-k^+-{k'}^+)} \left[ \theta(k^+)\theta({k'}^+) \frac{i}{ p^- - \frac{m^2}{2k^+} - \frac{m^2}{2{k'}^+} + i\epsilon } \right. \\ \left. + \theta(-k^+)\theta({-k'}^+) \frac{i}{ - p^- + \frac{m^2}{2k^+} + \frac{m^2}{2{k'}^+} + i\epsilon } \right] . \end{multline} \end{widetext} This equation applies for any value of $p^+$. The integral over $x^+$ has already been performed to give the energy denominator factors. The integrals over $k^+$ and ${k'}^+$ are over basis states corresponding to the possible intermediate states. The $\theta$ functions implement the physical-state conditions for the lines' momenta for each of the $x^+$-ordered graphs. The convention for the signs of $k^+$ and ${k'}^+$ is chosen to give the same imaginary exponent for both graphs. Thus the positive, forward-moving momenta in Fig.\ \ref{fig:loop}(b) are $-k^+$ and $-{k'}^+$. We now evaluate the integral over $x^-$. Normally, we would obtain a momentum-conservation delta function, from the theorem that \begin{equation} \label{eq:delta} \int dx^- e^{ix^-(p^+-k^+-{k'}^+)} = 2\pi \delta(p^+-k^+-{k'}^+). \end{equation} This reproduces the previously given results for the graph in light-front perturbation theory. However, the theorem must be interpreted in the sense of distributions, not as a theorem about functions. That is, the theorem applies provided that the left- and right-hand sides are integrated with a function that is smooth enough, In particular, the function must be continuous at $k^++{k'}^+=p^+$, otherwise the result of integrating with the delta function is undefined. Now, if $p^+$ is non-zero, the rest of the integrand in Eq.\ (\ref{eq:vertex:x-}) is indeed continuous at the relevant points. Then Eq.\ (\ref{eq:delta}) applies, and the standard result is correct in this case. However when $p^+$ is zero, the integrand is not continuous on the relevant line, which is $k^++{k'}^+=0$. The integrand has discontinuities when one or both of $k^+$ and ${k'}^+$ is zero, and hence at the point $k^+={k'}^+=0$, on the line $k^++{k'}^+=0$. In fact, the integrand diverges as that point is approached from some directions. So we must investigate the situation in more detail. We evaluate the integral by changing variables to $k^++{k'}^+$ and $\xi$, with $k^+=\xi(k^++{k'}^+)$ and ${k'}^+=(1-\xi)(k^++{k'}^+)$. The use of $k^++{k'}^+$ ensures that one of the independent integration variables is exactly the variable that appears in the exponential and hence in the argument of the would-be delta function. This gives \begin{widetext} \begin{equation} \label{eq:vertex:x-.2} \Pi(p^2) = \frac{1}{16\pi^2} \int_{-\infty}^\infty d(k^++{k'}^+) \int_0^1 d\xi \int_{-\infty}^\infty dx^- e^{ix^-(p^+-k^+-{k'}^+)} \frac{i}{ 2p^-(k^++{k'}^+)\xi(1-\xi) - m^2 + i\epsilon }. \end{equation} \end{widetext} The integrand is now smooth, even at $k^++{k'}^+=0$, and we can therefore always use Eq.\ (\ref{eq:delta}) to give a delta function that gives exactly the same value as the bottom line in Eq.\ (\ref{eq:Pi.p+.gt.0}). But now the derivation is valid for any $p^+$, including zero, and this was arranged by using a coordinate-space expression as a starting point. \subsection{Immediate implications} When $p^+$ is zero, the integral over $x^-$ in Eq.\ (\ref{eq:vertex:x-.2}) gives a delta function at $k^++{k'}^+=0$. Then because $k^+$ and ${k'}^+$ are restricted to have the same sign, and because $\xi$ is bounded, the values of $k^+$ and ${k'}^+$ that are relevant are both zero. Thus we have a kind of zero-mode contribution. When one or both of $k^+$ and ${k'}^+$ goes to zero, the energy denominators in (\ref{eq:vertex:x-}) go to infinity. This would give a zero in the integrand were it not for a divergence in the factor $1/(4k^+{k'}^+)$ that is associated with the Lorentz invariant integration over the momenta of the lines. The combined limiting behavior from these factors and the Jacobian of the transformation of variables gives the non-zero final result. The distributional nature of the calculation with an integral over all plus-momenta as a starting point allows the calculation to involve a limiting behavior from nonzero values of plus-momenta. Zero plus-momentum implies infinitely large minus-momentum, and hence infinitely large and negative rapidity for each of the lines. Thus the physical contribution concerns contributions from intermediate states with arbitrarily negative rapidities. Smoothness (and analyticity, in fact) of the integrand in (\ref{eq:vertex:x-.2}) is only obtained after summing both $x^+$ ordered graphs in Fig.\ \ref{fig:loop}. This results from the relationship between the two energy denominators in (\ref{eq:vertex:x-}), which is presumably a fundamental property related to the CPT invariance of relativistic quantum field theories. But I will leave that issue to others to investigate in generality. There is a difference in the definition of $\xi$ compared with the one used in Eq.\ (\ref{eq:Pi.p+.gt.0}). There $\xi$ was defined as $k^+/p^+$, which does not work when $p^+$ is zero. Here it is defined as $k^+/(k^++{k'}^+)$, which does not depend on $p^+$. Of course, after application of the delta function the definitions agree, but only when $p^+$ is strictly positive. \subsection{General case} The calculation just given is, of course, specific to one particular pair of graphs. But we can now draw some more general conclusions. First, the problem does not arise if we use time-ordered instead of $x^+$-ordered perturbation theory. This because it is only $x^+$-ordered perturbation theory that has boundaries on the allowed range of physical momenta. As for a general graph in the $x^+$-ordered case, each vertex has a factor that is a simple generalization of the $x^-$ integral in Eq.\ (\ref{eq:vertex:x-}). To avoid a long technical discussion, let us leave to other work a general derivation of the final answer strictly using only light-front methods. Here we just appeal to Refs.\ \cite{Chang:1968bh, Yan:1973qg}. There it was shown by derivation from Feynman graphs that the only cases when the basic rules fail to be valid is in graphs where the momentum-conservation conditions require that one or more lines are constrained to have vanishing plus-momenta, just as in our example graphs at $p^+=0$ and in vacuum bubbles. Those references showed how to obtain corrected rules for light-front perturbation theory. \subsection{Overall summary} We can now summarize the results of this section \begin{quote} The failure of the standard derivation of the basic rules for light-front perturbation theory occurs where there is a failure of theorems like Eq.\ (\ref{eq:delta}) that give delta-functions for momentum conservation. Momentum conservation does continue to hold. But when some lines are constrained to be at zero plus-momentum, the standard delta function must be changed to a different kind of delta function that correctly takes into account the limiting behavior as the zero mode configuration is approached. \end{quote} \section{Consequences, or lack thereof, for light-front wave functions} \label{sec:lfwf} A conspicuous contrast between relativistic quantum field theory and non-relativistic quantum mechanics concerns the status and use of wave functions. Their use is routine in atomic, molecular, and condensed matter physics, and gives a lot of useful information about the states. For example, crucial insights into new structures emerging for interacting electrons in condensed matter physics has arisen from thinking about wave functions, two prominent examples being superconductivity \cite{DeGennes.1966} and the fractional quantum Hall effect \cite{Jain2007.book}. In contrast, in work with relativistic quantum field theory there is little systematic use of wave functions, and correspondingly a paucity of information about the detailed microscopic nature of the quantum mechanical states involved. This is a particular important issue for non-perturbative bound states in QCD, i.e., for hadrons and nuclei. The one known exception is with light-front quantization. Interesting progress has been made in applications, e.g., \cite{Brodsky:2016nsn, Alberg:2017ijg, Hiller:2016itl, Vary:2016ccz, Vary:2016emi} and references therein. However, the standard formulation, as in \cite{Brodsky:1997de}, appears to rely on the vacuum being trivial, so that a given state can be expressed as a non-pathological sum and integral over basis states that are in the same Fock space as free particles, e.g., for a proton in QCD in terms of states of quarks and gluons. In general, a wave function gives an expression for a quantum-mechanical state in terms of a set of basis states, which are fixed independently of the presence and nature of the interactions in a theory. Thus the basis is defined before one has found a solution of the theory. In a non-relativistic system the basis is commonly of eigenstates of the position operators, but a momentum-space basis could also be used. It gives a representation of the canonical relations for the fundamental operators, which are coordinates and canonical momenta in a standard non-relativistic system. But in a relativistic theory, these natural ideas appear to conflict with Haag's theorem. Inequivalent representations of the canonical commutation relations are needed in the free and interacting theories. In a sense, the states for the interacting theory are in a different space than those of a corresponding free theory. One appears to need to solve the theory before knowing what the basis states are; equivalently, finding a solution of the theory includes a construction of its state space. In this section, I show how light-front quantization evades this issue sufficiently to allow a definition of wave functions even given non-triviality of the vacuum. In a sense the difficulties are all confined to the nature of the vacuum. Haag's theorem itself cannot be prevented from applying, but its consequences can be limited. \subsection{Overall framework} \label{sec:wf.overall} To be able to easily relate different viewpoints, let us use the Heisenberg picture. We conceive of a theory being defined in terms of operators and commutation\footnote{Anticommutation relations in the case of fermionic fields.} relations specified on a quantization surface (e.g., fixed time or fixed $x^+$), and then evolution in $t$ or $x^+$ is applied. In the Heisenberg picture, it is the operators that are evolved rather than the states. We now work in a field theory framework. Suppose that we are able to define annihilation and creation operators $a_{\3k}$ and $a^\dagger_{\3k}$ from the Fourier transform of the fields on the quantization surface, that they obey the standard commutation relations for annihilation and creation operators\footnote{Derived from the canonical commutation relations of the fields on the quantization surface.}, and that the annihilation operators give zero when acting on the vacuum: \begin{equation} \label{eq:wf.vac.annih} a_{\3k} |0\rangle = 0. \end{equation} For the purposes of this discussion we assume there is only one kind of each operator; the extension to multiple fields is elementary. The most general state constructed by applying creation operators to the vacuum, has the form \begin{equation} \label{eq:wf.expansion} |\psi\rangle = \sum_N \frac{1}{N!} \int \prod_{j=1}^N a^\dagger_{\3k_j} |0\rangle \psi_{\3k_1,\ldots,\3k_N} , \end{equation} with an integration measure appropriate to the momentum variables and the normalization of the operators. The numerical coefficient functions we call the momentum-space wave functions of the state. Coordinate-space wave functions are defined by Fourier transformation of the momentum-space wave functions. Then the wave functions of a state can be obtained from a matrix element of annihilation operators between the vacuum and the state: \begin{equation} \label{eq:wf.basic} \psi_{\3k_1,\ldots,\3k_N} = \langle0| \prod_{j=1}^N a_{\3k_j} |\psi\rangle. \end{equation} This is proved using the commutation relations for the annihilation and creation operators, together with the vacuum-annihilation condition. In the case of non-relativistic systems, wave functions with the above definition are the same as ordinary Schr\"odinger wave functions. This is shown by the equivalence, e.g., \cite{Brown:1992db}, between a theory of non-relativistic Schr\"odinger field(s) and a collection of Schr\"odinger wave function theories for arbitrarily many particles. Given the expression for the annihilation operators in terms of the fields, the right-hand side of Eq.\ (\ref{eq:wf.basic}) can be expressed as a Fourier transform of a corresponding matrix element of field operators restricted to the quantization surface. Thus the formula can be applied independently of the method by which calculations are made. For example, with a surface of fixed $x^+$ one can equivalently use Feynman perturbation theory or $x^+$-ordered perturbation theory.\footnote{But note that there are some further complications that need to be handled in gauge theories --- Sec.\ \ref{sec:wf.complications}.} Formulas like the above, or some equivalent, can be found in many places in the literature, e.g., in the review \cite{Brodsky:1997de} for the case of light-front quantization. Our ability to use them now depends on whether or not we can find a useful definition of the annihilation and creation operators in terms of the field operators. As regards the implications of Haag's theorem, we now see an interesting change of status of a wave function between non-relativistic and relativistic theories. In a non-relativistic theory, the state space is the same with and without interactions, and the vacuum is the same state. In a relativistic theory, provided that the vacuum-annihilation condition is obeyed, we have a \emph{labeling} of a standard set of basis states that is the same as in the free theory, as shown by Eq.\ (\ref{eq:wf.expansion}). To avoid a conflict with Haag's theorem, one could have the free and interacting vacua being different. Alternatively, as a mathematical device one could take the abstract state spaces to be the same in the free and interacting theories; but then some pathologies must arise in how the free and interacting fields act on this space; that is, in how one constructs fields obeying the equations of motion in the free and interacting theories. See \cite{Schlieder:1972qr, Herrmann:2015dqa} for explanations of how this works out in terms of the field operators when light-front quantization is used: essentially the complications are avoided in light-front quantization by projecting out of the field operator its behavior at $k^+=0$. For the case of fields specified on a surface of fixed time $t$, there is no way of defining annihilation and creation operators by Fourier transformation of fields on the surface, such that they give the vacuum-annihilation conditions. Certainly none has been discovered; see the literature on light-front quantization for details. \subsection{Wave functions and light-front quantization} \label{sec:wf.lf} Compared with equal-time quantization, the situation radically changes in light-front quantization. On a surface of fixed $x^+$, we define annihilation and creation operators by Fourier transformation: \begin{widetext} \begin{align} \label{eq:scalar.lf} \phi(x^+,x^-,\3{x}_T) = {}& \int \frac{dk^+d^2\3k_T}{16\pi^3|k^+|} \theta(k^+) \left( a_{k^+,\3k_T}(x^+) e^{-ik^+x^- + i \3k_T\cdot\3x_T} + a^\dagger_{k^+,\3k_T}(x^+) e^{ik^+x^- - i \3k_T\cdot\3x_T} \right) \nonumber\\ = {}& \int \frac{dk^+d^2\3k_T}{16\pi^3|k^+|} e^{-ik^+x^- + i \3k_T\cdot\3x_T} \left( a_{k^+,\3k_T}(x^+) \theta(k^+) + a^\dagger_{-k^+,-\3k_T}(x^+) \theta(-k^+) \right). \end{align} \end{widetext} The key thing is that values of physical plus momenta are restricted to be positive, and we express this by the allowed values for $k^+$ in each term. In the second line, it is arranged to have a common exponential factor, and there we can distinguish annihilation and creation operators by the sign of $k^+$. (Observe the reversal of sign of the argument of $a^\dagger$ between the two lines.) The explicit denominator factor of $|k^+|$ gives a Lorentz-invariant form of the integral over momenta. The annihilation and creation operators are given dependence on $x^+$, which is determined by the solution of the theory. It follows from Eq.\ (\ref{eq:scalar.lf}) that annihilation and creation operators can be obtained from the field operator by a Fourier transformation on a surface of fixed $x^+$, given a non-zero value of $k^+$. The standard commutation relations for the annihilation and creation operators follow from the commutation relation of the field on a surface of fixed $x^+$. Furthermore, applying an annihilation operator (with nonzero $k^+$) to the vacuum gives zero. This is simply because by the known properties of the field under translations (in the full theory including interactions), the state $a_{k^+,\3k_T}|0\rangle$ would have negative plus momentum relative to the vacuum, which is not possible. Thus all the conditions summarized in Sec.\ \ref{sec:wf.overall} for defining wave functions are obeyed, and we have not had to invoke triviality of the vacuum to do this. An immediate complication is that in a field theory, the most general state is obtained by repeatedly applying field operators to the field and taking linear combinations. Normally it would be sufficient to restrict the field operators to the quantization surface, and this would show that the most general state is of the form (\ref{eq:wf.expansion}). The field operators get integrated with coordinate-space wave functions. This is compatible with the property that the fields are not actual operators but are operator-valued distributions; operators are only defined with an integration with a smooth test function. But in light-front quantization, the creation (and annihilation) operators are restricted to non-zero $k^+$. When the algebra of the operators is examined \cite{Schlieder:1972qr, Herrmann:2015dqa}, this corresponds to a restriction to using test functions whose Fourier transform is zero at zero $k^+$. Correspondingly, the wave functions $\psi(k_1^+,\3k_{1,T}; k_2^+,\3k_{2,T}; \ldots)$ have to vanish when one or more $k_j^+$ is zero. There is the potential for extra states obtained by applying zero-mode operators on the vacuum. To implement this properly in terms of field operators one must go slightly off the light-front \cite{Schlieder:1972qr, Herrmann:2015dqa}. In momentum-space, the use of the appropriate distribution-theoretic framework indicates that the implementation of the extra zero-mode contributions uses integrals over a neighborhood of $k^+=0$, rather like that found in our earlier calculation in Eq.\ (\ref{eq:vertex:x-.2}) at $p^+=0$. These are high rapidity modes, and presumably susceptible to a systematic analysis like those used in factorization or Regge theory. Further examination is needed. \subsection{Complications} \label{sec:wf.complications} Beyond general zero-mode issues of the kind just discussed, there are two complications that require modifications of the framework. One is to deal with non-trivial field renormalization, and the other is for gauge theories. Neither of these applies in a super-renormalizable non-gauge model, e.g., Yukawa theory in $2+1$ space-time dimensions. \subsubsection{Renormalization} The commutation relations that give the standard interpretation of annihilation and creation operators are derived from the commutation relations of the fields on the quantization surface. But in a renormalizable theory, the fields need a renormalization factor: \begin{equation} \label{eq:field.ren} \phi_0(x) = \sqrt{Z} \phi_R(x). \end{equation} Here $\phi_0$ is the bare field, having the standard normalization for its commutation relations, and $\phi_R$ is the renormalized field. It is the renormalized field whose Green functions and matrix elements are finite. To define the theory an ultra-violet cut-off is applied. Order by order in perturbation theory, the renormalization factor $Z$ diverges. The divergences can be resummed by renormalization-group methods, at least if the theory is asymptotically free. When an on-shell ``physical'' renormalization prescription is used to define the normalization of $Z$, the K\"allen-Lehmann representation for the two-point functions can be used to show that the exact value of $Z$ obeys $0\leq Z<1$, a fact reflected in the sign of its anomalous dimension, and in a negative value for the lowest-order correction to $Z$ in perturbation theory. In the case that the lowest-order divergence is at one-loop order, the renormalization group shows that the exact value obeys $Z\to0$ as the cut-off is removed, in an asymptotically free theory. To get finite wave functions, we must apply the same renormalization factor to the annihilation and creation operators, with the outcome that the renormalized annihilation operators used to calculate finite wave functions in Eq.\ (\ref{eq:wf.expansion}) are each an infinite factor $1/\sqrt{Z}$ times the ones obey the standard commutation relations. This needs a modification of the formula (\ref{eq:wf.expansion}) for a state. I am not aware of a systematic treatment of this issue. It is possible to do all calculations with a cutoff that is not removed. But it is surely preferable to say that the theory itself is the renormalized theory defined in the limit that the cutoff is removed. Then Eq.\ (\ref{eq:wf.basic}) gives a valid definition of renormalized wave functions in terms of matrix elements of renormalized operators. In situations where perturbation theory applies, perturbative calculations of wave functions work. But the actual expansion of the quantum mechanical state needs modification from (\ref{eq:wf.expansion}). This is presumably a purely technical problem, since ultra-violet renormalization is very well understood. \subsubsection{Rapidity divergences in gauge theory} Much more interesting is the problem with rapidity divergences in any gauge theory. The natural gauge condition to use with quantization on a plane of constant $x^+$ is \cite{Kogut:1969xa} the light-cone gauge $A^+=0$, which gives the simplest version of the formalism. Unfortunately, the wave functions defined using this method have divergences \cite{Ma:2006dp} beyond those associated with ultra-violet renormalization. These divergences have exactly the same cause as those that arise when the same annihilation and creation operators are used in the natural way to try to define transverse-momentum-dependent (TMD) parton densities. The divergences can be seen readily in perturbative calculations, when going beyond lowest order. The divergences arise from regions of integration where rapidities of the lines for the gauge fields go to negative infinity. For example, Brodsky et al.\ \cite{Brodsky:2000ii} made calculations in QED of the light-front wave functions of a single electron. The one-electron component is given in their Eq.\ (25) in terms of a quantity they call $Z$ (not to be confused with the renormalization factor in Eq.\ (\ref{eq:field.ren}) in the present paper). The one-loop value is given in their Eq.\ (29). It has an integral over a variable $x$ from 0 to 1, and the integral diverges logarithmically at $x=1$. This contrasts with the statement just after (25) that $Z$ is finite when the theory is regulated in the ultraviolet and infrared. That such rapidity divergences are a general phenomena can be seen by the same methods that Collins and Soper \cite{Collins:1981uk, Collins:1981uw} devised for the TMD parton densities and fragmentation functions. To regulate the divergences they changed to a definition \cite{Soper:1979fq} that uses the same formula in terms of field operators but with the use of space-like axial gauge $n\cdot A=0$. The matrix elements depend on an extra parameter $\zeta$. Collins and Soper derived an equation for the $n$-dependence and hence the $\zeta$-dependence that is phenomenologically important. When $n$ becomes light-like, i.e., when $n^\mu\to(0,1,\30_T)=g^{\mu+}$, the parameter $\zeta$ goes to infinity. The Collins-Soper equation shows in full generality that there is a divergence in this limit. An alternative method gives an explicitly gauge invariant definition. It starts by writing operator matrix elements such as the one in (\ref{eq:wf.basic}) in terms of integrals over gauge-invariant field operators. In the expression in terms of operators in the light-cone gauge, one inserts Wilson lines in the minus direction, to make the operators gauge invariant. In the $A^+=0$ gauge, the Wilson lines are unity, but we now have a definition that can be used with any gauge condition. Calculations reproduce the same rapidity divergences found earlier. A new method \cite{Collins:2011qcdbook} was devised to give a kind of rapidity renormalization factor using vacuum matrix elements of certain specially chosen Wilson loops. The resulting matrix elements have a parameter $\zeta$ with the same significance Collins and Soper's $\zeta$, and the evolution equations are of the same form. For related definitions in soft-collinear effective theory (SCET), see \cite{Becher:2010tm, GarciaEchevarria:2011rb, Collins:2012uy}. Although these methods were devised in the context of TMD parton densities, the principles apply equally to light-front wave functions, as was shown by Ma and Wang \cite{Ma:2006dp}. An appropriate version of the modern definitions was given by Li and Wang \cite{Li:2014xda}. Note the these considerations apply to the kind of light-front wave function that has dependence on transverse momenta. In contrast, much phenomenology is done with a different kind of distribution amplitude that is integrated over transverse momentum. For these, rapidity divergences cancel, and the evolution equation is a kind of renormalization-group equation, the Efremov-Radyushkin-Brodsky-Lepage (ERBL) equation. This is the case at least when Radyushkin's definition \cite{Radyushkin:1977gp,Radyushkin:2009zg} is used. However, the Brodsky-Lepage definition \cite{Lepage:1979zb, Lepage:1980fj} is made in light-cone gauge with an explicit cutoff in transverse-momentum. If that definition is taken literally and its implications examined closely enough, it is expected to give rapidity divergences. \section{Discussion} \label{sec:discuss} The use of light-front quantization has a number of important advantages \cite{Chang:1968bh, Brodsky:1997de, Heinzl:2000ht}, compared with equal-time quantization. Many are presented \cite{Brodsky:2016nsn} as being directly related to the vacuum being trivial. An interesting consequence of vacuum triviality is that the effective cosmological constant caused by vacuum bubbles is zero \cite{Brodsky:2009zd, Brodsky:2016nsn}, thereby trivially solving the notorious cosmological constant problem. But this solution comes at the price that it implies an inequivalence between the solution of a quantum field theory by light-front quantization and by conventional methods. However, it has long been known that the claim of vacuum triviality is wrong \cite{Chang:1968bh, Yan:1973qg, Nakanishi:1976yx, Nakanishi:1976vf}. Furthermore the validity of the inconsistency between the results of different kinds of quantization was challenged by the demonstration \cite{Chang:1968bh, Yan:1973qg} that an actual paradox is produced by the method of calculation that gives the vanishing vacuum bubbles. Chang and Ma \cite{Chang:1968bh} and Yan \cite{Yan:1973qg} derived corrected rules for light-front perturbation theory. The corrections are confined to situations typified by the vacuum bubbles used to calculate the bare contribution to an effective cosmological constant. But their starting point was an assumption that Feynman perturbation theory is correct. In view of a possible inequivalence between different methods of quantization, this is not a sufficient argument. Therefore, motivated by continuing assertions about vacuum triviality and the cosmological constant, the present paper tried to give an elementary account that I hope will lay this issue to rest. First, I gave an example of the paradox mentioned above, and explained why it indicates that there is almost certainly an error in the rules that lead to the vanishing of vacuum bubbles, etc. Then I located the error in the derivation of the rules for light-front perturbation theory. The flaw is in the unrestricted use of a standard theorem to get a delta-function to implement momentum conservation. In exactly the conditions needed for the cosmological constant calculation, the theorem needs to be changed. The change restores the equivalence between the results in different methods, in accordance with the old results of Chang and Ma and Yan, but without needing the starting assumption that it is Feynman perturbation theory that is correct. Equally, the results now support non-triviality of the vacuum. As we saw in Sec.\ \ref{sec:lfwf}, non-triviality of the vacuum does not affect the ability to define light-front wave functions. However, in a gauge theory, the standard definitions have rapidity divergences, and modified definitions are compulsory to deal with this \cite{Ma:2006dp, Li:2014xda}, with complete similarity to corresponding issues in the definition and use of transverse-momentum-dependent parton densities. The divergences to be dealt with in this fashion arise from an integral over the rapidity of gluonic configurations, and give divergences when the plus momenta of these configurations go to zero. \begin{acknowledgments} This work was supported in part by the U.S. Department of Energy under Grant No.\ DE-SC0013699. I would like to thank Stan Brodsky, Thomas Heinzl, Paul Hoyer, Jainendra Jain, and Ted Rogers for useful discussions. \end{acknowledgments} \addtolength{\textheight}{3mm}
\section{Introduction} \label{sect introduction} The geometry and analysis on asymptotically hyperbolic (AH in short) manifolds attracted significant research interest from both mathematics and theoretic physics communities, particularly after the introduction of AdS/CFT correspondence in theoretic physics (cf. \cite{Ma98, GKP, Wi98}). In this paper we prove the short time existence on AH manifolds and a local Shi's type curvature derivative estimates for conformal Ricci flow (CRF in short). Ricci flow is known to be a powerful geometric and analytic tool in differential geometry and topology. CRF was introduced by Fischer \cite{Fi04} as the modified Ricci flow that maintains scalar curvature constant. It is so named because the constancy of scalar curvature is achieved by the conformal deformation of metrics at each time. Fischer \cite{Fi04} observed that, on compact manifolds, Yamabe constant is strictly increasing along CRF. Later, in \cite{LQZ}, the short-time existence of CRF on asymptotically flat manifolds was established. Interestingly, it is observed that ADM mass is strictly decreasing unless the initial metric is Ricci-flat \cite[Theorem 1.4]{LQZ} (in contrast to the fact that ADM mass stays constant along Ricci flow \cite{DM}). CRF is considered to possibly be an efficient way to search for Einstein metrics because of the nature of the Einstein-Hilbert action (cf. \cite{Be87, Fi04}), that is, Einstein metrics on a manifold $M^n$ of dimension $n$ may be associated with $$ \sup_{\{[g]: \text{conf classes}\}}\inf_{\{g\in[g]: \text{Riem metrics}\}}\frac{\int_{M} R_g d \mu_g }{\text{vol}(M, g)^\frac {n-2}n}. $$ As introduced in \cite{Fi04} (see also \cite{LQZ}), a family of metrics $\{g(t): t\in [0, T)\}$ on a smooth manifold $X^{m+1}$ is said to be CRF if it satisfies: \begin{equation} \label{eq crf g p orig general} \left\{\aligned & \partial_t g(t) + 2 \left ( \operatorname{Rc}_{g(t)} + m g(t) \right ) = -2 p(t) g(t) \quad \text{in } X \times (0,T), \\ & (-\Delta_{g(t)} + (m+1))p(t) = \frac 1m| \operatorname{Rc}_{g(t)} + m g(t) |_{g(t)}^2 \quad \text{on } X \times [0, T), \\ & g(0) = g_0, \endaligned\right. \end{equation} where the initial metric $g_0$ has constant scalar curvature $- m(m+1)$, $p(t)$ is an auxiliary function and is named as the pressure function in \cite{Fi04} when comparing CRF with the Navier-Stokes equations, and $T$ is a positive constant. The scalar curvature $R_{g(t)}$ remains as $-m(m+1)$ for all $t\in [0, T)$. \\ Before stating the results, let us first briefly introduce AH manifolds. Let $\bar{X}$ be a compact smooth manifold with nonempty smooth boundary $\partial X$ and let $X$ be the interior. A smooth function $x: \bar{X} \rightarrow [0, \infty)$ is called a defining function for the boundary $\partial X$ if it satisfies: $$ \text{1) $x > 0$ on $X$; \quad 2) $x = 0$ on $\partial X$; \quad 3) $dx \neq 0$ on $\partial X$}. $$ A metric $g$ on $X$ is $C^{l+\beta}$ conformally compact if $x^2g$ extends to be a $C^{l +\beta}$ metric on $\bar{X}$ for a boundary defining function $x$, where $l \geq 2$ is an integer and $\beta \in(0,1)$. $x^2g$ induces a metric $\hat g$ on the boundary and, in fact, $g$ induces a conformal structure $[\hat g]$ on the boundary when defining functions vary. $(X, g)$ is said to be AH if it is conformally compact and the sectional curvature of $g$ goes to $-1$ asymptotically at the infinity. It is often convenient to use geodesic defining functions for AH manifolds. A geodesic defining function $x$ is a defining function such that $|dx|_{x^2 g} = 1$ in a collar neighborhood of the boundary not just on the boundary. Hence $$ g = x^{-2} (dx^2 + g_x) $$ where $g_x$ is a family of metrics on $\partial X$ depending on $x$, i.e. the metric $g$ splits orthogonally in $x$ and the tangential to $\partial X$. The central feature of AH manifolds is the association of the AH Riemannian metrics on $X$ to the conformal structures on its boundary $\partial X$, which is fundamental to a mathematical theory of AdS/CFT correspondence in theoretic physics. Similar to the explorations in \cite{Fi04, LQZ}, one expects that CRF is significant in the search for appropriately canonical AH metrics for a given conformal structure at the boundary to enrich the mathematical theory for AdS/CFT correspondence. \\ The first result of this article is the short time existence of CRF on AH manifolds (see \S \ref{subsec notat func space} for the description of H\"{o}lder spaces used). \begin{theorem}\label{thm short exist CRF on AH} Let $(X^{m+1}, g_0)$, $m\geq 3$, be a $C^{4+ \alpha}$ AH manifold with constant scalar curvature $-m(m+1)$ and let $x$ be a geodesic defining function. Assume that $\operatorname{Rc}_{g_0} + m g_0\in x^2 C^{2+\alpha}_e(X)$. Then, for some $T > 0$, there is a family of metrics $g(t) = g_0 + u(\cdot, t)$ which solves CRF \eqref{eq crf g p orig general} such that $g(t)$ is $C^{1+\alpha}$ AH with constant scalar curvature $-m(m+1)$ and $u \in x^2C^{2+\alpha, \frac {2+\alpha}2}_e(X_T)$. \end{theorem} We would like to note that one can always conformally deform a given AH metric into an AH metric with constant scalar curvature, say $-m(m+1)$, thanks to \cite{ACF}. Let $\owedge$ be the Kulkarni-Nomizu product. The conditions that Riemannian curvature $\operatorname{Rm} + g\owedge g = O(x^2)$, Ricci curvature $\operatorname{Rc}+ m g= O(x^2)$, and the boundary $\partial X$ is totally geodesic in $X$ under the metric $x^2 g$ for a geodesic defining function $x$, are all equivalent and preserved under the conformal deformations taken in \cite{ACF} (cf. Lemma \ref{calculation-AH-curvature}). And the property that $\operatorname{Rm} + g\owedge g = O(x^2)$ on an AH manifold is intrinsic and independent of the choice of the geodesic defining functions. Ricci flows on complete noncompact manifolds were studied by many people. The most notable early work is \cite{Sh89} by Shi in 1989. Ricci flows on AH manifolds were also studied in \cite{QSW, Ba11}, where the existence in \cite{QSW} was based on the maximum principle argument and the existence result in \cite{Sh89}, while the existence in \cite{Ba11} is based on asymptotic analysis on AH manifolds in \cite{Mz91, Le06, Al07}. In this paper, we prove Theorem \ref{thm short exist CRF on AH} using the framework similar to that in \cite{LQZ} for parabolic-elliptic systems based on the analysis on AH manifolds from \cite{Mz91, Le06, Al07, Ba11}. \\ The second result is a local Shi's type estimate for CRF. In Ricci flow Shi's estimates on derivatives of Riemannian curvature is crucial for compactness results, and therefore, are essential for the later developments in Ricci flow. For CRF on smooth manifold $M^{n}$ with initial metric $g_0$ of constant scalar curvature $R_{g_0}=2nc$ \begin{equation} \label{eq crf g p local riem} \left\{\aligned & \partial_t g(t) = -2 \left ( \operatorname{Rc}_{g(t)} - 2c g(t) \right ) -2 p(t) g(t) \quad \text{on } M \times (0,T], \\ & ((n-1) \Delta_{g(t)} + 2nc ) p(t) = - | \operatorname{Rc}_{g(t)} -2cg(t) |_{g(t)}^2 \quad \text{on } M \times [0, T], \endaligned\right. \end{equation} we have \begin{theorem}\label{thm local curvature derivative est} Fix constants $\alpha \in (0, 1), K \geq 1, \tilde{K}>0, c, r>0$, and integer $n \geq 2$, we have the following. \vskip .1cm \noindent $($i$)$ There exists a constant $C_1=C_1\left( \alpha, n, \sqrt{K}r,\tilde{K}, |c| \right) $ depending only on $\alpha, n$, $\sqrt{K}r, \tilde{K} $, and $|c|$, such that the following property holds. Let $(M^n, g(t), p(t)), \, t\in\left[ 0,T \right] $, be a solution to the CRF (\ref{eq crf g p local riem}). Assume that closed ball $\bar{B}_{g\left( 0\right) }\left( O,r\right) \subset M $ is compact and that \begin{align} &\left\vert \operatorname{Rm} \right\vert \leq K \quad \text{ on } \bar{B}_{g\left( 0\right) }\left( O,r\right) \times \lbrack0, T_*], \label{eq curv bdd assump} \\ & \max_{i=0,1,2,3} | \nabla^i p| \leq \tilde{K} \quad \text{ on } \bar{B}_{g \left( 0\right) }\left( O,r\right) \times \lbrack 0, T_*], \label{eq p deriv bdd assump} \end{align} where constant $ T_* \leq \min \{T, \alpha /K \}$, then we have \begin{equation} \left\vert \nabla\operatorname*{Rm}\left( x,t\right) \right\vert_{g(t)} \leq \frac{C_1 K}{\sqrt{t}} \label{eq est local first order Shi} \end{equation} for all $\left( x,t\right) \in B_{g\left( 0\right) }\left( O,r/2\right) \times(0,T_*]$. \vskip .1cm \noindent $($ii$)$ If $(M^n, g(t),p(t)), \, t \in [0,T]$, in (i) is a complete solution to the CRF. Suppose assumptions (\ref{eq curv bdd assump}) and (\ref{eq p deriv bdd assump}) hold on $M \times [0,T_*]$, then there is a constant $C_2= C_2(\alpha, n,\tilde{K}, |c|)$ such that \begin{equation} \left\vert \nabla\operatorname*{Rm}\left( x,t\right) \right\vert_{g(t)} \leq \frac{C_2 K}{\sqrt{t}} \label{eq est first order Shi} \end{equation} for all $\left( x,t\right) \in M \times(0,T_*]$. \end{theorem} Here is the outline of the rest of this article. In \S \ref{sect preli map proper} we discuss basic analysis results on AH manifolds from \cite{Le06, Ba11}, which are needed to prove the short time existence. \S \ref{sect existence of CRF on AH mfld} is devoted to the proof of Theorem \ref{thm short exist CRF on AH} using Banach's contraction mapping theorem. In \S \ref{sect Shi's derivative estimate under crf} we give a proof Theorem \ref{thm local curvature derivative est} using the parabolic maximum principle. Also we will outline a proof of high order derivative estimate of the curvature tensor of CRF (see Theorem \ref{thm shi high order estimate}). \\ \noindent \textbf{Acknowledgement}. P.L. thanks the visiting program for scholars from abroad at Peking University and Professor Zhu, Xiaohua for the warm hospitality and support. P.L. and J.Q. thanks Beijing International Center for Mathematical Research, where part of this work is carried out during the summer of 2017. \section{Preliminaries for AH manifolds} \label{sect preli map proper} In this section we recall some basic analysis on AH manifolds. We mostly rely on \cite{Mz91, Le06, Al07, Ba11}, and readers are referred to them for detailed accounts. \subsection{Notations and function/tensor H\"{o}lder spaces}\label{subsec notat func space} Let $({X}^{m+1}, g)$ be a $C^{l+ \beta}$ AH manifold with $l \geq 2$ and $\beta\in (0, 1)$. Let $x$ be a geodesic defining function such that, in a collar neighborhood $\{ x < \varepsilon\}$ near the infinity, we have $g = x^{-2}(dx^2 + g_x)$, where $g_x$ is a family of metrics on $\partial X$. Let $X_T = X\times [0, T]$. We will consider the function/tensor H\"{o}lder spaces $$ x^\mu C^{k+\alpha}_e(X), \quad x^\mu C_e^{k+\alpha, \frac{k+\alpha}2}(X_T) $$ as described in \cite[Section 3.1]{Ba11}, for $k + \alpha \leq l+\beta$, which is assumed throughout this paper. We are concerned with the operators $-\Delta+(m+1)$ on functions and $\Delta _L + 2m$ on 2-tensors on $X$, where the Lichnerowicz operator $\Delta_L =\Delta_L^g $ acting on $2$-tensor $w$ is given by \[ (\Delta_L^{g} w)_{ij} = g^{kl} \nabla_k \nabla_l w_{ij} + 2 g^{kl}g^{pq} R_{ikpj}w_{lq} - g^{kl} R_{ik}w_{lj} - g^{kl}R_{jk}w_{li}. \] Throughout this article when we use local coordinates $(x^0, x^1, \cdots, x^m)$ near the boundary of $X$, we choose $x^0=x$ and $(x^1, \cdots, x^m)$ to be some local coordinates on $\partial X$. Our convention for Riemann curvature tensor components $R_{ijkl}$ is such that $g^{kl} R_{iklj} = R_{ij}$. \\ Let $\operatorname{Rm}$ denote the curvature $(4,0)$-tensor and let $\operatorname{Rc}$ denote the Ricci curvature. First by some straightforward calculation we get \begin{lemma} \label{calculation-AH-curvature} Suppose that $(X^{m+1}, g)$ is $C^{l+\beta}$ AH and that $x$ is a geodesic defining function. Let $\bar g = x^2 g$. Then near the boundary of $X$ we may write Riemannian curvature tensor components as \begin{equation}\label{AH-curvature} R_{ijkl}(g) = - (g_{ik}g_{jl} - g_{il} g_{jk}) + x^{-3} T_{ijkl} + x^{-2} R_{ijkl}(\bar g) \end{equation} for some $(4,0)$-tensor $T$ defined in (\ref{AH-curvature tensor T}) below. It follows that $\operatorname{Rm} + g \owedge g \in x^2 C^{l-2+ \beta}_e(X)$, $\operatorname{Rc} + mg \in x^2 C^{l-2+\beta}_e(X)$, and the condition that boundary $\partial X$ is totally geodesic in $X$ under metric $\bar{g}$, are all equivalent. Note that the last condition is independent of the choice of the geodesic defining function $x$. \end{lemma} \proof Note that $\operatorname{Rm} + g \owedge g \in x^2 C^{l-2+ \beta}_e(X)$ is equivalent to that $T$ vanishes at the boundary $\partial X$, also note that the condition that boundary $\partial X$ is totally geodesic in $X$ under $\bar{g}$ is equivalent to $\partial_x \bar g_{ab}|_{x=0} = 0$, where $a, b \in \{1, 2, \cdots, m\}$. After a long but simple calculation, we get \begin{equation}\label{AH-curvature tensor T} 2T_{ijkl} = \bar g_{ik}\partial_x\bar g_{jl} + \bar g_{jl}\partial_x\bar g_{ik} - \bar g_{il}\partial_x \bar g_{jk} - \bar g_{jk}\partial_x \bar g_{il}. \end{equation} Therefore $T$ vanishes at the boundary $\partial X$ if and only if $\partial_x \bar g_{ab}|_{ x=0} = 0$. Taking the trace of (\ref{AH-curvature}) we have \begin{equation} \label{AH-curvature Ricci} R_{ij}(g)=-mg_{ij} +\frac{1}{2} x^{-1} \left (\bar{g}_{ij} \bar{g}^{kl} \partial_x \bar{g}_{kl} +(m-1) \partial_x \bar{g}_{ij} \right ) -x^2R_{ij}(\bar{g}). \end{equation} Hence $\operatorname{Rc} + mg \in x^2 C^{l-2+\beta}_e(X)$ is equivalent to $\partial_x \bar g_{ab}|_{x=0} = 0$. The lemma follows from the equivalences proved above. \endproof Let $(X^{m+1}, g_0)$ be a $C^{l+\beta}$ AH manifold. As a consequence of Lemma \ref{calculation-AH-curvature}, for time-dependent cases, we have \begin{equation} \label{eq ut Rm asymp behav} \operatorname{Rm}_{g_u(t)} + g_u(t) \owedge g_u(t) \in x^2 C_e^{k-2+\alpha, \frac{k -2+\alpha}2}(X_T) \end{equation} for $g_u(t) = g_0 + u(\cdot, t)$ and a symmetric $2$-tensor $u \in x^2 C^{k+\alpha, \frac{k+\alpha} 2}_e(X_T)$, provided that $\operatorname{Rc}_{g_0} + m g_0 \in x^2 C^{l-2 +\beta}_e(X)$. We also obtain by a direct calculation \begin{align} \|\operatorname{Rm}_{g_u(t)} -\operatorname{Rm}_{ g_{\tilde{u}} (t)} \|_{ x^{\mu} C_e^{k-2+\alpha, \frac{k -2+ \alpha}2}(X_T)} \leq C \| u -\tilde{u} \|_{ x^{\mu}C^{k+\alpha, \frac{k+\alpha}2}_e(X_T)} \label{eq u tilde u cur diff est} \end{align} for symmetric $2$-tensors $u, \tilde u \in x^\mu C^{k+\alpha, \frac {k+\alpha}2}_e (X_T)$. The other very useful fact for us is the following: \begin{lemma} \label{Lemma 3.7-Lee} (\cite[Lemma 3.7]{Le06}) Let $(X^{m+1}, g)$ be a $C^{l+\beta}$ AH manifold. For 2-tensors, we have continuous embedding \begin{align} x^\mu C^{k+\alpha}(\overline{X}) & \hookrightarrow x^{\mu+2} C^{k+\alpha}(X) \label{Lemma 3.7-Lee-a}\\ x^{k+\alpha+2}C^{k+\alpha}(X) & \hookrightarrow C^{k+\alpha}(\overline{X}) \label{Lemma 3.7-Lee-b} \end{align} for $k+\alpha \leq l+\beta$. \end{lemma} Consequently, we have that $g_u(t)$ is of $C^{k+\alpha}$ AH if $g_0$ is $C^{k+\alpha}$ AH and $u\in x^\mu C^{k+\alpha, \frac{k+\alpha}2}(X_T)$ for $\mu \geq k+\alpha$. \subsection{Elliptic Schauder estimates on AH manifolds} To treat the pressure function $p$ when solving equation \eqref{eq crf g p orig general}, we recall the isomorphism property of $- \Delta +(m+1)$ on spaces of functions. The following is an immediate consequence of \cite[Lemma 3.3]{Le95}. \begin{lemma} \label{isomorphism-function} (\cite[Lemma 3.3]{Le95}) Let $(X^{m+1}, \ g)$ be a $C^{l+\beta}$ AH manifold. Then, for $k-1+\alpha \leq l +\beta$ and $\mu\in (-1, m+1)$, $$ -\Delta_g + (m+1): x^\mu C^{k+\alpha}_e(X) \to x^\mu C^{k -2 +\alpha}_e (X) $$ is an isomorphism. \end{lemma} For our purpose we need to solve the pressure equation $p(\cdot, t)$ in \eqref{eq crf g p orig general} for each $t\in [0, T]$, in other words, we need Schauder estimates uniform in the time variable like [LQZ, Lemma 3.11]. To apply Lemma \ref{isomorphism-function} to metric $g_u(t) = g_0 + u (\cdot, t)$ at each $t \in [0, T]$, we need $g_u(t)$ to be at least $C^{k-1+\alpha}$ AH and close to $g_0$ in some appropriate sense. In fact, as a consequence of Lemma \ref{Lemma 3.7-Lee} and Lemma \ref{isomorphism-function}, we have \begin{lemma} \label{Lemma 3.11-LQZ} Suppose that $(X^{m+1}, g_0)$ is $C^{l+\beta}$ AH. Then for $k-1+\alpha\leq l+\beta$ and $\mu\in (-1, m+1)$, there exist $\delta >0$ and $C>0$ such that \begin{equation} \label{schauder-t} \|(-\Delta_{g_u(t)} + (m+1))^{-1} \phi \|_{x^\mu C^{k+\alpha, \frac{k-2+\alpha}2}_e(X_T)}\leq C \|\phi\|_{x^\mu C^{k-2+\alpha, \frac{k-2+\alpha}2}_e(X_T)}, \end{equation} provided that $$\|u\|_{x^\nu C^{k-1+\alpha, \frac{k-1+\alpha}2}_e(X_T)} \leq \delta$$ and $\nu \geq k-1+\alpha$. \end{lemma} For a general initial metric $g_0$ with $C^{l+\beta}$ AH regularity, according to \cite{Ba11}, one may expect to work with $u \in xC^{2+\alpha, \frac {2+\alpha}2}_e(X_T)$ with $2+\alpha \leq l+\beta$ to prove the short time existence of solutions of form $g_u(t)$ by applying the contraction mapping theorem. This is due to, initially, $$ \operatorname{Rc}_{g_0} + m g_0 \in xC^{l-2+\beta}_e(X) $$ (cf. \eqref{AH-curvature Ricci}). In the light of \eqref{Lemma 3.7-Lee-b}, this only provides $C^\alpha$ AH regularity for the metrics $g_u(t)$ after initial time, which is not enough. We need the minimal $C^{1+\alpha}$ AH regularity for $g_u(t)$ in order to apply Lemma \ref{Lemma 3.11-LQZ}, and Lemma \ref{lem Laplace invertible weighted timed} and \ref{thm 3.2 in Ba11} below. Therefore one needs, at least for this technical reason, assume that for the initial metric $g_0$ \begin{equation}\label{initial-condition} \operatorname{Rc}_{g_0} + m g_0 \in x^2 C^{l-2+\beta}_e(X), \end{equation} i.e., $\partial X$ is total geodesic in $(\bar{X}, x^2g)$. Later we will choose $k = 2$ and $\nu = 2 > 1+\alpha$ in applying Lemma \ref{Lemma 3.11-LQZ}. In the proof of Lemma \ref{lem Ba 4.5}, we will need $\|\operatorname{Rc}_{g_0} + m g_0 \|_{x^2 C^{2+\alpha}_e(X)}$ to be bounded, this leads us to choose $l =4$ and $\beta=\alpha$ in the proof of short time existence. \\ Based on Lemma \ref{isomorphism-function} and Lemma \ref{Lemma 3.11-LQZ}, we may define \begin{equation} \label{eq cal P def} \mathcal{P} (g) = \frac 1m (-\Delta_{g} + (m+1))^{-1}(|\text{Rc}_{g}+ mg|^2), \end{equation} for any $C^{1+\alpha}$ AH metric $g$. Then we can easily derive the following. \begin{lemma} \label{lem Laplace invertible weighted timed} Let $(X^{m+1}, \ g_0)$ be a $C^{l+ \beta}$ AH manifold. Let $k \in \mathbb{N}, \alpha\in (0, 1)$, and $k + \alpha \leq l+\beta$. Then there are small positive constants $T$ and $\epsilon$ such that the following hold. Let $g_u(t) = g_0+u(\cdot, t)$ with \[ u\in x^\mu C^{k+\alpha, \frac{\alpha}2}_e(X_T) \bigcap x^\nu C^{k-1+\alpha, \frac {\alpha}2}_e(X_T). \] \vskip .1cm \noindent (i) For $ \|u\|_{x^\nu C^{k-1+\alpha, \frac{\alpha}2}_e(X_T)} \leq \epsilon$, we have $\mathcal{P}(g_u) \in x^{2\mu} C_e^{k+\alpha, \frac{\alpha}2}(X_T)$, provided that $2\mu\in (0, 2)$, $\nu > k-1+\alpha$; and \vskip .1cm \noindent (ii) For $u, \tilde{u}$ in some given ball in $x^\mu C^{k+\alpha, \frac{\alpha}2}_{e}(X_T)$ which satisfy \[ \| u \|_{x^\nu C^{k-1+\alpha, \frac{\alpha}2}_e(X_T)} < \epsilon, \text{ and } \| \tilde u \|_{x^\nu C^{k-1+\alpha, \frac{\alpha}2}(X_T)} < \epsilon, \] we have \[ \| \mathcal{P}(g_u) - \mathcal{P}(g_{\tilde{u}}) \|_{x^{\mu} C^{k+\alpha, \frac{\alpha}2}_{e}(X_T)} \leq C \|u - \tilde u \|_{x^\mu C^{k+\alpha, \frac {\alpha}2}_e(X_T)}, \] provided that $\mu \in (0, m+1)$, $\nu > k-1+\alpha$. \end{lemma} We will use Lemma \ref{lem Laplace invertible weighted timed} with $\nu = 2$ and $k = 2$ below. \subsection{Parabolic Schauder estimates on AH manifolds} We will need the following basic parabolic Schauder estimate \cite[Theorem 3.2] {Ba11}, which covers the case when $L$ is $\Delta_L + 2m$ on 2-tensors. \begin{lemma}\label{thm 3.2 in Ba11} (\cite[Theorem 3.2]{Ba11}) Suppose that $(X^{m+1}, g_0)$ is $C^{l+\beta}$ AH. Suppose $L$ is a second-order linear uniformly degenerate elliptic operator with time-independent coefficients. Let $k+\alpha\leq l+\beta$. Then for every $f \in x^{\mu} C^{k+\alpha, \frac{k+\alpha}2}_e (X_T)$ there is a solution $v$ in $x^{\mu} C^{k+2+\alpha, \frac{k+2+\alpha}2}_e (X_T )$ to equation \begin{equation}\label{linear-parabolic} (\partial_t - L) v(x,t) =f(x,t) \quad \text{ and } v(x,0) =0. \end{equation} Moreover, $v$ satisfies the parabolic Schauder estimate \[ \| v \|_{x^{\mu} C^{k+2+\alpha, \frac{k+2+\alpha}2}_e (X_T)} \leq C \| f \|_{ x^{\mu} C^{k+\alpha, \frac{k+\alpha}2}_e (X_T )}, \] where constant $C=C(T)$ is bounded when $T$ is small. \end{lemma} \subsection{AH metrics of constant scalar curvature} \label{subsec Holder space for CRF AH mflds} In this subsection we recall the existence of a unique conformal deformation on a given AH manifold to make the scalar curvature constant due to \cite[Theorem 1.2 and 1.3]{ACF}. This is significant because such a conformal deformation does not alter the conformal infinity of the AH manifold. \begin{lemma} \label{Theorem 1.2-ACF} Suppose that $(X^{m+1}, \ g)$ is smooth AH. Then there exists a unique conformal deformation $w^{\frac 4{m-1}}g$ such that \begin{itemize} \item $w$ is positive and in $C^{l+\beta}(\overline{X})$ for $l+\beta < m+1$; \item metric $w^{\frac4{m-1}}g$ is $C^{l+\beta}$ AH with constant scalar curvature $-m(m+1)$; \item $w(p) \to 1$ when $p$ approaches $\partial X$. \end{itemize} \end{lemma} In the light of Lemma \ref{calculation-AH-curvature} we have \begin{lemma}\label{Ricci-0-kept} Let $(X^{m+1}, g )$ be a smooth AH manifold. Suppose that $\operatorname{Rc}_g + m g \in x^2C^{l-2+\beta}_e(X)$ with $l+\beta < m+1$. Then the conformal metric $w^\frac 4{m-1} g$ given in Lemma \ref{Theorem 1.2-ACF} is $C^{l+\beta}$ AH, and its traceless Ricci curvature is in $x^2C^{l-2+\beta}_e(X)$. \end{lemma} \section{Short time existence for CFR on AH manifolds} \label{sect existence of CRF on AH mfld} Based on our discussion of (\ref{initial-condition}) and the discussion of \cite{ACF} in \S \ref{subsec Holder space for CRF AH mflds}, from now on, we assume that the initial metric $g_0$ is $C^{4+\alpha}$ AH with constant scalar curvature $-m(m+1)$ and $\operatorname{Rc}_{g_0} + m g_0\in x^2C^{2+ \alpha}_e(X)$. In this section we give a proof of Theorem \ref{thm short exist CRF on AH} in three steps. We will first introduce and solve for a short time DCRF (short for DeTurck conformal Ricci flow). Then we convert the solution of DCRF to a solution of CRF. \subsection{DeTurk CRF and linearization}\label{subseq decomp evol op Ba11 trick} Now we prepare for the application of the contraction mapping theorem to prove the short time existence of DCRF. Let $h_0 =g_0$. The DCRF corresponding to CRF (\ref{eq crf g p orig general}) on a $C^{4+\alpha}$ AH manifold $(X^{m+1}, h_0)$ is \begin{equation}\label{eq dcrf} \left\{\aligned & \partial_t h(t) = - 2 \left (\operatorname{Rc}_{h(t)}+ m h(t) \right ) + \mathcal {L}_{W(t)} h(t) -2 \pi(t) h(t) \quad \text{on } X_T, \\ & (\Delta_{h(t)} -(m+1))\pi(t) = - \frac{1}{m} |\operatorname{Rc}_{h(t)}+ m h(t) |_{h(t)}^2 \quad \text{on } X_T, \\ & h(0) =h_0 \endaligned \right. \end{equation} where vector field $W(t)$ is defined by \begin{equation}\label{vector field} W^k(t) := h_0^{ij} \left ( \Gamma_{ij}^k(h(t)) - \Gamma_{ij}^k (h_0) \right ), \end{equation} $ \mathcal {L}_{W(t)}$ is the Lie derivative, and $\Gamma_{ij}^k$ is the Christoffel symbol of the corresponding metric. For simplicity, in this section we use $\nabla$, $\operatorname{Rm}$, and $\operatorname{Rc}$ to denote the Levi-Civita connection, Riemann curvature, and Ricci curvature of the metric $h_0$ respectively. From \cite[(4.2)]{Ba11} and \cite[Lemma 4.1, 4.2, 4.3]{Ba11} we have the following decomposition. Let $h(t) = h_0 + u(\cdot, t) $ and let operator $L = \Delta_L^{h_0}+ 2m$, where $\Delta_L^{h_0}$ is the Lichnerowicz operator of $h_0$. We rewrite \begin{equation} - 2 \left (\operatorname{Rc}_h+ m h \right )+ \mathcal {L}_{W} h = Lu+\mathcal{Q}(u) +\mathcal{E}, \label{eq Ba11 decomp of evol op} \end{equation} where operator \begin{align*} (\mathcal{Q} (u))_{ij} = & ((h_0 +u)^{kl}- h_0^{kl} ) {\nabla}_k {\nabla}_l u_{ij} + (h_0+u)^{kl}(h_0+u)_{ip} (h_0) ^{pq} {R}_{jklq} \\ & + (h_0+ u)^{kl} (h_0 +u)_{jp} (h_0)^{pq} {R}_{iklq} - 2 {R}_{ij} -2 {R}_{iklj}u_{kl} \\ & - {R}_{ik}u_{kj} - {R}_{jk}u_{ki} + (h_0 +u)^{-1} * (h_0+ u)^{-1} * {\nabla} u * {\nabla}u, \\ \mathcal{E} = & 2(\operatorname{Rc}_{h_0}+m h_0) \in x^2C^{2+ \alpha}_e(X). \end{align*} Note that $\mathcal{E}$ only depends of the initial metric $h_0$. The following is from \cite[(4.4) and (4.5)]{Ba11}. \begin{lemma}\label{Lem 4etc in Ba11} We have \[ \mathcal{Q}(\cdot): x^{2} C_e^{2+\alpha, \frac\alpha 2}(X_T) \rightarrow x^{2} C_e^{\alpha, \frac \alpha 2}(X_T). \] Moreover \begin{align*} & \|\mathcal{Q}(u)\|_{x^{2}C^{\alpha, \frac {\alpha}2}_e(X_T)} \leq C \|u \|^2_ {x^2 C^{2+\alpha, \frac{\alpha}2}_e(X_T)}, \quad \text{ and} \\ & \| \mathcal{Q}(u) - \mathcal{Q}( \tilde{u}) \|_{ x^{2} C_e^{\alpha, \alpha /2}(X_T) } \leq C \max \{ \|u \|_{ x^{2} C_e^{2+\alpha, \alpha /2}(X_T) }, \| \tilde{u}\|_{ x^{2} C_e^{2+ \alpha, \alpha /2}(X_T) } \} \\ & ~\hskip 5.5cm \cdot \|u - \tilde{u} \|_{ x^{2} C_e^{2+\alpha, \alpha /2}(X_T) }. \end{align*} \end{lemma} \vskip .1cm Next we want to introduce the analogous decomposition for the pressure function $\pi(t)$ in (\ref{eq dcrf}). Let $\mathcal{P}$ be the operator defined in (\ref{eq cal P def}) and let \begin{equation} -2 \pi(t) h(t) = -2\mathcal{P}(h_0+u) \cdot (h_0+u) =-2 \mathcal{P}(h_0)u+ \hat{\mathcal{Q}} (u) + \hat{\mathcal{M}}(u) + \hat{\mathcal{E}}, \label{eq P(h +u) decomp} \end{equation} where $$ \aligned \hat{\mathcal{E}} & = -2 \mathcal{P}(h_0)h_0, \\ \hat{\mathcal{M}} (u) & = -2 (\mathcal{P}(h_0+u)-\mathcal{P}(h_0) ) h_0, \\ \hat{\mathcal{Q}}(u) & = -2(\mathcal{P}(h_0+u)-\mathcal{P}(h_0) )u. \\ \endaligned $$ Note that $\hat{\mathcal{E}}$ depends only on the initial metric $h_0$. Based on Lemma \ref{isomorphism-function} we have the following property of $\hat {\mathcal{E}}$ which is analog to that of $\mathcal{E}$. \begin{lemma}\label{lem funct prop Hat E(u)} Suppose that $\operatorname{Rc}_{h_0} + m h_0 \in x^2 C^{2+ \alpha}_e(X)$. Then we have $\hat{\mathcal{E}} \in x^{4} C_e^{4+\alpha}(X)$ and there is a constant $C >0$ such that \[ \|\hat{\mathcal{E}} \|_{ x^{4} C_e^{4+\alpha}(X)} \leq C \|\operatorname{Rc}_{h_0} + m h_0 \|^2_{x^2 C^{2+ \alpha}_e(X)}. \] \end{lemma} Based on Lemma \ref{lem Laplace invertible weighted timed} we have the following properties of $\hat{\mathcal{M}} (u)$, and properties of $\hat {\mathcal{Q}}(u)$ which are analog to that of $\mathcal{Q}(u)$. \begin{lemma}\label{lem funct prop hat Q(u)} Suppose that $\operatorname{Rc}_{h_0} + m h_0 \in x^2 C^{2+\alpha}_e (X)$ and that $u$ and $\tilde{u}$ are in some small balls centered at $0$ in $x^2 C_e^{2+\alpha, \frac{\alpha}2}(X_T)$. Then we have \vskip .1cm \noindent $($i$)$ $\hat{\mathcal{M}}(u) \in x^2 C_e^{2+\alpha, \frac{\alpha}2}(X_T)$ and there is a constant $C_1 >0$ such that \[ \| \hat{\mathcal{M}}(u) \|_{ x^{2} C_e^{2+ \alpha, \frac{\alpha}2}(X_T)} \leq C_1 \| u \|_{x^{2} C_e^{2+\alpha, \frac {\alpha}2}(X_T)}; \] \vskip .1cm \noindent $($ii$)$ $\hat{\mathcal{Q}}(u) \in x^2 C_e^{2+\alpha, \frac{\alpha}2}(X_T)$ and there is a constant $C_2 >0$ such that \[ \| \hat{\mathcal{Q}}(u) \|_{ x^{2} C_e^{2 + \alpha, \frac{\alpha}2}(X_T)} \leq C_2 \| u \|^2_{x^{2} C_e^{2+\alpha, \frac {\alpha}2}(X_T)}; \] \vskip .1cm \noindent $($iii$)$ There is a constant $C_3 >0$ such that \begin{align*} & \| \hat{\mathcal{Q}}(u) - \hat{\mathcal{Q}}(\tilde{u}) \|_{ x^{2} C_e^{2+\alpha, \frac{\alpha}2}(X_T) } \leq C_3 \max \{ \| u \|_{ x^{2} C_e^{2+\alpha, \frac{\alpha}2}(X_T) }, \| \tilde{u} \|_{ x^{2} C_e^{2+\alpha, \frac{\alpha}2}(X_T) } \} \\ & ~\hskip 5.5cm \cdot \| u- \tilde{u} \|_{ x^{2} C_e^{2+\alpha, \frac{\alpha}2}(X_T) }. \end{align*} \end{lemma} \subsection{Contraction mapping theorem for DCRF}\label{subsec DRF weak solvab} In this subsection we will first prove the short time existence of solutions for DCRF that are $C^{1+\alpha}$ AH. The Banach space we consider for the contraction mapping theorem is $x^2C^{2+\alpha, \frac {\alpha}2}_e(X_T)$. For two positive parameters $\epsilon$ and $T$ to be specified below, we define a closed subset $Z_{\epsilon,T}$ as \[ Z_{\epsilon,T} = \{ u \in x^2 C^{2+\alpha, \frac \alpha 2}_e(X_T): \, u(x, 0) = 0 \text{ and } \| u \|_{x^2 C^{2+\alpha, \frac {\alpha}2}_e (X_T )} \leq \epsilon \}. \] Let $h(t) =h_0 + v(\cdot, t)$ in (\ref{eq dcrf}). In the light of \eqref{eq Ba11 decomp of evol op} and \eqref{eq P(h +u) decomp}, we rewrite the DCRF as $$ \left\{\aligned (\partial_t - \hat L)v & = \mathcal{E} + \mathcal{Q}(v) + \hat{\mathcal{E}} + \hat{\mathcal{Q}}(v) +\hat{\mathcal{M}}(v) \\ v(\cdot, 0) & = 0. \endaligned\right. $$ where $\hat{L} = \Delta_L^{h_0} + 2m - 2 \mathcal{P}(h_0)$. Since $\mathcal{P}(h_0)\in x^4C^{4+\alpha }_e(X)\subset xC^{2+\alpha}(\bar X)$, $\hat{L} $ is uniformly degenerate elliptic. We may apply Lemma \ref{thm 3.2 in Ba11} to $\partial_t - \hat{L}$. \\ Let us define the mapping as follows: given $u \in Z_{\epsilon, T} $, from the discussions in the previous subsection, we know \begin{equation*} \mathcal{Q}(u) + \hat{\mathcal{Q}}(u)+\mathcal{E} + \hat{\mathcal{E}} + \hat{\mathcal{M}}(u)\in x^2C^{\alpha, \frac \alpha 2}_e(X_T). \end{equation*} We may solve the linear equations by Lemma \ref{thm 3.2 in Ba11} \begin{equation} \label{eq extra-vanishing} \left\{\aligned (\partial_t - \hat L)v & = \mathcal{Q}(u)+ \hat{\mathcal{Q}}(u) + \mathcal{E} + \hat{\mathcal{E}} +\hat{\mathcal{M}}(u) , \\ v(\cdot, 0) & = 0. \endaligned\right. \end{equation} By the parabolic Schauder estimates in Lemma \ref{thm 3.2 in Ba11} we may define a map $$ \Psi: Z_{\epsilon,T} \subseteq x^2 C^{2+\alpha, \frac{\alpha}2}_e(X_T) \to x^2 C^{2+\alpha, \frac {\alpha}2}_e(X_T), \quad \Psi (u)=v_u =v. $$ For appropriate choices of $\epsilon$ and $T$, we claim that the map \begin{equation}\label{mapping} \Psi: Z_{\epsilon,T} \to Z_{\epsilon,T}, \end{equation} and that $\Psi$ is contractive. In the following lemmas, we verify the above claim and then apply the contraction mapping theorem to prove the short time existence for DCRF (\ref{eq dcrf}). \begin{lemma} \label{lem Ba 4.5} The mapping $\Psi$ maps $Z_{\epsilon,T}$ into $Z_{\epsilon,T}$ when $\epsilon$ and $T$ are small enough. \end{lemma} \begin{proof} We may write $v=v_u = v_{u1} + v_{u2} + v_{u3} = v_1 + v_2 + v_3$, where $$ \left\{ \aligned (\partial_t - \hat{L}) v_1 & = \mathcal{Q}(u) + \hat{\mathcal{Q}}(u), \\ v_1(\cdot, 0) & = 0, \endaligned\right. $$ $$ \left\{\aligned (\partial_t - \hat{L}) v_2 & =\mathcal{E} + \hat{\mathcal{E}}, \\ v_2(\cdot, 0) & = 0, \endaligned\right. $$ and $$ \left\{\aligned (\partial_t - \hat{L}) v_3 & =\hat{\mathcal{M}}(u), \\ v_3(\cdot, 0) & = 0. \endaligned\right. $$ Due to the quadratic nature of the operators $\mathcal{Q}$ and $\tilde{\mathcal{Q}}$, as in the proof of \cite[Lemma 4.5]{Ba11}, we have $$ \| v_1 \|_{x^2 C^{2+\alpha, \frac {2+\alpha}2}_e (X_T )} \leq \frac 13 \epsilon, $$ where $T$ is arbitrarily given and small and $\epsilon$ is small enough. For $v_2$, by Lemma \ref{lem funct prop Hat E(u)} and \ref{thm 3.2 in Ba11} we have \[ \| v_2 \|_{x^2 C^{4+ \alpha, \frac{4+ \alpha }{2}}_e(X_T)} \leq C \|\operatorname{Rc}_{h_0} + m h_0 \|_{x^2 C^{2+ \alpha}_e(X)} , \] this implies that \begin{equation}\label{eq L hat v 2 est} \|\hat{L} v_2 \|_{x^2 C^{2+ \alpha, \frac{ \alpha }{2}}_e(X_T)} \leq C \|\operatorname{Rc}_{h_0} + m h_0 \|_{x^2 C^{2+ \alpha}_e(X)}. \end{equation} As in the proof of \cite[Lemma 4.5]{Ba11}, we may write $$ v_2 (\cdot, t) = \int_0^t (\mathcal{E} + \hat{\mathcal{E}} + \hat L v_2)ds, $$ by (\ref{eq L hat v 2 est}) and Lemma \ref{lem funct prop Hat E(u)} we get $$ \|v_2\|_{x^2 C^{2+\alpha, \frac \alpha 2}(X_T)} \leq C T^{1-\frac \alpha 2} \|\operatorname{Rc}_{h_0} + m h_0\|_{x^2 C^{2+\alpha}_e(X)} \leq \frac 13 \epsilon $$ when $T$ is chosen sufficiently small. For $v_3$, the argument is similar to that of $v_2$. By Lemma \ref{lem funct prop hat Q(u)}(i) and \ref{thm 3.2 in Ba11}, we have \[ \|v_3 \|_{x^2 C^{4+ \alpha, \frac{2+\alpha}{2}}_e(X_T)} \leq C \|u \|_{x^2 C^{2+ \alpha, \frac{\alpha }{2} }_e(X_T)}, \] hence \begin{equation}\label{eq L hat v 3 est} \|\hat{L} v_3 \|_{x^2 C^{2+ \alpha, \frac{\alpha }{2} }_e(X_T)} \leq C \|u \|_{x^2 C^{2+ \alpha, \frac{\alpha }{2} }_e(X_T)}. \end{equation} We write $$ v_3(\cdot, t) = \int_0^t (\hat{\mathcal{M}}(u) + \hat{L} v_3)ds, $$ and get $$ \|v_3\|_{x^2 C^{2+\alpha, \frac \alpha 2}_e(X_T)} \leq C T^{1 - \frac \alpha 2}\|u\|_{x^2 C^{2+\alpha, \frac{\alpha }{2}}_e(X_T)} \leq \frac 13 \epsilon $$ when $T$ is chosen sufficiently small. Thus the proof is complete. \end{proof} \begin{lemma} \label{lem Ba 4.6} The map $\Psi: Z_{\epsilon, T} \to Z_{\epsilon, T}$ is contractive when $\epsilon$ and $T$ are small. \end{lemma} \begin{proof} Adopt the notations used in the proof of Lemma \ref{lem Ba 4.5}, for $u, \tilde{u} \in Z_{\epsilon, T}$ it is easy to see that $v_{u2} - v_{\tilde{u}2} =0$. $v_{u1} - v_{\tilde{u}1}$ satisfies $$ \left\{ \aligned & (\partial_t - \hat{L}) (v_{u1} - v_{\tilde{u}1}) = \mathcal{Q}(u ) - \mathcal{Q}( \tilde{u}) + \hat{\mathcal{Q}}(u ) - \hat{\mathcal{Q}}( \tilde{u}) , \\ & (v_{u1} - v_{\tilde{u}1})(\cdot, 0) = 0. \endaligned\right. $$ As in the proof of \cite[Lemma 4.6]{Ba11} and in the light of Lemma \ref{Lem 4etc in Ba11} and \ref{lem funct prop hat Q(u)}(iii), we have \[ \|v_{u1} - v_{\tilde{u}1 } \|_{x^2 C^{2+\alpha, \frac \alpha 2}_e(X_T)} \leq \frac 13 \|u - \tilde{u} \|_{x^2 C^{2+\alpha, \frac \alpha 2}_e(X_T)}. \] Note that $v_{u3} - v_{\tilde{u}3}$ satisfies $$ \left\{ \aligned & (\partial_t - \hat{L}) (v_{u3} - v_{\tilde{u}3}) = \hat{\mathcal{M}}(u ) - \hat{\mathcal{M}}( \tilde{u}), \\ & (v_{u3} - v_{\tilde{u}3})(\cdot, 0) = 0. \endaligned\right. $$ Since $$ \hat{\mathcal{M}}(u ) - \hat{\mathcal{M}}( \tilde{u}) = -2 (\mathcal{P}(h_0 + u) - \mathcal{P}(h_0+ \tilde{u} ))h_0, $$ using the estimate in Lemma \ref{lem Laplace invertible weighted timed}(ii) we can adopt the argument for the estimate of $v_3$ in the proof of Lemma \ref{lem Ba 4.5} to get $$ \|v_{u3} - v_{\tilde{u}3 } \|_{x^2 C^{2+\alpha, \frac \alpha 2}_e(X_T)} \leq C T^{1- \frac{\alpha}{2}} \|u - \tilde{u} \|_{x^2 C^{2+\alpha, \frac{\alpha}{2}}_e(X_T)} \leq \frac 13 \|u - \tilde{u} \|_{x^2 C^{2+\alpha, \frac \alpha 2}_e(X_T)}, $$ when $T$ is chosen sufficiently small. It follows that map $\Psi$ is contractive when $\epsilon$ and $T$ are small enough. \end{proof} Now let us summarize and state a short time existence theorem for DCRF. \begin{theorem}\label{DCRF-short-time} Suppose that $(X^{m+1}, h_0)$ is $C^{4+\alpha}$ AH with constant scalar curvature $-m(m+1)$ and that $x$ is a geodesic defining function. Assume that $\operatorname{Rc}_{h_0} + mh_0$ $\in x^2 C^{2+\alpha}_e(X)$. Then, for some small $T$, DCRF \eqref{eq dcrf} has a solution $h(t) = h_0 + v(\cdot, t)$ such that $h(t)$ is $C^{1+\alpha}$ AH with constant scalar curvature $-m(m+1)$ and $v \in x^2C^{2+\alpha, \frac {2+\alpha}2}_e(X_T)$. \end{theorem} \proof The only thing we need to point out is that, for a fixed point $v=u \in x^2C^{2+\alpha, \frac \alpha 2}_e(X_T)$, it is automatic that $v \in x^2 C^{2+\alpha, \frac {2+\alpha}2}_e(X_T)$ due to the equation (\ref{eq extra-vanishing}). \endproof \subsection{Short time existence for CRF on AH manifolds} \label{subsec exist CRF AH} To construct CRF from DCRF, we considers the family of diffeomorphisms $\varphi (t)$ generated by the vector field $W(t)$: $$ \frac d{dt} \varphi (t) = W(t) \quad \text{ and } \varphi(0) = \operatorname{id}, $$ where $W(t)$ is defined in \eqref{vector field}. Note that $W \in x C^\alpha (\overline{X_T})\bigcap x^2 C^{1+\alpha, \frac {1+\alpha}2}_e(X_T)$. Let $h(t)$ be the solution of DCRF from Theorem \ref{DCRF-short-time}. Then $g (t) = (\varphi(t))^* h(t) = g_0 + u(\cdot, t)$ solves the CRF for short time and $u \in x^2 C^{2+\alpha, \frac {2+\alpha}2}_e(X_T)$ (cf. \cite[Lemma 3.1]{LQZ}, for instance). Moreover, $g(t)$ is $C^{1+\alpha}$ AH with constant scalar curvature $-m(m+1)$. \section{Shi's curvature derivative estimates for CRF} \label{sect Shi's derivative estimate under crf} In this section we will give a proof of Theorem \ref{thm local curvature derivative est} and Shi's estimates of high order derivative of curvature tensor for CRF (Theorem \ref{thm shi high order estimate}). The following lemma will be used in the proof which is the CRF analog of Lemma 14.3 in \cite{CC2} for Ricci flow. The lemma can be proved by a straightforward modification of the Lemma 14.3 where the comparison of Christoffel symbol $\Gamma_{ij}^k(g(t))$ with $\Gamma_{ij}^k(g(0))$ requires the bound of $\left \vert \nabla p \right \vert$. \begin{lemma} \label{lem cutoff func eta} Let $\left( M^n, g\left( t\right), p(t) \right) $, $t \in \lbrack0,T]$, be a solution to CRF (\ref{eq crf g p local riem}) with $R_{g(0)}=2nc$. Assume that closed ball $\bar{B}_{g\left( 0\right) }\left( O, r\right) \subset M$ is compact and that \[ \left\vert \operatorname*{Rm}\right\vert \leq K, \quad \max_{i=0,1} \left \vert \nabla^i p \right \vert \leq \tilde{K} \quad \text{on }B_{g\left( 0\right) }\left(O,r\right) \times\lbrack0,T_*], \] where $T_* \leq \min \{T, \alpha/K \}$ for some positive constants $\alpha, K, \tilde{K}$. Note that $|c| \leq n(n-1)K$. Let \[ \Theta\left( x,t\right) = tK^{2}\left\vert \nabla\operatorname{Rc}\left( x,t\right) \right\vert ^{2}. \] Then there exist constants $C_1 =C_1\left( \alpha,n, \tilde{K}, |c| \right)$, $C_2=C_2\left( \alpha, n, \sqrt{K}r, \tilde{K}, |c| \right) $, and a cutoff function $\eta:M \rightarrow\left[ 0,1\right] $ with support in $B_{g\left( 0\right) }\left( O,r\right)$ such that for $(x,t) \in B_{g(0)}\left(O,r\right) \times \lbrack0, T_*]$ we have \begin{align} & \eta =1 \quad \text{ on } B_{g\left( 0\right)}\left( O,r/2\right) \notag \\ & \left\vert \nabla\eta\left( x\right) \right\vert _{g\left( t\right) }^{2} \leq\frac{C_1 }{r^{2}}\eta\left( x\right) ,\label{grad eta estima0}\\ & -\Delta_{g\left( t\right) }\eta\left( x \right) \leq\frac{C_2 }{r^{2}}+\frac{C_1} {K^{3/2}r}\sup_{s\in\lbrack0,t]}\left( \eta\Theta\right) ^{1/2}\left( x,s\right) . \label{lapl eta estim00} \end{align} \end{lemma} \vskip .2cm \noindent {\it Proof of Theorem \ref{thm local curvature derivative est}}. \ We will use the formula of $\partial_t \operatorname{Rm}$ in \cite[p.417]{LQZ} to compute \begin{equation*} \partial_t \left \vert \operatorname{Rm} \right \vert^2 =\frac{\partial}{\partial t} \left (g^{ri}g^{sj}g^{pk}g^{ql} R_{rspq}R_{ijkl} \right ). \end{equation*} Note that the terms, which contain factor $\operatorname{Rc}-2cg$ and arise when we differentiate $g^{-1}$, cancel the corresponding terms which arise when we differentiate $R_{ijkl}$. We get the evolution equation for the norm of the curvature (compare \cite[p.225]{CK}) \begin{align} \left ( \partial_t -\Delta \right )\left \vert \operatorname{Rm} \right \vert^2 \leq & - 2 \left \vert \nabla \operatorname{Rm} \right \vert^2 +16 \left \vert \operatorname{Rm} \right \vert ^3 +4(|p| + 2|c| ) \left \vert \operatorname{Rm} \right \vert^2 \label{eq evol nabla Rm} \\ & + 8 \left \vert \operatorname{Rm} \right \vert \left \vert \nabla^2 p \right \vert. \notag \end{align} Actually $\left \vert \operatorname{Rm} \right \vert \left \vert \nabla^2 p \right \vert$ term can be written as $\left \vert \operatorname{Rc} \right \vert \left \vert \nabla^2 p \right \vert$. \\ It follows by a standard computation using the formula of $\partial_t \operatorname{Rm}$ in \cite[p.417]{LQZ} that the covariant derivative $\nabla \operatorname{Rm}$ satisfies (compare \cite[p.227]{CK}) \begin{align*} \left ( \partial_t - \Delta \right )\nabla \operatorname{Rm} = & 40 \operatorname{Rm} * \nabla \operatorname{Rm} + 8 (\operatorname{Rc}- 2cg) * \nabla \operatorname{Rm} \\ & -2(p-2c) \nabla \operatorname{Rm}+ 5 \nabla p * \operatorname{Rm} + 4 g* \nabla^3 p. \end{align*} Here if $A$ and $B$ are tensors, $A*B$ means some contraction of the tensor product $A \otimes B$. If $k$ are natural number, then $k A*B$ denotes a tensor consisting of $k$ terms of $A* B$. Then it follows that \begin{align} & \left (\partial_t - \Delta \right ) \left \vert \nabla \operatorname{Rm} \right \vert^2 \label{eq nabla rm norm evol} \\ = & - 2 \left \vert \nabla^2 \operatorname{Rm} \right \vert^2 + 90 \operatorname{Rm}* \nabla \operatorname{Rm} * \nabla \operatorname{Rm} + 16(\operatorname{Rc}-2cg) * \nabla \operatorname{Rm} * \nabla \operatorname{Rm} \notag \\ & + 14( p-2c) \nabla \operatorname{Rm} * \nabla \operatorname{Rm}+ 10 \nabla p * \operatorname{Rm} * \nabla \operatorname{Rm} + 8 \nabla \operatorname{Rm} * \nabla^3 p . \notag \end{align} Actually term $\nabla \operatorname{Rm} * \nabla^3 p$ can be written as $\nabla \operatorname{Rc} * \nabla^3 p$. \\ Below $C(n)$ is a constant depending only on dimension $n$. Using (\ref{eq evol nabla Rm}) and (\ref{eq nabla rm norm evol}) we compute \begin{align*} & \left (\partial_t - \Delta \right ) \left ( \left( 16K^{2} +\left\vert \operatorname*{Rm}\right\vert^{2}\right) \left\vert \nabla \operatorname*{Rm}\right\vert ^{2} \right ) \\ = & \left ( \partial_t - \Delta \right ) \left \vert \operatorname*{Rm} \right \vert^{2} \cdot \left \vert \nabla \operatorname*{Rm} \right \vert ^{2} + \left( 16K^{2} +\left\vert \operatorname*{Rm}\right\vert^{2}\right) \cdot \left ( \frac{\partial}{\partial t} - \Delta \right ) \left \vert \nabla \operatorname*{Rm} \right \vert ^{2} \\ & -2 \nabla \left\vert \operatorname*{Rm}\right\vert^{2} \cdot \nabla \left \vert \nabla \operatorname*{Rm}\right\vert ^{2} \\ \leq & -2 \left \vert \nabla \operatorname{Rm} \right \vert^4 + 16 \left \vert \operatorname{Rm} \right \vert^3 \left \vert \nabla \operatorname*{Rm} \right \vert ^{2} -2 \left ( 16K^{2} +\left\vert \operatorname*{Rm}\right\vert^{2}\right) \left \vert \nabla^2 \operatorname{Rm} \right \vert^2 \\ & + C(n) \left ( 16K^{2} +\left\vert \operatorname*{Rm}\right\vert^{2}\right) \left\vert \operatorname*{Rm}\right\vert \left\vert \nabla \operatorname*{Rm}\right\vert^{2} + 8 \left \vert \operatorname*{Rm} \right \vert \left\vert \nabla \operatorname*{Rm} \right\vert^{2} \left \vert \nabla^2 \operatorname*{Rm}\right\vert \\ &+ C(n) |c| \left ( 16K^2 + \left \vert \operatorname*{Rm}\right\vert^2 \right ) \left \vert \nabla \operatorname*{Rm} \right\vert^2 + C(n) |p| \left ( 16K^2 + \left \vert \operatorname*{Rm}\right \vert^2 \right ) \left \vert \nabla \operatorname*{Rm} \right \vert^2 \\ &+ C(n) \left \vert \nabla p \right \vert \left ( 16K^2 + \left \vert \operatorname*{Rm}\right \vert^2 \right ) \left \vert \operatorname*{Rm} \right \vert \left \vert \nabla \operatorname*{Rm} \right \vert +C(n) \left \vert \nabla^2 p \right \vert \left \vert \operatorname*{Rm} \right \vert \left \vert \nabla \operatorname*{Rm} \right \vert^2 \\ & + C(n) \left \vert \nabla^3 p \right \vert \left ( 16K^2 + \left \vert \operatorname*{Rm}\right \vert^2 \right ) \left \vert \nabla \operatorname*{Rm} \right \vert. \end{align*} Using the assumption $\left \vert \operatorname*{Rm} \right \vert \leq K$ with $K \geq 1$ and $\max_{i=0,1,2,3} | \nabla^i p| \leq \tilde{K} $ on $ \bar{B}_{g \left( 0\right) }\left( O,r\right) \times \lbrack0,T_*]$ we get that on $ \bar{B}_{g \left( 0\right) }\left( O,r\right) \times \lbrack0,T_*]$ \begin{align*} & \left (\partial_t - \Delta \right ) \left ( \left( 16K^{2} +\left\vert \operatorname*{Rm}\right\vert^{2}\right) \left\vert \nabla \operatorname*{Rm}\right\vert ^{2} \right ) \\ \leq & -2 \left \vert \nabla \operatorname{Rm} \right \vert^4 + C(n, \tilde{K}, |c|) K^3 \left \vert \nabla \operatorname{Rm} \right \vert^2 -32 K^2 \left \vert \nabla^2 \operatorname{Rm} \right \vert^2 + C(n, \tilde{K}) K^6 \\ & + 8 K \left \vert \nabla \operatorname{Rm} \right \vert^2 \left \vert \nabla^2 \operatorname{Rm} \right \vert. \end{align*} Since \begin{align*} &-\frac{1}{2} \left \vert \nabla \operatorname{Rm} \right \vert^4 + 8 K \left \vert \nabla \operatorname{Rm} \right \vert^2 \left \vert \nabla^2 \operatorname{Rm} \right \vert -32 K^2 \left \vert \nabla^2 \operatorname{Rm} \right \vert^2 \leq 0, \\ & -\frac{1}{2} \left \vert \nabla \operatorname{Rm} \right \vert^4 + C(n, \tilde{K}, |c|) K^3 \left \vert \nabla \operatorname{Rm} \right \vert^2 \leq \tilde{C}(n, \tilde{K}, |c|) K^6, \end{align*} we have established \begin{align} \left ( \partial_t - \Delta \right ) \left ( \left( 16K^{2} +\left\vert \operatorname*{Rm}\right\vert^{2}\right) \left\vert \nabla \operatorname*{Rm}\right\vert ^{2} \right ) \leq -\left \vert \nabla \operatorname{Rm} \right \vert^4 + C(n, \tilde{K}, |c|) K^6. \label{eq evol of Bernstein est quantity} \end{align} Inequality (\ref{eq evol of Bernstein est quantity}) is of the same form as the inequality on the top of \cite[p.238]{CC2}. The remaining proof of estimate (\ref{eq est local first order Shi}) can be finished by the same argument as the proof given in \cite[pp.238--239]{CC2} for the Ricci flow. Roughly speaking this is done in two steps. First we localize the inequality (\ref{eq evol of Bernstein est quantity}) by multiplying $\left( 16K^{2} +\left\vert \operatorname*{Rm}\right\vert^{2} \right ) \left\vert \nabla \operatorname*{Rm}\right\vert ^{2} $ by $t \eta$ where $\eta$ is the cutoff function given in Lemma \ref{lem cutoff func eta}. Then we apply the parabolic maximum principle to the resulting inequality of the localized quantity. We omit the details. \hfill $\square$ \vskip .3cm Now we turn to Shi's high order derivative estimates. First we compute the evolution equation of high derivatives of the curvature tensor, here we follow closely the calculation for Ricci flow (see \cite[p.228]{CK}, for example). \begin{align*} \partial_t \nabla^k \operatorname{Rm} = & \nabla^k \left (\partial_t \operatorname{Rm} \right ) + \sum_{j=0}^{k-1} \nabla^j \left ( \nabla( \operatorname{Rc} + (p-2c)) * \nabla^{k-j-1} \operatorname{Rm} \right ) \\ =& \nabla^k ( \Delta \operatorname{Rm} + \operatorname{Rm} * \operatorname{Rm} + (\operatorname{Rc}-2cg)* \operatorname{Rm} -2(p-2c)\operatorname{Rm} +g*\nabla \nabla p )\\ & + \sum_{j=0}^{k-1} \nabla^j \left ( \nabla \operatorname{Rc} * \nabla^{k-j-1} \operatorname{Rm} \right ) + \sum_{j=0}^{k-1} \nabla^j \left ( \nabla p * \nabla^{k-j-1} \operatorname{Rm} \right ) \\ = & \nabla^k \Delta \operatorname{Rm} + \sum_{j=0}^k \nabla^j \operatorname{Rm} * \nabla^{k-j} \operatorname{Rm} + c g* \nabla^k \operatorname{Rm} \\ & + \sum_{j=0}^k \nabla^j p* \nabla^{k-j} \operatorname{Rm}+ g* \nabla^{k+2} p . \end{align*} Since for any tensor $A$ we have that the commutator \[ [\nabla^k, \Delta] A = \sum_{j=0}^k \nabla^j \operatorname{Rm} * \nabla^{k-j} A, \] we conclude \begin{align} & \left ( \partial_t - \Delta \right ) \nabla^k \operatorname{Rm} \label{eq nabla k curv evol}\\ =& \sum_{j=0}^k \nabla^j \operatorname{Rm} * \nabla^{k-j} \operatorname{Rm} + c g* \nabla^k \operatorname{Rm} + \sum_{j=0}^k \nabla^j p* \nabla^{k-j} \operatorname{Rm} + g* \nabla^{k+2} p . \notag \end{align} Note that \[ \partial_t \left \vert \nabla^k \operatorname{Rm} \right \vert^2 = 2 \left \langle \partial_t \left ( \nabla^k \operatorname{Rm} \right ), \nabla^k \operatorname{Rm} \right \rangle + (\operatorname{Rc} +(p-2c))*\nabla^k \operatorname{Rm}*\nabla^k \operatorname{Rm}. \] Using the following equality for tensors \[ 2 \langle \Delta A, A \rangle = \Delta |A|^2 - 2|\nabla A|^2, \] we get \begin{align*} & \left (\partial_t - \Delta\right ) \left \vert \nabla^k \operatorname{Rm} \right \vert^2 \\ = & - 2 \left \vert \nabla^{k+1} \operatorname{Rm} \right \vert^2 + \sum_{j=0}^k \nabla^j \operatorname{Rm}* \nabla^{k-j} \operatorname{Rm} * \nabla^k \operatorname{Rm} + c \nabla^k \operatorname{Rm} * \nabla^k \operatorname{Rm} \\ & + \sum_{j=0}^k \nabla^j p * \nabla^{k-j} \operatorname{Rm} * \nabla^k \operatorname{Rm} + \nabla^{k+2} p * \nabla^k \operatorname{Rm}. \end{align*} Using the above evolution equation we can prove the following local estimate of the high order derivative of curvature tensors for CRF by applying maximum principle to the evolution inequality of the localized quantity \[ \eta \left ( C +t^n \vert \nabla^n \operatorname{Rm} \vert^2 \right ) t^{n+1} \vert \nabla^{n+1} \operatorname{Rm} \vert^2. \] We omit the detail of the proof. \begin{theorem} \label{thm shi high order estimate} (i) There exists a constant $C_1 =C_1 ( \alpha,n, m, r,K ,\tilde{K} )$ depending only on $\alpha, n, m$, $r$, $K$, and $\tilde{K}$, such that the following property holds. Let $(M^{n}, g(t)$, $p(t))$, $t\in\left[ 0,T \right] $, be a solution to CRF (\ref{eq crf g p local riem}) with $R_{g(0)}=2nc$. Assume that closed ball $\bar{B}_{g\left( 0\right) }\left( O,r\right) \subset M $ is compact and that \begin{align} &\left\vert \operatorname*{Rm} \right\vert \leq K \text{ on } \bar{B}_{g\left( 0\right) }\left( O,r\right) \times \lbrack0, T_*] \label{eq curv bdd assump 3} \\ & \max_{i=0,1,\cdots, m+2} | \nabla^i p| \leq \tilde{K} \text{ on } \bar{B}_{g\left( 0\right) }\left( O,r\right) \times \lbrack0, T_*] \label{eq p deriv bdd assump 3} \end{align} where $ T_* \leq \min \{T, \alpha/K \}$, then we have \begin{equation} \left\vert \nabla^m \operatorname*{Rm}\left( x,t\right) \right\vert \leq \frac{C_1 }{t^{m/2}} \label{eq est local high order Shi} \end{equation} for all $\left( x,t\right) \in B_{g\left( 0\right) }\left( O, r/2\right) \times(0,T_*]$. (ii) If $(M^n,g(t), p(t)), \, t \in [0,T]$, in (i) is a complete solution to CRF. Suppose assumption (\ref{eq curv bdd assump 3}) and (\ref{eq p deriv bdd assump 3}) holds on $M \times [0,T_*]$, then there is a constant $C_2 =C_2(\alpha, n, m,\tilde{K}, |c|)$ depending only on $\alpha, n, m, \tilde{K}$, and $|c|$, such that \begin{equation} \left\vert \nabla^m \operatorname*{Rm}\left( x,t\right) \right\vert \leq \frac{C_2 K}{t^{m/2}} \label{eq est high order Shi 3} \end{equation} for all $\left( x,t\right) \in M \times(0,T_*]$. \end{theorem} \begin{remark} (i) In Theorem \ref{thm shi high order estimate}(i) if we further assume $\left\vert \nabla^k \operatorname*{Rm}\left( x, 0 \right) \right\vert \leq K$ for $k=1, \cdots, l$ and $x\in \bar{B}_{g\left( 0\right) }\left( O, r\right)$, then we have $\left\vert \nabla^m \operatorname*{Rm}\left( x,t\right) \right\vert \leq \frac{C_3 }{t^{(m-l)/2}}$ for all $\left( x,t\right) \in B_{g\left( 0\right) }\left( O,r/2\right) \times(0,T_*]$. Here $C_3=C_3(\alpha,n, m,r, K, \tilde{K})$ is a constant. A similar generalization of Theorem \ref{thm shi high order estimate}(ii) also holds. This is the analog of the so-called modified Shi's local derivative estimates in Ricci flow (\cite[Theorem 14.16]{CC2}). (ii) Using Theorem \ref{thm shi high order estimate} we can prove a compactness theorem for CRF. Let $\left\{ ({M}_{k}^{n},g_{k}(t),p_{k}(t), O_k)\right\}$, $t\in ( -\alpha, \beta)$ with $\alpha, \beta >0$, be a sequence of pointed complete solutions of CRF with constant scalar curvature. Assume that for some constants $m \in \mathbb{N}$, $K$, and $\tilde{K}$ \begin{align} & \vert \operatorname{Rm}_{g_k} \vert \leq K \quad \text{ on } M_k \times (-\alpha, \beta), \label{eq curv bdd assump 4} \\ & \max_{i=0,1,\cdots, m+2} | \nabla^i p| \leq \tilde{K} \quad \text{ on } M_k \times (-\alpha, \beta). \label{eq p deriv bdd assump 4} \end{align} Further assume that the injectivity radius $\operatorname{inj}_{g_{k} (0)}(O_{k}) \geq \delta$ for some $\delta>0$. With the aid of Theorem \ref{thm shi high order estimate}(ii) we may apply the Cheeger--Gromov compactness theorem to the sequence and conclude the following. There exists a subsequence of $\left\{ (M_{k},g_{k}(t),p_{k}(t), O_k)\right\} $, $t \in ( -\alpha, \beta)$, which converges in the pointed $C^{m +1}$-Cheeger--Gromov topology to a pointed complete solution of CRF $(M_{\infty}^{n},g_{\infty} (t),p_{\infty}(t), O_\infty )$, $t\in ( -\alpha, \beta)$. \end{remark} \bibliographystyle{natbib}
\section{Introduction} Over the past few decades, optical cavity structures have been used for an incredibly wide range of photonic applications \cite{Vahala2003}. In many of these cavity devices, exploiting a modal description of the optical system is of great benefit, not only for providing good physical intuition, but also because of the significant efficiency that it brings to the theoretical investigations of a typical problem. Moreover, in quantum optics, a modal description is a requirement for second quantization. However, in contrast to \textit{normal modes} (with real eigenfrequencies), that are suited for describing closed optical systems (and sometimes very low loss systems) where energy losses are not a major concern, for dissipative optical cavities in general, the open cavity \textit{quasinormal modes} (QNMs) must be employed. This is particularly true for low quality factor ($Q$) resonators, though also for high-$Q$ structures such as photonic crystal cavities \cite{Kristensen2012}. Low-$Q$ broadband resonators are also now widely exploited in plasmonic devices, which have been proposed and used for applications such as sensing \cite{Kneipp1996,Nie1997,Zhang2013,Yampolsky2014,Chikkaraddy2016}, hybrid integrated photonics \cite{Barth2010,Mukherjee2011,hybrid2012,hybrid2012_2,hybrid2013,Castro-Lopez2015,Espinosa-Soria2016,Chai2016,Doeleman2016,KamandarDezfouli2017,Ortuno2017} and broadband single photon sources \cite{Chang2006,Esteban2010,Russell2012,Belacel2013,Akselrod2014,Lu2014,Ruesink2015,Baaske2016,Koenderink2017}. For any material system, the open-cavity QNMs are associated with complex eigenfrequencies whose imaginary parts quantify the system losses, and thus they require a more generalized normalization \cite{Leung1994,Kristensen2012,Sauvan2013,Kristensen2015,Bai2013} beyond the standard Hermitian theories. In recent years, cavity QNMs have been successfully used to calculate various optical quantities of interest, such as the generalized effective mode volume \cite{Leung1994,Kristensen2012}, enhanced spontaneous emission factor of dipole emitters, and the electron energy-loss spectroscopy (EELS) maps for plasmonic resonators \cite{Abajo2008,Ge2016}. Calculation and normalization of QNMs has been demonstrated using both time-domain techniques, such as finite-difference time-domain (FDTD), and frequency-domain methods (such as finite-element solvers) \cite{Kristensen2012,Ge2014,Sauvan2013,Bai2013}. However, all of these approaches are somewhat specialized and all have pros and cons. Also, most of these computational methods require a complex spatial integration of the optical fields, involving volume and surface integrals \cite{Kristensen2012,Kristensen2015,Leung1996JOSAB,Muljarov2010}, or coordinate transforms that exploit PMLs (perfectly matched layers) as part of the cavity structure \cite{Sauvan2013}. Therefore, implementation of such QNM normalization approaches is often quite involved and, for this reason, it is still quite common to compute cavity modes in a rather ambiguous way, often treating the mode of interest as a normal mode (in some finite computational domain), or as the solution to the scattering problem (which is obviously not a true mode). Moreover, in structures with a background periodic index, such as a cavity coupled to a photonic crystal waveguide, the spatial normalization approaches generally fail, and a more careful regularization is required \cite{KristensenOL2014,Malhotra2016}. Thus there is a need to develop simpler computational approaches to obtain the QNMs without the need for such a complicated integration procedure. Recently, using a frequency domain approach, an intuitive dipole normalization technique was developed by Bai {\it et al.}~\cite{Bai2013}, implemented using COMSOL \cite{comsol}, where the self-consistent response to a dipole excitation is used to obtain an {\it integration-free} normalization for the QNM. In this approach, a search in frequency space is first performed to identify the QNM resonant frequency (pole) and then an additional simulation is performed very near the resonance frequency to capture the dominant cavity mode of interest. This method relies on the ability of the frequency-domain solvers to locate a frequency pole of the resonance in complex frequency space. Such an approach can be highly accurate and insightful, but requires implementation in a frequency domain solver, which can often require significant amounts of memory for larger device simulations such as coupled resonator-waveguide systems, and even single resonator structures \cite{Akselrod2016}. Additional frequency domain Maxwell's solvers have since been developed for obtaining QNMs of plasmonic devices \cite{MNPBEM} that can also be used to perform QNM calculations \cite{MNPBEM_SciRep}, which is cited to work best for nanoparticles of a certain size \cite{MNPBEM}. \red{Very recently, a generalization approach to normal mode expansion of the Green fucntion for lossy resonators has been introduced \cite{Bergman}, where modes are defined with permittivity rather than frequency. While the technique is quite general and insightful, it provides single-frequency information and can also suffer from already discussed memory requirement issues (the implementation has been done in COMSOL) for arbitrary sized devices.} \red{In this work, we describe a new integration-free method for obtaining normalized QNMs of arbitrary open cavities, which uses a simple dipole source excitation technique in real frequency space. We also describe and show how this new technique calculates ``regularized'' QNMs \cite{Ge2014njp}, which ensures well-behaved (non-divergent) fields far away from the resonator, without the need for including a sum over many modes or by carrying our formal regularization through a Dyson integration approach---which reconstructs the regularized fields outside the resonator using the QNM fields inside \cite{Ge2014njp}. Although our approach is quite general, we will implement it using FDTD (from Lumerical Solutions \cite{lumerical}) that is arguably one of the most general and well used computational techniques in nanoplasmonics \cite{Maier2006,Schuller2010,Ameling2013,Eter2014,Akselrod2016}, and in nanophotonics in general \cite{fdtdref3,fdtdref1,fdtdref2,fdtdref4}. In Section \ref{sec:Theory}, we introduce simple transparent formulas that can be used by a general user of any FDTD software (or similar time-dependent Maxwell solver) to compute the system QNMs in an easy-to-use and reliable manner.} In Section \ref{sec:Results}, as an application of this technique, confirmed with full vectorial dipole calculations of Maxwell's equations, we study the spontaneous emission enhancement (generalized Purcell factor) of a dipole emitter placed nearby different plasmonic systems including hybrid systems of metals and dielectrics, as well as coupled cavity-waveguide devices in photonic crystal slabs; these resonator systems are motivated by recent practical interest in design of different devices such as transmission line filters and single photon sources \cite{hybrid2012,hybrid2012_2,hybrid2013,Castro-Lopez2015,Espinosa-Soria2016,Axelrod2017,Malhotra2016}. In \ref{subsec:metals}, we explore the gold cuboid and dimer structures, to confirm the accuracy of the technique over a wide range of spatial positions and frequencies, where we also comment on how efficient our new technique is compared to existing methods. In \ref{subsec:reg}, we then explore the regularized nature of our newly developed technique in obtaining the far-field optical response that eliminates concerns regarding the divergent behavior of the QNMs, e.g., for use with studies such as transmission and scattering into the far field. In addition, we also show excellent agreement with a previous FDTD QNM approach that uses a spatial integration approach with filtering \cite{Ge2014}, and point out several clear advantages of the current approach (including a drastic increase in efficiency, and no spatial integration at all for normalization or far field regularization). In \ref{subsec:hybrids}, we extend the applicability and reliability of the technique to hybrid devices where plasmonic resonators are coupled to periodic dielectric waveguides. Finally, in \ref{subsec:PC}, we also provide some examples of dielectric cavities, including a complicated coupled cavity-waveguide design in a photonic crystal slab. This later is a particularly hard problem for obtaining the QNMs (of the coupled system), but is shown to be easily computed with the current technique. In section \ref{sec:Conclusions}, we present our conclusions. \begin{figure} \begin{center} \includegraphics[width=.95\columnwidth]{Schematic.png} \caption{Examples of plasmonic, hybrid metal-dielectric and photonic crystal cavity devices for use in various nanophotonics applications, all of which we will study in this paper. (a-b) show plasmonic single and dimer cuboids placed in a homogeneous medium. (c-d) show hybrid devices where the single cuboid is either embedded inside a ridge waveguide or placed on top of a slot waveguide. The red double arrows show the location and orientation of dipole excitation used in this work where a 2D projection through cuboid center is used. (e) A top down view of a 3D coupled cavity-waveguide device using photonic crystal slabs for single photon source applications. \label{fig:schematic}} \end{center} \end{figure} \section{Theory\label{sec:Theory}} In this section, we present our main technique for calculating the regularized QNMs. While our approach can be expanded for computing several QNMs, we focus on a single mode picture, as it is quite often the most desired case, e.g., for applications with single photon sources and lasing. While all time-domain techniques can become problematic for computing closely overlapping QNMs (in frequency), there are no additional limitations beyond those that are well known to most time domain Maxwell solvers. \subsection{Existing QNM theory\label{sec:ExistingTheory}} In general, any open cavity system can support several QNMs, $\tilde{\mathbf{f}}_{{\mu}}\left(\mathbf{r}\right)$, over the frequency band of interest. These QNMs can be defined as the solutions to the Helmholtz equation, \begin{equation} \boldsymbol{\nabla}\times\boldsymbol{\nabla}\times\tilde{\mathbf{f}}_{{\mu}}\left(\mathbf{r}\right)-\left(\dfrac{\tilde{\omega}_{{\mu}}}{c}\right)^{2}\varepsilon\left(\mathbf{r},\omega\right)\,\tilde{\mathbf{f}}_{{\mu}}\left(\mathbf{r}\right)=0, \end{equation} with open boundary conditions, through the Silver-M\"uller radiation condition \cite{Kristensen2015}. Here, $\varepsilon\left(\mathbf{r},\omega\right)$ is the dielectric function (possibly complex) of the system and $\tilde{\omega}_{{\mu}}=\omega_{{\mu}}-i\gamma_{{\mu}}$ is the complex resonance frequency that can also be used to quantify the system quality factor as $Q_{\mu}=\omega_{\mu}/2\gamma_{\mu}$. These QNMs, once normalized, can be used to construct the transverse Green function through \cite{Leung1994,Ge2014njp} \begin{equation} \mathbf{G}\left(\mathbf{r},\mathbf{r}_{0};\omega\right)= \sum_{\mu} A_{\mu}\left(\omega\right)\,\tilde{\mathbf{f}}_{\mu}\left(\mathbf{r}\right)\tilde{\mathbf{f}}_{\mu}\left(\mathbf{r}_{0}\right),\label{eq:GFwithSUM} \end{equation} at all frequencies around the mode and at all locations nearby the scattering geometry, \red{where the QNMs can form a complete basis \cite{Leung1996JOSAB,Leung_PRA_Completeness}. For simplicity, we have defined the spectral function} $A_{\mu}(\omega)=\omega^{2}/2\,\tilde{\omega}_{\mu}\left(\tilde{\omega}_{\mu}-\omega\right)$. Considering a single QNM, $\tilde{\mathbf{f}}_{\rm c}(\mathbf{r})$, the single mode Green function can be written as \begin{equation} \mathbf{G}_{\rm c}\left(\mathbf{r},\mathbf{r}_{0};\omega\right) \approx A_{\rm c}(\omega)\,\tilde{\mathbf{f}}_{\rm c}\left(\mathbf{r}\right)\tilde{\mathbf{f}}_{\rm c}\left(\mathbf{r}_{0}\right), \label{eq:GF_QNM} \end{equation} where again this strictly holds only nearby the ``cavity region'' (typically at distances where a quantum emitter still feels a Purcell factor enhancement) and diverges at locations far away. \red{The exact position for which the divergent behavior of the QNM appears, depends on the quality factor of the open cavity under investigation. For low quality factors such as those in plasmonics, the divergent behavior can appear at around a few microns away from the resonator (which will be farther away for higher quality factors such as those in photonic crystal cavities).} In any case, the divergent behavior is clearly unphysical for real fields, as we know there should be no enhanced emission in the far field, and the total field must be convergent. This problem can be partly avoided (or fixed) by employing a Dyson equation formalism to reconstruct the full Green function at locations away (outside) from the cavity region \cite{Ge2014njp}. \red{The idea behind the Dyson equation is to self-consistently obtain the solution to the scattering geometry at all locations using the preexisting knowledge of the background Green function and field solution inside the scattering geometry \cite{OliverMartinDysonGF}. Using an accurate QNM solution within the cavity region, one can obtain a ``regularized'' mode from, \begin{align} \tilde{\mathbf{F}}_{\rm c}(\mathbf{R}) = \int_{\rm cavity} \mathbf{G}_0(\mathbf{R},\mathbf{r^{\prime}};\omega)\,\Delta \varepsilon(\mathbf{r^{\prime}},\omega)\cdot\tilde{\mathbf{f}}_{\rm c}(\mathbf{r^{\prime}})\,{\rm d} \mathbf{r}',\label{eq:bigF} \end{align} for any position ${\bf R}$ outside the resonator. Here, $\mathbf{G}_0$ is the Green function for the background medium and $\Delta\varepsilon({\bf r},\omega)=\varepsilon({\bf r},\omega)-\varepsilon_B(\bf r)$ is the total dielectric constant minus the background term $\varepsilon_B(\bf r)$. In the case of isolated resonators, $\mathbf{G}_0$ can be considered as the (analytically known) homogeneous space Green function \cite{Novotny}, and for resonators coupled to waveguides, could be the background waveguide Green function~\cite{Kristensen:17}. Notably, the only assumption used to derive this expression is the validity of the single QNM description within the resonator.} Indeed, one can also use this expression in complex frequency space to self-consistently obtain the divergent QNM outside the resonator: \begin{align} \tilde{\mathbf{f}}_{\rm c}(\mathbf{R}) = \int_{\rm cavity} \mathbf{G}_0(\mathbf{R},\mathbf{r^{\prime}};\tilde\omega)\,\Delta \varepsilon(\mathbf{r^{\prime}},\tilde\omega)\cdot\tilde{\mathbf{f}}_{\rm c}(\mathbf{r^{\prime}})\,{\rm d} \mathbf{r}'. \label{eq:bigFcmplx} \end{align} In any case, the regularized QNM, $\tilde{\mathbf{F}}_{\rm c}(\mathbf{r})$ can be used in a similar Green function expansion as in Eq.\,\eqref{eq:GF_QNM} to obtain physically meaningful quantities far outside the resonator, where it is fully expected that a single QNM approach will breakdown. This ``regularized'' mode can then be used at all positions outside the resonator, and has previously been shown to be highly accurate when compared to full dipole calculations \cite{Ge2014njp}. Thus, the general goal with practical QNM theory is to obtain $\tilde{\bf f}_{\rm c}$ and then ${\tilde{\bf F}}_{\rm c}$; however, this now requires two complex integrations, one to first obtain the normalized QNM, and one to obtain the regularized QNM; especially with metallic resonators, this additional integration can be a complicated process (typically using nm-size grids) and indeed particularly problematic when the background is not so well defined (e.g., in the case of a resonator coupled to an infinite waveguide). \subsection{Integration-free QNM calculation\label{sec:NewTechnique}} We now describe our new integration-free dipole technique for accurately obtaining the QNM, and we also show how it naturally provides the regularized QNM in the far field without the need for further treatment. \red{As discussed before, QNMs form a complete basis only nearby the resonator and result in divergent fields in the far-field region. In general, to assure the correct behavior when propagating to the far-field, it is essential to involve all other system modes into our Green function expansion. This may include all QNMs in complex frequency space as well as the homogeneous medium propagating fields in real frequency space. Mathematically this can be written as $\mathbf{G} = \mathbf{G}_{\rm c} + \mathbf{G}_{\rm others}$ where $ \mathbf{G}_{\rm others}$ accounts for all necessary additions to Eq.\,\eqref{eq:GF_QNM} in the far-field. Indeed, the Dyson regularization technique discussed above self-consistently includes such effects.} In contrast, we will adopt an even simpler approach to regularization; we introduce the following ansatz: \begin{align} \mathbf{G}\left(\mathbf{r},\mathbf{r}_{0};\omega\right) \equiv A_{\rm c}\left(\omega\right)\,\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right) \tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right),\label{eq:GF_rQNM} \end{align} where $\tilde{\mathbf{f}}^{\rm r}_{\rm c}(\mathbf{r})$ is the real-frequency obtained QNM that is now also regularized in the far-field, and thus we call it a renormalized QNM (rQNM) to distinguish it from the usual far field behavior from a (spatially) divergent QNM. This means that, even in the far-field, a single mode expansion (using a rQNM) can be used to obtain physically meaningful quantities. Note that the subscript ``${\rm c}$'' on the Green function is no longer needed as we assume that the Green function of Eq.\,\eqref{eq:GF_rQNM} is an accurate representation of full system Green function at all positions, at frequencies close to the resonance frequency $\omega=\omega_{\rm c}$. Consider now a point-source simulation of Maxwell's equation at location $\mathbf{r}_{0}$, that can be used to obtain the system response at any location, also returning the dipole self-response term, $\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega\right)$. This is achieved by monitoring all three components of the electric field at the dipole location to obtain the numerical Green function: \begin{equation} G_{ij}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega\right)=\frac{E_{i}\left(\mathbf{r}_{0},\omega\right)}{P_{j}\left(\omega\right)},\label{eq:GFnumeric} \end{equation} where $E_{i}\left(\mathbf{r}_{0},\omega\right)$ is the $i$th component of the monitored electric field and $P_{j}\left(\omega\right)$ is dipole polarization introduced along the $j$th direction, with $i$ and $j$ representing Cartesian coordinates. Assuming that a relatively accurate estimation of the complex frequency for the localized resonance is available, the ansatz of Eq.~\eqref{eq:GF_rQNM} can be solved to find the complex rQNM field value at the dipole location, \begin{equation} \tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}=\sqrt{\frac{\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{\rm c}\right)\cdot\mathbf{d}}{A_{\rm c}\left(\omega_{\rm c}\right)}},\label{eq:fnut} \end{equation} where a real-valued dipole moment, $\mathbf{d}$, is assumed. The above quantity is, in fact, all one needs to perform an integration-free normalization for the rQNM. Indeed, when inserted back into Eq.\,\eqref{eq:GF_rQNM}, one obtains \begin{equation} \tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right)=\frac{\mathbf{G}\left(\mathbf{r},\mathbf{r}_{0};\omega_{\rm c}\right)\cdot\mathbf{d}}{\sqrt{A_{\rm c}\left(\omega_{\rm c}\right)\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{\rm c}\right)\cdot\mathbf{d}\right]}}.\label{eq:QNM} \end{equation} Note that Eq.~\eqref{eq:QNM} now provides the full spatial profile of the rQNM given that one also keeps track of the dipole response at all other locations. However, in practice, the real part of the Green function is problematic for obtaining transverse system modes. \red{In general, the system Green function includes contributions from both transverse and longitudinal modes. In the presence of inhomogeneous and lossy media, these modes can be hard to separate \cite{Wubs1,Wubs2}, therefore, solutions to Maxwell's equations subjected to dipole excitation can contain both types of modes, and it is not clear how to obtain only the transverse modes, especially for lossy materials.} However, as a remedy to this problem, the (well behaved) imaginary part of the Green function at two different frequency points can be used to reconstruct the normalized transverse field, as we discuss below. We begin by finding the rQNM value at the dipole location, $\mathbf{r}_{0}$. Consider Eq.\,\eqref{eq:GF_rQNM} at two different real frequencies, $\omega_{1}$ and $\omega_{2}$, that are, for example, located at either side of the rQNM resonance frequency. By using the imaginary part of both sides for each equation and following some simple algebra, we arrive at two independent expressions for the real and imaginary parts of the complex rQNM, at the dipole location: \begin{align} & \mbox{Re}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]^2=\left\{ \text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\right]\right.\nonumber \\ & \quad\quad\quad\left.-\text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\right]\right\} /B_{0},\label{eq:fnut1} \end{align} and \begin{align} & \mbox{Im}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]^2=\left\{ \text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{1}\right)\right]\right.\nonumber \\ & \quad\quad\quad\left.-\text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{2}\right)\right]\right\} /B_{0},\label{eq:fnut2} \end{align} where \begin{equation} B_{0}=\text{Im}\left[A_{\rm c}\left(\omega_{1}\right)\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\right]-\text{Im}\left[A_{\rm c}\left(\omega_{2}\right)\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\right]. \end{equation} Similarly, using the two space-point Green function, one requires the following additional set of two equations to obtain the normalized rQNM at all other locations away from the dipole, given the previously obtained $\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)$: \begin{align} & \mbox{Re}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right)\right]=\left\{ \text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right.\nonumber \\ & \quad\left.-\text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right\} /B,\label{eq:felse1} \end{align} and \begin{align} & \mbox{Im}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right)\right]\!=\!\left\{ \text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right.\nonumber \\ & \quad\left.-\text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right\} /B, \label{eq:felse2} \end{align} where \begin{align} & B=\text{Im}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\nonumber \\ & \quad-\text{Im}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right].\label{eq:b} \end{align} Note that, as can be seen from Eqs.~\eqref{eq:fnut1} and \eqref{eq:fnut2}, only the modal projection along the dipole direction is used to obtain all modal components at all other locations through use of Eqs.~\eqref{eq:felse1} and \eqref{eq:felse2}. It is worth mentioning that the technique presented here is found to be quite robust against the chosen frequency values (within a maximum 5\% discrepancy for metal resonators and 1\% discrepancy for dielectric cavity systems). \red{\subsection{FDTD implementation\label{sec:FDTDimplementation}} As mentioned before, our proposed technique above is quite general in its construction and can be applied, in principle, to any Maxwell solver, both in the time domain and in frequency domain. However, in this work, we will implement our method in FDTD, since it is arguably one of the most popular Maxwell solvers among photonics and plasmonics communities. Indeed, the lack of efficient QNM calculation recipes in real time Maxwell solvers was one of the original motivations behind this work. To explain such motivation and the difficulties behind it in more detail, below we briefly review some of the previous works and attempts in dealing with FDTD\ Green functions and cavity mode calculations in the time domain. Regarding the issue of obtaining the complex-frequency Green function in FDTD, there has been some work for studying Casimir effects \cite{Casimir1,Casimir2}, where a mathematically modified permittivity function is used to map the problem onto a complex frequency space, but it is limited to positive imaginary parts for the frequencies and therefore cannot be adopted to complex frequencies associated with QNMs. In an earlier attempt to extract leaky mode behaviour in FDTD \cite{Yu2014}, a simple dipole-response normalization technique was proposed for leaky photonic crystal cavities, but a normal mode picture was taken; indeed, a real-valued mode function was obtained that is known to lack the correct modal phase information (of an open cavity), and the method was cited to apply to dielectric structures only, for reasons that were not explained. The phase of the QNM is a necessity, e.g., for obtaining the correct Purcell factor as a function of position, particularly in plasmonics where very low quality factors are involved. A single dipole appoach with FDTD, with proper time windowing, can return the QNM, but, to allow a proper time windowing of the scattered field, this is usually restricted to dielectric cavities \cite{Kristensen2012} and is again is not in normalized form. There are other good reasons for why implementing a dipole-response normalization of the QNMs in FDTD is so challenging. For example, a well known problem with using FDTD and other self-consistent Maxwell solvers, stems from the in-phase field component of finite-size dipoles, causing unwanted frequency shifts and a grid-size dependence to the real part of the Green function with equal space arguments, namely ${\bf G}({\bf r}_0,{\bf r}_0)$, a problem that also occurs with self-consistent local oscillators in FDTD, e.g., through the optical Bloch equations \cite{Ellen2017}. The Green function in FDTD can be directly obtained by using a point dipole source, defined through \begin{equation} \boldsymbol{\nabla}\times\boldsymbol{\nabla}\times{\mathbf{G}}\left(\mathbf{r},\mathbf{r}^{\prime};\omega\right)-k_0^2\varepsilon\left(\mathbf{r},\omega\right)\,{\mathbf{G}}\left(\mathbf{r},\mathbf{r}^{\prime};\omega\right)=k_0^2\mathbf{I}\delta(\mathbf{r}-\mathbf{r}^{\prime}), \end{equation} where $k_0^2=\omega^2/c^2$, $\varepsilon({\bf r},\omega)$ is the complex dielectric constant, and we assume non-magnetic materials. For some applications, one can remove the grid-size dependence of FDTD dipoles, by subtracting off the solution from a homogeneous medium with the same computational gridding, so that the scattered Green function for an inhomogeneous medium is ${\bf G}^{\rm scatt}_{\rm FDTD}({\bf r}_0,{\bf r}_0)= {\bf G}^{\rm tot}_{\rm FDTD}({\bf r}_0,{\bf r}_0)-{\bf G}_{\rm FDTD}^{\rm hom}({\bf r}_0,{\bf r}_0)$. However, for the purpose of obtaining the transverse QNMs, particularly in the context of plasmonic resonators, the real part of the scattered Green function is not reliable, because the dipole response is contaminated by the influence of longitudinal modes.} Before assessing the accuracy of this FDTD dipole technique for obtaining normalized rQNMs (and QNMs), we make a few remarks: (i) our normalization technique is quite easy to use with any FDTD method, as it simply involves using the set of analytical equations given by \eqref{eq:fnut1} to \eqref{eq:b}; moreover, the method is practically instantaneous in time once the FDTD dipole simulation is finished; (ii) because the normalization technique requires no spatial information of the mode, from a practical perspective, the computational domain termination using PML can be done as close as possible to the scattering geometry before it alters the modal shape and eigenfrequency, resulting in significantly increased efficiency and less memory/run-time requirements. \section{Applications to various cavity systems in nanophotonics and nanoplasmonics \label{sec:Results}} To demonstrate the reliability and capability of our normalization technique, below we consider five different cavity systems, including two hybrid cavity-waveguide designs and a cavity-coupled photonic crystal waveguide. For all calculations, we use Lumerical FDTD \cite{lumerical} and a single mode performance over the frequency region of interest is assumed (and confirmed). \subsection{Gold cuboids and dimers \label{subsec:metals}} First, we study a cuboid gold nanorod with dimensions of $30\times100\times30\,{\rm nm}^{3}$ placed in a homogeneous background with refractive index of $n_B=1.5$. This acts as a single mode resonator over a wide range of frequencies of more than $400\,{\rm meV}$, as shown in Fig.~\ref{fig:Comparison-qnm}. For metallic regions, the dielectric function can be described using the local Drude model, \begin{equation} \varepsilon_{{\rm metal}}\left(\mathbf{r},\omega\right)=1-\frac{\omega_{p}^{2}}{\omega\left(\omega+i\gamma_{p}\right)}, \end{equation} where we use $\hbar\omega_{p}=8.29\,{\rm eV}$ and $\hbar\gamma_{p}=0.09\,{\rm eV}$ for the plasmon frequency and collision rate of gold \cite{Ge2014}, respectively. For the second example structure, two of the same nanorods are used to form a dimer of gap spacing $h_{\rm g}=20\,{\rm nm}$. This forms a plasmonic hot spot in the gap, but still behaves in a single mode manner over a similar range of frequencies as the single nanorod. \begin{figure} \begin{center} \includegraphics[width=.99\columnwidth]{fig_cuboids.pdf} \caption{(a-b) Computed rQNM spatial profile, $|\tilde{\mathbf{f}}^{\rm r}_{{\rm c}}|$ ($y$-component), for single and dimer cuboids, respectively. (c-d) Comparison between our dipole-normalized rQNM calculation of the generalized Purcell factor, $F_{\rm P}$, against fully vectorial calculations of Maxwell's equations. The dipole is located at 10 nm away from the surface along the nanorod axis for the single cuboid, and at the gap center for the dimer design. (e-f) Comparison of the rQNM technique in reproducing the position-dependent $F_{\rm P}$, again with full dipole calculations in circles.\label{fig:Comparison-qnm}} \end{center} \end{figure} As an important application of the mode technique, we study the spontaneous emission enhancement factor for dipole emitters when placed nearby the resonant cavity structures of interest. Considering a quantum dipole emitter polarized along $\mathbf{n}$, placed at position $\mathbf{r}$, the generalized Purcell factor can be calculated using \cite{Anger2006} \begin{equation} F_{{\rm P}}({\bf r};\omega)=1+\frac{6\pi c^{3}}{\omega^{3}n_{B}}\,\mathbf{n}\cdot{\rm Im}\{\mathbf{G}\left(\mathbf{r},\mathbf{r};\omega\right)\}\cdot\mathbf{n}. \end{equation} For convenience of studying positions outside of metals (or outside the scattering geometry in general), we have added the extra factor of 1, which is derived from a Dyson equation scattering problem for dipole positions outside the resonator \cite{Ge2014njp}; otherwise the Purcell factor should be defined without the extra factor of unity (e.g., for dipoles embedded within photonic crystal slabs). For the two nanoresonator systems above, we use a computational domain of $300\times500\times300\,\,{\rm nm}^{3}$ with a fine mesh of approximately $2\,{\rm nm}$ in every direction, terminated by PML in all directions. The complex resonance frequencies are found to be $\hbar\tilde{\omega}_{\rm c}=1.46 - 0.09i\,{\rm eV}$ and $\hbar\tilde{\omega}_{\rm c}=1.29 - 0.11i\,{\rm eV}$, respectively. The corresponding mode volumes at the dipole location \cite{Kristensen2012}, \begin{equation} {\rm V_{eff}} = \frac{1}{{\rm Re}\{\varepsilon\left(\mathbf{r}_0\right)\tilde{\mathbf{f}}_{\rm c}^2\left(\mathbf{r}_0\right)\}}, \end{equation} are also estimated to be ${\rm V_{eff}}/\lambda^3=8.5\times10^{-4}$ and ${\rm V_{eff}}/\lambda^3=1.6\times10^{-4}$. As consequence of the integration-free nature of this technique, with the small computational domain chosen, the entire simulation completes in approximately 30 minutes on a standard desktop with 8 cores, even without spatial sub-meshing. It is of course useful to discuss how this approach compares with other QNM calculation techniques for general shaped cavity structures. First, in comparison to a previously developed FDTD technique~\cite{Ge2014}, which uses a plane-wave excitation with time filtering with the same sub-meshing: this simulation (for the same metal cavity) takes days to weeks to run as a much larger simulation volume is required to carry out the spatial normalization procedure of the QNM. However, some additional time savings can be made by implemented PML normalization~\cite{Sauvan2013} with FDTD~\cite{Kristensen2015}, but this requires one to use the PML data (often not available)\ and a volume integral with the electric and magnetic fields (which requires additional care for field points inside the resonator). Having implemented all three approaches in FDTD, we find that our newly presented dipole normalization method is easily the most efficient to work with, and the most powerful (e.g., it can also do periodic background media as we demonstrate later). With regards to the frequency-domain dipole approach using complex frequencies in COMSOL~\cite{Bai2013}, we have found that for a complete analysis, this approach takes about the same computational time as the proposed dipole FDTD method, but only for the smaller spatial domains, such as with the nanoresonator devices. However, in our experience, larger hybrid devices run into extreme memory requirements when using finite-element solvers (e.g. with COMSOL). Both approaches have their strengths an weaknesses though, and the COMSOl approach is better for solving multiple overlapping modes (given sufficient computational resources). For the metal resonator calculations here, we implemented a numerical dipole source, located $10\,{\rm nm}$ away from the metallic surface along the $z$-axis in the case of single cuboid, and at the center of the gap in the case of the cuboid dimer. One can use the same spatial dipole position to perform both full numerical Purcell factor calculations as well as the rQNM calculation, all within the same one-time simulation, but for different dipole positions, we stress that there is no need to recalculate the rQNM. In Fig.~\eqref{fig:Comparison-qnm}, we plot the computed mode profile of the single rQNM of interest for each case along with the rQNM-calculated Purcell factor (which is analytic, after obtaining the mode numerically of course)\ in dashed-red that compares very well with full dipole calculations using Eq.~\eqref{eq:GFnumeric} in solid-blue (the accuracy is within a few \%). To more rigorously confirm the reliability of our rQNM technique, we next perform position-dependent Purcell factor studies for both of the structures discussed above. In Fig.~\ref{fig:Comparison-qnm}, each circle shows an independent dipole calculation (e.g., with no approximations) done at a particular position, while the solid line is calculated using the same rQNM calculated before (which only has to be computed once). In both cases we move away along the $x$-direction up to $40\,{\rm nm,}$ where an excellent agreement between our semi-analytical results and the full numerical results is achieved in all cases. In particular, note that the Purcell factor behavior before reaching $x=10\,{\rm nm}$ is qualitatively different for the single cuboid and the dimer resonator, and clearly the rQNM calculation accurately captures both trends. Such a good level of agreement can be in principle obtained at every location around the resonator for which the rQNM expansion remains valid. At distances far from the resonator, as discussed below in subsection \ref{subsec:reg}, our integration-free rQNMs also recovers the correct physical behavior, and thus we speculate that this rQNM picture can be used in both near and far fields from the resonator, with practically no distinction to the QNM in the near field---where the rQNM and QNM are identical. \subsection{Implicit far-field regularization: regularized QNMs vs divergent QNMs \label{subsec:reg}} In the above, we have shown how the rQNMs are practically identical to the QNMs in the near field (and certainly within the resonator), which is a consequence of the single mode approximation working very well. Unfortunately, in the far field, the single mode approximation of a cavity mode must fail. Although it may seem like an academic question, it is important to have physically meaningful fields at these far field locations as well, e.g., to compute the field that would be detected (e.g., by a detector)\ from the resonators in quantum optics \cite{Ge2015prb}. In this section, we demonstrate the ``regularized'' nature of our rQNMs when going to the far-field space region. \begin{figure} \begin{center} \includegraphics[width=.99\columnwidth]{fig_divg_qnm.pdf} \vspace{.1cm} \includegraphics[width=.99\columnwidth]{fig_divg} \caption{\red{Near-field and far-field behavior of the integration-free rQNM versus QNM for the cuboid gold dimer (note the latter is calculated using a completely different FDTD technique~\cite{Ge2014}). (a-b) Extended 2D map of the $|{\rm Re}(\tilde{\mathbf{f}}^{\rm r}_{\rm c}(\mathbf{r}))|$ and $|{\rm Re}(\tilde{\mathbf{f}}_{\rm c}(\mathbf{r}))|$, respectively. Each colormap is individually normalized to one and the same nonlinear scaling is used to better show the differences. (c-d) Comparison of the corresponding Purcell factors, calculated in the near-field region and in the far-field region, respectively. The inset in (c) shows the relative difference between these two independent calculations. (e) Purcell factor calculations based on the Dyson equation treatment of $\mathbf{F}_{\rm c}(\mathbf{r})$ using Eq.\,\eqref{eq:bigF} in real frequency space, and $\tilde{\mathbf{f}}_{\rm c}(\mathbf{r})$ using Eq.\,\eqref{eq:bigFcmplx} in complex frequency space. In all of these plots, $x=0$ represents the origin placed at the dimer gap center.}\label{fig:divg}} \end{center} \end{figure} As mentioned before, the system QNMs are solutions to a non-Hermitian Maxwell problems with open boundary conditions and are associated with complex resonant frequencies or complex wavevectors. \red{The negative imaginary part for the complex frequency, that describes the energy decay in time domain, leads to an exponential growth of the QNMs in space through $e^{(\gamma_c n_B/c) x}$, as one gets far enough away from the resonator. As a general rule of thumb, the divergence behavior of the QNM is become significant around $x_{\rm divg}$ such that $(\gamma_c n_B/c)x_{\rm divg}\approx 1$. For example, using the imaginary part of the complex frequency for the cuboid dimer design, where $\gamma_c \approx 0.11~$eV, $x_{\rm divg}=1-2\,{\rm \mu m}$ is estimated using this simple argument, which agrees with what will be discussed shortly in Fig.\,\ref{fig:divg}.} This known feature has been one of the main challenges in normalizing QNMs, and have raised questions as to whether these modes can be used to properly describe certain aspects of experiments in the far-field and with input-output formalisms. As highlighted earlier, a Dyson equation approach can be used to regularize the divergent QNM in the far-field through use of Eq.\,\eqref{eq:bigF} in real frequency space. But this approach also requires an additional spatial integration step and is rather complicated for metal structures to implement. However, the computed rQNM, $\mathbf{f}^{\rm r}_{\rm c}(\mathbf{r})$, is obtained in real frequency space and is thus already regularized. To demonstrate this regularization behavior, we next investigate the positional dependence of the generalized Purcell factor for dipole emitters coupled to the cuboid dimer structure, both in the near field and far field regimes. \red{We first show extended 2D maps ($10\,{\rm \mu m}$ along $x$-axis) of the rQNM and QNM spatial modes (as calculated in Ref.~\cite{Ge2014}), respectively in Fig.~~\ref{fig:divg}(a-b). A nonlinear color scaling is used to enhance the differences between the two approches. In particular, in the far-field the QNM diverges where as the rQNM does not, because our real-frequency QNM calculation technique captures the proper (sum over modes)\ propagation effects to the far-field. To better highlight these differences, we plot the Purcell factor at various positions using both rQNM and QNM, also in Fig.~\ref{fig:divg}.} In Fig.~\ref{fig:divg}(c), for positions close to the resonator, our rQNM Purcelll factor gives an excellent agreement with the QNM as calculated based on the recipe given in Ref.~\onlinecite{Ge2014}. However, in the far-field region, as shown in Fig.~\ref{fig:divg}(d), the rQNM behaves in a converged manner in comparison to the QNM. In particular, it follows the prediction of the post-calculated regularized QNM using the Dyson integral of Eq.\,\eqref{eq:bigF}, that is shown in Fig.~\ref{fig:divg}(e). For completeness however, if one needs to obtain the true divergent behavior of the system QNM in the far-field using our integration free approach, one can easily use the complex-frequency Dyson treatment of Eq.\,\eqref{eq:bigFcmplx}; since, to a very good approximation, our rQNM is equivalent to the system QNM inside (and near) the resonator, as clearly demonstrated in in Fig.~\ref{fig:divg}(e). Given the small value of the Purcell factor in the far-field (note we are zooming in from 1000 to 1), the minor discrepancies between (d) and (e) are attributed to small numerical errors (from the spatial integration primarily), and are not a general concern. Thus, these rQNM can be practically used at all spatial positions, without any spatial integration at all. If one desires the rQNM outside the simulation volume domain, then one can easily obtain either the QNM or the rQNM using the Dyson equation as shown above. Thus there is no need to simulate large regions of homogeneous space outside the scattering geometry, and for continuous waveguide one can also safely use PML to limit the space- and run-time requirements. \subsection{Hybrid metal-dielectric systems \label{subsec:hybrids}} To further emphasize the generality of our technique, and show its applicability for use in more complex emerging devices in hybrid plasmonics, we next study a set of two hybrid devices where the plasmonic single cuboid resonator is either embedded in a ridge waveguide or is placed inside a groove waveguide, such that the short-range confined mode of the cuboid is coupled to the long-range propagating mode of the waveguide. The dielectric beam waveguide is made of silicon-nitride, with a refractive index of $n_{{\rm diel}}=2.04$ and dimensions of $600\times800\times6000\,\,{\rm nm}^{3}$. One motivation behind such devices is to design transmission drop lines, but here, for consistency with our other investigations, we focus on the far-field collection efficiency of dipole emitters coupled to the plasmonic sub-system, that can be also of interest in the design of integrated broadband single photon sources; for example, one could excite embedded quantum dots incoherently, and monitor the output scattered field of a single exciton state. For both of these cases, a computational domain of $10\times5\times5\,\,{\rm \mu m}^{3}$ is used to ensure a sufficiently long waveguide terminated by PML in all directions. Similar to before, a fine mesh of approximately $2\,{\rm nm}$ was used over the metallic region, that was then refined into the courser mesh of $40\,{\rm nm}$ everywhere else, using the non-uniform meshing technology in Lumerical FDTD~\cite{lumerical}. In Fig.\,\ref{fig:hybrid-pf}(a) and Fig.\,\ref{fig:hybrid-pf-2}(a), we plot the generalized Purcell factor, $F_{\rm P}$, of a dipole emitter placed $10\,{\rm nm}$ away from the metallic surface (see also Fig.\,\ref{fig:schematic}). The complex resonance frequencies extracted are $\hbar\tilde{\omega}_{\rm c}=1.08 -0.07i\,{\rm eV}$ and $\hbar\tilde{\omega}_{\rm c}=1.26 - 0.08i\,{\rm eV}$, respectively. The corresponding mode volumes are also estimated to be ${\rm V_{eff}}/\lambda^3=6.5\times10^{-4}$ and ${\rm V_{eff}}/\lambda^3=6.3\times10^{-4}$. Both full-dipole calculations (in solid-blue) and rQNM calculations in (dashed-red) are shown, once again with a good agreement. In comparison to isolated resonators, there is a small discrepancy between the rQNM and full dipole calculations at frequencies very far from the resonance, which is likely attributed to the non-negligible influence from dielectric wall/surface scattering effects (possibly yielding small background modes at other frequencies) and the fact that now the single resonator interacts with a propagating mode of the waveguide. Similar to before, a single mode performance is still achieved, but the resonance is red-shifted and sits lower in terms of maximum emission enhancement, due to the lower index mismatch provided by the waveguide. \begin{figure} \begin{center} \includegraphics[width=.99\columnwidth]{fig_hybrid_power} \vspace{.2cm} \includegraphics[width=.99\columnwidth]{fig_hybrid_qnm.pdf} \caption{(a) Comparison between our dipole-normalized rQNM calculation of the generalized Purcell factor, $F_{\rm P}$, against fully vectorial calculations of Maxwell's equations, for the gold single cuboid coupled to the ridge waveguide. The dipole emitter is placed at 10 nm away from the nanorod surface along the $y$ axis. (b) Radiative beta factors: the $\beta^{\rm rad}_{\rm tot}$ that quantifies the entire far-field radiation as well as the $\beta^{\rm rad}_{\rm wg}$ that quantifies the far-field radiation confined within the waveguide. (c) An $xy$ cut of the calculated rQNM spatial profile at $z=0$ and (d-f) show three different $yz$ cuts as labeled, to show the technique ability in capturing modal details. \red{Each colormap is individually normalized to one and a nonlinear scaling for improved visualization is used in (c)}.\label{fig:hybrid-pf}} \end{center} \end{figure} \begin{figure}[t!] \begin{center} \includegraphics[width=.99\columnwidth]{fig_slot_power} \vspace{.2cm} \includegraphics[width=.99\columnwidth]{fig_slot_qnm.pdf} \caption{Panels represent the same quantities plotted in Fig.\,\ref{fig:hybrid-pf} but for the single nanorod placed in the groove waveguide.\label{fig:hybrid-pf-2}} \end{center} \end{figure} With plasmonics, one always has some optical quenching of the mode, and it is also important to know how much of the radiative emission of a quantum emitter can couple to the target waveguide mode in the two different configurations mentioned above. This can be quantified for the radiation emitted into the waveguide, $\Gamma_{\rm wg}^{\rm rad}$, using the waveguide radiative ``beta factor'' \begin{equation} \beta_{\rm wg}^{\rm rad} = \frac{\Gamma_{\rm wg}^{\rm rad}}{\Gamma_{\rm P}}, \end{equation} and for the total radiation available in the entire $4\pi$ far-field space (away from the resonator), $\Gamma_{\rm tot}^{\rm rad}$, using \begin{equation} \beta_{\rm tot}^{\rm rad} = \frac{\Gamma_{\rm tot}^{\rm rad}}{\Gamma_{\rm P}}, \end{equation} where $\Gamma_{\rm P}=F_{\rm P}\Gamma_{\rm 0}$, and $\Gamma_0$ the spontaneous emission rate in a homogeneous medium (free space or the dielectric). Thus the total nonradiative coupling is simply \begin{equation} \beta^{\rm nrad} = 1- \beta_{\rm tot}^{\rm rad}. \end{equation} The radiative beta factors are shown in Fig.\,\ref{fig:hybrid-pf}(b) and Fig.\,\ref{fig:hybrid-pf-2}(b), where the solid-blue shows the total radiation available in the far-field, and the dashed-red shows only its portion transmitted through the waveguide interface. This factor also gives the quantum efficiency of a dipole emitter. It is seen that, depending on the waveguide design, the far-field emission can be quite different. In particular, the total far-field radiation from the dipole for the groove waveguide is higher than in the ridge waveguide over its frequency band, mainly because the nanoparticle is not embedded in the dielectric region. However, the dipole emission within the waveguide is considerably less for the groove design, again because the nanoparticle is not embedded in the dielectric. Moreover, the fact that close to 40\% of dipole emission can be detected at the end of the ridge waveguide, offers some benefits in comparison to all-metallic plasmonic waveguides (which introduced additional waveguide losses), in applications where signal strength (brightness) from single emitters is more critical. To better see the mode pattern in the waveguide, in Fig.~\ref{fig:hybrid-pf} and Fig.~\ref{fig:hybrid-pf-2}, we have plotted four different surface slices of the calculated rQNM. In Figs.~\ref{fig:hybrid-pf}-\ref{fig:hybrid-pf-2} (c), we show an $xy$-cut at the beam center such that the top view of the whole system is shown. This shows a clear pattern of the complex rQNM that has features from both the plasmonic resonator and the nanobeam waveguide. In Figs.~\ref{fig:hybrid-pf}-\ref{fig:hybrid-pf-2} (d), an $yz$-cut at the center of the plasmonic cuboid where the dominant plasmonic behavior is shown. Finally, in Figs.~\ref{fig:hybrid-pf}-\ref{fig:hybrid-pf-2} (e-f) two other $yz$-cuts at distant locations from the single cuboid are shown, where the transition form the localized plasmonic mode to the propagating waveguide mode is y observed. \subsection{Photonic crystal slab coupled cavity-waveguide \label{subsec:PC}} For our final example, we apply our technique to a class of devices in photonic crystal platforms, namely cavities coupled to periodic waveguides, that are used for applications such as single photon sources and channel drop filters. This not only demonstrates the reliability of our technique for use in dielectric systems with large quality factors, but also tackles the very difficult problem of normalizing QNMs for the localized cavities that are subjected to the Bloch periodic propagation of the waveguide, as the dominant outgoing channel \cite{KristensenOL2014,Malhotra2016}; in this regime, there are additional complexities and difficulties encountered to regularize an infinite spatial integration \cite{KristensenOL2014,Malhotra2016}. \begin{figure}[ht] \begin{center} \includegraphics[width=.99\columnwidth]{fig_phcs_pf} \includegraphics[width=.99\columnwidth]{fig_phcs_qnm.pdf} \caption{(a-b) Comparison between our dipole-normalized rQNM calculation of the generalized Purcell factor, $F_{\rm P}$, against full-dipole vectorial calculations of Maxwell's equations, for the isolated L3 cavity and the L3 cavity side-coupled to the waveguide, respectively. The dipole emitter is placed at center of the cavity and polarized along the $y$-axis. (c-d) An $xy$ cut of the calculated rQNM spatial profile at the center of the slab where in (d) the waveguide portion is nonlinearly enhanced for better visualization. \red{ (e) The propagating Bloch mode of a section of the infinite waveguide for comparison (see inside text for details). Each colormap is individually normalized to one.}\label{fig:l3w1}} \end{center} \end{figure} We use a triangular photonic crystal slab of refractive index of $n=3.5$, where the lattice constant is $d=240\,{\rm nm}$, the hole radius is $r=0.28\,d$ and the slab thickness is $h=164\,{\rm nm}$. The structure is $9\times25\,d$ in size, and is finely meshed with 20 points per lattice period. In particular, we consider two devices, the isolated L3 cavity on its own, and the L3 cavity side-coupled to a W1 waveguide. To minimize any relevant numerical discrepancies, the L3 cavity is placed to the side such that exactly the same structure and computational domain is used for both devices; see Fig.\,\ref{fig:l3w1}. Depicted in Figs.\,\ref{fig:l3w1}(a)-(b), as for the other cavity structures, we first confirm a very good agreement between the QNM-calculated Purcell factor and the fully vectorial dipole calculations; here we consider a dipole emitter placed inside the L3 cavity, at the antinode and aligned along the $y$-axis, according to the coordinate system shown in the schematic of Fig.\,\ref{fig:schematic}. As seen, introducing the waveguide reduces the peak enhancement by close to a factor of 2. The resonance frequencies (real part) are computed to be $\hbar{\omega}_{\rm c}^{\rm L3}=1.3052\,{\rm eV}$ and $\hbar{\omega}_{\rm c}^{\rm L3W1}=1.3049\,{\rm eV}$, with the corresponding quality factors of $Q^{\rm L3}=5,200$ and $Q^{\rm L3W1}=3,300$. The associated mode-volumes, calculated at the modal antinode at the center of the L3 cavity are also ${\rm V_{eff}^{L3}}/\lambda^3=0.0142$ and ${\rm V_{eff}^{L3W1}}/\lambda^3=0.0145$, which are found to be very similar for this particular structure (as is often assumed in the community without proof, but in general this may not be the case, especially for low-$Q$ cavities). In Figs.~\ref{fig:l3w1}(c) and \ref{fig:l3w1}(d), we display the rQNM spatial profile as calculated for both photonic crystal devices, where the in-waveguide section for the coupled device is enhanced for visualization. These two represent $xy$ cuts at the center of the slab. It is evident that the rQNM inside the waveguide behaves different than the waveguide Bloch mode and somewhat inherits the shape of the L3 mode, with repetitions occurring due to the phase dependence of the cavity QNM~\cite{Kristensen:17}. Therefore, the naive assumption that simply the system behavior inside the waveguide follows the usual W1 propagation, may not be taken. In addition, note that the details of the transition for the system mode to go from a localized mode within the cavity to propagating within the waveguide, that is nontrivial, is also well captured by the calculated rQNM. \section{Conclusions\label{sec:Conclusions}} In summary, we have introduced a new normalization technique for obtaining regularized QNMs of leaky optical cavities and plasmonic resonators, and implemented it with the widely used FDTD algorithm in real frequency space. Our technique requires no spatial integration for post processing normalization of the QNMs, but rather a set of easy-to-use analytical equations are provided that only require the self-consistent response to a dipole excitation at two different frequencies, essentially exploiting an inverse Green function approach. We find this technique to be extremely efficient on both computational memory and run time requirements, and easy to use. We exemplified this dipole normalization technique for several different arbitrarily-shaped plasmonic resonators, dielectric photonic crystal slabs, and hybrid devices in order to show its generality and applicability to a wide range of nanophotonic systems. In particular, the spontaneous emission enhancement factor was studied for quantum emitters placed nearby these systems, where a very good agreement (within a few~\% at the desired frequency range) between our rQNM calculation and fully numerical solutions of Maxwell's equations were obtained. Moreover, this new technique requires no further regularization of the rQNM in the far-field, as it readily returns the non-divergent system response at distances far away from the resonator. Since the method is easy to implement in commonly used FDTD solvers such as those available from Lumerical solutions \cite{lumerical} and MEEP \cite{meep}, it is an attractive tool for the community seeking true ``cavity modes'' for a wide range of complex structures. \section*{Acknowledgments} We thank Queen\textquoteright s University and the Natural Sciences and Engineering Research Council of Canada for financial support. We also thank Lumerical Solutions Inc. for support, and Philip Kristensen and Simon Axelrod for excellent suggestions and discussions. \bibliographystyle{apsrev4-1} \section{Introduction} Over the past few decades, optical cavity structures have been used for an incredibly wide range of photonic applications \cite{Vahala2003}. In many of these cavity devices, exploiting a modal description of the optical system is of great benefit, not only for providing good physical intuition, but also because of the significant efficiency that it brings to the theoretical investigations of a typical problem. Moreover, in quantum optics, a modal description is a requirement for second quantization. However, in contrast to \textit{normal modes} (with real eigenfrequencies), that are suited for describing closed optical systems (and sometimes very low loss systems) where energy losses are not a major concern, for dissipative optical cavities in general, the open cavity \textit{quasinormal modes} (QNMs) must be employed. This is particularly true for low quality factor ($Q$) resonators, though also for high-$Q$ structures such as photonic crystal cavities \cite{Kristensen2012}. Low-$Q$ broadband resonators are also now widely exploited in plasmonic devices, which have been proposed and used for applications such as sensing \cite{Kneipp1996,Nie1997,Zhang2013,Yampolsky2014,Chikkaraddy2016}, hybrid integrated photonics \cite{Barth2010,Mukherjee2011,hybrid2012,hybrid2012_2,hybrid2013,Castro-Lopez2015,Espinosa-Soria2016,Chai2016,Doeleman2016,KamandarDezfouli2017,Ortuno2017} and broadband single photon sources \cite{Chang2006,Esteban2010,Russell2012,Belacel2013,Akselrod2014,Lu2014,Ruesink2015,Baaske2016,Koenderink2017}. For any material system, the open-cavity QNMs are associated with complex eigenfrequencies whose imaginary parts quantify the system losses, and thus they require a more generalized normalization \cite{Leung1994,Kristensen2012,Sauvan2013,Kristensen2015,Bai2013} beyond the standard Hermitian theories. In recent years, cavity QNMs have been successfully used to calculate various optical quantities of interest, such as the generalized effective mode volume \cite{Leung1994,Kristensen2012}, enhanced spontaneous emission factor of dipole emitters, and the electron energy-loss spectroscopy (EELS) maps for plasmonic resonators \cite{Abajo2008,Ge2016}. Calculation and normalization of QNMs has been demonstrated using both time-domain techniques, such as finite-difference time-domain (FDTD), and frequency-domain methods (such as finite-element solvers) \cite{Kristensen2012,Ge2014,Sauvan2013,Bai2013}. However, all of these approaches are somewhat specialized and all have pros and cons. Also, most of these computational methods require a complex spatial integration of the optical fields, involving volume and surface integrals \cite{Kristensen2012,Kristensen2015,Leung1996JOSAB,Muljarov2010}, or coordinate transforms that exploit PMLs (perfectly matched layers) as part of the cavity structure \cite{Sauvan2013}. Therefore, implementation of such QNM normalization approaches is often quite involved and, for this reason, it is still quite common to compute cavity modes in a rather ambiguous way, often treating the mode of interest as a normal mode (in some finite computational domain), or as the solution to the scattering problem (which is obviously not a true mode). Moreover, in structures with a background periodic index, such as a cavity coupled to a photonic crystal waveguide, the spatial normalization approaches generally fail, and a more careful regularization is required \cite{KristensenOL2014,Malhotra2016}. Thus there is a need to develop simpler computational approaches to obtain the QNMs without the need for such a complicated integration procedure. Recently, using a frequency domain approach, an intuitive dipole normalization technique was developed by Bai {\it et al.}~\cite{Bai2013}, implemented using COMSOL \cite{comsol}, where the self-consistent response to a dipole excitation is used to obtain an {\it integration-free} normalization for the QNM. In this approach, a search in frequency space is first performed to identify the QNM resonant frequency (pole) and then an additional simulation is performed very near the resonance frequency to capture the dominant cavity mode of interest. This method relies on the ability of the frequency-domain solvers to locate a frequency pole of the resonance in complex frequency space. Such an approach can be highly accurate and insightful, but requires implementation in a frequency domain solver, which can often require significant amounts of memory for larger device simulations such as coupled resonator-waveguide systems, and even single resonator structures \cite{Akselrod2016}. Additional frequency domain Maxwell's solvers have since been developed for obtaining QNMs of plasmonic devices \cite{MNPBEM} that can also be used to perform QNM calculations \cite{MNPBEM_SciRep}, which is cited to work best for nanoparticles of a certain size \cite{MNPBEM}. \red{Very recently, a generalization approach to normal mode expansion of the Green fucntion for lossy resonators has been introduced \cite{Bergman}, where modes are defined with permittivity rather than frequency. While the technique is quite general and insightful, it provides single-frequency information and can also suffer from already discussed memory requirement issues (the implementation has been done in COMSOL) for arbitrary sized devices.} \red{In this work, we describe a new integration-free method for obtaining normalized QNMs of arbitrary open cavities, which uses a simple dipole source excitation technique in real frequency space. We also describe and show how this new technique calculates ``regularized'' QNMs \cite{Ge2014njp}, which ensures well-behaved (non-divergent) fields far away from the resonator, without the need for including a sum over many modes or by carrying our formal regularization through a Dyson integration approach---which reconstructs the regularized fields outside the resonator using the QNM fields inside \cite{Ge2014njp}. Although our approach is quite general, we will implement it using FDTD (from Lumerical Solutions \cite{lumerical}) that is arguably one of the most general and well used computational techniques in nanoplasmonics \cite{Maier2006,Schuller2010,Ameling2013,Eter2014,Akselrod2016}, and in nanophotonics in general \cite{fdtdref3,fdtdref1,fdtdref2,fdtdref4}. In Section \ref{sec:Theory}, we introduce simple transparent formulas that can be used by a general user of any FDTD software (or similar time-dependent Maxwell solver) to compute the system QNMs in an easy-to-use and reliable manner.} In Section \ref{sec:Results}, as an application of this technique, confirmed with full vectorial dipole calculations of Maxwell's equations, we study the spontaneous emission enhancement (generalized Purcell factor) of a dipole emitter placed nearby different plasmonic systems including hybrid systems of metals and dielectrics, as well as coupled cavity-waveguide devices in photonic crystal slabs; these resonator systems are motivated by recent practical interest in design of different devices such as transmission line filters and single photon sources \cite{hybrid2012,hybrid2012_2,hybrid2013,Castro-Lopez2015,Espinosa-Soria2016,Axelrod2017,Malhotra2016}. In \ref{subsec:metals}, we explore the gold cuboid and dimer structures, to confirm the accuracy of the technique over a wide range of spatial positions and frequencies, where we also comment on how efficient our new technique is compared to existing methods. In \ref{subsec:reg}, we then explore the regularized nature of our newly developed technique in obtaining the far-field optical response that eliminates concerns regarding the divergent behavior of the QNMs, e.g., for use with studies such as transmission and scattering into the far field. In addition, we also show excellent agreement with a previous FDTD QNM approach that uses a spatial integration approach with filtering \cite{Ge2014}, and point out several clear advantages of the current approach (including a drastic increase in efficiency, and no spatial integration at all for normalization or far field regularization). In \ref{subsec:hybrids}, we extend the applicability and reliability of the technique to hybrid devices where plasmonic resonators are coupled to periodic dielectric waveguides. Finally, in \ref{subsec:PC}, we also provide some examples of dielectric cavities, including a complicated coupled cavity-waveguide design in a photonic crystal slab. This later is a particularly hard problem for obtaining the QNMs (of the coupled system), but is shown to be easily computed with the current technique. In section \ref{sec:Conclusions}, we present our conclusions. \begin{figure} \begin{center} \includegraphics[width=.95\columnwidth]{Schematic.png} \caption{Examples of plasmonic, hybrid metal-dielectric and photonic crystal cavity devices for use in various nanophotonics applications, all of which we will study in this paper. (a-b) show plasmonic single and dimer cuboids placed in a homogeneous medium. (c-d) show hybrid devices where the single cuboid is either embedded inside a ridge waveguide or placed on top of a slot waveguide. The red double arrows show the location and orientation of dipole excitation used in this work where a 2D projection through cuboid center is used. (e) A top down view of a 3D coupled cavity-waveguide device using photonic crystal slabs for single photon source applications. \label{fig:schematic}} \end{center} \end{figure} \section{Theory\label{sec:Theory}} In this section, we present our main technique for calculating the regularized QNMs. While our approach can be expanded for computing several QNMs, we focus on a single mode picture, as it is quite often the most desired case, e.g., for applications with single photon sources and lasing. While all time-domain techniques can become problematic for computing closely overlapping QNMs (in frequency), there are no additional limitations beyond those that are well known to most time domain Maxwell solvers. \subsection{Existing QNM theory\label{sec:ExistingTheory}} In general, any open cavity system can support several QNMs, $\tilde{\mathbf{f}}_{{\mu}}\left(\mathbf{r}\right)$, over the frequency band of interest. These QNMs can be defined as the solutions to the Helmholtz equation, \begin{equation} \boldsymbol{\nabla}\times\boldsymbol{\nabla}\times\tilde{\mathbf{f}}_{{\mu}}\left(\mathbf{r}\right)-\left(\dfrac{\tilde{\omega}_{{\mu}}}{c}\right)^{2}\varepsilon\left(\mathbf{r},\omega\right)\,\tilde{\mathbf{f}}_{{\mu}}\left(\mathbf{r}\right)=0, \end{equation} with open boundary conditions, through the Silver-M\"uller radiation condition \cite{Kristensen2015}. Here, $\varepsilon\left(\mathbf{r},\omega\right)$ is the dielectric function (possibly complex) of the system and $\tilde{\omega}_{{\mu}}=\omega_{{\mu}}-i\gamma_{{\mu}}$ is the complex resonance frequency that can also be used to quantify the system quality factor as $Q_{\mu}=\omega_{\mu}/2\gamma_{\mu}$. These QNMs, once normalized, can be used to construct the transverse Green function through \cite{Leung1994,Ge2014njp} \begin{equation} \mathbf{G}\left(\mathbf{r},\mathbf{r}_{0};\omega\right)= \sum_{\mu} A_{\mu}\left(\omega\right)\,\tilde{\mathbf{f}}_{\mu}\left(\mathbf{r}\right)\tilde{\mathbf{f}}_{\mu}\left(\mathbf{r}_{0}\right),\label{eq:GFwithSUM} \end{equation} at all frequencies around the mode and at all locations nearby the scattering geometry, \red{where the QNMs can form a complete basis \cite{Leung1996JOSAB,Leung_PRA_Completeness}. For simplicity, we have defined the spectral function} $A_{\mu}(\omega)=\omega^{2}/2\,\tilde{\omega}_{\mu}\left(\tilde{\omega}_{\mu}-\omega\right)$. Considering a single QNM, $\tilde{\mathbf{f}}_{\rm c}(\mathbf{r})$, the single mode Green function can be written as \begin{equation} \mathbf{G}_{\rm c}\left(\mathbf{r},\mathbf{r}_{0};\omega\right) \approx A_{\rm c}(\omega)\,\tilde{\mathbf{f}}_{\rm c}\left(\mathbf{r}\right)\tilde{\mathbf{f}}_{\rm c}\left(\mathbf{r}_{0}\right), \label{eq:GF_QNM} \end{equation} where again this strictly holds only nearby the ``cavity region'' (typically at distances where a quantum emitter still feels a Purcell factor enhancement) and diverges at locations far away. \red{The exact position for which the divergent behavior of the QNM appears, depends on the quality factor of the open cavity under investigation. For low quality factors such as those in plasmonics, the divergent behavior can appear at around a few microns away from the resonator (which will be farther away for higher quality factors such as those in photonic crystal cavities).} In any case, the divergent behavior is clearly unphysical for real fields, as we know there should be no enhanced emission in the far field, and the total field must be convergent. This problem can be partly avoided (or fixed) by employing a Dyson equation formalism to reconstruct the full Green function at locations away (outside) from the cavity region \cite{Ge2014njp}. \red{The idea behind the Dyson equation is to self-consistently obtain the solution to the scattering geometry at all locations using the preexisting knowledge of the background Green function and field solution inside the scattering geometry \cite{OliverMartinDysonGF}. Using an accurate QNM solution within the cavity region, one can obtain a ``regularized'' mode from, \begin{align} \tilde{\mathbf{F}}_{\rm c}(\mathbf{R}) = \int_{\rm cavity} \mathbf{G}_0(\mathbf{R},\mathbf{r^{\prime}};\omega)\,\Delta \varepsilon(\mathbf{r^{\prime}},\omega)\cdot\tilde{\mathbf{f}}_{\rm c}(\mathbf{r^{\prime}})\,{\rm d} \mathbf{r}',\label{eq:bigF} \end{align} for any position ${\bf R}$ outside the resonator. Here, $\mathbf{G}_0$ is the Green function for the background medium and $\Delta\varepsilon({\bf r},\omega)=\varepsilon({\bf r},\omega)-\varepsilon_B(\bf r)$ is the total dielectric constant minus the background term $\varepsilon_B(\bf r)$. In the case of isolated resonators, $\mathbf{G}_0$ can be considered as the (analytically known) homogeneous space Green function \cite{Novotny}, and for resonators coupled to waveguides, could be the background waveguide Green function~\cite{Kristensen:17}. Notably, the only assumption used to derive this expression is the validity of the single QNM description within the resonator.} Indeed, one can also use this expression in complex frequency space to self-consistently obtain the divergent QNM outside the resonator: \begin{align} \tilde{\mathbf{f}}_{\rm c}(\mathbf{R}) = \int_{\rm cavity} \mathbf{G}_0(\mathbf{R},\mathbf{r^{\prime}};\tilde\omega)\,\Delta \varepsilon(\mathbf{r^{\prime}},\tilde\omega)\cdot\tilde{\mathbf{f}}_{\rm c}(\mathbf{r^{\prime}})\,{\rm d} \mathbf{r}'. \label{eq:bigFcmplx} \end{align} In any case, the regularized QNM, $\tilde{\mathbf{F}}_{\rm c}(\mathbf{r})$ can be used in a similar Green function expansion as in Eq.\,\eqref{eq:GF_QNM} to obtain physically meaningful quantities far outside the resonator, where it is fully expected that a single QNM approach will breakdown. This ``regularized'' mode can then be used at all positions outside the resonator, and has previously been shown to be highly accurate when compared to full dipole calculations \cite{Ge2014njp}. Thus, the general goal with practical QNM theory is to obtain $\tilde{\bf f}_{\rm c}$ and then ${\tilde{\bf F}}_{\rm c}$; however, this now requires two complex integrations, one to first obtain the normalized QNM, and one to obtain the regularized QNM; especially with metallic resonators, this additional integration can be a complicated process (typically using nm-size grids) and indeed particularly problematic when the background is not so well defined (e.g., in the case of a resonator coupled to an infinite waveguide). \subsection{Integration-free QNM calculation\label{sec:NewTechnique}} We now describe our new integration-free dipole technique for accurately obtaining the QNM, and we also show how it naturally provides the regularized QNM in the far field without the need for further treatment. \red{As discussed before, QNMs form a complete basis only nearby the resonator and result in divergent fields in the far-field region. In general, to assure the correct behavior when propagating to the far-field, it is essential to involve all other system modes into our Green function expansion. This may include all QNMs in complex frequency space as well as the homogeneous medium propagating fields in real frequency space. Mathematically this can be written as $\mathbf{G} = \mathbf{G}_{\rm c} + \mathbf{G}_{\rm others}$ where $ \mathbf{G}_{\rm others}$ accounts for all necessary additions to Eq.\,\eqref{eq:GF_QNM} in the far-field. Indeed, the Dyson regularization technique discussed above self-consistently includes such effects.} In contrast, we will adopt an even simpler approach to regularization; we introduce the following ansatz: \begin{align} \mathbf{G}\left(\mathbf{r},\mathbf{r}_{0};\omega\right) \equiv A_{\rm c}\left(\omega\right)\,\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right) \tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right),\label{eq:GF_rQNM} \end{align} where $\tilde{\mathbf{f}}^{\rm r}_{\rm c}(\mathbf{r})$ is the real-frequency obtained QNM that is now also regularized in the far-field, and thus we call it a renormalized QNM (rQNM) to distinguish it from the usual far field behavior from a (spatially) divergent QNM. This means that, even in the far-field, a single mode expansion (using a rQNM) can be used to obtain physically meaningful quantities. Note that the subscript ``${\rm c}$'' on the Green function is no longer needed as we assume that the Green function of Eq.\,\eqref{eq:GF_rQNM} is an accurate representation of full system Green function at all positions, at frequencies close to the resonance frequency $\omega=\omega_{\rm c}$. Consider now a point-source simulation of Maxwell's equation at location $\mathbf{r}_{0}$, that can be used to obtain the system response at any location, also returning the dipole self-response term, $\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega\right)$. This is achieved by monitoring all three components of the electric field at the dipole location to obtain the numerical Green function: \begin{equation} G_{ij}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega\right)=\frac{E_{i}\left(\mathbf{r}_{0},\omega\right)}{P_{j}\left(\omega\right)},\label{eq:GFnumeric} \end{equation} where $E_{i}\left(\mathbf{r}_{0},\omega\right)$ is the $i$th component of the monitored electric field and $P_{j}\left(\omega\right)$ is dipole polarization introduced along the $j$th direction, with $i$ and $j$ representing Cartesian coordinates. Assuming that a relatively accurate estimation of the complex frequency for the localized resonance is available, the ansatz of Eq.~\eqref{eq:GF_rQNM} can be solved to find the complex rQNM field value at the dipole location, \begin{equation} \tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}=\sqrt{\frac{\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{\rm c}\right)\cdot\mathbf{d}}{A_{\rm c}\left(\omega_{\rm c}\right)}},\label{eq:fnut} \end{equation} where a real-valued dipole moment, $\mathbf{d}$, is assumed. The above quantity is, in fact, all one needs to perform an integration-free normalization for the rQNM. Indeed, when inserted back into Eq.\,\eqref{eq:GF_rQNM}, one obtains \begin{equation} \tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right)=\frac{\mathbf{G}\left(\mathbf{r},\mathbf{r}_{0};\omega_{\rm c}\right)\cdot\mathbf{d}}{\sqrt{A_{\rm c}\left(\omega_{\rm c}\right)\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{\rm c}\right)\cdot\mathbf{d}\right]}}.\label{eq:QNM} \end{equation} Note that Eq.~\eqref{eq:QNM} now provides the full spatial profile of the rQNM given that one also keeps track of the dipole response at all other locations. However, in practice, the real part of the Green function is problematic for obtaining transverse system modes. \red{In general, the system Green function includes contributions from both transverse and longitudinal modes. In the presence of inhomogeneous and lossy media, these modes can be hard to separate \cite{Wubs1,Wubs2}, therefore, solutions to Maxwell's equations subjected to dipole excitation can contain both types of modes, and it is not clear how to obtain only the transverse modes, especially for lossy materials.} However, as a remedy to this problem, the (well behaved) imaginary part of the Green function at two different frequency points can be used to reconstruct the normalized transverse field, as we discuss below. We begin by finding the rQNM value at the dipole location, $\mathbf{r}_{0}$. Consider Eq.\,\eqref{eq:GF_rQNM} at two different real frequencies, $\omega_{1}$ and $\omega_{2}$, that are, for example, located at either side of the rQNM resonance frequency. By using the imaginary part of both sides for each equation and following some simple algebra, we arrive at two independent expressions for the real and imaginary parts of the complex rQNM, at the dipole location: \begin{align} & \mbox{Re}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]^2=\left\{ \text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\right]\right.\nonumber \\ & \quad\quad\quad\left.-\text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\right]\right\} /B_{0},\label{eq:fnut1} \end{align} and \begin{align} & \mbox{Im}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]^2=\left\{ \text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{1}\right)\right]\right.\nonumber \\ & \quad\quad\quad\left.-\text{Im}\left[\mathbf{d}\cdot\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r}_{0};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{2}\right)\right]\right\} /B_{0},\label{eq:fnut2} \end{align} where \begin{equation} B_{0}=\text{Im}\left[A_{\rm c}\left(\omega_{1}\right)\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\right]-\text{Im}\left[A_{\rm c}\left(\omega_{2}\right)\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\right]. \end{equation} Similarly, using the two space-point Green function, one requires the following additional set of two equations to obtain the normalized rQNM at all other locations away from the dipole, given the previously obtained $\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)$: \begin{align} & \mbox{Re}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right)\right]=\left\{ \text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right.\nonumber \\ & \quad\left.-\text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right\} /B,\label{eq:felse1} \end{align} and \begin{align} & \mbox{Im}\left[\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}\right)\right]\!=\!\left\{ \text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{2}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right.\nonumber \\ & \quad\left.-\text{Im}\left[\mathbf{G}\left(\mathbf{r}_{0},\mathbf{r};\omega_{1}\right)\cdot\mathbf{d}\right]\mbox{Im}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\right\} /B, \label{eq:felse2} \end{align} where \begin{align} & B=\text{Im}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\nonumber \\ & \quad-\text{Im}\left[A_{\rm c}\left(\omega_{2}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right]\mbox{Re}\left[A_{\rm c}\left(\omega_{1}\right)\tilde{\mathbf{f}}^{\rm r}_{\rm c}\left(\mathbf{r}_{0}\right)\cdot\mathbf{d}\right].\label{eq:b} \end{align} Note that, as can be seen from Eqs.~\eqref{eq:fnut1} and \eqref{eq:fnut2}, only the modal projection along the dipole direction is used to obtain all modal components at all other locations through use of Eqs.~\eqref{eq:felse1} and \eqref{eq:felse2}. It is worth mentioning that the technique presented here is found to be quite robust against the chosen frequency values (within a maximum 5\% discrepancy for metal resonators and 1\% discrepancy for dielectric cavity systems). \red{\subsection{FDTD implementation\label{sec:FDTDimplementation}} As mentioned before, our proposed technique above is quite general in its construction and can be applied, in principle, to any Maxwell solver, both in the time domain and in frequency domain. However, in this work, we will implement our method in FDTD, since it is arguably one of the most popular Maxwell solvers among photonics and plasmonics communities. Indeed, the lack of efficient QNM calculation recipes in real time Maxwell solvers was one of the original motivations behind this work. To explain such motivation and the difficulties behind it in more detail, below we briefly review some of the previous works and attempts in dealing with FDTD\ Green functions and cavity mode calculations in the time domain. Regarding the issue of obtaining the complex-frequency Green function in FDTD, there has been some work for studying Casimir effects \cite{Casimir1,Casimir2}, where a mathematically modified permittivity function is used to map the problem onto a complex frequency space, but it is limited to positive imaginary parts for the frequencies and therefore cannot be adopted to complex frequencies associated with QNMs. In an earlier attempt to extract leaky mode behaviour in FDTD \cite{Yu2014}, a simple dipole-response normalization technique was proposed for leaky photonic crystal cavities, but a normal mode picture was taken; indeed, a real-valued mode function was obtained that is known to lack the correct modal phase information (of an open cavity), and the method was cited to apply to dielectric structures only, for reasons that were not explained. The phase of the QNM is a necessity, e.g., for obtaining the correct Purcell factor as a function of position, particularly in plasmonics where very low quality factors are involved. A single dipole appoach with FDTD, with proper time windowing, can return the QNM, but, to allow a proper time windowing of the scattered field, this is usually restricted to dielectric cavities \cite{Kristensen2012} and is again is not in normalized form. There are other good reasons for why implementing a dipole-response normalization of the QNMs in FDTD is so challenging. For example, a well known problem with using FDTD and other self-consistent Maxwell solvers, stems from the in-phase field component of finite-size dipoles, causing unwanted frequency shifts and a grid-size dependence to the real part of the Green function with equal space arguments, namely ${\bf G}({\bf r}_0,{\bf r}_0)$, a problem that also occurs with self-consistent local oscillators in FDTD, e.g., through the optical Bloch equations \cite{Ellen2017}. The Green function in FDTD can be directly obtained by using a point dipole source, defined through \begin{equation} \boldsymbol{\nabla}\times\boldsymbol{\nabla}\times{\mathbf{G}}\left(\mathbf{r},\mathbf{r}^{\prime};\omega\right)-k_0^2\varepsilon\left(\mathbf{r},\omega\right)\,{\mathbf{G}}\left(\mathbf{r},\mathbf{r}^{\prime};\omega\right)=k_0^2\mathbf{I}\delta(\mathbf{r}-\mathbf{r}^{\prime}), \end{equation} where $k_0^2=\omega^2/c^2$, $\varepsilon({\bf r},\omega)$ is the complex dielectric constant, and we assume non-magnetic materials. For some applications, one can remove the grid-size dependence of FDTD dipoles, by subtracting off the solution from a homogeneous medium with the same computational gridding, so that the scattered Green function for an inhomogeneous medium is ${\bf G}^{\rm scatt}_{\rm FDTD}({\bf r}_0,{\bf r}_0)= {\bf G}^{\rm tot}_{\rm FDTD}({\bf r}_0,{\bf r}_0)-{\bf G}_{\rm FDTD}^{\rm hom}({\bf r}_0,{\bf r}_0)$. However, for the purpose of obtaining the transverse QNMs, particularly in the context of plasmonic resonators, the real part of the scattered Green function is not reliable, because the dipole response is contaminated by the influence of longitudinal modes.} Before assessing the accuracy of this FDTD dipole technique for obtaining normalized rQNMs (and QNMs), we make a few remarks: (i) our normalization technique is quite easy to use with any FDTD method, as it simply involves using the set of analytical equations given by \eqref{eq:fnut1} to \eqref{eq:b}; moreover, the method is practically instantaneous in time once the FDTD dipole simulation is finished; (ii) because the normalization technique requires no spatial information of the mode, from a practical perspective, the computational domain termination using PML can be done as close as possible to the scattering geometry before it alters the modal shape and eigenfrequency, resulting in significantly increased efficiency and less memory/run-time requirements. \section{Applications to various cavity systems in nanophotonics and nanoplasmonics \label{sec:Results}} To demonstrate the reliability and capability of our normalization technique, below we consider five different cavity systems, including two hybrid cavity-waveguide designs and a cavity-coupled photonic crystal waveguide. For all calculations, we use Lumerical FDTD \cite{lumerical} and a single mode performance over the frequency region of interest is assumed (and confirmed). \subsection{Gold cuboids and dimers \label{subsec:metals}} First, we study a cuboid gold nanorod with dimensions of $30\times100\times30\,{\rm nm}^{3}$ placed in a homogeneous background with refractive index of $n_B=1.5$. This acts as a single mode resonator over a wide range of frequencies of more than $400\,{\rm meV}$, as shown in Fig.~\ref{fig:Comparison-qnm}. For metallic regions, the dielectric function can be described using the local Drude model, \begin{equation} \varepsilon_{{\rm metal}}\left(\mathbf{r},\omega\right)=1-\frac{\omega_{p}^{2}}{\omega\left(\omega+i\gamma_{p}\right)}, \end{equation} where we use $\hbar\omega_{p}=8.29\,{\rm eV}$ and $\hbar\gamma_{p}=0.09\,{\rm eV}$ for the plasmon frequency and collision rate of gold \cite{Ge2014}, respectively. For the second example structure, two of the same nanorods are used to form a dimer of gap spacing $h_{\rm g}=20\,{\rm nm}$. This forms a plasmonic hot spot in the gap, but still behaves in a single mode manner over a similar range of frequencies as the single nanorod. \begin{figure} \begin{center} \includegraphics[width=.99\columnwidth]{fig_cuboids.pdf} \caption{(a-b) Computed rQNM spatial profile, $|\tilde{\mathbf{f}}^{\rm r}_{{\rm c}}|$ ($y$-component), for single and dimer cuboids, respectively. (c-d) Comparison between our dipole-normalized rQNM calculation of the generalized Purcell factor, $F_{\rm P}$, against fully vectorial calculations of Maxwell's equations. The dipole is located at 10 nm away from the surface along the nanorod axis for the single cuboid, and at the gap center for the dimer design. (e-f) Comparison of the rQNM technique in reproducing the position-dependent $F_{\rm P}$, again with full dipole calculations in circles.\label{fig:Comparison-qnm}} \end{center} \end{figure} As an important application of the mode technique, we study the spontaneous emission enhancement factor for dipole emitters when placed nearby the resonant cavity structures of interest. Considering a quantum dipole emitter polarized along $\mathbf{n}$, placed at position $\mathbf{r}$, the generalized Purcell factor can be calculated using \cite{Anger2006} \begin{equation} F_{{\rm P}}({\bf r};\omega)=1+\frac{6\pi c^{3}}{\omega^{3}n_{B}}\,\mathbf{n}\cdot{\rm Im}\{\mathbf{G}\left(\mathbf{r},\mathbf{r};\omega\right)\}\cdot\mathbf{n}. \end{equation} For convenience of studying positions outside of metals (or outside the scattering geometry in general), we have added the extra factor of 1, which is derived from a Dyson equation scattering problem for dipole positions outside the resonator \cite{Ge2014njp}; otherwise the Purcell factor should be defined without the extra factor of unity (e.g., for dipoles embedded within photonic crystal slabs). For the two nanoresonator systems above, we use a computational domain of $300\times500\times300\,\,{\rm nm}^{3}$ with a fine mesh of approximately $2\,{\rm nm}$ in every direction, terminated by PML in all directions. The complex resonance frequencies are found to be $\hbar\tilde{\omega}_{\rm c}=1.46 - 0.09i\,{\rm eV}$ and $\hbar\tilde{\omega}_{\rm c}=1.29 - 0.11i\,{\rm eV}$, respectively. The corresponding mode volumes at the dipole location \cite{Kristensen2012}, \begin{equation} {\rm V_{eff}} = \frac{1}{{\rm Re}\{\varepsilon\left(\mathbf{r}_0\right)\tilde{\mathbf{f}}_{\rm c}^2\left(\mathbf{r}_0\right)\}}, \end{equation} are also estimated to be ${\rm V_{eff}}/\lambda^3=8.5\times10^{-4}$ and ${\rm V_{eff}}/\lambda^3=1.6\times10^{-4}$. As consequence of the integration-free nature of this technique, with the small computational domain chosen, the entire simulation completes in approximately 30 minutes on a standard desktop with 8 cores, even without spatial sub-meshing. It is of course useful to discuss how this approach compares with other QNM calculation techniques for general shaped cavity structures. First, in comparison to a previously developed FDTD technique~\cite{Ge2014}, which uses a plane-wave excitation with time filtering with the same sub-meshing: this simulation (for the same metal cavity) takes days to weeks to run as a much larger simulation volume is required to carry out the spatial normalization procedure of the QNM. However, some additional time savings can be made by implemented PML normalization~\cite{Sauvan2013} with FDTD~\cite{Kristensen2015}, but this requires one to use the PML data (often not available)\ and a volume integral with the electric and magnetic fields (which requires additional care for field points inside the resonator). Having implemented all three approaches in FDTD, we find that our newly presented dipole normalization method is easily the most efficient to work with, and the most powerful (e.g., it can also do periodic background media as we demonstrate later). With regards to the frequency-domain dipole approach using complex frequencies in COMSOL~\cite{Bai2013}, we have found that for a complete analysis, this approach takes about the same computational time as the proposed dipole FDTD method, but only for the smaller spatial domains, such as with the nanoresonator devices. However, in our experience, larger hybrid devices run into extreme memory requirements when using finite-element solvers (e.g. with COMSOL). Both approaches have their strengths an weaknesses though, and the COMSOl approach is better for solving multiple overlapping modes (given sufficient computational resources). For the metal resonator calculations here, we implemented a numerical dipole source, located $10\,{\rm nm}$ away from the metallic surface along the $z$-axis in the case of single cuboid, and at the center of the gap in the case of the cuboid dimer. One can use the same spatial dipole position to perform both full numerical Purcell factor calculations as well as the rQNM calculation, all within the same one-time simulation, but for different dipole positions, we stress that there is no need to recalculate the rQNM. In Fig.~\eqref{fig:Comparison-qnm}, we plot the computed mode profile of the single rQNM of interest for each case along with the rQNM-calculated Purcell factor (which is analytic, after obtaining the mode numerically of course)\ in dashed-red that compares very well with full dipole calculations using Eq.~\eqref{eq:GFnumeric} in solid-blue (the accuracy is within a few \%). To more rigorously confirm the reliability of our rQNM technique, we next perform position-dependent Purcell factor studies for both of the structures discussed above. In Fig.~\ref{fig:Comparison-qnm}, each circle shows an independent dipole calculation (e.g., with no approximations) done at a particular position, while the solid line is calculated using the same rQNM calculated before (which only has to be computed once). In both cases we move away along the $x$-direction up to $40\,{\rm nm,}$ where an excellent agreement between our semi-analytical results and the full numerical results is achieved in all cases. In particular, note that the Purcell factor behavior before reaching $x=10\,{\rm nm}$ is qualitatively different for the single cuboid and the dimer resonator, and clearly the rQNM calculation accurately captures both trends. Such a good level of agreement can be in principle obtained at every location around the resonator for which the rQNM expansion remains valid. At distances far from the resonator, as discussed below in subsection \ref{subsec:reg}, our integration-free rQNMs also recovers the correct physical behavior, and thus we speculate that this rQNM picture can be used in both near and far fields from the resonator, with practically no distinction to the QNM in the near field---where the rQNM and QNM are identical. \subsection{Implicit far-field regularization: regularized QNMs vs divergent QNMs \label{subsec:reg}} In the above, we have shown how the rQNMs are practically identical to the QNMs in the near field (and certainly within the resonator), which is a consequence of the single mode approximation working very well. Unfortunately, in the far field, the single mode approximation of a cavity mode must fail. Although it may seem like an academic question, it is important to have physically meaningful fields at these far field locations as well, e.g., to compute the field that would be detected (e.g., by a detector)\ from the resonators in quantum optics \cite{Ge2015prb}. In this section, we demonstrate the ``regularized'' nature of our rQNMs when going to the far-field space region. \begin{figure} \begin{center} \includegraphics[width=.99\columnwidth]{fig_divg_qnm.pdf} \vspace{.1cm} \includegraphics[width=.99\columnwidth]{fig_divg} \caption{\red{Near-field and far-field behavior of the integration-free rQNM versus QNM for the cuboid gold dimer (note the latter is calculated using a completely different FDTD technique~\cite{Ge2014}). (a-b) Extended 2D map of the $|{\rm Re}(\tilde{\mathbf{f}}^{\rm r}_{\rm c}(\mathbf{r}))|$ and $|{\rm Re}(\tilde{\mathbf{f}}_{\rm c}(\mathbf{r}))|$, respectively. Each colormap is individually normalized to one and the same nonlinear scaling is used to better show the differences. (c-d) Comparison of the corresponding Purcell factors, calculated in the near-field region and in the far-field region, respectively. The inset in (c) shows the relative difference between these two independent calculations. (e) Purcell factor calculations based on the Dyson equation treatment of $\mathbf{F}_{\rm c}(\mathbf{r})$ using Eq.\,\eqref{eq:bigF} in real frequency space, and $\tilde{\mathbf{f}}_{\rm c}(\mathbf{r})$ using Eq.\,\eqref{eq:bigFcmplx} in complex frequency space. In all of these plots, $x=0$ represents the origin placed at the dimer gap center.}\label{fig:divg}} \end{center} \end{figure} As mentioned before, the system QNMs are solutions to a non-Hermitian Maxwell problems with open boundary conditions and are associated with complex resonant frequencies or complex wavevectors. \red{The negative imaginary part for the complex frequency, that describes the energy decay in time domain, leads to an exponential growth of the QNMs in space through $e^{(\gamma_c n_B/c) x}$, as one gets far enough away from the resonator. As a general rule of thumb, the divergence behavior of the QNM is become significant around $x_{\rm divg}$ such that $(\gamma_c n_B/c)x_{\rm divg}\approx 1$. For example, using the imaginary part of the complex frequency for the cuboid dimer design, where $\gamma_c \approx 0.11~$eV, $x_{\rm divg}=1-2\,{\rm \mu m}$ is estimated using this simple argument, which agrees with what will be discussed shortly in Fig.\,\ref{fig:divg}.} This known feature has been one of the main challenges in normalizing QNMs, and have raised questions as to whether these modes can be used to properly describe certain aspects of experiments in the far-field and with input-output formalisms. As highlighted earlier, a Dyson equation approach can be used to regularize the divergent QNM in the far-field through use of Eq.\,\eqref{eq:bigF} in real frequency space. But this approach also requires an additional spatial integration step and is rather complicated for metal structures to implement. However, the computed rQNM, $\mathbf{f}^{\rm r}_{\rm c}(\mathbf{r})$, is obtained in real frequency space and is thus already regularized. To demonstrate this regularization behavior, we next investigate the positional dependence of the generalized Purcell factor for dipole emitters coupled to the cuboid dimer structure, both in the near field and far field regimes. \red{We first show extended 2D maps ($10\,{\rm \mu m}$ along $x$-axis) of the rQNM and QNM spatial modes (as calculated in Ref.~\cite{Ge2014}), respectively in Fig.~~\ref{fig:divg}(a-b). A nonlinear color scaling is used to enhance the differences between the two approches. In particular, in the far-field the QNM diverges where as the rQNM does not, because our real-frequency QNM calculation technique captures the proper (sum over modes)\ propagation effects to the far-field. To better highlight these differences, we plot the Purcell factor at various positions using both rQNM and QNM, also in Fig.~\ref{fig:divg}.} In Fig.~\ref{fig:divg}(c), for positions close to the resonator, our rQNM Purcelll factor gives an excellent agreement with the QNM as calculated based on the recipe given in Ref.~\onlinecite{Ge2014}. However, in the far-field region, as shown in Fig.~\ref{fig:divg}(d), the rQNM behaves in a converged manner in comparison to the QNM. In particular, it follows the prediction of the post-calculated regularized QNM using the Dyson integral of Eq.\,\eqref{eq:bigF}, that is shown in Fig.~\ref{fig:divg}(e). For completeness however, if one needs to obtain the true divergent behavior of the system QNM in the far-field using our integration free approach, one can easily use the complex-frequency Dyson treatment of Eq.\,\eqref{eq:bigFcmplx}; since, to a very good approximation, our rQNM is equivalent to the system QNM inside (and near) the resonator, as clearly demonstrated in in Fig.~\ref{fig:divg}(e). Given the small value of the Purcell factor in the far-field (note we are zooming in from 1000 to 1), the minor discrepancies between (d) and (e) are attributed to small numerical errors (from the spatial integration primarily), and are not a general concern. Thus, these rQNM can be practically used at all spatial positions, without any spatial integration at all. If one desires the rQNM outside the simulation volume domain, then one can easily obtain either the QNM or the rQNM using the Dyson equation as shown above. Thus there is no need to simulate large regions of homogeneous space outside the scattering geometry, and for continuous waveguide one can also safely use PML to limit the space- and run-time requirements. \subsection{Hybrid metal-dielectric systems \label{subsec:hybrids}} To further emphasize the generality of our technique, and show its applicability for use in more complex emerging devices in hybrid plasmonics, we next study a set of two hybrid devices where the plasmonic single cuboid resonator is either embedded in a ridge waveguide or is placed inside a groove waveguide, such that the short-range confined mode of the cuboid is coupled to the long-range propagating mode of the waveguide. The dielectric beam waveguide is made of silicon-nitride, with a refractive index of $n_{{\rm diel}}=2.04$ and dimensions of $600\times800\times6000\,\,{\rm nm}^{3}$. One motivation behind such devices is to design transmission drop lines, but here, for consistency with our other investigations, we focus on the far-field collection efficiency of dipole emitters coupled to the plasmonic sub-system, that can be also of interest in the design of integrated broadband single photon sources; for example, one could excite embedded quantum dots incoherently, and monitor the output scattered field of a single exciton state. For both of these cases, a computational domain of $10\times5\times5\,\,{\rm \mu m}^{3}$ is used to ensure a sufficiently long waveguide terminated by PML in all directions. Similar to before, a fine mesh of approximately $2\,{\rm nm}$ was used over the metallic region, that was then refined into the courser mesh of $40\,{\rm nm}$ everywhere else, using the non-uniform meshing technology in Lumerical FDTD~\cite{lumerical}. In Fig.\,\ref{fig:hybrid-pf}(a) and Fig.\,\ref{fig:hybrid-pf-2}(a), we plot the generalized Purcell factor, $F_{\rm P}$, of a dipole emitter placed $10\,{\rm nm}$ away from the metallic surface (see also Fig.\,\ref{fig:schematic}). The complex resonance frequencies extracted are $\hbar\tilde{\omega}_{\rm c}=1.08 -0.07i\,{\rm eV}$ and $\hbar\tilde{\omega}_{\rm c}=1.26 - 0.08i\,{\rm eV}$, respectively. The corresponding mode volumes are also estimated to be ${\rm V_{eff}}/\lambda^3=6.5\times10^{-4}$ and ${\rm V_{eff}}/\lambda^3=6.3\times10^{-4}$. Both full-dipole calculations (in solid-blue) and rQNM calculations in (dashed-red) are shown, once again with a good agreement. In comparison to isolated resonators, there is a small discrepancy between the rQNM and full dipole calculations at frequencies very far from the resonance, which is likely attributed to the non-negligible influence from dielectric wall/surface scattering effects (possibly yielding small background modes at other frequencies) and the fact that now the single resonator interacts with a propagating mode of the waveguide. Similar to before, a single mode performance is still achieved, but the resonance is red-shifted and sits lower in terms of maximum emission enhancement, due to the lower index mismatch provided by the waveguide. \begin{figure} \begin{center} \includegraphics[width=.99\columnwidth]{fig_hybrid_power} \vspace{.2cm} \includegraphics[width=.99\columnwidth]{fig_hybrid_qnm.pdf} \caption{(a) Comparison between our dipole-normalized rQNM calculation of the generalized Purcell factor, $F_{\rm P}$, against fully vectorial calculations of Maxwell's equations, for the gold single cuboid coupled to the ridge waveguide. The dipole emitter is placed at 10 nm away from the nanorod surface along the $y$ axis. (b) Radiative beta factors: the $\beta^{\rm rad}_{\rm tot}$ that quantifies the entire far-field radiation as well as the $\beta^{\rm rad}_{\rm wg}$ that quantifies the far-field radiation confined within the waveguide. (c) An $xy$ cut of the calculated rQNM spatial profile at $z=0$ and (d-f) show three different $yz$ cuts as labeled, to show the technique ability in capturing modal details. \red{Each colormap is individually normalized to one and a nonlinear scaling for improved visualization is used in (c)}.\label{fig:hybrid-pf}} \end{center} \end{figure} \begin{figure}[t!] \begin{center} \includegraphics[width=.99\columnwidth]{fig_slot_power} \vspace{.2cm} \includegraphics[width=.99\columnwidth]{fig_slot_qnm.pdf} \caption{Panels represent the same quantities plotted in Fig.\,\ref{fig:hybrid-pf} but for the single nanorod placed in the groove waveguide.\label{fig:hybrid-pf-2}} \end{center} \end{figure} With plasmonics, one always has some optical quenching of the mode, and it is also important to know how much of the radiative emission of a quantum emitter can couple to the target waveguide mode in the two different configurations mentioned above. This can be quantified for the radiation emitted into the waveguide, $\Gamma_{\rm wg}^{\rm rad}$, using the waveguide radiative ``beta factor'' \begin{equation} \beta_{\rm wg}^{\rm rad} = \frac{\Gamma_{\rm wg}^{\rm rad}}{\Gamma_{\rm P}}, \end{equation} and for the total radiation available in the entire $4\pi$ far-field space (away from the resonator), $\Gamma_{\rm tot}^{\rm rad}$, using \begin{equation} \beta_{\rm tot}^{\rm rad} = \frac{\Gamma_{\rm tot}^{\rm rad}}{\Gamma_{\rm P}}, \end{equation} where $\Gamma_{\rm P}=F_{\rm P}\Gamma_{\rm 0}$, and $\Gamma_0$ the spontaneous emission rate in a homogeneous medium (free space or the dielectric). Thus the total nonradiative coupling is simply \begin{equation} \beta^{\rm nrad} = 1- \beta_{\rm tot}^{\rm rad}. \end{equation} The radiative beta factors are shown in Fig.\,\ref{fig:hybrid-pf}(b) and Fig.\,\ref{fig:hybrid-pf-2}(b), where the solid-blue shows the total radiation available in the far-field, and the dashed-red shows only its portion transmitted through the waveguide interface. This factor also gives the quantum efficiency of a dipole emitter. It is seen that, depending on the waveguide design, the far-field emission can be quite different. In particular, the total far-field radiation from the dipole for the groove waveguide is higher than in the ridge waveguide over its frequency band, mainly because the nanoparticle is not embedded in the dielectric region. However, the dipole emission within the waveguide is considerably less for the groove design, again because the nanoparticle is not embedded in the dielectric. Moreover, the fact that close to 40\% of dipole emission can be detected at the end of the ridge waveguide, offers some benefits in comparison to all-metallic plasmonic waveguides (which introduced additional waveguide losses), in applications where signal strength (brightness) from single emitters is more critical. To better see the mode pattern in the waveguide, in Fig.~\ref{fig:hybrid-pf} and Fig.~\ref{fig:hybrid-pf-2}, we have plotted four different surface slices of the calculated rQNM. In Figs.~\ref{fig:hybrid-pf}-\ref{fig:hybrid-pf-2} (c), we show an $xy$-cut at the beam center such that the top view of the whole system is shown. This shows a clear pattern of the complex rQNM that has features from both the plasmonic resonator and the nanobeam waveguide. In Figs.~\ref{fig:hybrid-pf}-\ref{fig:hybrid-pf-2} (d), an $yz$-cut at the center of the plasmonic cuboid where the dominant plasmonic behavior is shown. Finally, in Figs.~\ref{fig:hybrid-pf}-\ref{fig:hybrid-pf-2} (e-f) two other $yz$-cuts at distant locations from the single cuboid are shown, where the transition form the localized plasmonic mode to the propagating waveguide mode is y observed. \subsection{Photonic crystal slab coupled cavity-waveguide \label{subsec:PC}} For our final example, we apply our technique to a class of devices in photonic crystal platforms, namely cavities coupled to periodic waveguides, that are used for applications such as single photon sources and channel drop filters. This not only demonstrates the reliability of our technique for use in dielectric systems with large quality factors, but also tackles the very difficult problem of normalizing QNMs for the localized cavities that are subjected to the Bloch periodic propagation of the waveguide, as the dominant outgoing channel \cite{KristensenOL2014,Malhotra2016}; in this regime, there are additional complexities and difficulties encountered to regularize an infinite spatial integration \cite{KristensenOL2014,Malhotra2016}. \begin{figure}[ht] \begin{center} \includegraphics[width=.99\columnwidth]{fig_phcs_pf} \includegraphics[width=.99\columnwidth]{fig_phcs_qnm.pdf} \caption{(a-b) Comparison between our dipole-normalized rQNM calculation of the generalized Purcell factor, $F_{\rm P}$, against full-dipole vectorial calculations of Maxwell's equations, for the isolated L3 cavity and the L3 cavity side-coupled to the waveguide, respectively. The dipole emitter is placed at center of the cavity and polarized along the $y$-axis. (c-d) An $xy$ cut of the calculated rQNM spatial profile at the center of the slab where in (d) the waveguide portion is nonlinearly enhanced for better visualization. \red{ (e) The propagating Bloch mode of a section of the infinite waveguide for comparison (see inside text for details). Each colormap is individually normalized to one.}\label{fig:l3w1}} \end{center} \end{figure} We use a triangular photonic crystal slab of refractive index of $n=3.5$, where the lattice constant is $d=240\,{\rm nm}$, the hole radius is $r=0.28\,d$ and the slab thickness is $h=164\,{\rm nm}$. The structure is $9\times25\,d$ in size, and is finely meshed with 20 points per lattice period. In particular, we consider two devices, the isolated L3 cavity on its own, and the L3 cavity side-coupled to a W1 waveguide. To minimize any relevant numerical discrepancies, the L3 cavity is placed to the side such that exactly the same structure and computational domain is used for both devices; see Fig.\,\ref{fig:l3w1}. Depicted in Figs.\,\ref{fig:l3w1}(a)-(b), as for the other cavity structures, we first confirm a very good agreement between the QNM-calculated Purcell factor and the fully vectorial dipole calculations; here we consider a dipole emitter placed inside the L3 cavity, at the antinode and aligned along the $y$-axis, according to the coordinate system shown in the schematic of Fig.\,\ref{fig:schematic}. As seen, introducing the waveguide reduces the peak enhancement by close to a factor of 2. The resonance frequencies (real part) are computed to be $\hbar{\omega}_{\rm c}^{\rm L3}=1.3052\,{\rm eV}$ and $\hbar{\omega}_{\rm c}^{\rm L3W1}=1.3049\,{\rm eV}$, with the corresponding quality factors of $Q^{\rm L3}=5,200$ and $Q^{\rm L3W1}=3,300$. The associated mode-volumes, calculated at the modal antinode at the center of the L3 cavity are also ${\rm V_{eff}^{L3}}/\lambda^3=0.0142$ and ${\rm V_{eff}^{L3W1}}/\lambda^3=0.0145$, which are found to be very similar for this particular structure (as is often assumed in the community without proof, but in general this may not be the case, especially for low-$Q$ cavities). In Figs.~\ref{fig:l3w1}(c) and \ref{fig:l3w1}(d), we display the rQNM spatial profile as calculated for both photonic crystal devices, where the in-waveguide section for the coupled device is enhanced for visualization. These two represent $xy$ cuts at the center of the slab. It is evident that the rQNM inside the waveguide behaves different than the waveguide Bloch mode and somewhat inherits the shape of the L3 mode, with repetitions occurring due to the phase dependence of the cavity QNM~\cite{Kristensen:17}. Therefore, the naive assumption that simply the system behavior inside the waveguide follows the usual W1 propagation, may not be taken. In addition, note that the details of the transition for the system mode to go from a localized mode within the cavity to propagating within the waveguide, that is nontrivial, is also well captured by the calculated rQNM. \section{Conclusions\label{sec:Conclusions}} In summary, we have introduced a new normalization technique for obtaining regularized QNMs of leaky optical cavities and plasmonic resonators, and implemented it with the widely used FDTD algorithm in real frequency space. Our technique requires no spatial integration for post processing normalization of the QNMs, but rather a set of easy-to-use analytical equations are provided that only require the self-consistent response to a dipole excitation at two different frequencies, essentially exploiting an inverse Green function approach. We find this technique to be extremely efficient on both computational memory and run time requirements, and easy to use. We exemplified this dipole normalization technique for several different arbitrarily-shaped plasmonic resonators, dielectric photonic crystal slabs, and hybrid devices in order to show its generality and applicability to a wide range of nanophotonic systems. In particular, the spontaneous emission enhancement factor was studied for quantum emitters placed nearby these systems, where a very good agreement (within a few~\% at the desired frequency range) between our rQNM calculation and fully numerical solutions of Maxwell's equations were obtained. Moreover, this new technique requires no further regularization of the rQNM in the far-field, as it readily returns the non-divergent system response at distances far away from the resonator. Since the method is easy to implement in commonly used FDTD solvers such as those available from Lumerical solutions \cite{lumerical} and MEEP \cite{meep}, it is an attractive tool for the community seeking true ``cavity modes'' for a wide range of complex structures. \section*{Acknowledgments} We thank Queen\textquoteright s University and the Natural Sciences and Engineering Research Council of Canada for financial support. We also thank Lumerical Solutions Inc. for support, and Philip Kristensen and Simon Axelrod for excellent suggestions and discussions. \bibliographystyle{apsrev4-1}
\section{Introduction} \subsection{Relative functoriality and ``beyond endoscopy''} Let $G$ be a reductive group over a global field $k$, that is: a number field, or the function field of a curve over a finite field. We will be denoting the ring of adeles of $k$ by ${\mathbb{A}_k}$, and the automorphic quotient space $G(k)\backslash G({\mathbb{A}_k})$ by $[G]$. The Langlands program is about \emph{automorphic representations}: those are, essentially, the irreducible representations that appear in the Plancherel decomposition of $L^2([G])$, considered as a $G({\mathbb{A}_k})$-representation. There are two main conjectures in the Langlands program: One of them, \emph{reciprocity}, aims to attach automorphic representations to representations of the Galois group of $k$ and, more generally, to motives over $k$ --- and vice versa, for certain automorphic representations that are considered ``algebraic'' \cite{BG}. More precisely, the Galois representations should have image in the $L$-group ${^LG}$ of $G$. The other main conjecture, \emph{functoriality}, aims to relate automorphic representations of two different groups $G_1$ and $G_2$ for every homomorphism ${^LG}_1\to {^LG}_2$ of $L$-groups. This paper is related to the latter conjecture. It has become clear through the decades and, especially, through the work of Arthur \cite{Arthur-unipotent}, that the ``automorphic spectrum'' of a group $G$ is not a very convenient object to study. Instead, it is preferable to study the automorphic spectrum of its trace formulas, and more precisely the individual summands of the trace formulas obtained through the process known as pre-stabilization. For example, the project of \emph{endoscopy} involved a comparison the various endoscopic summands of the twisted trace formula of $\operatorname{GL}_n$, on one hand, and the stable trace formula of classical groups, on the other --- leading to a resolution of the functoriality conjecture for $G_1=$ a classical group, and ${^LG}_1\to {^LG}_2 =\operatorname{GL}_N$ the standard representation of its $L$-group \cite{Arthur, Mok, KMSW}. It has also become clear through the work of Jacquet, D.\ Prasad and others that the functoriality conjecture is not restricted to reductive groups, but to a more general class of $G$-spaces called \emph{spherical varieties}. This class includes symmetric spaces, and any reductive group $H$ can be viewed as a symmetric space under the action of $G=H\times H$ by left and right multiplication. Those varieties should have $L$-groups (although, for now, only their connected components have been defined in satisfactory generality, \cite{KnSch}), and any morphism ${^LX}_1 \to {^LX}_2$ between the $L$-groups of two varieties should give rise to relations between their \emph{automorphic spectra} \cite{SV}. Here, again, the natural setting to define automorphic spectra is that of a generalization of the trace formula, namely the \emph{relative trace formula} of Jacquet. In modern language, the relative trace formula is a distribution on the adelic points of a quotient stack $\mathfrak{X} = [(X\times X')/G^{\operatorname{diag}}]$ \cite{SaStacks}, where $X, X'$ are two spherical varieties (possibly the same) for the same group $G$, together with two ways to write this distribution, one ``geometric'' and one ``spectral''. The content of the spectral side is, by definition, the ``automorphic spectrum'' of the pair $(X,X')$ (or of the space $X$, if $X'=X$). The usual trace formula is obtained by setting $X=X'=H$ and $G=H\times H$, in which case $\mathfrak{X} = \frac{H}{H}$, where we use the fraction notation to denote the quotient of the numerator under the action of the denominator by conjugation. There are cases where such a functorial transfer is easy to establish. Take, for example, $X_1$ to be the space $\mathbb{G}_m\backslash \operatorname{PGL}_2$ and let $X_2$ stand for the Whittaker model of $\operatorname{PGL}_2$. (This is the space $N\backslash \operatorname{PGL}_2$, where $N\simeq \mathbb{G}_a$ is a unipotent subgroup, endowed with a non-trivial adele class character $\psi$ of $N$; such cases can be included into the above general setting.) The dual group is $\operatorname{SL}_2$ for both $X_1$ and $X_2$, so we expect a local and global ``functorial transfer'' between them, that should match the spectral sides of their Plancherel and relative trace formulas. In this case, Hecke's ``unfolding'' method shows that, globally, the $\mathbb{G}_m$-period of a cusp form $\varphi$ can be related to the Whittaker/Fourier period, as follows: $$ \int_{[\mathbb{G}_m]} \varphi\left(\begin{pmatrix} a \\ & 1 \end{pmatrix}\right) |a|^s da = \int_{\mathbb A_k^\times} \int_{[N]} \varphi\left(\begin{pmatrix} a \\ & 1 \end{pmatrix} n\right) \psi(n) dn |a|^s da.$$ If desired, this can be interpreted in terms of the spectral sides of the associated relative trace formulas. Over a local field $F$, it was observed in \cite[\S 9.5]{SV} that Hecke's method gives rise to an equivariant isometry: \begin{equation}\label{unfoldingL2} L^2(\mathbb{G}_m \backslash \operatorname{PGL}_2(F)) \xrightarrow{\sim} L^2 (N\backslash \operatorname{PGL}_2(F), \psi). \end{equation} Thus, the local and global spectra of the spaces $X_1$ and $X_2$ match. The problem is that such simple-minded methods (and others, less simple-minded, such as the theta correspondence), which produce spectral identities and period identities at the level of the spaces under consideration, while very powerful for a class of examples, can only cover a tiny portion of the conjectural cases of functoriality. Clearly, something much broader and deeper is waiting to be discovered. The impending completion of the endoscopy program led Langlands to formulate a strategy for proceeding further towards the functoriality conjecture; this strategy bears the name ``beyond endoscopy'' \cite{Langlands-BE}. The basic goal of this program is to construct a comparison between the \emph{stable trace formulas} of two reductive groups $G_1, G_2$ for any morphism ${^LG}_1\to {^LG}_2$ between their $L$-groups. Unfortunately, many aspects of such a comparison remain unclear, and even the simplest instances of its implementation, in the setting of the trace formula as envisioned by Langlands, are technically very demanding. Locally, for example, such a morphism of $L$-groups should induce a map \begin{equation}\label{Tgroups} \mathcal T: \mathcal S(\frac{G_2}{G_2}) \to \mathcal S(\frac{G_1}{G_1}) \end{equation} between spaces of stable orbital integrals (the notation will be explained below), whose adjoint will induce the map of (tempered) stable characters envisioned by functoriality. I believe that understanding the nature of this local comparison is key for the ``beyond endoscopy'' program, and will also shed light on the global comparison of stable trace formulas. Indeed, while in the case of endoscopy there was a natural matching between (stable) conjugacy classes, leading to the conjecture that orbital integrals for the two groups should match up to (explicit) transfer factors, such a matching is missing in the case of ``beyond endoscopy'', and therefore the comparison will rely on understanding the \emph{transfer operators} $\mathcal T$ of \eqref{Tgroups}. There have been efforts to reverse-engineer these operators, in specific cases, from known character formulas \cite{Langlands-ST, Johnstone}, and these may eventually shed some light on the question. At this point, it is not clear how the formulas of Langlands (going back to Gelfand and Graev) and Johnstone could be used to obtain a global comparison of trace formulas. If one is willing to look at the more general problem of ``relative'' functoriality, there are a lot more, and easier, examples of comparisons where these transfer operators can be studied. For example, two spherical varieties $X_1$ and $X_2$ (one of which could be a group) could have the same $L$-group: $$ {^LX}_1 \xrightarrow\sim {^LX}_2,$$ as we saw above in the example of $X_1 = \mathbb{G}_m\backslash \operatorname{PGL}_2$ and $X_2= (N,\psi)\backslash \operatorname{PGL}_2$. While, in general, there will not be a simple-minded way such as \eqref{unfoldingL2} to directly compare the spectra of the two spaces, there may be a way to perform such a comparison at the level of relative trace formulas. Establishing the corresponding functorial transfer between the local and global spectra of two spaces with ${^LX}_1\simeq {^LX}_2$ can be a highly non-trivial problem that, if solved in generality, will on one hand provide significant insights into the ``beyond endoscopy'' program and, on the other, lead to important relations between periods of periods automorphic forms and special values of $L$-functions, such as the global Gan--Gross--Prasad conjectures \cite{II}. \vspace{6pt} The goal of this paper is to demonstrate the nature of these transfer operators in several examples, mostly in the setting when ${^LX}_1 = {^LX}_2$. \vspace{6pt} Incidentally, although not working with trace formulas, the identity map between $L$-groups features in the work of L.\ Lafforgue on automorphic kernels \cite{Lafforgue}, where local kernels are described for a ``model transition'' from the Whittaker model $X_1=(N,\psi)\backslash \operatorname{GL}_n$ (where $N\subset \operatorname{GL}_n$ is a maximal unipotent subgroup, and $\psi$ a non-degenerate characters) to the group $X_2=H=\operatorname{GL}_n$. Generalizing the formalism of converse theorems, Lafforgue explains that the automorphicity of the global kernel relies on functional equations for certain $L$-functions. This approach seems unorthodox from Langlands' point of view: properties of $L$-functions should be consequences, not prerequisites for functoriality. However, as Ng\^o's recent retake on the program of Braverman and Kazhdan shows \cite{Ngo-monoids} (related also to the author's treatment of the Rankin--Selberg method using spherical varieties \cite{SaRS}), the functional equation of $L$-functions is not necessarily very far from the philosophy of trace formulas and ``beyond endoscopy''. Indeed, one can attempt to recast the functional equation as a Poisson summation formula for a conjectural Fourier transform between ``Schwartz spaces'' for dual reductive monoids (or more general spherical varieties) --- generalizing Tate's thesis \cite{Tate-thesis} and the work of Godement and Jacquet \cite{GJ}. Moreover, instead of studying the Fourier transform between these Schwartz spaces, one can study its descent (the ``Hankel transform'') to their spaces of orbital integrals \cite{Ngo-Hankel}. The Poisson summation formula, then, becomes another instance of a non-endoscopic comparison between trace formulas. Such a derivation of the functional equation using a relative trace formula has already appeared in papers of P.E.\ Herman and the author \cite{Herman, SaBE2}. \subsection{Contents of the paper} The goal of the present paper is to examine the possibility of non-standard comparisons of trace formulas which correspond to instances of functoriality or of functional equations of $L$-functions. This results to a collection of examples of local ``transfer operators'' and ``Hankel transforms'' between the spaces of test functions (or, more correctly, measures) of relative trace formulas, mostly in rank one. The important conclusion is that these local transfer operators are given in terms of abelian Fourier transforms and multiplication with innocuous scalar factors that are suitable, in principle, for a global comparison of trace formulas, that will have the form of a Poisson summation formula. I do not discuss this global comparison here; however, the methods employed in \cite{SaBE2} should generalize to all cases discussed here. Another important finding is that these transfer operators behave well under ``degeneration'': that is, when the spherical varieties under consideration are deformed into their ``boundary degenerations'' (such as: $H=\operatorname{SL}_2$ degenerating to the $H\times H$-variety of $2\times 2$-matrices of determinant zero), then the transfer operators degenerate to the corresponding operators for the degenerations (which can be understood using abelian Fourier theory). The examples presented here lead to a more systematic understanding of transfer operators, at least in rank one, that will be the object of an upcoming paper \cite{SaRankone}. I start by explaining the general formalism for these comparisons, in a slightly restricted setup that will be sufficient for the examples considered in this paper. \subsubsection{Schwartz spaces} \label{ssslanguage} Let $\mathfrak{X}$ denote a quotient stack of the form $[(X\times X)/G]$, where $X$ is a smooth spherical $G$-variety, and the $G$-action on the product $X\times X$ is understood to be the diagonal one. We will often use the isomorphism $\mathfrak{X} = [H\backslash G/H]$, when $X$ is a homogeneous space $H\backslash G$. Everything is defined over a local field $F$, keeping in mind that in the end we would like to see integral transforms that satisfy some sort of ``Poisson summation formula'' over a global field. Whenever there is no confusion, we will denote the set $Y(F)$ of $F$-points simply by $Y$, for any variety (or stack) $Y$. The stack $\mathfrak{X}$ (rather, its $F$-points, which can be thought of as a ``Nash stack over $F$'', s.\ \cite{SaStacks}) may come equipped with a complex line bundle; the only example where we will need a non-trivial line bundle is for the quotient $[N\backslash G/N] = [(N\backslash G \times N\backslash G)/G^{\operatorname{diag}}]$, where $N$ is a maximal unipotent subgroup of $G$, and the line bundle is defined by a non-degenerate character $\psi$ of $N$. In those cases, we will be writing $\mathfrak{X} = [(N,\psi)\backslash G/(N,\psi)]$. Let $\mathcal S(X)$ denote the space of Schwartz measures on $X=X(F)$ (or measures valued in the line bundle given). These are smooth measures which decay rapidly, together with their polynomial derivatives, in the Archimedean case, and smooth, compactly supported measures in the non-Archimedean case. In some instances where we will need to work with Schwartz functions, instead of measures, we will denote the space of those by $\mathscr F(X)$. Of course, if $dx$ is a nowhere vanishing smooth measure of polynomial growth (such as a Haar measure), we have $\mathcal S(X) = \mathscr F(X) dx$. Our varieties will always be quasi-affine, and we denote the categorical quotient $(X\times X)\sslash G = F[X\times X]^G$ by $\mathfrak{C}_X$. Thus, we have a push-forward of measures \begin{equation}\label{pushforward} \mathcal S(X\times X) \to \mathcal M(\mathfrak{C}_X),\end{equation} where $\mathcal M$ denotes the space of all measures. When $X$ is endowed with a non-trivial line bundle, we need to make a choice of trivialization in order for the push-forwards to be defined as scalar-valued measures on $\mathfrak{C}_X$. For $N\backslash \operatorname{PGL}_2/N$, with $N$ the subgroup of upper triangular unipotent matrices, the open Bruhat cell is a union of cosets $N\tilde\xi N$, where $$\tilde \xi = \begin{pmatrix} & -1 \\ \xi \end{pmatrix},\,\, \xi\in \mathbb{G}_m,$$ and we trivialize measures which satisfy $\mu(n_1 g n_2) = \psi(n_1)\mu(g) \psi(n_2)$ (over the open Bruhat cell) by ``evaluating'' them at the elements $\tilde\xi$. For $\operatorname{SL}_2$, the corresponding representatives will be $$ \tilde\zeta = \begin{pmatrix} & -\zeta^{-1} \\ \zeta \end{pmatrix},\,\, \zeta\in \mathbb{G}_m,$$ Assume that, at the level of (isomorphism classes of) $F$-points, the map $X(F)\times X(F)\to \mathfrak{X}(F)$ is surjective; this is the case, for example, for $N\backslash G/N$ and for $T\backslash \operatorname{PGL}_2/ T$, when $T$ is a split torus, but not if $T$ is a non-split torus. Under this assumption,\footnote{If the map $X(F)\times X(F)\to \mathfrak{X}(F)$ is not surjective on points, this means that there are non-trivial $G$-torsors $R$ which contribute $F$-points to $\mathfrak{X}$. Then, \eqref{pushforward} should be replaced by $$ \bigoplus_\alpha \mathcal S(X^\alpha\times X^\alpha) \to \mathcal M(\mathfrak{C}_X),$$ with $\alpha$ ranging over all isomorphism classes of $G$-torsors $R^\alpha$, and $X^\alpha:= X\times^G R^\alpha$, a $G^\alpha$-space, where $G^\alpha$ is the inner form ${\operatorname{Aut}}^G(R^\alpha)$. For example, for $X=T\backslash\operatorname{PGL}_2$, $X^\alpha$ includes $X$ as well as the quotient $T\backslash PD^\times$, where $D$ is the quaternion division algebras over $F$, and $PD^\times$ is the quotient of its multiplicative group by the center. For simplicity of exposition, we will ignore such cases in this paper, although the particular case of a non-split torus in $\operatorname{PGL}_2$ has already been studied in \cite{SaBE1,SaBE2}.} the space of measures that we obtain as the image of \eqref{pushforward} will be denoted by $\mathcal S(X\times X/G)$ or $\mathcal S(\mathfrak{X})$, by abuse of notation. (This notation was used in \cite{SaStacks} for the space $\mathcal S(X\times X)_G$ of $G$-coinvariants; in our examples, the push-forwards of measures to $\mathfrak{C}_X$ will correspond to \emph{stable} coinvariants. These are the ``test measures'' for \emph{stable} trace formulas.) We will also need to consider extended Schwartz spaces of measures; those are spaces of smooth measures with specified behavior at a certain ``infinity''. The conditions at infinity will depend on the situation considered, but these conditions will not always appear explicitly in the notation; rather, any such ``non-standard'' space of Schwartz measures will be denoted by exponents $\pm$ (where we will use both signs when we want to indicate different directions ``at infinity''). Thus, for example, to insert certain $L$-functions into the Kuznetsov formula we will be working with certain non-standard spaces of Whittaker measures, denoted $\mathcal S^-((N,\psi)\backslash G)$, which vanish (or are of rapid decay) close to the ``cusp'', but have non-trivial asymptotics close to the ``funnel'', cf.\ \S \ref{ssnonstandard}. (If we think of $N\backslash \operatorname{PGL}_2$ or $N\backslash \operatorname{SL}_2$ as a cone, resp.\ affine plane, without the origin, the ``cusp'' is then the origin, and the ``funnel'' is the other direction towards infinity.) Similarly, the theory of asymptotics of (generalized) matrix coefficients on spherical varieties gives rise to functions (or measures) on horospherical spaces that have non-trivial asymptotics ``close to the cusp'', and those will be denoted by the exponent $+$, e.g., $$\mathcal S((N,\psi)\backslash G) \to \mathcal S^+(N\backslash G).$$ Correspondingly, the push-forwards of such measures to the categorical quotient $\mathfrak{C}_X$ (where $X$ is the space under consideration) will be denoted by $\mathcal S^\pm (\mathfrak{X})$. For specific choices of these extended Schwartz spaces that will concern us in this paper, see \S \ref{ssnonstandard}. \subsubsection{The relative trace formula} This paper is concerned with \emph{local} comparisons (``transfer operators'') between spaces of Schwartz measures, but these comparisons are motivated by the desire to have \emph{global} comparisons between relative trace formulas, so let us say a few things about the relative trace formula. The presentation that follows is quite naive, pretending that all integrals converge. This will rarely be true; instead, integrals have to be regularized. A general process of regularization was explained in \cite[\S 5--6]{SaStacks}, but it does not cover all cases (notably, it does not cover the Arthur--Selberg trace formula). Thus, a relative trace formula in the generality presented here has not been developed yet. Let $k$ be a global field, ${\mathbb{A}_k}$ its ring of adeles. Assume that $X$ is a smooth, quasi-affine $G$-variety defined over $k$. Having defined the Schwartz spaces of $X$ over any local completion $k_v$ of $k$, we now endow them with a \emph{basic vector} at (almost all) non-Archimedean places, which is typically the characteristic function of $X(\mathfrak o_v)$ (where $\mathfrak o_v$ is the ring of integers of $k_v$, and we assume an integral model outside of a finite set of places), times a $G$-invariant measure (which should be chosen to factorize a canonical global choice of measure, the Tamagawa measure). We keep allowing the case $X=N\backslash G$, endowed with an adele class character $\psi$ of $N({\mathbb{A}_k})$. In the case of ``extended Schwartz spaces'' mentioned above, this basic vector will need to be modified --- I point again to \S \ref{ssnonstandard}. Having the basic vectors, we can define global Schwartz spaces as restricted tensor products with respect to these vectors: $$ \mathcal S(X({\mathbb{A}_k})) = \bigotimes_v' \mathcal S(X(k_v)).$$ Correspondingly, for $\mathfrak{X} = [X\times X/G]$ we define the basic vector of $\mathcal S(\mathfrak{X}(k_v))$ as the push-forward of the basic vector of $\mathcal S(X\times X(k_v))$, and the global Schwartz space $\mathcal S(\mathfrak{X}({\mathbb{A}_k}))$ as the corresponding restricted tensor product over all places. The \emph{relative trace formula} of $\mathfrak{X}$ is a global analog of the local \emph{Plancherel formula}. The local Plancherel formula is a decomposition of the inner product of two measures (fixing an invariant measure $dx$ on $X(F)$) in terms of \emph{local relative characters}: \begin{equation} \int_{X(F)} \frac{\Phi_1(x) \Phi_2(x)}{dx} = \int_{\widehat{G}} J_\pi(\Phi_1\otimes \Phi_2) \mu_X(\pi).\end{equation} We recall that a \emph{relative character} $J_\pi$ on $X=X(F)$, associated to an admissible representation $\pi$, is a $G$-invariant functional on $\mathcal S(X\times X)$ that factors as $$ \mathcal S(X\times X)\to \pi\hat\otimes \tilde\pi \xrightarrow{{\left<\,\, , \,\, \right>}} \mathbb{C}.$$ In the group case ($X=H$, $G=H\times H$), this is the same as a character, if we identify the space of $G$-invariant generalized functions on $H\times H$ with conjugation-invariant generalized functions on $H$. Now, globally, we define a distribution that resembles the local inner product of two functions/measures on $X$, but factors through the space of automorphic functions: $$\xymatrix{ \Phi_1 \in \mathcal S(X({\mathbb{A}_k})) \ar[r] & \Sigma\Phi_1(g):= \sum_{\gamma\in X(k)} \Phi_1(\gamma g) \in C^\infty([G]) \\ & \bigotimes \ar[r]^{\left<\,\, , \,\,\right>_{[G]}} &\mathbb{C}\\ \Phi_2 \in \mathcal S(X({\mathbb{A}_k})) \ar[r] & \Sigma\Phi_2(g):= \sum_{\gamma\in X(k)} \Phi_2(\gamma g) \in C^\infty([G]) }$$ Here, the notation is that $[G]=G(k)\backslash G({\mathbb{A}_k})$, and we feel free (globally) to identify measures with functions, by dividing by a Tamagawa measure. The last arrow is the integral $\int_{[G]} \Sigma\Phi_1\cdot \Sigma\Phi_2$ of the ``theta series'' $\Sigma \Phi_1$, $\Sigma\Phi_2$, assuming that it converges. The resulting functional $$ \mathcal S(X({\mathbb{A}_k})) \hat\otimes \mathcal S(X({\mathbb{A}_k})) \to \mathbb{C}$$ will be denoted by ${\operatorname{RTF}}_X$ or ${\operatorname{RTF}}_{\mathfrak{X}}$, for ``relative trace formula''. The relative trace formula itself is, actually, the spectral and geometric decomposition of this functional; the former in terms of relative characters associated to automorphic representations of $G$, and the latter, roughly, in terms of $G(k)$-orbits on $X\times X(k)$. More precisely (but very naively, as far as convergence issues are concerned), by using the Plancherel formula for $L^2([G])$ we can decompose $\left<\Sigma\Phi_1,\Sigma\Phi_2\right>$ into a direct integral, over the set of automorphic representations of $G$, of \emph{global relative characters}: $$ J_\pi^{\rm{gl}}(\Phi_1\otimes\Phi_2) = \sum_{\varphi} \left(\int_{[G]} \Sigma\Phi_1\cdot \bar\varphi\right) \left(\int_{[G]} \Sigma\Phi_2 \cdot\varphi\right),$$ where the sum ranges over an orthonormal basis of $\pi$. For $X=H\backslash G$ homogeneous, these global relative characters can also be expressed in terms of ``period integrals'' of automorphic forms over $[H]$, and those are often (actually, always in the multiplicity--free case) \emph{Eulerian}, i.e., pure tensors: $$ J_\pi^{\rm{gl}} = \bigotimes_v J_{\pi_v}$$ of local relative characters, when $\pi$ is decomposed as $\bigotimes_v' \pi_v$. A precise expression for the local factors $J_{\pi_v}$ is provided by the Ichino--Ikeda conjecture \cite{II}, and its generalization described in \cite[\S 17]{SV}. The important point here is that this Euler factorization results in \emph{special values of $L$-functions} appearing on the spectral side of the relative trace formula, $L$-values that depend on the variety $X$. I point the reader to the aforementioned references for details on the general case; in this paper, we will only discuss specific examples that will feature in our comparisons. The geometric decomposition of the relative trace formula or, at least, of its ``stable'' part (which is often the whole ${\operatorname{RTF}}$), is expressed in terms of the spaces $\mathcal S(\mathfrak{X}(k_v))$ of ``stable orbital integrals'' of the various completions of $k$. I point the reader to \cite[\S 6.4]{SaStacks} for an attempt at a general formulation, where the relative trace formula is presented as a sum of the form: \begin{equation}\label{RTFonstack} \sum_{\xi \in \mathfrak{X}^{\rm{ss}}(k)} \operatorname{ev}_\xi, \end{equation} of ``evaluations'' at the ``semisimple'' global points of the stack $\mathfrak{X}$. Here, we will be concerned with ways to ``match'' the local Schwartz spaces for different quotients of the form $[X\times X/G]$. \subsubsection{Comparisons} Now let $\mathfrak{X}$, $\mathfrak{Y}$ be two such quotients, corresponding to spherical varieties $X, Y$ (possibly for different groups $G, G'$, and possibly endowed with line bundles as before). The functoriality predicted by a homomorphism \begin{equation}\label{mapLgroups}{^LY}\to{^LX} \end{equation} between their $L$-groups should be realized, locally, by a linear ``transfer'' map between the Schwartz spaces $$ \mathcal T: \mathcal S(\mathfrak{X}) \to \mathcal S(\mathfrak{Y}),$$ where $\mathfrak{X} = [X\times X/G]$, $\mathfrak{Y}=[Y\times Y/G']$, satisfying certain local and global desiderata, that we now describe. The transfer operator $\mathcal T$ should be such that, locally, the pull-backs of stable tempered relative characters on $\mathfrak{Y}$ should be stable tempered relative characters on $\mathfrak{X}$, corresponding to the map of $L$-packets that should be associated to \eqref{mapLgroups}. In the cases that we consider, for an irreducible $\pi$ the space of morphisms $\mathcal S(X\times X)\to \pi\hat\otimes \tilde\pi $ is at most one-dimensional, so the relative character for an irreducible representation is determined uniquely up to scalar. Unlike the group case, there is no canonical normalization of this scalar, but the local factor $J_\pi$ of the Ichino--Ikeda conjecture and its generalizations provides a distinguished such normalization. This normalization will be discussed individually in some examples presented in this paper; for the general case, I point the reader to Chapter 17 of \cite{SV}. We should also have a ``fundamental lemma'', stating that the image of the basic vector of $\mathcal S(\mathfrak{X})$ under the transfer is the basic vector of $\mathcal S(\mathfrak{Y})$ (at non-Archimedean places), so that the transfer operator translates to a transfer between global Schwartz spaces: $$ \mathcal T: \mathcal S(\mathfrak{X}({\mathbb{A}_k})) \to \mathcal S(\mathfrak{Y}({\mathbb{A}_k})),$$ where ${\mathbb{A}_k}$ denotes the ring of adeles of $k$. Globally, when \eqref{mapLgroups} is an isomorphism, the map should commute with the (stable) ``relative trace formula'' distributions, thus we should have a commutative diagram: $$ \xymatrix{ \mathcal S(\mathfrak{X}({\mathbb{A}_k})) \ar[rr]^{\mathcal T}\ar[dr]_{{\operatorname{RTF}}_\mathfrak{X}} & & \ar[dl]^{{\operatorname{RTF}}_\mathfrak{Y}}\mathcal S(\mathfrak{Y}({\mathbb{A}_k}))\\ & \mathbb{C} &}.$$ (When the map of $L$-groups is not an isomorphism, it is not clear what to ask of the corresponding relative trace formulas; the thesis of Venkatesh \cite{Venkatesh}, not discussed here but revisited in the upcoming paper \cite{SaTransfer2}, gives some indication about what such a global comparison might look like.) These desiderata are actually incompatible with each other; for example, as mentioned in the previous subsection, relative trace formulas include periods of automorphic forms which very often are equal to special values of $L$-functions, and those $L$-functions typically do not coincide for $\mathfrak{X}$ and $\mathfrak{Y}$. Thus, they have to be inserted into the trace formulas, which is why the transfer operator should, typically, be between non-standard spaces of test measures \begin{equation}\label{transfer} \mathcal T: \mathcal S^\pm(\mathfrak{X}) \to \mathcal S^\pm(\mathfrak{Y}) \end{equation} (at least for one of the quotients involved). This includes the case when we want to use trace formulas to encode the functional equation of $L$-functions; in that case, the spectral decomposition of the left hand side will involve some $L$-functions $L(\pi,\rho)$, and that of the right hand side will involve the dual $L$-functions $L(\pi,\rho^\vee)$; the transfer operator would be a descent, to the level of orbital integrals, of the ``Fourier transforms'' envisioned by Braverman and Kazhdan \cite{BK1, BK2}. Following Ng\^o \cite{Ngo-Hankel}, we call ``Hankel transform'' the descent of such a Fourier transform to the level of orbital integrals. The basic questions to be answered in such a setting are the following: \begin{itemize} \item Can we describe the appropriate Schwartz spaces $\mathcal S^\pm(\mathfrak{X})$ $\mathcal S^\pm(\mathfrak{Y})$, and the correct transfer operator between them, that is, a linear isomorphism that pulls back relative characters to relative characters, and satisfies the fundamental lemma? In practice, checking the statement on relative characters locally can be difficult or impossible; instead, one might just require that the statement be true for unramified representations, in the form of a ``fundamental lemma for the Hecke algebra'', and deduce it for the rest by global-to-local means. \item In the case ${^LX}={^LY}$, globally, does the transfer operator $\mathcal T$ commute with the ``relative trace formula'' functionals? (This would be a form of Poisson summation, expressed in terms of a ``Poisson sum'' of the form \eqref{RTFonstack}.) In the general case, what is the nature of the comparison of relative trace formulas afforded by the transfer operator? \end{itemize} \subsubsection{List of cases considered in this paper} In this paper, we will revisit and cast in the setup presented above the following cases, most of which have appeared in the literature in one form or another. New results are presented without proof; proofs appear in the papers \cite{SaTransfer1, SaTransfer2}. For the examples below, when nothing is mentioned the map between $L$-groups corresponding to our comparison is an isomorphism. The numbering corresponds to the chapters of this paper. The first group of comparisons concerns functoriality between different spaces: \begin{description} \item[[\ref{sec:Cartan}]] $\mathfrak{X} = $ the adjoint quotient of any quasi-split group $H$, and $\mathfrak{Y} = $ its universal Cartan. The dual ${^LY}$ is the canonical maximal torus of ${^LH}$. This is a warm-up exercise. \item[[\ref{sec:degen}]] $\mathfrak{X} = (X\times X)/G$ for any spherical $G$-variety $X$ (we will assume $G$ to be split, for simplicity), and $\mathfrak{Y} = (X_\emptyset \times X_\emptyset)/G$, where $X_\emptyset$ is its (most degenerate) boundary degeneration. This is very closely related to the previous case, since the boundary degeneration is parabolically induced from the universal Cartan $A_X$ of $X$; the pertinent map of $L$-groups is the canonical embeding ${^LA_X} \hookrightarrow {^LX}$. We will not give a geometric expression for transfer operators here, but we will perform some calculations of relative characters and transfer operators between degenerations of different spaces, that will later be compared to transfer operators between the original spaces. \item[[\ref{sec:Rudnick}]] $\mathfrak{X}= (N,\psi)\backslash \operatorname{SL}_2 /(N,\psi)$ and $\mathfrak{Y} = \frac{\operatorname{SL}_2}{\operatorname{SL}_2}$, i.e., comparing the Kuznetsov and the stable Selberg trace formula for the group $\operatorname{SL}_2$. This comparison was performed, in a classical language, in Rudnick's thesis \cite{Rudnick}; here we will only discuss the local aspects. \item[[\ref{sec:Waldspurger}]] $\mathfrak{X} = (N,\psi)\backslash\operatorname{PGL}_2/(N,\psi)$ and $\mathfrak{Y} = T\backslash \operatorname{PGL}_2/T$, where $T$ is a torus, taken (for simplicity) to be split. This is a review of \cite{SaBE1}. \end{description} The second group has to do with functional equations of $L$-functions: \begin{description} \item[[\ref{sec:standard}]] $\mathfrak{X} = \mathfrak{Y} = (N,\psi)\backslash \operatorname{GL}_n / (N,\psi)$, but equipped with non-standard test measures, corresponding to the standard representation of the $L$-group (for $\mathfrak{X}$) and its dual (for $\mathfrak{Y}$). The Hankel transforms, here, which correspond to the functional equation of the standard $L$-function, were computed by Jacquet \cite{Jacquet}. \item[[\ref{sec:sym2}]] $\mathfrak{X} =\mathfrak{Y} = (N,\psi)\backslash \operatorname{SL}_2 \times \mathbb{G}_m / (N,\psi)$, equipped with non-standard test measures, corresponding to the symmetric square $L$-function (for $\mathfrak{X}$) and its dual (for $\mathfrak{Y}$). This case has not yet appeared in the literature, but in \cite{SaTransfer2} we compute its Hankel transform out of the Rankin--Selberg method. \end{description} In the cases of Hankel transforms, it will turn out that we obtain nicer formulas in these cases if we work with \emph{half-densities}, instead of measures, cf.\ \S \ref{sec:standard}, \S \ref{sec:sym2}. In all cases, we will not only compute the transfer operators, but we will also study how those degenerate, by which I mean the following: For every spherical variety $X$, we have its ``boundary degeneration'' or ``asymptotic cone'' $X_\emptyset$, which has already been mentioned. For example, the boundary degeneration of the $G=\operatorname{SL}_2\times \operatorname{SL}_2$-variety $X=\operatorname{SL}_2$ is the $G$-variety of non-zero $2\times 2$ matrices of determinant zero. In the non-Archimedean case, we have (presently, under some assumptions) a universal ``asymptotics'' map \begin{equation}\label{Bmap}e_\emptyset^*: \mathcal S(X) \to \mathcal S^+(X_\emptyset),\end{equation} landing in a space of smooth measures whose support has compact closure in an affine embedding of $X_\emptyset$. Moreover, there is a $G\times \mathbb{G}_m$-family $\mathcal X\to \mathbb{G}_a$, whose general fiber is isomorphic to $X$ and whose special fiber is isomorphic to $X_\emptyset$. (When $X= (N,\psi)\backslash G$, then $X_\emptyset$ is equal to $X$ as a variety, but this family corresponds to the degeneration of the character $\psi$ to the trivial character.) For a pair of spaces $X, Y$ (and the related stacks $\mathfrak{X}, \mathfrak{Y}$), it is natural to attempt a comparison between the transfer operator for $\mathfrak{X}, \mathfrak{Y}$, and the transfer operator for (the corresponding quotients associated to the boundary degenerations) $\mathfrak{X}_\emptyset$, $\mathfrak{Y}_\emptyset$. Calculations of relative characters will allow us to determine what the transfer operator or Hankel transform should be in each case for the degenerations. It turns out, in all cases considered, that the transfer operators are simply \emph{deformations} of the corresponding tranfer operators for the boundary degenerations. Thus, the examples discussed in this paper reveal a lot of structure behind the transfer operators of ``beyond endoscopy''; this structure was previously unnoticed in the --- heavily tilted towards analytic number theory and overlooking local aspects --- literature in the subject. \subsection{Acknowledgements} Most of the calculations in this paper were performed while visiting the University of Chicago during the winter and spring quarters of 2017. I am grateful to Ng\^o Bao Ch\^au for the invitation, and for numerous conversations and references which made this paper possible. His ideas permeate the paper. The paper was finished during my stay at the Institute for Advanced Study in the Fall of 2017. This work was supported by NSF grant DMS-1502270, and by a stipend to the IAS from the Charles Simonyi Endowment. \part{General considerations} \section{Calculus of equivariant Fourier transforms} \label{sec:Fourier} Before we embark on trace formula comparisons, we need to introduce a basic family of transformations that will appear all the time, the \emph{equivariant Fourier transforms}. Here, ``equivariant'' means with respect to the action of a multiplicative group or, more generally, a torus. We fix throughout a non-trivial unitary character $\psi$ of the additive group $F$. At non-Archimedean places, we will be assuming that its conductor is the ring of integers $\mathfrak o$. We also fix a measure $dx$ on $F$ which is self-dual with respect to $\psi$; this induces a measure $|\omega|$ on $X(F)$, for every volume form $\omega$ on a smooth variety $X$ over $F$. We will also use the measure $d^\times x := \frac{dx}{|x|}$ on the multiplicative group $F^\times$. Let $T$ be a torus, and $\mathcal M_0(T)$ a space of measures on $T=T(F)$ (with properties to be specified). For any $s\in \mathbb{C}$, consider the distribution \begin{equation} \label{DS} D_s:=|x|^s \psi(x) d^\times x \end{equation} on $F^\times$. Any cocharacter $\check\lambda: \mathbb{G}_m\to T$ induces, by push-forward, a distribution $\check\lambda_*D_s$ on $T$. The equivariant Fourier transform $\mathscr F_{\check\lambda,s}$ is defined as the operator of convolution by $\check\lambda_* D_s$, on the given space of measures $\mathcal M_0(T)$. If $\mathcal M_0(T) = \mathcal S(T)$, the convolution is convergent. In the general case, we will typically need to regularize it. For example, if $T=F^\times$ and $\mathcal M_0(T) = \mathcal S(F)$ (considered by restriction as measures on $F^\times\subset F$), with $\check\lambda$ the identity cocharacter, we formally have: $$ \mathscr F_{\check\lambda,s} f (\xi) = \int_{F^\times} |x|^s \psi(x) f(x^{-1} \xi) d^\times x = |\xi|^{-s} \int_{F^\times} |x|^{s-1} f(x^{-1}) \psi(x\xi) dx,$$ and the integral on the right makes sense as the Fourier transform of the distribution $x\mapsto |x|^{s-1} f(x^{-1})$, whenever the latter has a ``natural'' interpretation as a tempered distribution. ``Fourier transform'', here, maps distributions to distributions, since we have fixed the self-dual measure $dx$. In general, I will leave ``natural'' interpretations of such regularizations to the reader to figure out, unless there is something highly non-trivial to be pointed out; the typical example of a distribution that needs to be understood as a tempered distribution is of the form $|x|^s f(x) $, where $f\in \mathcal S(F)$ is a Schwartz measure; it is well-known that this is a measure when $\Re(s)>-1$, and makes sense by analytic continuation as a distribution for all but a countable set of values of $s$. Finally, we discuss Mellin transforms on tori and functional equations under the equivariant Fourier transforms. Let $f$ be a measure on a torus $T$. Its Mellin transform is a function on the character group of $T$, typically defined by meromorphic continuation of the integral $$ \check f(\chi) = \int_T f(t) \chi^{-1}(t).$$ Notice that for $T=\mathbb{G}_m$ and $f= \Phi dx$, where $\Phi$ is a Schwartz function on $\mathbb{G}_a$, we have $$\check f(\chi) = Z(\Phi, \chi^{-1}, 1),$$ a Tate zeta integral. The reason for having $\chi^{-1}$, instead of $\chi$ in the definition of Mellin transforms is that it is more natural to denote by $f\mapsto \check f(\chi)$ the $\chi$-equivariant quotient of $\mathcal S(T)$, despite the fact that this is contrary to the classical definition of Mellin transform on $\mathbb{G}_m$ as $M\Phi(s) = \int \Phi(x) |x|^s d^\times x$. We have the following: \begin{proposition}\label{gamma} \begin{equation}\label{FE} \widecheck{(\mathscr F_{ {{{\lambda}}} , s} f)}(\chi) = \gamma(\chi,\check\lambda,1-s,\psi) \check f(\chi).\end{equation} \end{proposition} Here, $$\gamma(\chi,\check\lambda,1-s,\psi) = \frac{\epsilon(\chi,\check\lambda,1-s,\psi) L(\chi^{-1},\check\lambda,s)}{L(\chi,\check\lambda,1-s)}$$ is the gamma-factor of the local functional equation, for the local $L$-function attached to the representation $\check\lambda: \check T\to \mathbb{G}_m$ of the dual torus. \begin{proof} The transform is equivariant, and hence clearly satisfies the above formula, for some scalar in place of $\gamma(\chi, \check\lambda,1-s,\psi)$. Moreover, by the definition of $\mathscr F_{\check\lambda,s}$, this scalar has to depend only on the pull-back of $\chi$ via $\check\lambda$. Therefore, we are reduced to the case of $T=\mathbb{G}_m$, with $\check\lambda=$ the identity cocharacter. In this case, let $f = \Phi d^\times t$. By definition, $$ \widecheck{\mathscr F_{\lambda, s} f}(\chi) = \int \mathscr F_{\check\lambda, s} \Phi (t) \chi^{-1}(t) d^\times t = \int \left(\int \Phi(u^{-1}) |u|^s \psi(ut) d^\times u \right) \chi^{-1}(t) |t|^s d^\times t. $$ The inner integral is the (classical) Fourier transform of the function $\varphi:u\mapsto |u|^{s-1} \Phi(u^{-1})$, defined as $\hat\varphi(t) = \int \varphi(u) \psi(ut) du$. The whole expression is, therefore, the zeta integral $Z(\hat\varphi,\chi^{-1},s)$. Recall the functional equation\footnote{This convention on local gamma factors was misstated in \cite[Lemma 2.12]{SaBE1}, where $\psi^{-1}$ instead of $\psi$ was used to define Fourier transforms. As a result, $\psi$ should be replaced by $\psi^{-1}$ in all gamma factors of \cite{SaBE1, SaBE2}.} \cite{Tate-Corvallis} $$ \gamma(\chi,s,\psi) Z(\varphi,\chi,s) = Z(\hat\varphi, \chi^{-1},1-s).$$ Thus, $$Z(\hat\varphi,\chi^{-1},s) = \gamma(\chi,1-s,\psi) Z(\varphi, \chi, 1-s) = $$ $$=\gamma(\chi,1-s,\psi) \int |u|^{s-1} \Phi(u^{-1}) \chi(u) |u|^{1-s} d^\times u = \gamma(\chi, 1-s,\psi) \check f(\chi).$$ \end{proof} \section{Non-standard test measures, and trivialization of Kuznetsov orbital integrals}\label{sec:Kuznetsov} \subsection{Trivialization of push-forwards for the Kuznetsov formula} \label{sstrivialization} Let $G=\operatorname{SL}_n$, $\operatorname{GL}_n$ or $\operatorname{PGL}_n$, and let $N$ be the subgroup of upper triangular unipotent matrices. We will consider $\psi$ as a character of $N$, by composing with the sum of the $(i, i+1)$-entries of the matrix ($1\le i\le n-1$). For $\operatorname{SL}_n$, there is also a choice of generic character which is non-conjugate to this, but since our comparisions (for example, with the trace formula in the case of $n=2$) will only involve stable orbital integrals, this would not change anything in the formulas. Let $Y\subset G$ be the variety of anti-diagonal elements. The action map $N\times N\times Y\to G$ is an isomorphism with the open Bruhat cell, which we temporarily denote by $Z$. A function on $Z$ satisfying $\Phi(n_1 g n_2) = \psi(n_1 n_2) \Phi(g)$ can be thought as a section of a line bundle $\mathcal L_{\psi\times\psi}$ over the points of the variety $N\backslash Z/N$. Let $f$ denote a measure on $N\backslash Z/N$ that is valued on $\mathcal L_{\psi\times\psi}$. The section $Y\xrightarrow\sim N\backslash Z/N$ allows us to trivialize this line bundle, and \emph{consider $f$ as a measure on $Y$}. Explicitly, in the case where these measures are absolutely continuous with respect to a ``Haar'' (=invariant under the action of the diagonal torus) measure on $Y$, we have $f = \Phi dy$, for a function $\Phi$ as above, and the corresponding scalar-valued measure $f_Y$ on $Y$ is: \begin{equation} f_Y (y) = \Phi(y) dy. \end{equation} In the rest of this paper, we will not be distinguishing, notationally, between $f$ and $f_Y$, that is: we will always be considering such a measure $f$ as a scalar-valued measure on the variety $Y$ of anti-diagonal elements (which we will also be identifying with the quotient $N\backslash Z/N$). Let, now, $\mathcal L_\psi$ denote the line bundle defined (similarly) over $N\backslash G$ by the character $\psi$ with respect to the left multiplication/right action of $N$ on functions; explicitly, its sections are functions $\Phi$ on $G$ which satisfy $\Phi(ng) = \psi(n) \Phi(g)$. Let $\mathcal S(N,\psi\backslash G)$ denote the space of Schwartz measures valued in this line bundle. There is a canonical ``twisted push-forward'' map \begin{equation}\label{pushforward-Kuz} p_!: \mathcal S(N,\psi\backslash G) \hat\otimes \mathcal S(N,\psi^{-1}\backslash G) \to \mathcal M(N\backslash Z/N, \mathcal L_{\psi\times\psi}) \xrightarrow{\sim} \mathcal M(Y) \end{equation} (measures on $Y$), with the last isomorphism provided by the comments above. This map is dual to the pull-back of sections of the dual line bundle: $$ \Gamma(N\backslash Z/N, \mathcal L_{\psi^{-1}\times\psi^{-1}}) \xrightarrow{p^*} \Gamma(N^2\backslash \pi^{-1} Z, \mathcal L_{\psi^{-1}} \boxtimes \mathcal L_\psi),$$ where $p: G \times G \to G$ is the map $(g_1, g_2) \mapsto g_1 g_2^{-1}$ (descending to a map $N\backslash G\times N\backslash G \to N\backslash G/N$). We can also pull-back elements of $\Gamma(N\backslash Z/N, \mathcal L_{\psi^{-1}\times\psi^{-1}})$ to $(N,\psi^{-1})$-equivariant sections of $\mathcal L_{\psi^{-1}}$ over $N\backslash Z$, and thus think of the twisted push-forward as a map \begin{equation} p_!: \mathcal S(N,\psi\backslash G)\to \mathcal M(N\backslash Z/N, \mathcal L_{\psi\times\psi}) \xrightarrow{\sim} \mathcal M(Y). \end{equation} Moreover, identifying $Y$ with $N\backslash Z/N$, consider the embedding $$ Y\hookrightarrow \mathfrak C:= N\backslash G \sslash N,$$ so that we can identify measures on $Y$ as measures on $\mathfrak C$ (simply by letting the mass of the complement be zero). It will also be convenient to identify $\mathfrak C$ as an embedding of $A = B/N$, the universal Cartan of $G$, where $B$ is the Borel subgroup of upper triangular matrices. To perform this identification, we identify $A$ with $Y$ via the map \begin{equation} a\mapsto wa, \end{equation} where $w$ is a representative for the longest element of the Weyl group. (The precise choice of $w$ is not very important, and will only be fixed when necessary.) Under this identification, $\mathfrak C$ is the toric embedding of $A$ associated to the cone of positive coroots, i.e., a limit $\lim_{t\to 0} \check\lambda(t)$ exists in $\mathfrak C$ if and only if $\check\lambda$ is a cocharacter into $A$ in the cone of positive coroots. \begin{lemma} The map \eqref{pushforward-Kuz} has image in the space of finite measures on $\mathfrak C$. \end{lemma} \begin{proof} Let $f\in \mathcal S(N,\psi\backslash G) \hat\otimes \mathcal S(N,\psi^{-1}\backslash G)$. The absolute value $|f|$ is a positive Schwartz measure on $N\backslash G \times N\backslash G$, and the push-forward of $f$, considered as a measure on $\mathfrak C$, is bounded by the push-forward of $|f|$. \end{proof} We will denote the image of \eqref{pushforward-Kuz} by $\mathcal S(N,\psi\backslash G/N,\psi)$, considered as a space of measures on $\mathfrak C$. Finally, we discuss the relation between \emph{functions, measures, and half-densities}: Fixing a Haar measure on $N$, the orbital integrals of a Schwartz function $\Phi\in \mathscr F(G)$: $$ O_t (\Phi) = \int_{N\times N} \Phi(n_1 w t n_2) \psi^{-1}(n_1 n_2) dn_1 dn_2$$ define a function on $A$ (identified as above with the anti-diagonal $Y$). On the other hand, fixing also a Haar measure on $G$, the push-forward $f$ of $\Phi dg$ to $\mathcal S(N,\psi\backslash G/N,\psi)$ is a measure on $A\simeq Y\subset\mathfrak C$. It is easy to compute the integration formula: \begin{equation}\label{integration} f(t) = \delta(t) O_t (\Phi) dt, \end{equation} for some Haar measure $dt$ on $A$. In some cases, it will be easier to work with \emph{half-densities}, instead of measures. These are sections of the complex line bundle that is obtained from the positive square root of the $\mathbb{R}^\times$-torsor that gives rise to the bundle of real-valued measures. We will denote Schwartz half-densities by $\mathcal D$. For example, a Schwartz half-density on a group $G$ is equal to $\Phi (dg)^\frac{1}{2}$, where $(dg)^\frac{1}{2}$ is a Haar half-density. As with functions, there is no natural push-forward of half-densities for an arbitrary map $X\to \mathfrak C$ of spaces. However, here that our space is a quotient by a group action which is generically free, it is natural to define the push-forward map $$p_!: \mathcal D(G) \to \mathcal D(N,\psi\backslash G/N,\psi)$$ (where $\mathcal D(N,\psi\backslash G/N,\psi)$ is, by definition, a space of half-densities on $A\subset \mathfrak C$) by integrating over the fibers against our fixed Haar half-density on $N\times N$. Based on \eqref{integration}, it will be given by the formula \begin{equation}\label{pushf-densities} p_! (\Phi (dg)^\frac{1}{2}) = \delta^\frac{1}{2}(t) O_t (\Phi) (dt)^\frac{1}{2}. \end{equation} As with orbital integrals, half-densities are only defined densely on $N\backslash G\sslash N$, namely on the open subset $A\simeq Y$. \subsection{Non-standard test measures and densities} \label{ssnonstandard} We will need to extend the space $\mathcal S(N,\psi\backslash G)$ of Schwartz Whittaker measures, in order to accommodate generating series for local $L$-functions. Actually, the space we are interested in extending is the space $\mathcal S(N,\psi\backslash G/N,\psi)$ of Kuznetsov orbital integrals, but sometimes this extension will just come from an extension of $\mathcal S(N,\psi\backslash G)$. Here are the cases that we will be concerned with in this paper: \subsubsection{Test measures for the standard $L$-function of $\operatorname{GL}_n$.} Let $G=\operatorname{GL}_n$, and consider the space $\mathcal S(\operatorname{Mat}_n)$ of Schwartz measures on $n\times n$-matrices, for some $s\in \mathbb{C}$. Consider the twisted push-forward map: \begin{equation}\label{fromMat} \mathcal S(\operatorname{Mat}_n) \to \mathcal M(N,\psi\backslash G),\end{equation} composed with the twisted push-forward to $\mathfrak C = N\backslash G\sslash N$, which was defined via a trivialization in the previous subsection: $$ p_!: \mathcal M(N,\psi\backslash G) \to \mathcal M(\mathfrak C).$$ The image of the composition of the two maps will be denoted by $$\mathcal S^-_{L({\operatorname{Std}}, \frac{n+1}{2})}(N,\psi\backslash G/N,\psi).$$ The measures in $\mathcal S^-_{L({\operatorname{Std}}, \frac{n+1}{2})}(N,\psi\backslash G/N,\psi)$ are finite, because they are bounded by the corresponding push-forward measures to $N\backslash G\sslash N$ without the character. The reason for the index $L({\operatorname{Std}}, \frac{n+1}{2})$ is the following: \begin{proposition}\label{basic-std} Let $F$ be non-Archimedean, with ring of integers $\mathfrak o$. Let $\varphi_0$ be the Whittaker measure which is the product of a Haar (=invariant) measure on $N\backslash G$ by the Whittaker function which is equal to $1$ on $K$ and zero off $NK$. The image of \eqref{fromMat} contains a $K=\operatorname{GL}_n(\mathfrak o)$-invariant Whittaker measure $\varphi$, which admits the following description: For every $i\ge 0$, the restriction of $\varphi$ to $\{g\in \operatorname{GL}_n | {\operatorname{val}}(\det(g)) = i\}$ is equal to $$q^{-i\cdot \frac{n+1}{2}} h_{\operatorname{Sym}^i}\star \varphi_0,$$ where $h_{\operatorname{Sym}^i}$ is the element of the unramified Hecke algebra that corresponds, under the Satake isomorphism, to the trace of the $i$-th symmetric power of the standard representation, and $\star$ denotes the convolution operator $$ h\star \varphi(x) = \int_G h(g) \varphi(xg^{-1}) dg.$$ For $i<0$, the restriction of $\varphi$ to the corresponding set is zero. \end{proposition} \begin{remark} The Satake transform $h\mapsto \check h \in \mathbb{C}[\check G]^{\check G}$ (where $\check G$ denotes the dual group) is normalized so that for $v_{K,\chi} = $ the unramified vector in a principal series representation $\pi_\chi$ obtained by normalized induction from an unramified character $\chi$ of the Borel subgroup, we have $\pi_{\chi}(h) v_{K,\chi} = \check h(\check\chi) v_{K,\chi}$, where $\check\chi$ is the element of the dual Cartan $\check A\subset\check G$ with $\chi({\check\lambda}(\varpi)) = {\check\lambda}(\check\chi)$ for any coweight $\check\lambda$ into $A$ and $\varpi$ is a uniformizer in $\mathfrak o$. \end{remark} \begin{remark} A small detail here: the right regular action of an element $h$ in the Hecke algebra on Whittaker functions or measures is defined as $$h \cdot \varphi(x) = \int_G h(g) \varphi(xg) dg,$$ so it is related to the convolution operator defined above by $h\cdot \varphi = h^\vee \star \varphi$, where $h^\vee(g)=h(g^{-1})$. \end{remark} \begin{proof} The measure $\varphi$ is simply the image of $\Phi=$ the characteristic function of $\operatorname{Mat}_n(\mathfrak o)$ times an additive Haar measure (which is equal to $|\det|^n$ times a multiplicative Haar measure), and $\varphi_0$ is the image of $\Phi_0=$ the characteristic function of $\operatorname{GL}_n(\mathfrak o)$ times a multiplicative Haar measure. We may fix the Haar measure $dg$ on $G$ with $dg(G(\mathfrak o))=1$. The result now follows from Godement--Jacquet theory. More precisely, the statement of the proposition is equivalent to the statement that $$ \Phi = \sum_{i\ge 0} q^{i\cdot \frac{n-1}{2}} h_{\operatorname{Sym}^i}\star \Phi_0,$$ which in turn is equivalent to the statement that if $$M_\chi (g) = \left< \pi_\chi(g) v_{K,\chi}, v_{K,\chi^{-1}}\right>$$ is the unramified matrix coefficient for the principal series representation $\pi_\chi$ as in the remark above, normalized so that $M_\chi(1) = 1$, and assuming that the central character of $\pi_\chi$ is large enough so that the integral below converges, we have: $$ \int_{\operatorname{GL}_n} \Phi(g) \cdot M_\chi(g) dg = \sum_{i\ge 0} q^{i\cdot \frac{n-1}{2}} \int_{\operatorname{GL}_n} \Phi_0(g) \cdot \left< \pi_\chi(g) \pi_\chi(h_{\operatorname{Sym}^i}) v_{K,\chi},v_{K,\chi^{-1}} \right> dg =$$ $$= \sum_{i\ge 0} q^{i\cdot \frac{n-1}{2}} \operatorname{tr}_{\operatorname{Sym}^i} (\check\chi) = \frac{1}{\det(I- q^{i\cdot \frac{n-1}{2}}{\operatorname{Std}}(\check\chi))} = L(\pi_\chi,{\operatorname{Std}}, -\frac{n-1}{2}).$$ This is proven in \cite{GJ}. \end{proof} The image of $\varphi$ in $\mathcal S^-_{L({\operatorname{Std}}, \frac{n+1}{2})}(N,\psi\backslash G/N,\psi)$ will be called the \emph{basic vector} of this space, and denoted by $f^0_{L({\operatorname{Std}}, \frac{n+1}{2})}$. (It is determined up to a choice of Haar measure, which we do not fix in this paper; more precise versions of the theorems on basic vectors, fixing this constant, appear in \cite{SaTransfer1, SaTransfer2}.) One can of course multiply everything by $|\det|^s$ and construct a space $\mathcal S^-_{L({\operatorname{Std}}, s +\frac{n+1}{2})}(N,\psi\backslash G/N,\psi)$, with analogous properties as in the proposition above. When working with Fourier transforms on $\operatorname{Mat}_n$, it is more convenient to work with half-densities instead of measures. Notice that a Schwartz half-density on $\operatorname{Mat}_n$ is of the form $|\det g|^\frac{n}{2}\Phi(g) (dg)^\frac{1}{2}$, where $(dg)^\frac{1}{2}$ is a Haar half-density on $G$ and $\Phi$ is a Schwartz function. Its pushforward to $A\subset \mathfrak C$ under the twisted push-forward map $p_!$ map defined in \eqref{pushf-densities} will be: \begin{equation}\label{pushf-Matn} |\det t|^\frac{n}{2} \delta^\frac{1}{2}(t) (dt)^\frac{1}{2} \cdot O_t(\Phi). \end{equation} Explicitly, if $t = {\operatorname{diag}}(t_1, \dots, t_n)$, this is $$ |t_1|^{n-\frac{1}{2}} |t_2|^{n-\frac{3}{2}} \cdots |t_n|^\frac{1}{2} \int_{N\times N} \Phi(n_1 w t n_2) \psi^{-1}(n_1 n_2) dn_1 dn_2.$$ This will be useful for us in \S \ref{sec:standard}. Of course, the image of $\mathcal D(\operatorname{Mat}_n)$ under this twisted push-forward map will be denoted by $$ \mathcal D^-_{L({\operatorname{Std}}, \frac{1}{2})}(N,\psi\backslash G/N,\psi).$$ Finally, consider the dual space $\operatorname{Mat}_n^\vee$. It can be identified with $\operatorname{Mat}_n$ via the trace pairing, but to make this compatible with the $G\times G$-action we need to let $(g_1,g_2)\in G$ act on $X\in \operatorname{Mat}_n^\vee$ (represented by a matrix) via $X\cdot (g_1,g_2) = g_2^{-1} X g_1$. The map $g\mapsto g^{-1} \in \operatorname{GL}_n \subset \operatorname{Mat}_n^\vee$, then, becomes an equivariant embedding. Thus, we have a similar push-forward map $$|\det|^{-s}\mathcal S(\operatorname{Mat}_n^\vee) \to \mathcal M(\mathfrak{C}).$$ Here $\det$ is the determinant on $\operatorname{GL}_n$, when embedded equivariantly into $\operatorname{Mat}_n^\vee$; under the identification of $\operatorname{Mat}_n^\vee$ with $\operatorname{Mat}_n$, this is $\det^{-1}$ --- hence the negative power in the determinant. We will denote the image of this map by $$\mathcal S^-_{L({\operatorname{Std}}^\vee, s+\frac{n+1}{2})}(N,\psi\backslash G/N,\psi).$$ Proposition \ref{basic-std} holds for this space, if we replace the standard representation by its dual. \subsubsection{Test measures for $\operatorname{SL}_2$ or $\operatorname{PGL}_2$.} Now let $G=\operatorname{SL}_2$ or $\operatorname{PGL}_2$. We will only discuss non-standard spaces of test measures associated to products of the adjoint $L$-function, when $G=\operatorname{SL}_2$ and the standard $L$-function, when $G=\operatorname{PGL}_2$. Let $r = \bigoplus_i r_i$ be an irreducible algebraic representation of the (connected) dual group $\check G$, decomposed in terms of its irreducible constituents, which we assume to be all isomorphic to the adjoint representation $\mathrm{Ad}=\operatorname{Sym}^2\otimes\det^{-1}$ if $G=\operatorname{SL}_2$, i.e., the irreducible represenation with highest weight $\check\alpha$, and isomorphic to the standard representation (highest weight $\frac{\check\alpha}{2}$) if $G=\operatorname{PGL}_2$. Let $\underline s =(s_i)_i$ be a collection of complex numbers, one for each $r_i$, we define a space of test measures $$ \mathcal S^-_{L(r,\underline s)} (N,\psi\backslash G/N,\psi) = \mathcal S^-_{\prod_i L(r_i,s_i)} (N,\psi\backslash G/N,\psi),$$ containing $\mathcal S(N,\psi\backslash G/N,\psi)$, as follows: Recall from \S \ref{sstrivialization} that $\mathcal S(N,\psi\backslash G/N,\psi)$ has been defined as a space of measures on $\mathfrak C = N\backslash G\sslash N$. We identify $\mathfrak C$ with $\mathbb{G}_a$, in a way compatible with the sections $$ \tilde\zeta = \begin{pmatrix} & -\zeta^{-1} \\ \zeta \end{pmatrix} \, \, \, (\mbox{for }\operatorname{SL}_2),$$ $$\tilde \xi = \begin{pmatrix} & -1 \\ \xi \end{pmatrix} \, \,\, (\mbox{for }\operatorname{PGL}_2)$$ over $\mathbb{G}_m$. We let $ \mathcal S^-_{L(r,\underline s)} (N,\psi\backslash G/N,\psi)$ be the space of measures on $\mathfrak C = \mathbb{G}_a$ which on any compact set coincide with elements of $\mathcal S(N,\psi\backslash G/N,\psi)$, while in a neighborhood of infinity they are of the form \begin{equation}\label{expansionSL2} \sum_i C_i(\zeta^{-1}) |\zeta|^{1-s_i} d^\times \zeta, \end{equation} in the case of $G=\operatorname{SL}_2$, and \begin{equation}\label{expansionPGL2} \sum_i C_i(\xi^{-1}) |\xi|^{\frac{1}{2}-s_i} d^\times \xi, \end{equation} in the case of $G=\operatorname{PGL}_2$, where the $C_i$'s are smooth functions in a neighborhood of zero, \emph{except} when two or more of the $s_i$'s coincide, in which case the corresponding contributions will be $(C_1(\zeta^{-1}) + C_2(\zeta^{-1})\log|\zeta| + C_3(\zeta^{-1}) \log^2|\zeta| +\dots) |\zeta|^{1-s} d^\times \zeta$ (as many summands as occurences of the exponent $s$). \begin{remark} Under our previous identification of $\mathfrak C$ with an embedding of the universal Cartan $A$, the factors $|\zeta|^1$ and $|\xi|^\frac{1}{2}$ read $\delta^{\frac{1}{2}}(t)$, and are volume factors. On the other hand, the factors $|\zeta|^{-s_i}$ and $|\xi|^{-s_i}$ are equal to $q^{s_i}$ on an element of the form $e^{\check\alpha}(\varpi)$, resp.\ $e^\frac{\check\alpha}{2}(\varpi)$, when $F$ is a non-Archimedean field with residual degree $q$ and uniformizer $\varpi$; these factors are related to the Taylor series expansion of the local $L$-function. \end{remark} The reason for this definition is the following, which can be proven as in \cite[Lemma 5.3]{SaBE1}: \begin{proposition}\label{basic-slpgl} Let $F$ be non-Archimedean, with ring of integers $\mathfrak o$, and set $K=G(\mathfrak o)$. Let $\varphi_0\in \mathcal S(N,\psi\backslash G)$ be the product of a Haar (=invariant) measure on $N\backslash G$ by the Whittaker function which is equal to $1$ on $K$ and zero off $NK$. Let $$\varphi = \prod_i\left(\sum_j q^{-js_i} h_{\operatorname{Sym}^j r_i}\right)\star \varphi_0,$$ where $h_{\operatorname{Sym}^j r_i}$ is the element of the unramified Hecke algebra with Satake transform equal to the trace of the $j$-th symmetric power of $r_i$, and the product over $i$ is the convolution product. This series is locally finite as a series of measures, and hence makes sense as a measure on $N\backslash G$ valued in the line bundle defined by the character $\psi$. Then, the twisted push-forward of $\varphi$ to $\mathfrak C$ belongs to $\mathcal S^-_{L(r,\underline s)} (N,\psi\backslash G/N,\psi)$. \end{proposition} The image of $\varphi$ in $\mathcal S^-_{L(r,\underline{s})}(N,\psi\backslash G/N,\psi)$ will be called the \emph{basic vector} of this space, and denoted by $f^0_{L(r,\underline s)} $. (It is determined up to a choice of Haar measure, which can be fixed globally.) We may again work with half-densities, in which case the analogous to \eqref{expansionSL2}, \eqref{expansionPGL2} expansions are: \begin{equation}\label{expansionSL2-densities} \sum_i C_i(\zeta^{-1}) |\zeta|^{-s_i} (d^\times \zeta)^\frac{1}{2}, \end{equation} in the case of $G=\operatorname{SL}_2$, and \begin{equation}\label{expansionPGL2-densities} \sum_i C_i(\xi^{-1}) |\xi|^{-s_i} (d^\times \xi)^\frac{1}{2}, \end{equation} by the integration formula \eqref{integration}. The space $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{PGL}_2/N,\psi)$ can be obtained from the space $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{GL}_2/N,\psi)$ defined in the previous subsection by integrating over the center. More precisely: \begin{proposition} Consider the space of measures $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{GL}_2/N,\psi)$ (obtained by twisted push-forward from the space $|\det|^s \mathcal S(\operatorname{Mat}_2)$), and the push-forward $$\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{GL}_2/N,\psi) \to \mathcal M(N\backslash \operatorname{PGL}_2\sslash N)$$ under the natural map $N\backslash G\sslash N\to N\backslash \operatorname{PGL}_2\sslash N$. This push-forward map converges (has image in locally finite measures) for $\Re(s)\gg 0$, has image equal to $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{PGL}_2/N,\psi)$, and admits holomorphic continuation as a map $$ \mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{GL}_2/N,\psi) \to \mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{PGL}_2/N,\psi)$$ for all $s\in \mathbb{C}$, in the sense that the image of $|\det|^s f$ is a holomorphic section\footnote{For the topological properties of extended Schwartz spaces and the notion of holomorphic sections, I point the reader to \cite[Appendix A]{SaBE2}.} of $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{PGL}_2/N,\psi)$, for any $f\in \mathcal S^-_{L({\operatorname{Std}},\frac{3}{2})}(N,\psi\backslash \operatorname{GL}_2/N,\psi)$. Finally, this map is surjective, and maps the basic vector of $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{GL}_2/N,\psi)$ to the basic vector of $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{PGL}_2/N,\psi)$. \end{proposition} \begin{proof} Since the elements of $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{GL}_2/N,\psi)$ are obtained by twisted push-forward from the space $|\det|^s \mathcal S(\operatorname{Mat}_2)$, we will argue directly in terms of the twisted push-forward map: $$ |\det|^s \mathcal S(\operatorname{Mat}_2) \to \mathcal M(N\backslash \operatorname{PGL}_2\sslash N),$$ that we will denote by $\overline{p_!}$. Recall that ``twisted'' refers to the character $\psi$ on $N$. Notice that $N\bbslash \operatorname{Mat}_2 \sslash N\simeq \mathbbm A^2$ with coordinates $(c,\det)$, where $c$ is the bottom-left coordinate of the matrix $\begin{pmatrix} a & b \\ c & d\end{pmatrix}$. First, let $\operatorname{Mat}_2^\circ$ denote the open subvariety with $c\ne 0$, and consider the space $\mathcal S(\operatorname{Mat}_2^\circ)$. The push-forward map $\operatorname{Mat}_2^\circ \to \mathbb{G}_m\times \mathbbm A^1 \subset \mathbbm A^2$ is smooth (submersive) and surjective, and the action of $N\times N$ on $\operatorname{Mat}_2^\circ$ is free, which implies that the twisted push-forward $$ \mathcal S(\operatorname{Mat}_2^\circ) \to \mathcal M(\mathbb{G}_m\times\mathbbm A^1)$$ is a surjection onto $\mathcal S(\mathbb{G}_m\times\mathbbm A^1)$. Dividing by the action of the center we get a submersive surjection $$ \mathbb{G}_m\times \mathbbm A^1 \ni (c,\det)\mapsto \frac{\det}{c^2}\in \mathbbm A^1,$$ and hence a push-forward map $$ \mathcal S(\mathbb{G}_m\times \mathbbm A^1) \twoheadrightarrow \mathcal S(\mathbbm A^1),$$ and, more generally, $$ |\det|^s \mathcal S(\mathbb{G}_m\times \mathbbm A^1) \twoheadrightarrow |\xi|^{-s} \mathcal S(\mathbbm A^1),$$ where $\xi^{-1}$ is the coordinate on $\mathbbm A^1$. This matches our coordinate $\xi$ in $N\backslash \operatorname{PGL}_2\sslash N$, and hence the image of the last map consists precisely of the elements of $\mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{PGL}_2/N,\psi)$ whose germ at $\xi=0$ vanishes. On the other hand, the subspace $|\det|^s \mathcal S(\operatorname{GL}_2) = \mathcal S(\operatorname{GL}_2)$ of $|\det|^s \mathcal S(\operatorname{Mat}_2) $ has twisted push-forward equal, by definition, to $\mathcal S(N,\psi\backslash \operatorname{PGL}_2/N,\psi)$. Thus, we get a well-defined surjection $$ \overline{p_!}: |\det|^s \mathcal S(\operatorname{GL}_2 \cup \operatorname{Mat}_2^\circ) \twoheadrightarrow \mathcal S^-_{L({\operatorname{Std}},s+\frac{3}{2})}(N,\psi\backslash \operatorname{PGL}_2/N,\psi),$$ for every $s$, which clearly is holomorphic in $s$. To extend this map to $|\det|^s \mathcal S(\operatorname{Mat}_2)$, first of all we notice that the twisted push-forward map $\overline{p_!}$ indeed converges for $\Re(s)\gg 0$ --- in fact, already for $s=0$ because it is bounded by the untwisted push-forward map from finite measures on $\operatorname{GL}_2$ (by restriction) to finite measures on $N\backslash \operatorname{PGL}_2\sslash N$. Notice also that $p_!$ is $(N,\psi)^2$-equivariant. Now, consider the short exact sequence $$ 0 \to |\det|^s \mathcal S(\operatorname{GL}_2 \cup \operatorname{Mat}_2^\circ) \to |\det|^s \mathcal S(\operatorname{Mat}_2) \to |\det|^s \mathcal S_{\{c=0, \det=0\}}(\operatorname{Mat}_2) \to 0,$$ where the space on the right is, by definition, the \emph{stalk} of $\mathcal S(\operatorname{Mat}_2)$ at the closed subset $\{c=0, \det=0\}$. We claim that the $(N,\psi)^2$-coinvariants of the space $|\det|^s \mathcal S_{\{c=0, \det=0\}}(\operatorname{Mat}_2)$ (equivalently, of the space $\mathcal S_{\{c=0, \det=0\}}(\operatorname{Mat}_2)$) are zero; equivalently, there are no $(N,\psi)^2$-equivariant distributions supported on the set $Y=\{c=0, \det=0\}$. To see that, stratify this set in terms of the entries $(a,d)$ on the diagonal of a matrix: we have open strata $\{a=0, d\ne 0\}$ and $\{a\ne 0, d=0\}$, and the closed stratum $\{a=d=0\}$. If $Y_1$ is one of these strata, we will prove that there are no $(N,\psi)^2$-equivariant distributions on an open neighborhood of $Y_1$ and supported on $Y_1$, and by decreasing induction on the dimension of the strata this will imply that there are no $(N,\psi)^2$-equivariant distributions on $\operatorname{Mat}_2$ supported on $Y$. Let $Y_1$ be one of these strata. The subgroup $N_0= $ $N\times 1$ or $1\times N$ of $N^2$ (depending on $Y_1$) stabilizes every point on $Y_1$. Moreover, $Y_1$ has a semi-algebraic open neighborhood which is $N_0$-equivariantly isomorphic to $Y_1 \times V$, where $V$ is the fiber of the normal bundle to $Y_1$ at a point $y\in Y_1$. Thus, it is enough to show that there are no $(N_0,\psi)$-equivariant distributions on the space $V$ supported on $y$. But, such distributions are necessarily evaluations of derivatives on $y$, and the action of $N_0$ on the space of all derivatives is locally finite, with only the trivial generalized eigencharacter. Hence, there are no $(N_0,\psi)$-equivariant distributions on $V$ supported on $y$, and hence there are no $(N_0,\psi)$-equivariant distributions in a neighborhood of $Y_1$, supported on $Y_1$. This means that the map of coinvariants $$ |\det|^s \mathcal S(\operatorname{GL}_2 \cup \operatorname{Mat}_2^\circ)_{(N,\psi)^2} \to |\det|^s \mathcal S(\operatorname{Mat}_2)_{(N,\psi)^2}$$ is surjective. In the non-Archimedean case, where the functor of $(N,\psi)^2$ coinvariants is exact, this immediately implies that this map is an isomorphism, allowing for a canonical extension of $\overline{p_!}$ to all of $|\det|^s \mathcal S(\operatorname{Mat}_2)$ (which coincides with the twisted push-forward in the convergent region). In the Archimedean case, it is possible to argue again that this map is an isomorphism, but it is easier to observe that, if there was a kernel $|\det|^s\cdot K$ to this map, in the region of convergence the push-forward map $\overline{p_!}$ is zero on this kernel. By holomorphicity, it has to be zero for all $s$, and thus the push-forward extends to $|\det|^s \mathcal S(\operatorname{Mat}_2)$ (and has the same image). Finally, the statement on basic vectors follows immediately from their characterization in terms of the Satake isomorphism in Propositions \ref{basic-std}, \ref{basic-slpgl}. \end{proof} \section{Lifting from the universal Cartan} \label{sec:Cartan} Let $H$ be a reductive group. The reductive (torus) quotient of any Borel subgroup of $H$ is called the universal Cartan $A_H$; it is unique up to unique isomorphism induced by any element conjugating one Borel subgroup to another, and it is defined over the base field even if $H$ does not have a Borel defined over it (i.e., is not quasi-split). The $L$-group ${^LA_H}$ embeds canonically (by construction) into the $L$-group ${^LH}$. Now assume that $H$ is quasi-split. This map of $L$-groups corresponds to the following map of representations, at least generically: if $\mathcal W_F$ denotes the Weil group of $F$, a morphism $$ \varphi: \mathcal W_F \to {^LA_H} \subset {^LH}$$ corresponds to a character $\chi$ of $A_H$, and to the principal series representation $\pi = I(\chi)= \operatorname{Ind}_B^H(\chi\delta^\frac{1}{2})$ of $H$ (where $\delta$ is the modular character of the Borel subgroup $B$). The transfer map $\mathcal T: \mathcal S(H) \to \mathcal S(A_H)$ should be such that the pull-back of a character of $A_H$ (viewed as a functional on $\mathcal S(A_H)$) is equal to characters of the corresponding principal series representations. In fact, it is not completely clear at first that this should be so: notice that for non-unitary characters, the corresponding principal series can have irreducible subquotients belonging to different $L$-packets --- so, one could ask that the pull-back of a character of $A_H$ should be just the character of the subquotient with the associated Langlands parameter. One easily sees, however, that this is too much to ask, and does not lead to a map that preserves ``nice'' spaces of test functions. Therefore, the prevailing philosophy of ``beyond endoscopy'' only requires the transfer to be compatible with functoriality for \emph{tempered} characters. (More generally, one could ask about lifting from tempered representations of one group to unitary Arthur representations of another with a fixed ``Arthur-$\operatorname{SL}_2$'' parameters.) In our case, this translates to the requirement that the pull-back of a \emph{unitary} character of $A_H$ via the transfer map should be the character of the corresponding --- \emph{tempered} --- principal series representation. It turns out that there is a unique map which has this property. Here is the construction: The characters of principal series representations are well-known (s.\ \cite{vanDijk} for a more general formula for induced representations): On regular semisimple elements belonging to a maximally split torus $T$, identified with $A_H$ through its inclusion into some Borel subgroup, the character of $I(\chi)$ is $$\Theta_\chi (t)= D_H^{-\frac{1}{2}}(t) \sum_{w\in W} {^w\chi}(t),$$ where $W$ denotes the relative Weyl group of $H$, and $D_H$ is the discriminant of the Weyl integration formula: $$ \int_H \Phi(h) dh = \frac{1}{|W|}\int_T \int_{T\backslash H} \Phi(g^{-1} t g) dg D_H(t) dt$$ (when $\Phi$ is supported in the closure of the union of maximally split tori). The character is zero off the closure of the union of maximally split tori. Thus, our requirement for the transfer operator: $$ \int_{A_H} \mathcal T f (t) \chi(t) = \int_H f(h) \Theta_\chi (h),$$ for a Schwartz measure $f = \Phi dh$ (where $\Phi$ is a Schwartz function on $H$) reads: $$\int_H f(h) \Theta_\chi (h) = \frac{1}{|W|} \int_T \int_{T\backslash H} \Phi(g^{-1} t g) dg D_H^{-\frac{1}{2}}(t) \sum_{w\in W} {^w\chi}(t) D_H(t) dt = $$ $$ = \int_T D_H^\frac{1}{2}(t) \int_{T\backslash H} \Phi(g^{-1} t g) dg \cdot \chi(t) dt,$$ hence: $$ \mathcal T(f) = D_H^\frac{1}{2}(t) \left(\int_{T\backslash H} \Phi(g^{-1} t g) dg\right) \cdot dt.$$ Choosing a Borel subgroup $B=TN$ (hence identifying $T=A_H$), we can decompose the integral over $T\backslash H$ as an integral over $N$, followed by an integral over $B\backslash H$ (where the integrand varies by the modular character $\delta$ of $B$ on the left), and make the change of variables $$ \int_N \Phi(n^{-1} t n ) dn = D_H^{-\frac{1}{2}}(t) \delta^\frac{1}{2}(t) \int_N \Phi(t n ) dn$$ to finally arrive at the following formula for the transfer operator: \begin{equation}\label{transfer-Cartan} \mathcal T(f) = \mathcal T(\Phi dh) = \delta^\frac{1}{2}(t) \left(\int_{B\backslash H} \int_N \Phi(g^{-1} t ng ) dn dg \right)\cdot dt. \end{equation} Notice that the image lies in $\mathcal S(A_H)$, and of course it is $W$-invariant. Let me briefly make a comment about the global comparison, and how one can prove the lifting of automorphic characters from $A_H$ to $H$ using the trace formula: Let $k$ be a global field, and ${\mathbb{A}_k}$ its ring of adeles. Of course, the stable trace formula for $A_H$, viewed as a functional on $\mathcal S(A_H({\mathbb{A}_k}))$ is just the generalized function $$ \varphi \mapsto \sum_{\alpha\in A_H(k)} \frac{\varphi}{dt} (\alpha),$$ where $dt$ denotes Tamagawa measure. It is slightly difficult to compare its pull-back to $\mathcal S(H({\mathbb{A}_k}))$ via the transfer operator $\mathcal T$ with the usual, scalar-valued, (stable) trace formula for $H$. However, it is more natural to think of the trace formula for $H$ as valued in Laurent expansions around a point on the complex plane; this point of view is explained in \cite[\S 4.3]{SaSelberg}. For example, for a test measure $f$ on $H=\operatorname{PGL}_2$, the trace formula will be a formal expression of the form $$ \frac{{\operatorname{TF}}_{-1}(f)}{s} + {\operatorname{TF}}_0(f),$$ where ${\operatorname{TF}}_0$ is the usual, \emph{non-invariant} Selberg trace formula, and ${\operatorname{TF}}_{-1}$ is an invariant distribution which is equal to $$ -\int_{B\backslash H({\mathbb{A}_k})} K_{f,B} (g, g) dg,$$ where $K_{f,B}$ is the kernel function for the action of $f$ on $L^2(A_H(k)N({\mathbb{A}_k})\backslash H({\mathbb{A}_k}))$: $$ K_{f,B}(x,y) = \sum_{\alpha\in A_H(k)} \int_{N({\mathbb{A}_k})} \frac{f}{dh} (x^{-1} \alpha n y) dn.$$ This that has a spectral expansion \emph{only in terms of the Eisenstein spectrum}, and a geometric expansion as a sum over $A_H(k)$: $$ -\int_{B\backslash H({\mathbb{A}_k})} K_{f,B}(g,g) dg= -\sum_{\alpha\in A_H(k)} \int_{B\backslash H({\mathbb{A}_k})} \int_{N({\mathbb{A}_k})} \frac{f}{dh} (g^{-1} \alpha n g) dn dg.$$ In other words: \begin{equation} {\operatorname{TF}}_{-1} (f) = - \sum_{\alpha\in A_H(k)} \frac{\mathcal T f}{dt} (\alpha).\end{equation} This is the global comparison between the trace formula for $H=\operatorname{PGL}_2$ and the trace formula for its universal Cartan, via the local transfer operator. (For a general semisimple group of split rank $r$, the Laurent expansion will be of order $r$, and the coefficient of $s^{-r}$ will be the invariant distribution which is comparable to the trace formula of $A_H$.) \section{Lifting from the boundary degeneration} \label{sec:degen} In this section we let $X$ be a homogeneous, spherical, quasi-affine $G$-variety over a \emph{non-Archimedean field $F$ in characteristic zero}. A main theme of the present paper is the comparison between transfer operators involving such a variety $X$, and transfer operators involving its \emph{boundary degeneration}, as horospherical $G$-space which is, roughly, responsible for the continuous spectrum of $X$. We will assume that $G$ is split, since this case has been covered with more completeness in the literature, and we also assume that $X$ satisfies the technical assumptions of \cite[\S 2.1]{DHS} --- these ensure that $X$ satisfies the Paley--Wiener theorem \cite[Theorem 1.8]{DHS}, which we will recall below. We will also assume, for convenience, that $X$ carries a $G$-invariant measure. The assumptions are satisfied for all the varieties discussed in the present paper, namely: the group $\operatorname{SL}_2$, the space $\mathbb{G}_m\backslash \operatorname{PGL}_2$ and the ``Whittaker space'', i.e., the space $N\backslash G$ equipped with the line bundle defined by a non-degenerate character of the maximal unipotent subgroup $N$. We first recall the notion of a boundary degeneration, or asymptotic cone. The coordinate ring $F[X]$ is a multiplicity-free sum of irreducible $G$-modules, $F[X] = \bigoplus_\lambda F[X]_\lambda$, where $\lambda$ varies in a saturated monoid $\Lambda_X^{++}$ of dominant weights for $G$. The product $F[X]_\lambda\cdot F[X]_\mu$ has image in the sum of spaces $F[X]_\nu$, for some weight $\nu$ satisfying $\nu\preceq \lambda+\mu \overset{\mbox{def}}\iff (\lambda+\mu)-\nu \in R_G$, the positive root cone of $G$. This gives rise to a filtration of $F[X]$ by weights, with respect to the order $\succeq$. The corresponding $\Lambda_X^{++}$-graded ring ${\operatorname{gr}} F[X]$ is the coordinate ring of a horospherical affine $G$-variety $X_\emptyset^a$, whose open $G$-orbit, the (total) \emph{boundary degeneration} of $X$ we denote by $X_\emptyset$. The grading corresponds to an action of $A_X=$ the split torus with character group $\Lambda_X$ (= the group generated by $\Lambda_X^{++}$) on $X_\emptyset^a$ by $G$-automorphisms. The group $A_X$ will be called the \emph{universal Cartan} $A_X$ of $X$; it can also be defined as the quotient by which the universal Cartan $A$ of $G$ acts on the invariant-theoretic quotient $X\sslash N$ (where $N\subset B\twoheadrightarrow A$ is the unipotent radical of a Borel subgroup used to define $A$). The action of $A_X$ on the boundary degeneration $X_\emptyset$ can explicitly be described as follows: $X_\emptyset$ is isomorphic (up to a choice of base point) to $A_X\times^{P(X)^-} G$, where $P(X)^-$ is opposite to the parabolic subgroup $P(X)\subset G$ stabilizing the open Borel orbit, and the notation $\times^H$ means the quotient of the product by the diagonal action of $H$. For example, in the group case $X=H$ it can be identified with $T\times^{B_H\times B_H^-} (H\times H)$, where $B_H$, $B_H^-$ are two opposite Borel subgroups of $H$, and $T$ is their intersection (a Cartan subgroup of $H$). Clearly, all the usual spaces of functions, such as $L^2$ and Schwartz functions, on $X_\emptyset$ are parabolically induced from the corresponding spaces of functions on $A_X$ (using normalized parabolic induction from $P(X)^-$ to $G$). We define the action of $A_X$ on functions by \begin{equation}\label{action-normalized-functions} (a\cdot \Phi)(x) = \delta_{P(X)}^{\frac{1}{2}}(a) \Phi( a\cdot x), \end{equation} on half-densities by \begin{equation}\label{action-normalized-densities} (a\cdot f)(x) = f( a\cdot x), \end{equation} and on measures by \begin{equation}\label{action-normalized-measures} (a\cdot \mu)(x) = \delta_{P(X)}^{-\frac{1}{2}}(a) \mu( a\cdot x), \end{equation} where $\delta_{P(X)}$ is the modular character of the parabolic stabilizing the open Borel orbit in $X$. (Explicitly, if we write $X_\emptyset = S \backslash G$, where $S$ belongs to a parabolic $P$ of the class opposite to $P(X)$, so $A_X = P/S$, we have $\delta_{P(X)} = \delta_P^{-1}$; the above normalized actions are isometries on $L^2$-spaces.) Although we will not explicitly use it, it is helpful to think of the following construction, where $X$ degenerates to $X_\emptyset$: Any cocharacter $\check\lambda:\mathbb{G}_m\to A_X$ which is the image of a strictly dominant cocharacter into $A$ defines a homomorphism $\Lambda_X \to \mathbb Z$, which reduces the filtration of $F[X]$ to an $\mathbb N$-filtration with the same associated graded. Moreover, the standard Artin--Rees construction \cite{Popov} gives rise to a $G\times\mathbb{G}_m$-family $$ \mathcal X \to \mathbb{G}_a$$ (compatible with the action of $\mathbb{G}_m$ on the base), with $\mathcal X\times_{\mathbb{G}_a} \mathbb{G}_m = X^a\times\mathbb{G}_m$ (where $X^a=\operatorname{spec} F[X]$), and $\mathcal X_0:=\mathcal X\times_{\mathbb{G}_a}\{0\} = X_\emptyset^a$. (The group $\mathbb{G}_m$ acts on $X_\emptyset^a$ via the chosen cocharacter into $A_X \subset {\operatorname{Aut}}^G(X_\emptyset^a)$.) There is also a variant of this construction, where the open set is taken to be the quotient of $X^a\times\mathbb{G}_m$ by the intersection of $\check\lambda(\mathbb{G}_m)$ with the $G$-automorphism group of $X$; for example, for $X=\operatorname{SL}_2$ under the $G=\operatorname{SL}_2\times\operatorname{SL}_2$-action, and $\check\lambda=$the positive coroot, this variant gives $\mathcal X=\operatorname{Mat}_2=$ the Vinberg monoid of $\operatorname{SL}_2$, and the map to $\mathbb{G}_a$ is the determinant map. The above setup extends to cases of ``Whittaker induction'' from affine homogeneous varieties, cf.\ \cite[\S 2.6]{SV}. This includes the Whittaker model of $G$, which is the only case of Whittaker induction we will encounter in this paper, where the variety is $N\backslash G$, but its points are equipped with a complex line bundle $\mathcal L_\psi$ as in \S \ref{sec:Kuznetsov}. We will use the letter $X$ to refer to the data consisting of the variety and the line bundle; this changes the dual group, compared to the dual group of the variety equipped with the trivial line bundle --- in the Whittaker case, we have ${^LX} = {^LG}$, while with trivial character on $N$ the $L$-group of $X$ would just be the $L$-group of the universal Cartan of $G$. Moreover, the degeneration $X_\emptyset$ in the Whittaker case is the same variety $N\backslash G$, but equipped with the trivial line bundle. The family $\mathcal X$ of the previous paragraph (for any dominant coweight $\check\lambda$) is the trivial family $N\backslash G \times \mathbb{G}_a$, but the character defining the line bundle over the point $a\in \mathbb{G}_a$ is the character $x\mapsto \psi(\check\lambda(a) x \check\lambda(a)^{-1})$, thus specializing to the trivial character over zero. In all cases, the $L$-group of $X_\emptyset$ coincides with the $L$-group of $A_X$, thus we have a canonical embedding \begin{equation}\label{Ldegen} {^LX}_\emptyset\simeq {^LA_X} \hookrightarrow {^LX}. \end{equation} We let $X^\vee$ be equal to $X$ as a variety, but with the $G$-action twisted by a Chevalley involution, then all the above data for $X^\vee$ are ``dual'' to the data for $X$ --- for example, $A_{X^\vee}$ is obtained from $A_X$ by applying the Chevalley involution to the universal Cartan $A$. In the examples considered in this paper, we have $X\simeq X^\vee$ as $G$-varieties, except that in the Whittaker case one has to invert the character $\psi$ for $X^\vee$. In any case, there is no harm in proceeding with the general discussion. It seems that the correct quotient to consider for the relative trace formula, in order to analyze the spectrum of $X$, is $(X\times X^\vee)/G$. In analogy to the functorial lift discussed in \S \ref{sec:Cartan}, it is natural to ask whether there is a transfer map $$ \mathcal S(X\times X^\vee/G)\to \mathcal S(X_\emptyset \times X^\vee_\emptyset /G),$$ corresponding to the embedding \eqref{Ldegen} of $L$-groups. A very natural such map exists, as we shall see, at least in the non-Archimedean case, but we need to enlarge the space of measures on the right. Then the it descends from a canonical ``asymptotics'' map $\mathcal S(X)\to \mathcal S^+(X_\emptyset)$ (and same for $X^\vee$), provided by the theory of asymptotics, where $\mathcal S^+(X_\emptyset)$ is an extension of $\mathcal S(X_\emptyset)$, to be described. The asymptotics map is a canonical morphism $$ e_\emptyset^*: \mathcal S(X)\to \mathcal S^+(X_\emptyset),$$ characterized by the fact that $\varphi$ and $e_\emptyset^*(\varphi)$ are ``equal close to infinity'', for every $\varphi\in\mathcal S(X)$. For a rigorous definition of what this means, and the construction of the map, cf.\ \cite[\S 5]{SV}. Notice that there the asymptotics map was defined for functions, but here we consider it as a morphism of measures; there is a canonical way by which a $G$-invariant measure on $X$ induces a $G$-invariant measure on $X_\emptyset$, s.\ \cite[\S 4.2]{SV}, so there is no problem passing from functions to measures. The space $\mathcal S^+(X_\emptyset)$ was introduced in \cite{DHS}: it is the closure of $\mathcal S(X_\emptyset)$ under a set of ``scattering morphisms'' $\mathfrak S_w: \mathcal S(X_\emptyset) \to \mathcal M(X_\emptyset)$ parametrized by the little Weyl group $W_X$ of $X$. The scattering morphisms give rise to an action of $W_X$ on $\mathcal S^+(X_\emptyset)$ by $G$-automorphisms, which semi-commute with the action of $A_X$, i.e., for $t\in A_X$ we have $$t\cdot \mathfrak S_w f = \mathfrak S_w ({^{w^{-1}}t}\cdot f).$$ (Recall that the action of $A_X$ on measures has been normalized in \eqref{action-normalized-measures}.) The image of $e_\emptyset^*$ is precisely the subspace of $W_X$-invariants, with $W_X$ acting through the scattering operators --- this the Paley--Wiener theorem \cite[Theorem 1.8]{DHS}. At this point I stress that the boundary degeneration $X_\emptyset$ should not be considered just as an abstract $G$-variety, but as a $G$-variety equipped with extra structure, which is obtained from $X$. This extra structure is encoded in the scattering morphisms. The space $\mathcal S^+(X_\emptyset)$ is not determined by the abstract variety $X_\emptyset$, but by the variety plus the scattering morphisms, which depend on $X$. Now consider the morphisms induced by asymptotics: $$ e_\emptyset^* \otimes e_\emptyset^*: \mathcal S(X)\otimes\mathcal S(X^\vee)\to \mathcal S^+(X_\emptyset)^{W_X} \otimes\mathcal S^+(X_\emptyset^\vee)^{W_X}.$$ One can show that they descend to morphisms on the spaces of push-forward measures: \begin{equation}\label{Bcoinv} \mathcal E_\emptyset^*: \mathcal S(X\times X^\vee/G) \to \mathcal S^+(X_\emptyset \times X_\emptyset^\vee/G).\end{equation} Note that this is not automatic, because $\mathcal S^+(X_\emptyset \times X_\emptyset^\vee/G)$ cannot be identified with the $G^{\operatorname{diag}}$-coinvariants of $\mathcal S^+(X_\emptyset \times X_\emptyset)$. For example, when $X_\emptyset \simeq X_\emptyset^\vee = N\backslash \operatorname{SL}_2 \simeq \mathbbm A^2\smallsetminus\{0\}$, so $X_\emptyset \times X_\emptyset^\vee/G\simeq N\backslash G/N$, the map $\mathbbm A^2\smallsetminus\{0\}\to \mathfrak C\simeq \mathbbm A^1$ is the projection to a coordinate, but every evaluation on a point in the preimage of $0\in \mathfrak C$ is an $N$-invariant distribution. Nonetheless, using the invariance of the image of the asymptotics morphism $e_\emptyset^*$ under the scattering operators, one can show that the map $\mathcal E_\emptyset^*$ descending from $e_\emptyset^*\otimes e_\emptyset^*$ does exist, uniquely, and one can compute the pull-backs of \emph{relative characters} under this map. We will only present the final result for the examples considered in this paper. Note that the boundary degeneration $X_\emptyset^\vee$ for $X^\vee$ is isomorphic to $A_X\times^{P(X)} G$, whereas the boundary degeneration for $X$ is $A_X\times^{P(X)^-} G$. Thus, the quotient $\mathfrak{C}_\emptyset:= X_\emptyset \times X_\emptyset^\vee \sslash G$ contains an open subset which is an $A_X$-torsor, with the action of $A_X$ descending from the action on $X_\emptyset$. This identification of the open orbit as an $A_X$-torsor is compatible with our identification of an open subset of $N\backslash G\sslash N$ in \S \ref{sstrivialization} with $A$. Indeed, if $w$ denotes a representative of the longest Weyl group element, and $N^-=w^{-1} N w$, then $X_\emptyset$ can be considered as a quotient of $N^-\backslash G$ (non-canonically, up to a choice of base point on an $A$-orbit), $X_\emptyset^\vee$ as a quotient of $N\backslash G$, and hence $X_\emptyset \times X_\emptyset^\vee\sslash G$ as a quotient of $N^-\backslash G\sslash N$. The map $g\mapsto wg$ identifies $N\backslash G\sslash N$ with $N^-\backslash G\sslash N$, and this is the map used in \S \ref{sstrivialization} to identify an open subset of $N\backslash G/N$ with $A$; thus, the $A$-action on $N\backslash G\sslash N$ and on (its quotient) $X_\emptyset \times X^\vee_\emptyset\sslash G$ are compatible. Fixing a base point to identify this open $A_X$-torsor with $A_X$, a class of relative characters for $X\times X^\vee$ is given by \emph{Mellin transforms} over this open $A_X$-torsor: \begin{equation}\label{Mellin-boundary} \check f(\chi) = \int_{A_X} f(t) \chi^{-1}(t).\end{equation} For the space $\mathcal S(X_\emptyset\times X_\emptyset^\vee/G)$, this integral will converge for characters in some open region, and have analytic continuation to all characters. Notice that we do not normalize the action of $A_X$ on measures or functions on $\mathfrak{C}_\emptyset$, which is why a shift by $\delta_{P(X)}^{\frac{1}{2}}$ will appear in the formulas that follow. The analog of the integration formula \eqref{integration}, which now requires the modular character $\delta_{P(X)}$ instead of $\delta$, shows that the functional $f\mapsto \check f(\chi\delta_{P(X)}^{\frac{1}{2}})$ is a relative character associated to the normalized induced representation $I_{P(X)}(\chi)$, that is, its pull-back to $\mathcal S(X_\emptyset\times X_\emptyset^\vee)$ factors through a map: $$\mathcal S(X_\emptyset\times X_\emptyset^\vee) \to I_{P(X)}(\chi)\hat\otimes I_{P(X)}(\chi^{-1}) \to \mathbb{C}.$$ The pull-back of Mellin transform $f\mapsto \check f(\chi\delta_{P(X)}^{\frac{1}{2}})$ via $\mathcal E_\emptyset^*$ is a relative character $\mathcal I_\chi$ for the same representation, on the space $X\times X^\vee$. In the cases under consideration, where $X\simeq X^\vee$ except for changing the character $\psi$ to $\psi^{-1}$ in the Whittaker case, we have an ``inner product'' on $\mathcal S(X)\otimes \mathcal S(X^\vee)$, and we can ask how this relative character (for $\chi$ unitary) appears in the Plancherel decomposition of the most continuous part (cf. \cite[\S 14.1]{SV}) $L^2(X)_\emptyset$ of $L^2(X)$. The answer is given by the following theorem, which will be proven in \cite{SaTransfer1} by a calculation of scattering operators: \begin{theorem}\label{thmpullbackfrombd} There are choices of Haar measures on the spaces under consideration, and a choice of base point on the open $A_X$-orbit on $\mathfrak{C}_\emptyset$, compatible with global choices\footnote{That is, when the spaces are defined over a global field $k$, one can choose the base point to be defined over $k$ and the local Haar measures to factorize a Tamagawa measure. This includes the Haar measure on $A_X$ used in the definition of Mellin transform, which induces the Haar--Plancherel measure $d\chi$ on $\widehat{A_X}$ that appears in the statement of the theorem.}, such that the Plancherel decomposition for $L^2(X)_\emptyset$ reads: $$\int_X \frac{\varphi_1 \cdot \varphi_2}{dx} = \frac{1}{|W_X|}\int_{\widehat{A_X}} \mathcal I_\chi(\varphi_1\otimes\varphi_2) \mu_X(\chi) d\chi,$$ where the scalar $\mu_X(\chi)$ is given by the following formulas: \begin{itemize} \item For the Whittaker case, $X = N\backslash G$ equipped with a character $\psi\circ $(a sum of non-zero functionals on the simple root spaces), \begin{equation} \mu_X(\chi) = \prod_{\alpha>0} \gamma(\chi, \check\alpha, 0, \psi^{-1}).\end{equation} \item For the group case, $X = H$ under the $G=H\times H$-action, \begin{equation} \mu_X(\chi) = \prod_{\alpha>0} \gamma(\chi, -\check\alpha, 0, \psi^{-1}) \cdot \gamma(\chi, \check\alpha, 0, \psi^{-1}).\end{equation} \item Finally, for the variety $X = \mathbb{G}_m\backslash \operatorname{PGL}_2$, \begin{equation} \mu_X(\chi) = \gamma(\chi,-\frac{\check\alpha}{2}, \frac{1}{2}, \psi^{-1})^2 \cdot \gamma(\chi,\check\alpha, 0, \psi^{-1}).\end{equation} \end{itemize} \end{theorem} The operator $\mathcal E_\emptyset^*$ plays a similar role as the transfer operator $\mathcal T$ that we are using in other comparisons, but we denote it by a different letter in order to avoid confusion when composing it with other transfer operators. Its geometric expression (i.e., the analog of \eqref{transfer-Cartan}) seems to be hard to describe, in general, and we will not proceed in this direction. We will instead investigate, with the help of the above analysis of relative characters, whether we can have commutative diagrams \begin{equation}\label{Bcommute} \xymatrix{ \mathcal S(X\times X^\vee/G) \ar[r]^{\mathcal E_\emptyset^*}\ar[d]^{\mathcal T} & \mathcal S^+(X_\emptyset\times X_\emptyset^\vee/G) \ar[d]^{\mathcal T_\emptyset} \\ \mathcal S(Y\times Y^\vee/G') \ar[r]^{\mathcal E_\emptyset^*} & \mathcal S^+(Y_\emptyset\times Y_\emptyset^\vee/G') }\end{equation} for the tranfer operators $\mathcal T$, $\mathcal T_\emptyset$ between the ${\operatorname{RTF}}$ quotients for two spherical varieties $X$ and $Y$ and their boundary degenerations, and whether there are similarities between the geometric expressions of $\mathcal T$ and $\mathcal T_\emptyset$. We assume that our spherical varieties $X$ and $Y$ belong to the list of varieties of Theorem \ref{thmpullbackfrombd}, and have the same dual group. In particular, the spaces $X_\emptyset\times X_\emptyset^\vee\sslash G$ and $Y_\emptyset\times Y_\emptyset^\vee\sslash G'$ both contain the same torus $A_X\simeq A_Y$ as an open subset (after fixing a base point, which we do as in the theorem). To describe the ``correct'' transfer operators $\mathcal T_\emptyset$ that will make the diagram \eqref{Bcommute} commute, we should take into account the calculation of pull-backs of relative characters. Thus, in the end, the ``correct'' operators $\mathcal T_\emptyset$ do not depend just on the varieties $X_\emptyset$, $Y_\emptyset$ as abstract varieties, which might be isomorphic to each other, but also on the scattering morphisms that they are endowed with (which underlie the calculation of Theorem \ref{thmpullbackfrombd}). More precisely, for the diagram \eqref{Bcommute} to commute, we would need the following to hold, using the scalars $\mu_X(\chi), \mu_Y(\chi)$ of Theorem \ref{thmpullbackfrombd}: \begin{equation}\label{degentransferfe} \mu_Y(\chi) \widecheck{(\mathcal T_\emptyset f)}(\chi\delta_{P(Y)}^{\frac{1}{2}}) = \mu_X(\chi) \check f(\chi\delta_{P(X)}^{\frac{1}{2}}). \end{equation} Formally, at least, this means that the operator $\mathcal T_\emptyset$ is given as multiplicative convolution on $A_X$ by the measure $\nu_{X_\emptyset\to Y_\emptyset}$ whose Mellin transform is \begin{equation}\label{degentransfermeasure} \check\nu_{X_\emptyset\to Y_\emptyset} (\chi) = \frac{\mu_Y(\chi \delta_{P(Y)}^{-\frac{1}{2}})}{\mu_X(\chi \delta_{P(X)}^{-\frac{1}{2}})}. \end{equation} We will explicate these transfer operators case-by-case in the examples that follow. \part{Special examples} \section{Kuznetsov to trace formula for $\operatorname{SL}_2$} \label{sec:Rudnick} Here we discuss the local comparison behind Rudnick's thesis \cite{Rudnick}. The goal is to compare stable orbital integrals for the trace formula and the Kunzetsov formula for the group $\operatorname{SL}_2$. Both the group $G=\operatorname{SL}_2$, and the Whittaker space $(N,\psi)\backslash G$ have the same dual group, namely, $\operatorname{PGL}_2$. So, we expect a local transfer map $$ \mathcal T: \mathcal S^-((N,\psi)\backslash G/(N,\psi)) \to \mathcal S(\frac{G}{G}),$$ which gives rise to stable functoriality between the Kuznetsov and the Selberg trace formula. The non-standard space $\mathcal S^-((N,\psi)\backslash G/(N,\psi)) $ of orbital integrals is the one corresponding to $L(\mathrm{Ad}, 1)$, as we will recall below. As before, we choose the identification $N\backslash G\sslash N = \mathbb{G}_a$ given by $$ \begin{pmatrix} a & b \\ c & d \end{pmatrix}\mapsto \zeta:= c,$$ and the section $ \zeta\mapsto \tilde\zeta =\left(\begin{array}{cc} & -\zeta^{-1} \\ \zeta & \end{array}\right)$ over $\mathbb{G}_m$. We fix the chosen self-dual (with respect to $\psi$) Haar measure on $\mathbb{G}_a\simeq N$ and $\mathbb{G}_a \simeq N\backslash G\sslash N$; the integration formula \eqref{integration} now reads: \begin{equation}\label{integration-KTF} \int_G \Phi(g) dg = \int_{N\backslash G\sslash N} \int_{N\times N} \Phi(n_1 \tilde\zeta n_2) dn_1 dn_2 d\zeta, \end{equation} for a choice of Haar measure on $G$ that we fix from now on. We will actually make no direct reference to Rudnick's thesis --- it is left to the reader to check that it can be reformulated in terms of the local comparison that we present here. Rather, we will start as in Section \ref{sec:Cartan}, by asking ourselves what is the correct pull-back $\mathcal T^*\Theta_\Pi$ of a tempered, stable character of $G$. It should be a relative character, or ``Bessel distribution'' (more correctly: Bessel generalized function) for the Kuznetsov formula, corrresponding to the generic representation $\pi$ in the packet denoted by $\Pi$. Recall that $L$-packets for $\operatorname{SL}_2$ consist of the irreducible components of restrictions of irreducible representations of $\operatorname{GL}_2$, and that there exists a unique generic representation (for the given Whittaker datum $(N,\psi)$) in each tempered packet. The space of such Bessel distributions is one-dimensional, because this is the case for the space of morphisms \begin{equation}\label{morphism}\mathcal S(N,\psi\backslash G)\hat\otimes\mathcal S(N,\psi^{-1}\backslash G) \to \pi \hat\otimes\tilde\pi;\end{equation} the only question is what is the correct choice of scalar. The answer is provided by global considerations, namely by the well-known relation between Petersson norms and Fourier coefficients of automorphic forms on $\operatorname{GL}_2$ (or $\operatorname{SL}_2$). More precisely, the following formula is known in this case for the square of the Whittaker period of a cusp form $\varphi \in \pi$, where $\pi$ denotes a generic automorphic representation of $\operatorname{SL}_2$: \begin{equation} \left|\int_{[N]} \varphi(n) \psi(n) dn \right|^2 = \prod_v^* \int^*_{N} \left<\pi_v(n) \varphi_v, \varphi_v\right> \psi(n) dn. \end{equation} Here, we have fixed an isomorphism of abstract, unitary adelic representations: $\pi = \bigotimes_v' \pi_v$, and have assumed, accordingly, that the vector $\varphi\in \pi$ factorizes as a product of $\varphi_v$'s. The measure on $[\operatorname{SL}_2]$ used to define the unitary structure on $\pi$ is Tamagawa measure, while the $\pi_v$'s are abstract unitary representations of $G(k_v)$, with a distinguished spherical vector $\varphi_v^0$ at almost every place, satisfying $\Vert \varphi_v^0\Vert = 1$. In the formula above both the Euler product and the local integrals have to be understood in a regularized sense: The integral is understood as the value at $\lambda =1$ of the Fourier transform (defined as $\int \Phi(x)\psi(\lambda x) dx$) of the $L^2$-function $n\mapsto \left<\pi(n) \varphi_v, \varphi_v\right>$ (where $N$ is identified again with $\mathbb{G}_a$) --- I point the reader to \cite[\S 6.3]{SV} for details. The local factors of the Euler product are equal to the inverse adjoint unramified $L$-value $L(\pi_v, \mathrm{Ad}, 1)^{-1}$ at almost every place $v$, and their product has to be understood as the inverse of a partial $L$-value $L^S(\pi, \mathrm{Ad},1)^{-1}$ for a large enough finite set $S$ of places, times the remaining factors. The validity of this formula follows from Rankin--Selberg theory --- I point the reader to \cite[Theorem 3.2]{LM} or \cite[\S 18.1]{SV} for details. The formula conjecturally generalizes to arbitrary groups, according to a conjecture of Lapid and Mao \cite{LM} which resembles the Ichino--Ikeda conjecture \cite{II}. Returning to local notation, with $\pi$ an irreducible generic represenation of $G(F)$, it is natural to demand that the correctly normalized Bessel distribution $J_\pi$ (or $J_\Pi$, where $\Pi$ denotes the $L$-packet of $\pi$) be such that the adjoint of \eqref{morphism}, composed with evaluation on the cosets of $1$, is the $(N,\psi)\otimes (N,\psi^{-1})$-equivariant functional $$\tilde\pi\hat\otimes\pi\ni \tilde v \otimes v\mapsto \int^*_{N} \left<\pi(n) v, \tilde v\right> \psi(n) dn.$$ Explicitly, $$ J_\Pi(\Phi_1\otimes\Phi_2) = \sum_{(v,\tilde v)} \int_{(N\backslash G)^2} \Phi_1(x_1)\Phi_2(x_2) \int^*_{N} \left<\pi(nx_1) v, \tilde\pi(x_2)\tilde v\right> \psi(n) dn,$$ where $(v,\tilde v)$ runs over dual pairs in dual bases of $\pi$ and $\tilde\pi$. We are now seeking the transfer operator from $\mathcal S((N,\psi)\backslash G/(N,\psi)) $ to $\mathcal S(\frac{G}{G})$ that will pull back the stable character $\Theta_\Pi$ to $J_\Pi$. If we believe that this operator should indeed have image in $\mathcal S(\frac{G}{G})$, which happens to be identified with the space of coinvariants of $\mathcal S(G)$ under the $\operatorname{PGL}_2$-adjoint action, then it is completely determined by this property, over all tempered packets $\Pi$, since stable tempered characters are dense in the space of stable tempered distributions. The following theorem will be proven in \cite{SaTransfer1, SaTransfer2}: \begin{theorem}\label{thmRudnick} Fix the isomorphism $N\backslash G\sslash N \simeq \mathbb{G}_a$ as before, thus identifying the subvariety $Y$ of anti-diagonal matrices used to trivialize orbital integrals (\S \ref{sstrivialization}) with $\mathbb{G}_m$. Fix the isomorphism $\Dfrac{G}{G} \simeq \mathbb{G}_a$ via the trace map. Consider the equivariant Fourier transform $\mathcal T:=\mathscr F_{\operatorname{Id},1}$ of multiplicative convolution with the measure $D_1 = \psi(\zeta) d\zeta = \psi(\zeta) |\zeta|d^\times\zeta$ on $\mathbb{G}_m$. Then: \begin{enumerate} \item The convolution makes sense on $\mathcal S(N,\psi\backslash G/N,\psi)$ as the Fourier transform of a distribution, and maps it into $\mathcal S(\frac{G}{G})$. \item For every tempered packet $\Pi$ and $J_\Pi$ as above, \begin{equation} \label{pullbackchar} \mathcal T^*\Theta_\Pi = J_\Pi. \end{equation} \item The transform extends to an isomorphism, given by the same convolution understood, again, as the Fourier transform of a(n $L^2$-)distribution: \begin{equation} \mathcal T: \mathcal S_{L(\mathrm{Ad},1)}^-(N,\psi\backslash G/N,\psi) \xrightarrow\sim \mathcal S(\frac{G}{G}), \end{equation} where the space on the left is the extended Schwartz space associated to the adjoint $L$-function at $1$, described in \S \ref{ssnonstandard}. \item At non-Archimedean places, it satisfies the fundamental lemma for the Hecke algebra, namely: for all $h\in \mathcal H(G,K)$, it takes the element $$ h\cdot f^0_{L(\mathrm{Ad}, 1)} \in \mathcal S_{L(\mathrm{Ad},1)}^-(N,\psi\backslash G/N,\psi)$$ to the image of $h\cdot 1_{G(\mathfrak o)}dg$ in $\mathcal S(\frac{G}{G})$, for a suitable Haar measure $dg$. \end{enumerate} \end{theorem} The last statement of the proposition needs clarification: First of all, $K = \operatorname{SL}_2(\mathfrak o)$, where $\mathfrak o$ denotes the ring of integers of $F$. For a $G$-space $X$, the unramified Hecke algebra $\mathcal H(G,K)$ acts on $C^\infty(X)^K$. Since our basic vector $f^0_{L(\mathrm{Ad}, 1)}$ descends, by definition (\S \ref{ssnonstandard}), from an unramified Whittaker measure $\varphi$, we write $h\cdot f^0_{L(\mathrm{Ad}, 1)} $ for the image of $h\cdot \varphi$ in $\mathcal S^-_{L(\mathrm{Ad}, 1)} (N,\psi\backslash G/N,\psi)$. More intrinsically, the action of the unramified Hecke algebra on unramified vectors can be identified with the action of the ``unramified'' component of the Bernstein center (which is isomorphic to $\mathcal H(G,K)$), and this action descends to the coinvariant space $$ \mathcal S(N,\psi\backslash G/N,\psi) = \mathcal S((N,\psi\backslash G) \times (N,\psi^{-1}\backslash G))_{G^{\operatorname{diag}}}$$ (via its action on the first factor) and its extensions. Thus, it is not really an abuse of notation to write $h\cdot f^0_{L(\mathrm{Ad}, 1)} $, if we identify the unramified Hecke algebra with the unramified component of the Bernstein center. The statement on the action of the Hecke algebra is superfluous, here, because it can be inferred from the fundamental lemma for basic vectors, together with the statement on characters. In more general cases, though, it will be impossible to prove the statement on characters by a local argument. In those cases, the fundamental lemma for the full Hecke algebra will be the essential local input in order to separate a global identity of trace formulas into the contributions of individual $L$-packets and thus, via a global-to-local argument, prove the local transfer of relative characters. What the reader should take away from the theorem above is that a local transfer operator characterized spectrally, in terms of relative characters, has a very simple geometric form --- essentially, a Fourier transform. This lies behind the global comparison of trace formulas in the thesis of Rudnick, who only considered holomorphic modular forms, and it should also be related to the Poisson summation formula between an approximation to the trace formula and an approximation to the Kuznetsov formula, proven in the work of Ali Altu\u{g} \cite{Altug1}. It should be possible to use the methods of \cite{SaBE2} to upgrade this to a full comparison of trace formulas, where on the Kuznetsov side, because of the insertion of $L$-functions, the relative trace formula needs to be understood using analytic continuation from $L(\mathrm{Ad}, 1+s)$ to $L(\mathrm{Ad}, 1)$ (again, as in \cite{SaBE2}). Finally, we can compare the transfer operator $\mathcal T$ of the theorem above with the transfer opertor $\mathcal T_\emptyset$ for the boundary degenerations of the group and the Whittaker space. Recall that, for $Y=\operatorname{SL}_2$, we have $Y_\emptyset = $ the variety of $2\times 2$ matrices of rank one, while for $X=$ the Whittaker model we have $X_\emptyset=$ the same space $N\backslash G$ with trivial character on $N$. Equation \eqref{degentransferfe} together with Theorem \ref{thmpullbackfrombd} in this case read: $$ \check f(\chi) = \gamma(\chi\delta^{-\frac{1}{2}}, -\check\alpha, 0, \psi^{-1}) \widecheck{\mathcal T_\emptyset f} (\chi)= \gamma(\chi,-\check\alpha,1, \psi^{-1}) \widecheck{\mathcal T_\emptyset f} (\chi),$$ and Proposition \ref{gamma} implies that the transfer operator $\mathcal T_\emptyset$ in this case should be given by $\mathscr F_{\check\alpha, 1}$. (Note that $\gamma(\chi,-\check\alpha,1, \psi^{-1})^{-1} = \gamma(\chi,\check\alpha,0, \psi)$.) We notice that, for the coordinates on $N\backslash G\sslash N$ and $\Dfrac{G}{G}$ fixed here, the transfer operator $\mathcal T$ is exactly the same as the transfer operator $\mathcal T_\emptyset$, namely, convolution by the measure $D_1$! \section{Kuznetsov to relative trace formula for toric periods} \label{sec:Waldspurger} Now consider the case of $\mathfrak{X}=T\backslash G/T$, where $G=\operatorname{PGL}_2$ and $T\simeq \mathbb{G}_m$ is a split torus. One could also consider a non-split torus, but would need to slightly modify the equivariant Fourier transforms that we presented in \S \ref{sec:Fourier}. The role of the character $\Theta_\Pi$, here, will be played by a relative character $I_\pi$ for an irreducible tempered representation of $\operatorname{PGL}_2$, for the quotient space $\mathbb{G}_m\backslash \operatorname{PGL}_2/\mathbb{G}_m$. The definition of the relative character $I_\pi$ is completely analogous to that of the Kuznetsov relative character $J_\pi$: It is given as the composition $$ \mathcal S(X\times X)\to \pi\hat\otimes\tilde\pi\to\mathbb{C}$$ (where $X=T\backslash G$), where the dual of the map to $\pi\hat\otimes\tilde\pi$ is the morphism $$ \tilde\pi\otimes\pi\to C^\infty(X\times X)$$ that, composed with evaluation at $T1 \times T1$ is given by: $$\tilde v \otimes v\mapsto \int_{T} \left<\pi(t) v, \tilde v\right> dt.$$ Here the integral is convergent (for tempered representations), and no normalization is needed. Moreover, the $L$-packets for the group $\operatorname{PGL}_2$ are singletons (if we do not consider its inner forms, which we should have, in the case of a non-split torus), therefore there is no need to distinguish, notationally, between $\pi$ and its $L$-packet $\Pi$. The following theorem is a reformulation of results proven in \cite{SaBE1, SaBE2}. \begin{theorem} Fix the isomorphism $N\backslash G\sslash N \simeq \mathbb{G}_a $ as before, and an isomorphism $T\backslash G\sslash T = \mathbb{G}_a$ such that the identity element of $G$ maps to $1 \in \mathbb{G}_a$, and the non-trivial element of the Weyl group of $T$ maps to $0$. Consider the equivariant Fourier transform $\mathcal T:=\mathscr F_{\operatorname{Id},1} \circ \mathscr F_{\operatorname{Id},1}$ of multiplicative convolution, twice, with $D_{1} = \psi(\bullet) |\bullet| d^\times\bullet$ on measures on $\mathbb{G}_m$. Then: \begin{enumerate} \item The convolution makes sense on $\mathcal S(N,\psi\backslash G/N,\psi)$ as the Fourier transform of a distribution, and maps it into $\mathcal S(T\backslash G/T)$. \item For every tempered representation $\pi$, \begin{equation} \mathcal T^*I_\pi = J_\pi. \end{equation} \item The transform extends to an isomorphism, given by the same convolution understood, again, as the Fourier transform of a(n $L^2$-)distribution: \begin{equation} \mathcal T: \mathcal S_{L({\operatorname{Std}},\frac{1}{2})^2}^-(N,\psi\backslash G/N,\psi) \xrightarrow\sim \mathcal S(T\backslash G/T). \end{equation} \item At non-Archimedean places, it satisfies the fundamental lemma for the Hecke algebra, namely: for all $h\in \mathcal H(G,K)$, it takes the element $$ h\cdot f^0_{L({\operatorname{Std}}, \frac{1}{2})^2} \in \mathcal S_{L({\operatorname{Std}},\frac{1}{2})^2}^-(N,\psi\backslash G/N,\psi)$$ to the image of $h\cdot 1_{T\backslash G(\mathfrak o)}$ in $\mathcal S(T\backslash G/T)$. \end{enumerate} \end{theorem} \begin{proof} The matching of the two spaces is \cite[Theorem 5.1]{SaBE1}, and the fundamental lemma for the Hecke algebra is \cite[Theorem 5.4]{SaBE1}. Note some differences in the coordinates used here and there: our coordinate $\xi$ for the Kuznetsov formula is $-\xi^{-1}$ there, and our isomorphism $T\backslash G\sslash T = \mathbb{G}_a$ is the negative of the isomorphism of \emph{loc.cit.} If we take these changes of coordinates into account, the transfer operator $|\bullet| \mathcal G$ of \cite[Theorem 5.1]{SaBE1}, from orbital integrals for $T\backslash G/T$ to orbital integrals for the Kuznetsov formula, becomes twice convolution with the measure $\psi^{-1}(\frac{1}{x}) d(\frac{1}{x})$ on $F^\times$; the inverse of that is twice convolution with $\psi(x) d^\times x$. This is the transfer operator between the \emph{functions} of orbital integrals, whereas (in our current coordinates) the Schwartz measures for both $T\backslash G/T$ and $(N,\psi)\backslash G/(N,\psi)$ are the product of those functions with an additive Haar measure on $\mathbb{G}_a$. Thus, the transfer operator $\mathcal T$ from test measures for the Kuznetsov formula to test measures for $T\backslash G/T$ is given by twice convolution by $\psi(x) |x| d^\times x$. The statement on relative characters is \cite[Theorem 7.1.3]{SaBE2}. \end{proof} Again, we can compare the transfer operator $\mathcal T$ of the theorem above with the transfer operator $\mathcal T_\emptyset$ for the boundary degenerations of the space $Y=\mathbb{G}_m\backslash \operatorname{PGL}_2$ and the Whittaker space. In both cases, here, $X_\emptyset \simeq Y_\emptyset \simeq N\backslash G$ (but endowed with different scattering operators). Equation \eqref{degentransfermeasure}, together with Theorem \ref{thmpullbackfrombd} in this case read: $$ \check f(\chi) = \gamma(\chi\delta^{-\frac{1}{2}}, -\frac{\check\alpha}{2}, \frac{1}{2}, \psi^{-1})^2 \cdot \widecheck{\mathcal T_\emptyset f} (\chi)= \gamma(\chi,-\frac{\check\alpha}{2},1, \psi^{-1})^2 \cdot \widecheck{\mathcal T_\emptyset f} (\chi),$$ and Proposition \ref{gamma} implies that the transfer operator $\mathcal T_\emptyset$ in this case should be given by $\mathscr F_{\frac{\check\alpha}{2}, 1}\circ \mathscr F_{\frac{\check\alpha}{2}, 1}$. Again, for the coordinates on $N\backslash G\sslash N$ and $T\backslash G\sslash T$ fixed here, the transfer operator $\mathcal T$ is exactly the same as the transfer operator $\mathcal T_\emptyset$! \section{Functional equation for the standard $L$-function of $\operatorname{GL}_n$} \label{sec:standard} Unlike the case of transfer operators between different relative trace formulas, for the functional equations of $L$-functions it turns out that we get more natural formulas working with \emph{half-densities}. Let $G=\operatorname{GL}_n$. The theorem that follows is due to Jacquet \cite[Theorem 1]{Jacquet}. To state it, recall that we have identified an open subset of $N\backslash G\sslash N$ with the universal Cartan $A$, by identifying the latter with the torus $T$ of diagonal matrices (through the upper triangular Borel), embedded as $T\mapsto wT \to N\backslash G\sslash N$. Here, choose $w=w_n=$ the anti-diagonal matrix whose entries on the anti-diagonal are all $1$. \begin{theorem}\label{thmJacquet} Let $G=\operatorname{GL}_n$. Consider the diagram $$\xymatrix{ \mathcal D(\operatorname{Mat}_n) \ar[d]\ar[r]^{\mathcal F}& \mathcal D(\operatorname{Mat}_n^\vee)\ar[d]\\ \mathcal D^-_{L({\operatorname{Std}},\frac{1}{2})}(N,\psi\backslash G/N,\psi) \ar@{-->}[r]^{\mathcal H_{{\operatorname{Std}}}} & \mathcal D^-_{L({\operatorname{Std}}^\vee,\frac{1}{2})}(N,\psi\backslash G/N,\psi) }$$ where $\mathcal F$ denotes the equivariant Fourier transform: $$ \mathcal F(\varphi) (y) = \left(\int_{\operatorname{Mat}_n} \varphi(x) \psi(\left<x, y\right>) dx^\frac{1}{2}\right) dy^\frac{1}{2}$$ (for dual Haar measures $dx$, $dy$ on $\operatorname{Mat}_n$ and $\operatorname{Mat}_n^\vee$ with respect to the character $\psi$). There is a linear isomorphism $\mathcal H_{{\operatorname{Std}}}$ as above, making the diagram commute. Moreover, $\mathcal H_{{\operatorname{Std}}}$ is given by the following formula: \begin{equation} \mathcal H_{{\operatorname{Std}}} = \mathscr F_{-\check\epsilon_1,\frac{1}{2}} \circ \psi(-e^{-\alpha_1}) \circ \mathscr F_{-\check\epsilon_2,\frac{1}{2}} \circ \cdots \circ \psi(-e^{-\alpha_{n-1}}) \circ \mathscr F_{-\check\epsilon_n, \frac{1}{2}}, \end{equation} where by $\check\epsilon_i$ we denote the cocharacter of the $i$-th coordinate of the torus of diagonal elements (written additively), identified with the universal Cartan via the Borel of upper triangular elements (and hence the cocharacter into the $i$-th column of the anti-diagonal, when we identify it with this torus via $a\mapsto w_n a$). The intervening factors $\psi(-e^{-\alpha_i})$ denote multiplication by $\psi$ composed with the minus the value of the indicated root (denoted exponentially here, to avoid confusion with the additive notation for weights).\footnote{For example, for $G=\operatorname{GL}_2$, $\psi(-e^{-\alpha_1})$ denotes the function $\begin{pmatrix} a & * \\ &d \end{pmatrix}\mapsto \psi(-\frac{d}{a})$. } \end{theorem} \begin{remark} Notice that the transform $\mathcal H_{{\operatorname{Std}}}$ by construction satisfies the fundamental lemma for the Hecke algebra: the basic vector\footnote{We use the same symbol for the ``half-density'' basic vector as for the ``measure'' basic vector; their quotient is simply a half-density $(\delta(t) dt)^\frac{1}{2}$ on $N\backslash G\sslash N$, according to the integration formula \eqref{integration}. (Remember that $dt$ denotes a Haar measure on the torus $A$, here.)} $f^0_{L({\operatorname{Std}},\frac{1}{2})}$ maps to the basic vector $f^0_{L({\operatorname{Std}}^\vee,\frac{1}{2})}$, and the same holds for their Hecke translates. Indeed, the basic vectors are push-forwards of the characteristic functions of $\operatorname{Mat}_n(\mathfrak o)$, resp.\ $\operatorname{Mat}_n(\mathfrak o)$, times a Haar half-density on the additive group of matrices, and Fourier transform takes one to the other, and is equivariant with respect to the $G$-action (in particular, the action of the Hecke algebra). \end{remark} \begin{proof} Jacquet's Theorem 1 in \cite{Jacquet} is stated for the functions $$a\mapsto |\det(a)|^\frac{n-1}{2} \delta^\frac{1}{2}(a) O_a(\Phi),$$ where $O_a$ is the orbital integral represented by $a$, and $\Phi\in \mathscr F(\operatorname{Mat}_n)$, the Schwartz space of \emph{functions} on $\operatorname{Mat}_n$. To compare it with our setup, where a density on $\operatorname{Mat}_n$ is of the form $|\det|^{\frac{n}{2}}\Phi$ (times a Haar half-density on $G$) and its push-forward as an element of $\mathcal D^-_{L({\operatorname{Std}},\frac{1}{2})}(N,\psi\backslash G/N,\psi) $ is equal to $f:=|\det(p)|^\frac{n}{2} \delta^\frac{1}{2}(p) O_p(\Phi)$ (times a Haar half-density on the torus), the measures $dp_1 \cdots dp_n$ in Jacquet's formula have to be multiplied by $|p_1 \cdots p_n|^{-\frac{1}{2}}$. Moreover, Jacquet's result is in terms of an endomorphism of $\mathscr F(\operatorname{Mat}_n)$ that he denotes by $\check\Phi$. To make this into our equivariant transform $\mathcal F$ from $\mathcal D(\operatorname{Mat}_n)$ to $\mathcal D(\operatorname{Mat}_n^\vee)$, we must set $$ \mathcal F(|\det|^{\frac{n}{2}}\Phi)(g) = |\det(g)|^{-\frac{n}{2}} \check\Phi(w_n g^{-1} w_n) = |\det(g)|^{-\frac{n}{2}} \hat \Phi(g^{-1})$$ (using Jacquet's notation --- compare with \eqref{pushf-Matn}), and replace $\psi$ by $\psi^{-1}$ in Jacquet's definition of $\hat\Phi$. The push-forward of this to $\mathcal D^-_{L({\operatorname{Std}}^\vee,\frac{1}{2})}(N,\psi\backslash G/N,\psi) $ is $$ \mathcal H_{{\operatorname{Std}}} f = |\det(b)|^{-\frac{n}{2}} \delta^\frac{1}{2}(b) O_{w_n b w_n}(\check\Phi)$$ (times the same Haar half-density on the torus as before). Thus, if our coordinate is an anti-diagonal element $b$ with entry $b_i$ on the $i$-th column, we must set $a_i = b_{n+1-i}^{-1}$ in Jacquet's formula, multiply the final result by $|b_1 \cdots b_n|^{-\frac{1}{2}}$, and replace $\psi$ by $\psi^{-1}$. It then reads: $$\mathcal H_{{\operatorname{Std}}} f (b_1, \dots, b_n) = $$ $$= \int f(b_1 p_1, \dots, b_n p_n) \psi(\sum_{i=1}^n p_i - \sum_{i=1}^{n-1} \frac{b_{i+1}}{p_i b_i}) |p_1 \cdots p_n|^\frac{1}{2} d^\times p_1 \cdots d^\times p_n,$$ which is the formula of the theorem. \end{proof} The theorem implies a statement about pull-backs of relative characters via Hankel transforms. Namely, let $J_\pi$ denote the Kuznetsov relative character of an irreducible representation $\pi$ of $G$, defined exactly as (for $\operatorname{SL}_2$) in Section \ref{sec:Rudnick}, but now considered as a generalized half-density by multiplying by a half-density of the form $\delta(t)^\frac{1}{2} (dt)^\frac{1}{2}$ (cf.\ \eqref{pushf-densities}). Its pull-back (dual to the twisted push-forward $p_!$) to $G$ is a generalized matrix coefficient for $\pi$, thought of as a functional on half-densities on $G$. As $\pi$ varies in the family $\{\pi \otimes |\det|^s\}_{s\in \mathbb{C}}$, we can extend $J_\pi$ to a meromorphic family of functionals on $\mathcal D(\operatorname{Mat}_n)$, first by a convergent integral (when $\Re(s)\gg 0$), and then by meromorphic continuation. We can similarly consider it as a meromorphic family of functionals on $\mathcal D(\operatorname{Mat}_n^\vee)$. The adjoint of equivariant transform $\mathcal F$ acts by the scalar $\gamma(\pi, {\operatorname{Std}}, \frac{1}{2}, \psi)$ on generalized matrix coefficients of $\pi$, and thus we get: \begin{corollary}\label{corcharsHankel} We have \begin{equation}\mathcal H_{{\operatorname{Std}}}^* J_\pi = \gamma(\pi, {\operatorname{Std}}, \frac{1}{2}, \psi) \cdot J_\pi,\end{equation} as meromorphic families of functionals on $\mathcal D^-_{L({\operatorname{Std}},\frac{1}{2})}(N,\psi\backslash G/N,\psi)$. \end{corollary} We notice, again, that the operator (which here we call ``Hankel transform'') has a very simple form, given as a composition of equivariant Fourier transforms, with some intervening scalar factors. Globally, these scalar factors are equal to $1$ at every point of $A(k)$. Thus, it seems plausible that one could prove an equality of Kuznetsov formulas, one applied to a half-density $ f\in \mathcal D^-_{L({\operatorname{Std}},\frac{1}{2})}(N,\psi\backslash G/N,\psi)$ and the other applied to the half-density $\mathcal H_{{\operatorname{Std}}} f \in \mathcal D^-_{L({\operatorname{Std}}^\vee,\frac{1}{2})}(N,\psi\backslash G/N,\psi)$. In fact, the reader can check that the operator of the functional equation for the \emph{square} of the standard $L$-function, introduced in \cite[Proposition 6.5.2]{SaBE2} and denoted by $\mathcal T$ there, is the square of our Hankel transform $\mathcal H_{{\operatorname{Std}}}$; this operator was used in \emph{loc.cit}.\ to give a purely trace formula-theoretic proof of the functional equation of the square of the standard $L$-function. I also point the reader to Herman's paper \cite{Herman} which, although not written in local language, gives a similar proof for the functional equation of the standard $L$-function. Finally, taking boundary degenerations into consideration, we can examine whether there is a commutative diagram \begin{equation} \xymatrix{ \mathcal D^-_{L({\operatorname{Std}},\frac{1}{2})}(N,\psi\backslash G/N,\psi) \ar[r]^{\mathcal E_\emptyset^*}\ar[d]^{\mathcal H_{\operatorname{Std}}} & \mathcal D^\pm_{L({\operatorname{Std}},\frac{1}{2})}(N\backslash G/N) \ar[d]^{\mathcal H_{{\operatorname{Std}},\emptyset}} \\ \mathcal D^-_{L({\operatorname{Std}}^\vee,\frac{1}{2})}(N,\psi\backslash G/N,\psi) \ar[r]^{\mathcal E_\emptyset^*} & \mathcal D^\pm_{L({\operatorname{Std}}^\vee,\frac{1}{2})}(N\backslash G/N) }\end{equation} for some suitable operator $\mathcal H_{{\operatorname{Std}},\emptyset}$. The spaces on the right are obtained by applying the asymptotics morphisms on the spaces on the left --- we will refrain from examining these spaces here. It will suffice, for here, to observe that, for the diagram to commute, the operator $\mathcal H_{{\operatorname{Std}},\emptyset}$ should act on Mellin transforms by a scalar, which is the restriction of the gamma factor of the standard $L$-function, via the embedding \begin{equation}\label{jembedding}j:\check A\hookrightarrow \check G\end{equation} to the characters of $A$. The precise calculation is as follows: We identify again an open subset of $N\backslash G/N$ with the torus $A$ as before (by fixing a base point), and define Mellin transform of half-densities as $$ \check f(\chi) = \int_A f(t) \chi^{-1} (t) (dt)^\frac{1}{2},$$ where $dt$ is a fixed Haar measure on $A$. Then the operator $\mathcal H_{{\operatorname{Std}},\emptyset}$ should satisfy: $$ \widecheck{(\mathcal H_{{\operatorname{Std}},\emptyset} f)} (\chi) = \gamma(\chi^{-1},{\operatorname{Std}}\circ j, \frac{1}{2}, \psi) \check f(\chi) = \prod_{i=1}^n \gamma(\chi, -\check\epsilon_i , \frac{1}{2}, \psi) \check f(\chi),$$ where $j$ is the embedding of \eqref{jembedding}. (The choice of additive character $\psi$, here, matches the Godement--Jacquet local functional equation for the Fourier transform $\mathcal F$.) By Proposition \ref{gamma}, we have $\mathcal H_{{\operatorname{Std}},\emptyset} = \prod_{i=1}^n \mathscr F_{-\check\epsilon_i, \frac{1}{2}}$. We notice that the operator $\mathcal H_{{\operatorname{Std}}}$ looks just like a \emph{deformation} of $\mathcal H_{{\operatorname{Std}},\emptyset} $, with the intermediate scalar factors $\psi(-e^{-\alpha_i})$ inserted! \section{Functional equation for the symmetric square $L$-function of $\operatorname{GL}_2$} \label{sec:sym2} The representation $\operatorname{Sym}^2$ of $\operatorname{GL}_2$ factors through $\operatorname{PGL}_2 \times \mathbb{G}_m$, the dual group of $G=\operatorname{SL}_2 \times \mathbb{G}_m$. We wish to study the functional equation for the $L$-function associated to $\operatorname{Sym}^2$ at the level of the Kuznetsov formula of $G$. We denote by $\check\lambda_+, \check\lambda_0$ and $\check\lambda_-$ the three weights of $\operatorname{Sym}^2$, so that $\check\lambda_-$ is anti-dominant and $\check\lambda_+$ is dominant. The analog of Theorem \ref{thmJacquet} and Corollary \ref{corcharsHankel} in this setting is the following. To express it, we denote by $\eta_{D}$ the quadratic character associated to the quadratic extension $F(\sqrt{D})$, considered as a character of the $\mathbb{G}_m$-factor, and identified with the operator of multiplication by this character. We denote by $\delta_a$ the operator of multiplicative translation by $a$, under the $\mathbb{G}_m$-action on $N\backslash G\sslash N$. The letter $\zeta$ denotes the coordinate on $N\backslash \operatorname{SL}_2\sslash N$ (and hence also on $N\backslash G\sslash N$, by projection) that was fixed in \S \ref{ssnonstandard}. For a half-density $\varphi$ on $N\backslash G\sslash N$, its ``$(\mathbb{G}_m,|\bullet|^s)$-equivariant integral'' is the following half-density on $N\backslash \operatorname{SL}_2\sslash N$: $$ \zeta\mapsto \int_{\mathbb{G}_m} \varphi(\zeta, a) |a|^{-s} (d^\times a)^\frac{1}{2},$$ where $(d^\times a)^\frac{1}{2}$ is a fixed Haar half-density on $F^\times$. Finally, for a quadratic character $\eta$ with associated quadratic extension $E$, $\lambda(\eta,\psi)$ denotes the ratio of abelian gamma-factors: \begin{equation}\label{lambda} \lambda(\eta,\psi) = \frac{\gamma(1, s, \psi)\gamma(\eta, s,\psi)}{\gamma_E(1,s, \psi\circ\operatorname{tr})}. \end{equation} \begin{theorem} There is a space $\mathcal D^-_{L(\operatorname{Sym}^2, \frac{1}{2})} (N,\psi\backslash G /N,\psi)$ of (densely defined) half-densities on $N\backslash G\sslash N$, containing $\mathcal D (N,\psi\backslash G /N,\psi)$, whose $(\mathbb{G}_m,|\bullet|^s)$-equivariant integrals converge for $\Re(s)\gg 0$, admit meromorphic continuation to the entire complex plane, and have image equal to $\mathcal D^-_{L(\mathrm{Ad}, \frac{1}{2}+ s)} (N,\psi\backslash \operatorname{SL}_2/N,\psi)$, for every $s$ away from the poles. Moreover the transform: \begin{equation}\label{HSymformula} \mathcal H_{\operatorname{Sym}^2} = \lambda(\eta_{\zeta^2-4},\psi)^{-1} \mathscr F_{-\check\lambda_+,\frac{1}{2}} \circ \delta_{1-4\zeta^{-2}} \circ \eta_{\zeta^2-4} \circ \mathscr F_{-\check\lambda_0,\frac{1}{2}} \circ \eta_{\zeta^2-4} \circ \mathscr F_{-\check\lambda_-,\frac{1}{2}}\end{equation} is a $\mathbb{G}_m$-equivariant isomorphism $$\mathcal D^-_{L(\operatorname{Sym}^2, \frac{1}{2})} (N,\psi\backslash G /N,\psi )\xrightarrow\sim \mathcal D^-_{L((\operatorname{Sym}^2)^\vee, \frac{1}{2})} (N,\psi\backslash G /N,\psi )$$ (where the space on the right is the analogous space with the $\mathbb{G}_m$-coordinate inverted), and hence descends for every $s\in \mathbb{C}$ away from the poles to an isomorphism $$\mathcal H_{\mathrm{Ad},s} : \mathcal D^-_{L(\mathrm{Ad}, \frac{1}{2}+ s)} (N,\psi\backslash \operatorname{SL}_2/N,\psi) \xrightarrow\sim \mathcal D^-_{L(\mathrm{Ad}, \frac{1}{2}- s)} (N,\psi\backslash \operatorname{SL}_2/N,\psi).$$ As $\pi$ varies in a family of representations twisted by the character $|\bullet|^s$ of $\mathbb{G}_m$, the Hankel transform satisfies: \begin{equation}\mathcal H_{\operatorname{Sym}^2}^* J_\pi = \gamma(\pi, \operatorname{Sym}^2, \frac{1}{2}, \psi) \cdot J_\pi,\end{equation} as meromorphic families of functionals on $\mathcal D^-_{L(\operatorname{Sym}^2,\frac{1}{2})}(N,\psi\backslash G/N,\psi)$, where $J_\pi$ are the relative characters for the Kuznetsov formula, as before. Finally, the space $\mathcal D^-_{L(\operatorname{Sym}^2, \frac{1}{2})} (N,\psi\backslash G /N,\psi)$ has a ``basic vector'' $f_{L(\operatorname{Sym}^2, \frac{1}{2})}^0$, the image of an unramified half-density on $(N,\psi\backslash G)$, whose images in all of the spaces $\mathcal D^-_{L(\mathrm{Ad}, \frac{1}{2}+ s)} (N,\psi\backslash \operatorname{SL}_2/N,\psi)$ are equal to the basic vectors $f^0_{L(\mathrm{Ad}, \frac{1}{2}+ s)}$, and the Hankel transform $\mathcal H_{\operatorname{Sym}^2}$ maps $h\cdot f_{L(\operatorname{Sym}^2, \frac{1}{2})}^0$ to $h\cdot f_{L((\operatorname{Sym}^2)^\vee, \frac{1}{2})}^0$, for any element $h$ of the unramified Hecke algebra. \end{theorem} Again, the Hankel transform is expressed in terms of equivariant Fourier tranforms and relatively innocuous intermediate factors and operators which, in principle, preserve Poisson summation globally. Of course, the nature of these operators and the possibility of extending such formulas to higher symmetric powers remains unclear. But we can again view them as deformations of Hankel transforms for the boundary degenerations, namely, if we consider again a commutative diagram \begin{equation} \xymatrix{ \mathcal D^-_{L(\operatorname{Sym}^2,\frac{1}{2})}(N,\psi\backslash G/N,\psi) \ar[r]^{\mathcal E_\emptyset^*}\ar[d]^{\mathcal H_{\operatorname{Sym}^2}} & \mathcal D^\pm_{L(\operatorname{Sym}^2,\frac{1}{2})}(N\backslash G/N) \ar[d]^{\mathcal H_{\operatorname{Sym}^2,\emptyset}} \\ \mathcal D^-_{L((\operatorname{Sym}^2)^\vee,\frac{1}{2})}(N,\psi\backslash G/N,\psi) \ar[r]^{\mathcal E_\emptyset^*} & \mathcal D^\pm_{L((\operatorname{Sym}^2)^\vee,\frac{1}{2})}(N\backslash G/N) }, \end{equation} we will find that the operator $\mathcal H_{\operatorname{Sym}^2,\emptyset}$ should satisfy: $$ \widecheck{(\mathcal H_{\operatorname{Sym}^2,\emptyset} f)}(\chi) = \gamma( \chi^{-1}, \operatorname{Sym}^2\circ j,\frac{1}{2}, \psi) \check f(\chi) = \prod_{i=+, 0, -} \gamma(\chi, -\check\lambda_i , \frac{1}{2}, \psi) \check f(\chi),$$ and therefore, by Proposition \ref{gamma}: $$\mathcal H_{\operatorname{Sym}^2,\emptyset} = \prod_{i=+, 0, -} \mathscr F_{-\check\lambda_i, \frac{1}{2}}.$$ Thus, we observe again that the operator $\mathcal H_{\operatorname{Sym}^2}$ is just a deformation of $\mathcal H_{\operatorname{Sym}^2,\emptyset}$ with some intermediate operators which, again, in principle, would be suitable for a global Poisson summation formula! \bibliographystyle{alphaurl}
\section{Introduction}\label{Introd:MP2} Numerical approximation of the density of states (DOS) or spectral density (see \S\ref{ssec:DOS_def}) of large matrices is one of the challenging problems arising in the prediction of electronic, vibrational and thermal properties of molecules and crystals and many other applications. This topic, first developed in condensed matter physics \cite{DuCy:70,WhBlu:72,Turek:88,DrSa:93,Wang:94}, has long since attracted interest in the community of numerical linear algebra \cite{DorHo:00,GolVan:13,TrefEmbr:05}, see also a survey on commonly used methodology for approximation of DOS for large matrices of general structure \cite{LinSaadYa:15}. Most traditional methods are based on a polynomial or fractional-polynomial interpolation of the DOS regularized by Gaussians or Lorentzians, and computing traces of certain matrix valued functions, say matrix resolvents or polynomials, defined at a large set of interpolation points within the spectral interval of interest. Furthermore, the trace calculations are typically accomplished with stochastic sampling over a large number of random vectors \cite{LinSaadYa:15}. Since the size of matrices resulting from real life applications is usually large (in quantum mechanics it scales as a polynomial of the molecular size), and the DOS of these matrices often exhibits very complicated shape, the above mentioned methods become prohibitively expensive. Moreover, the algorithms based on polynomial interpolants have poor approximating properties when the spectrum of a matrix exhibits gaps or highly oscillating non-regular shapes, as is the case in electronic structure calculations. Furthermore, stochastic sampling leads to poor Monte Carlo estimates with slow convergence rates and low accuracy. In this paper we present a new method to efficiently and accurately approximate the DOS for large rank-structured symmetric matrices. The approach amounts to estimating the DOS by evaluating matrix functions of structured matrices, in particular traces of the matrix resolvent. Our main contribution is to perform each function evaluation at low cost and to reduce the total number of function evaluations in the case of fine representation grid. We apply this approximation to the Bethe-Salpeter equation (BSE), which is a widely used model for {\it ab initio} estimation of the absorption spectra for molecules or surfaces of solids \cite{BeSa:51,Hedin,StScuFr:98,ReOlRuOni:02,OniReRu:02,ReTouSa1:13}. In particular, we use the recently developed low-rank structured representation of the BSE Hamiltonian, which was introduced and analyzed in \cite{BeKhKh_BSE:15}. An efficient and structured eigenvalue solver for this block-diagonal plus low-rank representation of the BSE Hamiltonian as well as to its symmetric positive definite surrogate obtained by the Tamm-Dancoff approximation (TDA) is described in \cite{BDKK_BSE:16}. The approach we take here to approximate the DOS of the BSE Hamiltonian relies on the Lorentzian blurring \cite{HayHeKe:72}. The most computationally expensive part of the calculation is reduced to the evaluation of traces of shifted matrix inverses. Our method is based on two main ingredients. First, we propose an economical method for calculating traces of parametric matrix resolvents at interpolation points by taking advantage of the block-diagonal plus low-rank BSE/TDA matrix structure described in \cite{BeKhKh_BSE:15,BDKK_BSE:16}, which enables the direct inversion of the shifted Hamiltonian within the same matrix structure. This allows us to overcome the computational difficulties of the traditional schemes and avoid the need of stochastic sampling. Second, we show that a regularized or smoothed DOS can be accurately approximated by a low rank QTT tensor \cite{KhQuant:09} that can be determined through a least squares procedure. The accuracy of approximation and interpolation is controlled by $\epsilon$-truncation of the corresponding matrix/tensor ranks. Our fast method for calculating traces of matrix resolvents for the family of rank-structured matrices exhibits almost linear asymptotic complexity scaling with respect to the matrix size. We introduce an explicit rank-structured representation of the matrix inverse which can be evaluated efficiently by using the Sherman-Morrison-Woodbury formula. Note that the diagonal plus low-rank approximation to the BSE Hamiltonian introduced in \cite{BeKhKh_BSE:15} employs the low-rank approximation to the two-electron integrals tensor in the form of a Cholesky factorization \cite{VeKhBoKhSchn:12}. An efficient structured solver designed to calculate a number of minimal eigenvalues of the block-diagonal plus low-rank representation of the BSE/TDA matrices is described in \cite{BDKK_BSE:16}. Another novelty of this paper is the application of the QTT tensor approximation to the DOS sampled on a fine grid, which results in a long vector. The QTT approximation method was introduced and analyzed for function related vectors in \cite{KhQuant:09}. It was proven that for a length-$N$ vector obtained from the discretization of a classical function (complex exponentials, polynomials, Gaussians etc.), its QTT image constructed in the $L$-dimensional tensor space with $L=\log_2 N$ exhibits an amazingly low separation rank $r_{qtt}$. This rank parameter $r_{qtt}$ appears to be independent of the size of the original vector. Thus the use of QTT tensor compression reduces the number of representation parameters from $N$ to $2 r_{qtt}^2 \log_2 N $, which allows asymptotically a much smaller number of functional calls, $O(\log N)$, to reconstruct the DOS function in the QTT parametrization. This might be beneficial in the limit of a large number of representation points $N$ since each functional evaluation of the DOS is highly expensive requiring computation of some matrix valued functions. For example, for a vector of size $N=2^L$ representing the exponential function, its reshape (folding) into an $L$-dimensional tensor of size ${\underbrace{2\times \cdots \times 2}}_{L-fold}$ with modes equal to $2$, yields a QTT tensor of rank $r_{qtt}=1$, which means the reduction of storage from $2^L$ to $ 2 \log_2 N=2 L$. For a complex exponential vector there holds $r_{qtt}=2$, then storage reduces from $N$ to $8 \log_2 N $. Similar low rank QTT representations were proven for a wide class of functions~\cite{khor-survey-2014}, including strongly oscillating functions of nontrivial shape, see for example \cite{VeBoKh:Ewald:14,KhVe:16} and the new results in \S\ref{ssec: QTT_ranks_DoS} below. For a general class of functional vectors, one computes an $\varepsilon$-rank QTT approximation which leads to a storage size with logarithmic scaling in $N$. Numerical tests for moderate size molecules confirm the closeness of DOS for the TDA model to those computed on the exact BSE spectrum. We also justify that the simplified block-diagonal plus low-rank approximation recovers well the main landscape and shape details of the DOS curve on the whole energy interval and check the precision of the low-rank QTT approximation to the length-$N$ vector representing the DOS. We demonstrate the almost linear complexity scaling of the trace calculation algorithm applied to TDA matrices of different size. We then show by numerical tests that the low-rank QTT tensor interpolation scheme requires only a small number of adaptively chosen samples in the $N$-vector discretizing the DOS. For instance, a polynomial interpolant of degree $p$ needs $p+1$ interpolation points (functional calls) for the representation of a function on a large $N$-grid. However, in the case of highly oscillating DOS functions of interest one should impose $p=O(N)$. On the contrary, the QTT interpolant over $O(\log N)$ interpolation points provides a rather accurate representation of the functional $N$-vector of the DOS. We also discuss the opportunity to reduce the cost of multiple trace calculations for the parametric matrix resolvent and, finally, describe modifications necessary to calculate the optical absorption spectrum via a rank-structured BSE model. The rest of the paper is structured as follows. In Section \ref{sec:pre}, we recall the main prerequisites for the description of our method including the rank-structured approximation to the BSE/TDA matrix, basic notions of the regularization of DOS by Lorentzians and a short summary on the existing methods for matrices of general structure. Section \ref{sec:Rstruc_DOS} discusses the main techniques of the presented method and the corresponding analysis in Theorems \ref{thm:Trace_cost} and 3.2. The numerical tests confirm the linear scaling of our algorithm in the size of the grid on which the DOS is evaluated. Section \ref{ssec:QTT_DOS} presents a summary of the QTT tensor approximation of function related vectors and the analysis of the QTT tensor ranks of the DOS, see Theorem \ref{thm:QTT_R_Gaus_Broad}. In Section \ref{ssec: QTT_cross_DoS} the ACA based QTT interpolation is applied to the discretized DOS, where the quality of the interpolation is illustrated numerically. The beneficial features of the new computational schemes are verified by extensive numerical experiments on the examples of various molecular systems. Section \ref{sec:BSE_case} outlines the extension of the approach to the case of full BSE system. Conclusions summarize the main results and address the application perspectives. \section{Main prerequisites and outline of initial applications} \label{sec:pre} \subsection{Rank-structured approximation to BSE matrix}\label{ssec:BSE_setting} In this paper we describe a method for efficient and accurate approximation of the DOS for large rank-structured symmetric matrices. Our basic application is concerned with estimating the DOS and the absorption spectrum for the Bethe-Salpeter problem describing the excitation energies of molecules. The $2\times 2$-block matrix representation of the Bethe-Salpeter Hamiltonian (BSH) leads to the following eigenvalue problem. \begin{equation} \label{eqn:BSE-GW1} H \begin{pmatrix} {\bf x}_k\\ {\bf y}_k\\ \end{pmatrix} \equiv \begin{pmatrix} { A} & { B} \\ {- B}^\ast & {- A}^\ast \\ \end{pmatrix} \begin{pmatrix} {\bf x}_k\\ {\bf y}_k\\ \end{pmatrix} = \omega_k \begin{pmatrix} {\bf x}_k\\ {\bf y}_k\\ \end{pmatrix}, \end{equation} where the matrix blocks of size $n \times n$, with $n=N_{ov}=N_{o}(N_{b}-N_{o})$, are defined by \begin{equation} A= \boldsymbol{\Delta \varepsilon} + V - \widehat{W},\quad B= {V} - \widetilde{W}, \label{eq:AB_ex} \end{equation} and eigenvalues $\omega_k$ correspond to the excitation energies. Here $\boldsymbol{\Delta \varepsilon}$ is a diagonal matrix and $$ { V}=[v_{ia,jb}]\quad a, b \in {\cal I}_{v}:=\{N_{o}+1,\ldots,N_{b}\}, \quad i,j\in {\cal I}_{o}:=\{1,\ldots,N_{o}\}, $$ is the rank-$R_B$ two-electron integrals (TEI) matrix projected onto the Hartree-Fock molecular orbital basis, where $N_b$ is the number of Gaussian type orbital (GTO) basis functions and $N_{o}$ denotes the number of occupied orbitals \cite{BeKhKh_BSE:15}. The method for solving the Bethe-Salpeter equation (BSE) using low-rank factorizations of the generating matrices has been introduced in \cite{BeKhKh_BSE:15}. It is based on a tensor-structured grid-based Hartree-Fock (HF) solver which provides not only the full set of eigenvalues and HF orbitals, but also the two-electron integrals tensor in the form of a low-rank Cholesky factorization, see \cite{VeKhorTromsoe:15} and references therein. The matrix $V$ inherits its low rank from the two-electron integrals tensor, and $\widetilde{W}$ is also proven to have a small $\epsilon$-rank (see \cite{BeKhKh_BSE:15}). In particular, there holds \begin{equation} \label{eqn:L_V_factor} V \approx L_V L_V^T,\quad L_V\in \mathbb{R}^{n \times R_V}, \quad R_V \leq R_B, \end{equation} with the rank estimates $R_V =R_V(\varepsilon) =\mathcal{O}(N_b |\log \varepsilon |)$, and $\mathop{\mathrm{rank}}(\widetilde{W})\leq \mathop{\mathrm{rank}}(V)$. In \cite{BDKK_BSE:16}, it was shown that the matrix $\widehat{W}$, which does not exhibit an accurate low rank representation, can be well approximated by a block diagonal matrix \[ \widehat{W} \approx \mbox{blockdiag}[\widehat{B},D], \] where $\widehat{B}$ is a $N_W\times N_W$ dense block with $N_W=O(n^\alpha)$, $\alpha<1$. The size of $N_W$ is nearly the same as the rank parameter of $L_V$. As a result, the TDA matrix $A$ can be approximated by a sum of a block-diagonal matrix and a low rank matrix shown in Figure \ref{fig:Matr_AN}, i.e., \[ A \approx \widehat{A}= \boldsymbol{\Delta \varepsilon}+ Q Q^T - \mbox{blockdiag}[\widehat{B},D] \equiv \mbox{blockdiag}[{B}_0,D_0] + Q Q^T. \] \begin{figure}[htbp] \centering \includegraphics[width=11.0cm]{Matrix_AN.eps} \caption{\small Diagonal plus low-rank plus reduced-block structure of the matrix $\widehat{A}$.} \label{fig:Matr_AN} \end{figure} An efficient structured solver designed to calculate a number of minimal eigenvalues of the block-diagonal plus low-rank representation of the BSE/TDA matrices is described in \cite{BDKK_BSE:16}. It is based on an efficient subspace iteration of the matrix inverse, which for rank-structured matrix formats can be evaluated efficiently by using the Sherman-Morrison-Woodbury formula, thus reducing the numerical expense of the direct diagonalization down to $\mathcal{O}(N_b^2)$ in the size of the atomic orbitals basis set, $N_b$. Furthermore, this solver also includes a QTT-based compression scheme, where both eigenvectors and the rank-structured BSE matrix blocks are represented by block-QTT tensors. The block-QTT representation of the eigenvector is determined by an alternating least squares (ALS) iterative algorithm. The overall asymptotic complexity for computing several smallest in modulo eigenvalues in the BSE spectral problem by using the QTT approximation is estimated to be $\mathcal{O}(\log(N_o) N_o^{2})$, where $N_o$ is the number of occupied orbitals. Matrices in the form (\ref{eqn:BSE-GW1}) are called $J$-symmetric or Hamiltonian, see \cite{BeFaYa:15} for implications on the algebraic properties of the BSE matrix. In particular, solutions of equation (\ref{eqn:BSE-GW1}) come in pairs: excitation energies $\omega_k$ with eigenvectors $({\bf x}_k,{\bf y}_k)$, and de-excitation energies $-\omega_k$ with eigenvectors $({\bf y}_k^\ast,{\bf x}_k^\ast)$. The simplification in the BSH, $H$, defined by the $n \times n$ symmetric diagonal block $A$ is called the Tamm-Dancoff (TDA) approximation. In what follows, we are interested in the TDA spectral problem, $$ A {\bf u}_k = \lambda_k {\bf u}_k,\quad k=1,\ldots,n, $$ providing good approximations to $\omega_k,{\bf x}_k$. In general, methods for solving partial eigenvalue problems for matrices with a special structure as in the BSE setting are conceptually related to the approaches for Hamiltonian matrices \cite{BeFa:97,BeMeXu:98,FaKre:06,BGFa:15}, particularly to those based on minimization principles \cite{BaiLi:12,BaiLi:13}. A structured Lanczos algorithm for estimation of the optical absorption spectrum was described in \cite{ShJoLiYaDeLo:16}. Various structured eigensolvers tailored for electronic structure calculations are discussed in \cite{RoGeSaBa:08,RoLuGa:10,DeSaStJaCoLo:12,NaPoSaad:13,LinSaadYa:15,ShJoYaDeLo:16}. \subsection{Density of states for symmetric matrices}\label{ssec:DOS_def} To fix the idea, we first consider the case of symmetric matrices. Following \cite{LinSaadYa:15}, we use the simple definition of the DOS for symmetric matrices \begin{equation} \label{eqn:DOS} \phi(t)= \frac{1}{n}\sum\limits_{j=1}^{n} \delta(t-\lambda_j),\quad t,\lambda_j\in [0,a], \end{equation} where $\delta$ is the Dirac distribution and the $\lambda_j$'s are the eigenvalues of $A=A^T$ ordered as $\lambda_1 \leq \lambda_2 \leq \cdots \leq \lambda_n$. Several classes of blurring approximations to $\phi(t)$ are used in the literature. One can replace each Dirac-$\delta$ by a Gaussian function with width $\eta>0$, i.e., \[ \delta(t) \rightsquigarrow g_\eta(t)= \frac{1}{\sqrt{2 \pi}\eta}\exp{\left(-\frac{t^2}{2 \eta^2}\right)}, \] where the choice of the regularization parameter $\eta$ depends on the particular problem setting. As a result, (\ref{eqn:DOS}) can be approximated by \begin{equation} \label{eqn:DOS_gauss} \phi(t)\approx \phi_\eta(t):= \frac{1}{n} \sum\limits_{j=1}^{n} g_\eta(t -\lambda_j), \end{equation} on the whole energy interval $[0,a]$. We may also replace each Dirac-$\delta$ by a Lorentzian, i.e., \begin{equation} \label{eqn:Delta_Lorentz} \delta(t) \rightsquigarrow L_\eta(t):= \frac{1}{\pi} \frac{\eta}{t^2 + \eta^2} = \frac{1}{\pi} \mbox{Im}\left( \frac{1}{t- i \eta }\right), \end{equation} so that an approximate DOS can be written as \begin{equation} \label{eqn:DOS_Lorentz} \phi(t)\approx \phi_\eta(t):= \frac{1}{n} \sum\limits_{j=1}^{n} L_\eta(t -\lambda_j). \end{equation} When $\eta\to 0_+$, both Gaussians and Lorentzians converge to the Dirac distribution, i.e., \[ \lim\limits_{\eta\to 0_+} g_\eta(t) = \lim\limits_{\eta\to 0_+} L_\eta(t)=\delta(t). \] However, they exhibit different features of the approximant for small $\eta >0$. In the case of Gaussians, one expects a sharp resolution of the spectral peaks, while the Lorentzian based representation aims to resolve better the global landscape of $\phi(t)$. Both functions $\phi_\eta(t)$ and $L_\eta(t)$ are continuous, hence, they can be discretized by sampling on a fine grid $\Omega_h$ over $[0,a]$. In the following, we use the uniform cell-centered $N$-point grid with the mesh size $h=a/N$. In what follows, we focus on the case of Lorentzian blurring, which will be motivated later on, and apply it to the TDA approximation of the BSE problem (see \S \ref{ssec:BSE_setting} below). We use the simplified block-diagonal plus low-rank approximation to the matrix $A$, see \cite{BeKhKh_BSE:15,BDKK_BSE:16}, which allows efficient explicit representation of the shifted inverse matrix. The numerical illustrations in \S \ref{ssec:DOS_def} represent the DOS for the H$_2$O molecule and H$_2$ chains broadened by Gaussians (\ref{eqn:DOS_gauss}). The data corresponds to the reduced basis approach via rank-structured approximation applied to the symmetric TDA model \cite{BeKhKh_BSE:15,BDKK_BSE:16} described by the matrix block $A$ of the full BSE system matrix. \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{DoS_exact_BSE_vsTDA_H2O.eps} \includegraphics[width=7.0cm]{DoS_exact_BSE_vsTDA_H2O_Err.eps} \caption{\small DOS for H$_2$O, $\eta=0.5$: exact BSE vs. TDA on the full spectrum (left), the absolute error (right). } \label{fig:BSE_vs_TDA_H2O} \end{figure} It was numerically demonstrated in \cite{BeKhKh_BSE:15} that the spectrum of the TDA model provides a good approximation to the spectrum of the full BSE Hamiltonian. The difference between the two is on the order of $10^{-2}$ for molecules of moderate size. Figure \ref{fig:BSE_vs_TDA_H2O}, left, compares the DOS for the H$_2$O molecule calculated via the eigenvalues of the full BSE Hamiltonian and those of the TDA approximation, while on the right we display the corresponding maximum error. Figure \ref{fig:BSE_vs_TDA_H2O_zoom}, left, compares the same DOS calculations but zoomed on the first compact energy interval $[0,40]$ eV. The red curve corresponds to the full BSE data, and the blue one represents the TDA case. The figure on the right displays the corresponding maximum error. \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{DoS_exact_BSE_vsTDA_H2O_40.eps} \includegraphics[width=7.0cm]{DoS_exact_BSE_vsTDA_H2O_Err_40.eps} \caption{\small DOS for H$_2$O on the energy sub-interval $[0,40]$: exact BSE vs. TDA (left), and the error (right). } \label{fig:BSE_vs_TDA_H2O_zoom} \end{figure} Figure \ref{fig:Simp_vs_TDA_H2O}, left, represents the DOS for H$_2$O computed by using the exact TDA spectrum (blue) and its approximation based on a simplified model obtained via low-rank approximation to $A$ (red), while the right figure shows the relative error. Figures \ref{fig:H_lattice} presents the DOS for H$_{16}$ (left) and H$_{32}$ (right) chains of Hydrogen atoms. We observe the essential similarity in the shapes (only the amplitude is changing) which is apparently a consequence of quasi-periodicity of the system. \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{DoS_TDA_simp_H2O.eps} \includegraphics[width=7.0cm]{DoS_TDA_simp_H2O_zoom.eps} \caption{\small DOS for H$_2$O. Exact TDA vs. simplified TDA (left), zoom of the small spectral interval (right).} \label{fig:Simp_vs_TDA_H2O} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{Den_H16.eps} \includegraphics[width=7.0cm]{Den_H32.eps} \caption{\small DOS for H$_{16}$ (left) and H$_{32}$ (right) chains of Hydrogen atoms.} \label{fig:H_lattice} \end{figure} The rank-structured approach to calculation of the molecular absorption spectrum in the case of full BSE is sketched in \S\ref{sec:BSE_case}. This topic will be addressed elsewhere. \subsection{General description of the existing computational schemes} One of the commonly used approaches to the numerical approximation of both functions $g_\eta(t)$ and $L_\eta(t)$ is based on the construction of certain polynomial or fractional polynomial interpolants whose evaluation at each sampling point $t_k$ requires the solution of a large linear system with the BSE/TDA matrix, i.e., remains expensive. In the case of Lorentzian broadening (\ref{eqn:DOS_Lorentz}) the regularized DOS takes the form \begin{equation} \label{eqn:DOS_Loren_ImTr} \phi(t)\approx \phi_\eta(t):= \frac{1}{n\pi} \sum\limits_{j=1}^{n}\mbox{Im}\left( \frac{1}{(t-\lambda_j) - i \eta }\right)= \frac{1}{n\pi} \mbox{Im}\, \mbox{Trace}[(tI-A - i \eta I)^{-1}]. \end{equation} To keep real-valued arithmetics, likewise, we can write the latter in the form \begin{equation} \label{eqn:DOS_Loren_RTr} \phi_\eta(t):=\frac{1}{n\pi} \sum\limits_{j=1}^{n}\frac{\eta}{(t-\lambda_j)^2 + \eta^2} = \frac{1}{n\pi}\mbox{Trace}[ ( (t I - A)^2 + \eta^2 I)^{-1}]. \end{equation} In both cases the task of computing the approximate DOS $\phi_\eta(t)$ reduces to approximating the trace of the matrix resolvent $$ (tI-A - i \eta I)^{-1}\quad \mbox{or} \quad ((t I - A)^2 + \eta^2 I)^{-1}. $$ Here, the price to pay for real-valued arithmetics is to address the more complicated low-rank structure in $(t I - A)^2$. The traditional approach \cite{LinSaadYa:15} to approximately computing the traces of the matrix-valued analytic function $f(A)$ reduces this task to the estimation of the mean of $v_m^T f(A) v_m$ over a sequence of random vectors $v_m$, $m=1,\ldots,m_r$, satisfying certain condition (see \cite{LinSaadYa:15}, Theorem 3.1). That is, $\mbox{Trace}[f(A)]$ is approximated by \begin{equation} \label{eqn:DOS_Trace_f(A)} \mbox{Trace}[f(A)]\approx \frac{1}{m_r}\sum\limits_{m=1}^{m_r}v_m^T f(A) v_m. \end{equation} The calculation of (\ref{eqn:DOS_Trace_f(A)}) for \begin{equation} \label{eqn:ReIm_resol} f_1(A)=(tI-A - i \eta I)^{-1} \quad \mbox{or} \quad f_2(A)= ((t I - A)^2 + \eta^2 I)^{-1} \end{equation} reduces to solving linear systems in the form of \begin{equation} \label{eqn:DOS_Trace_syst_compl} (tI - i \eta I -A)x= v_m \quad \mbox{for} \quad m=1,\ldots,m_r, \end{equation} or \begin{equation} \label{eqn:DOS_Trace_syst_real} (\eta^2 I+(tI-A)^2 )x= v_m \quad \mbox{for} \quad m=1,\ldots,m_r. \end{equation} These linear systems need to be solved for many target points $t=t_k\in [a,b]$ in the course of a chosen interpolation scheme. In the case of rank-structured matrices $A$, the solution of equations (\ref{eqn:DOS_Trace_syst_compl}) or (\ref{eqn:DOS_Trace_syst_real}) can be implemented with a lower cost. However, even in this favorable situation one requires a relatively large number $m_r$ of stochastic realizations to obtain satisfactory mean value approximation. The convergence rate is expected to be on the order of $O(1/\sqrt{m_r})$. On the other hand, with the limited number of interpolation points, the polynomial type of interpolation schemes applied to highly non-regular shapes as shown, say, in Figure \ref{fig:Simp_vs_TDA_H2O} (left), can only provide limited resolution and is unlikely to reveal spectral gaps and many local peaks of interest. \section{Fast evaluation of DOS for rank-structured matrices} \label{sec:Rstruc_DOS} \subsection{DOS by the trace of rank-structured matrix inverse} \label{ssec:Rstruc_DOS_M_inv} In what follows, we propose an approach that is based on evaluating the trace term in \eqref{eqn:DOS_Loren_ImTr} directly (without stochastic sampling). This approach relies on the following two techniques: \begin{itemize} \item[(A)] using the low-rank BSE matrix structure as in \cite{BeKhKh_BSE:15}, which allows for each fixed $t\in [0,a]$ the direct matrix inversion and computation of the respective traces, \item[(B)] the low-rank QTT tensor interpolation of the function $L_\eta(t)$ sampled on a fine uniform grid $\{t_1,\ldots,t_M\}$ in the whole spectral interval $[0,a]$ or on some subinterval of $[0,a]$. \end{itemize} For the class of block-diagonal plus low-rank matrices arising in the reduced model approach for BSE problem \cite{BeKhKh_BSE:15,BDKK_BSE:16}, we have (see \S\ref{ssec:BSE_setting} for more details) \begin{equation} \label{eqn:Block_A} A = E + P Q^T, \quad \mbox{with} \quad P,Q\in \mathbb{R}^{n\times R}, \quad E =\mbox{blockdiag}\{B_0,D_0\}, \end{equation} where the rank parameter $R$ is small compared to $n$, the full $n_B\times n_B$ matrix block $B_0$ is of size $n_B=O(n^\alpha)$, $0<\alpha < 1$, and $D_0$ is a diagonal matrix of size $n- n_B$. Notice that even in the case of structured matrices in (\ref{eqn:Block_A}) the traditional approach by (\ref{eqn:DOS_Trace_f(A)}) leads to a sequence of linear systems (\ref{eqn:DOS_Trace_syst_compl}) to be solved many times in the course of stochastic sampling, for each of many interpolation points $t\in [0,a]$. In our approach, for the class of rank-structured matrices (\ref{eqn:Block_A}), we propose to avoid stochastic sampling in (\ref{eqn:DOS_Trace_f(A)}) by introducing a direct scheme that allows us to evaluate the trace of matrices $f_1(A)$ or $f_2(A)$ defined in (\ref{eqn:ReIm_resol}), corresponding to the matrix resolvent in (\ref{eqn:DOS_Loren_ImTr}) and (\ref{eqn:DOS_Loren_RTr}), respectively, by one-step straightforward matrix calculation. To that end, let us first construct the reduced-model approximation to the matrix inverse $A^{-1}$ for the matrix in (\ref{eqn:Block_A}), where the block-diagonal part $E(t)=\mbox{blockdiag}\{B(t),D(t)\}$ corresponds to the case of (\ref{eqn:DOS_Loren_ImTr}), i.e., \begin{equation} \label{eqn:BlockBD} B(t) = tI_B - i \eta I_B + B_0, \quad D(t) =tI_D - i \eta I_D +D_0. \end{equation} Here $B_0$ and $D_0$ denote the corresponding matrix blocks in the representation of the diagonal block $A$ in the initial BSE matrix, see (\ref{eqn:Block_A}), and $I_B,I_D$ denote the identity matrices corresponding to the respective index subsets. For the ease of exposition, we further assume that the matrix size of the block $B$ in (\ref{eqn:BlockBD}) is bounded by $n_B=O(n^\alpha)$ with $\alpha\leq 1/3$. This assumption on the block size ensures the linear complexity scaling of our algorithm in the matrix size $n $. In what follows, we use the notion ${\bf 1}_m$ for a length-$m$ vector of all ones, and $\odot$ for the Hadamard product of matrices. The following result asserts that the cost of trace calculations is estimated to be $O(n R)$. \begin{theorem}\label{thm:Trace_cost} Let the matrix family $A=A(t)$, $t\in [0,a]$, be given by (\ref{eqn:Block_A}), with $$ E=E(t)=\mathrm{blockdiag}\{B(t),D(t)\}, $$ where $B(t),D(t)$ are defined in (\ref{eqn:BlockBD}). Then the trace of the matrix inverse $A(t)^{-1}$ can be calculated explicitly by \[ \mathrm{trace}[A(t)^{-1}]= \mathrm{trace}[B(t)^{-1}] + \mathrm{trace}[D(t)^{-1}] - {\bf 1}_n^T ( {U(t)} \odot {V(t)}) {\bf 1}_R, \] where ${U(t)}=E(t)^{-1}P K(t)^{-1}\in \mathbb{R}^{n\times R}$, ${V(t)}= E(t)^{-1}Q\in \mathbb{R}^{n\times R}$, and $$ K(t)=I_R+ Q^T E(t)^{-1}(t) P $$ is a small $R \times R$ matrix. For fixed $t\in [0,a]$, assume that $n_B=O(n^\alpha)$ with $\alpha\leq 1/3$, then the numerical cost is estimated by $O(nR^2)$. \end{theorem} \begin{proof} The analysis relies on the particular structure of the matrix blocks. Indeed, we use the direct trace representation for both rank-$R$ and block-diagonal matrices. Our argument is based on the observation that the trace of a rank-$R$ matrix $U(t) V(t)^T$, where $U(t),V(t)\in \mathbb{R}^{n\times R}$, $U(t)=[{\bf u}_1,\ldots , {\bf u}_R] $, $V(t)=[{\bf v}_1,\ldots , {\bf v}_R] $, ${\bf u}_k, {\bf v}_k \in \mathbb{R}^{n}$, can be calculated in terms of skeleton vectors by \[ \mbox{trace}[U(t) V(t)^T]=\sum_{k=1}^R \langle {\bf u}_k, {\bf v}_k \rangle = {\bf 1}_n^T ( U(t) \odot V(t)) {\bf 1}_R, \] at the expense $O(R n)$. For fixed $t$, define the rank-$R$ matrices by \[ U(t)=E(t)^{-1}P K(t)^{-1}, \quad V(t)= E(t)^{-1}Q, \] then the Sherman-Morrison scheme leads to the representation, see \cite{BDKK_BSE:16}, \[ A(t)^{-1}= \mbox{blockdiag}\{ B(t)^{-1},D(t)^{-1} \} - E(t)^{-1}P K(t)^{-1} Q^T E(t)^{-1}, \] where the last term simplifies to \[ E(t)^{-1}P K(t)^{-1} Q^T E(t)^{-1} = U(t) V(t)^T. \] Now we apply the above formula for the trace of a rank-$R$ matrix to obtain the desired representation. The complexity estimate follows taking into account the bound on the size of matrix block $B$. Indeed, forming $U(t)$ involves solving the linear system $P_1(t) = U(t) K(t)$, for $U(t)$, where $P_1(t)$ is the pre-computed $E(t)^{-1}P$, which can be computed by assumptions at the cost $O(nR)$. Here $P_1(t)$ would be re-used to compute $K(t)$ itself, and thus stored. The cost for solving this system of equations is $2/3R^3$ (LU factorization of $K(t)$), plus $2nR^2$ for backward/forward solves. This completes the proof. \end{proof} The above representation has to be applied many times for calculating the trace of $E(t_m)^{-1}P K(t_m)^{-1} Q^T E(t_m)^{-1}$ at each fixed interpolating point $t_m$, $m=1,\ldots,M$. Here, we notice that the price to pay for the real arithmetics in equation (\ref{eqn:DOS_Trace_syst_real}) is that we compute with squared matrices which, however, do not increase the asymptotic complexity since there is no increase of the rank in the rank-structured representation of the system matrix, see the following Theorem \ref{thm:Trace_cost_real}. In our applications we do not expect a loss of numerical stability of the algorithm since the condition numbers of $E(t)$ are moderate. In what follows we denote by $[U,V]$ the concatenation of two matrices of compatible size. \begin{theorem}\label{thm:Trace_cost_real} Given matrix $S=(tI-A)^2 + \eta^2 I$, where $A$ is defined by (\ref{eqn:Block_A}), then the trace of the real-valued matrix resolvent $S^{-1}(t)$ can be calculated explicitly by \begin{equation} \label{eqn:Trace_realLR} \mathrm{trace}[S^{-1}]= \mathrm{trace}[E_{0}^{-1}] - {\bf 1}_n^T (\overline{U} \odot \overline{V}) {\bf 1}_{2R}, \end{equation} with $\overline{U}=E_0^{-1} \overline{P} K^{-1}\in \mathbb{R}^{n\times 2R}$, and $\overline{V} = E_0^{-1} \overline{Q} \in \mathbb{R}^{n\times 2R} $, where the real-valued block-diagonal matrix $E_0$ is given by \[ E_{0}(t)=\eta^2 I + t^2 I - 2t E + E^2=(\eta^2 + t^2) I + \mathrm{blockdiag}[B^2- 2t B,D^2- 2t D], \] and the rank-$2R$ matrices $\overline{P}, \overline{Q}$ are represented via concatenation \[ \overline{P}= [-2 tQ +E Q+ Q E + Q(Q^T Q),Q]\in \mathbb{R}^{n\times 2 R},\quad \overline{Q}=[Q,EQ] \in \mathbb{R}^{n\times 2 R}, \] such that the small core matrix $K(t)\in \mathbb{R}^{2R \times 2R}$ takes the form $K(t)=I_R+ \overline{Q}^T E_0^{-1}(t) \overline{P} $. Assume that $n_B=O(n^\alpha)$ with $\alpha\leq 1/3$, then the numerical cost is estimated by $O(n R^2)$ up to a low order term. \end{theorem} \begin{proof} Indeed, given the block-diagonal plus low-rank matrix $A$ in the form (\ref{eqn:Block_A}), we obtain \[ S=(tI-A)^2 + \eta^2 I = E_{0} + \overline{P}\, \overline{Q}^T, \] where the block-diagonal matrix $E_{0}$ and the rank-$2R$ matrix $\overline{P}\,\overline{Q}^T$ are defined as above. Applying the Sherman-Morrison scheme as above to the block-diagonal plus rank-$2R$ matrix structure in $S$, the representation result follows. Now we take into account that $$ \mathrm{trace}[E_{0}^{-1}]=\mathrm{trace}[(B^2- 2t B)^{-1}] + \mathrm{trace}[(D^2- 2t D)^{-1}], $$ then the restriction on the size of the block $B$ proves the complexity bound similar to the argument in the proof of the previous theorem. \end{proof} Based on Theorems \ref{thm:Trace_cost} and \ref{thm:Trace_cost_real}, the calculations in item (A) can be implemented efficiently in both complex and real arithmetics. The following numerics demonstrates the efficiency of the DOS calculation for the rank-structured TDA matrix implemented in real arithmetics as described by (\ref{eqn:Trace_realLR}) in Theorem \ref{thm:Trace_cost_real}. \begin{table}[hbp] \begin{center} \begin{tabular} [c]{|c|c|c|c|c|c|c|c|}% \hline Molecule & H$_2$O & NH$_3$ & H$_2$O$_2$ & N$_2$H$_4$ &C$_2$H$_5$OH & C$_2$H$_5$ NO$_2$ & C$_3$H$_7$ NO$_2$ \\ \hline $n=N_{ov}$ & $180$ & $215$ & $531$ & $657$ & $1430$ & $3000$ & $4488$ \\ \hline Rank $R$ & $36$ & $30$ & $68$ & $54$ & $74$ & $129$ & $147$ \\ \hline Total time $T$ (s) & $6.7$ & $7.7$ & $33$ & $47$ & $219$ & $1084$ & $2223$ \\ \hline Scaled time $T/R^2$ (s) & $0.005$ & $0.008$ & $0.007$ & $0.017$ & $0.041$ & $0.065$ & $0.103$ \\ \hline \end{tabular} \end{center} \caption{\small Scaled times for the Algorithm in Theorem \ref{thm:Trace_cost_real}.} \label{tab:ratio_NW2A} \end{table} \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{DOS_SM_H2O_nu002.eps} \includegraphics[width=7.0cm]{DOS_SM_H2O_nu002_zoom.eps} \caption{\small Left: DOS for H$_2$O vs. its recovering by using the trace of matrix resolvents; Right: zoom on the small energy interval.} \label{fig:DoS_TraceDirH2O} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{DOS_SM_C2H5OH.eps} \includegraphics[width=7.0cm]{DOS_SM_C2H5OH_zoom.eps} \caption{\small Left: DOS for Ethanol molecule vs. its recovering by using the trace of matrix resolvents; Right: zoom on the small energy interval.} \label{fig:DoS_TraceDirEtanol} \end{figure} Figures \ref{fig:DoS_TraceDirH2O} and \ref{fig:DoS_TraceDirEtanol} demonstrate that using only the structure-based trace representation (\ref{eqn:Trace_realLR}) in Theorem \ref{thm:Trace_cost_real}, we obtain the approximation which resolves perfectly the DOS function (for the examples of H$_2$O and Ethanol molecules). The exact DOS is shown by the blue line, while the results of structure-based DOS calculation is indicated by the red line (we use the acronym ``SMW'' for the Sherman-Morrison-Woodbury scheme). \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{rescaled_TR2.eps} \caption{\small Algorithm in Theorem \ref{thm:Trace_cost_real}: the rescaled CPU time $T/R^2$ versus $n$.} \label{fig:DoS_trace_Times} \end{figure} Figure \ref{fig:DoS_trace_Times} shows the rescaled CPU time, i.e. $T/R^2$, where $T$ denotes the total CPU time for computing the DOS by the algorithm implied by Theorem \ref{thm:Trace_cost_real}. This demonstrates almost linear complexity scaling of the algorithm in $n$, $O(R^2 n)$. We applied the algorithm to molecules of different system size $n$ (i.e. the size of TDA matrix) varying from $n=180$ till $n=4488$ (see Table \ref{tab:ratio_NW2A} for more details). In all cases the $N$-point representation grid with fixed $N=2^{14}$ was used. We conclude that the algorithm based on representation (\ref{eqn:Trace_realLR}) demonstrates the perfect resolution of the DOS function at linear complexity in the system size which allows to treat large molecules. The approach in item (B) requires fast trace calculations for many different values of parameter $t_m\in \tau=\{t_1,\ldots,t_M\} \subset [0,a]$ in the matrix resolvent. Finer resolution of the spectrum for large molecular systems leads to a considerable increase of the number of samples $M$ that is practically equal to the grid size, $M=N$. Hence, the total cost $O(M n R^2)$ may become prohibitively expensive since the trace computation for each fixed value of $t_m$ still requires complicated matrix operations (see Theorems \ref{thm:Trace_cost} and \ref{thm:Trace_cost_real}). \subsection{ Calculating multiple traces of $A^{-1}$ with lower cost } \label{ssec:MultipleTr} In this section, we describe a further enhancement scheme for fast multiple calculation of traces on the large set of interpolation points. We outline how it is possible to reduce the complexity of these calculations (reduced model) by using a certain smoothness in $t$ in the parametric matrix resolvent by introducing the low rank approximation of the large $n^2\times M$ matrix $$ \mathbb{E}(t)=[E(t_1)^{-1},\ldots,E(t_M)^{-1}]\quad \mbox{and}\quad \mathbb{K}(t)=[K(t_1)^{-1},\ldots,K(t_M)^{-1}]\in \mathbb{R}^{R^2\times M} $$ obtained by concatenation of vectorized matrices $E(t_m)^{-1}$ and $K(t_m)^{-1}$, $m=1,\ldots,M$, respectively. The idea is that \[ E(t)^{-1}= \mbox{blockdiag}[P(t)^{-1},D(t)^{-1}] \] defines an analytic matrix family on the spectral interval $t\in [0,a]$, and so is the family of core matrices $\{K^{-1}(t)\}$. This favorable property allows the model reduction via low rank approximation of the matrix families $\mathbb{E}(t)$ and $\mathbb{K}(t)$, $t\in \tau$. Suppose that the representations \[ K(t)^{-1}=\sum\limits_{k=1}^{R_K} c_k(t) K_k \] and \[ E(t)^{-1}= \mbox{blockdiag}[P(t)^{-1},D(t)^{-1}]= \sum\limits_{m=1}^{R_E} p_m(t) E_m \] are precomputed (this is an additional low-rank approximation procedure which separates the parameter $t$), where $E_m=\mbox{blockdiag}[P_m,D_m]\in \mathbb{R}^{n\times n}$ and $K_k\in \mathbb{R}^{R\times R}$ do not depend on $t$, and $E_m$ inherits the block-diagonal structure that $E(t)^{-1}$ obeys. We take into account that $Q$ does not depend on $t$, and plug the above decompositions in the main trace-term to obtain \[ \mbox{Trace}[E^{-1}Q K^{-1} Q^T E^{-1}]= \mbox{Trace} \left[\sum\limits_{m=1}^{R_E} p_m(t) E_m \, Q \, (\sum\limits_{k=1}^{R_K} c_k(t) K_k) \, Q \sum\limits_{m'=1}^{R_E} p_{m'}(t) E_{m'}\right]. \] Now it follows that \[ \mbox{Trace}[E^{-1}Q K^{-1} Q^T E^{-1}]= \sum\limits_{m=1}^{R_E} p_m(t) \sum\limits_{k=1}^{R_K} c_k(t)\sum\limits_{m'=1}^{R_E} p_{m'}(t) \mbox{Trace}[ E_m Q K_k Q E_{m'}], \] where $K_k \in\mathbb{R}^{R\times R}$ is a small matrix, $Q \in\mathbb{R}^{n\times R}$, $E_m =\mbox{blockdiag}[P_m,D_m]$ with diagonal $D_m$ and the full $n_P \times n_P$ matrix $P_m$, such that $n_P=O({n}^\alpha)$. With these prerequisites, we pre-compute a set of "time-independent" traces \begin{equation} \label{eqn:multi_trace} T_{mkm'}= \mbox{Trace}[ E_m Q K_k Q E_{m'}], \quad m,m'=1,\ldots, R_E, \;\; k=1,\ldots, R_K, \end{equation} and store the $R_E^2 R_K$ numbers $T_{mkm'}$ to obtain the cheap representation of the trace in terms of only a scalar sum, \[ \mbox{Trace}[E^{-1}Q K^{-1} Q^T E^{-1}](t)= \sum\limits_{m=1}^{R_E}\sum\limits_{k=1}^{R_K}\sum\limits_{m'=1}^{R_E} p_{m}(t) c_k(t) p_{m'}(t) T_{mkm'}. \] The cost of precomputing each trace-value $T_{mkm'}$ is estimated by $O(n^{3\alpha} R^2)$ as proven by Theorem \ref{thm:Trace_cost}, while the number of coefficients to be stored is about $O(R_E^2 R_K)$ and it is expected to be small or moderate. With these data at hand, the evaluation of the required trace for the particular $t_\nu\in \tau$ takes $O(R_E^2 R_K)$ scalar operations independently on $n$. Notice that the computations in (\ref{eqn:multi_trace}) are intrinsically parallel, which can be exploited on modern computing hardware using multi-threading or distributed computing. \section{QTT approximation of DOS} \label{ssec:QTT_DOS} In what follows, we discuss the QTT approximation of the DOS. We also describe a tensor based heuristic QTT approximation of the DOS by using only an incomplete set of sampling points, i.e., QTT representation by adaptive cross approximation (ACA) \cite{OselTyrt:2010,saOsel_cross:2011}. Furthermore, we derive the upper bound on the QTT ranks of the DOS by the Gaussians broadening. \subsection{Quantized-TT approximation of function related vectors} \label{ssec:QTT_Approx} In the case of large vector size $N$, the number of representation parameters for the corresponding high-order QTT tensor can be reduced to the logarithmic scaling $\mathcal{O}(\log N)$, which allows the QTT tensor interpolation of the target $N$-vector by using only $\mathcal{O}(\log N)\ll N$ entries, which are chosen adaptively by the heuristic ACA algorithm \cite{OselTyrt:2010,saOsel_cross:2011}. The accuracy of this kind of ``approximate interpolation'' is controlled by the $\varepsilon$-truncation of the QTT rank parameters. In the present paper, we apply this approximation technique to long $N$-vectors representing the DOS sampled over the fine representation grid $\Omega_h$. The QTT-type approximation of an $N$-vector with $N=q^{d'}$, $d'\in \mathbb{N}$, $q=2,3,...$, is defined as the tensor decomposition (approximation) in the TT or canonical format applied to a tensor obtained by the folding (reshaping) of the initial vector to a $d'$-dimensional $q\times \cdots \times q$ data array. The latter is thought of as an element of the multi-dimensional quantized tensor space $\mathbb{Q}_{{q},d'}= \bigotimes_{j=1}^{d'}\mathbb{K}^{q}$, $\mathbb{K}\in \{\mathbb{R},\mathbb{C}\}$, and $d'$ is the auxiliary dimension (virtual, in contrary to the real space dimension $d$) parameter that measures the depth of the quantization transform. A vector $ { \bf x}=[x_i]_{i\in I}\in \mathbb{R}^N, $ is reshaped to its multi-dimensional quantized image in $\mathbb{Q}_{q,d'}$ by $q$-adic folding, \[ \mathcal{F}_{q,d'}:{ {\bf x} \to \bf{X}} =[x({\bf j})]\in \mathbb{Q}_{q,d'}, \quad {\bf j}=\{j_{1},\ldots,j_{d'}\}, \] with $j_{\nu}\in \{1,\ldots, q\}$ for $\nu=1,\ldots,d'$. Here, for fixed $i$, we have $x({\bf j}):= x_i$, and $j_\nu=j_\nu(i)$ is defined via $q$-coding, $ j_\nu - 1= C_{-1+\nu}, $ such that the coefficients $C_{-1+\nu} $ are found from the $q$-adic representation of $i-1$ (binary coding for $q=2$), \[ i-1 = C_{0} +C_{1} q^{1} + \cdots + C_{d'-1} q^{d'-1}\equiv \sum\limits_{\nu=1}^{d'} (j_{\nu}-1) q^{\nu-1}. \] Assuming that for the rank-${\bf r}$ TT approximation of the quantized image ${ \bf{X}}$ there holds $r_k \leq r$, $k=1,\ldots ,d'$, the complexity of this representation for the tensor ${ \bf{X}}$ reduces to the logarithmic scale $$ q r^2 \log_q N \ll N. $$ The computational gain of the QTT approximation is justified by the perfect rank decomposition proven in \cite{KhQuant:09} for a wide class of function-related tensors obtained by sampling the corresponding functions over a uniform or properly refined grid. This class of functions includes complex exponentials, trigonometric functions, polynomials and Chebyshev polynomials, as well as wavelet basis functions. We refer to \cite{DKhOs-parabolic1-2012,osel-constr-2013,VeBoKh:Ewald:14,khor-survey-2014} for further results on QTT approximation of functional vectors and various applications. In estimating the numerical complexity we use the average QTT rank further denoted by $r_{qtt}$ calculated as follows, \begin{equation}\label{eqn:av_rqtt} r_{qtt}= \sqrt{\frac{1}{d-1}\sum\limits^{d-1}_{k=1} r_k^2}, \end{equation} where the QTT ranks $r_k$ are the TT ranks of the quantized image ${\bf X}$ of a vector. As an example we present the basic results on the rank-$1$ (resp. rank-$2$) QTT representation (with $q=2$) of the exponential (resp. trigonometric) vectors \cite{KhQuant:09}. For given $N=2^{d'}$, and $z \in \mathbb{C}$, the exponential $N$-vector, $ { \bf z} :=\{z_n = z^{n-1}\}_{n=1}^N, $ can be reshaped by the dyadic folding to the rank-$1$, $2^{\otimes d'}$-tensor, \begin{equation}\label{eq exp-vect q} \mathcal{F}_{2,d'}: { \bf z} \mapsto { \textbf{Z}}= \otimes_{p=1}^{d'} [1 \; z^{2^{p-1}}]^T \in \mathbb{Q}_{{2},d'}. \end{equation} The number of representation parameters specifying the QTT image is reduced dramatically from $N$ to $2 \log_2 N $. The trigonometric $N$-vector, $ { \bf t}= \Im m({ \bf z}) :=\{t_n = \sin(\omega (n-1))\}_{n=1}^N,\quad \omega \in \mathbb{R}, $ can be reshaped by the successive dyadic folding \[ \mathcal{F}_{2,d'}: { \bf t} \mapsto { \textbf{T}} \in \mathbb{Q}_{{2},d'}, \] to the $2^{\otimes d'}$-tensor ${ \textbf{T}}$, which has both the canonical and the QTT-rank equal to $2$, in the complex and real arithmetics, respectively. The explicit rank-$2$ QTT-representation of the single $\sin$-vector in $\{0,1\}^{\otimes d'}$ (see \cite{dks-ttfft-2012,osel-constr-2013}) with $k_p=2^{p-1} i_p$, $i_p\in \{0,1\}$, reads \begin{equation*}\label{eq sin-vect} {\bf t} \mapsto {\textbf{T}}=\Im m ({\textbf{Z}})= [\sin\, \omega k_1 \cos\,\omega k_1] \otimes_{p=2}^{d'-1} \left[ \begin{array}{c c} \cos\,\omega k_p &-\sin\,\omega k_p \\ \sin\,\omega k_p &\cos\,\omega k_p \end{array} \right] \otimes \left[ \begin{array}{c} \cos\,\omega k_{d'} \\ \sin\,\omega k_{d'} \end{array} \right]. \end{equation*} The number of representation parameters is $8 (d' -1)$. A more detailed discussion of the QTT approximation for function related vectors can be found in \cite{KhQuant:09,khor-survey-2014}. In cases when the exact low-rank QTT representation is not known, an $\varepsilon$-approximation in the QTT format can be computed by using the standard TT multi-linear approximation tools \cite{Osel_TT:11}. As a first illustration, we consider the QTT approximation of the DOS for the 1D finite difference Laplacian operator in $[0,\pi]$ with Dirichlet boundary conditions, $A=-\mbox{tridiag}\{1,-2,1\}\in \mathbb{R}^{n\times n}$, discretized on the uniform grid of size $h=\pi/(n+1)$ with $n=2047$. The corresponding eigenvalues are given by \[ \lambda_k=4\sin^2(\frac{\pi k}{2n}), \quad k=1,\ldots, n. \] Figure \ref{fig:DoS_QTTInterp_Lapl} represents the Lorentzian-DOS and the corresponding approximation error for its QTT $\varepsilon$-interpolant with $r_{qtt}=5$, computed on the representation grid of size $N=2^{14}$. \begin{figure}[htb] \centering \includegraphics[width=7.5cm]{DOSLapL14.eps} \includegraphics[width=7.5cm]{ErrDoSLapL14.eps} \caption{\small DOS for Laplacian (left), and its QTT approximation with $r_{qtt}=5$ (right). } \label{fig:DoS_QTTInterp_Lapl} \end{figure} In this paper we apply the QTT approximation method to the DOS regularized by Gaussians or Lorentzians and sampled on a fine representation grid of size $N=2^{d'}$. The QTT approximant can be viewed as the rank structured $\varepsilon$-interpolant to the highly non-regular function $\phi_\eta$ regularizing the exact DOS. In this case the application of traditional polynomial or trigonometric type interpolation is inefficient. The QTT approach provides a good approximation to $\phi_\eta$ on the whole spectral interval and requires only a moderate number of representation parameters $r_{qtt}^2 \log N \ll N$, where the average QTT rank $r_{qtt}$, see (\ref{eqn:av_rqtt}) is a small rank parameter adaptively depending on the truncation error $\epsilon>0$. \subsection{QTT approximation to DOS via Lorentzians: proof of concept} \label{ssesc: QTT_DOS} In this section we demonstrate the efficiency of the QTT approximation applied to the DOS via both Gaussian and Lorentzian blurring. We verify by various numerical experiments that the low-rank QTT approximant resolves perfectly the exact DOS. \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{DOS_QTT_H2O_Gauss_eV_qr10.eps} \includegraphics[width=7.0cm]{DOS_QTT_H2O_Gauss_eV_qr10_Z.eps} \caption{\small DOS (in eV) for the H$_2$O molecule via Gaussians (left), and zoom on the left most part of the spectrum. Here $r_{QTT}=9.4$, $\eta=0.4$} \label{fig:DoS_QTT_H2O} \end{figure} In the following numerical examples, we use a sampling vector defined on a grid of size $N \approx 2^{14}$. We set the QTT truncation error to $\epsilon_{QTT}=0.04$, if not explicitly indicated. For ease of interpretation, we set the pre-factor in (\ref{eqn:DOS}) to $1$. It is worth noting that the QTT-approximation scheme is applied to the full TDA spectrum. Our results demonstrate that it renders good resolution in the whole range of energies (in eV) including large "zero gaps". Figure \ref{fig:DoS_QTT_H2O}, left, represents the TDA DOS (blue line) for H$_2$O computed by Gaussian blurring with the parameter $\eta=0.4$, and the corresponding rank-$9.4$ QTT tensor approximation (red line) to the discretized function $\phi_\eta(t)$. For this example, the number of eigenvalues is given by $n=N_{BSE}/2=180$. Figure \ref{fig:DoS_QTT_H2O}, right, provides a zoom of the corresponding DOS and its QTT approximant within the small energy interval $[0,40]$eV. \begin{figure}[htb] \centering \includegraphics[width=7.8cm]{DOS_QTT_H2O_Lor_eV_qr10.eps} \includegraphics[width=7.8cm]{DOS_QTT_H2O_Lor_eV_qr10_Z.eps} \caption{\small DOS for H$_2$O molecule via Lorentzians (blue) and its QTT approximation (red) (left). Zoom on the left most part of the spectrum (right). $\varepsilon$=0.04, $r_{QTT}=10.5$.} \label{fig:DoS_QTT_H2O_Lor} \end{figure} Figure \ref{fig:DoS_QTT_H2O_Lor} demonstrates the resolution of the QTT approximation to the DOS via the Lorentzian blurring indicating similar QTT-ranks as in the case of the Gaussians regularization. \begin{figure}[htb] \centering \includegraphics[width=7.8cm]{DOS_QTT_Gly_Lor_eV_qr16_e01.eps} \includegraphics[width=7.8cm]{DOS_QTT_Gly_Lor_eV_qr16_e01_zoom.eps} \caption{\small DOS for Glycine amino acid via Lorentzians (blue) and its QTT approximation (red), left; (left). Right: zoom of the first part of the spectrum. $\varepsilon$=0.04, $r_{QTT}=16$.} \label{fig:DoS_QTT_Gly} \end{figure} Figure \ref{fig:DoS_QTT_Gly} (Lorentzian blurring) represents similar data, but for the large Glycine amino acid with $n=N_{TDA}=3000$. It is worth noting that the average QTT rank of $\phi_\eta(t)$ sampled on $N=2^{14}$ grid points is about $r_{QTT}=16$, ($\epsilon_{QTT}=0.04$) though the number of eigenvalues $n$ in this case is about $20$ times larger than for the water molecule. This means that for a fixed $\eta$, the QTT-rank remains rather modest relative to the molecular size. This observation confirms Theorem \ref{thm:QTT_R_Gaus_Broad} in Section \ref{ssec: QTT_ranks_DoS}. A comparison of Figures \ref{fig:DoS_QTT_H2O} and \ref{fig:DoS_QTT_H2O_Lor} indicates that the Lorentzian based DOS blurring is slightly smoother than Gaussian blurring. The moderate size of the QTT ranks in Figures \ref{fig:DoS_QTT_H2O_Lor} and \ref{fig:DoS_QTT_Gly} clearly shows the potentials of the QTT $\varepsilon$-interpolation for modeling the DOS of large lattice type clusters. We observe several gaps in the spectral densities, see Figure \ref{fig:DoS_QTT_H2O}, \ref{fig:DoS_QTT_H2O_Lor} and \ref{fig:DoS_QTT_Gly} indicating that polynomial, rational or trigonometric interpolation can be applied only to some energy sub-intervals, but not in the whole interval $[a,b]$. Remarkably, the QTT approximant resolves well the DOS function in the whole energy interval including nearly zero values within the spectral gaps (hardly possible for polynomial/rational based interpolation). \subsection{Numerics for the QTT interpolation to the DOS function} \label{ssec: QTT_cross_DoS} In the previous section we demonstrated that the QTT tensor approximation provides good resolution for the DOS function calculated for a number of molecules. In what follows, we describe a tensor based heuristic QTT approximation of the DOS by using only an incomplete set of sampling points, i.e., QTT representation by adaptive cross approximation (ACA) \cite{OselTyrt:2010,saOsel_cross:2011}. This allows us to recover the spectral density in controllable accuracy with $M$ interpolation points, where $M$ asymptotically scales logarithmically in the grid size $N$. This heuristic approach can be viewed as a kind of ``adaptive QTT $\varepsilon$-interpolation''. In particular, we show by numerical experiments that the low-rank QTT adaptive cross interpolation provides a good resolution of the target DOS with the number of functional calls that asymptotically scales logarithmically, $O(\log N)$, in the size $N$ of the representation grid. In the case of large $N$, the QTT interpolant can be computed by the ACA tensor approximation procedure (see \cite{OselTyrt:2010,saOsel_cross:2011} for the detailed description) that, in general, does not require the full set of functional values over the $N$-grid. In the case of large $N$ this beneficial feature allows to compute the QTT approximation by requiring less than $N$ computationally expensive functional evaluations of $\phi_\eta(t)$. The QTT interpolation via ACA tensor approximation serves to recover the representation parameters of the QTT tensor approximant and normally requires about \begin{equation}\label{eqn:Cost_QTTint} M=C_s r_{qtt}^2 \log_2 N \end{equation} samples of the target $N$-vector\footnote{In our application, this is the DOS functional $N$-vector corresponding to representations via matrix resolvents in (\ref{eqn:DOS_Loren_ImTr}) or (\ref{eqn:DOS_Loren_RTr}).} with a small pre-factor $C_s$, usually satisfying $C_s\leq 10$, that is independent of the fine interpolation grid size $N=2^{d'}$, see, for example, \cite{KhVe:16}. This cost estimate seems promising in the perspective of extended or lattice type molecular systems, requiring large spectral intervals and, as a result, a large interpolation grid of size $N$. Here the QTT rank parameter $r_{qtt}$ naturally depends on the required truncation threshold $\varepsilon>0$, characterizing the $L_2$-error between the exact DOS and its QTT interpolant. The QTT tensor interpolation reduces the number of functional calls, i.e., $M < N$, {\it if the QTT rank parameters (or threshold $\varepsilon>0$) are chosen to satisfy the condition} \[ M=C_s r_{qtt}^2 \log_2 N \leq N. \] The expression on the left-hand side provides a rather accurate estimate on the number of functional evaluations. To complete this discussion, we present numerical tests for the low-rank QTT tensor interpolation applied to the long vector discretizing the Lorentzian-DOS on a fine representation grid of size $N=2^{d'}$. \begin{figure}[htb] \centering \includegraphics[width=15.0cm]{QTT_Cross_H2O_08.eps} \includegraphics[width=15.0cm]{QTT_Cross_H2O_08_zoom.eps} \caption{\small QTT ACA interpolation of the DOS for H$_2$O (top) and zoom in to a small spectral interval (bottom).} \label{fig:DoS_QTTcross_H2O} \end{figure} Figure \ref{fig:DoS_QTTcross_H2O} represents the results of the QTT interpolating approximation to the discretized DOS function (H$_2$O molecule). We use the QTT cross approximation algorithm based on \cite{KhQuant:09,OselTyrt:2010,saOsel_cross:2011,osel-constr-2013} and implemented in the MATLAB TT-toolbox (https://github.com/oseledets/TT-Toolbox). Here we set $\varepsilon=0.08$, $\eta=0.1$ and $N=2^{14}$, providing $r_{QTT}=9.8$. The top two figures display the results on the whole spectral interval, while the bottom figures show the zoom of the same data in the small spectral interval $[0,55]$eV. \begin{figure}[htb] \centering \includegraphics[width=7.0cm]{Times_QTT_cross.eps} \caption{\small DOS for H$_2$O via Lorentzians: the number of functional calls for QTT cross approximation (blue) vs. the full grid size $N$.} \label{fig:DoS_QTTInterp_vsN} \end{figure} Figure \ref{fig:DoS_QTTInterp_vsN} illustrates the logarithmic increase in the number of samples required for the QTT interpolation of the DOS (for the H$_2$O molecule) represented on the grid of size $N=2^{d'}$, where $d'=11,12,\ldots,16$, provided that the rank truncation threshold is chosen by $\epsilon=0.05$ and the regularization parameter is $\eta=0.2$. In this example, the effective pre-factor in (\ref{eqn:Cost_QTTint}) is estimated by $C_s\leq 10$. This pre-factor characterizes the average number of samples required for the recovery of each of the $r_{qtt}^2 \log N$ representation parameters involved in the QTT tensor ansatz. We observe that the QTT tensor interpolant recovers the exact DOS with a high precision. The logarithmic asymptotic complexity scaling $O(\log N)$ (i.e. the number of functional calls required for the QTT tensor interpolation) vs. the grid size $N$ can be observed in Figure \ref{fig:DoS_QTTInterp_vsN} (blue line). \subsection{Upper bounds on the QTT ranks of DOS }\label{ssec: QTT_ranks_DoS} In this section we analyze the upper bounds on the QTT ranks of the discretized DOS obtained by Gaussian broadening. Our numerical tests indicate that Lorentzian blurring leads to a similar QTT rank compared with Gaussians blurring when both are applied to the same grid and the same truncation threshold $\varepsilon>0$ is used in the QTT approximation. We consider the more general case of a symmetric interval, i.e. $t, \lambda_j\in [-a,a]$. Assume that the function $\phi_\eta(t)= \frac{1}{n} \sum\limits_{j=1}^{n} g_\eta(t -\lambda_j)$, $t\in [-a,a]$, in equation (\ref{eqn:DOS_gauss}) is discretized by sampling over the uniform $N$-grid $\Omega_h$ with $N=2^d$, where the generating Gaussian is given by $g_\eta(t)=\frac{1}{\sqrt{2 \pi}\eta}\exp{\left(-\frac{t^2}{2 \eta^2}\right)}$. Denote the corresponding $N$-vector by ${\bf g}={\bf g}_\eta$, and the resulting discretized density vector by $$ \phi_\eta(t) \mapsto {\bf p}={\bf p}_\eta= \frac{1}{n} \sum\limits_{j=1}^{n} {\bf g}_{\eta,j} \in \mathbb{R}^N, $$ where the shifted Gaussian is assigned by the vector $g_\eta(t -\lambda_j)\mapsto {\bf g}_j={\bf g}_{\eta,j}$. Without loss of generality, we suppose that all eigenvalues are situated within the set of grid points, i.e. $\lambda_j\in \Omega_h$. Otherwise, we can slightly relax their positions provided that the mesh size $h$ is small enough. This is not a severe restriction for the QTT approximation of functional vectors since storage and complexity requests depend only logarithmically on $N$. \begin{theorem}\label{thm:QTT_R_Gaus_Broad} Assume that the effective support of the shifted Gaussians $g_\eta(t -\lambda_j)$, $j=1,\dots,n$, is included in the computational interval $[-a,a]$. Then the QTT $\varepsilon$-rank of the vector ${\bf p}_\eta$ is bounded by \[ rank_{QTT}({\bf p}_\eta)\leq C a \log^{3/2}(|\log \varepsilon|), \] where the constant $C=O(|\log \eta|) >0$ depends only logarithmically on the regularization parameter $\eta$. \end{theorem} \begin{proof} The main argument of the proof is similar to that in \cite{VeBoKh:Ewald:14,DKhOs-parabolic1-2012}: the sum of discretized Gaussians, each represented in Fourier basis, can be expanded with merely the same number of Fourier harmonics (uniform basis) as each individual Gaussian. Now we estimate the number of essential Fourier coefficients of the Gaussian vectors ${\bf g}_{\eta,j}$ with a fixed exponent parameter $\eta$, \[ m_0=O(a |\log \eta| \log^{3/2}(|\log \varepsilon|)), \] taking into account their exponential decay. Here $\varepsilon>0$ denotes the rank truncation threshold. Notice that $m_0$ depends logarithmically on $\eta$. Since each Fourier harmonic has exact rank-$2$ QTT representation (see Section \ref{ssec:QTT_Approx}), we arrive at the claimed bound. \end{proof} Notice that the Fourier transform of the Lorentzian in (\ref{eqn:Delta_Lorentz}) is given by \[ e^{-|k|\eta}, \] thus a similar QTT rank bound can be derived for the case of Lorentzian blurred DOS. \begin{table}[hbp] \begin{center} \begin{tabular} [c]{|c|c|c|c|c|c|c|c|}% \hline Molecule & H$_2$O & NH$_3$ & H$_2$O$_2$ & N$_2$H$_4$ &C$_2$H$_5$OH & C$_2$H$_5$ NO$_2$ & C$_3$H$_7$ NO$_2$ \\ \hline $n=N_{ov}$ & $180$ & $215$ & $531$ & $657$ & $1430$ & $3000$ & $4488$ \\ \hline QTT ranks & $11$ & $11$ & $12$ & $11$ & $15$ & $16$ & $13$ \\ \hline \end{tabular} \end{center} \caption{\small QTT ranks of Lorentzians-DOS for some molecules; $\varepsilon=0.04$, $\eta=0.4$, $N=16384$.} \label{tab:QTT_ranks_Lor} \end{table} Table \ref{tab:QTT_ranks_Lor} shows that the average QTT tensor rank remains almost independent of the molecular size, which confirms Theorem \ref{thm:QTT_R_Gaus_Broad}. The weak dependence of the rank parameter on the molecular geometry can be observed. \section{Towards calculation of the BSE absorption spectrum}\label{sec:BSE_case} In this section we describe the generalization of our approach to the case of the full BSE system. Within the BSE framework, the optical absorption spectrum of a molecule is defined by \begin{equation} \epsilon(\omega) \equiv d_r ^{\text{\normalfont\scriptsize\textsf H}}\delta(\omega I_{2n}-H)d_l =\sum_{j=1}^{2n} \frac{(d_r^{\text{\normalfont\scriptsize\textsf H}} (z_r)_j)((z_l)_j^{\text{\normalfont\scriptsize\textsf H}} d_l)}{(z_l)_j^{\text{\normalfont\scriptsize\textsf H}}(z_r)_j} \delta(\omega-\lambda_j), \label{eq:bseabs} \end{equation} where \[ d_r=\begin{bmatrix} d \\ -\conj d\end{bmatrix} \quad \text{and} \quad d_l=\begin{bmatrix} d \\ \conj d\end{bmatrix} \] are the right and left \emph{optical transition vectors}, respectively, and $d$ is a vector \ reshaped from a transition matrix $T$ of dimension $N_o \times (N_b - N_o)$. The $(i,a)$th element of $T$ is given by $\langle \psi_i | \vec{x} | \psi_a \rangle$, where $\vec{x}$ is a \ position operator in the direction of $x$ and $\psi_i$ and $\psi_a$ are a pair of occupied and unoccupied molecular \ orbitals~\cite{molgw}. Similar to the DOS, the function $\epsilon(\omega)$ is a sum of Dirac-$\delta$ peaks centered at eigenvalues of the BSH. However, the height of each peak, which is often referred to as the oscillator strength, is determined by the projection of the corresponding left and right eigenvectors of $H$ onto the optical transition vectors $d_l$ and $d_r$. A smooth approximation of \eqref{eq:bseabs} can be obtained by replacing the Dirac-$\delta$ function with either a Gaussian or a Lorentzian with an appropriate broadening width. If we choose to smooth by a Lorentzian, we then need to compute \begin{equation} \epsilon(\omega) \approx \frac{1}{\pi}\mbox{Im}\biggl[ d_r^{\text{\normalfont\scriptsize\textsf H}} \left(\omega I_{2n}-H -i \eta I_{2n} \right)^{-1} d_l\biggr], \label{eq:lorabs} \end{equation} where $\eta$ is related to the width of broadening. For a fixed frequency $\omega$, \eqref{eq:lorabs} can be evaluated by solving a linear system of the form \[ \left(\omega I_{2n}-H -i \eta I_{2n} \right) x = d_l. \] The block sparse and low-rank structure of $H$ can be used to reduce the cost for solving such a linear system. The detailed numerical analysis of this scheme for the BSE system will be a topic of a forthcoming paper. \section{Conclusions} The new approach to approximating the DOS of the TDA of a BSE Hamiltonian is based on two main techniques. First, we take advantage of the low rank structure of the TDA and evaluate the trace of the resolvent directly instead of using stochastic sampling techniques. The presented economical algorithm provides an efficient way to calculate the DOS regularized by Lorentzians. The cost of the computation scales linearly with respect to the matrix size. Second, a QTT based tensor interpolation scheme is used to approximate the DOS discretized on large representation grids. This approximation scheme allows us to estimate the DOS with $M$ function evaluations, where $M$ scales logarithmically with respect to the grid size on which the DOS is evaluated. The approach can be applied to a wide class of rank-structured symmetric spectral problems. In Theorems \ref{thm:Trace_cost} and \ref{thm:Trace_cost_real}, we prove linear scaling of the structured trace calculation algorithm in the matrix size. This result is confirmed by numerical experiments performed to compute the DOS of BSH associated with some molecular systems as shown in Figure \ref{fig:DoS_trace_Times}. We justify the low rank QTT approximation of the DOS in the case of Gaussian regularization, see Theorem \ref{thm:QTT_R_Gaus_Broad}. The efficiency of low-rank QTT approximation to DOS is illustrated numerically on the example of discrete Laplacian as well as for the BSE spectral problem for several moderate size molecules. Numerical tests demonstrate the logarithmic complexity of the QTT cross approximation scheme in the grid size, applied to the discretized DOS as depicted in Figure \ref{fig:DoS_QTTInterp_vsN}. It is worth noting that our approach serves to recover DOS on the whole spectral interval which is demonstrated in a number of numerical tests. However, the algorithms are applicable to any fixed subinterval of interest in the whole spectrum, which will correspondingly reduce the QTT tensor ranks and the overall computational time. The presented methods introduce a new efficient tool for numerical approximation to the DOS for large matrices arising in various applications in condensed matter physics, computational quantum chemistry as well as in large-scale problems of numerical linear algebra. \begin{footnotesize} \bibliographystyle{abbrv}
\section{Introduction} \label{Sec:intro} Photodissociation regions (PDRs) are key regions in the study of the interstellar medium. They are the interfaces between molecular gas, where stars form, and the surrounding galactic medium \citep[see review by][]{Hollenbach99}. Dissociating UV photons produced by young stars are absorbed in PDRs by dust and gas allowing a transition from the atomic phase to the molecular phase. Understanding the structure and physical and chemical processes in PDRs is necessary to constrain stellar feedback on molecular clouds, but also to be able to interpret observations of distant galaxies where the contribution of unresolved PDRs dominate the IR spectrum. Intense emission from fine-structure lines of C$^+$, O, C, as well as H$_2$ rotational and rovibrational transitions and CO rotational transitions can be observed in PDRs. It is now admitted that emission in these atomic and molecular lines is mainly induced by the heating of the gas by UV photons from nearby massive stars involving the photo-electric effect on grains \citep{Bakes94, Weingartner01} as well as the collisional de-excitation of H$_2$ excited by UV pumping \citep{Sternberg89, Burton90, Rollig06}. Several stationary PDR models have been developed to analyse the emission in these lines \citep{Tielens85, Sternberg89, Kaufman99, LePetit06} and to constrain the chemical and physical processes that take place in PDRs. Over the years, these models that simulate radiative transfer, chemistry, thermal processes of the gas and dust have progressed in their description of the microphysics and chemical processes at play in these regions \citep{Rollig07}. Today, some of these codes as the Meudon PDR code, can simulate very detailed micro-physical processes as input and output line and continuum radiative transfer, non local pumping by infrared photons and detailed surface chemistry with stochastic processes \citep{Goicoechea07, Gonzalez08, LeBourlot12, Bron14, Bron16}. The analysis of line emission in PDRs is intimately connected to considerations on the morphology of these regions. Earlier observations of a few mid-/high-J CO lines from ground-based submillimeter and airborne far-IR observations have suggested that PDR interfaces reach high temperatures and densities both in the atomic and molecular gas, which requires the interface to be clumpy or filamentary \citep{Stutzki88}. This led \cite{Burton90} to propose a clumpy PDR model in which dense clumps ($n_\textrm{H}$ $\sim$ $10^6$ - $10^7$ cm$^{-3}$) are embedded in a less dense interclump medium ($n_\textrm{H}$ $\sim$ $10^3$ - $10^5$ cm$^{-3}$). In following studies on the bright PDRs M17 SW, Orion Bar and Carina, clumpy PDR models were used to analyse quite successfully the observations \citep{Meixner92, Hogerheijde95, Kramer08,Andree-Labsch17}. The Herschel Space Observatory, with its three instruments HIFI, SPIRE and PACS \citep{Pilbratt10}, has opened the possibility to observe, more systematically and continuously in wavelengths, the warm molecular gas in galactic and extragalactic sources by covering all CO excitation lines from J$_{up}$ = 4 to J$_{up}$ = 50. This allows us to build full CO spectral line energy distributions (SLEDs) including high-J levels. Such CO SLEDs have been particularly studied in star-forming regions in order to provide information on the energetic processes acting in these objects. This includes low- and high-mass protostars \citep{Yildiz10, Visser12, Manoj13, Karska13, Goicoechea15} and a couple of PDRs associated with young stars of high or intermediate mass \citep{Koehler14, Stock15}. Studies were also performed on the Galactic Center with observations towards Sgr A* \citep{Goicoechea13}, as well as in the Sgr B2 cores, B2(M) and B2(N) \citep{Etxaluze13}. In external galaxies, CO SLEDs have been obtained for Seyfert galaxies, starburst galaxies, (ultra)luminous infrared galaxies ((U)LIRGs) and AGNs \citep{Rangwala11, Hailey12, Greve14, Kamenetzky14, Mashian15, Rosenberg15, Wu15}. Modelling CO SLEDs in protostars or in active regions of galaxies is complicated by the fact that mechanical heating due to shocks (supernova explosions or stellar winds) is likely to be a source of energy powering this CO emission \citep[see in particular][]{Kazandjian12, Kazandjian15}. In PDRs, UV photons are expected to be the major actor and these CO lines offer the possibility to further constrain the gradients in gas density and temperature, as well as the underlying excitation processes. Using a PDR model, \cite{Stock15} analysed the full CO SLEDs of two PDRs generated by massive star formation, S~106 and IRAS~23133+6050. Their best results were obtained with a two-component model comprising high-density clumps (n$_\textrm{H}$ $\sim 10^6$\,cm$^{-3}$) immersed in a strong far-UV radiation field \citep[G$_0$ $\sim 10^5$ in units of the Habing field;][]{Habing68} and an interclump medium at lower density and irradiation field (n$_\textrm{H}$ $\sim 10^4$\,cm$^{-3}$, G$_0$ $\sim 10^4$). However, the high value derived for the UV field on the clump (a factor of 10 higher compared to the interclump medium) is striking. In this work, we try to bring some new insights into this subject. We present a study of two prototypical PDRs, NGC~7023 NW and the Orion Bar. The Orion Bar is probably the most studied PDR \citep{Tielens93}. NGC~7023 NW is well known to exhibit bright H$_2$ filaments at the interface with the illuminating star \citep{Lemaire96}. The two objects have been extensively studied in the past but often using a limited set of tracers. Here, we take benefit of the Herschel HIFI, SPIRE and PACS data. In order to include further tracers of the warm/hot molecular gas, we complete this dataset with ancillary data coming from ground-based instruments as well as by ISO and Spitzer space missions. The full data sets include mid-/high-J CO, H$_2$, CH$^+$, [CII], [OI], [CI], HD, OH and HCO$^+$ lines. We analyse these observations using the latest version of the Meudon PDR code \citep{LePetit06}. Our goal is to get better insights on the structure of the irradiated interface at the border of PDR and to determine whether UV photons alone can explain the high-J excited CO lines observed in PDRs. The article is organised as follows. In Sect.\,\ref{Sec:obj}, we compile information from the literature on the two PDRs of interest. The observations are described in Sect.\,\ref{Sec:obs}, including new Herschel data as well as complementary data gathered from the literature or archives. The CO observations are described in Sect.\,\ref{Sec:ObsData}, including both line profiles and intensity ladders. In Sect.\,\ref{Sec:Models}, we describe the Meudon PDR model and the procedure used to fit the observational data, and present our modeling results. We used isobaric models to mimick the density gradient at the interface. In Sect.\,\ref{Sec:Discussion}, we revisit the impact of our analysis on the interpretation of the emission in the mid-/high-J CO lines and conclude on the presence of sharp PDR interfaces at high thermal pressure that were likely shaped by the UV radiation field. \begin{figure} [ht] \begin{center} \includegraphics[width=0.45\textwidth]{Figures/image_oribar.pdf} \includegraphics[width=0.45\textwidth]{Figures/ngc_image.pdf} \end{center} \caption{Composite images of the Orion Bar (top) and NGC 7023 (bottom). Red indicates the 8 $\mu$m emission observed with {\it Spitzer}. Green shows the vibrationally excited emission of H$_2$ from \cite{Lemaire96} and \cite{VanDerWerf96} for NGC 7023 and Orion Bar, respectively. Blue shows the $^{12}$CO emission, J = 6-5 for the Orion Bar \citep{Lis03} and $J=1-0$ for NGC 7023 \citep{Gerin98}. The circles represent the HPBW of {\it Herschel} at 550 GHz and 1900 GHz. The square indicates the position of the central spaxel of the PACS observations. \label{Fig:Images_OrionBar_N7023}} \end{figure} \begin{figure} [ht] \begin{center} \includegraphics[width=0.45\textwidth]{Figures/figureCO_13CO_profiles.pdf} \end{center} \caption{$^{12}$CO and $^{13}$CO lines observed with HIFI toward NGC 7023 (left) and the Orion Bar (right). The vertical red line indicates the systemic velocity of the source. \label{Fig:Line_profiles_CO_13CO}} \end{figure} \section{The prototypical PDRs: NGC~7023 and Orion Bar} \label{Sec:obj} \subsection{NGC~7023}\label{sec:Object_NGC7023} NGC 7023 is a reflection nebula in the Cepheus constellation illuminated by HD~200775 [RA(2000) = 21h01m36.9s~; Dec(2000) = +68$^\circ$09'47.8"], a spectroscopic binary system (B3Ve and B5, see \citealt{Alecian08}). Its distance from the Sun was measured by Hipparcos at $430_{-90}^{+160}\,\mathrm{pc}$ in the 1997 catalogue \citep{VanDenAncker97}. The new reduction by \cite{VanLeeuwen07} gave $520\pm150\,\mathrm{pc}$, whereas \cite{Benisty13} have proposed a distance of $320\pm51\,\mathrm{pc}$ based on a study of the orbital parameters of the spectroscopic binary system HD~200775, which we adopt in the following. At this distance, 1\arcsec corresponds to a physical length of $1.6\times10^{-3}$pc. \cite{Chokshi88} observed the [CII] 158\,$\mu$m and [OI] 63\,$\mu$m lines in NGC~7023 and derived at the emission peak located 50\arcsec~NW from the star a UV field of $G_0 = 2600$ and a density of $n_\textrm{H} \sim 4\times 10^3\,\mathrm{cm}^{-3}$. Later observations have shown that the star formation process has shaped a cavity inside the molecular cloud with walls consisting of dense PDRs, at the north-west (NW), at the south and at the east \citep{Fuente92, Rogers95, Fuente98, Gerin98}. Very bright thin filaments were revealed by high angular resolution images in the Extended Red Emission (ERE), vibrationally excited H$_2$ emission lines \citep{Sellgren92, Lemaire96, Witt06} and in HCO$^+$ millimeter lines \citep{Fuente96}. These structures also correspond to enhanced emission in polycyclic aromatic hydrocarbon (PAH) emission \citep{An03, Berne07}, in [O I] (63 and 145\,$\mu$m) and [CII] (158\,$\mu$m) lines \citep{Bernard-Salas15}, and in warm CO and dust emission \citep{Rogers95, Gerin98, Koehler14, Bernard-Salas15}. From these observations emerges a picture of the NGC~7023 NW morphology in which the PDR interface is made of filamentary structures at high-density, $n_\textrm{H} \sim 10^5-10^6\,\mathrm{cm}^{-3}$ \citep{Martini97, Lemaire96, Fuente96}, which are embedded in a more diffuse gas with $n_\textrm{H} \sim 10^3-10^4\,\mathrm{cm}^{-3}$ \citep{Chokshi88,Rogers95}. This filamentary structure is observed at small spatial scales of 0.004 pc or less. Whereas it is composed of detached filaments or the result of compressed sheets is still unclear \citep{Lemaire96, Fuente96}. Because of its geometry, brightness and proximity, the NW PDR of NGC~7023 turned out to be one of the best sites to study the physical and chemical processes taking place in a PDR. \subsection{The Orion Bar} The Orion Bar PDR lies $\sim 2 \arcmin$ SE of the Trapezium stars cluster: $\theta^1$ Orionis C, A and E \citep{SimonDiaz06, Allers05}, a cluster of O and B stars that creates a H\,{\sc ii}\, region that penetrates into the parent molecular cloud. The UV intensity impinging on the PDR has been estimated to be $G_0 = 1-4\times10^4$ in Habing units \citep{Tielens85, Marconi98}. The distance of the Orion nebula has been measured with great precision by \cite{Menten07} from trigonometric parallax, yielding a value of $414\pm7\,\mathrm{pc}$. An angular distance of 1 arsecond corresponds therefore to $2\times10^{-3}$ pc. Because of its proximity and edge-on geometry, the Bar is one of the most studied PDRs. It is the prototype PDR associated with massive-star formation, which can be used as a template for more distant regions including extragalactic studies. \cite{Hogerheijde95} reported spatial observations of the Bar in rotational transitions from a variety of molecules and concluded that the morphology of the molecular emission is mainly due to the geometry of the Bar that changes from face-on to almost edge-on and then face-on. The bright PDR corresponds to the edge-on part. The overall observed spatial stratification of the Bar was found to require an average density of at least $5\times 10^4$ cm$^{-3}$ in order to account for the observed offsets of ionization front and molecular lines \citep[see also][]{Wyrowski97}. Most models of the molecular emission in the Orion Bar used high-density clumps (n$_\textrm{H} \sim 10^6-10^7$ cm$^{-3}$) embedded in a lower density gas ($n_\textrm{H} = 5\times10^4-10^5$ cm$^{-3}$). Clumps were introduced first to explain the emission of excited lines of CO and warm H$_2$ emission \citep{Parmar91,Tauber94, VanDerWerf96} but were also found to be necessary to model the HCO$^+$, HCN \citep{YoungOwl00} and OH \citep{Goicoechea11} emission at the PDR interface. The interface with the H\,{\sc ii}\, region is of special interest if one wants to study the feedback of star formation on the molecular cloud. \cite{Omodaka94} have discussed that the Bar has been shaped by shock compression related to the expansion of the H\,{\sc ii}\, region. \cite{Giard94} mapped the 3.3\,\,$\mu$m\, PAH emission and revealed a clumpy structure of the gas down to scales of a few 10$^{-3}$\,pc behind the ionization front and in front of the molecular interface traced by vibrational H$_2$ \citep{Tielens93}. This is also well illustrated in Fig.\,\ref{Fig:Images_OrionBar_N7023} that combines the IRAC 8\,$\mu$m\, map dominated by PAH emission with the H$_2$ map of \cite{VanDerWerf96}. \cite{Fuente96_Orion} observed the molecular interface and concluded that it consists of a corrugated dense layer ($n_\textrm{H} \sim 10^6$ cm$^{-3}$). \cite{Walmsley00} proposed that it can be described by a filament using a cylindrical shape. \cite{Andree-Labsch17} showed that this shape can be excluded due to the visible shadowing pattern seen in the maps. Recently, the Orion Bar has been observed in CO and HCO$^+$ by ALMA \citep{Goicoechea16}. The sharp edge ($\sim$ 2 \arcsec) at which the CO and HCO$^+$ emission start to occur coincides with the bright H$_2$ vibrational emission. The H/H$_2$ and C$^+$/C/CO transitions should therefore be very close at this interface, which is incompatible with stationary PDR models at $n_\textrm{H} \sim 5\times 10^4$ cm$^{-3}$. \begin{figure*} [ht] \begin{center} \includegraphics[width=0.45\textwidth]{Figures/Ladder_12CO.pdf} \includegraphics[width=0.45\textwidth]{Figures/Ladder_13CO.pdf} \end{center} \caption{Observed intensities of $^{12}$CO (left) and $^{13}$CO (right) in the Orion Bar (top panel) and NGC~7023~NW (bottom panel). \label{Fig:12_CO_ladder}} \end{figure*} \section{Observations} \label{Sec:obs} The observations of NGC 7023 NW were programmed in the framework of the WADI \citep{Ossenkopf11} Guaranteed Time Key Program (GTKP) and were centered on the bright H$_2$ filaments, a position referred to as the H$_2$ peak \cite[][$\alpha_{2000}$=$21^{\mathrm{h}}01^{\mathrm{m}}32.4^{\mathrm{s}}, \delta_{2000}$=$+68^{\circ}10\arcmin25.0\arcsec$]{Joblin10}. The Orion Bar was observed at the CO$^+$ peak position \citep[][$\alpha_{2000}$=$5^{\mathrm{h}}35^{\mathrm{m}}20.61^{\mathrm{s}}, \delta_{2000}$=$-5^{\circ}25\arcmin14.0\arcsec$; cf. Fig.\,\ref{Fig:Images_OrionBar_N7023}]{Stoerzer95} as part of the HEXOS GTKP \citep{Bergin10}. Earlier studies based on these data have discussed OH emission \citep{Goicoechea11} as well as CH$^{+}$ and SH$^{+}$ lines \citep{Nagy13}. The WADI and HEXOS programs gathered spectroscopic data using HIFI and PACS instruments. We also use in this article spectroscopic data from SPIRE that were obtained on the same objects as part of the SAG\,4 GTKP \citep{Habart10,Koehler14}. Data from the litterature and archives were also collected in particular for H$_2$. The full data sets, which are used in this study, are reported in Tables\,\ref{Tab:NGC7023_raw_data} and \ref{Tab:Orion_raw_data} for NGC\,7023 and the Orion Bar, respectively. \subsection{Herschel PACS observations} The PACS range spectroscopy observations of NGC 7023 and the Orion Bar were reduced using HIPE version 10. We used the standard pipeline to extract the spectrum from the central spaxel for the blue and red channels, including defringing. We applied the correction for point sources, considering that the high-J CO emission originates from dense structures of arcsec size and therefore smaller than the spaxel size, which is 3.2$\times$3.2\,arcsec$^2$ (cf. Sec.\ref{Sect:obs_corrections}). This is still an approximation since the observed filamentary interface extends over several spaxels but there is no correction available for a semi-extended source. We checked that the intensities of the lines of interest remain very similar when performing the reduction with a more recent version of HIPE (e.g. v 13). Line flux was calculated by fitting the lines observed on the central spaxel with a Gaussian function. Error bars were calculated by quadratically summing the different sources of errors: calibration error and error from the Gaussian fit associated with spectral rms. We used a 20\% error for the flux calibration, which is intermediate between the values of 10-30\% used in previous studies \citep{Bernard-Salas12, Bernard-Salas15, Okada13}. \subsection{Herschel HIFI observations} The HIFI observations were obtained using the Wide Band Spectrometer, that provides a spectral resolution of 1.1 MHz ($\sim0.6$ km\,s$^{-1}$ at 550 GHz). The half power beam width (HPBW) varies between 9\arcsec at high frequency (1900 GHz) and 39\arcsec at low frequency (550 GHz). For NGC~7023, the observations were focused on specific frequency ranges, and cover a number of CO lines, CH$^+$ (J=1-0 and 2-1), HCO$^+$ (J=6-5) and the [CII] lines. The data reduction for NGC 7023 was straightforward and consisted in the subtraction of a linear baseline for each scan and then in averaging all the scans, including both the H and V polarisations. The data reduction procedure for the [CII] line is described in \citet{Ossenkopf13}. In the case of the Orion Bar, our observations consist in a spectral survey performed at the CO$^+$ peak presented in \citet{Nagy13} and further discussed in \citet{Nagy17}. Line intensities for both sources were calculated by using the beam efficiencies of \cite{Roelfsema12} and by performing a Gaussian fit to the line profiles. \cite{Ossenkopf13} argued that $T_{\mathrm{A}}$ is more appropriate for extended emission, and $T_{\mathrm{mb}}$ for point sources. Emission in some lines is extended (e.g. [CII]), whereas it is not in others (e.g. high-J CO). In this work, we use the mean value of $T_{\mathrm{A}}$ and $T_{\mathrm{mb}}$ because the bright interface is in between point-source and extended. In addition, it is not practical to have a different treatment for every individual line. Finally, the fit error being negligible ($<1\%$), our observational uncertainty is defined as the quadratic sum of the spectral rms and the flux calibration error, which is reported in \cite{Roelfsema12}. A sample of the observed $^{12}$CO and $^{13}$CO lines observed with Herschel-HIFI for both sources is shown in Fig.\,\ref{Fig:Line_profiles_CO_13CO}. \subsection{Herschel SPIRE observations} We have used the SPIRE FTS fully sampled maps to extract complementary data at the CO$^+$ peak. The data reduction is presented in details in \cite{Koehler14} for NGC~7023, and in \cite{Parikka17} for the Orion Bar. One important aspect is the use of the super-resolution method SUPREME (Ayasso et al., in prep.) to achieve higher spatial resolution than standard SPIRE observations, more specifically 11.9$\arcsec$ at 200\,$\mu$m, 19.0$\arcsec$ at 400\,$\mu$m and 24.1$\arcsec$ at 600\,$\mu$m. The total error on the integrated line intensities was estimated to be 30\%, which includes the calibration uncertainties and the line fitting errors \citep[see][for more information]{Koehler14}. \subsection{Additional data} We used additional observations to further constrain our models. For NGC 7023, the pure rotational lines of H$_2$ were observed with the low spectral resolution modules of Spitzer-IRS \citep{Werner04a, Houck04} and with ISO-SWS \citep{Degraauw96}. For the Spitzer data \citep{Werner04a}, we used the CUBISM reduction tool \citep{Smith07} including the slit-loss correction function for extended sources, considering that the filamentary interfaces in Orion Bar and NGC 7023 are narrow but extended sources; their width is indeed marginally resolved at the Spitzer spatial resolution. The line fluxes were then extracted by fitting Gaussian profiles to the spectra extracted toward the H$_2$ peak position over 4 pixels. Uncertainties take into account fit and calibration errors. The same lines were observed with ISO, and we used the intensity values reported in \citet{Fuente99}. The intensities for the vibrationally-excited lines of H$_2$, observed at the CFHT and the Perkins Telescope, are taken from \citet{Lemaire96}, \citet{Lemaire99} and \citet{Martini99}, respectively. Finally, we used the HCO$^+$ $J=1-0$ observations obtained at the Plateau de Bure Interferometer \citep{Fuente96}, integrating line intensities between 1 and 5 km\,s$^{-1}$. For Orion Bar, we used pure rotational H$_2$ lines from ISO-SWS data \citep[Bertoldi, private communication;][]{Habart04} and ground-based TEXES data \citep{Allers05}. The latter intensities are slightly lower compared to the ISO measurements. This can be due to the fact that the two instruments observed at different positions. The ISO-SWS data provides a position closer to the CO$^+$ peak but lower spatial resolution. For vibrationally excited H$_2$, we used data obtained with the BEAR instrument at the CFHT (Joblin, Maillard, Noel, unpublished) and the observations from \cite{VanDerWerf96}. \begin{table*} [ht] \begin{center} \caption{Observed data for NGC 7023, and dilution factor $\Omega$. The reported intensities have not been corrected for beam dilution. \label{Tab:NGC7023_raw_data}} \scriptsize \begin{tabular}{l l r | l l l l |l} \hline \hline \multicolumn{3}{c}{Line} & \multicolumn{5}{c}{Observation data sets $[\mathrm{W} \mathrm{m}^{-2} \mathrm{sr}^{-1}]$} \\ \hline Species & Transition & \multicolumn{1}{c}{Position} & SPIRE & HIFI & PACS & others & $\Omega$ (dilution factor) \\ \hline $^{12}\mathrm{CO}$ & & & & & & & \\ & J=4-3 & 461.041 GHz & $7.6 \pm 2.3\,(-10)$ & - & - & - & 0.05 \\ & J=5-4 & 576.268 GHz & $2.0 \pm 0.6\,(-9)$ & - & - & - & 0.07 \\ & J=6-5 & 691.473 GHz & $5.3 \pm 1.6\,(-9)$ & $7.5 \pm 0.7\,(-9)$ & - & - & 0.08 \\ & J=7-6 & 806.652 GHz & $1.1 \pm 0.3\,(-8)$ & - & - & - & 0.10 \\ & J=8-7 & 921.800 GHz & $1.1 \pm 0.3\,(-8)$ & $2.5 \pm 0.3\,(-8)$ & - & - & 0.11 \\ & J=9-8 & 1036.912 GHz & $1.8 \pm 0.5\,(-8)$ & $4.2 \pm 0.4\,(-8)$ & - & - & 0.12 \\ & J=10-9 & 1151.985 GHz & $1.9 \pm 0.6\,(-8)$ & $3.5 \pm 0.4\,(-8)$ & - & - & 0.14 \\ & J=11-10 & 1267.014 GHz & $2.8 \pm 0.8\,(-8)$ & - & - & - & 0.15 \\ & J=12-11 & 1381.995 GHz & $2.5 \pm 0.7\,(-8)$ & - & - & - & 0.17 \\ & J=13-12 & 1496.923 GHz & $2.5 \pm 0.7\,(-8)$ & $3.9 \pm 0.5\,(-8)$ & - & - & 0.18 \\ & J=15-14 & 1726.603 GHz & - & - & $3.4 \pm 0.7\,(-8)$ & - & 0.21 \\ & J=16-15 & 1841.345 GHz & - & - & $2.0 \pm 0.4\,(-8)$ & - & 0.23 \\ & J=17-16 & 1956.018 GHz & - & - & $1.2 \pm 0.3\,(-8)$ & - & 0.28 \\ & J=18-17 & 2070.616 GHz & - & - & $7.3 \pm 1.7\,(-9)$ & - & 0.28 \\ & J=19-18 & 2185.135 GHz & - & - & $4.3 \pm 2.5\,(-9)$ & - & 0.28 \\ $^{13}\mathrm{CO}$ & & & & & & & \\ & J=5-4 & 550.926 GHz & $1.0 \pm 0.3\,(-9)$ & $1.7 \pm 0.2\,(-9)$ & - & - & 0.07 \\ & J=6-5 & 661.067 GHz & $1.1 \pm 0.3\,(-9)$ & - & - & - & 0.08 \\ & J=7-6 & 771.184 GHz & $1.8 \pm 0.5\,(-9)$ & - & - & - & 0.09 \\ & J=8-7 & 881.273 GHz & $2.3 \pm 0.7\,(-9)$ & $4.1 \pm 0.4\,(-9)$ & - & - & 0.11 \\ & J=9-8 & 991.329 GHz & $3.8 \pm 1.1\,(-9)$ & - & - & - & 0.12 \\ & J=10-9 & 1101.350 GHz & $3.1 \pm 0.9\,(-9)$ & $4.8 \pm 0.5\,(-9)$ & - & - & 0.13 \\ $\mathrm{CH}^+$ & & & & & & & \\ & J=1-0 & 835.137 GHz & - & $1.0 \pm 0.1\,(-9)$ & - & - & 0.10 \\ & J=2-1 & 1669.281 GHz & - & $5.5 \pm 0.8\,(-9)$ & $6.6 \pm 2.5\,(-9)$ & - & 0.28 \\ & J=3-2 & 2501.440 GHz & - & - & $5.6 \pm 2.1\,(-9)$ & - & 0.28 \\ $\mathrm{HCO}^+$ & & & & & & & \\ & J=1-0 & 89.188 GHz & - & - & - & $4.5 \pm 1.3\,(-12)^\mathrm{a}$ & 0.49 \\ & J=6-5 & 535.062 GHz & - & $8.2 \pm 0.7\,(-11)$ & - & - & 0.06 \\ $\mathrm{C}^+$ & & & & & & & \\ & $^2P_{3/2}$ - $^2P_{1/2}$ & $157.68\,\mu\mathrm{m}$ & - & $7.6 \pm 1.1\,(-7)$ & $7.3 \pm 1.5\,(-7)$ & $9.9 \pm 2.0\,(-7)^\mathrm{b}$ & 0.28 \\ $\mathrm{C}$ & & & & & & & \\ & $^3P_1$ - $^3P_0$ & 492.161 GHz & $2.8 \pm 0.8\,(-10)$ & - & - & - & 0.10 \\ $\mathrm{O}$ & & & & & & & \\ & $^3P_0$ - $^3P_1$ & $145.53\,\mu\mathrm{m}$ & - & - & $4.0 \pm 0.8\,(-7)$ & $3.8 \pm 0.8\,(-7)^\mathrm{b}$ & 0.28 \\ & $^3P_1$ - $^3P_2$ & $ 63.18\,\mu\mathrm{m}$ & - & - & - & $1.8 \pm 0.4\,(-6)^\mathrm{b}$ & 0.28 \\ $\mathrm{HD}$ & & & & & & & \\ & J=0-1 & $112.07\,\mu\mathrm{m}$ & - & - & $2.7\pm2.2\,(-9)$ & - & 0.28 \\ \hlin $\mathrm{H}_2$ & & & ISO-SWS & {\it Spitzer} & CFHT $^\mathrm{c}$ & Perkins Telescope$^\mathrm{d}$ & - \\ & 0-0 S(0) & $28.22\,\mu\mathrm{m}$ & $3.4\pm1.0\,(-8)$ & - & - & - & 0.10 \\ & 0-0 S(1) & $17.03\,\mu\mathrm{m}$ & $2.1\pm0.4\,(-7)$ & $2.0_{-0.3}^{+0.6}\,(-7)$ & - & - & 0.10$^{\mathrm{ISO}}$ / 0.20$^{\mathrm{{\it Spitzer} }}$ \\ & 0-0 S(2) & $12.28\,\mu\mathrm{m}$ & $2.4\pm0.6\,(-7)$ & $5.5_{-1.7}^{+2.0}\,(-7)$ & - & - & 0.10$^{\mathrm{ISO}}$ / 0.55$^{\mathrm{{\it Spitzer} r}}$ \\ & 0-0 S(3) & $ 9.66\,\mu\mathrm{m}$ & $4.1\pm1.0\,(-7)$ & $6.9_{-1.5}^{+3.1}\,(-7)$ & - & - & 0.10$^{\mathrm{ISO}}$ / 0.55$^{\mathrm{{\it Spitzer} }}$ \\ & 0-0 S(4) & $ 8.02\,\mu\mathrm{m}$ & $1.5\pm0.4\,(-7)$ & - & - & - & 0.10$^{\mathrm{ISO}}$ / 0.55$^{\mathrm{{\it Spitzer} }}$ \\ & 0-0 S(5) & $ 6.91\,\mu\mathrm{m}$ & $2.6\pm0.4\,(-7)$ & $4.6 \pm 1.4\,(-7)$ & - & - & 0.10$^{\mathrm{ISO}}$ / 0.55$^{\mathrm{{\it Spitzer} }}$ \\ & 1-0 S(1) & $ 2.12\,\mu\mathrm{m}$ & - & - & $2.1\pm0.21\,(-7)$ & - & 1 \\ & 1-0 S(2) & $ 2.03\,\mu\mathrm{m}$ & - & - & $7.6\pm1.7\,(-8)$ & - & 1 \\ & 2-1 S(1) / 1-0 S(1) & & - & - & - & 0.29 & \\ \hline \end{tabular}\\ $^\mathrm{a}$ Fuente et al. (1996) - $^\mathrm{b}$ Bernard-Salas et al. (2015) - $^\mathrm{c}$ Lemaire et al. 1996, 1999 - $^\mathrm{d}$ Martini et al. 1999 \end{center} \end{table*} \newpage \begin{table*} [ht!] \begin{center} \caption{Observed data for the Orion Bar and dilution factor $\Omega$. The reported intensities have not been corrected for beam dilution.\label{Tab:Orion_raw_data}} \scriptsize \begin{tabular}{l l r | l l l l | l} \hline \hline \multicolumn{3}{c}{Line} & \multicolumn{5}{c}{Integrated intensity $[\mathrm{W} \mathrm{m}^{-2} \mathrm{sr}^{-1}]$} \\ \hline Species & Transition & \multicolumn{1}{c}{Position} & SPIRE & HIFI & PACS & others &$\Omega$ \\ \hline $^{12}\mathrm{CO}$ & & & & & & \\ & J=4-3 & 461.041 GHz & $1.5 \pm 0.5\,(-8)$ & - & - & - & 0.05 \\ & J=5-4 & 576.268 GHz & $3.7 \pm 1.1\,(-8)$ & $7.0 \pm 0.6\,(-8)$ & - & - & 0.07 \\ & J=6-5 & 691.473 GHz & $7.2 \pm 2.2\,(-8)$ & $1.2 \pm 0.1\,(-7)$ & - & - & 0.08\\ & J=7-6 & 806.652 GHz & $1.5 \pm 0.5\,(-7)$ & $1.8 \pm 0.2\,(-7)$ & - & - & 0.10\\ & J=8-7 & 921.800 GHz & $1.7 \pm 0.5\,(-7)$ & $2.7 \pm 0.3\,(-7)$ & - & - & 0.11\\ & J=9-8 & 1036.912 GHz & $3.1 \pm 0.9\,(-7)$ & $3.3 \pm 0.3\,(-7)$ & - & - & 0.12\\ & J=10-9 & 1151.985 GHz & $3.6 \pm 1.1\,(-7)$ & $3.5 \pm 0.5\,(-7)$ & - & - & 0.14\\ & J=11-10 & 1267.014 GHz & $4.1 \pm 1.2\,(-7)$ & $4.4 \pm 0.6\,(-7)$ & - & - & 0.15\\ & J=12-11 & 1381.995 GHz & $4.2 \pm 1.3\,(-7)$ & - & - & - & 0.17\\ & J=13-12 & 1496.923 GHz & $3.9 \pm 1.2\,(-7)$ & $4.8 \pm 0.7\,(-7)$ & - & - & 0.18\\ & J=14-13 & 1611.793 GHz &- & $5.1 \pm 0.7\,(-7)$ & $4.3 \pm 0.9\,(-7)$ & - & 0.20\\ & J=15-14 & 1726.603 GHz & - & $5.1 \pm 0.7\,(-7)$ & $4.4 \pm 0.9\,(-7)$ & - &0.21\\ & J=16-15 & 1841.345 GHz & - & $3.3 \pm 0.5\,(-7)$ & $3.7 \pm 0.7\,(-7)$ & - &0.23\\ & J=17-16 & 1956.018 GHz & - &- & $2.8 \pm 0.6\,(-7)$ & - &0.28\\ & J=18-17 & 2070.616 GHz & - &- & $1.4 \pm 0.3\,(-7)$ & - &0.28\\ & J=19-18 & 2185.135 GHz & - &- & $9.1 \pm 1.8\,(-8)$ & $1.1 \pm 0.2\,(-7)^\mathrm{a}$ &0.28\\ & J=20-19 & 2299.570 GHz & - &- & $6.2 \pm 1.3\,(-8)$ & - &0.28\\ & J=21-20 & 2413.917 GHz & - &- & $2.8 \pm 0.7\,(-8)$ & - &0.28 \\ & J=23-22 & 2642.330 GHz & - &- & $1.8 \pm 0.6\,(-8)$ & - &0.28\\ $^{13}\mathrm{CO}$ & & & & & & \\ & J=5-4 & 550.926 GHz & $7.5 \pm 2.2\,(-9)$ & *$1.5 \pm 0.1\,(-8)$ & - & - & 0.07\\ & J=6-5 & 661.067 GHz & $1.9 \pm 0.6\,(-8)$ &- & - & - & 0.08\\ & J=7-6 & 771.184 GHz & $3.3 \pm 1.0\,(-8)$ & $4.0 \pm 0.4\,(-8)$ & - & - & 0.09\\ & J=8-7 & 881.273 GHz & $4.2 \pm 1.3\,(-8)$ & $4.8 \pm 0.5\,(-8)$ & - & - & 0.11\\ & J=9-8 & 991.329 GHz & $5.1 \pm 1.5\,(-8)$ & $4.9 \pm 0.5\,(-8)$ & - & - & 0.12\\ & J=10-9 & 1101.350 GHz & $4.3 \pm 1.3\,(-8)$ & $5.6 \pm 0.6\,(-8)$ & - & - & 0.13\\ & J=11-10 & 1211.330 GHz & $4.0 \pm 1.2\,(-8)$ & $4.6 \pm 0.6\,(-8)$ & - & - & 0.15\\ & J=12-11 & 1321.265 GHz & $3.1 \pm 0.9\,(-8)$ &- & - & - & 0.16\\ & J=13-12 & 1431.153 GHz & $2.0 \pm 0.6\,(-8)$ &- & - & - & 0.17\\ & J=15-14 & 1650.767 GHz &- & & $7.6 \pm 2.2\,(-9)$ & - & 0.20\\ & J=16-15 & 1760.486 GHz &- &- & $4.4 \pm 2.5\,(-9)$ & - & 0.22\\ $\mathrm{CH}^+$ & & & & & & \\ & J=1-0 & 835.137 GHz & - & $1.30 \pm 0.13\,(-8)$ & - & - & 0.10\\ & J=2-1 & 1669.281 GHz & - & $4.32 \pm 0.60\,(-8)$ & - & - & 0.28\\ & J=3-2 & 2501.440 GHz & - & - & $3.4 \pm 0.8\,(-8)$ & - & 0.28\\ & J=4-3 & 3330.630 GHz & - & - & $3.3 \pm 0.8\,(-8)$ & - & 0.28\\ & J=5-4 & 4155.872 GHz & - & - & $2.8 \pm 1.0\,(-8)$ & - & 0.28\\ & J=6-5 & 4976.201 GHz & - & - & $1.9 \pm 1.1\,(-8)$ & - & 0.28\\ $\mathrm{OH}$ & & & & & & \\ & $^2\Pi_{3/2}\,\,J=5/2^+-3/2^-$ & $119.4416\,\mu\mathrm{m}$ & - & - & $7.8 \pm 1.6\,(-8)$ & - & 0.28 \\ & $^2\Pi_{3/2}\,\,J=5/2^--3/2^+$ & $119.2345\,\mu\mathrm{m}$ & - & - & $6.6 \pm 1.4\,(-8)$ & - & 0.28 \\ & $^2\Pi_{1/2}-^2\Pi_{3/2}\,\,J=1/2^+-3/2^-$ & $ 79.1792\,\mu\mathrm{m}$ & - & - & $6.0 \pm 2.2\,(-8)$ & - & 0.28 \\ & $^2\Pi_{1/2}-^2\Pi_{3/2}\,\,J=1/2^--3/2^+$ & $ 79.1712\,\mu\mathrm{m}$ & - & - & $6.6 \pm 2.3\,(-8)$ & - & 0.28 \\ & $^2\Pi_{1/2}\,\,J=3/2^--1/2^+$ & $163.3962\,\mu\mathrm{m}$ & - & - & $1.4 \pm 0.3\,(-8)$ & - & 0.28 \\ & $^2\Pi_{1/2}\,\,J=3/2^+-1/2^-$ & $163.0153\,\mu\mathrm{m}$ & - & - & $1.3 \pm 0.3\,(-8)$ & - & 0.28 \\ & $^2\Pi_{3/2}\,\,J=7/2^--5/2^+$ & $ 84.5967\,\mu\mathrm{m}$ & - & - & $3.1 \pm 0.9\,(-8)$ & - & 0.28 \\ & $^2\Pi_{3/2}\,\,J=7/2^+-5/2^-$ & $ 84.4203\,\mu\mathrm{m}$ & - & - & $3.4 \pm 1.0\,(-8)$ & - & 0.28 \\ & $^2\Pi_{3/2}\,\,J=9/2^+-7/2^-$ & $ 65.2789\,\mu\mathrm{m}$ & - & - & $0.5 \pm 0.7\,(-8)$ & - & 0.28 \\ & $^2\Pi_{3/2}\,\,J=9/2^--7/2^+$ & $ 65.1318\,\mu\mathrm{m}$ & - & - & $1.3 \pm 0.7\,(-8)$ & - & 0.28 \\ $\mathrm{HD}$ & & & & & & \\ & J=1-0 & $112.07\,\mu\mathrm{m}$ & - & - & $0 \pm 4.0\,(-9)$ & - & 0.28 \\ & J=2-1 & $ 56.23\,\mu\mathrm{m}$ & - & - & $3.1 \pm 1.1\,(-8)$ & - & 0.28 \\ $\mathrm{C}^+$ & & & & & & \\ & $^2P_{3/2}$ - $^2P_{1/2}$ & $157.68\,\mu\mathrm{m}$ & - & $5.5\pm 0.8\,(-6)$ & - & $7.5 \pm 1.5\,(-6)^\mathrm{b}$ & 0.28 \\ $\mathrm{C}$ & & & & & & \\ & $^3P_1$ - $^3P_0$ & 492.161 GHz & - & $2.9\pm 0.3 (-9)$ & - & - & 0.10 \\ & $^3P_2$ - $^3P_1$ & 809.342 GHz & - & $2.3\pm 0.2 (-9)$ & - & - & 0.06 \\ $\mathrm{O}$ & & & & & & \\ & $^3P_0$ - $^3P_1$ & $145.53\,\mu\mathrm{m}$ & - & - & - & $6.0 \pm 1.2\,(-6)^\mathrm{b}$ & 0.28 \\ & $^3P_1$ - $^3P_2$ & $63.18\,\mu\mathrm{m}$ & - & - & $5.4\pm 1.1\,(-5)$ & $5.0 \pm 1.0\,(-5)$ & 0.28 \\ \hline $\mathrm{H}_2$& & & ISO SWS$^\mathrm{c}$ & IRTF $^\mathrm{d}$ & CFHT$^\mathrm{e}$ & & \\ & 0-0 S(0) & $28.22\,\mu\mathrm{m}$ & $0.9 \pm 0.3\,(-7)$ & - & - & & 0.10 \\ & 0-0 S(1) & $17.03\,\mu\mathrm{m}$ & $6.5 \pm 1.3\,(-7)$ & $8.5\pm0.3\,(-7)$ & - & & 0.10 \\ & 0-0 S(2) & $12.28\,\mu\mathrm{m}$ & $3.7\pm0.9\,(-7)$ & $6.8\pm0.2\,(-7)$ & - & & 0.10 \\ & 0-0 S(3) & $ 9.66\,\mu\mathrm{m}$ & $6.0\pm1.5\,(-7)$ & - & - & & 0.10 \\ & 0-0 S(4) & $ 8.02\,\mu\mathrm{m}$ & $2.8\pm0.7\,(-7)$ & $4.1\pm0.2\,(-7)$ & - & & 0.10 \\ & 0-0 S(5) & $ 6.91\,\mu\mathrm{m}$ & $6.4\pm1\,(-7)$ & - & - & & 0.10 \\ & 1-0 S(1) & $ 2.12\,\mu\mathrm{m}$ & & - & $5.8\,(-7)$ & $3.6 (-7) ^\mathrm{f}$ & 1 \\ & 2-1 S(1) & $ 2.25\,\mu\mathrm{m}$ & & - & $1.2\,(-7)$ & & 1 \\ \hline \end{tabular}\\ $^\mathrm{a}$Parikka et al. (2017). $^\mathrm{b}$Bernard Salas et al. (2012) - $^\mathrm{c}$ Bertoldi, private comm., Habart et al. (2004) - $^\mathrm{d}$Allers et al. (2005) - $^\mathrm{e}$ Joblin, Maillard, Noel, unpublished BEAR data - $^\mathrm{f}$ van der Werf et al. (1996). \end{center} \end{table*} \newpage \section{Observation results} \label{Sec:ObsData} \subsection{Combination of observational data}\label{Sect:obs_corrections} For the purpose of comparing the observations with PDR models (cf. Sect.\,\ref{Sec:Models}), we need to combine the results obtained with different instruments. This is particularly challenging because of different calibrations, beam sizes and observational techniques. In this section, we discuss the procedure we used to deal with these differences. \paragraph{Beam dilution factors} The data used in this work gather line intensities that were measured using different beam sizes. This raises the question of the morphology of the emitting structures and to which extend these structures fill the different beams. In NGC~7023, the bright NW interface is composed of a filamentary structure with a spatial characteristic width of a few arcsecs as clearly seen in vibrationally excited H$_2$ emission \citep{Lemaire96}. From these maps one can derive a relevant width of 2\arcsec\ for the bright PDR interface that is centered toward the H$_2$ peak. In Orion Bar, the sharp molecular edge has been observed in vibrational and rotational H$_2$ transitions \citep{Tielens93,VanDerWerf96,Walmsley00, Allers05}. These observations suggest a narrow (few arcsec) and patchy interface that is also seen in ALMA maps obtained at a spatial resolution between 1 and 5\,$\arcsec$ \citep{Goicoechea16,Goicoechea17}. The ALMA data show that emission lines of some ions such as HCO$^+$ 4-3 and SH$^+$ 1-0 are located in the narrow layer given by vibrationally excited H$_2$. Although the morphology is more complex than a single structure, we assume in the following that the observed emission from warm molecular tracers arises from a 2\arcsec\ filamentary interface, consistently with the case of NGC\,7023. To derive dilution factors, we therefore assumed in both PDRs that the emitting structure is a filament that follows the interface with infinite length and a 2\arcsec\ thickness. For each observation, we calculated the fractional coverage of the beam by this filament. This is a simplistic procedure but the best we can do to overcome the lack of spatial information. The values of the derived dilution factors $\Omega$ are reported in Tables~\ref{Tab:NGC7023_raw_data} and \ref{Tab:Orion_raw_data}. The observed intensities were then divided by this factor $\Omega$ in order to be compared with the models. \paragraph{Cross-calibration factors} In addition to the dilution factors we have to apply scaling factors on some of the data sets. The $^{12}\mathrm{CO}$ ladder for NGC~7023 (see the data in Fig.\,\ref{Fig:12_CO_ladder}) reveals discrepancies between the different instruments that cannot be compensated by our dilution factors. In the following, we consider that HIFI fluxes are the references and scale the intensities from SPIRE and PACS. As common lines are observed by SPIRE and HIFI, we simply searched for the scaling factor giving the least square error, and divided all line intensities observed by SPIRE (including species other than CO) by a factor of 0.54 as a result. PACS observations can not be directly compared, but the rotational diagram of $^{12}$CO reveals an unphysical jump between the PACS and SPIRE/HIFI lines. We determined the factor giving the best linear alignment of the PACS observations with the SPIRE/HIFI lines on this rotational diagram, and divided all line intensities observed by PACS by a factor of 1.3 as a result. In the case of the H$_2$ observations in NGC\,7023 it is not possible to satisfactorily merge the Spitzer and ISO data. This is due to the fact that H$_2$ emission is quite extended and the ISO beam contains emission from other regions than just the filament of interest. Spitzer values are taken as references and we divided all ISO observations by a factor of 2.54 to get the best agreement between the two data sets. In the case of the Orion Bar, we find no obvious reason for such adjustments. In particular no systematic discrepancy is visible in the CO ladder (cf. Fig.\,\ref{Fig:12_CO_ladder}). Thus, no such adjustment was applied to the observations of the Orion Bar. Finally, after correcting for beam dilution and cross-calibration factors, we combined the line intensities from the different instruments by simply taking an average of the different observations of a given line. We computed error bars on this mean value as the interval between the minimum and maximum values in the error ranges of the different instruments. The original (uncorrected) data of the different instruments are presented in Tables~\ref{Tab:NGC7023_raw_data} and \ref{Tab:Orion_raw_data} and shown on Fig.\,\ref{Fig:12_CO_ladder} for $^{12}$CO and $^{13}$CO. Tables\,\ref{Tab:NGC7023_obs_model} and \ref{Tab:Orion_obs_model} present the data after correction of dilution, cross calibration and averaging of the different instruments. These corrected and averaged data are used in all figures except Fig.\,\ref{Fig:12_CO_ladder}. \begin{figure*} \begin{center} \includegraphics[width=0.45\textwidth]{Figures/Orion_exc_diag_CO_Jup15.pdf} \includegraphics[width=0.45\textwidth]{Figures/Orion_exc_diag_13CO.pdf}\\ \includegraphics[width=0.45\textwidth]{Figures/NGC7023_exc_diag_CO_Jup15.pdf} \includegraphics[width=0.45\textwidth]{Figures/NGC7023_exc_diag_13CO.pdf} \end{center} \caption{Rotational diagram of $^{12}$CO (left) and $^{13}$CO (right) lines observed in the Orion Bar (top) and NGC\,7023 (bottom) PDRs. For $^{12}$CO, the excitation temperature and total column density are computed in the range J$_{up}$=[15, 23] (Orion Bar), and J$_{up}$=[15, 19] (NGC 7023). For $^{13}$CO, the lines used were J$_{up}$=[5, 16] (Orion Bar), and J$_{up}$=[5, 10] (NGC 7023). \label{Fig:12CO_rot_diag}} \end{figure*} \begin{figure} \begin{center} \includegraphics[width=0.4\textwidth]{Figures/line_profile_ratio_Orion.pdf} \includegraphics[width=0.4\textwidth]{Figures/line_profile_ratio_7023.pdf} \end{center} \caption{Line profile for the J=10--9 transition of $^{12}$CO (dashed line) and $^{13}$CO (dotted line) in the Orion Bar (top panel) and NGC~7023~NW (bottom panel). The relative intensity of the $^{12}$CO to $^{13}$CO lines across the velocity profiles is also shown (plain line). \label{Fig:12CO_13CO_profile}} \end{figure} \subsection{The CO rotational diagrams} \label{Sec:CO_rot} Figure\,\ref{Fig:12CO_rot_diag} presents the rotational diagrams and LTE fits of the $^{12}$CO and $^{13}$CO observations. The rotational diagrams present column density estimates in the upper rotational levels, $N_u$, without corrections for opacity effects with $N_u/g_u = \frac{4\,\pi\,I}{A_{ul}\,h\nu_{ul}\,g_u}$ where I is the observed intensity, $A_{ul}$ and $\nu_{ul}$ are the Einstein coefficient and frequency of the transition from the upper to lower levels and $g_u$ is the degeneracy of the upper level. As such, the derived column denities are lower limits when the lines are optically thick. In the case of $^{12}$CO, the fit was restricted to the highest excitation lines, starting at J$_{up}$=15, in order to obtain information on the warmest gas. In the Orion Bar, we derived an excitation temperature of $147\pm9\,\mathrm{K}$ and a column density of N($^{12}$CO)=($9.0\pm3.9)\times10^{17}\,\mathrm{cm}^{-2}$. In NGC\,7023, the excitation temperature is $112\pm6\,\mathrm{K}$ with N($^{12}$CO)=$(1.7\pm0.7)\times10^{17}\,\mathrm{cm}^{-2}$. We note that the column density of warm CO is higher (at least a factor of 4) in the Orion Bar as compared to NGC\,7023. The $^{12}$CO rotational temperature is also somewhat higher in the Orion Bar. Both facts favour the detection of higher-J CO transitions in Orion Bar relative to NGC\,7023. We can compare these results with previous studies. \cite{Koehler14} studied the CO lines measured with SPIRE in NGC~7023. Using the non-LTE radiative transfer code RADEX \citep{VanDerTak07}, they derived a kinetic temperature in the range 65-130\,K and a column density of N($^{12}$CO)=$2-3\times10^{18}\,\mathrm{cm}^{-2}$. They concluded that the emitting structure has a dilution factor of 0.1. All these results are compatible with ours if we keep in mind our strategy to gain contrast on the hottest molecular interface, including taking into account higher-J CO lines. Our derived rotational temperature of 141\,K for the Bar is also consistent with the kinetic temperature in the range 100--150\,K that was reported by \cite{Nagy17} in the analysis of the Herschel/HIFI spectral line survey of the Orion Bar that was mentioned earlier. It is also compatible with the lower limit of the kinetic temperature derived by \cite{Goicoechea16} at the dissociation front. The $^{13}$CO diagrams reveal gas at an average rotational temperature of $\sim$80\,K, which is cooler than the $^{12}$CO temperature discussed above. In addition, Figure\,\ref{Fig:12CO_13CO_profile} reports the value of the $^{12}$CO over $^{13}$CO line intensity ratio across the velocity profile of the $^{12}$CO 10-9 line. This ratio is found to be weak ($\sim 4$) near the line center, whereas it reaches the isotopic $^{12}$C/$^{13}$C ratio value of $\sim 50$ in the wings. This is characteristic of strong opacity effects. \cite{Koehler14} calculated the optical depth of the $^{12}$CO lines in NGC\,7023 using the RADEX code and concluded that the lines are optically thick up to J$_{up}\sim13 - 14$. This justifies why we selected only lines from J$_{up}$=15 and higher in our fit of the $^{12}$CO rotational diagrams (cf. Fig.\,\ref{Fig:12CO_rot_diag}). The above results strongly suggest that CO emission in the beam stems from a two-component medium: an extended cool/warm component and the hot and sharp interface. In $^{13}$CO, the former component is well seen, whereas it is partly hidden due to optical depth effects in $^{12}$CO emission. This results in $^{12}$CO emission looking like stemming mainly from the hot component. On the opposite, the hot component is difficult to observe in the high-J lines of $^{13}$CO due to the low expected signal. As an example, in the Orion Bar, an intensity ratio of 5.6 can be derived from the observed J=16-15 and J=20-19 $^{12}$CO lines (see Tab.\,\ref{Tab:Orion_raw_data}). By applying the same factor to the $^{13}$CO lines, we can predict an intensity of 8\,10$^{-10}$\,W\,m$^{-2}$\,sr$^{-1}$ for the J=20-19 $^{13}$CO line, which cannot be detected considering that it is a factor of 3 weaker relative to the error bar of the J=16-15 $^{13}$CO line. In conclusion, only high-J $^{12}$CO lines can be used to characterise the physical conditions at the warm and bright PDR interface. \section{Models} \label{Sec:Models} \subsection{The Meudon PDR model} We compared our observations to PDR models using an updated version of the Meudon PDR code \citep[][https://ism.obspm.fr]{LePetit06}. This 1D PDR code simulates the physical and chemical processes at stationary state in a plane-parallel slab of gas and dust. At each position in the cloud, the code computes the temperatures of gas and grains, the chemical densities and, for the most important species, the non-LTE level populations. Then a post-treatment gives access to column densities and line intensities. Several atomic and molecular data have been updated. In particular, it is worthwhile to notice for the present study that this version of the PDR code implements the CO-H$_2$ collision rates of \cite{Yang10} and the CO-H collision rates of \cite{Balakrishnan02}. The chemical network includes 213 species linked by 5067 gas-phase chemical reactions (except H$_2$ formation on grains). Table\,\ref{Tab:InputParam} summarizes the elemental abundances used in this paper. The formation reaction of H$_2$ on grains plays a critical role in the computation of the chemical structure of PDRs. Several prescriptions are available in the Meudon PDR code: a mean formation rate of $3\times10^{-17} \sqrt{T/100}\,\mathrm{cm}^{3} \,\mathrm{s}^{-1}$ based on Copernicus and FUSE H$_2$ observations in diffuse clouds \citep{Jura74, Gry02}, Langmuir-Hinshelwood (LH) and Eley-Rideal (ER) mechanisms treated with a rate equation formalism \citep{LeBourlot12} and a new stochastic approach that considers the impact of grain temperature fluctuations on H$_2$ formation (both LH and ER) in a master equation formalism \citep{Bron14,Bron16}. In this paper, we use the \citet{LeBourlot12} formalism\footnote{We do not use the most sophisticated treatment at our disposal, \cite{Bron14}, for computing time reasons.}. The code considers two external sources of energy, the radiation field and cosmic rays. The external radiation field can be the combination of a beamed stellar radiation field that simulates neighboring stars and an isotropic ambient radiation field. This isotropic component is composed of the \cite{Mathis83} field for the far UV to IR part, scaled by a factor, and black bodies that simulate dust IR emission and the cosmic microwave background. The Meudon PDR code allows us to use different radiation fields on each side of the cloud. We call front side of the PDR the one illuminated by the stars responsible for the PDR and back side the other one. For NGC 7023, we used a beamed stellar radiation field built from the Kurucz stellar spectra \citep{Kurucz93} as explained in \cite{Pilleri12}. This leads to a value of the UV intensity at the edge of the NW PDR of G$_0$ = 2600 in Habing units for a distance of d$\simeq$\,0.143\,pc between the star and the dissociation front. In addition, the scattered light in the surrounding region was determined to represent about 4\% of the direct stellar light using the scattered light measured at 475 nm by the Hubble Space Telescope \citep{Witt06}. We thus assume that the back side of the PDR is illuminated by an isotropic radiation field with $G_0 = 100$, making the simplifying assumption that there is no dependence of the scattering with wavelength. This back side illumination was found to contribute marginaly to the line intensities. For the Orion Bar, several estimations of the UV flux have been proposed in the literature. As discussed by \cite{Allers05}, the estimated UV flux intensity depends on several parameters such as the inclination of the Bar. Based on \cite{Tielens85} and \cite{Marconi98}, we fixed the radiation field impinging on the PDR so that, at the edge of the PDR, $G_0 = 2\times10^4$ in Habing units. We also assumed an ambient UV field illuminating the back side of the cloud with 10\% of the front side illumination. Finally, the cosmic ray flux is introduced as a cosmic-ray ionization rate $\zeta$ of H$_2$ molecules. As we lack information about this flux in NGC 7023 and Orion Bar PDRs, we use an intermediate value of $\zeta = 5 \times 10^{-17}\,\mathrm{s}^{-1}$ that lies between estimations in diffuse and dense gas \citep{Indriolo15, Padovani13, LePetit04, McCall99}. We checked that an increase of this ionization rate by a factor 10 has no impact on CO line intensities. The determination of photo-reaction rates requires to compute the specific intensity in the UV at each position in the cloud. The Meudon PDR code solves the radiative transfer equation on a wavelength grid (from the UV to the radio domain) at each position, including absorption and scattering by dust as well as absorption in lines or in the continuum for some chemical species. For instance, continuum absorption by C photo-ionization turns out to have a non-negligible impact on the PDR structure \citep{Rollins12} and is considered, as well as H line absorptions. For other species (as H$_2$ and CO) line self-shielding is computed using the \cite{Federman79} approximation. Absorption by grains is implemented using parametrized extinction curves (\citealt{Fitzpatrick86}). In PDRs, extinction curves are usually flatter in the far UV than the mean Galactic extinction curve. That is characteristic of larger than standard grain sizes. The adopted extinction curve is the one of HD~38087 in \cite{Fitzpatrick90} and $R_\textrm{V} = 5.62$ as measured in NGC~7023 by \citealt{Witt06}, close to the value determined for Orion Bar, 5.5 \citep{Marconi98}. We also assume a column density to reddening ratio $N_\textrm{H}/\textrm{E(B-V)} = 1.05\times10^{22}\,\mathrm{cm}^{-2} \, \mathrm{mag}^{-1}$, an intermediate value between the standard value $5.8\times10^{21}$ and the value determined for $\rho$ Oph, $15.4\times10^{21}\,\mathrm{cm}^{-2} \, \mathrm{mag}^{-1}$ \citep{Bohlin78}. Grains are simulated as a mixture of spherical amorphous carbonaceous and silicate grains following a MRN size distribution \citep{Mathis77}, with minimum and maximum radii $3\times10^{-7}$ and $3\times10^{-5}$ cm, and with a dust-to-gas mass ratio of 0.01. The dust scattering properties are from \cite{Laor93}. At each position, the code computes the equilibrium gas temperature from the balance of total heating and cooling rates. The heating mechanisms considered are the photo-electric effect on grains, cosmic rays heating, and exothermic chemical reactions. Gas-grain collisions and H$_2$ vibrational de-excitation can heat or cool the gas depending on the local physical conditions. For the photo-electric effect, we use the \cite{Bakes94} prescription. Cooling rates are obtained by computing the radiative emission of the main coolants (15 species included), among which C$^+$, O, C, CO and its isotopologues. For these species, non-LTE level populations are computed taking into account collisional excitations and de-excitations, spontaneous emission, non-local radiative pumping by line and continuum photons, and chemical formation and destruction in specific levels as described in \cite{Gonzalez08}. Finally, several prescriptions can be used to define the gas density profile as a function of depth. In this work, we tried two prescriptions: constant density models and constant pressure models. Parameters used in the models of NGC 7023 and Orion Bar are summarized in Tab. \ref{Tab:InputParam}. The modeling strategy for the two objects is described in the following sections. \begin{table}[h!] \center \caption{Input parameters used in the Meudon PDR code.} \label{Tab:InputParam} \begin{tabular}{llll} \hline \hline Parameter & Value & Unit & Note \\ \hline \multicolumn{4}{c}{free parameters}\\ \hline $P_{\mathrm{th}}$ NGC 7023 & $10^8$ & $\mathrm{K~cm}^{-3}$ & best fit \\ $P_{\mathrm{th}}$ Orion Bar & $2.8\times10^8$ & $\mathrm{K~cm}^{-3}$ & best fit \\ \hline \multicolumn{4}{c}{fixed parameters}\\ \hline $G_0$ NGC 7023 & \emph{2600} & Habing & (1) \\ $G_0$ Orion Bar & $2\times 10^4$ & Habing & (2),(3) \\ $A_\textrm{V}^{tot}$ & 10 & mag & \\ Flux of cosmic-rays & $5\times10^{-17}$ & $\mathrm{s}^{-1}$ per H$_2$ & \\ Dust extinction & HD 38087 & & (4) \\ R$_\textrm{V}$ & 5.62 & & (5) \\ N$_\textrm{H}$ / E(B-V) & $1.05\times 10^{22}$ & $\mathrm{cm}^{-2}\,\,\mathrm{mag}^{-1}$ & see text \\ Mass grain / Mass gas & $0.01$ & & \\ Grain size distribution & $\propto a^{-3.5}$ & & (6) \\ min radius of grains & $3\times 10^{-7}$ & cm & \\ max radius of grains & $3\times 10^{-5}$ & cm & \\ \hline \multicolumn{4}{c}{elementary abundances}\\ \hline He & 0.1 & & \\ C & $1.32\times 10^{-4}$ & &(7) \\ O & $3.19\times 10^{-4}$ & &(8) \\ S & $1.86\times 10^{-5}$ & &(7) \\ N & $7.50\times 10^{-5}$ & &(9) \\ D/H & $1.5\times 10^{-5}$ & &(10) \\ $^{12}$C/$^{13}$C & $50$ & &(11) \\ \hline \end{tabular} \tablebib{(1) For the NGC~7023 PDR model, we adopt a beamed stellar radiation field as described in the text. If converted in a Habing scaling factor, this corresponds to $G_0$ = 2600, (2) \cite{Tielens85}, (3) \cite{Marconi98}, (4) \cite{Cardelli89}, (5) \cite{Witt06}, (6) \cite{Mathis77}, (7) \cite{Savage96}, (8) \cite{Meyer98}, (9) \cite{Meyer97}, (10) \cite{Oliveira06}, (11) Intermediate value from observations in Orion \citep{Demyk07, Ossenkopf13, Haykal14}.} \end{table} \subsection{Fitting strategy} Since we focus our analysis on the physical conditions at the PDR edge, we investigate the models that best account for the emission of tracers specific to this region, such as high-J $^{12}$CO and H$_2$ lines. We investigated different scenarios. First, we ran PDR models at constant density but they proved to be incompatible with the observations. In particular, they were unable to reach the observed excitation temperature of high-J CO levels. We found that a density change across the PDR was necessary, with the density increasing with PDR depth. As earlier suggested by \cite{Marconi98}, constant pressure models were found to provide a satisfying density gradient due to the temperature drop when going towards the inside of the cloud. Both PDRs appear as bright narrow interfaces ($\sim$ 2\arcsec) in vibrational H$_2$ emission (cf. Fig.\,\ref{Fig:Images_OrionBar_N7023}), which could be the result of an overdense surface layer seen roughly edge-on. We thus adopt for our models a geometry in which the PDR is observed with a high viewing angle of $60^{\circ}$; this angle being defined with $0^{\circ}$ being face-on and $90^{\circ}$ edge-on. The value of $60^{\circ}$ gives an approximation of a nearly edge-on PDR and is the maximum inclination that can be used to derive line intensities in the 1D PDR Meudon code. The uncertainty on this angle could lead to an additional scaling factor on all line intensities. We thus allowed for a free global scaling factor $f$ on the model intensities when fitting the model. A value of this factor larger than 1 would indicate a more edge-on configuration. In addition, this factor can correct for systematic errors we made on the assumed geometry, in particular viewing angle and the dilution factors. We searched for the best fitting model in a grid of isobaric models for varying values of the thermal pressure $P_{\mathrm{th}}$ and global scaling factor $f$. In both cases, we used the observed high-J $^{12}$CO lines from J$_{up}$=11, the rotational H$_2$ lines (S(0) to S(5)) and CH$^+$ (1-0 to 6-5 in Orion Bar and 1-0 to 3-2 in NGC 7023) rotational lines. We thus have 17 (NGC 7023) or 23 (Orion Bar) observational constraints that the best model must simultaneously reproduce with two free-parameters, $P_{\mathrm{th}}$ and $f$. As these tracers only constrain the warm molecular layer of the PDR, we fixed a total $A_\textrm{V}$ value of 10 ($N_\textrm{H}\sim 2\times10^{22}$\,cm$^{-2}$ for a face-on geometry and a factor 2 higher assuming $60^{\circ}$ inclination) in our models. We then compare the results of the best model with other available observations, i.e. lines from $^{13}$CO, C$^+$, O, C, vibrational H$_2$, HD, and in addition HCO$^+$ in NGC 7023 and OH in the Orion Bar. To provide an idea on how much the observations constrain the thermal pressure, we also report in the following the results obtained by using a pressure that differs by a factor 1.5 (lower and higher) from the pressure obtained in the best fit model. For these cases, the scaling factor was adjusted to provide the best fit. \subsection{Model results} \label{Sec:model_results} \begin{table} \caption{Comparison of models and observations (combined) for NGC 7023. Values in parentheses are powers of ten. \label{Tab:NGC7023_obs_model}} \scriptsize \begin{tabular}{l l| l |l} \hline \hline \multicolumn{2}{c}{Line} & Observed intensity & Model prediction \\ \multicolumn{2}{c}{} & $(\mathrm{W}\mathrm{m}^{-2}\mathrm{sr}^{-1})$ & $(\mathrm{W}\mathrm{m}^{-2}\mathrm{sr}^{-1})$\\ & & & \\ \hline $^{12}\mathrm{CO}$ & & & \\ & J=4-3 & $2.8 \pm 0.9\,(-8)$ & $4.6(-8)$ \\ & J=5-4 & $5.3 \pm 1.6\,(-8)$ & $9.1(-8)$ \\ & J=6-5 & $1.1_{-0.2}^{+0.5}\,(-7)$ & $1.5(-7)$ \\ & J=7-6 & $2.0 \pm 0.6\,(-7)$ & $2.3(-7)$ \\ & J=8-7 & $2.0_{-0.8}^{+0.5}\,(-7)$ & $3.1(-7)$ \\ & J=9-8 & $3.1_{-1.0}^{+0.7}\,(-7)$ & $3.9(-7)$ \\ & J=10-9 & $2.5 \pm 0.8\,(-7)$ & $4.3(-7)$ \\ & J=11-10 & $3.5 \pm 1.0\,(-7)$ & $4.2(-7)$ \\ & J=12-11 & $2.7 \pm 0.8\,(-7)$ & $3.6(-7)$ \\ & J=13-12 & $2.4_{-0.5}^{+0.9}\,(-7)$ & $2.7(-7)$ \\ & J=15-14 & $1.2 \pm 0.2\,(-7)$ & $1.9(-7)$ \\ & J=16-15 & $6.5 \pm 1.3\,(-8)$ & $7.0(-8)$ \\ & J=17-16 & $3.3 \pm 0.8\,(-8)$ & $4.1(-8)$ \\ & J=18-17 & $2.0 \pm 0.5\,(-8)$ & $2.3(-8)$ \\ & J=19-18 & $1.2 \pm 0.7\,(-8)$ & $1.4(-8)$ \\ $^{13}\mathrm{CO}$ & & & \\ & J=5-4 & $2.6_{-0.7}^{+1.0}\,(-8)$ & $1.1(-8)$ \\ & J=6-5 & $2.5 \pm 0.8\,(-8)$ & $1.5(-8)$ \\ & J=7-6 & $3.7 \pm 1.0\,(-8)$ & $1.7(-8)$ \\ & J=8-7 & $3.8_{-1.1}^{+1.3}\,(-8)$ & $1.7(-8)$ \\ & J=9-8 & $5.8 \pm 1.7\,(-8)$ & $1.6(-8)$ \\ & J=10-9 & $4.0_{-1.0}^{+1.7}\,(-8)$ & $1.3(-8)$ \\ $\mathrm{CH}^+$ & & & \\ & J=1-0 & $1.0 \pm 0.1\,(-8)$ & $4.2(-9)$ \\ & J=2-1 & $1.9_{-0.8}^{+0.6}\,(-8)$ & $1.4(-8)$ \\ & J=3-2 & $1.5 \pm 0.6\,(-8)$ & $1.5(-8)$ \\ $\mathrm{HCO}^+$ & & & \\ & J=1-0 & $9.2 \pm 2.7\,(-12)$ & $4.1(-12)$ \\ & J=6-5 & $1.4 \pm 0.1\,(-9)$ & $3.1(-10)$ \\ $\mathrm{C}^+$ & & & \\ & $157.68\,\mu\mathrm{m}$ & $2.7_{-1.2}^{+1.5}\,(-6)$ & $6.7(-7)$ \\ $\mathrm{C}$ & & & \\ & $609.13\,\mu\mathrm{m}$ & $5.1 \pm 1.5\,(-9)$ & $5.1(-9)$ \\ $\mathrm{O}$ & & \\ & $145.53\,\mu\mathrm{m}$ & $1.2_{-0.3}^{+0.4}\,(-6)$ & $1.6(-6)$ \\ & $63.18\,\mu\mathrm{m}$ & $6.4 \pm 1.4\,(-6)$ & $4.3(-5)$ \\ $\mathrm{HD}$ & & \\ & $112.07\,\mu\mathrm{m}$ & $7.5\pm 6.1\,(-9)$ & $4.1(-9)$ \\ \hlin $\mathrm{H}_2$ & & & \\ & 0-0 S(0) & $1.3 \pm 0.4\,(-7)$ & $1.1(-7)$ \\ & 0-0 S(1) & $9.1_{-2.4}^{+3.8}\,(-7)$ & $9.7(-7)$ \\ & 0-0 S(2) & $9.7_{-3.3}^{+3.9}\,(-7)$ & $1.3(-6)$ \\ & 0-0 S(3) & $1.4_{-0.7}^{+0.6}\,(-6)$ & $3.2(-6)$ \\ & 0-0 S(4) & $5.9 \pm 1.6\,(-7)$ & $7.4(-7)$ \\ & 0-0 S(5) & $9.2_{-3.4}^{+2.4}\,(-7)$ & $9.3(-7)$ \\ & 1-0 S(1) & $2.1\pm0.2\,(-7)$ & $1.4(-7)$ \\ & 1-0 S(2) & $7.6\pm1.7\,(-8)$ & $4.7(-8)$ \\ & 2-1 S(1) / 1-0 S(1) & 0.29 & $0.14$ \\ \hline \end{tabular}\\ \end{table} \begin{table} \caption{Comparison of models and observations (combined) for the Orion Bar. Values in parentheses are powers of ten. \label{Tab:Orion_obs_model}} \scriptsize \begin{tabular}{l l| l| l l l } \hline \hline \multicolumn{2}{c}{Line} & Observed intensity & Model prediction\\ \multicolumn{2}{c}{} & $(\mathrm{W}\mathrm{m}^{-2}\mathrm{sr}^{-1})$ & $(\mathrm{W}\mathrm{m}^{-2}\mathrm{sr}^{-1})$\\ \hline $^{12}\mathrm{CO}$ & & & \\ & J=4-3 & $3.0 \pm 1.0\,(-7)$ & $9.4(-8)$ \\ & J=5-4 & $7.6_{-3.9}^{+3.2}\,(-7)$ & $1.9(-7)$ \\ & J=6-5 & $1.2_{-0.6}^{+0.4}\,(-6)$ & $3.4(-7)$ \\ & J=7-6 & $1.6_{-0.7}^{+0.4}\,(-6)$ & $5.2(-7)$ \\ & J=8-7 & $2.0_{-0.9}^{+0.7}\,(-6)$ & $7.4(-7)$ \\ & J=9-8 & $2.7_{-0.8}^{+0.7}\,(-6)$ & $9.8(-7)$ \\ & J=10-9 & $2.5 \pm 0.8\,(-6)$ & $1.2(-6)$ \\ & J=11-10 & $2.8_{-0.9}^{+0.7}\,(-6)$ & $1.4(-6)$ \\ & J=12-11 & $2.5 \pm 0.8\,(-6)$ & $1.5(-6)$ \\ & J=13-12 & $2.4_{-0.9}^{+0.6}\,(-6)$ & $1.4(-6)$ \\ & J=14-13 & $2.3_{-0.7}^{+0.6}\,(-6)$ & $1.3(-6)$ \\ & J=15-14 & $2.3_{-0.6}^{+0.5}\,(-6)$ & $1.1(-6)$ \\ & J=16-15 & $1.5_{-0.3}^{+0.4}\,(-6)$ & $8.4(-7)$ \\ & J=17-16 & $1.0 \pm 0.2\,(-6)$ & $6.4(-7)$ \\ & J=18-17 & $5.0 \pm 1.1\,(-7)$ & $4.6(-7)$ \\ & J=19-18 & $3.2 \pm 0.6\,(-7)$ & $3.3(-7)$ \\ & J=20-19 & $2.2 \pm 0.5\,(-7)$ & $2.3(-7)$ \\ & J=21-20 & $1.0 \pm 0.3\,(-7)$ & $1.6(-7)$ \\ & J=23-22 & $6.4 \pm 2.1\,(-8)$ & $7.6(-8)$ \\ $^{13}\mathrm{CO}$ & & & \\ & J=5-4 & $1.6_{-0.9}^{+0.7}\,(-7)$ & $2.2(-8)$ \\ & J=6-5 & $2.4 \pm 0.8\,(-7)$ & $3.5(-8)$ \\ & J=7-6 & $4.1_{-1.5}^{+0.8}\,(-7)$ & $4.5(-8)$ \\ & J=8-7 & $4.1_{-1.5}^{+0.9}\,(-7)$ & $5.2(-8)$ \\ & J=9-8 & $4.2_{-1.2}^{+1.3}\,(-7)$ & $5.3(-8)$ \\ & J=10-9 & $3.8_{-1.5}^{+1.0}\,(-7)$ & $5.0(-8)$ \\ & J=11-10 & $2.9_{-1.0}^{+0.6}\,(-7)$ & $4.5(-8)$ \\ & J=12-11 & $1.9 \pm 0.6\,(-7)$ & $3.8(-8)$ \\ & J=13-12 & $1.2 \pm 0.4\,(-7)$ & $3.2(-8)$ \\ & J=15-14 & $3.8 \pm 1.1\,(-8)$ & $2.0(-8)$ \\ & J=16-15 & $2.0 \pm 1.1\,(-8)$ & $1.5(-8)$ \\ $\mathrm{CH}^+$ & & & \\ & J=1-0 & $1.3 \pm 0.1\,(-7)$ & $6.2(-8)$ \\ & J=2-1 & $1.5 \pm 0.2\,(-7)$ & $2.8(-7)$ \\ & J=3-2 & $1.2 \pm 0.3\,(-7)$ & $2.3(-7)$ \\ & J=4-3 & $1.2 \pm 0.3\,(-7)$ & $1.8(-7)$ \\ & J=5-4 & $1.0 \pm 0.4\,(-7)$ & $1.7(-7)$ \\ & J=6-5 & $6.8 \pm 3.9\,(-8)$ & $1.5(-7)$ \\ $\mathrm{OH}$ & & & \\ & $119.4416\,\mu\mathrm{m}$ & $2.8 \pm 0.6\,(-7)$ & $6.3(-7)$ \\ & $119.2345\,\mu\mathrm{m}$ & $2.4 \pm 0.5\,(-7)$ & $5.5(-7)$ \\ & $79.1792\,\mu\mathrm{m}$ & $2.1 \pm 0.8\,(-7)$ & $3.8(-7)$ \\ & $79.171156\,\mu\mathrm{m}$ & $2.4 \pm 0.8\,(-8)$ & $4.2(-7)$ \\ & $163.3962\,\mu\mathrm{m}$ & $5.0 \pm 1.1\,(-8)$ & $1.6(-7)$ \\ & $163.0153\,\mu\mathrm{m}$ & $4.6 \pm 1.1\,(-8)$ & $1.9(-7)$ \\ & $84.5967\,\mu\mathrm{m}$ & $1.1 \pm 0.3\,(-7)$ & $3.5(-7)$ \\ & $84.4203\,\mu\mathrm{m}$ & $1.2 \pm 0.4\,(-7)$ & $2.3(-7)$ \\ & $65.2789\,\mu\mathrm{m}$ & $1.8 \pm 2.5\,(-8)$ & $1.1(-7)$ \\ & $65.1318\,\mu\mathrm{m}$ & $4.6 \pm 2.5\,(-8)$ & $2.1(-8)$ \\ $\mathrm{HD}$ & & & \\ & $112.07\,\mu\mathrm{m}$ & $ < 1.4\,(-8)$ & $1.0(-8)$ \\ & $56.23\,\mu\mathrm{m}$ & $1.1 \pm 0.4\,(-7)$ & $4.0(-8)$ \\ $\mathrm{C}^+$ & & & \\ & 157.68$\,\mu$m & $2.3_{-0.6}^{+0.9}\,(-5)$ & $1.4(-6)$ \\ $\mathrm{C}$ & & & \\ & $609.13\,\mu\mathrm{m}$ & $2.9\pm 0.3 (-8)$ & $1.3(-8)$ \\ & $370.41\,\mu\mathrm{m}$ & $3.8\pm 0.3 (-8)$ & $8.8(-8)$ \\ $\mathrm{O}$ & & & \\ & $145.53\,\mu\mathrm{m}$ & $2.1 \pm 0.4\,(-5)$ & $5.7(-6)$ \\ & $63.18\,\mu\mathrm{m}$ & $1.9_{-0.4}^{+0.5}\,(-4)$ & $1.4(-4)$ \\ \hline $\mathrm{H}_2$ & & & \\ & 0-0 S(0) & $9.0 \pm 3.0\,(-7)$ & $2.1(-7)$ \\ & 0-0 S(1) & $3.7_{-2.9}^{+4.1}\,(-6)$ & $2.0(-6)$ \\ & 0-0 S(2) & $2.2_{-1.5}^{+2.4}\,(-6)$ & $2.8(-6)$ \\ & 0-0 S(3) & $6.0\pm1.5\,(-6)$ & $1.1(-5)$ \\ & 0-0 S(4) & $1.6_{-1.2}^{+1.9}\,(-6)$ & $3.7(-6)$ \\ & 0-0 S(5) & $6.4\pm 1.0\,(-6)$ & $8.2(-6)$ \\ & 1-0 S(1) & $4.7\pm 1.1\,(-7)$ & $2.8(-6)$ \\ & 2-1 S(1) & $1.2 \, (-7)$ & $5.6(-8)$ \\ \hline \end{tabular}\\ \end{table} \begin{figure*} [ht] \begin{center} \includegraphics[width=0.45\textwidth]{Figures/NGC7023_compa_CO.pdf} \includegraphics[width=0.45\textwidth]{Figures/NGC7023_compa_13CO.pdf}\\ \includegraphics[width=0.45\textwidth]{Figures/NGC7023_compa_H2.pdf} \includegraphics[width=0.45\textwidth]{Figures/NGC7023_compa_HCOplus.pdf}\\ \includegraphics[width=0.45\textwidth]{Figures/NGC7023_compa_CHplus.pdf} \includegraphics[width=0.45\textwidth]{Figures/NGC7023_compa_other.pdf} \end{center} \caption{Excitation diagram of the different tracers observed in NGC~7023 after dilution correction (red squares) and the best fit model (black, $P_{\mathrm{th}}=10^8$ K cm$^{-3}$, $A_\textrm{V}^{\mathrm{tot}}=10$, global scaling factor = 0.7). The best model has been chosen to optimise the fitting of the $^{12}$CO (high-J lines), H$_2$ and CH$^+$ lines only. In the last panel, the intensity values are normalized by the mean observed value for each line. The grey lines show the obtained variability when the thermal pressure is divided (dashed lines) or multiplied (plain lines) by a factor of 1.5. The best value for the scaling factor was found to be 1.2 for the model at $P_{\mathrm{th}}$/1.5 and 0.47 for the model at $P_{\mathrm{th}}$$\times$1.5. \label{Fig:N7023_Best_model_12CO}} \end{figure*} \begin{figure*} \begin{center} \includegraphics[width=0.45\textwidth]{Figures/Orion_compa_CO.pdf} \includegraphics[width=0.45\textwidth]{Figures/Orion_compa_13CO.pdf}\\ \includegraphics[width=0.45\textwidth]{Figures/Orion_compa_H2.pdf} \includegraphics[width=0.45\textwidth]{Figures/Orion_compa_OH.pdf}\\ \includegraphics[width=0.45\textwidth]{Figures/Orion_compa_CHplus.pdf} \includegraphics[width=0.45\textwidth]{Figures/Orion_compa_other.pdf} \end{center} \caption{Excitation diagram of the different tracers observed in the Orion Bar (red squares) and the best model (black, $P_{\mathrm{th}}=2.8\times10^8$ K cm$^{-3}$, $A_\textrm{V}^{tot} = 10$ and global scaling factor $f = 1.3$). The best model has been chosen to optimise the fitting of the $^{12}$CO (high-J lines), rotational H$_2$ and CH$^+$ lines only. In the last panel, the intensity values are normalized by the mean observed value for each line. The grey lines show the obtained variability when the thermal pressure is divided (dashed lines) or multiplied (plain lines) by a factor of 1.5. The best value for the scaling factor was found to be 2.0 for the model at $P_{\mathrm{th}}$/1.5 and 0.9 for the model at $P_{\mathrm{th}}$$\times$1.5. \label{Fig:OrionBar_Best_model_12CO}} \end{figure*} \begin{figure*} [ht] \sidecaption \includegraphics[width=12cm]{Figures/profile_NGC7023_modele1.pdf} \caption{NGC 7023 PDR model ($P_{\mathrm{th}}=10^8$ K cm$^{-3}$, global scaling factor = 0.7). Top: Evolution of the H nuclei number density and gas temperature with A$_\textrm{V}$ or distance (in 10$^{-3}$ pc). Center: Spatial profile of the local emissivities of the main tracers. The emissivities have been scaled so that their maximum in the cloud is 1. Bottom: Spatial profiles of the abundances of the species of interest in the model.\label{Fig:N7023_Best_model_locem} } \end{figure*} \begin{figure*}[ht!] \sidecaption \includegraphics[width=12cm]{Figures/profile_Orion_model2.pdf} \caption{Orion Bar PDR model ($P_{\mathrm{th}}=2.8\times10^8$ K cm$^{-3}$, global scaling factor = 1.3). Top: Evolution of the H nuclei number density and gas temperature with A$_\textrm{V}$ or distance (in 10$^{-3}$ pc). Middle: Spatial profile of the local emissivities of the main tracers. The emissivities have been scaled so that their maximum in the cloud is 1. Bottom: Spatial profiles of the abundances of the species of interest in the model. \label{Fig:OrionBar_Best_model_locem} } \end{figure*} \subsubsection{NGC 7023} \label{Sec:model_results_N7023} The best fit was found for a model with $P_{\mathrm{th}}=10^8$ K cm$^{-3}$ and with a global scaling factor of $f=0.7$. Comparison of line intensities computed by this model to observed values is presented in Fig. \ref{Fig:N7023_Best_model_12CO}. This model shows excellent agreement with the high-J $^{12}$CO lines (above J$_{up} = 10$), with the H$_2$ pure rotational lines (except the S(3) line), and with the CH$^+$ lines (except the (1-0) line). We also note that the model is able to fit both the ortho- and para-H$_2$ lines and therefore can account for the observed non-equilibrium ortho-to-para ratio \citep[][see Sect.\,\ref{subsec:excitation} for further discussion]{Fuente99}. The discrepancy obtained for the H$_2$ S(3) line (a factor of two brighter in the model than in the observations) likely indicates that the actual dust extinction in the line of sight towards NGC\,7023 has a stronger silicate feature than assumed in our model (cf. Tab.\,\ref{Tab:InputParam}). Further evidence of the adequacy of the model is given by its success in reproducing additional lines that were not used in the adjustment of the model (see also Fig. \ref{Fig:N7023_Best_model_12CO}). The $^{12}$CO lines below J$_{up} = 11$ show an excellent agreement and the H$_2$ vibrational lines (1-0) S(1) and (1-0) S(2) are reproduced within a factor $< 2$. For HCO$^+$, the model reproduces the J=1-0 line within a factor of 2, but underestimates the J=6-5 line by a factor $\sim 4$. This line is very sensitive to the density due to the high dipole moment of HCO$^+$. For instance for a gas kinetic temperature of T=50\,K a change of a factor of 2 in the density n(H$_2$) leads to an increase of the J=6-5 line by a factor 2 while the J=1-0 remains practically unchanged. This deviation suggests that the density provided by the isobaric model is good within a factor of a few. The [OI] $145\,\mu\mathrm{m}$, [CI] $609\,\mu\mathrm{m}$ and HD J=1-0 lines are well reproduced. Other lines on this same figure exhibit stronger differences of at most a factor of $\sim6$: the [CII] $158\,\mu\mathrm{m}$ line is underestimated and the [OI] $63\,\mu \mathrm{m}$ line is overestimated. Herschel observations have shown that the [CII] emission comes not only from the H$_2$ filaments but also from the surrounding more diffuse gas strongly emitting in the PAH features \citep{Joblin10}. The adopted beam dilution factor is in this case not justified and this correction could account for most of the discrepancy between the observed and calculated fluxes. The [OI] 63\,$\mu$m line is overestimated in the model but this line is known to be optically thick and affected by self-absorption in most cases. Its study therefore requires a detailed analysis in velocity components. Finally, the model underestimates the $^{13}$CO lines by a factor of $\sim 3$. This is consistent with the arguments raised in Sec.\,\ref{Sec:CO_rot}, in particular that the $^{13}$CO emission arises from other regions inside the beam than the bright sharp interface. Overall, we can conclude that the model is able to reproduce 17 observational constraints with only two free parameters, which is indicative of the adequacy of the model and of the physics it contains to describe the warm molecular edge region of the PDR. The grey lines in Fig.\,\ref{Fig:N7023_Best_model_12CO} demonstrate that the gas thermal pressure is best constrained by the high-J $^{12}$CO lines. \subsubsection{Orion Bar} \label{Sec:model_results_OBar} The best fit was found for $P_{\mathrm{th}}=2.8\times 10^8$ K cm$^{-3}$, and a global scaling factor of $f=1.3$. The results of this model compared to the observations are presented in Table \ref{Tab:Orion_obs_model} and Fig.~\ref{Fig:OrionBar_Best_model_12CO}. The model provides a satisfactory fit of the high-J $^{12}$CO lines, CH$^+$ lines, pure rotational lines of H$_2$ (with maximal differences by a factor of 2 except for the H$_2$ S(0) line that is underestimated by a factor of $\sim 4$). We thus obtained a reasonable agreement, within a factor of a few, for all the tracers used in the fitting procedure. Most of the other tracers (not used in the fitting procedure) show similar differences. The low lying $^{12}$CO lines (J$_{up} < 11$) are underestimated by up to a factor of $\sim 3$. The OH, HD, [OI] and [CI] lines are reproduced within a factor of 3-4. Some tracers show however stronger discrepancies such as the $^{13}$CO lines, which are underestimated by up to a factor of $\sim8$ except for the highest line, and the [CII] $158\,\mu$m line that is underestimated by a factor of 16. For these lines at least part of the discrepancy is related to the correction by the beam dilution factor. We have discussed previously that some of the emission from $^{13}$CO is expected to arise from the surrounding molecular cloud (cf. Sec.\,\ref{Sec:CO_rot}). Emission in the [CII] line is also known to be extended in this region \citep[see][]{Goicoechea15b}. In the case of the vibrational H$_2$ lines, the (1-0) S(1) line is strongly overestimated (factor of $\sim 6-7$) while the (2-1) S(1) line is underestimated by a factor of $\sim$2 only. To summarize, the agreement of the model with observations is not as good for Orion Bar as for NGC\,7023 and leaves some areas of concern. On average, from the spatial structure that is reported in the next section we can derive that the emission lines coming from the most external layers are overpredicted by the model (CH$^+$, H$_2$ lines except low H$_2$ rotational lines), whereas those arising from more internal layers (low- and mid-J CO lines, low H$_2$ rotational lines) are underpredicted. This suggests that a single pressure is not sufficient to describe the evolution of gas density and temperature across the hot/warm irradiated interface (see also the grey curves in Fig.~\ref{Fig:OrionBar_Best_model_12CO}). \subsubsection{Spatial structure} \label{Sec:SpatialStructure} In Figs.\,\ref{Fig:N7023_Best_model_locem} and \ref{Fig:OrionBar_Best_model_locem}, we show the spatial structure of the calculated PDRs in terms of the gas temperature and H nuclei number density (upper pannels), of the abundances of the different species (lower panels), and of the emission regions of the different lines (middle panels). Our calculations were performed on a slab of gas of A$_\textrm{V}$=10. However, we provide here information for the region up to A$_\textrm{V}\sim$5 in which the tracers we selected emit. Although the thickness and absolute position of the transitions depend on the characteristics of each PDR, the general trends can be summarized as follows: the atomic part has a density of a few $10^4$\,$\mathrm{cm}^{-3}$ (close to $10^5$\,$\mathrm{cm}^{-3}$ in Orion Bar) followed by a hot/warm ($T=1000-100\,\mathrm{K}$) and relatively dense (few $10^5$ to few $10^6\,\mathrm{cm}^{-3}$) molecular part. In the Orion Bar model, the atomic region is found to be significantly more extended ($\sim 6\times10^{-3}$\,pc) than in NGC~7023 ($\sim 0.5\times10^{-3}$\,pc). It has been truncated on Fig.\,\ref{Fig:OrionBar_Best_model_locem} for better readability. In both PDRs, the hot/warm molecular region is found to start significantly before the H/H$_2$ transition. Indeed a sharp increase of the H$_2$ abundance is seen at $0.6\times10^{-3}$ pc whereas the H/H$_2$ transition occurs around $1.5\times 10^{-3}$ pc, in NGC\,7023. For the Orion Bar, these values are $5.7\times10^{-3}$ pc and $6.5\times10^{-3}$ pc, respectively. Note that this increase in H$_2$ abundance impacts the penetration of UV photons, which leads to a significant decrease of the heating rate and therefore of the temperature in the PDR. The size of the hot/warm molecular region is $\sim 1.5\times10^{-3}$ pc in Orion Bar, which is a factor of 2 lower than in NGC~7023. Taking into account the distances to the studied objects this would correspond to a thickness of $\sim 2"$ for NGC\,7023 and $\sim 0.8"$ for the Orion Bar, which agrees well with the observations of the filaments in NGC\,7023 and the dilution procedure we adopted to correct the observed intensities. Emission in the excited CO lines peaks at the back end of the warm molecular region, close to the C$^+$/C/CO transition, with higher-J lines peaking closer to the surface. The emission profiles of the highest lines (e. g. $J=$19-18 or 21-20) exhibit a wide left tail extending towards the H/H$_2$ transition and accounting for roughly half of the total emission. This fraction of the emission comes from a low fraction (fractional abundance $\sim 10^{-6}$) of CO existing before the C$^+$/C/CO transition. In this region, we find CO formation to be initiated by CH$^+$ formation as explained in Sec.\,\ref{subsec:excitation}. Emission in the H$_2$ rotational lines spans the whole warm molecular region, with S(5) peaking close to the H/H$_2$ transition and S(0) peaking closer to the high-J CO emission peaks. Vibrational H$_2$ emission (e.g (1-0) S(1) line) peaks at the very edge of the hot/warm molecular region, where the H$_2$ abundance starts to increase steeply due to self-shielding processes. CH$^{+}$ emission coincides with the higher H$_2$ rotational lines (such as S(5)) and the vibrational line (1-0) S(1). Finally, the fine structure lines [CII] (158 $\mu$m) and [OI] (63 and 145\,$\mu$m) arise in the whole hot/warm molecular region. The [CII] 158\,$\mu$m and [OI] 63\,$\mu$m lines also show significant emission in the atomic region in our model. \section{Discussion} \label{Sec:Discussion} \begin{figure*} [ht] \begin{center} \includegraphics[width=1\textwidth]{Figures/Pressure_effect.pdf} \end{center} \caption{Variation of the intensity of different lines of interest with the gas thermal pressure for the illumination conditions of NGC~7023~NW, as computed by the PDR model. \label{Fig:Pressure_effect}} \end{figure*} \subsection{Formation and excitation of CO at the PDR bright edges} \label{subsec:excitation} The main objective of this paper is to analyse the emission in high-J CO lines in PDRs. This emission, as observed in the two template PDRs, NGC\,7023 and Orion Bar, points either to an enhanced formation of CO in the PDR warm external layers or to an increased temperature in the layers containing CO. As will be discussed in more details below, this question is intimately related to another important question, which is the formation rate of H$_2$ in PDRs. Several authors have earlier studied H$_2$ rotational emission in PDRs and found that a significant fraction of H$_2$ has an excitation temperature in the range 400-700 K, much higher than expected from models \citep{Parmar91, Draine99, Allers05, Habart11}. The authors suggested that this is due either to an increase of the photoelectric heating efficiency or a larger H$_2$ formation rate on grains at high temperatures or to dynamical effects such as advection. The effect of an advancing photodissociation front was also invoked in NGC~7023\,NW to account for the non-equilibrium values of the ortho-to-para ratio \citep{Lemaire99, Fuente99,Fleming10, Le17}. Since our models of NGC\,7023 and Orion Bar are successful to account for both CO high-J and H$_2$ line intensities (as well as the ortho-to-para ratio), it is worth to investigate the underlying reason for that. In our models, we use the prescription of \cite{LeBourlot12} that considers the formation on grains via the Langmuir-Hinshelwood (LH) and the Eley Rideal (ER) mechanisms. The resulting formation rate at the edge of the NGC\,7023 and Orion Bar models are found to be 3-4 times higher than the rate determined for the diffuse gas of $\sim 3\times10^{-17}$ cm$^3$ s$^{-1}$ \citep{Jura74, Gry02}. The ER mechanism is found to dominate at the edge of the PDR \citep{Rollig13} because the grains are warm. We note that \cite{Bron14} have shown that the LH mechanism can also be efficient because of the temperature fluctuations of small grains due to photon absorption, although this mechanism has not been taken into account in our models. Thanks to the high H$_2$ formation rate, the atomic/molecular transition is shifted towards the edge of the cloud, i.e. in a hotter gas where H$_2$ can be more excited. In our models, we also used a fully efficient conversion between ortho- and para-H$_2$ on dust grains, i.e. all H$_2$ molecules adsorbing on grains are converted before desorbing, which happens to be a good prescription to account for the observed relative H$_2$ line intensities and therefore the observed ortho-to-para ratio. This efficient conversion on grains is justified by the temperature fluctuations of the grains as shown in \cite{Bron16}. The presence of H$_2$ in the hot/warm gas impacts the chemistry including the formation of CO since several routes initiated by the formation of CH$^+$ become efficient. The C$^+$ + H$_2$ reaction has an activation threshold of $\sim 4500$\,K that can be overcome first, by the kinetic energy of the reactants in hot gas, and second, by the internal energy of FUV-pumped H$_2$. In our models, we compute this reaction rate with the prescription by \cite{Agundez10} that takes into account H$_2$ excitation. H$_2$ ro-vibrational level populations of the ground electronic state are computed explicitly taking into account collisional excitation and de-excitation, radiative emission and pumping, UV pumping in electronically excited states followed by radiative de-excitation in the ground electronic state, excitation at formation following \cite{Sizun10} and chemical destruction. This detailed treatment of H$_2$ excitation was already found to provide a good agreement between predicted CH$^+$ and SH$^+$ line intensities and observations in the Orion Bar \citep{Agundez10, Nagy13,Goicoechea17}. Once CH$^+$ is present in the gas, efficient ion-neutral reactions take place to produce species such as the CH$^+$, CH$_2^+$, CH$_3^+$ chain. Then CH$_3^+$ reacts with O to give HCO$^+$ followed by electronic recombination that gives CO. So the formation of CO is found to occur via this hot chemistry at the edge of PDRs as soon as H$_2$ starts to self-shield \citep[see also][]{Goicoechea16}. As can be seen in Figs.\,\ref{Fig:N7023_Best_model_locem} and \ref{Fig:OrionBar_Best_model_locem}, CO emits in high rotational transitions as soon as H$_2$ is formed efficiently in the PDR. In the frame of our stationary PDR models, $\sim$~50\% of the J=19-18 line intensity originates behind the H/H$_2$ transition and before the C$^+$/C/CO one. The remaining 50\% are produced at the C$^+$/C/CO transition. In our models, the gas temperature between the two transition layers (H/H$_2$ and C$^+$/C/CO) is a few hundreds Kelvin, enough to excite collisionally CO in high rotational states. The main heating mechanism of the gas is the photo-electric effect on grains. \cite{Allers05} modified both the UV dust extinction and the photoelectric efficiency in order to increase the gas temperature and therefore account for the H$_2$ emission in the Orion Bar. This is in line with the fact that the abundance of polycyclic aromatic hydrocarbons (PAHs) is found to increase at the border of PDRs \citep[see][and references therein]{Pilleri12}. Since PAHs are major contributors to the photoelectric heating, we implemented in the code several ad-hoc profiles for the photoelectric heating that describe at best the observed abundance variation. However we could not conclude that these modified models were necessary to account for the observations since the new implementation of H$_2$ formation was already leading to a sufficient warm molecular layer. In fact the analysis of mid-IR observations shows that the increased abundance of PAHs is found at A$_\textrm{V}$$\leq$1 whereas our model predicts that excited CO emission is found at a different depth of A$_\textrm{V}$$\sim$2--3 (Figs.\,\ref{Fig:N7023_Best_model_locem} and \ref{Fig:OrionBar_Best_model_locem}). We therefore did not include a profile in the photo-electric heating and used our standard implementation based on \cite{Bakes94} in the final analysis presented here. Finally, approximations in the computation of the self and mutual shielding of pre-dissociating UV lines can affect the calculated CO line intensities. In our models, we use the Federman et al. (1979) prescription to estimate the self-shielding. This formalism considers only the self-shielding of lines by themselves. UV absorption lines of CO and its isotopologues are only shifted by hundredths of Angstrom. Shielding of CO lines by H$_2$ lines, and mutual line shielding of CO and its isotopologues can reduce the photo-destruction rates of CO and its isotopologues. The Meudon PDR code allows to compute exactly such shieldings but at the price of a very significant computing time \citep{Goicoechea07}. We performed some test calculations since a complete grid exploration was out of reach. We found that in the NGC~7023 and Orion Bar parameter range, this effect contributes to a maximum of a factor 3 on high-J $^{13}$CO lines, such as the 15-14 transition, and is not sufficient to explain the mismatch between the modelled and observed $^{13}$CO line intensities. This supports that most of this mismatch arises from the mixing of components in the beam, as discussed in Sec.\,\ref{Sec:CO_rot}. \subsection{Structure of the brightest PDR interfaces}\label{sec:structure_discussion} As presented in Sec.\,\ref{Sec:model_results} our models manage to account for most of the observed lines that trace the bright PDR interface within a factor of a few (even better in the case of NGC\,7023). We can then conclude that, to the first order, it is possible to explain the line intensities emitted at the edge of bright PDRs (G$_0$ $\sim 10^3 - 10^4$) with a single interface modelled by a stationary isobaric PDR model at high thermal pressure ($\sim$ 10$^8$ K cm$^{-3}$). A PDR model at P$_{th}$=10$^8$ K cm$^{-3}$ has been used for the Orion Bar in studies related to the one presented here but only for a limited data set and without exploring the role of the parameters \citep{Nagy13,Cuadrado15}. This idea of using such isobaric models has been raised previously by several authors \citep{Marconi98, Lemaire99, Allers05} but, most of the times, the alternative clump/interclump scenario has been used or invoked \citep{Stutzki90, Parmar91, Meixner93, Tauber94, Hogerheijde95, VanDerWerf96, Usuda96, Andree-Labsch17}. In this scenario, clumps with density of $\sim10^6-10^7\,\mathrm{cm}^{-3}$ that include about 10\% of the gas, are embedded in a more diffuse gas $\sim 10^4-10^5\,\mathrm{cm}^{-3}$, i.e. the difference of density between the two components is a factor $\sim$ 100. In our isobaric model at high pressure ($\sim$ few 10$^8$ K cm$^{-3}$) a comparable gradient in density naturally arises from the hypothesis of constant pressure. It is clear that the assumption of constant pressure equilibrium for our two PDRs is an approximation but the strength of our isobaric model is, however, that it can describe the structure by a single parameter while the clumpy models have to select or fit a very large and partially arbitrary parameter space. Some lines are found to be more responsive to the pressure than others as shown in Fig.\,\ref{Fig:Pressure_effect}. This is the case of the 0-0 S(5) H$_2$ line and the high-J CO lines. On the opposite, the [CII] line is rather constant at 5\,10$^6$ < P$_{th}$ < 10$^8$ K cm$^{-3}$ and its intensity then decreases significantly at higher pressures. Still, a stationary model is not expected to capture all the complexity of a strongly irradiated PDR, such as the Orion Bar, where out-of-equilibrium effects take place \citep{Bertoldi96}. However there is no point in refining our model considering the poor spatial resolution in most tracers. The pressure we derived at the Orion Bar edge, is likely an effective pressure providing the best compromise between fitting the emission of surface tracers (excited H$_2$ lines, CH$^+$ lines) and that of CO (mid-/high-J lines mainly emitted at A$_\textrm{V}$$\sim$2--4). The computed value of the H$_2$~1-0\,S(1)/2-1\,S(1) ratio, which is significantly too high compared to the observations (a factor $\sim$10) suggests that the gas density is too high at the surface of the PDR, considering that the 1-0\,S(1) line intensity increases with collisional relaxation of higher UV-pumped vibrational levels. The existence of a pressure gradient is in line with the work of \cite{Goicoechea16} who showed that the gas kinematics derived from the ALMA maps suggests gas flowing from the high-pressure molecular layers (P$_{\mathrm{th}}\sim 2\times10^{8}\,\mathrm{K~cm}^{-3}$) to the atomic layers (P$_{\mathrm{th}}\sim 5\times10^{7}\,\mathrm{K~cm}^{-3}$). The advection of molecular gas through the PDR edge would impact both the chemical and thermal structures and therefore the calculated line intensities \citep{Bertoldi96}. In this case one can expect a lower value for the H$_2$~1-0S(1)/2-1S(1) ratio since more emission will arise from UV-pumped levels. \citet{Stoerzer98} calculated that on average the H$_2$ lines are affected by a factor of 3. \subsection{A $P_{th}$ - $G_0$ relation in PDRs} \label{subsec:P-G0} Our work shows that the emission of the warm molecular gas at the PDR edge can be attributed to a slab at a high thermal pressure of $10^8$ and $3\times10^8\mathrm{K~cm}^{-3}$ in NGC7023~NW and Orion Bar, respectively. There is a trend that this pressure increases with the $G_0$ value. To further explore this relation, we compiled data from the literature. While doing so, one needs to be sure that the collected values are consistent with our study, which means that this pressure was derived from relevant tracers. In particular we avoided studies that were only based on the analysis of the rotational lines of H$_2$. The data presented in Fig.\ref{Fig:Pressure_G0} is coming from the following studies. \cite{Habart05} have studied in details the Horsehead PDR and have shown that there is a density gradient at the interface with the H\,{\sc ii}\, region, which can be modelled by a thermal pressure equilibrium at P$_{\mathrm{th}}\sim4\times10^{6}\,\mathrm{K~cm}^{-3}$. The value of P$_{\mathrm{th}}=5\times10^{6}\,\mathrm{K~cm}^{-3}$ for NGC~7023~E corresponds to the maximum value derived by \cite{Koehler14} from their combined analysis of dust and excited CO lines. \cite{Perez10} included some mid-J CO lines in their analysis of the warm gas in M17~SW and concluded that the high-density gas (n$_\textrm{H}$ = $5\times10^5\mathrm{cm}^{-3}$) has a maximum temperature of 230~K. We therefore used these values to derive a pressure of P$_{\mathrm{th}}=1.2\times10^{8}\,\mathrm{K~cm}^{-3}$. Finally, we included the massive star forming region W49A in which \cite{Nagy12} studied the warm molecular gas and derived a kinetic temperature map using H$_2$, CO excited lines and a volume density map using HCN excited lines. The maximum thermal pressure can be derived at the center of the map with a value of P$_{\mathrm{th}}=5.4\times10^{8}\,\mathrm{K~cm}^{-3}$. Figure \ref{Fig:Pressure_G0} shows that $P_{\mathrm{th}}$ indeed increases with $G_0$. Considering the very uncertain error bars, we do not provide here a fitting of the reported points that would provide a more quantitative scaling of $P_{\mathrm{th}}$ with $G_0$. Nevertheless, a visual inspection of Fig.\, \ref{Fig:Pressure_G0} leads to $P_{\mathrm{th}}$/$G_0$=1-4 10$^4 \,\mathrm{K~cm}^{-3}$ except for W49A that falls below this range. It is interesting to note that this graph can help rationalizing the results presented in \citet{Stock15}. In the two PDRs studied, S~106 and IRAS~23133+6050, the CO SLEDs are close to those measured in Orion Bar, which could be explained by a UV radiation field, G$_0$, of a few 10$^4$. We can also comment on the results obtained by \cite{Indriolo17} on the CO SLEDs in prototypical massive star-forming regions in which both a high-UV field and shocks are thought to excite the gas. Our study suggests that excitation by UV photons also plays a major role in the case of Orion\,S and W49N. Indeed both objects have similar CO SLEDs and W49N/A is found to follow to some extent the P$_{th}$-G$_0$ trend shown in Fig\,\ref{Fig:Pressure_G0}. In these objects, shocks are however also involved; they are likely the major driver for emission in CO lines with J$_{up}$>25 and are revealed when line profiles can be resolved. For instance, \cite{Tahani16} showed that for the CO J=16-15 line towards Orion S, there is a narrow (4\,$\mathrm{km~s}^{-1}$) component associated with the PDR and a broad (15\,$\mathrm{km~s}^{-1}$) component associated with shock excitation, both having similar integrated intensities. More detailed modelling would be necessary to disentangle the contribution of both excitations on the CO SLEDs. The obtained P$_{th}$-G$_0$ relation can also give us further insights into the (unclear) origin of the density structures that are found at the edge of H\,{\sc ii}\, regions (case of Orion Bar) or of atomic regions (case of NGC 7023 in which no H\,{\sc ii}\, region is present). It suggests that the UV radiation field plays a major role in the compression of the PDR. As the pressures found in the PDRs are significantly higher than the pressures found in the H\textsc{ii} regions (e.g. $P_{\mathrm{th}}=6\times 10^7$ K cm$^{-3}$ in the Orion Bar, \citealt{Goicoechea16}), pressurization by the thermal pressure of the H\textsc{ii} region (e.g. in an expanding H\textsc{ii} region) is not sufficient to explain the trend. Photoevaporation, in which photoheated gas at the ionization and dissociation fronts expands into the central cavity and exerts by reaction a force on the neutral and/or molecular part of the cloud \citep{Bertoldi89,Bertoldi96}, could induce compression of the molecular part of the PDR and explain the pressure difference with the central ionized/atomic cavity. In addition, the tight correlation with $G_0$ independently of the presence of an ionization front (case of NGC\,7023) close to the PDR seems to indicate that non-ionizing (FUV) photons can be at least as efficient as ionizing photons for this photoevaporation process. These considerations have found theoretical support in a recent study by \cite{Bron18}. The authors found that photoevaporation of the illuminated edge of the molecular cloud can indeed lead to high pressures and account for the P$_{th}$-G$_0$ trend. To illustrate this result, we show in Fig.\,\ref{Fig:Pressure_G0} the range of values (dashed lines representing $P_{\mathrm{th}}$/$G_0$= $5\times 10^3$ and $8\times 10^4$\,K cm$^{-3}$, respectively) obtained by the authors using their time-dependent hydrodynamical PDR code. The agreement with the observations is striking and opens new perspectives to study dynamical evolution of the strongly illuminated edges of molecular clouds in massive star-forming regions. \begin{figure} \begin{center} \includegraphics[width=0.5\textwidth]{Figures/Figure_P_G0.pdf} \end{center} \caption{Relation between the thermal pressure in the dense structures of PDRs and the UV intensity $G_0$. See the text for references. The dashed lines show the range of values obtained by \cite{Bron18} in their photoevaporating PDR models. \label{Fig:Pressure_G0}} \end{figure} \section{Conclusion} \label{Sec:Conclusion} Thanks to {\it Herschel}, we have measured the CO SLEDs in two prototypical PDRs: NGC 7023 NW (observed $^{12}$CO lines from J$_{up}$=4 to 19) and the Orion Bar (observed $^{12}$CO lines from J$_{up}$=4 to 23). The excitation temperature deduced for J$_{up}\geq$ 15 from the rotational diagrams are 112 and 147\,K, respectively, showing the presence of warm CO gas at the irradiated PDR edge. We have used the Meudon PDR code and more specifically stationary isobaric PDR models to account for high-J $^{12}$CO lines as well as for H$_2$ and CH$^+$ lines. Only the thermal pressure value and a global scaling factor were used as free parameters. The best models were obtained for a gas thermal pressure of $P_{\mathrm{th}}\sim$ \,10$^8$\,K~cm$^{-3}$ and provide a good agreement with the observed values. The prediction made by these models for other lines from HCO$^+$, O, C, C$^+$, HD and OH has also been found to be compatible with the observed values. Compared to previous works, we found that simulating in detail the H$_2$ formation process on grains, its level excitation and considering state-to-state chemistry for key reactions, it is possible to explain line emission of molecules at the edge of PDRs with a stationary model without the introduction of ad-hoc hypothesis as clumps or shocks. One of the key mechanisms to account for warm CO in PDRs is the high efficiency of H$_2$ formation at the PDR edge, which brings the H/H$_2$ transition closer to the interface. The gas temperature ranges from 1000 K where H$_2$ starts to self-shield to 100 K at the C$^+$/C/CO transition. CO starts to form as soon as H$_2$ appears in the PDR. This is due to the fact that the warm temperature, high density and presence of FUV-pumped H$_2$ allow the formation of CH$^+$ via the H$_2$ + C$^+$ reaction, opening a hot chemistry channel that leads to the formation of CO. As a consequence, in the frame of these stationary models, a significant fraction ($\sim$50 \% in the models of the two PDRs presented here) of high-J CO emission is produced before the C$^+$/C/CO transition. In any case, the separation between the H/H$_2$ and C$^+$/C/CO transition layers is predicted to be very small (less than one arsec. at the distance of Orion) and this is in line with ALMA observations \citep{Goicoechea16}. Our results impact our view of the irradiated edge of star-forming regions and the feedback of star formation on its parental cloud. In the two prototypical PDRs, NGC 7023 NW and Orion Bar, we found that the FUV photons from nearby massive stars have enough energy to explain CO excitation in mid- and high-J levels. No additional energy source as mechanical heating is required. A comparison of NGC 7023 NW and Orion Bar with other typical PDRs shows a correlation between the thermal pressure at the edge of PDRs and the intensity of the UV radiation field. A similar correlation was recently reported by \cite{Wu18} in their spatial study of the Carina nebula. This seems to indicate that the UV radiation field is the main driver of the high pressure at the edge of PDRs. This high-pressure edge is very sharp of the order of a few $10^{-3}$\,pc (one arcsec at the distance of Orion) and is expected to evolve in the surrounding gas at lower pressure. The presence of pressure gradients and advection processes is invoked but could not be further exploited due to the limited spatial resolution of the observations. Implication for extragalactic studies has been discussed by \cite{Indriolo17} and is supported by our study. The high-pressure edges being thin structures, their observation suffers from beam dilution effects. The availability of high-spatial resolution observations is therefore crucial to refine PDR models and is only feasible while studying Galactic PDRs. Perspectives in this topic include the coming James Webb Space Telescope that will soon give us access to subarcsecond-resolution observations for a large number of H$_2$ rotational and ro-vibrational lines. Observations of high-J CO lines with high spatial resolution are however currently out of reach and this could be the case for quite some time. The use of alternative species, which could be observed by ALMA, such as HCO$^+$ or HCN, has to be explored. From the modelling side, further improvement should include a better description of the grain populations and their properties since the penetration of the UV field plays a central role in the energetics and chemistry of PDRs. An additional big step would consist in coupling the chemistry and energetics with dynamical processes that can describe the evolution of these high-pressure edges \citep{Gorti02}. \begin{acknowledgements} This work was in part supported by the Programme National ''Physique et Chimie du Milieu Interstellaire'' (PCMI) of CNRS/INSU with INC/INP, and co-funded by CEA and CNES. It was supported by the German \emph{Deut\-sche For\-schungs\-ge\-mein\-schaft, DFG\/} project number SFB 956, C1. J.R.G and J.C. thank Spanish MINECO for funding supports under grants AYA2012-32032 and AYA2017-85111-P. E. B. thanks the ERC grant ERC-2013-Syg-610256-NANOCOSMOS for support. \end{acknowledgements}
\section{Introduction}% \label{sec:intro} Integral equation methods for the solution of boundary value problems of partial differential equations offer a number of numerically attractive properties, including boundary-only discretizations for homogeneous problems, seamless treatment of exterior problems, and mesh-independent conditioning. However, their effective numerical realization presents a number of technical challenges. A key prerequisite for the use of these methods is the scalable and accurate evaluation of layer potentials on, near, and away from the source layer. This in turn involves \emph{singular and near-singular quadrature} and so-called \emph{fast algorithms} (like the Fast Multipole Method) to facilitate the evaluation of $O(N^2)$ interactions in linear or near-linear time. To maintain accuracy and efficiency, both aspects need to be well-integrated, and, as a unit, have well-understood error behavior. The single layer and double layer potential integral operators $\mathcal{S}$, $\mathcal{D}$ for the Laplace equation with boundary density function $\mu(y): \Gamma \to \mathbb{R}$ are defined as \begin{align} \label{eqn:slp-definition} \mathcal{S} \mu(x) &= -\frac{1}{2 \pi} \int_{\Gamma} \mu(y) \log{|y - x|} \, ds(y),\\ % \label{eqn:dlp-definition} \mathcal{D} \mu(x) &= -\frac{1}{2 \pi} \int_{\Gamma} \mu(y) \, \hat n \cdot \nabla_y \log{|y - x|} \, ds(y). \end{align} The capability of evaluating such layer potentials can be used for the solution of homogeneous PDE boundary value problems. We demonstrate this by the following example. Consider, for specificity, the exterior Neumann problem in two dimensions for the Laplace equation: \begin{align} \notag \triangle u(x) &= 0\quad (x\in \mathbb R^2\setminus \Omega),\\ \label{eq:laplace-bc} ( \hat n(x) \cdot \nabla u(y)) &\to g\quad (x\in \partial\Omega, y\to x_+),\\ \notag u(x)&\to 0 \quad(x\to\infty), \end{align} where $\Omega$ is a bounded domain with a smooth boundary, $\hat n(x)$ is the unit normal to $\partial \Omega$ at $x$, and $\lim_{y\to x_+}$ denotes a limit approaching the boundary from the exterior of $\Omega$. Then, by choosing $\Gamma=\partial \Omega$ and representing the solution $u$ in terms of a single layer potential $u(x)=\mathcal S\mu(x)$ with an unknown density function $\mu$, we obtain that the Laplace PDE and the far-field boundary condition are satisfied by $u$. The remaining Neumann boundary condition becomes, by way of the well-known jump relations for layer potentials (see~\cite[Theorem 6.28]{kress:2014:integral-equations}) the integral equation of the second kind \begin{equation} -\frac \mu2 + \mathcal S'\mu = g. \label{eq:ext-neumann-ie} \end{equation} The boundary $\Gamma$ and density $\mu$ may then be discretized using piecewise polynomials and, using the action of the normal derivative $\mathcal S'$ of $\mathcal S$ as supplied by our method below, solved for the unknown density $\mu$. Once $\mu$ is known, the representation of $u$ in terms of the single-layer potential~\eqref{eqn:slp-definition} may be evaluated anywhere in $\mathbb R^2\setminus\Omega$, again using the method described below, to obtain the sought solution $u$ of the boundary value problem. Quadrature by Expansion (`QBX') is an approach to singular and near-singular quadrature in the setting of layer potential evaluation that is kernel- and dimension-independent. QBX makes use of the fact that the layer potential is analytic and accurately resolved via regular quadrature methods for smooth functions (such as Gaussian quadrature) when the target point is sufficiently far away from the surface. Accuracy in the near or on-surface regime is recovered through analytic continuation by ways of, e.g.\ a Taylor (`local') expansion of the potential about a center in the well-resolved regime. Since the earliest days of the numerical use of integral equation methods~\cite{atkinson1976survey}, acceleration of the otherwise quadratic (in the number of degrees of freedom) runtime of the associated matrix-vector products has been a concern. If no acceleration is used, the integrals of~\eqref{eqn:slp-definition} and~\eqref{eqn:dlp-definition} must be evaluated from scratch for each of $O(N)$ target points, where each such integration involves evaluation of the integrand at $O(N)$ quadrature nodes. Acceleration approaches range from custom methods based on the hierarchical decomposition of curves~\cite{rokhlin:1985:fmm-without-tree} to evaluation methods~\cite{christlieb2006grid} based on Barnes-Hut-style~\cite{barnes1986hierarchical} tree codes. In these methods, the coexistence of quadrature and acceleration is a pervasive concern. When used to solve PDE BVPs as described above, layer potential evaluation may be viewed as two distinct tasks: First, evaluation of the potential on the surface itself as required for the solution of the integral equation to obtain the density, and, second, evaluation of the potential in the volume to obtain the actual solution of the boundary value problem. Kussmaul-Martensen quadrature~\cite{kussmaul1969numerisches,martensen1963methode} as a representative of singularity subtraction techniques, the polar coordinate transform~\cite{kress:2014:integral-equations} as a representative of singularity cancellation techniques, or Generalized Gaussian quadrature~\cite{yarvin_generalized_1998} are examples of a quadrature scheme only suited to the evaluation of (weakly) singular on-surface layer potential integrals. Meanwhile, the evaluation of layer potentials in the volume is in principle straightforward as no singular integrals are involved, for example by adaptive quadrature. Careful management of accuracy that avoids dramatic performance degradation however is less straightforward to achieve~\cite{helsing_2008a, biros_embedded_2004}. QBX, as a quadrature scheme, unifies on-surface and off-surface evaluation~\cite{barnett:2014:close-eval} with only minor accommodations, and we would like to retain this feature of the method in its accelerated version. Beyond this overview, we will not attempt to review the vast literature on singular quadrature (e.g.~\cite{helsing_2008b, lowengrub_1993,goodman_1990,haroldson_1998,mayo_1985,beale_lai_2001,davis_1984,hackbusch_sauter_1994,graglia_2008, jarvenpaa_2003,schwab_1992,khayat_2005,bruno_2001,ying_2006,bremer_nonlinear_2010,farina_2001,strain_1995,johnson_1989, sidi_1988,carley_2007,atkinson_1995,lyness_numerical_1967,chapko_numerical_2000,hao_high-order_2014}). We instead refer the reader to~\cite{klockner:2013:qbx} for a rough overview. Here, we will continue by focusing instead on approaches to combining singular quadrature with a fast algorithm into a single scheme. The use of hierarchically-based fast algorithms for the evaluation of layer potentials considerably predates the Fast Multipole Method itself, such as Rokhlin's early work aimed squarely at accelerated quadrature~\cite{rokhlin:1985:fmm-without-tree}. Within the framework of the Fast Multipole Method, quadrature methods that require special treatment of near interactions often proceed by replacing the direct interactions (of `List 1' in the FMM) with their own procedure. Unfortunately, no guarantees of geometric separation between source and target can be derived from membership in List 1, and so methods requiring this may subtract out unwanted interactions already mediated by the FMM, at an additional computational cost. Within the realm of the acceleration of QBX, early work~\cite{klockner:2013:qbx,epstein:2013:qbx-error-est} remarked on the apparent ease with which QBX might be integrated into Fast Multipole-type algorithms, by slightly modifying the algorithm to yield local expansions containing contributions from the entire source geometry in what has come to be called \emph{global QBX}. First steps towards the realization of such an integration were soon made, first in unpublished work. These early attempts were plagued by uncontrolled and poorly-understood accuracy issues. An initial approach to recovering accuracy through an increase of the FMM order~\cite{rachh:2017:qbx-fmm,rachh2015integral} succeeded, but provided only empirical evidence for its accuracy. We refer to this order-increase scheme as the `conventional QBX FMM' throughout this text. QBKIX~\cite{rahminian:2016:qbkix} (Quadrature by Kernel-Independent Expansion) emerged as a related, global QBX-based numerical method that is built upon the machinery of kernel-independent Fast Multipole Methods~\cite{ying2004kernel}. QBX may also be operated as a local correction applied in the near-field of an FMM, as described above. These schemes, broadly classified as \emph{local QBX}~\cite{rachh2015integral,rachh2018fast}, are algorithmically much simpler than global QBX since a fast algorithm for point potential evaluation may be used largely unmodified. However, to allow the transition between QBX-regularized near-field and point-potential far-field to occur without loss of accuracy, schemes based on local QBX generically require very high QBX expansion orders, which in turn requires a large amount of oversampling. Recent work~\cite{siegel2017local} has been seeking to mitigate the computational cost of this effect. This contribution is concerned with presenting a version of a global QBX-based FMM coupling that provides \emph{rigorous error bounds}, thus providing one approach for a compatible coupling of a singular quadrature rule with acceleration. To accomplish this, we make substantial modifications to the Fast Multipole Algorithm itself. We list these comprehensively in Section~\ref{sec:algorithm}. Some versions of some of these modifications have been discussed in the literature, though in contexts unrelated to layer potential evaluation. For example, we restrict the set of allowable multipole-to-local translations to be between boxes separated by a distance of at least twice their own size. Greengard already discusses the possibility of such a modification, in the context of a three-dimensional generalization of the FMM, in his thesis work~\cite{greengard:1988:thesis}. We also introduce the notion of sizing for targets, to accommodate the unique requirements of global QBX centers. A related need emerged in the chemical physics community, where Coulomb interactions between (extent-bearing) `clouds' of charge need to be evaluated~\cite{white_continuous_1994}, though the algorithm ultimately constructed is substantially different from ours. We refer to our algorithm as \emph{GIGAQBX} (for `GeometrIc Global Accelerated QBX'), to contrast with prior versions of the scheme. In this paper, we take the point of view that the cumulative error in an accelerated QBX scheme effectively splits into three additive components: \begin{equation} \label{eqn:error-splitting} |\text{accelerated QBX error}| \leq |\text{truncation error}| + |\text{quadrature error}| + |\text{FMM error}|. \end{equation} Here, \emph{truncation error} refers to the analytical truncation error, and \emph{quadrature error} is error in evaluating the QBX-regularized integral using quadrature. The \emph{FMM error} refers to the FMM's achieved accuracy in approximating the output of unaccelerated QBX (see Section~\ref{sec:motivation} for details). We choose to split error contributions in this way, rather than relying on direct approximation of the layer potential by the FMM\@. This interpretation allows us to rely on the existing body of work establishing bounds on the truncation and quadrature components of the error (e.g.~\cite{epstein:2013:qbx-error-est,rachh:2017:qbx-fmm,afklinteberg:2016:quadrature-est, afklinteberg:2017:adaptive-qbx}). A complicating factor for the FMM error analysis is that traditional FMM error estimates apply only to the approximation of potentials at point-shape targets, whereas our version of these estimates must account for the approximation of a \emph{QBX local expansion} and \emph{its} accuracy when evaluated as an approximation the potential. The FMM error in this setting is not well-studied. \section{Overview and Motivation}% \label{sec:motivation} In this section, after reviewing the basic operating principle and convergence theory of QBX in Section~\ref{sec:qbx}, we summarize recent progress made towards making global, unaccelerated QBX geometrically robust~\cite{rachh:2017:qbx-fmm} which we continue to leverage (see Section~\ref{sec:qbx-geometry-preprocessing}). We summarize the approach taken toward acceleration in the same article for comparison and to contrast with our version in Section~\ref{sec:qbx-fast-alg}. We assume that the reader has some familiarity with Fast Multipole methods but not necessarily the details of~\cite{rachh:2017:qbx-fmm}. The major difference between our new algorithm and the algorithm of~\cite{rachh:2017:qbx-fmm} occurs in the handling of QBX centers within the FMM\@. The motivation for how we handle QBX centers is detailed in Section~\ref{sec:qbx-experimental-accuracy}. FMMs conventionally evaluate potentials from point sources. In the remainder of this paper, we will often refer to that family of algorithms as \emph{point FMMs}, especially to distinguish from our intended task, which is the evaluation of potentials originating from a layer $\Gamma$, i.e.\ layer potentials. \subsection{Quadrature by Expansion}% \label{sec:qbx} We consider the problem of evaluating the Laplace single layer potential over a smooth simple closed curve $\Gamma$ in a region that is close to the boundary itself (which may include points on the boundary). This is done solely to simplify and focus the discussion; as with many other parts of the QBX literature, our approach generalizes straightforwardly to many more layer potentials and kernels. We discretize the integrals of~\eqref{eqn:slp-definition} and~\eqref{eqn:dlp-definition} by subdividing $\Gamma$ into disjoint pieces $\Gamma_k$, each parametrized by $\gamma_k:[-1,1] \to \Gamma_k$, and by using Gaussian quadrature of a fixed node count $\pquad$ on each piece. Because of the nearly or weakly singular behavior of the integrand, Gaussian quadrature will not yield accurate results when the target point $x$ is near the boundary $\Gamma$. The precise width of this neighborhood depends on both the quadrature node count $\pquad$ and the panel length $h$ but it is usually on the order of a panel length. For a thorough experimental account of this phenomenon, see the first section of~\cite{klockner:2013:qbx}. By contrast, when $x$ is far enough away from the boundary, the integrand is smooth and the integral may be easily evaluated to high accuracy with a smooth quadrature rule. Roughly speaking, QBX extends the `high accuracy' quadrature region by making use of the fact that the potential is \emph{analytic} in the set $\mathbb{R}^2 \setminus \Gamma$. QBX proceeds in two stages: \emph{First stage.} First, Taylor expansion centers are placed away from the boundary $\Gamma$ in the high accuracy region. Let $c$ be the expansion center associated with a target/evaluation point $x$. For simplicity, in the remainder of the paper we will identify $\mathbb{R}^2$ with $\mathbb{C}$ and make use of the complex logarithm, which satisfies $\Re \log(z) = \log |z|$ for all $z \in \mathbb{C} \setminus \{0\}$. We truncate the Taylor expansion and write the $\pqbx$-th order expansion as follows, interchanging the order of summation and integration: \begin{align*} \mathcal{S} \mu(x) \approx -\frac{1}{2 \pi} \Re \sum_{n=0}^\pqbx \left[ \frac{1}{n!} \int_{\Gamma} \mu(y) \left(\frac{d^n}{dc^n} \log(y - c) \right) \, ds(y) \right] {(x-c)}^n. \end{align*} \emph{Second stage.} The occurring (nonsingular) integrals are discretized using (in our case Gaussian) quadrature. Let ${\{y_i\}}_{i=1}^N$ be the set of quadrature nodes with weights and arc length elements ${\{w_i\}}_{i=1}^N$. Then the formula for QBX is \begin{equation} \label{eq:qbx} \mathcal{S} \mu(x) \approx \mathcal{S}_{\text{QBX}(\pqbx, N)} \mu(x) := - \frac{1}{2 \pi} \Re \sum_{n=0}^\pqbx \left[ \frac{1}{n!} Q_N\left\{ \int_\Gamma \mu(y) \left(\frac{d^n}{dc^n} \log(y - c) \right) ds(y) \right\} \right] {(x-c)}^n, \end{equation} where $Q_N$ denotes the approximate computation of an integral of a smooth function through the application of a quadrature rule: \[ Q_N\left\{\int_\Gamma f(y)ds(y)\right\}= \sum_{i=1}^N w_i f(y_i). \] For purposes of solving integral equations, one is mostly interested in the case where $x \in \Gamma$. QBX handles this case with high order accuracy, provided that $\mu$ and $\Gamma$ are smooth~\cite{epstein:2013:qbx-error-est}. More precisely, we state the error estimates in the case where the quadrature is composite Gaussian quadrature over panels of equal length $h$. Let $r$ be the expansion radius for the Taylor expansion. Let $\overline{B}(c,r)$ denote the closed disk of radius $r$ centered at $c$. Assume that $x \in (\overline{B}(c, r) \cap \Gamma)$ and that $\Gamma \setminus \{x\}$ does not intersect $\overline{B}(c, r)$. Let $\pquad$ denote the node count of the Gaussian quadrature. Then it can be shown that the error components scale as \begin{align} |\text{truncation error}| & \leq \frac{1}{2 \pi} \left| \sum_{n=\pqbx+1}^\infty \left[ \frac{1}{n!} \int_{\Gamma} \mu(y) \left(\frac{d^n}{dc^n} \log(y - c) \right) \, ds(y) \right] {(x-c)}^n \right| \nonumber \\ & \le C_1(\pqbx,\Gamma) \| \mu \|_{C^p(\Gamma)} r^{\pqbx+1} \log {\frac{1}{r}}, \label{eq:qbx-truncation-estimate} \\ |\text{quadrature error}| & \leq \frac{1}{2 \pi} \left| \sum_{n=0}^\pqbx \left[ \frac{1}{n!} \left(\int_{\Gamma} - Q_N\left\{\int_{\Gamma}\right\}\right) \mu(y) \left(\frac{d^n}{dc^n} \log(y - c) \right) ds(y) \right] {(x-c)}^n \right| \nonumber \\ & \le C_2(\pquad,\pqbx,\Gamma) {\left(\frac{h}{4r}\right)}^{2\pquad} \| \mu \|_{C^{2\pquad}(\Gamma)}. \label{eq:qbx-quadrature-estimate} \end{align} If we choose $r=\alpha h$ with a proportionality factor $\alpha$ so that $h/(4r)<1$, we obtain a scheme that is accurate of order $\pqbx+1$ in the mesh spacing $h$ up to controlled precision ${1/(4\alpha)}^{2\pquad}$. See~\cite{epstein:2013:qbx-error-est} for more details about the error estimates for QBX\@. This choice reveals $\pquad$ as a free parameter that governs the controlled precision term ${1/(4\alpha)}^{2\pquad}$, where it is mostly the requirement of resolving the high derivatives of the kernel occurring in~\eqref{eq:qbx} that govern the magnitude of $\pquad$. \subsection{Ensuring Accuracy}% \label{sec:qbx-fast-alg} The assumptions required by QBX convergence theory will not necessarily by met by input geometries supplied by a user. In addition, quadrature resolution and placement of centers need to be carefully controlled so as to retain bounds on quadrature and truncation error. An efficient algorithm that accomplishes this is the main contribution of~\cite{rachh:2017:qbx-fmm}. We briefly and informally review this procedure. \subsubsection{Preprocessing the Geometry}% \label{sec:qbx-geometry-preprocessing} To ensure the accuracy of QBX (independently of any fast algorithm), we check for the following situations which may result in inaccuracy: \begin{itemize} \item \emph{When a QBX disk intersects the source curve at more points than the target point}. This comes from the analytical requirement that the QBX expansion disk must not be obstructed by any piece of the source curve. \item \emph{When resolution and separation of source geometry from a QBX expansion center do not guarantee accurate coefficient computation}. This issue occurs in the presence of varying panel sizes. Depending on the quadrature rule and the panel size, the quadrature contribution from the singular integrand may not be resolved adequately if the source geometry is too close to the QBX center. This happens when a large panel is close to a small panel: quadrature from the large panel may not adequately resolve the integrand when evaluated at a QBX center near the small panel. \end{itemize} Because of the assumption of smooth, non-self-intersecting source geometry $\Gamma$, both of these sources of error can be controlled by \emph{iterative refinement}, such as by repeated bisection of panels. In the first case, bisecting the source panel of the `disturbed' center, by the proportionality $h=\alpha r$, draws the expansion center closer to the panel and hence, if applied often enough, the resulting expansion disk will eventually avoid the conflicting geometry. In the second case, the offending source panels can be iteratively refined to grow the region in which accurate coefficient quadrature is achieved to include the target center. Both of these checks can be efficiently implemented using a mechanism termed \emph{area queries} in~\cite{rachh:2017:qbx-fmm}. Once the geometry has been processed to ensure that there are no obstructions to accurate quadrature and control over truncation error, it remains to choose a quadrature node count. The resulting $\pquad$ typically exceeds what might be required to resolve the density and the geometry by some factor. Especially when solving integral equations, it is thus natural to maintain density and geometry at a suitable resolution and `upsample' them to $\pquad$ nodes for QBX computation. $\pquad$ can be empirically estimated, as in Table~1 of~\cite{rachh:2017:qbx-fmm}, or adaptively determined based on analytic knowledge~\cite{afklinteberg:2016:quadrature-est}. \subsubsection{Placing Centers and Identifying QBX Targets}% \label{sec:qbx-center-placement} Evaluation of the potential at a target point requires special treatment (e.g.\ by QBX) when it is so close to a source panel that the underlying (here, Gaussian) quadrature cannot resolve the integrand for the target. Any such targets need to be identified and associated with a QBX center whose expansion disk contains it. Like the geometry processing tasks of Section~\ref{sec:qbx-geometry-preprocessing}, both \emph{identifying} a target that is too close to the source and \emph{finding} a QBX center for the target can be accomplished efficiently using area queries as described in~\cite{rachh:2017:qbx-fmm}. On the question of center placement, the most straightforward approach (and the one used here) is to place QBX centers at $t \pm \frac{h_k}{2}\hat n(t)$, where $t\in\Gamma$ is a target point, $h_k$ is the length of the panel $\Gamma_k$ \[ h_k:=\frac 12 \int_{-1}^1 |\gamma_k'(t)| dt \] containing $t$, and $\hat n_t$ is the unit normal at $t$. This ensures that the QBX disks cover most of the area near the (smooth) source curve. There may be gaps in coverage where a target point needing close evaluation does not fall inside a QBX disk; this occurs during volume evaluation of the layer potential for target points \begin{tikzpicture}[baseline={(0,0)},scale=0.8] \draw [draw=none,use as bounding box] (-1.6,0) rectangle (1.6,0.1); \draw (-0.7,1.5) ++(35-90:1.5) arc (35-90:-35-90:1.5); \draw (0.7,1.5) ++(35-90:1.5) arc (35-90:-35-90:1.5); \draw (-1.5,0) -- (1.5,0); \fill (0, 0.07) circle (1pt); \end{tikzpicture} very close to the surface. We currently treat such gaps by refining the source geometry until all required target points are covered, at considerable computational expense. Empirically, we have observed that simply associating targets with QBX centers even if they fall outside their closest QBX center's expansion disk by a given factor, possibly by up to 20\%, leads to little or no observable loss in accuracy, though such use is not covered by theoretical guarantees. Improvements on either strategy are the subject of future investigation. \subsection{Evaluating the Potential with an FMM}% \label{sec:qbx-fmm} If QBX is implemented following (\ref{eq:qbx}) directly, then a quadratically-scaling computational cost $O(NM)$ is incurred by evaluating the contribution of the $N$ source points at each of the $M$ targets. Making use of the point-discrete form of the quadrature-discretized sources and interpreting the summation in (\ref{eq:qbx}) as the evaluation of a local expansion of a potential due to $N$ source charges provides an avenue by which QBX can be accelerated to an $O(N + M)$ scheme by ways of a variant of the Fast Multipole Method (FMM). To achieve this, our work follows the strategy used in~\cite{rachh:2017:qbx-fmm} which treats a QBX center as a special kind of FMM target at which the FMM \emph{forms a local expansion} instead of \emph{evaluating} the potential. These expansion center targets participate in the FMM algorithm in much the same way point-shape targets do; in particular, they are each `owned' by a box in the FMM tree. In principle, the only additional capability required of a Taylor global QBX FMM is the accurate evaluation of local expansion coefficients, i.e.\ higher-order partial derivatives of the potential. The ability to compute one or two derivatives of the potential is a common feature in production FMM codes. Such numerical differentiation is commonly associated with some loss of accuracy. Since the coefficient order (and hence the number of derivatives) in QBX can be substantial, there is the possibility of substantial loss of accuracy. This notion is empirically confirmed in~\cite{rachh:2017:qbx-fmm}, and an empirically-determined increase in the FMM order is suggested as a remedy. They key contribution of this article is to (a) introduce a modified algorithm that does not require an artificial order increase and (b) provide convergence theory that gives concrete error bounds for layer potential approximated in this manner. Recall that, in an adaptive point-evaluation FMM~\cite{carrier:1988:adaptive-fmm}, the potential at a target point is computed from three parts (each of which is often the sum of further contributions), summarized in the first two columns of Table~\ref{tab:pot-contributions}. The conventional QBX FMM~\cite{rachh:2017:qbx-fmm} replaces each of these with a translation to a local expansion as appropriate, summarized in the last column of Table~\ref{tab:pot-contributions}. \begin{table}[t] \centering \begin{tabular}{lcc} \toprule Interaction [List] & Point FMM~\cite{carrier:1988:adaptive-fmm} & Conv.\ QBX FMM~\cite{rachh:2017:qbx-fmm}\\ \midrule Near neighbor boxes [1/U] & point $\to$ point eval. & point $\to$ local transl.\\ Sep.\ smaller mpoles [3/W] & mpole $\to$ point eval. & mpole $\to$ local transl.\\ Far field & local $\to$ point eval. & local $\to$ local transl.\\ \bottomrule \end{tabular} \vspace*{1ex}% \caption{% Contributions to the potential in a point-evaluation FMM and the conventional QBX FMM of~\cite{rachh:2017:qbx-fmm}. `Mpole' and `local' refer to multipole and local expansions respectively, and `eval.' and `transl.' refers to expansion evaluation and translation respectively. }% \label{tab:pot-contributions} \end{table} \subsection{Accuracy of Using Translated Local Expansions for QBX}% \label{sec:qbx-experimental-accuracy} \begin{figure}[ht] \begin{minipage}[t]{.48\linewidth} \begin{accfigadjust} \input{list2.pgf}% \end{accfigadjust} \caption{% Accuracy of obtaining a QBX expansion by multipole-to-local translation (vs.\ direct computation) for an interaction that may be encountered in `List 2' of an FMM\@. }% \label{fig:list2-sfw-accuracy} \end{minipage} \hfill \begin{minipage}[t]{.48\linewidth} \begin{accfigadjust} \input{list3.pgf}% \end{accfigadjust} \caption{% Accuracy of obtaining a QBX expansion by multipole-to-target translation (vs.\ direct computation) for an interaction that may be encountered in `List 3' of an FMM\@. }% \label{fig:list3-sfw-accuracy} \end{minipage} \end{figure} By \emph{accuracy}, here and in Section~\ref{sec:error-estimates}, we mean the fast algorithm's accuracy in approximating the terms of~\eqref{eq:qbx}. This notion is distinct from (though closely related to) the accuracy of the underlying point FMM\@. The main difference is that the point FMM approximates a potential but the QBX FMM approximates the local expansion of a potential. A key detail not explicitly considered in the modifications of Table~\ref{tab:pot-contributions} is that QBX expansion disks, unlike target points, have an extent. Since no geometric constraints are imposed, some expansion disks will almost inevitably cross box boundaries. Using the above notion of accuracy, it is easy to imagine that this might have an adverse influence on the accuracy of the computed QBX expansion, owing to either reduced separation from source boxes or larger separation of evaluation points from expansion centers than allowed by FMM separation criteria. To frame the discussion and give the reader an intuitive sense of this issue, this section presents numerical examples of interactions that \emph{may plausibly occur} in the conventional QBX FMM which lead to large losses in accuracy. We also give an intuitive idea of how our method avoids these errors. We defer a precise statement of the algorithm and a proof of its accuracy to Sections~\ref{sec:error-estimates} and~\ref{sec:algorithm}. We consider a number of different types of interactions occurring in an FMM, and we demonstrate the possibility of inaccuracy in each. We consider the potential originating from a single source of unit strength and a single expansion center separated by a reference distance. All expansions have order 8 unless stated otherwise. Figure~\ref{fig:list2-sfw-accuracy} portrays an interaction from a point source (blue, right) to a QBX expansion center (orange, middle). A black circle indicates the size of the QBX expansion disk about the center. In a typical usage scenario of QBX, the source may contribute to an expansion of the layer potential about the center, which is then evaluated back at the source, for, say, the computation of the one-sided limit of the layer potential at the source. We now consider an evaluation scenario in which FMM acceleration mediates this interaction through a multipole (shown as `$m_8$') and a local expansion (shown as `$\ell_8$'). While we have chosen this placement to be `adversarial' (i.e.\ to lead to a large loss in accuracy), the scenario is permissible under the rules of the conventional QBX FMM\@, since all required conditions are met: The source point lies inside the box for which the multipole expansion is formed, the source and target box are `well-separated', and the target QBX expansion center lies inside of the target box. A sufficient criterion to assure that the accelerated and unaccelerated version of the scheme yield the same potential is that the QBX local expansions computed directly and by ways of intermediate expansions evaluate to the same potential, up to FMM accuracy. The false-color plot of Figure~\ref{fig:list2-sfw-accuracy} shows the magnitude of the difference between those two expansions in the scenario. In the point FMM, a coarse estimate of multipole-to-local (`M2L' for short) accuracy for eighth-order expansions evaluated within the target box gives \begin{equation} {\left( \frac{\text{dist}(\text{box center}, \text{furthest target})} {\text{dist}(\text{box center}, \text{closest source})} \right)}^{p+1} \leq {\left( \frac{\sqrt{2}}{4-\sqrt{2}} \right)^{9}\approx 4.4 \cdot 10^{-3}.} \label{eq:rough-m2l-error} \end{equation} We have not yet demonstrated the applicability of such an estimate to the QBX case (cf. Lemma~\ref{lem:m2l2qbxl}), but the data show that, for evaluation when the source point is also the target, the expansion computed through intervening multipole and local expansions misses this accuracy goal by a noticeable margin. Analogously inaccurate approximation of QBX interactions for evaluation back at the source may occur not just in multipole-to-local, but also in other types of interactions in the FMM\@. In Figure~\ref{fig:list3-sfw-accuracy}, the false-color plot again shows the magnitude of the difference between the potential obtained from evaluating the QBX expansion computed directly from the source and the QBX expansion obtained indirectly by ways of intermediate expansions, this time from a multipole expansion associated with a small box containing the source point directly to QBX expansion center `target' within a larger target box. Such an interaction may occur through \emph{List 3} in the conventional QBX FMM\@. Figure~\ref{fig:list4-sfw-accuracy} similarly shows a source-to-local interaction of the type one might encounter in a \emph{List 4} of the conventional QBX FMM\@. \begin{figure}[ht] \begin{minipage}[t]{.48\linewidth} \begin{accfigadjust} \input{list2-less-bump.pgf}% \end{accfigadjust} \caption{% Accuracy of obtaining a QBX expansion by multipole-to-local translation (vs.\ direct computation) for an interaction that may be encountered in `List 2' of an FMM\@. In this experiment, the QBX order is lower than the order of the intermediate multipole and local (FMM) expansions. }% \label{fig:list2-less-bumped} \end{minipage} \hfill \begin{minipage}[t]{.48\linewidth} \begin{accfigadjust} \input{list2-bump.pgf}% \end{accfigadjust} \caption{% Accuracy of obtaining a QBX expansion by multipole-to-local translation (vs.\ direct computation) for an interaction that may be encountered in `List 2' of an FMM\@. In this experiment, the QBX order is lower than the order of the intermediate (FMM) multipole and local expansions. Compared with Figure~\ref{fig:list2-less-bumped}, this experiment explores the effect of increasing the order of the intermediate (FMM) multipole and local expansions. }% \label{fig:list2-bumped} \end{minipage} \end{figure} The experiments described so far still paint an incomplete picture of the translation process involved in accelerating QBX\@. For a more complete understanding, consider that the FMM order affects the accuracy of the potential by ways of the multipole-to-local error, in a form like~\eqref{eq:rough-m2l-error}, whereas the QBX order controls $h$-convergence as in~\eqref{eq:qbx-truncation-estimate} up to controlled precision, as in~\eqref{eq:qbx-quadrature-estimate}. As a result, the QBX order is typically lower than the FMM order, a fact that is not reflected in our experiments thus far. Figure~\ref{fig:list2-less-bumped} shows the result of a first experiment that takes this into consideration. Denote the lower-order QBX expansion obtained directly from the source, here of order $q$, by $\ell_{q,\text{direct}}$. Further, denote the local expansion of order $q$ centered at the same location, obtained through a multipole-to-local chain of order $p$ as pictured by $\ell_{q,\text{M2L}(p)}$. Then the top and outer parts of Figure~\ref{fig:list2-less-bumped} show $|\ell_{3,\text{direct}}-\ell_{8,M2L(8)}|$, while the bottom part shows $|\ell_{3,\text{direct}}-\ell_{3,M2L(8)}|$. A first observation from this experiment is that $\ell_{3,M2L(8)}$ better approximates $\ell_{3,\text{direct}}$ than $\ell_{8,M2L(8)}$. While atypical from the point of view of conventional M2L error estimation theory (where high order entails higher accuracy), this is also not entirely surprising, as the translation chain is bound to approximate lower-order coefficients more accurately than higher-order ones. In other words, simply truncating $\ell_{8,M2L(8)}$ leads to higher accuracy. While this argument is intuitively immediately appealing, we are not aware of any estimates that would aid in quantifying the effect. Next, we observed in our earlier experiments that M2L-mediated expansions did not achieve `conventional' M2L accuracy for QBX evaluation at the source point. Based on the results of our latest experiment, we still cannot confidently assert that these tolerances are being met here. We can however predict that, as long as the order of the final M2L-mediated (`QBX') local expansion is being kept constant, increasing the intervening M2L orders should improve the approximation of the individual coefficients of $\ell_{3,\text{direct}}$. This prediction is borne out by the experiment of Figure~\ref{fig:list2-bumped} which analogously to Figure~\ref{fig:list2-less-bumped} compares $|\ell_{3,\text{direct}}-\ell_{15,M2L(15)}|$ with $|\ell_{3,\text{direct}}-\ell_{3,M2L(15)}|$. \begin{figure}[ht] \begin{minipage}[t]{.48\linewidth} \begin{accfigadjust} \input{list4.pgf}% \end{accfigadjust} \caption{% Accuracy experiments for QBX-FMM coupling with interactions as found in an FMM\@. QBX FMM error for a point-to-local (`List 4') interaction. }% \label{fig:list4-sfw-accuracy} \end{minipage} \hfill \begin{minipage}[t]{.48\linewidth} \begin{accfigadjust} \input{list2-zero-stickout.pgf}% \end{accfigadjust} \caption{% Accuracy experiments for QBX-FMM coupling with interactions as found in an FMM\@. QBX FMM error for a List 2 interaction, with the expansion confined to a small region extending beyond the box containing the center.% }% \label{fig:list2-stickout} \end{minipage} \end{figure} This is the basic mechanism by which the conventional QBX FMM of~\cite{rachh:2017:qbx-fmm} achieves accuracy. Looking ahead to the results obtained, Table~\ref{tab:starfish-accuracy-old} summarizes the accuracy achieved in a verification of Green's formula $\mathcal S(\partial_n u)-\mathcal D(u)=u/2$ for a harmonic $u$ across a range of FMM orders $\pfmm$ and $\pqbx$ for a reasonably simple test geometry by that scheme. We find these results unsatisfactory for two reasons: First, the evidence supporting the attained accuracy, while surprisingly robust across geometries in practice, is empirical. Second, considering the results shown in Table~\ref{tab:starfish-accuracy-old} for high QBX orders $\pqbx$ (and thus high relative accuracies), the required FMM order quickly becomes very large if high accuracy is desired. In the remainder of this contribution, we pursue a different strategy that addresses both of these issues. \subsection{Improved Accuracy Through a Geometric Criterion}% \label{sec:fmm-alg-tweaks} Perhaps the foremost problem with the above translation schemes in the context of the conventional error estimates for multipole and local expansions is that they permit---for QBX purposes---inaccurate near-field contributions mediated through multipole and local expansions to enter the QBX local expansion. As shown, increasing the order of those expansions can (empirically) mitigate this circumstance. We prefer to rework the fast algorithm so as to prevent those contributions in the first place. Roughly speaking, this requires separating contributions in the `far field' \emph{of the QBX local expansion disk} (not just the box) from the inaccurate `near-field' ones. As we will show, the far-field ones may be computed with intervening translations without endangering accuracy. We have shown above that intervening translations can considerably damage accuracy for the near-field evaluation. It is useful to realize that the Fast Multipole algorithm already contains a mechanism for handling this type of issue; its chief purpose, after all, is to separate a far-field that is easily approximated from a near-field that does not tolerate approximation. It is thus natural to seek to broaden the FMM's notion of a near-field so as to respect the needs of QBX\@. Wishing to avoid the scenarios that led to loss of accuracy above, we begin with the coarse notion that we wish to avoid expansion-`accelerated' contributions to QBX local expansions which would not meet the same accuracy target as the FMM itself. A first algorithmic variant that provides sufficiently strong accuracy guarantees is nearly immediate: One may require that the entirety of a QBX expansion disk be contained inside some FMM (potentially non-leaf-level) target box. From there, it is at least intuitively plausible that the conventional FMM interaction patterns and their associated error estimates might generalize to guarantee accurate multipole-/local-mediated far-field contributions to QBX local expansions inside each box. This relatively simple generalization of the FMM already represents a somewhat large algorithmic change: While in the original FMM, target particles can only occur in leaf boxes, confining a center to its box entails that \emph{non-leaf} boxes may also contain QBX expansion disk targets. We call this restriction a \emph{target confinement rule}, named this way because the target QBX disks are confined to the inside of a box. This modification achieves the desired accuracy (rigorously, as we will show in Section~\ref{sec:error-estimates}). Unfortunately, it is unsuitable in practice because it no longer has linear complexity---neither in theory nor in practice. In fact, the restriction may lead QBX expansion disk targets that overlap the boundaries of boxes near the root of the tree to exist at near-root levels. Such QBX expansion disks, of which there could be a large number, interact with nearly the entire geometry without the benefit of multipole acceleration. A second algorithmic variant that remedies this is again virtually immediate: Let QBX expansion disks with a center inside a target box not be confined to the strict extent of their containing box, but instead allow them to extend beyond it by a constant factor of the box size, called the \emph{target confinement factor} (`\emph{TCF}'). Intuitively, this ensures that each expansion disk may propagate down the tree (away from the root) until it reaches a box whose size is commensurate with the disk's own diameter. It is perhaps plausible that such a scheme might no longer be subject to superlinear complexity. However, the price for the lower cost is that obtaining guaranteed accuracy requires a more complicated algorithm than in the previous case, which we may describe as having a target confinement factor of zero. Figure~\ref{fig:list2-stickout} provides a graphical representation. The larger target confinement region is shown with a dashed line. It extends beyond the boundaries of the FMM box, which are drawn using a solid line. The figure also shows a computational experiment analogous to the one of Figure~\ref{fig:list2-sfw-accuracy} demonstrating that, at least in this situation, mediated expansions accurately approximate the directly-obtained QBX expansion if they are contained in the target confinement region. As we will see, modifying the FMM algorithm to retain its benign characteristics in terms of accuracy and cost under this modification presents a considerable set of challenges. At the heart of this modification process is the choice of the target confinement factor, which represents the main control point for the cost-accuracy trade-off inherent in our algorithm. To illustrate: a larger TCF may result in worse convergence factors for nearly all FMM interactions, while yielding smaller cost by allowing QBX expansion disks to settle closer to the leaves of the tree. To obtain good convergence factors in two and three dimensions, we have chosen to modify the basic notion of `well-separated-ness' inherent in the FMM, from, roughly speaking, `1-away' to `2-away', similar to the three-dimensional FMM of~\cite{greengard:1988:thesis}. Similarly, we had to considerably rework the criteria for interaction lists of well-separated smaller and bigger boxes (`List 3' and `List 4'). The purpose of the remainder of this paper is to make rigorous the heuristic arguments of the previous paragraphs. In Section~\ref{sec:error-estimates}, we present a novel, more versatile version of the expansion translation error estimates of~\cite{greengard:1987:fmm} that allow us to estimate the accuracy achieved by a chain of translation operators in the presence of varying expansion orders. In Section~\ref{sec:algorithm}, we precisely state our algorithm and provide a complexity analysis that provides a set of benign conditions under which linear complexity is retained. We further point out how the analysis of Section~\ref{sec:error-estimates} can be used to understand the accuracy of the full algorithm. We close with a comprehensive set of accuracy and complexity experiments in Section~\ref{sec:results}. \section{Analysis on Translation Operators with Varying Orders}% \label{sec:error-estimates} To arrive at a better, more quantitative understanding of the accuracy of the translation chains examined in the previous section, we prove new results that explore the accuracy behavior of FMM translation operators when the expansion order varies throughout the chain. We are particularly interested in the effect of truncation of an `upstream' expansion on the accuracy of `downstream' expansion coefficients. The lemmas proven below, while useful in our analysis of the GIGAQBX~FMM, are entirely independent of our particular usage scenario and may prove useful in other settings. For simplicity and conciseness, we prove these results in the setting of the Laplace equation in two dimensions. \subsection{Analytical Preliminaries} First, we recall standard facts regarding multipole and local expansions. For proofs of these facts, we refer the reader to~\cite{greengard:1987:fmm}. The \emph{multipole expansion} centered at the origin due to a unit strength source $s_1$ at $z_0$ takes the form \begin{equation} \label{eqn:multipole} \phi(z) = \log(z - z_0) = a_0 \log(z) + \sum_{k=1}^\infty \frac{a_k}{z^k} \end{equation} with $a_0 = 1$ and $a_k = -z_0^k / k$ for $k > 0$. This series converges for $|z| > |z_0|$, where $R = |z_0|$ is called the radius of the multipole expansion. The multipole expansion (\ref{eqn:multipole}) can also be truncated to $(p + 1)$ terms, which we term a \emph{$p$-th order expansion}. Two important operations on the (truncated or non-truncated) expansion (\ref{eqn:multipole}) are (1) shifting the center of the expansion and (2) conversion to a local expansion. The center of the multipole expansion (\ref{eqn:multipole}) may be shifted to a new center $y$, obtaining another multipole expansion, with coefficients ${(\alpha_k)}_{k=0}^\infty$, given by \begin{equation} \label{eqn:m2m} \alpha_m = \begin{cases} a_0 & m = 0, \\ % - \frac{a_0 (-y)^m}{m} + \sum_{k=1}^m \binom{m - 1}{k - 1} a_k (-y)^{m-k} & m > 0. \end{cases} \end{equation} The resulting expansion converges for $|z| > R + |y|$. The multipole expansion~\eqref{eqn:multipole} can also be converted to a local (Taylor) expansion, centered at $y$ for $|y| > R$, with coefficients $(\beta_k)_{k=0}^\infty$ given by \begin{equation} \label{eqn:m2l} \beta_m = \begin{cases} % a_0 \log(y) + \sum_{k=1}^\infty \frac{a_k}{y^k} & m = 0, \\ (-1)^m \left( \frac{a_0}{m y^m} + \sum_{k=1}^\infty \binom{m+k-1}{k-1} \frac{a_k}{y^{m+k}} \right) & m > 0. \end{cases} \end{equation} The series $\sum_{k=0}^\infty \beta_k(z - y)^k$ converges when $|z - y| < R - |y|$. The local expansion centered at the origin of the potential due to a unit strength source at $z_0$ is the Taylor expansion \begin{equation} \label{eqn:local} \phi(z) = \log(z - z_0) = \sum_{k=0}^\infty b_k z^k. \end{equation} This converges for $|z| < |z_0|$. The coefficients ${(b_k)}_{k=0}^\infty$ are given by $ b_0 = \log(-z_0)$ and $b_m = -1/(mz_0^m)$ for $m > 0$. The main operation on expansions of the type~\eqref{eqn:local} of importance to this discussion is shifting the center of the local expansion. The center of a $p$-th order local expansion of the form~\eqref{eqn:local} may be shifted to another center $y$, with new coefficients $(\beta_m)_{m=1}^p$, given by \begin{equation} \label{eqn:l2l} \beta_m = \sum_{k=m}^p \binom{k}{m} b_k y^{k-m}. \end{equation} \subsection{Error Estimates for Chained Translations} \colorlet{zlocalcolor}{blue} \colorlet{Gammalocalcolor}{blue!50!red} \colorlet{z0multipolecolor}{red} \begin{figure} \begin{minipage}[t]{0.48\textwidth} \centering \begin{tikzpicture}[scale=0.8] \tikzset{% disk/.style={draw, circle, thick, inner sep=0}, shorterarrow/.style={shorten <=1pt, shorten >=1pt} } \node [disk, minimum size=3cm](Gamma) at (0,0) {}; \node [below left] at (Gamma.south west) {$\overline B(0,r)$}; \draw [fill] (Gamma) circle (1pt) node [below right] {$0$}; \draw [<->, shorterarrow] (Gamma.center) -- (Gamma.west) node [below, midway, xshift=2pt] {$r$}; \path (Gamma) ++ (-30:1.25cm) node [disk, color=zlocalcolor, minimum size=1cm](lexp) {}; \path (lexp) ++ (20:0.4cm) node (y) {}; \draw [fill] (lexp) circle (1pt) node [below] {$z$}; \draw [fill] (y) circle (1pt) node [below] {$y$}; \draw [shorterarrow] (-25:3cm) node [color=zlocalcolor] {\textrm{local}} edge[color=zlocalcolor,out=135,in=45,->] (lexp.north east); \path (Gamma) ++ (135:4cm) node [disk, color=z0multipolecolor, minimum size=1.5cm](gamma) {}; \node [below left] at (gamma.south) {$\overline B(z_0, \lambda r)$}; \path (gamma) ++(25:0.75cm) coordinate (source); \draw [fill] (gamma) circle (1pt) node [below] {$z_0$}; \draw [fill] (source) circle (1pt) node [below] {src.}; \draw [<->, shorterarrow] (gamma) -- (Gamma) node [right, midway] {$cr$}; \draw [<->, shorterarrow] (gamma.center) -- (gamma.north west) node [right, midway, xshift=2pt] {$\lambda r$}; \draw [shorterarrow] (90:3.25cm) node [color=z0multipolecolor] {\textrm{multipole}} edge[color=z0multipolecolor,out=-135,in=-35,->] (gamma.east); \end{tikzpicture} \caption{% \label{fig:m2qbxl}% Obtaining the local expansion of a point potential using an intermediate multipole expansion. The local expansion of the potential due to the source charge is formed by first forming a multipole expansion inside $\overline B(z_0,\lambda r)$ and then shifting to $z$. This provides the setting for Lemma~\ref{lem:m2qbxl}. } \end{minipage} \hfill \begin{minipage}[t]{0.48\textwidth} \centering \begin{tikzpicture}[scale=0.8] \tikzset{% disk/.style={draw, circle, thick, inner sep=0}, shorterarrow/.style={shorten <=1pt, shorten >=1pt} } \node [disk, color=Gammalocalcolor, minimum size=3cm](Gamma) at (0,0) {}; \node [below left] at (Gamma.south west) {$\overline B(0,r)$}; \draw [fill] (Gamma) circle (1pt) node [below right] {$0$}; \draw [<->, shorterarrow] (Gamma.center) -- (Gamma.west) node [below, midway, xshift=2pt] {$r$}; \draw [shorterarrow] (20:3cm) node [color=Gammalocalcolor] {\textrm{local}} edge[color=Gammalocalcolor,out=90,in=45,->] (Gamma.north east); \path (Gamma) ++ (-30:1.25cm) node [disk, color=zlocalcolor, minimum size=1cm](lexp) {}; \path (lexp) ++ (20:0.4cm) node (y) {}; \draw [fill] (lexp) circle (1pt) node [below] {$z$}; \draw [fill] (y) circle (1pt) node [below] {$y$}; \draw [shorterarrow] (-25:3.5cm) node [color=zlocalcolor] {\textrm{shifted local}} edge[color=zlocalcolor,out=135,in=45,->] (lexp.north east); \path (Gamma) ++ (135:4cm) node [draw=none,fill=none](gamma) {}; \draw [fill] (gamma) circle (1pt) node [right] {$z_0$: source}; \draw [<->, shorterarrow] (gamma) -- (Gamma) node [right, midway] {$cr$}; \end{tikzpicture} \caption{% \label{fig:l2qbxl}% Obtaining the local expansion of a point potential using an intermediate local expansion. The local expansion of the potential due to the source charge is formed inside the disk $\overline B(0,r)$ and then shifted to the center $z$. This provides the setting for Lemma~\ref{lem:l2qbxl}. } \end{minipage} \end{figure} Given our intended usage pattern in accelerated QBX, we are interested in the following types of translation chains: \begin{enumerate} \item Source $\to$ Multipole$(p)$ $\to$ Local$(q)$ (Lemma~\ref{lem:m2qbxl}) \item Source $\to$ Local$(p)$ $\to$ Local$(q)$ (Lemma~\ref{lem:l2qbxl}) \item Source $\to$ Multipole$(p)$ $\to$ Local$(p)$ $\to$ Local$(q)$ (Lemma~\ref{lem:m2l2qbxl}) \end{enumerate} The main distinction among these we encounter is whether whether the interaction is mediated through an intermediate multipole or local expansion, or both. The list above shows, abstractly, the order of each expansion through the values $p$ and $q$. In our envisioned usage scenario, $q$ represents the order of the final QBX local expansion and will generically be lower than $p$. The reader familiar with conventional adaptive FMMs (e.g.~\cite{carrier:1988:adaptive-fmm}) may discover a direct correspondence of these types of translation chains and the various interaction lists used in those algorithms. Without loss of generality, we may assume that an interaction goes through at most a single intermediate multipole expansion and intermediate local expansion, occupying a single level of the FMM's hierarchy. This is due to the fact that, absent additional truncation, the FMM `forgets' intermediate translations in the following way: the value of a local expansion shifted downward through a sequence of local-to-local (\ref{eqn:l2l}) translations only depends on the source and the \emph{initial} local expansion center. Similarly, the value of a multipole expansion shifted upward through a sequence of multipole-to-multipole (\ref{eqn:m2m}) translations only depends on the source and the \emph{final} multipole expansion center. (See~\cite[Lemma 2.3 and Lemma 2.5]{greengard:1987:fmm}.) We recall a technique from complex analysis for bounding the $n$-th derivative of a complex analytic function. The proof can be found in~\cite[IV.2.14 on page~73]{conway:1978:complex-variables}. \begin{proposition}% \label{prop:cauchy-derivative-bound}% Let $U \subseteq \mathbb{C}$ be open and let $\phi : U \to \mathbb{C}$ be a complex analytic function. Let $z \in U, r > 0$ and suppose that $\overline B(z, r) \subseteq U$. Then for all $n \geq 0$ \[ |\phi^{(n)}(z)| \leq \frac{n!}{r^n} \left( \max_{w \in {\overline B}(z, r)} |\phi(w)| \right). \] \end{proposition} \begin{remark} Although Lemmas~\ref{lem:m2qbxl},~\ref{lem:l2qbxl}, and~\ref{lem:m2l2qbxl} are stated for a single source charge of unit strength, the statements can be straightforwardly generalized for an ensemble of $m$ charges of strengths $q_1, \ldots, q_m$, with the error bound scaled by $\sum_{k=1}^m |q_k|$. \end{remark} See Figure~\ref{fig:m2qbxl} for context on the following lemma. \begin{lemma}[Truncating a mediating multipole to $p$-th order on a $q$-th order local]% \label{lem:m2qbxl}% Let $\lambda, c, r > 0$. Suppose that a single unit strength charge is placed in the closed disk $\overline B(z_0, \lambda r)$ with radius $\lambda r$ and center $z_0$, such that $|z_0| \geq (c + 1 + \lambda)r$. The corresponding multipole expansion with coefficients ${{(a_k)}}_{k=0}^\infty$ converges in the closed disk $\overline B(0,r)$ of radius $r$ centered at the origin. Suppose that $y, z \in \overline B(0,r)$. Then if $|z|<r$ and $|y - z| \leq r - |z|$, the potential due to the charge is described by a power series \[ \phi(y) = \sum_{k=0}^{\infty} \beta_k {(y-z)}^k. \] Fix the intermediate multipole order $p \geq 0$. For $n \geq 0$, let $\tilde{\beta}_n$ be the $n$-th coefficient of the local expansion centered at $z$ obtained by translating the $p$-th order multipole expansion of $\phi$: \[ \tilde{\beta}_n = \frac{1}{n!} \frac{d^n}{dz^n} \left(a_0 \log{(z - z_0)} + \sum_{k=1}^p \frac{a_k}{{(z-z_0)}^k} \right). \] Define $\omega = 1/(1 + \frac{c}{\lambda})$. Fix the local expansion order $q \geq 0$. Then \[ \left| \sum_{k=0}^q \beta_k{(y-z)}^k - \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k \right| \leq \left( \frac{q+1}{p+1} \right) \left( \frac{\omega^{p+1}}{1 - \omega} \right). \] \end{lemma} \begin{proof} We may write $\beta_n - \tilde{\beta}_n$ as \[ \beta_n - \tilde{\beta}_n = \frac{1}{n!} \frac{d^n}{dz^n} R_p(z) \] where the function $R_p: (\mathbb{C} \setminus \overline B(z_0, \lambda r)) \to \mathbb{C}$, defined as \[ R_p(z) = \sum_{k=p+1}^{\infty} \frac{a_k}{{(z - z_0)}^k} \] is what remains after truncating the multipole expansion of $\phi$ to $p$-th order. We bound the $n$-th derivative of $R_p$ at $z$. $R_p$ is complex analytic and its domain contains the closed disk $\{ w : |w-z| \leq r - |z| \}$, so by Proposition~\ref{prop:cauchy-derivative-bound} \begin{equation} \label{eqn:deriv-cauchy-estimate} |R_p^{(n)}(z)| \leq \frac{n!}{{(r - |z|)}^n} \left(\max_{y \in \overline B(z,r-|z|)} |R_p(y)| \right). \end{equation} Recall (e.g., from~\eqref{eqn:multipole}) that the multipole coefficients ${(a_k)}_{k=1}^\infty$ satisfy \[ |a_k| \leq \frac{{(\lambda r)}^k}{k}, \quad k > 0. \] Using Figure~\ref{fig:m2qbxl} and noting $z\ne z_0$, when $|y - z| \le r - |z|$ and $k > 0$, we have \[ \left| \frac{a_k}{{(y - z_0)}^k} \right| \leq \frac{{(\lambda r)}^k}{k{(cr + \lambda r)}^k} = \frac{\omega^k}{k}. \] Noting $\omega<1$, we find \begin{equation} \label{eqn:max-truncation-error-on-disk} \max_{y \in \overline B(z,r-|z|)} |R_p(y)| \leq \sum_{k=p+1}^{\infty} \frac{\omega^k}{k} \leq \frac{1}{p+1} \left( \frac{\omega^{p+1}}{1 - \omega} \right). \end{equation} Combining (\ref{eqn:deriv-cauchy-estimate}) and (\ref{eqn:max-truncation-error-on-disk}) yields \begin{equation} \label{eqn:m2qbxl-coeff-estimate} |\beta_n - \tilde{\beta}_n| = \left| \frac{R_p(z)}{n!} \right| \leq \frac{1}{p+1} \left( \frac{1}{{(r-|z|)}^n} \right) \left( \frac{\omega^{p+1}}{1-\omega} \right). \end{equation} From the triangle inequality and (\ref{eqn:m2qbxl-coeff-estimate}), we obtain the claim: \[ \left| \sum_{k=0}^q \beta_k{(y-z)}^k - \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k \right| \leq \sum_{k=0}^q \left( \frac{1}{p+1} \cdot \frac{\omega^{p+1}}{1-\omega} \cdot \frac{1}{{(r-|z|)}^k} \right) {(r-|z|)}^k = \left(\frac{q+1}{p+1}\right) \left( \frac{\omega^{p+1}}{1-\omega} \right). \] \end{proof} See Figure~\ref{fig:l2qbxl} for context on the following lemma. \begin{lemma}[Truncating a mediating local to $p$-th order on a $q$-th order local]% \label{lem:l2qbxl} Let $c, r > 0$. Suppose that a single unit strength charge is placed at $z_0$, with $|z_0| \geq (c + 1)r$. Consider the closed disk $\overline B(0,r)$ of radius $r$ centered at the origin. Suppose that $y, z \in \overline B(0,r)$. If $|z| < r$ and $|y - z| \leq r - |z|$, the potential $\phi$ due to the charge is described by a power series \[ \phi(y) = \sum_{l=0}^{\infty} \beta_l {(y-z)}^l. \] Fix the intermediate local order $p \ge 0$. For $n \geq 0$, let $\tilde{\beta}_n$ be the $n$-th coefficient of a local expansion centered at $z$ obtained by translating a $p$-th order local expansion of $\phi$ centered at the origin: \[ \tilde{\beta}_n = \frac{1}{n!} \frac{d^n}{dz^n} \left(\sum_{k=0}^{p} \frac{\phi^{(k)}(0)}{k!} z^k \right). \] Fix the local expansion order $q \geq 0$. Define $\alpha = 1/(1 + c)$. Then \[ \left| \sum_{k=0}^q \beta_k{(y-z)}^k - \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k \right| \leq \left(\frac{q+1}{p+1}\right) \left( \frac{\alpha^{p+1}}{1 - \alpha} \right). \] \end{lemma} \begin{proof} This lemma may be proved with an argument almost identical to the proof of Lemma~\ref{lem:m2qbxl}, so we only sketch the proof. We have \( \beta_n - \tilde{\beta}_n = (1/n!) \inlbfrac{d^n}{dz^n} R_p(z) \) where the complex analytic function $R_p: \overline B(0,r) \to \mathbb{C}$ given by \( R_p(z) = \sum_{k=p+1}^\infty -z^k/(kz_0^k) \) is the Taylor remainder of the Taylor series for $\phi$ (cf.~\eqref{eqn:local}) centered at $0$ and evaluated at $z$. Noting $\alpha<1$, applying Proposition~\ref{prop:cauchy-derivative-bound} to $R_p$ yields \( |\beta_n - \tilde{\beta}_n| \leq 1/(p+1) \left( 1/{(r-|z|)}^n \right) \left( \alpha^{p+1}/(1-\alpha) \right). \) From this and the triangle inequality, the claim follows. \end{proof} Once again, see Figure~\ref{fig:m2qbxl} for context on the following lemma. \begin{lemma}[Truncating mediating multipole and local to $p$-th order on a $q$-th order local]% \label{lem:m2l2qbxl} Let $c$, $\lambda$, $r$, ${(a_k)}_{k=0}^\infty$, $\overline B(0,r)$, $\overline B(z_0, \lambda r)$, and $\phi$ be as in Lemma~\ref{lem:m2qbxl}. Let $y,z \in \overline B(0,r)$. Then if $|z| < r$ and $|y - z| \leq r - |z|$, the potential due to the charge is described by a power series \[ \phi(y) = \sum_{k=0}^{\infty} \beta_k {(y-z)}^k. \] Fix the intermediate multipole and local order $p \geq 0$. For $n \geq 0$, let $\tilde{\zeta}_n$ be the $n$-th coefficient of the local expansion at the origin of the potential arising from the $p$-th order multipole expansion at $z_0$ of $\phi$: \[ \tilde{\zeta}_n = \frac{1}{n!} \left. \frac{d^n}{dz^n} \right|_{z=0} \left(a_0 \log{(z-z_0)} + \sum_{k=1}^p \frac{a_k}{{(z-z_0)}^k} \right). \] Also, let $\tilde{\beta}_n$ be the $n$-th coefficient of the local expansion at $z$ of the potential arising from the $p$-th order local expansion with coefficients ${(\tilde{\zeta}_k)}_{k=0}^p$: \[ \tilde{\beta}_n = \frac{1}{n!} \frac{d^n}{dz^n} \left(\sum_{k=0}^p \tilde{\zeta}_k z^k \right). \] Fix the final local expansion order $q \geq 0$. Define $\alpha = 1/(1+c)$ and $\omega = 1/(1+\frac{c}{\lambda})$. Then \[ \left| \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k - \sum_{k=0}^q \beta_k {(y-z)}^k \right| \leq (q+1) \left(\frac{\omega^{p+1}}{1 - \omega}\right) + \left(\frac{q+1}{p+1}\right) \left(\frac{\alpha^{p+1}}{1 - \alpha} \right). \] \end{lemma} \begin{proof} For $n \geq 0$, define $\tau_n$ as the $n$-th coefficient of the $q$-th order local expansion at $z$ of the potential arising from the $p$-th order local expansion of the source potential $\phi$ at the origin: \[ \tau_n = \frac{1}{n!} \frac{d^n}{dz^n} \left(\sum_{k=0}^p \frac{\phi^{(k)}(0)}{k!} z^k \right). \] From the triangle inequality, \[ \left| \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k - \sum_{k=0}^q \beta_k{(y-z)}^k \right| \leq \left| \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k - \sum_{k=0}^q \tau_k {(y-z)}^k \right| + \left| \sum_{k=0}^q \tau_k {(y-z)}^k - \sum_{k=0}^q \beta_k {(y-z)}^k \right|. \] Realizing that the expansion with coefficients ${(\tau_k)}_{k=0}^q$ is the result of $p$-th order truncation of an intermediate local expansion, we can apply Lemma~\ref{lem:l2qbxl} to obtain \begin{equation} \label{eqn:m2l-left-equality} \left| \sum_{k=0}^q \tau_k {(y-z)}^k -\sum_{k=0}^q \beta_k {(y-z)}^k \right| \leq \left(\frac{q+1}{p+1}\right) \left(\frac{\alpha^{p+1}}{1-\alpha}\right). \end{equation} To estimate \[ \left| \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k - \sum_{k=0}^q \tau_k {(y-z)}^k \right|, \] write \[ \tau_n - \tilde{\beta}_n = \frac{1}{n!} \frac{d^n}{dz^n} R_p(z) \] for the complex analytic function \[ R_p(z) = \sum_{k=0}^p \left(\frac{\phi^{(k)}{(0)}}{k!} - \tilde{\zeta}_k\right) z^k. \] Then we have from Proposition~\ref{prop:cauchy-derivative-bound} that \begin{equation} \label{eqn:m2l-deriv-estimate} |R_p^{(n)}(z)| \leq \frac{n!}{{(r-|z|)}^n} \left(\max_{y \in \overline B(z,r-|z|)} |R_p(y)| \right). \end{equation} Realizing that $R_p$ embodies the difference between a direct local expansion of the source and one mediated by the $p$-truncated multipole expansion with coefficients ${(\tilde{\zeta}_k)}_{k=0}^p$, both centered at the origin, we may apply Lemma~\ref{lem:m2qbxl} to find that for $y \in \overline B(z,r-|z|) \subseteq \overline B(0,r)$ \begin{equation} \label{eqn:m2l-max-boundary} |R_p(y)| \leq \frac{\omega^{p+1}}{1-\omega}. \end{equation} Combining (\ref{eqn:m2l-deriv-estimate}) and (\ref{eqn:m2l-max-boundary}) we obtain \[ |\tau_n - \tilde{\beta}_n| = \left| \frac{R_p^{(n)}(z)}{n!} \right| \leq \frac{1}{{(r-|z|)}^n} \left( \frac{\omega^{p+1}}{1-\omega} \right). \] This implies \begin{equation} \label{eqn:m2l-right-equality} \left| \sum_{k=0}^q \tilde{\beta}_k {(y-z)}^k - \sum_{k=0}^q \tau_k {(y-z)}^k \right| = \left| \sum_{k=0}^q (\tilde{\beta}_k - \tau_k) {(y-z)}^k \right| \le (q+1) \left( \frac{\omega^{p+1}}{1-\omega} \right). \end{equation} The claim follows from combining (\ref{eqn:m2l-left-equality}) and (\ref{eqn:m2l-right-equality}). \end{proof} \section{The GIGAQBX\ Algorithm}% \label{sec:algorithm} The algorithm in this section is a hierarchical fast algorithm modeled on the adaptive Fast Multipole Method~\cite{carrier:1988:adaptive-fmm}. Section~\ref{sec:fmm-alg-tweaks} provided a glimpse of the differences between the conventional point FMM and our modified version. For the benefit of readers familiar with point FMMs, these modifications in brief amount to: \begin{itemize} \item \textbf{Targets} (in the form of QBX centers) \textbf{may have an non-zero size or `extent'}. This extent is considered during tree construction. Interactions to the target from sources within its radius are evaluated without expansion-based acceleration. \item To retain efficiency in the presence of this constraint, \textbf{each box has an associated `target confinement region'} (`TCR') which protrudes beyond the box by a fixed multiple of the box size. Targets (with their full extent) must fit within that region of a box to be eligible for inclusion in that box. If they do not fit, they will remain in a (larger) ancestor box. \item As a result of the prior point, \textbf{targets may occur in non-leaf boxes}. Interaction list generation must be modified to permit this. \item To avoid degradation of the expansion convergence factors in the presence of the target confinement region larger than the box, we \textbf{modify the basic recursion structure to consider a neighborhood two boxes wide} when measured from the target box instead of the classical point FMM's one-wide region. \item To further retain convergence in the presence of the TCR, we \textbf{divide} some of the conventional \textbf{interaction lists (particularly, List 3 and 4) into `close' and `far' parts}, based on whether expansion-accelerated evaluation provides sufficient accuracy. The `close' sub-lists are then evaluated directly, without acceleration. \end{itemize} The remainder of this section is devoted to a precise statement of the modified algorithm as well as an analysis of its complexity. The input to the algorithm consists of: \begin{inparaenum}[(a)] \item a curve $\Gamma$ discretized into panels equipped with a piecewise Gaussian quadrature rule; \item a chosen accuracy $\epsilon > 0$; \item a density $\mu$ with values at the points of the discretized geometry; and \item a set of (potentially on-surface) target points at which the potential is to be evaluated. \end{inparaenum} The global accuracy parameter $\epsilon$ is used to determine the order and truncation parameters $\pqbx$, $\pfmm$, and $\pquad$, which we describe in Section~\ref{sec:accuracy-pars}. The geometry and targets should be preprocessed according to Section~\ref{sec:input-geometry-preprocessing}. \subsection{Choice of Algorithm Parameters}% \label{sec:accuracy-pars} The splitting (\ref{eqn:error-splitting}) of the error into FMM error, truncation error, and quadrature error, allows us to control the error components separately, so that in total they do not exceed the allowed precision $\epsilon$. The error estimates in Section~\ref{sec:error-estimates} can be used to guarantee that the FMM error component is of order $\approx {\left(\frac{1}{2}\right)}^{\pfmm+1}$ (cf. Theorem~\ref{thm:gigaqbx-accuracy}). Thus we may set $\pfmm \approx \lvert \log_2 \epsilon \rvert$. The QBX order $\pqbx$ controls the truncation error component and can be set independently of the FMM order. Unlike the algorithm of~\cite{rachh:2017:qbx-fmm}, our algorithm does not require an artificial order increase to the FMM order to maintain accuracy depending on the value of $\pqbx$. Using (\ref{eq:qbx-truncation-estimate}) as the truncation error estimate, we see that the truncation error should be approximately $O(r^{\pqbx + 1})$. This means the choice of $\pqbx$ depends on the expansion radius, and hence the length of the associated panel. Finally, the quadrature error depends chiefly on the node count $\pquad$ of the (upsampled) Gaussian quadrature. This error typically decays quickly in comparison to the other error components. For instance, assuming the QBX centers are placed a distance of $h/2$ from the panels, where $h$ is the panel width, then the estimate (\ref{eq:qbx-quadrature-estimate}) and the surrounding discussion imply the convergence factor for the quadrature error is approximately ${(1/2)}^{2\pquad}$. For calculations on curves in the plane, the rapid increase in accuracy with $\pquad$ makes it expedient (if not necessarily efficient) to choose a generic, high value (e.g. $\pquad=64$), ensuring the smallness of the quadrature error term. The contributions~\cite{afklinteberg:2017:adaptive-qbx,afklinteberg:2016:quadrature-est} provide precise means of estimating this error contribution. \subsection{Preparing Geometry and Targets}% \label{sec:input-geometry-preprocessing} As with the algorithm in~\cite{rachh:2017:qbx-fmm}, a number of preprocessing steps are required on the inputs, which we include in this section by reference. The motivation and postconditions of these steps are described in Section~\ref{sec:qbx-fast-alg}. Detailed algorithms can be found in~\cite{rachh:2017:qbx-fmm}. Specifically, we require that $\Gamma$ has been refined according to the algorithm in Section~5 of~\cite{rachh:2017:qbx-fmm}. The refinement procedure described there controls for quadrature and truncation error. Additionally, preprocessing needs to ensure that geometry and density are upsampled to the chosen quadrature node count $\pquad$. Lastly, our algorithm expects that targets needing QBX-based evaluation have been associated to expansion centers according to the algorithm in Section 6 of~\cite{rachh:2017:qbx-fmm}. Unless otherwise noted, we make the same parameter choices as that contribution, concerning, e.g., center placement (cf.\ also Section~\ref{sec:qbx-center-placement}) and oversampling. \subsection{Tree and Interaction Lists}% \label{sec:interaction-lists} The inputs to our algorithm give rise to a variety of entities in the plane, specifically source quadrature nodes, QBX centers, and target points not needing QBX-based evaluation. We will refer to these generically as `particles'. We disregard target points requiring QBX-based potential evaluation at this stage because their potential evaluation needs can be met simply by evaluating the local expansion that was obtained at the end of the algorithm at the target's associated QBX center. Our algorithm is based on a quadtree whose axis-aligned root box includes all these particles as well as all the entirety of each placed expansion disk. Each box (even a non-leaf box) may `own' a subset of particles. The quadtree is formed by repeatedly subdividing boxes, starting with the root box. A box is subdivided if it owns more than $\nmax$ particles eligible to be owned by its child boxes. If a QBX disk does not fully fit within the target confinement region (see below) of the subdivided box, it is not eligible to be owned by the child box, and its center remains owned by the parent box. \subsubsection{Notation} In the context of the quadtree described above, we introduce the following notation: We will use $\overline {B_\infty}(r, c)$ to denote the closed $\ell^\infty$ ball (i.e., square) of radius $r$ centered at $c$. Let $b$ be a box in the quadtree. We will use $|b|$ to denote the radius of $b$ (i.e., half its width). The \emph{target confinement region} (`TCR', also $\mathsf{TCR}(b)$) of a box $b$ with center $c$ is $\overline {B_\infty}(|b|(1 + t_f), c)$, where $t_f$ is the \emph{target confinement factor} (`TCF'). We assume $0\le t_f<1$. A typical value is $t_f=0.9$ (cf. Theorem~\ref{thm:gigaqbx-accuracy}). The \emph{$k$-near neighborhood} of a box $b$ with center $c$ is the region $\overline {B_\infty}(|b|(1 + 2k), c)$. The \emph{$k$-colleagues} of a box $b$ are boxes of the same level as $b$ that are contained inside the $k$-near neighborhood of $b$. $T_b$ denotes the set of $2$-colleagues of a box $b$. Two boxes at the same level are \emph{$k$-well-separated} if they are not $k$-colleagues. The parent of $b$ is denoted $\mathsf{Parent}(b)$. The set of ancestors is $\mathsf{Ancestors}(b)$. The set of descendants is $\mathsf{Descendants}(b)$. $\mathsf{Ancestors}$ and $\mathsf{Descendants}$ are also defined in the natural way for sets of boxes. A box owning a point or QBX center target is called a \emph{target box}. A box owning a source quadrature node is called a \emph{source box}. Ancestors of target boxes are called \emph{target-ancestor boxes}. \begin{definition}[Adequate separation relation, $\prec$] We define a relation $\prec$ on the set of boxes and target confinement regions, with $a \prec b$ read as `$a$ is adequately separated from $b$, relative to the size of $a$'. We write $a \prec b$ for boxes $a$ and $b$ if the $\ell^\infty$ distance between $a$ and $b$ is at least $2|a|$, i.e.\ the $\ell^\infty$ distance between the centers of $a$ and $b$ is at least $3|a|+|b|$. We write $a \prec \mathsf{TCR}(b)$ for boxes $a$ and $b$ if the $\ell^\infty$ distance between $a$ and $\mathsf{TCR}(b)$ is at least $2|a|$, i.e.\ the $\ell^\infty$ distance between the centers of $a$ and $b$ is at least $3|a|+|b|(1+t_f)$. We write $\mathsf{TCR}(a) \prec b$ for boxes $a$ and $b$ if the $\ell^\infty$ distance between $\mathsf{TCR}(a)$ and $b$ is at least $2|a|(1+t_f)$, i.e.\ the $\ell^\infty$ distance between the centers of $a$ and $b$ is at least $3|a|(1+t_f)+|b|$. \end{definition} Because the size of the TCR is proportional to the box size, $\mathsf{Parent}(a)\prec b$ implies $a\prec b$. We refer to this property as the `\emph{monotonicity}' of `$\prec$'. \subsubsection{Interaction Lists} The core function of the FMM is to convey interactions between boxes by ways of multipole and local expansions. It is common for implementations to store lists of source boxes, one per expansion/interaction type and target or target-ancestor box. These lists are called \emph{interaction lists}. Roughly, the FMM proceeds by obtaining multipole expansions of the sources in each box, propagating them upwards in the tree (towards larger boxes), then using multipole-to-local translation to convert those to local expansions where allowable. These local expansions are then propagated down the tree and evaluated, yielding an approximation of the far field of the box. The near field is evaluated directly, completing the evaluation of the potential from all source boxes at each target box. In adaptive trees (like ours), it cannot be assumed that all subtrees have the same number of levels; additional interaction lists were introduced in~\cite{carrier:1988:adaptive-fmm} to deal with the arising special cases. We motivate and define the interaction lists used in our implementation in this section. Building on these, a precise, step-by-step statement of our version of the FMM can be found in Section~\ref{sec:algorithm-statement}. For a target or target-ancestor box $b$, the interaction lists $\ilist{1}{b}, \ilist{2}{b}, \ilist{3}{b}, \ilist{3close}{b}, \ilist{3far}{b}, \ilist{4}{b}, \ilist{4close}{b}, \ilist{4far}{b}$ are sets of boxes defined as follows: \textbf{List 1} ($\ilist{1}{b}$) enumerates interactions from boxes adjacent to $b$ for which no acceleration scheme is used. This includes the interaction of the box with itself and, since target boxes can be non-leaf boxes, also interactions with $b$'s descendants. \begin{definition}[List 1, $\ilist{1}{b}$]\label{def:list-1} For a target box $b$, $\ilist{1}{b}$ consists of all leaf boxes from among $\mathsf{Descendants}(b) \cup \{b\}$ and the set of boxes adjacent to $b$. \end{definition} \textbf{List 2} ($\ilist{2}{b}$) enumerates interactions from boxes of the same size/level as $b$ with separation to $b$ sufficient to satisfy the assumptions for required error bounds on multipole-to-local translation. \begin{definition}[List 2, $\ilist{2}{b}$]\label{def:list-2} For a target or target-ancestor box $b$, $\ilist{2}{b}$ consists of the children of the $2$-colleagues of $b$'s parent that are $2$-well-separated from $b$. \end{definition} \textbf{List 3} ($\ilist{3}{b}$) enumerates interactions between non-adjacent, not 2-well-separated sources/target box pairs in which the target box $b$ is too large (considering its separation) to receive the contribution of the source box through multipole-to-local translation. These interactions are typically conveyed through evaluation of the source box's multipole expansion and are implied to cover any children of the source box. Of the descendants of the 2-colleagues of $b$, the boxes of List 3 are the first ones to become non-adjacent to $b$ as one descends the tree towards the leaves. \begin{definition}[List 3, $\ilist{3}{b}$]\label{def:list-3} For a target box $b$, a box $d \in \mathsf{Descendants}(T_b)$ is in $\ilist{3}{b}$ if $d$ is not adjacent to $b$ and, for all $w \in \mathsf{Ancestors}(d) \cap \mathsf{Descendants}(T_b)$, $w$ is adjacent to $b$. \end{definition} The following observations are immediate: \begin{inparaenum}[(a)] \item List 3 of $b$ contains the immediate children of any $2$-colleagues of $b$ not adjacent to $b$. \item Any box in $\ilist{3}{b}$ is strictly smaller than $b$. \item Any box $d \in \ilist{3}{b}$ is separated from $b$ by at least the width of $d$. \end{inparaenum} $\ilist{3}{b}$ specifies no relationship of its constituent boxes to $b$'s TCR\@. As a result, $\ilist{3}{b}$ never occurs explicitly in our algorithm. We merely use $\ilist{3}{b}$ as a stepping stone to define two sub-lists, $\ilist{3far}{b}$ and $\ilist{3close}{b}$ (`List 3 far' and `List 3 close') whose definitions take into account the existence of the TCR\@. Considering Figure~\ref{fig:list3-sfw-accuracy}, some elements of $\ilist{3}{b}$ may be too close to $b$ for evaluation of the source multipole to deliver the required accuracy. Interactions between such boxes and $b$ may be handled via direct evaluation. Since direct evaluation, unlike multipole evaluation, does not include information from children, child boxes of too-close boxes must also be considered. Boxes sufficiently far from $b$ make up $\ilist{3far}{b}$ (`List 3 far'), while close leaf (source) boxes comprise $\ilist{3close}{b}$. Because of monotonicity, children of boxes in $\ilist{3far}{b}$ also satisfy the TCR separation requirement. As an easy consequence, observe that while $\ilist{3close}{b}\cup \ilist{3far}{b}\subseteq \ilist{3}{b}$ does not hold in general, $\ilist{3close}{b}\cup \ilist{3far}{b}\subseteq \mathsf{Descendants}(\ilist{3}{b}) \cup \ilist{3}{b}$ is generally true. \begin{definition}[List 3 close, $\ilist{3close}{b}$]\label{def:list-3-close} For a target box $b$, a leaf box $d$ is said to be in $\ilist{3close}{b}$ if $d \in \mathsf{Descendants}(\ilist{3}{b}) \cup \ilist{3}{b}$ such that $d \not \prec \mathsf{TCR}(b)$. \end{definition} \begin{definition}[List 3 far, $\ilist{3far}{b}$]\label{def:list-3-far} For a target box $b$, a box $d$ is in $\ilist{3far}{b}$ if $d \in \mathsf{Descendants}(\ilist{3}{b}) \cup \ilist{3}{b}$ such that $d \prec \mathsf{TCR}(b)$ and, for all $w \in \mathsf{Ancestors}(d) \cap (\mathsf{Descendants}(\ilist{3}{b}) \cup \ilist{3}{b})$, $w \not \prec \mathsf{TCR}(b)$. \end{definition} \textbf{List 4} ($\ilist{4}{b}$) enumerates interactions between non-adjacent, not 2-well-separated source/target box pairs in which the source/leaf box $d$ is too large (considering its separation) to transmit its contribution to the target box $b$ through multipole-to-local translation. These interactions are typically conveyed through formation of a local expansions from the source box's sources. Since this local expansion can then participate in the downward propagation, the interaction from $d$ does not also need to be conveyed to $b$'s children by way of List 4. List 4 consists of non-adjacent 2-colleagues of $b$ or 2-colleagues of its ancestors. \begin{definition}[List 4, $\ilist{4}{b}$]\label{def:list-4} For a target or target-ancestor box $b$, a source/leaf box $d$ is in $\ilist{4}{b}$ if $d$ is a $2$-colleague of $b$ and $d$ is not adjacent to $b$. \emph{Additionally}, a leaf box $d$ is in List 4 of $b$ if $d$ is a $2$-colleague of some ancestor of $b$ and $d$ is adjacent to $\mathsf{Parent}(b)$ but not $b$ itself. \end{definition} The following observations are immediate: \begin{inparaenum}[(a)] \item Any box in $\ilist{4}{b}$ is at least the width of $b$. \item Any box in $\ilist{4}{b}$ is separated from $b$ by at least the width of $b$. \item For any $d \in \ilist{4}{b}$, either $b \in \ilist{3}{d}$ or $d$ is a $2$-colleague of $b$. \end{inparaenum} Again, $\ilist{4}{b}$ specifies no relationship of its constituent boxes to $b$'s TCR\@. As a result, $\ilist{4}{b}$ never occurs explicitly in our algorithm. We merely use $\ilist{4}{b}$ as a stepping stone to define two sub-lists, $\ilist{4far}{b}$ and $\ilist{4close}{b}$ (`List 4 far' and `List 4 close') whose definitions take into account the existence of the TCR\@. Considering Figure~\ref{fig:list4-sfw-accuracy}, some elements of $\ilist{4}{b}$ may be too close to $b$ to allow the resulting local expansion to deliver the required accuracy. Interactions between such boxes and $b$ may be handled via direct evaluation. If a source box $d$ meets the separation requirement of $\mathsf{Parent}(b)$, by monotonicity it will meet the separation requirements of $b$ and its descendants. Hence it will enter the downward propagation at $\mathsf{Parent}(b)$ and thus need not be part of either $\ilist{4far}{b}$ or $\ilist{4close}{b}$. Conversely, if $d\in \ilist{4}{b}$ while \emph{not} meeting the separation requirement, it will need to be added to List 4 close of $b$ and its descendants down to the level at which it meets the requirement, at which point its contribution enters the downward propagation. \begin{definition}[List 4 close, $\ilist{4close}{b}$]\label{def:list-4-close} A box $d$ is in $\ilist{4close}{b}$ if for some $w \in \mathsf{Ancestors}(b) \cup \{b\}$ we have $d \in \ilist{4}{w}$ and furthermore $\mathsf{TCR}(b) \not \prec d$. \end{definition} \begin{definition}[List 4 far, $\ilist{4far}{b}$]\label{def:list-4-far} A box $d \in \ilist{4}{b}$ is in List 4 far if $\mathsf{TCR}(b) \prec d$. Furthermore, if $b$ has a parent, a box $d \in \ilist{4close}{\mathsf{Parent}(b)}$ is in List 4 far if $\mathsf{TCR}(b) \prec d$. \end{definition} \begin{remark}% \label{rem:far-to-close-mpole-optimization} In some cases, it is computationally cheaper to choose a direct interaction instead of an indirect one (see~\cite[Section 2.4]{dehnen:2002:gravitational-fmm} for an example of a treecode optimization based on this observation). The accuracy of the algorithm is not impacted negatively by this choice. For example, a multipole-to-QBX local interaction can be more expensive than the corresponding direct interaction if only a small number of sources contribute to the multipole expansion. Such a situation can occur for a box $b' \in \ilist{3far}{b}$. In this case we remove $b'$ from $\ilist{3far}{b}$ and place its leaf descendants in $\ilist{3close}{b}$. We make use of this possibility in Section~\ref{sec:complexity}. \end{remark} \subsection{Formal Statement of the Algorithm}% \label{sec:algorithm-statement} We use the following notation: $\Potnear_b(t)$ denotes the potential at a target point $t$ due to all sources in $\ilist{1}{b} \cup \ilist{3close}{b} \cup \ilist{4close}{b}$, $\PotW{b}(t)$ denotes the potential at a target $t$ due to all sources in $\ilist{3far}{b}$, $\Lqbxnear_{b}(t)$ denotes the (QBX) local expansion of the potential at target/center $t$ due to all sources in $\ilist{1}{b} \cup \ilist{3close}{b} \cup \ilist{4close}{b}$, $\LqbxW{b}(t)$ denotes the (QBX) local expansion at target/center $t$ due to all sources in $\ilist{3far}{b}$, and $\Lqbxfar{b}(t)$ denotes the local expansion at target/center $t$ due to all sources not in $\ilist{1}{b} \cup \ilist{3}{b} \cup \ilist{4close}{b}$. \needspace{3\baselineskip} \noindent\rule{\textwidth}{0.5pt}\\ \textbf{Algorithm:} GIGAQBX\ Fast Multipole Method\\ \rule[1.25ex]{\textwidth}{0.5pt}\\[-3ex] \def\algstage#1#2{\vspace{2ex}\begin{minipage}{0.97\textwidth}\STATE{\textit{#1}}#2\end{minipage}} % \begin{algorithmic} \small% \REQUIRE{The maximum number of FMM targets/sources $\nmax$ per box for quadtree refinement and a target confinement factor $t_f$ are chosen.} \REQUIRE{Based on the precision $\epsilon$ to be achieved, a QBX order $\pqbx$, an FMM order $\pfmm$, and an oversampled quadrature node count $\pquad$ are chosen in accordance with Section~\ref{sec:accuracy-pars}.} \REQUIRE{The input geometry and targets are preprocessed according to Section~\ref{sec:input-geometry-preprocessing}.} \ENSURE{An accurate approximation to the potential $\mathcal{S}(\mu)$ at all target points is computed.} \algstage{Stage 1: Build tree} {% \STATE{Create a quadtree on the computational domain containing all sources, targets, and expansion centers.} \REPEAT{} \STATE{Subdivide each box containing more than $n_\text{max}$ particles into four children, pruning any empty child boxes. If an expansion center cannot be placed in a child box with target confinement factor $t_f$ due to its radius, it remains in the parent box.} \UNTIL{each box can no longer be subdivided or an iteration produced only empty child boxes} } \algstage{Stage 2: Form multipoles}{% \FORALL{boxes $b$} \STATE{Form a $\pfmm$-th order multipole expansion $\mathsf{M}_b$ centered at $b$ due to sources owned by $b$.} \ENDFOR{} \FORALL{boxes $b$ in postorder} \STATE{For each child of $b$, shift the center of the multipole expansion at the child to $b$. Add the resulting expansions to $\mathsf{M}_b$.} \ENDFOR{} } \algstage{Stage 3: Evaluate direct interactions}{% \FORALL{boxes $b$} \STATE{For each conventional target $t$ owned by $b$, add to $\Potnear_b(t)$ the contribution due to the interactions from sources owned by boxes in $\ilist{1}{b}$ to $t$.} \ENDFOR{} \FORALL{boxes $b$} \STATE{For each expansion center target $t$ owned by $b$, add to the expansion coefficients $\Lqbxnear_{b}(t)$, the contribution due to the interactions from $\ilist{1}{b}$ to $t$.} \ENDFOR{} } \algstage{Stage 4: Translate multipoles to local expansions}{% \FORALL{boxes $b$} \STATE{For each box $d \in \ilist{2}{b}$, translate the multipole expansion $\mathsf{M}_{d}$ to a local expansion centered at $b$. Add the resulting expansions to obtain $\Locfar_b$.} \ENDFOR{} } \algstage{Stage 5(a): Evaluate direct interactions due to $\ilist{3close}{b}$}{% \STATE{Repeat Stage 3 with $\ilist{3close}{b}$ instead of $\ilist{1}{b}$.} } \algstage{Stage 5(b): Evaluate multipoles due to $\ilist{3far}{b}$}{% \FORALL{boxes $b$} \STATE{For each conventional target $t$ owned by $b$, evaluate the multipole expansion $\mathsf{M}_{d}$ of each box $d \in \ilist{3far}{b}$ to obtain $\PotW{b}(t)$.} \ENDFOR{} \FORALL{boxes $b$} \STATE{For each expansion center target $t$ owned by $b$, compute the expansion coefficients $\LqbxW{b}(t)$, due to the multipole expansion $\mathsf{M}_{d}$ of each box $d \in \ilist{3far}{b}$.} \ENDFOR{} } \algstage{Stage 6(a): Evaluate direct interactions due to $\ilist{4close}{b}$}{% \STATE{Repeat Stage 3 with $\ilist{4close}{b}$ instead of $\ilist{1}{b}$.} } \algstage{Stage 6(b): Form locals due to $\ilist{4far}{b}$}{% \FORALL{boxes $b$} \STATE{Convert the field of every particle owned by boxes in $\ilist{4far}{b}$ to a local expansion about $b$. Add to $\Locfar_b$.} \ENDFOR{} } \algstage{Stage 7: Propagate local expansions downward}{% \FORALL{boxes $b$ in preorder} \STATE{For each child $d$ of $b$, shift the center of the local expansions $\Locfar_b$ to the child. Add the resulting expansions to $\Locfar_d$ respectively.} \ENDFOR{} } \algstage{Stage 8: Evaluate final potential at targets}{% \FORALL{boxes $b$} \STATE{For each conventional target $t$ owned by $b$, evaluate $\Locfar_b(t)$.} \STATE{Add $\Potnear_b(t), \PotW{b}(t), \Locfar_b(t)$ to obtain the potential at $t$.} \ENDFOR{} \FORALL{boxes $b$} \STATE{For each expansion center target $t$ owned by $b$, translate $\Locfar_b$ to $t$, obtaining $\Lqbxfar_b(t)$. } \STATE{Add $\Lqbxnear_{b}(t), \LqbxW{b}(t), \Lqbxfar_b(t)$ to obtain the QBX local expansion at $t$.} \ENDFOR{} } \end{algorithmic} \vspace{1ex} \rule{\textwidth}{0.5pt} \definecolor{darkergreen}{rgb}{0.0, 0.5, 0.0} \colorlet{srccolor}{darkergreen} \colorlet{furthestcolor}{cyan} \colorlet{closestcolor}{purple} \def1.4142135623730951{1.4142135623730951} \def0.5{0.5} \begin{figure}[ht] \begin{minipage}[b]{0.48\textwidth} \begin{tikzpicture}[scale=0.8] \coordinate (box1ctr) at (0,0); \coordinate (box2ctr) at (6,0); \draw [srccolor,thick] (box1ctr) ++(-1,-1) rectangle ++(2,2); \draw [srccolor,thick,dashed] (box1ctr) circle (1.4142135623730951); \draw [thick] (box2ctr) ++(-1,-1) rectangle ++(2,2); \draw [dashed,thick] (box2ctr) ++(-1-0.5,-1-0.5) rectangle ++(2+2*0.5,2+2*0.5); \draw [|<->|,thick,furthestcolor] (box2ctr) -- ++(-1-0.5/1.4142135623730951,1+0.5/1.4142135623730951) node [pos=0.4, anchor=west, xshift=2pt] {$r_t(t_f+\sqrt{2})$}; \draw [dashed,thick,furthestcolor] (box2ctr) ++(-1,1) circle (0.5); \draw [|<->|,thick] (box2ctr) -- ++(0,-1) node [pos=0.5,anchor=east] {$r_t$}; \draw [dotted] (box1ctr) ++(2,0) ++(-1,-1) rectangle ++(2,2); \draw [dotted] (box1ctr) ++(4,0) ++(-1,-1) rectangle ++(2,2); \draw [|<->|,thick,closestcolor] (box2ctr) -- ($ (box1ctr) + (1.4142135623730951, 0) $) node [pos=0.7, anchor=south] {$\geq (6 - \sqrt{2}) r_t$}; \end{tikzpicture} \vspace{0.5cm} \[ \frac{\text{\color{furthestcolor}furthest target}}{\text{\color{closestcolor}closest source}} \leq \frac{\sqrt{2} + t_f}{6 - \sqrt{2}} \] \caption{% Separation criteria for List 2, with convergence factor calculation for a multipole-to-local-to-QBX local interaction. The target box with radius $r_t$ is on the right. See Lemma~\ref{lem:m2l2qbxl}. }% \label{fig:list2-sep-criteria} \end{minipage} \hfill \begin{minipage}[b]{0.38\textwidth} \centering \def0.5{0.5} \begin{tikzpicture} \draw [step=1cm, thick] (-1,-1) grid (1,1); \draw [dashed,thick] (-1-0.5,-1-0.5) rectangle (1+0.5,1+0.5); \draw [dashed,thick] (-0.5/2,-0.5/2) rectangle (1+0.5/2,1+0.5/2); \draw [<->,thick,purple] (1,0) -- (1+0.5/2,0) node[pos=2,anchor=west] {$\frac{t_f}{2}|b|$}; \draw [<->,thick,purple] (1,-1) -- (1+0.5,-1) node[pos=1,anchor=west] {$t_f|b|$}; \coordinate (ctr) at (0.9, 0.9); \fill [thick,color=purple] (ctr) circle (1pt); \draw [thick,color=purple,dashed] (ctr) circle (0.5/2 + 0.3); \end{tikzpicture} \vspace{0.5cm} \caption{\label{fig:neighborhood-of-suspended-center}% The expansion disk of a suspended center must have radius at least $t_f / 2$ times the radius of the box $b$ that owns the center.} \end{minipage} \end{figure} \begin{figure}[ht] \begin{minipage}[b]{.48\linewidth} \centering \begin{tikzpicture}[scale=0.8] \def\srcr{0.75}; \coordinate (box1ctr) at (0,0); \coordinate (box2ctr) at (4,0); \draw [srccolor,thick] (box1ctr) ++(-\srcr,-\srcr) rectangle ++(2*\srcr,2*\srcr); \draw [srccolor,thick,dashed] (box1ctr) circle (1.4142135623730951*\srcr); \draw [thick] (box2ctr) ++(-1,-1) rectangle ++(2,2); \draw [dashed,thick] (box2ctr) ++(-1-0.5,-1-0.5) rectangle ++(2+2*0.5,2+2*0.5); \draw [|<->|,thick,closestcolor] (box1ctr) -- ($ (box2ctr) - (1+0.5, 0) $) node [anchor=south, pos=0.7] {$\geq 3 r_s$}; \draw [|<->|,thick] (box1ctr) -- ++(0, \srcr) node[pos=0.5,anchor=west] {$r_s$}; \draw [|<->|,thick,furthestcolor] (box1ctr) -- (-\srcr,-\srcr) node[pos=0.5,anchor=west] {$\sqrt{2} r_s$}; \end{tikzpicture} \vspace{0.5cm} \[ \displaystyle \frac{\text{\color{furthestcolor}furthest source}} {\text{\color{closestcolor}closest target}} \leq \frac{\sqrt{2}}{3} \] \caption{% Separation criteria for List 3 far, with convergence factor calculation for a multipole-to-QBX local interaction. The source box with radius $r_s$ is on the left. See Lemma~\ref{lem:m2qbxl}. }% \label{fig:list3-sep-criteria} \end{minipage} \hfill \begin{minipage}[b]{.48\linewidth} \centering \begin{tikzpicture} \def\tgtr{0.75}; \coordinate (box1ctr) at (0,0); \coordinate (box2ctr) at (4,0); \draw [srccolor,thick] (box1ctr) ++(-1,-1) rectangle ++(2,2); \draw [thick] (box2ctr) ++(-\tgtr,-\tgtr) rectangle ++(2*\tgtr,2*\tgtr); \draw [dashed,thick] (box2ctr) ++(-\tgtr-\tgtr*0.5,-\tgtr-\tgtr*0.5) rectangle ++(2*\tgtr+2*\tgtr*0.5,2*\tgtr+2*\tgtr*0.5); \draw [|<->|,thick] (box2ctr) -- ++(0,-\tgtr) node [pos=0.5,anchor=east] {$r_t$}; \draw [|<->|,thick,furthestcolor] (box2ctr) -- ++(-\tgtr-\tgtr*0.5/1.4142135623730951,\tgtr+\tgtr*0.5/1.4142135623730951) node [pos=0.55, anchor=west, xshift=3pt] {$r_t(t_f + \sqrt{2})$}; \draw [dashed,thick,furthestcolor] (box2ctr) ++(-\tgtr,\tgtr) circle (\tgtr*0.5); \draw [|<->|,thick,closestcolor] (box2ctr) -- ($ (box1ctr) + (1,0) $) node [anchor=north, pos=0.7] {$\geq 3 r_t(1+t_f)$}; \end{tikzpicture} \vspace{0.5cm} \[ \displaystyle \frac{\text{\color{furthestcolor}furthest target}} {\text{\color{closestcolor}closest source}} \leq \frac{\sqrt{2}+t_f}{3(1+t_f)} \leq \frac{\sqrt{2}}{3} \] \caption{% Separation criteria for List 4 far, with convergence factor calculation for a local-to-QBX local interaction. The target box with radius $r_t$ is on the right. See Lemma~\ref{lem:l2qbxl}. }% \label{fig:list4-sep-criteria} \end{minipage} \end{figure} \subsection{Accuracy of the Computed Potential}% \label{sec:accuracy-statement} Section~\ref{sec:error-estimates} contains the information necessary to derive an accuracy estimate for the GIGAQBX~FMM\@. The interaction lists are designed so that each interaction mediated through them has a provable convergence factor. As we shall see in the next theorem, only the List 2 convergence factor depends on $t_f$, and the convergence factor for Lists 3 and 4 far is fixed at $\sqrt{2}/3$. Thus, the overall accuracy of the GIGAQBX~FMM is primarily determined by the choice of $t_f$. \begin{theorem}% \label{thm:gigaqbx-accuracy} Fix a target confinement factor $0 \le t_f < 6 - 2 \sqrt 2$ and define $\alpha = (t_f + \sqrt{2})/(6 - \sqrt{2}) < 1$. There exists a constant $C$ such that for every target point $x\in \mathbb R^2$ \[ \left| \mathcal{S}_{\text{QBX}(\pqbx, N)} \mu(x) - \mathcal G_{\pfmm}\left[\mathcal{S}_{\text{QBX}(\pqbx, N)} \mu(x)\right] \right| \le \frac{1}{1 -\alpha} C A (\pqbx+1) \max{\left(\frac{\sqrt{2}}{3}, \alpha \right)}^{\pfmm+1}, \] where $\mathcal G_{\pfmm}[\cdot]$ denotes approximation by the GIGAQBX\ FMM of order $\pfmm$ and \[ A = \sum_{i=0}^{N} |w_i \mu (y_i)|, \] with the $\{w_i\}$ the quadrature weights and the $\{y_i\}\subset \Gamma$ the quadrature nodes. In particular, for $t_f \leq 3 - 3/\sqrt{2} \approx 0.87$, we obtain \[ \left| \mathcal{S}_{\text{QBX}(\pqbx, N)} \mu(x) - \mathcal G_{\pfmm}\left[\mathcal{S}_{\text{QBX}(\pqbx, N)} \mu(x)\right] \right| \le C A (\pqbx+1) {\left( \frac{1}{2} \right)}^{\pfmm}. \] C is independent of $\mu$, $t_f$, $\pqbx$, $\pfmm$, $\pquad$, and of the curve $\Gamma$ and its discretization. \end{theorem} \begin{proof} The proof of the statement results from applying the error estimates of Section~\ref{sec:error-estimates} to the geometric situations resulting from the definitions of the interaction lists in Section~\ref{sec:interaction-lists}. We fix a target point $x$. Without loss of generality, we assume that $x$ is associated with a QBX center. Let $c$ be the QBX center associated with $x$. Every source point $y_i$ contributing to the summation (\ref{eq:qbx}) contributes via either $\Lqbxnear_{b}(c)$, $\LqbxW{b}(c)$, or $\Lqbxfar_b(c)$, where $b$ is the box that owns $c$. For $\Lqbxnear_{b}(c)$, the contribution must arrive via a direct interaction. This contribution incurs no error. For $\LqbxW{b}(c)$, the contribution must arrive via a $\ilist{3far}{b}$ interaction. The contribution from all $\ilist{3far}{b}$ interactions incurs an error of at most \[ \frac{3A}{3-\sqrt{2}} \left(\frac{\pqbx+1}{\pfmm+1} \right) {\left( \frac{\sqrt{2}}{3} \right)}^{\pfmm+1}. \] See Figure~\ref{fig:list3-sep-criteria} and Lemma~\ref{lem:m2qbxl}. For $\Lqbxfar_b(c)$, the contribution must arrive via a $\ilist{2}{b'}$ or $\ilist{4far}{b'}$ interaction, where $b'$ is either $b$ or an ancestor of $b$. The contribution from all $\ilist{4far}{b'}$ interactions incurs an error of at most \[ \frac{3A}{3-\sqrt{2}} {\left(\frac{\pqbx+1}{\pfmm+1} \right) \left( \frac{\sqrt{2}}{3} \right)}^{\pfmm+1}. \] See Figure~\ref{fig:list4-sep-criteria} and Lemma~\ref{lem:l2qbxl}. The contribution from all $\ilist{2}{b'}$ interactions incurs an error of at most \[ \frac{A}{1-\alpha} (\pqbx + 1) \left(1 + \frac{1}{\pfmm+1} \right) \alpha^{\pfmm + 1}. \] See Figure~\ref{fig:list2-sep-criteria} and Lemma~\ref{lem:m2l2qbxl}. Figures~\ref{fig:list2-sep-criteria},~\ref{fig:list3-sep-criteria}, and~\ref{fig:list4-sep-criteria} reinterpret the convergence factor geometrically in terms of ratios involving distances to sources and distances to targets. These are equivalent to the definitions of the convergence factors encountered in Lemmas~\ref{lem:m2qbxl},~\ref{lem:l2qbxl}, and~\ref{lem:m2l2qbxl}. Combining the estimates above yields the final error estimate. \end{proof} The analysis in Section~\ref{sec:error-estimates} that leads to the bound in Theorem~\ref{thm:gigaqbx-accuracy} is not sharp due to various mathematical simplifications, as we will see in Section~\ref{sec:results}. Techniques similar to the ones of~\cite{petersen:1995:fmm-error-est} may lead to sharper bounds. \subsection{Complexity}% \label{sec:complexity} \begin{table}[h] \centering \begin{tabular}{ccp{0.5\textwidth}} \toprule Stage & Modeled Operation Count & Note\\ \midrule Stage 1 & $NL$ & There are $N$ total particles with at most $L$ levels of refinement. \\ Stage 2 & $N_S \pfmm + N_B \pfmm^2$ & $N_S \pfmm$ for forming multipoles and the rest for shifting multipoles upward, with each shift costing $\pfmm^2$ \\ Stage 3 & $9 N \nmax \pqbx + N_C M_C \pqbx$ & Lemma~\ref{lem:list1-complexity} \\ Stage 4 & $75N_B \pfmm^2$ & Lemma~\ref{lem:list2-complexity} \\ Stage 5 & $\begin{aligned}[t] N_C M_C \pqbx + 64 N_C \pfmm \pqbx + \\8 N_S L \nmax \pqbx \end{aligned}$ & Lemma~\ref{lem:list3-complexity} \\ Stage 6 & $63 N_B \nmax \pfmm + 42 N_C \nmax \pqbx$ & Lemma~\ref{lem:list4-complexity} \\ Stage 7 & $4N_B \pfmm^2$ & The cost of shifting a local expansion downward is $\pfmm^2$. There are at most $4$ children per box. \\ Stage 8 & $N_C \pfmm \pqbx$ & Cost of translating the box local expansions to $N_C$ centers. \\ \bottomrule \end{tabular} \vspace*{1ex}% \caption{Complexity of each stage of the GIGAQBX\ Algorithm.}% \label{tab:complexity-analysis} \end{table} The purpose of this section is demonstrate that the GIGAQBX\ algorithm has a running time that is, roughly speaking, linear in the size of the input, assuming, roughly, that the number of sources within a neighborhood of each QBX disk is constant. Let $S$ be a set of source points with $N_S = |S|$ (as obtained from the discretization of a curve $\Gamma$ in accordance with Section~\ref{sec:motivation}), and let $C$ be a set of expansion centers with $N_C = |C|$. Let $N = N_S + N_C$. Let the quadtree have $N_B$ boxes and $L$ levels. As a simplifying assumption, we restrict the complexity analysis to the case that set of targets at which the potential is to be evaluated are covered by QBX expansion disks, or in other words, we eliminate from consideration any targets whose potential can be evaluated through the conventional FMM algorithm without the use of QBX expansions. We provide worst case running time bounds that apply to all particle distributions (although they do not imply linear complexity for all particle distributions). In particular, we do not attempt to obtain tight bounds on the leading constant terms from the complexity analysis. To complement the theoretical analysis with a more precise cost of each stage of the algorithm, we offer an empirical cost model in Section~\ref{sec:op-counts-results}. From the standpoint of complexity analysis, perhaps the most significant difference between a point FMM and the GIGAQBX~FMM is that in the GIGAQBX~algorithm it is no longer the case that there always are at most $\nmax$ particles per box. For the point FMM, this feature allows for bounding the number of near-neighborhood interactions between two boxes~\cite{carrier:1988:adaptive-fmm}. In the GIGAQBX~FMM, it is possible for any number of QBX centers to cluster inside a box in the tree due to target confinement restrictions, and so another technique is needed to count the near-neighbor interactions. Because it cannot be relied that there are at most $\nmax$ centers per box, our analysis takes into account whether a QBX center is \emph{suspended} in an upper level of the tree or not. A QBX center that is owned by a leaf box and could be owned by a hypothetical child of the leaf box is called \emph{leaf-settled}. A QBX center that is not leaf-settled is called \emph{suspended}. There are never more than $\nmax$ leaf-settled QBX centers in a box. For suspended centers, we make use of Proposition~\ref{prop:suspended-center-nn-interaction-cost} below, which relates the size of the `near neighborhood' of a suspended center to the size of the near neighborhood of its owner box. A summary of the complexity results for each stage is given in Table~\ref{tab:complexity-analysis}. The rest of this section provides the details of this complexity analysis. We provide our complexity analysis in terms of `modeled floating point operations'. This means that while we include constants throughout, depending on interpretation, these constants may omit a flop-related constant factor independent of problem parameters when we felt that no information was gained from including it for added realism. For instance, we model the cost of evaluating an expansion of order $p$ as $p$, when more realistic operation counts might range from $2p+1$ if multiplications and additions are counted, to $p+1$ if a fused-multiply-add operation is assumed, to yet different counts if the computation of powers is taken into account. \subsubsection{Near Neighborhoods of Suspended QBX Centers} We start with the following basic observation about suspended QBX centers. \begin{proposition}% \label{prop:qbx-nn-to-box-nn}% Let $c$ be a suspended QBX center of radius $r_c$ owned by the box $\homebox{c}$. Then the closed square $\overline {B_\infty} \left( 8r_c/t_f, c \right)$ is, geometrically, a superset of the $1$-near neighborhood of $\homebox{c}$. \end{proposition} \begin{proof} Because $c$ is suspended, $c$ cannot be placed in any (hypothetical) child of $\homebox{c}$ because it will not fit in the target confinement region. Since a child has radius $\frac{1}{2}|\homebox{c}|$, it follows that $r_c > \frac{t_f}{2} |\homebox{c}|$. This situation is illustrated in Figure~\ref{fig:neighborhood-of-suspended-center}. Regardless of where $c$ is located in $\homebox{c}$, $\overline {B_\infty}(c, 4|\homebox{c}|)$ must contain the $1$-near neighborhood of $\homebox{c}$. The claim follows since $\frac{8}{t_f} r_c > 4 |\homebox{c}|$. \end{proof} Based on this proposition, we define the following parameter. Consider the input to the GIGAQBX\ algorithm, with a set of centers $C$ and a set of sources $S$. Then $M_C$ is defined as \[ M_C = \frac{1}{N_C} \sum_{c \in C} \left|S \cap \overline {B_\infty} \left(c, \frac{8}{t_f} r_c\right) \right| \] where $r_c$ denotes the radius of the center $c$. In other words, $M_C$ is the average number of sources that intersect with a square of radius $\frac{8}{t_f} r_c$ surrounding a QBX center $c$. The running time of GIGAQBX\ algorithm depends non-trivially on the particle distribution in the tree. However, $M_C$ is a geometry dependent parameter that is independent of the tree structure, and can be used to provide a worst case bound on the $1$-near neighborhood interaction cost for a suspended center. Moreover, if the geometry is smooth and refined in such a way that the panel sizes are locally uniform, $M_C$ will not depend on the total number of particles. We give some values of $M_C$ for actual geometries in Section~\ref{sec:results}. The main utility of $M_C$ is in the following proposition. \begin{proposition}% \label{prop:suspended-center-nn-interaction-cost}% The number of source-center pairs $(s, c) \in S \times C$, such that $c$ is a suspended center and $s$ is in the $1$-near neighborhood of the box that owns $c$, is at most $N_C M_C$. \end{proposition} \begin{proof} This follows immediately from Proposition~\ref{prop:qbx-nn-to-box-nn} and the definition of $M_C$. \end{proof} \subsubsection{Detailed Complexity Analysis} In this section, we will use $\homebox{x}$ to refer to the box that owns particle $x$ and $B$ to refer to the set of boxes in the quadtree. \begin{proposition}% \label{prop:num-bigger-nn-leaves}% Let $b$ be an arbitrary box. Then there are at most $9$ \emph{leaf} boxes at least as large as $b$ that intersect the $1$-near neighborhood of $b$. \end{proposition} \begin{proof} Each such leaf box can be mapped injectively to $b$ or one of the $8$ colleagues of $b$ it contains. \end{proof} \begin{lemma}% \label{lem:list1-complexity} The amount of work done in Stage 3 (direct evaluation of the potential from List 1 source boxes) is at most $$9 N \nmax \pqbx + N_C M_C \pqbx.$$ \end{lemma} \begin{proof} We model the cost of all Stage 3 interactions as $\pqbx|U|$, where $U = \left\{ (s,c) \in S \times C \mid \homebox{s} \in \ilist{1}{\homebox{c}} \right\}$. $U$ may be written as the disjoint union $U = U_\mathrm{big} \cup U_\mathrm{small}$ where $U_\mathrm{big}$ is the set of pairs $(s, c)$, such that $|\homebox{s}| \ge |\homebox{c}|$. We bound $|U_\mathrm{big}|$ as follows. Consider a center $c$. Then there are at most $9$ leaf boxes larger than $\homebox{c}$ that are in or adjacent to $\homebox{c}$, by Proposition~\ref{prop:num-bigger-nn-leaves}. Therefore there are at most $9 \nmax$ sources $s$ such that $(s,c) \in U_\mathrm{big}$. Thus $|U_\mathrm{big}| \leq 9 N_C \nmax$. Now we bound $|U_\mathrm{small}|$. We can group the particle-center interactions $(s, c)$ in $U_\mathrm{small}$ according to whether $c$ is suspended or leaf settled. We consider these two cases separately. Suppose that $c$ is suspended. Then any $s$ such that $(s, c) \in U_\mathrm{small}$ must be in the $1$-near neighborhood of $\homebox{c}$. By Proposition~\ref{prop:suspended-center-nn-interaction-cost}, the number of such $(s,c)$ pairs is at most $M_C N_C$. Now, to consider settled centers, let $s$ be a source. From Proposition~\ref{prop:num-bigger-nn-leaves}, the number of leaf boxes larger than $\homebox{s}$ and adjacent to it is at most $9$. Therefore there are at most $9 \nmax$ leaf settled centers $c$ such that $(s, c) \in U_\mathrm{small}$. It follows that $|U_\mathrm{small}| \leq M_C N_C + 9 N_S \nmax$. Therefore the total cost of Stage 3 is at most $9 N \nmax \pqbx + M_C N_C \pqbx$. \end{proof} \begin{lemma}% \label{lem:list2-complexity} The amount of work done in Stage 4 (translation of multipole to local expansions) is at most $75 N_B \pfmm^2$. \end{lemma} \begin{proof} For each box $b$, $|V_b| \leq 10^2 - 5^2 = 75$ because there are at most $10^2$ children of the parent of $b$ and its $2$-colleagues, and $b$ and its $2$-colleagues cannot be in $V_b$. There are $N_B$ boxes, and each multipole to local translation has a modeled cost of $\pfmm^2$ operations. \end{proof} \begin{lemma}% \label{lem:list3-complexity} Assume that $0 \leq t_f < 1$. The amount of work done in Stage 5 (handling Lists 3 close and far) is at most $$N_C M_C \pqbx + 64 N_C \pfmm \pqbx + 8 N_S L \nmax \pqbx.$$ \end{lemma} \begin{proof} In order to simplify the analysis, we assume that, for every box $b$, \emph{$\ilist{3far}{b}$ is disjoint from the $1$-near neighborhood of $b$}. In other words, for our cost analysis, we treat $\ilist{3}{b}$-type interactions from within the $1$-near neighborhood of $b$ as being mediated through $\ilist{3close}{b}$. This assumption is conservative and will not lead to an underestimation of the cost because (1) direct interactions through $\ilist{3close}{b}$ do not subsume interactions from their children and as such are more numerous and (2) any multipole evaluation that turns out to be more expensive than direct evaluation of the interaction from that box and its children may be replaced by the latter. (In fact, this latter strategy is a viable, if minor, cost optimization. See Remark~\ref{rem:far-to-close-mpole-optimization} for details.) We model the cost of Stage 5 as $\pfmm \pqbx |W_\mathrm{far}| + \pqbx |W_\mathrm{close}|$, where \[ W_\mathrm{far} = \left\{ (b,c) \in B \times C \mid b \in \ilist{3far}{\homebox{c}} \right\}, \quad\text{and}\quad % W_\mathrm{close} = \left\{ (s, c) \in S \times C \mid \homebox{s} \in \ilist{3close}{\homebox{c}} \right\}. \] We bound $|W_\mathrm{far}|$ first. Let $c$ be an expansion center. By our assumption on $\ilist{3far}{b}$ and the 1-near-neighborhood, every box $b$ with $(b, c) \in W_\mathrm{far}$ is a descendant of one of the $5^2 - 3^2 = 16$ boxes that are $2$-colleagues of $\homebox{c}$ that are not adjacent to $\homebox{c}$. Since $0 \leq t_f < 1$, the direct descendants of $b_c$'s 2-colleagues satisfy Definition~\ref{def:list-3-far}, and no children of the direct descendants can be in $\ilist{3far}{b}$. Thus there are at most $16 \times 4$ boxes $b$ such that $(b, c) \in W_\mathrm{far}$. In other words, $|W_\mathrm{far}| \leq 64 N_C$. We handle $|W_\mathrm{close}|$ next. Because $0 \leq t_f < 1$, for every center $c$, every box in $\ilist{3close}{\homebox{c}}$ is contained inside the $1$-neighborhood of $\homebox{c}$. As in the proof of Lemma~\ref{lem:list1-complexity}, we will consider separately the cases that the center is suspended or leaf settled. In the case that the center is suspended, Proposition~\ref{prop:suspended-center-nn-interaction-cost} bounds the number of all such $(s, c)$ pairs by $M_C N_C$. For the leaf settled case, let $s$ be a source particle. Consider a pair $(s, c) \in W_\mathrm{close}$. Then an ancestor of $\homebox{s}$ is adjacent to $\homebox{c}$. Since there are $L$ levels, there are at most $8 L$ boxes adjacent to ancestors of $\homebox{s}$. So there are at most $8 L \nmax$ leaf settled centers $c$ such that $(s, c) \in W_\mathrm{close}$. It follows that $|W_\mathrm{close}| \leq N_C M_C + 8 N_S L \nmax$. Therefore the total cost of Stage 5 is at most $N_C M_C \pqbx + 64 N_C \pfmm \pqbx + 8 N_S L \nmax \pqbx$. \end{proof} \begin{remark}% \label{rem:level-restriction} The factor of $N_S L$ in the cost estimate of Lemma~\ref{lem:list3-complexity} implies that the cost of Stage 5 of the algorithm has a worst-case dependence on the number of particles times the number of levels in the tree. Since there are $\Omega(\log N)$ levels, this could lead to $\Omega(N \log N)$ algorithmic scaling. In practice, we have not observed this for the particle distributions we have tried and we expect $\Omega(N \log N)$ behavior to be uncommon in geometries used for layer potential evaluation. It is conceivable that a sharper analysis might be able to eliminate the factor. In fact, if we assume the quadtree to be \emph{level-restricted}, i.e.\ if we assume that adjacent leaf boxes' levels differ by at most one, then for every leaf box $b$, it can be shown that $|\ilist{3close}{b} \cup \ilist{3far}{b}|$ is at most a (dimension-dependent) constant. Because of this, every center in a leaf-settled box will interact via $\ilist{3close}{b}$ with at most a constant number of source particles, and via $\ilist{3far}{b}$ with at most a constant number of boxes. This allows us to remove the dependence on $L$ in the complexity estimates. Furthermore, using a level-restricted quadtree does not affect the asymptotic cost of any other stage of the algorithm. Starting with an arbitrary adaptive quadtree, the cost of converting it into a level-restricted quadtree is $O(N_B)$ and the resulting tree has $O(N_B)$ boxes. See~\cite[Theorem 1]{moore:1995:cost-of-balancing-generalized-quadtrees}. \end{remark} \begin{lemma}% \label{lem:list4-complexity} The amount of work done in Stage 6 (handling Lists 4 close and far) is at most \[ 63 N_B \nmax \pfmm + 42 N_C \nmax \pqbx. \] \end{lemma} \begin{proof} To aid with the later analysis, we first bound $|\ilist{4}{b}|$. Let $b \in B$. By definition of $\ilist{4}{b}$, any box $b' \in \ilist{4}{b}$ is not adjacent to $b$, and must be adjacent to the parent of $b$ and at least as large as the parent of $b$, or a $2$-colleague of $b$. Of the former, it is an easy result based on the same argument as Proposition~\ref{prop:num-bigger-nn-leaves} that there at at most $5$ \begin{tikzpicture}[scale=0.08] \draw [fill=gray] (0,0) rectangle ++(1,1); \draw (1,-1) rectangle ++(1,1); \draw (1,0) rectangle ++(1,1); \draw (1,1) rectangle ++(1,1); \draw (0,1) rectangle ++(1,1); \draw (-1,1) rectangle ++(1,1); \end{tikzpicture} such boxes. There are at most 16 $2$-colleagues of $b$ not adjacent to $b$. Thus $|\ilist{4}{b}| \leq 21$. We begin by bounding the size of $\ilist{4close}{b}$. Recall from Definition~\ref{def:list-4-close} that $\ilist{4close}{b}$ is a subset of the List 4's of $b$ and its ancestors. In fact, as we now show, $\ilist{4close}{b}\subseteq \ilist{4}{b} \cup \ilist{4}{\mathsf{Parent}(b)}$. For any ancestor $b'$ of $b$ that is $k$ levels above $b$, $b$ is separated by at least a distance of $2^{k+1}|b|$ from any box in $\ilist{4}{b'}$. Now suppose that $b'$ is an ancestor of $b$ that is $k \geq 2$ levels above $b$. Let $e \in \ilist{4}{b'}$. Then $d(b, e) \geq 8|b|$. Furthermore, for any point $t\in\mathsf{TCR}(b)$, $d(t, b) < |b|$ since $0 \leq t_f < 1$. From the reverse triangle inequality, \[ 4|b| < 7|b| < |d(t, b) - d(b, e)| \leq d(t, e). \] This means that $\mathsf{TCR}(b) \prec e$, i.e. $e\not\in \ilist{4close}{b}$. Since $e$ was taken from the List 4 of a grandparent of $b$ or higher, $\ilist{4close}{b}$ must be a subset of $\ilist{4}{b} \cup \ilist{4}{\mathsf{Parent}(b)}$. By the earlier argument, $|\ilist{4close}{b}| \leq 42$. Recall from Definition~\ref{def:list-4-far} that $\ilist{4far}{b}$ is a subset of $\ilist{4}{b}\cup \ilist{4close}{\mathsf{Parent}(b)}$. It follows that $|\ilist{4far}{b}| \leq 21 + 42 = 63$. Therefore the total cost of Stage 6 is at most is at most $63 N_B \nmax \pfmm + 42 N_C \nmax \pqbx$. \end{proof} The next theorem summarizes the contents of this section. It is useful to consider the tree build phase (Stage 1) and the evaluation phase (the remaining stages) as conceptually distinct phases of the algorithm, with their own cost analysis. In the context of solving integral equations, the tree build typically only needs to be done once, while evaluation may need to be done many times, such as in the inner iteration of an iterative method like GMRES~\cite{saad_gmres_1986}. The tree build has a straightforward cost of $O(NL)$. The cost of the evaluation phase is more complicated to analyze. As is the case for most adaptive point FMMs, linear running time is achievable under some set of additional assumptions on the particle distribution. For instance, in the paper~\cite{carrier:1988:adaptive-fmm}, the algorithm is shown to be linear-time only for particle distributions with at most $\lvert \log_2 \epsilon \rvert$ levels in the tree. Unlike~\cite{carrier:1988:adaptive-fmm}, we choose not to make any assumptions on the number of levels of the tree. We instead establish that our algorithm (with a level-restricted quadtree) has a cost at most \emph{linear in the number of boxes $N_B$}. Under the additional assumption of $N_B = O(N)$, cost linear in $N_B$ implies that cost is also linear in the number of particles $N$. This assumption is weaker than limiting the number of levels of the tree. Recent work on adaptive FMMs~\cite{pouransari:2015:adaptive-fractal-fmm} seeks to show that the adaptive FMM has time complexity linear in the number of particles irrespective of the particle distribution, by some modification to the basic FMM algorithm. Our FMM should be amenable to these modifications should the need arise. \begin{theorem}% \label{thm:gigaqbx-cost} (a) The cost of the tree build phase of the GIGAQBX~FMM is $O(NL)$. (b) Assume that $\pfmm = O(\lvert \log \epsilon \rvert)$, and that $\pqbx \le \pfmm$. For a fixed value of $\nmax$, the modeled cost of the evaluation stage of the GIGAQBX~FMM is $O((N + N_B) \lvert \log \epsilon \rvert^2 + NL \lvert \log \epsilon \rvert + N_C M_C \lvert \log \epsilon \rvert)$. Using a level-restricted quadtree, the modeled cost is $O((N + N_B) \lvert \log \epsilon \rvert^2 + N_C M_C \lvert \log \epsilon \rvert)$. If the particle distribution satisfies $N_B = O(N)$ and $M_C = O(1)$, the worst-case modeled cost using a level-restricted quadtree is linear in $N$. \end{theorem} \begin{proof} The proof of this theorem is evident from adding up the cost of the individual stages of the algorithm as given in Table~\ref{tab:complexity-analysis}. The cost of Stage 1 (the tree build phase) is immediate from the table. The cost of the remaining stages may be obtained by bounding $\pqbx$ and $\pfmm$ by $O(\lvert \log \epsilon \rvert)$. The factor of $L$ in Stage 5 may be eliminated by using a level-restricted quadtree, cf. Remark~\ref{rem:level-restriction}. \end{proof} \section{Results}% \label{sec:results} \def8{8} \def4{4} \def32{32} \def50{50} \def65{65} \def3250{3250} \def\num{4.97e-05}{\num{4.97e-05}} \def\num{2.97e-06}{\num{2.97e-06}} \def\num{5.37e-05}{\num{5.37e-05}} \def\num{3.08e-06}{\num{3.08e-06}} \def64{64} \def128{128} \begin{figure} \centering \input{starfish.pgf}% \caption{% A subset of the `starfish' test geometries used to obtain many of the results of Section~\ref{sec:results}.}% \label{fig:starfish} \end{figure} In this section, we illustrate the numerical accuracy and scaling of the GIGAQBX\ FMM algorithm. We also perform a cost comparison of this algorithm with the prior algorithm of~\cite{rachh:2017:qbx-fmm}. The experimental setup is as follows. We use a family of test geometries, parameterized by $n \in \mathbb{N}$, that form a `starfish' curve $\gamma_n : [0,1] \to \mathbb{R}^2$ whose parametrization is given by \begin{equation} \label{eqn:starfish} \gamma_n(t) = \left(1 + 0.8 \sin(2 \pi n t) \right) \begin{pmatrix} \cos(2\pi t) \\ \sin(2 \pi t) \end{pmatrix}. \end{equation} With increasing $n$, the starfish geometry has a larger number of more closely-spaced `arms'. See Figure~\ref{fig:starfish} for graphical renditions of some of these geometries. We make use of these geometries because we have empirically found them to present a demanding scenario for layer potential evaluation, with varying feature and panel sizes, close spacing of unconnected parts of the geometry, and large (and scalable) overall size. We have found these characteristics to present an adequate challenge both the accuracy and the scalability of a layer potential evaluation code in a way that is representative of smooth source geometries `in the wild'. \subsection{Accuracy}% \label{sec:accuracy-results} { \renewrobustcmd{\bfseries}{\fontseries{b}\selectfont} \newcommand{\converged}[1]{\bfseries #1} \sisetup{ table-format = 1.2e-1, table-number-alignment = center, table-sign-exponent = true, round-mode = places, round-precision = 2, detect-weight = true, mode = text, } \begin{table} \centering \begin{tabular}{S[table-format = 1e-1, round-precision = 0]cSSSS} \toprule {$(1/2)^{\pfmm+1}$} & {$\pfmm$} & {$\pqbx=3$} & {$\pqbx=5$} & {$\pqbx=7$} & {$\pqbx=9$}\\ \midrule {0} & (direct) & 4.347051e-06 & 6.208251e-07 & 1.046014e-07 & 5.707204e-08\\ 6.250000e-02 & 3 & 5.161134e-03 & 6.348744e-03 & 6.334309e-03 & 6.339144e-03\\ 1.562500e-02 & 5 & 3.833444e-04 & 5.953947e-04 & 5.951707e-04 & 5.928302e-04\\ 4.882812e-04 & 10 & \converged{4.350562e-06} & 4.818136e-06 & 6.943738e-06 & 9.296732e-06\\ 1.525879e-05 & 15 & \converged{4.347050e-06} & \converged{6.208327e-07} & \converged{1.045694e-07} & 1.758935e-07\\ 4.768372e-07 & 20 & \converged{4.347051e-06} & \converged{6.208251e-07} & \converged{1.046015e-07} & \converged{5.707204e-08}\\ \bottomrule \end{tabular} \vspace*{1ex}% \caption{$\ell^\infty$ error in Green's formula $\mathcal S(\partial_n u)-\mathcal D(u)=u/2$, scaled by $1/\|u\|_\infty$, for the $65$-armed starfish $\gamma_{65}$, using the GIGAQBX\ algorithm. $\pfmm$ denotes the FMM order and $\pqbx$ the QBX order. The geometry was discretized with $3250$ Gauss-Legendre panels, with $33$ nodes per panel. Idealized point FMM error ${(1/2)}^{\pfmm+1}$ included for comparison. Entries in bold indicate that the FMM error is negligible.}% \label{tab:starfish-accuracy} \vspace*{4ex}% \begin{tabular}{S[table-format = 1e-1, round-precision = 0]cSSSS} \toprule {$(1/2)^{\pfmm+1}$} & {$\pfmm$} & {$\pqbx=3$} & {$\pqbx=5$} & {$\pqbx=7$} & {$\pqbx=9$}\\ \midrule {0} & (direct) & 4.347051e-06 & 6.208251e-07 & 1.046014e-07 & 5.707204e-08\\ 6.250000e-02 & 3 & 2.546447e-02 & 2.963941e-02 & 4.074078e-02 & 5.766060e-02\\ 1.562500e-02 & 5 & 6.942927e-03 & 1.613796e-02 & 2.289611e-02 & 3.102830e-02\\ 4.882812e-04 & 10 & 4.952200e-04 & 1.749411e-03 & 5.803410e-03 & 9.479241e-03\\ 1.525879e-05 & 15 & 1.582358e-05 & 1.845764e-04 & 6.402331e-04 & 3.171478e-03\\ 4.768372e-07 & 20 & \converged{4.346750e-06} & 1.314485e-05 & 8.993484e-05 & 5.012005e-04\\ \bottomrule \end{tabular} \vspace*{1ex}% \caption{Analogous data to Table~\ref{tab:starfish-accuracy} for the conventional QBX FMM algorithm of~\cite{rachh:2017:qbx-fmm}. }% \label{tab:starfish-accuracy-old} \end{table} } We test the accuracy of the algorithm of this paper in a sequence of experiments. To assess accuracy, we employ \emph{Green's formula} on the source geometry. Let $\Gamma$ be the boundary of the domain. Let $u$ be a harmonic function defined inside the domain and extending smoothly to the boundary. Because $u$ extends smoothly to the boundary of the domain, the normal derivative $\partial_n u$ at the boundary is well-defined. Then Green's formula (e.g.~\cite[Theorem 6.5]{kress:2014:integral-equations}) states that for $x\in\Gamma$, \[ \mathcal{S} (\partial_n u)(x) - \mathcal{D}(u)(x) = \frac{u(x)}{2}. \] We use the residual in Green's formula as a convenient proxy for the accuracy attained in the evaluation of the layer potential evaluation as well as the overall accuracy attainable in application problems, in particular in the context of the solution of boundary value problems. We conducted two sets of experiments in this section. The first set is summarized in Table~\ref{tab:bvp-green-accuracy}, which presents data to support the assertion that the residual in Green's formula is a reasonable proxy for the error in the solution of boundary value problems. In the second set of experiments, we measured the residual in the evaluation of Green's formula for a complicated geometry. We let $u$ be the potential due to a charge located outside $\Gamma$ at $(2,1)$. We use the FMM to approximate $\mathcal{S} (\partial_n u) - \mathcal{D}(u)$ and report the error in the discrete infinity norm. The error reported is the absolute error scaled by $1/\|u\|_\infty$ (so that it is relative to the magnitude of $u$). We use the starfish curve with $n = 65$ and test with various combinations of QBX order $\pqbx$ and FMM order $\pfmm$. $\gamma_{65}$ was discretized with $3250$ Gauss-Legendre panels with $\pgfmathtruncatemacro{\pgmres}{8+1}\pgmres$ nodes oversampled to panels with $\pgfmathtruncatemacro{\pgmres}{32+1}\pgmres$ nodes (cf. Section~\ref{sec:qbx}). The curve was subsequently refined according to the refinement criteria of Section~\ref{sec:qbx-geometry-preprocessing}. Table~\ref{tab:starfish-accuracy} show the results of these experiments for the GIGAQBX\ FMM, varying $\pqbx$ across columns and $\pfmm$ across rows. The error incurred in unaccelerated QBX is shown in the first row of results. This value represents a lower bound on the accuracy of the scheme for errors of a given QBX order (as shown within a column); no error obtained with acceleration (as shown in the remaining rows) will be meaningfully smaller. Any error beyond the value in the first row is necessarily attributable to the effects of acceleration. We show table entries in bold if they do not significantly exceed the error value for unaccelerated QBX, indicating that the error contribution of FMM acceleration is negligible. We choose the target confinement factor as $t_f=0.9$. For that value of $t_f$, Theorem~\ref{thm:gigaqbx-accuracy} roughly establishes $\|u\|_\infty {(1/2)}^{\pfmm+1}$ as a bound on the absolute error incurred by acceleration, neglecting a factor of $(\pqbx+1)$ and a number of other factors that do not vary across the entries of the table. We show ${(1/2)}^{\pfmm+1}$ in the left column of the table. We find that the results support $\|u\|_\infty {(1/2)}^{\pfmm+1}$ as an asymptotic upper bound on the error, and, in turn, the assertion that the error in the potential computed via the GIGAQBX\ FMM is bounded simply by \begin{equation} | \text{unaccelerated QBX error}| + \|u\|_\infty {(1/2)}^{\pfmm+1}, \label{eq:gigaqbx-sum-bound} \end{equation} consistent with~\eqref{eqn:error-splitting}. In addition, we observe that the bound~\eqref{eq:gigaqbx-sum-bound} lends itself to the simple interpretation that the additional error in the potential incurred from due to GIGAQBX\ FMM acceleration is asymptotically (in $\pfmm$) the same as the error incurred in the evaluation of a point potential in the adaptive FMM of~\cite{carrier:1988:adaptive-fmm}. Table~\ref{tab:starfish-accuracy} also allows us to assess the sharpness of the analysis underpinning Theorem~\ref{thm:gigaqbx-accuracy}. In the regime where the error is dominated by the contributions of FMM acceleration (the upper part of the table), we observe a match between the bound and the behavior of the error in asymptotic behavior, although concrete error values are overestimated by around two orders of magnitude. Table~\ref{tab:starfish-accuracy-old} shows an analogous set of results for the conventional QBX FMM of~\cite{rachh:2017:qbx-fmm}. We find that the conventional QBX FMM is also able to match the error achieved by unaccelerated QBX, albeit at considerably higher $\pfmm$ than our scheme. The relationship between $\pqbx$, $\pfmm$ and the error is more complicated than the simple bound of~\eqref{eq:gigaqbx-sum-bound}. As a matter of fact, only empirical error data were shown in~\cite{rachh:2017:qbx-fmm}. Most poignantly perhaps, for the conventional QBX FMM, the error contribution due to acceleration is \emph{not} bounded by the FMM error incurred in a corresponding point FMM, and the error appears to degrade with increasing QBX order as $\pfmm$ is held fixed. Our scheme exhibits neither of these two issues. The difference in behavior between the two schemes is easily explained. The proofs of Lemma~\ref{lem:m2qbxl} and Lemma~\ref{lem:l2qbxl} give bounds on the error of individual expansion coefficients. Careful study shows that in a generic FMM translation operator, the higher order coefficients are approximated less accurately than the lower order coefficients, e.g.\ in formula~(\ref{eqn:m2qbxl-coeff-estimate}). While this issue in principle applies to both versions of the scheme, the additional geometric restrictions in our version mitigate the impact of this phenomenon by controlling the amplification of this error by a geometric condition. \begin{table}[t] \begin{center} \renewrobustcmd{\bfseries}{\fontseries{b}\selectfont} \newcommand{\converged}[1]{\bfseries #1} \sisetup{ table-format = 1.2e-1, table-number-alignment = center, table-sign-exponent = true, round-mode = places, round-precision = 2, detect-weight = true, mode = text, } \begin{tabular}{S[table-format = 1e-1, round-precision = 0]cScScScSc} \toprule {$(1/2)^{\pfmm+1}$} & $\pfmm$ & {$\pqbx=3$} & \#it & {$\pqbx=5$} & \#it & {$\pqbx=7$} & \#it & {$\pqbx=9$} & \#it\\ \midrule 6.250000e-02 & 3 & 5.327823e-03 & 195 & 4.862228e-03 & 208 & 4.870059e-03 & 206 & 4.874306e-03 & 207\\ & & 2.784340e-03 & & 2.858021e-03 & & 2.837286e-03 & & 2.838429e-03\\ \cmidrule{1-10} 1.562500e-02 & 5 & 2.567355e-03 & 189 & 2.322085e-04 & 188 & 3.130553e-04 & 180 & 3.016992e-04 & 182\\ & & 2.718993e-04 & & 4.867254e-04 & & 4.674446e-04 & & 4.662571e-04\\ \cmidrule{1-10} 4.882812e-04 & 10 & \converged{2.740475e-03} & 192 & \converged{5.450922e-05} & 184 & 1.578803e-05 & 179 & 2.700679e-06 & 183\\ & & \converged{8.263529e-05} & & \converged{1.878212e-05} & & 5.828104e-06 & & 5.095243e-06\\ \cmidrule{1-10} 1.525879e-05 & 15 & \converged{2.740293e-03} & 192 & \converged{5.460141e-05} & 184 & \converged{1.530966e-05} & 179 & 9.336027e-07 & 183\\ & & \converged{8.262717e-05} & & \converged{1.877618e-05} & & \converged{5.114123e-06} & & \converged{2.069277e-06}\\ \cmidrule{1-10} 4.768372e-07 & 20 & \converged{2.740293e-03} & 192 & \converged{5.460216e-05} & 184 & \converged{1.530963e-05} & 179 & \converged{9.259578e-07} & 183\\ & & \converged{8.262718e-05} & & \converged{1.877618e-05} & & \converged{5.114126e-06} & & \converged{2.069277e-06}\\ \bottomrule \end{tabular} \vspace*{1ex}% \caption{% A comparison of relative $\ell^\infty$ errors attained at a set of target points in the solution of an exterior Neumann boundary value problem~\eqref{eq:laplace-bc} using the integral equation~\eqref{eq:ext-neumann-ie} (top row of each segment) with errors attained in the residual of Green's formula on $\gamma_{25}$ (bottom row of each segment). Discretization parameters for both problem types as well as the procedure for obtaining the residual in Green's formula are as in Table~\ref{tab:starfish-accuracy}. Iteration counts for unpreconditioned GMRES are shown in the columns labeled `\#it'. The discrete linear system used the weighting technique of~\cite{bremer_nystrom_2011}. To `manufacture' a reference solution of the BVP, point potentials were evaluated originating from sources at locations $0.75{[\cos\alpha_i,\sin\alpha_i]}^T$ with `charges' randomly assigned according to a standard normal distribution. The angles $\alpha_i$ are given by $\alpha_i=\pi/2+2\pi i/25$ ($i\in\{0,\dots,24\}$). The $\ell^\infty$ norm of the vector of differences between the `manufactured' potentials and the potentials from the BVP solve at the target points at locations $1.5{[\cos(\pi+\alpha_i),\sin(\pi+\alpha_i)]}^T$ was computed and is shown in the table. }% \end{center}% \label{tab:bvp-green-accuracy} \end{table} \begin{table} \newcommand{\cellcenter}[1]{\multicolumn{1}{c}{#1}} \begin{minipage}[t]{0.63\textwidth} \vspace{0pt} \centering \begin{tabular}{crrrrrrr} \toprule \multirow{2}{*}{$n$} & \cellcenter{\multirow{2}{*}{$N_S$}} & \cellcenter{\multirow{2}{*}{$M_C$}} & \multicolumn{5}{c}{Percentiles} \\ \cmidrule{4-8} & & & \cellcenter{20\%} & \cellcenter{40\%} & \cellcenter{60\%} & \cellcenter{80\%} & \cellcenter{100\%}\\ \midrule 5 & 9735 & 572.5 & 349.8 & 414.0 & 518.0 & 810.0 & 1696.0\\ 15 & 52965 & 1001.2 & 567.0 & 696.0 & 913.0 & 1271.0 & 7833.0\\ 25 & 122925 & 1030.2 & 620.0 & 696.0 & 842.0 & 1257.0 & 6775.0\\ 35 & 255255 & 905.6 & 621.0 & 678.0 & 777.0 & 1141.0 & 3809.0\\ 45 & 392040 & 924.0 & 624.0 & 684.0 & 777.0 & 1183.0 & 4229.0\\ 55 & 555390 & 976.7 & 630.0 & 699.0 & 871.0 & 1247.0 & 4459.0\\ 65 & 789360 & 964.3 & 625.0 & 681.0 & 825.0 & 1240.0 & 3909.0\\ \bottomrule \end{tabular} \vspace*{1ex}% \caption{Values of the parameter $M_C$ for various starfish geometries $\gamma_n$ parametrized by $n$. $N_S$ denotes the number of source quadrature points. Shown here are percentiles for the distribution of the number of particles in a square of radius $8/t_f$ around each QBX center. Here, $t_f = 0.9$. $M_C$ denotes the empirical mean of the distribution. }% \label{tab:mc-results} \end{minipage} \hfill \begin{minipage}[t]{0.35\textwidth} \vspace{0pt} \centering \begin{tabular}{lc} \toprule List & Cost \\ \midrule $\ilist{1}{b}$ & $\pqbx n_s n_t$ \\ $\ilist{2}{b}$ & $\pfmm^2$ \\ $\ilist{3close}{b}$ & $\pqbx n_s n_t$ \\ $\ilist{3far}{b}$ & $\pfmm \pqbx n_t$ \\ $\ilist{4close}{b}$ & $\pqbx n_s n_t$ \\ $\ilist{4far}{b}$ & $\pfmm n_s$ \\ \bottomrule \end{tabular} \vspace*{1ex}% \caption{Cost per interaction list entry modeled in Figures~\ref{fig:complexity-gigaqbx} and~\ref{fig:complexity-qbxfmm}, i.e.\ for a single (source box, target box) interaction list pair. $\pfmm$ = FMM order and $\pqbx$ = QBX order. $n_s$ = number of sources in the source box and $n_t$ = number of QBX centers in the target box.}% \label{tab:operation-costs} \end{minipage} \end{table} \begin{figure}[t] \centering \input{complexity-gigaqbx.pgf} \caption{Modeled operation counts for the GIGAQBX~FMM for evaluating the single layer potential on a sequence of `starfish' geometries of increasing particle count. The operations are counted according to the model presented in Table~\ref{tab:operation-costs}. Here, $\nmax = 64$ and $t_f = 0.9$. The mean $\ell^\infty$ error in Green's identity across all runs, scaled by $1/\|u\|_\infty$, was \num{4.97e-05}~for $\pqbx = 3$ and \num{2.97e-06}~for $\pqbx = 7$.}% \label{fig:complexity-gigaqbx} \vspace{1ex} \input{complexity-qbxfmm.pgf} \caption{Modeled operation counts for the conventional QBX FMM of~\cite{rachh:2017:qbx-fmm} for evaluating the single layer potential on a sequence of `starfish' geometries of increasing particle count. The operations are counted according to the model presented in Table~\ref{tab:operation-costs}. Here, $\nmax = 128$. The mean $\ell^\infty$ error in Green's identity across all runs, scaled by $1/\|u\|_\infty$, was \num{5.37e-05}~for $\pqbx = 3$ and \num{3.08e-06}~for $\pqbx = 7$.}% \label{fig:complexity-qbxfmm} \end{figure} \subsection{Cost and Scalability}% \label{sec:scaling-results} Having established that the accuracy of layer potentials evaluated GIGAQBX\ FMM can be understood with the help of easy-to-use estimates and that high levels of accuracy can be achieved, we seek to evaluate several aspects of the computational cost of our algorithm. First and foremost, we examine the scaling behavior of the scheme to large problem sizes. Next, we briefly highlight the cost-accuracy trade-off encountered. Lastly, since our scheme competes with the conventional QBX FMM, we give a cost comparison between the two approaches. For the remainder of this section, we use the same family of `starfish' geometries from~\eqref{eqn:starfish} already familiar to the reader from our accuracy experiments. More specifically, for a fixed value of the `arm count' $n$, we begin with the curve $\gamma_n$ discretized into $50 n$ panels equispaced in the parameter domain with $\pgfmathtruncatemacro{\pgmres}{8+1}\pgmres$ nodes per panel, which was upsampled to $\pgfmathtruncatemacro{\pgmres}{32+1}\pgmres$ nodes per panel. We use values of $n$ ranging from $5$ to $65$ in increments of $10$. Additional refinement in accordance with Section~\ref{sec:qbx-geometry-preprocessing} was applied if necessary. Ultimately, this family of geometries ranged in size from about $1.7 \cdot 10^4$ to about $1.4 \cdot 10^6$ particles, where by `particle' we mean a class of entities including QBX centers, source quadrature nodes, and targets. We choose to employ this family of geometries with increasing complexity over, say, a simpler, growing grid of identical geometries because we expect the resulting scalability data to be credibly applicable to most other scenarios, including those of the growing grid. \subsubsection{Factors Influencing Computational Scalability}% \label{sec:neighborhood-sizes-results} Ideally, we would like to retain linear scaling of computational cost with the size of the geometries, as measured in the number of source quadrature points. Following the discussion of Section~\ref{sec:complexity}, it is not obvious that such scaling necessarily occurs. Recall the definition of the model parameter $M_C$, the main use of which is to provide a worst case bound on the number of direct interactions between source particles and \emph{suspended} QBX centers. The cost of these interactions in the GIGAQBX~FMM is always bounded from above by $O(N_C M_C)$, where $N_C$ is the number of centers. For worst-case particle distributions, this cost is unavoidably quadratic, because $M_C$ can be as large as $N_C$. Linear scaling of the method will only be seen if $M_C$ does not change substantially across different-sized geometries. We expect particle distributions to which our method is applied to originate from discretizations of smooth, non-self-intersecting curves, and these are significantly more regular than an arbitrary particle distribution. Consequently it is conceivable that we will observe behavior considerably more benign than the worst case. Although $M_C$ does not depend on the tree, it is nevertheless not immediately obvious how one might derive a meaningful a-priori bound for $M_C$ for general geometries that may `loop back' on themselves in the way that (say) the starfish geometries do, bringing QBX centers into the proximity of source geometry non-adjacent to their `parent' geometry. To empirically determine the behavior of $M_C$, we wrote a program that counts the number of source particles within $\overline {B_\infty} \left( 8r_c/t_f, c \right)$ for each QBX center $c$. $M_C$ is the mean of these counts. Recall Proposition~\ref{prop:qbx-nn-to-box-nn}, which states that this region is a superset of the $1$-near neighborhood of $\homebox{c}$, which in turn represents the region with which a center may need to interact directly. The results are presented in Table~\ref{tab:mc-results}, including means and percentiles for the distribution of source particle counts. As can be seen in the table, the distribution of particles seems to be heavy-tailed, but with a mean value ($M_C$) of at most 1030 particles, which does not appear be growing as the number of source particles increases. These data are consistent with the observation that $M_C$ should not depend on the number of particles for smooth geometries of adequate refinement. \subsubsection{Experimental Results on Scaling and Comparative Cost}% \label{sec:op-counts-results} In this section, we illustrate the cost of the algorithm with the help of operation counts. To give a machine-independent understanding of the computational cost of our algorithm, we modeled computational cost by attributing an operation count to each entry in the interaction lists. The cost we attributed to an entry in each type of interaction lists is summarized in Table~\ref{tab:operation-costs}. Similarly to the approach of Section~\ref{sec:complexity}, the operation counts thus obtained are intended to roughly correspond with the number of floating point operations required. We chose two FMM/QBX order pairs at which to gather this data for the GIGAQBX~FMM, namely $(\pqbx,\pfmm) = (3, 10)$ and $(\pqbx,\pfmm) = (7, 15)$. These values yield an average of roughly five and six digits of accuracy, respectively. We show modeled operation counts across a number of `arm counts' of the `starfish' geometries, as described. The results are shown in graphical form in Figure~\ref{fig:complexity-gigaqbx}. In addition to the cost for each type interaction list, we also show an overall operation count summing the other contributions, labeled `all'. The costs in Figure~\ref{fig:complexity-gigaqbx} include the performance optimization mentioned in Remark~\ref{rem:far-to-close-mpole-optimization}. Our implementation used a $\ilist{3far}{b}$ interaction only with source boxes having a cumulative source particle count of $15$ or more. In every case, the improvement in cumulative operation counts due to this optimization was no more than $1\%$. Before entering into a discussion of this data, we introduce a second set of data for comparison, based on the conventional QBX FMM of~\cite{rachh:2017:qbx-fmm}. We applied the same cost model to the QBX FMM in order to perform an approximate comparison of the cost of the two algorithms. In order to make the comparison meaningful, we compare the computational cost of the FMMs for achieving a similar level of accuracy on the Green's identity test (Section~\ref{sec:accuracy-results}) with a fixed QBX order. Experiments showed that the (higher) FMM order values of $(\pqbx, \pfmm) = (3,15)$ and $(\pqbx,\pfmm)=(7, 30)$ resulted in accuracies matching the above for the conventional QBX FMM\@. We show graphs of computational cost across geometry sizes analogous to the earlier ones for this data set in Figure~\ref{fig:complexity-qbxfmm}. We have tuned the user-chosen parameters for both algorithms to minimize their cost as measured by our model. (This process is also known as `balancing' an FMM, since it tends to balance various contributions to the cost.) The main parameter amenable to such optimization is $\nmax$, the maximum number of particles per box. We observed that $\nmax$ has different impact on the performance for the two algorithms. Roughly, the GIGAQBX~FMM will benefit from a smaller $\nmax$, as this can potentially decrease the number of direct interactions. In contrast, the conventional QBX FMM benefits from a larger $\nmax$. The main reason this is the case is that this reduces the number of boxes/levels in the tree, and hence the number of multipole-to-local translations. We also observed a noticeable degradation of accuracy for small $\nmax$ in the conventional QBX FMM, which we believe may be related to the effect of $\nmax$ on source/target separation. As a result, we found $\nmax = 64$ for the GIGAQBX~FMM and $\nmax = 128$ for the conventional QBX FMM\@ to yield near-minimal modeled cost. We used $t_f = 0.9$ for the GIGAQBX~FMM\@. The linear scaling of both schemes is evident from the slope of the graphs, with one decade of geometry growth (indicated by the vertical grid lines) leading to one decade of cost growth (indicated by horizontal grid lines). As is typical for schemes based on the FMM, the overall cost is dominated by multipole-to-local translations (List 2/$\ilist{2}{b}$) and direct interactions (List 1/$\ilist{1}{b}$). Additionally, in the GIGAQBX~FMM, List 4 close ($\ilist{4close}{b}$; which consists of direct interactions just like List 1) is also a significant contributor to the cost. The overall operation counts for the two schemes are roughly comparable, with $\pqbx = 7$ more closely matching than $\pqbx = 3$. For $\pqbx = 3$, the GIGAQBX~FMM has on average $1.3 \times$ as many modeled operations as the QBX FMM, but for $\pqbx = 7$, it has about $0.96 \times$ as many. In terms of actual wall times for evaluating the single layer potential, our implementation of the GIGAQBX~FMM is on average $21\%$ slower than conventional QBX FMM for $\pqbx = 3$ and $17\%$ slower for $\pqbx = 7$. As the QBX order increases, we expect the GIGAQBX~FMM to maintain its competitiveness, particularly considering the rapid growth of the FMM orders required to maintain accuracy in the conventional QBX FMM\@. Another factor worth highlighting is that the GIGAQBX~FMM is composed of a larger number of simpler operations on, typically, lower-order expansions (thus with relatively short chains of dependent computations within one translation operation), while the conventional QBX FMM uses fewer higher-complexity operations to translate expansions of higher order. While, according to our results above, these costs are similar for sequential execution, we expect that the GIGAQBX~FMM will be able to make better use of massively parallel computational resources. A number of limitations of this study are evident. Both schemes stand to benefit from standard FMM optimizations that have not been applied, such as, for instance, using translation operators with asympotically improved costs~\cite{hrycak:1998:improved-2d-fmm}. Additionally, tuning for the specific hardware was was not applied when measuring the wall time. Nevertheless, the results in this section suggest that the two schemes are competitive in terms of cost. \section{Conclusions and Future Work}% \label{sec:conclusions} In this paper, we have presented a fast algorithm for Quadrature by Expansion for which we have also supplied analytical accuracy estimates. This algorithm is compatible with (and builds upon) previous work designed to control for truncation and quadrature error in QBX~\cite{rachh:2017:qbx-fmm}. Unlike this and other work on accelerated global QBX, we are able to prove \emph{strong accuracy guarantees} for our fast high order QBX scheme while retaining a cost comparable with or cheaper than previous schemes. We have demonstrated the viability of our approach through numerical experiments. Lastly, we have provided a set of sufficient conditions under which the algorithm exhibits linear scaling and also shown that in practice the algorithm scales linearly on complicated geometries. Traditional hierarchical algorithms developed for $n$-body problems have considered \emph{point} (i.e., zero-dimensional) sources and targets. An important feature of our work is the recognition that local expansions behave like `targets with extent' from the point of view of the accuracy of translation operators. It is possible to view this work purely in this context, removed from QBX\@: As a fast algorithm that permits targets with extent. Many exciting avenues for future work open up building upon this contribution: First, the cost estimates of Section~\ref{sec:complexity} are inherently pessimistic because they do not leverage very much information about the particle distribution. Furthermore, they are also conservative when it comes to constants. Sharpening these estimates, perhaps with a more detailed understanding of the typical particle distribution of a source curve, will help provide a better understanding of the cost of our algorithm along with ideas to reduce said cost. Another direction of work is to apply the techniques of the error analysis used in this paper in order to understand analytically the accuracy behavior for the global QBX FMM of~\cite{rachh:2017:qbx-fmm}. Preliminary results along these lines are encouraging. Lastly, we are in the process of extending the FMM developed in this paper to more kernels in two and three dimensions, with the goal of providing black-box, fast, and accurate layer potential evaluation for any kernel for which FMM translation infrastructure is available. \section*{Acknowledgments} The authors' research was supported by the National Science Foundation under grants DMS-1418961 and DMS-1654756 and by the University of Illinois. Part of the work was performed while the authors were participating in the HKUST-ICERM workshop `Integral Equation Methods, Fast Algorithms and Their Applications to Fluid Dynamics and Materials Science' held in 2017. \printbibliography{} \end{document}
\section{Introduction} Given that black holes and human brains exhibit extraordinary memory storage capacities, it is natural to ask whether these systems share some very basic mechanism of the enhanced capacity of the information storage \cite{Gia}. Needless to say, a potential identification of such similarities, would be mutually beneficial for both fields of research. Obviously, the final answer requires the involvement of biology, which is beyond our expertise. However, we can attempt to do a physicist part of the job. A step in this direction was undertaken in \cite{Gia}, where a general mechanism \cite{DG} - originally proposed for the explanation of an enhanced memory capacity in black holes - was applied to the framework \cite{kak} of quantum neural networks and was shown that it leads to an exponential enhancement of pattern storage and recognition capacities. The idea is that by allowing the excitatory synaptic connections among the set of neurons to be {\it gravity-like} - in the sense of a negative interaction energy - the network gives rise to a critical state with an exponentially enhanced memory storage capacity. This state is achieved due to the following effect. A high excitation level of some neurons - due to their negative synaptic connections with others - lowers to zero the excitation threshold energies for the latter neurons, thereby making is possible to store an exponentially large number of patterns within an infinitesimally narrow energy gap. Moreover, the patterns stored in such states can be redialed under an influence of arbitrarily soft external stimuli. \\ The general message is that for gravity-like synaptic connections in a quantum neural network the information storage mechanisms can become potentially richer than in more conventional approaches. Instead of storing patterns in the local minima of the energy function, as, for example, in usual treatments of the Hopfield model \cite{Hopfield}, the enhanced memory points can be identified among the highly excited critical states, where set of neurons becomes gapless. \\ In this paper we shall attempt to take one more step and try to see if a neural network can possess some additional informational characteristics that are usually considered to be the defining properties of black holes, such as the Bekenstein's area law entropy \cite{Bek}. \\ In constructing such a network, we shall use the synergy of the ideas displayed in \cite{Gia} and \cite{AREA}. In the latter work it was shown that a theory of a quantum field inhabiting a $d$-dimensional sphere and experiencing an angular-momentum-dependent attractive interaction exhibits a sharp enhancement of memory storage capacity in a critical state in which the lowest angular momentum mode is macroscopically excited. This excitation lowers the energy thresholds of the higher angular momentum modes, so that the theory delivers a set of the gapless modes with their number scaling as the area of a $d-1$-dimensional sphere. The micro-states of these modes house an exponentially large number of patterns, with the corresponding entropy given by the area of the same $d-1$-dimensional sphere. \\ The quantum brain network that we shall construct in the present paper is nothing but a neural network implementation of the same model. This is achieved by means of identification of the neuron-describing degrees of freedom with the number operators of the angular harmonics of the quantum field. Such mapping provides a way in which the sense of locality and geometry can be brought into something intrinsically non-local, such as the neural network. \\ However, in our construction we shall not simply copy the quantum field model, but rather arrive to the desired neural network by a bottom-up approach. For this purpose we design a neural network in which the synaptic connections are closer cousins to the gravitational interaction as compared to the ones studied in \cite{Gia}. Namely, we study a network in which the synaptic connections $\hat{W}_{kr}$ among the pairs of neurons $(k,r)$ are energetically negative and also proportional to the products of their energy thresholds. \\ Again, as in the case of \cite{Gia}, we observe that such a network exhibits a critical state in which a set of would-be-high-threshold neurons becomes effectively gapless. Correspondingly, in this set of neurons the network can store an exponentially large number of patterns within an arbitrarily narrow energy gap. \\ The entropy of the resulting micro-states depends on the symmetry structure of the network. We show that, when we impose a symmetry group of a $d$-dimensional sphere, a set of the gapless neurons emerges with their number equal to an area of a $d-1$-dimensional sphere of the same radius. Correspondingly, the micro-state entropy of the patterns encoded in the excitations of the emergent gapless neurons also scales as the area of the same $d-1$-dimensional sphere. \\ Thus, it appears that the neural network - when translated in quantum field theoretic language - can exhibit some intrinsic {\it holographic} properties, such as, the emergence of the gapless neurons inhabiting a lower dimensional surface with the resulting micro-state entropy that scales as the corresponding area. This is something highly reminiscent of gravitational systems, such as, the black holes \cite{Hologram} or the AdS space \cite{ADS1,ADS2,ADS3}. \\ \section{dictionary} In order to import certain ideas from black holes to the neural networks, we need to establish a dictionary. First, we need to connect the basic degrees of freedom in the two systems. Let us first ask, what are the black holes from the quantum field theoretic point of view? Although a fully-satisfactory quantum description of black holes is still missing, it is reasonably clear that they represent the states in a Hilbert space of quntized fields. We shall not question this statement. Our task thus boils down to the need of establishing a dictionary between the states of the qiantum fields and the states of the quantum neural networks. In quantum field framework the elementary degrees of freedom are the quantum oscillators describing the different momentum (and spin/helicity) modes of the field. On the other hand, in a neural network the elementary degrees of freedom are the excitations of neurons. We shall represent both of these entities by the creation and annihilation operators $\hat{a}_k^{\dagger}, \hat{a}_k$, that satisfy the usual algebra, \begin{equation} [\hat{a}_r,\hat{a}_k^{\dagger}] = \delta_{rk}\,, \, \, [\hat{a}_r,\hat{a}_k] = [\hat{a}_r^{\dagger},\hat{a}_k^{\dagger}] =0\,, \label{algebra} \end{equation} where $k$ and $r$ are the labels. In case of a quantum field they identify the various momentum (or angular-momentum) modes, whereas in a neural network they represent the labels of the neurons. The excitation level of a neuron $k$ in a given quantum state is described by an eigenvalue (or an expectation value) of the corresponding number operator $\hat{n}_k \equiv \hat{a}_k^{\dagger}\hat{a}_k$. Thus, the basic states of a neural network are the Fock states $\ket{n_1,n_2,.....}$ labeled by the excitations levels of different neurons. Since on the quantum field theory side the analogous number operators describe the occupation numbers of respective momentum modes, the excitation level of a neuron is translated as the occupation number of a particle mode. \\ Next thing is the interaction. The quantum neurons influence each other through the synaptic connections, which can be represented as an operator with two or more indexes, $\hat{W}_{kr}$. When it is energetically favorable for the two neurons $k$ and $r$ to simultaneously be in the excited states, we shall call the synaptic connection {\it excitatory} in the {\it energetic sense}. Correspondingly, in the opposite case we refer to the connection as {\it inhibitory}. For the quantum field this translates as the interaction energy between the two modes $k$ and $j$ being negative (attractive) or positive (repulsive). \\ Now, the gravitational interaction among the particle modes is attractive and its strength is set by their energies. Thus, in order to imitate gravity-like connections among the neurons, we shall make the synaptic connection among the two neurons $k$ and $r$ negative (excitatory) and moreover proportional to the product of their threshold energies \begin{equation} \hat{W}_{kr} \propto - \epsilon_k\epsilon_r\,. \label{product} \end{equation} Next, we need to come up with some rough guideline telling us for what type of states we should be looking for in the neural network. This guideline is very simple. From, the quantum field theoretic perspective defined on Minkowski space, The Fock vacuum corresponds to a zero occupation number of all the modes, $\ket{vac} = \ket{0,0,.....}$. The black hole state is certainly not a Fock vacuum, but rather some highly excited state. Indeed, to form a macroscopic black hole of certain size $R$, we need to produce a very high occupation number of the low momentum quanta, localized within that region of space. In general, even in a pure gravity theory, a macroscopic black hole effectively consists of many quanta due to a high occupation number of the constituent soft gravitons that form its gravitational field \cite{GCNNN}. For our purposes, this very crude guideline will be enough. This guideline is telling us that with the black hole analogy, we need to look for a state of high memory storage capacity among the states in which some of the low-threshold neurons are highly excited, i.e., corresponding quantum oscillators have the high occupation numbers. \\ To summirize, we establish the following dictionary: \begin{itemize} \item Particle momentum mode $\leftarrow \rightarrow$ Neural degree of freedom; \item Ocillator energy gap $\leftarrow \rightarrow$ Excitation energy threshold of neuron; \item Mode occupation number $\leftarrow \rightarrow$ Excitation level of neuron; \item Gravitational interaction among particles $\leftarrow \rightarrow$ Excitatory synaptic connection among neurons; \item Black hole state $\leftarrow \rightarrow$ Critical state of highly excited low threshold neurons. \end{itemize} The above dictionary gives us a rough idea that in a neural network designed by the above rules, we should encounter a state of an enhanced memory storage capacity in form of a state in which some of the lowest threshold neurons are highly excited. As we shall see, this is indeed the case. \\ Finally, we would like to comment that our main goal is to reach a maximal energy efficiency of the memory storage, as well as, the efficiency of the response to the input external patterns. We shall not be interested in implementation of the learning algorithms and other computational tasks in the quantum neural networks. \section{Network} Consider a quantum neural network where neurons are labelled by a set of integers $k_1,...k_d$, which we shall briefly denote by $k$. Each neuron corresponds to a quantum degree of freedom represented by the creation and annihilation operators $\hat{a}_k^{\dagger}, \hat{a}_k$. They satisfy the commutation relations (\ref{algebra}), where $k$ and $r$ denote the two sets $k_1,...k_d$ and $r_1,...r_d$ respectively, and $ \delta_{rk} \equiv \delta_{r_1k_1}\delta_{r_2k_2}... \delta_{r_dk_d}$. \\ The Hamiltonian of the network has the following form, \begin{equation} \label{HA} \hat{H} = \sum_k \epsilon_k \hat{a}_k^{\dagger}\hat{a}_k - \sum_{k,r} \hat{a}_k^{\dagger} \hat{W}_{kr} \hat{a}_r \end{equation} where the summation is taken over all sets. Here $\epsilon_k$ is the threshold energy required for the excitation of the neuron $k$. An each level $\epsilon_k$ exhibits a certain degeneracy ${\mathcal N}_k$ due to a symmetry structure of the network that we shall discuss below. The Hamiltonian (\ref{HA}) can be viewed as a generalized quantum version of the Hopfield model \cite{Hopfield}, but with some important modifications that we shall now specify. \\ The operator $\hat{W}_{kj}$ is a synaptic matrix operator. The idea is to choose it to be {\it gravity-like}: \begin{equation} \label{WW} \hat{W}_{kr} \equiv {\epsilon_k \epsilon_r \over 2\Lambda} \left(3 - {\epsilon_k \epsilon_r \over \epsilon_*^2} \right ) \sum_{s,q} C_{skqr} \hat{a}_s^{\dagger} \hat{a}_q\,, \end{equation} where $\Lambda$ is a parameter of dimensionality of energy, whereas $C_{skqr}$ are dimensionless coefficients that determine the structure of the synaptic connections. They will be specified later. The relative factor $3$ in the brackets is introduced for convenience. \\ The parameter $\epsilon_*$ determines the critical level $k_*$, which represents the turning point. From (\ref{WW}) it is clear that the synaptic connection energy among the neurons changes sign at $\epsilon_{k}\epsilon_{r} = 3 \epsilon_*^2$. The over-all sign will be normalized in such a way that the connection energy is negative for $\epsilon_{k}\epsilon_{r} < 3\epsilon_*^2$. Thus, in this regime, the connections are {\it excitatory in the energetic sense}. That is, an excitation of one nauron makes it energetically favourable to excite others. In other words, an excitation of a given neuron, lowers the excitation thresholds of all the other neurons connected to the former neuron. Correspondingly, in the opposite regime, $\epsilon_{k}\epsilon_{r} > 3\epsilon_*^2$, the connection energy becomes positive. This fact guarantees that the energy of the network is bounded from below. Indeed, for $\epsilon_{k}\epsilon_{r} > 3\epsilon_*^2$ the synaptic connection becomes inhibitory, thereby preventing the network from instability. An example of a neural network for a particular choice of $C_{skqr}$ is depicted on Fig.\ref{EXnet}. \begin{figure} \begin{center} \includegraphics[width=0.53\textwidth]{Gia_Bnet_1.pdf} \caption{The neural network example for six neurons and the choice $C_{skqr} = \begin{cases} \delta_{sr}\delta_{kq} & \text{for} ~ k\neq r, \\ 0 & \text{otherwise} \end{cases} $. For definiteness, the regime $\epsilon_{k}\epsilon_{r} \ll \epsilon_*^2$ is assumed. The neurons are represented by white circles. The red lines represent the inhibitory biases due to the positive threshold energy gaps, whereas the black lines represent the excitatory connections due to the energetically negative couplings. The strength of the excitatory connection is proportional to the product of the corresponding threshold energies and is expressed through the thickness of the corresponding synaptic lines. } \label{EXnet} \end{center} \end{figure} \\ Notice, the above synaptic connection among the neurons, in the excitatory regime, is analogous to a gravitational interaction among particles. Therefore, such a setup represents a most naive way of bringing a {\it gravity-like} dynamics into the neural networks. However, as we shall see, despite its simplicity, it suffices for generating an exponential enhancement of memory storage and pattern recognition capacities with the corresponding entropy that obeys an area law. \\ We shall now impose a spherical symmetry on the structure of the neural network. We shall do this in the sense of a Fourier-transform, by assuming $C_{skqr} \equiv \int d^d\Omega Y_{s}^* Y_{k}^*Y_{q}Y_{r}$, where, $Y_k(\theta_a)$ are the harmonic functions on a $d$-dimensional unit sphere, with the set of angular coordinates $\theta_a,~a=1,...d$, a volume element $d^d\Omega$ and a total volume $\Omega$. Correspondingly, the label $k$ stands for a set of $d$ integers, i.e., $Y_k \equiv Y_{k_1,...,k_d}$, which satisfy, $|k_1|\leqslant k_2 \leqslant ...\leqslant k_d = 0,1,...,\infty$. These spherical harmonics form a complete orthonormal set. In particular: $\int d^d\Omega \, Y_k^*Y_{r} = \delta_{kr}$. The functions $Y_k$ represent the eigenfunctions of the covariant Laplace operator on the $d$-sphere of radius $R$, \begin{equation} \Delta Y_k\, = - {k_d(k_d + d-1) \over R^2} Y_{k} \, , \label{eigen} \end{equation} where each eigenvalue $k_d(k_d + d-1)$ exhibits the following degeneracy: $ {\mathcal N}_k = \sum_{k_{d-1}=0}^{k_{d} } \sum_{k_{d-2}=0}^{k_{d-1}}...\sum^{k_2}_{k_{1} = - k_2} \sim (k_d)^{d-1}$. Thus, in this description the neural modes $\hat{a}_k^{\dagger}, \hat{a}_k$, represent the creation and annihilation operators for the angular harmonics corresponding to a given set $k$. The correspondence between the threshold energies $\epsilon_k$ and the angular-momentum levels is enforces by the spherical symmetry through the relation: \begin{equation} \label{dictionary} \epsilon_k \equiv \kappa {k_d(k_d + d-1) \over R^2}\, \end{equation} where $\kappa$ is a parameter of the network, with the dimensionality $[\kappa] = [energy] \times [distance]^2$. For the compactness of notations, we shall absorb it into the redefinition of $\Delta$. \\ The above setup allows us to identify the different neurons with the corresponding angular momentum modes of a non-relativistic quantum field $\hat{\psi}(\theta_a)$ living on a $d$-dimensional sphere. That is, \begin{equation} \hat{\psi} = \sum_{k} \, Y_k(\theta_a) \hat{a}_k \,. \label{expansion} \end{equation} The description of the neural network in terms of Fourier components of a local field, allows to give a geometric interpretation to something intrinsically non-local. Indeed, neurons interact non-locally: Everybody talks to each other according to the rules determined by the synaptic connections, with no real sense of local geometry. \\ However, the sense of geometry is provided by the concept of a quantum field. Indeed, while the interaction of the quantum fields in position space is local, in momentum space it is not. The fact that the neurons are translated into the momentum modes, shows how to connect them to geometry. \\ In terms of a quantum field the Hamiltonian of the network (\ref{HA}) can be written in the following form: \begin{eqnarray} \label{H1} && \hat{H} = \int d^d\Omega \,\, \Big[- \hat{\psi}^{\dagger} \Delta \hat{\psi}\, - \, {3 \over 2\Lambda} \, (\hat{\psi}^{\dagger} \Delta \hat{\psi}^{\dagger}) (\hat{\psi} \Delta \hat{\psi})\, + \nonumber \\ && + \, {1 \over 2\Lambda\epsilon_*^2} \, (\hat{\psi}^{\dagger} \Delta^2 \hat{\psi}^{\dagger}) (\hat{\psi} \Delta^2 \hat{\psi}) \Big]\,. \end{eqnarray} This Hamiltonian represents the model of \cite{AREA}, which describes a non-relativistic bosonic quantum field living on a $d$-dimensional sphere and experiencing an angular momentum dependent attractive interaction. As shown in \cite{AREA}, this system possesses a critical state with exponentially enhanced memory capacity and the micro-state entropy that scales as the area of a lower dimensional sphere, $S_{d-1}$, of the same radius. \\ Not surprisingly, the above property translates into an analogous property of the neural network, once we map the angular harmonics onto neuron degrees of freedom. In order to see this, we can simply repeat the analysis of \cite{AREA}, which is ready-made for our purposes. \\ The critical state of an enhanced memory capacity is reached due to the high excitations (i.e., the high occupation numbers) of some of the neurons, which - due to the excitatory synaptic connections - lowers the excitation thresholds for others. We choose the highly excited neuron to be the one with the lowest energy threshold. This corresponds to $k=0$ harmonics. \\ We thus focus our attention on the states in which only the $k=0$ neuron is highly excited, with the excitation level given by a large occupation number of the zero mode $\langle \hat{a}_0^{\dagger} \hat{a}_0 \rangle = N_0 \gg 1$. In order to derive the effective Hamiltonian on such a state, we can effectively replace the operators $\hat{a}_0^{\dagger}, \hat{a}_0$ by the $c$-numbers, $\hat{a}_0^{\dagger} = a_0 \,,~ \hat{a}_0 = a_0^*$, with $|a_0|^2=N_0 $. That is, we are using the Bogoliubov approximation \cite{bogoliubov} for the quantum neural network. The existence of a critical state with an increased memory capacity can be cleanly demonstrated in a double-scaling limit. Following \cite{AREA}, we take \begin{equation} N_0 \rightarrow \infty\,, ~ ~ \Lambda \rightarrow \infty \,, ~~ {N_0 \over \Lambda} = {\Omega \over \epsilon_*} ={\rm finite} \,. \label{doublescale} \end{equation} In this limit in (\ref{WW}) only the terms with $s=q=0$ and $k=r\neq 0$ survive, because of the following reasons. First notice, the terms with either $k$ or $r$ zero, vanish due to accompanying $\epsilon_k$ and $\epsilon_r$ coefficients. Next, the terms with either $s$ or $q$ non-zero scale as ${1 \over \sqrt{N_0}}$, whereas the terms with both $s$ and $q$ nonzero scale as ${1 \over N_0}$. Finally, we use the property $C_{0k0r} = {\delta_{kr} \over \Omega}$. Thus, in the double scaling limit the Hamiltonian takes the following form: \begin{equation} \hat{H} = \sum_{k} \omega_k \hat{a}_k^{\dagger}\hat{a}_k \, + \, {\mathcal O}\left({1\over \sqrt{N_0}}\right )\,, \label{HAL} \end{equation} where, \begin{equation} \omega_k \equiv {\epsilon_k \over 2} \left( {\epsilon_k \over \epsilon_*} - 1\right)^2 \left( {\epsilon_k \over \epsilon_*} + 2\right)\,. \label{GAP} \end{equation} Thus, we arrive to a one-parameter family of neural networks labeled by the critical level $\epsilon_*$. The Hamiltonian is semi-positive-definite and touches zero only for $\epsilon_k=0$ and $\epsilon_k = \epsilon_*$. The first point simply reflects the gaplessness of the zero angular-momentum mode and exhibits no interesting degeneracy. The second point is the most interesting. This point shows that the threshold energies for all the neurons with $k \in k_*$ collapse to zero. That is, they become exactly {\it gapless}. The number of gapless neurons is equal to the degeneracy of the eigenvalue $ \epsilon_k = \epsilon_*$, which is given by $N_{gapless} = {\mathcal N}_{k_*} \sim k_*^{d-1}$. This quantity scales as an area of a $d-1$-dimensional sphere: \begin{equation} N_{gapless} \, = \, \left ( {R \over L_*} \right )^{d-1} \, . \label{Nmodes} \end{equation} where $L_* \equiv \sqrt{\kappa \over \epsilon_*}$. It is convenient to relabel the gapless neurons $k \in k_*$ by an additional index $\gamma$ as $\hat{a}_{k_*\gamma}^{\dagger} \,, \hat{a}_{k_*\gamma}$, where the new index takes the values $\gamma = 1,2,...,N_{gapless}$. The corresponding number operators shall be denoted by $\hat{n}_{*\gamma} \equiv \hat{a}_{k_*\gamma}^{\dagger}\hat{a}_{k_*\gamma}$. \\ In the same time, as it is clear from (\ref{GAP}), all neurons with $k \neq k_*$ (except $k =0$) have positive and large energy gaps $\omega_k$. Therefore, the storage of information in such neurons is very costly in energy. Because of this reason, they shall not be counted in the estimate of the memory storage capacity of the system. \section{Micro-States} The patterns can be stored in the set of the basic states, in which the excitation levels of the $k \in k_*$-neurons assume different possible values on an interval, $0 \leqslant\langle \hat{n}_{*\gamma} \rangle < n$, where $n$ is some maximal value. The basis can be conveniently chosen, for example, in form of the number-eigenstates or the coherent states of the gapless modes. \\ The number eigenstate basis is represented by the Fock space ket-vectors of the form, \begin{equation} \label{nstate} \ket{n_{*1} , n_{*2},...n_{*N_{gapless}}} \end{equation} where, $0 \leqslant n_{*\gamma} < n$ are the eigenvalues of $ \hat{n}_{*\gamma}$-operators. The number of such micro-states is equal to ${\mathcal N}_{states} = n^{N_{gapless}}$, with the corresponding micro-state entropy given by, \begin{equation} {\rm Entropy} \, \sim \, \left ( {R \over L_*} \right )^{d-1} ln(n) \, . \label{ENTR} \end{equation} Notice, in the double-scaling limit (\ref{doublescale}), $n$ can be taken arbitrarily large at no cost in energy, because in this limit the interaction terms vanish and $k \in k_*$ modes are exactly gapless. However, in reality, the value of $n$ will be restricted by the following effects. \begin{enumerate} \item First, irrespective of the value of $N_0$, the value of $n$ will be constrained by the resolution capacity of a reading device that retrieves and decodes the stored patterns from the memory of the network. \item Secondly, $n$ will become restricted by the finite-$N_0$-effects as soon as we move away from the double-scaling limit. \end{enumerate} Notice, since the Hamiltonian (\ref{H1}) conserves the total particle number, the micro-states are split into the super-selection sectors according to this number. The degenerate micro-states are obtained by the small redistributions of the total occupation number $N_0$ among the zero mode, $k=0$, and the rest of the gapless modes, $k \in k_*$. That is, in the states given by (\ref{nstate}), the occupation number of the zero mode is replaced by, $N_0 \rightarrow N_0 - \sum_{\gamma=1}^{N_{gapless}} n_{*\gamma}$, in order to keep the total particle number intact.\\ In the double-scaling limit (\ref{doublescale}), since $N_0=\infty$, such a re-adjustment of $N_0$ causes no back-reaction on the energy gaps, for any finite value of $n$. Correspondingly, there is no restriction on $n$, and the number of micro-states diverges as $log(n)$ for large $n$. However, for a finite $N_0$, such a redistribution will lead to the small-but-finite level-splittings among the different micro-states. This will restrict the value of $n$ from above. However, this level-splittings will be suppressed by powers of $1/N_0$ and can be made arbitrarily small by taking large enough $N_0$. Also, for any large-but-finite number $N_0$, there will be a maximal number $n$ beyond which the interaction terms shall become important and shall start costing a high energy. The good news is that all the above effects can be kept under control at large $N_0$. \\ In addition, due to the conservation of the angular momentum, the micro-states split into the super-selection sectors corresponding to the different values of the total angular momentum. \\ Finally, let us comment that an alternative basis for the information storage can be formed by the coherent states of the gapless modes, instead of their number eigenstates. Such states, $\ket{\alpha_{*1},..., \alpha_{*N_{gapless}}}$, are the eigenstates of the destruction operators $\hat{a}_{*\gamma}$ and shall be labeled by the set of the corresponding complex eigenvalues $\alpha_{*\gamma}$, \begin{equation} \label{coherent} \hat{a}_{*\gamma}\ket{\alpha_{*1},..., \alpha_{*N_{gapless}}} = \alpha_{*\gamma} \ket{\alpha_{*1},..., \alpha_{*N_{gapless}}} \, . \end{equation} Here $\alpha_{*\gamma}$ are the complex parameters that among other properties, satisfy the obvious relation $|\alpha_{*\gamma}|^2 = \langle \hat{n}_{*\gamma} \rangle$. The two coherent states are almost orthogonal provided they satisfy $ \sum_{\gamma}|\alpha_{*\gamma} - \alpha_{*\gamma}'|^2 \gg 1$. Such a set of the coherent states is approximately classical, provided the mean occupation numbers are large, i.e., $|\alpha_{*\gamma}| \gg 1$. The storage of information in the coherent states is especially useful for generalizing the phenomenon of the critical enhancement of memory to the classical brain networks, as discussed in \cite{Gia}. In such a case, from the information storage point of view, the neural network becomes equivalent to the set of classical harmonic oscillators of very low frequencies, with the patterns being stored in their amplitudes and the phases. \section{Response to External Patterns} Not surprisingly, the neural network in the above critical state can respond - with maximal precision - to an arbitrarily soft input stimuli. We can briefly repeat the analysis of \cite{Gia} for the present network. For this purpose, we shall introduce a new layer of neurons with corresponding creation/annihilation operators, $\hat{b_k}^{\dagger}, \hat{b_k}$, satisfying the usual commutation relations, $ [\hat{b_r},\hat{b_k}^{\dagger}] = \delta_{rk}\,, \, \, [\hat{b_r},\hat{b_k}] = [\hat{b_r}^{\dagger},\hat{b_k}^{\dagger}] =0,$ and commuting with $\hat{a_k}^{\dagger},\hat{a_k}$-operators. We shall assume that a pattern encoded in an initial state of $b$-neurons is transmitted to $a$-neurons through the synaptic connections. The response efficiency will be measured by its precision, i.e., by how accurately the state of $a$-neurons can reproduce an input pattern. Thus, $b$ and $a$ modes play the roles of the input and the output layer neurons respectively. We are specifically interested in the {\it energy efficiency} of the response, i.e., a situation in which the output layer $a$ is capable of accurately responding to the external patterns of a very low energy. For simplicity, we shall couple the input and the output layer neurons via the diagonal synaptic connections. \\ If we represents the $b$-neurons as the angular momentum modes of a quantum field \begin{equation} \hat{\chi} = \sum_{k} \, Y_k(\theta_a) \hat{b}_k \,, \label{expansion} \end{equation} the coupling between the $a$ and $b$ neurons can be written in a compact way as \begin{equation} \hat{H}_{ab} = - \int d^d\Omega \, q (\hat{\psi}^{\dagger} \hat{\chi}\, + \hat{\chi}^{\dagger} \hat{\psi})\, + \kappa' \hat{\chi}^{\dagger} \Delta \hat{\chi}\,, \label{HCHI} \end{equation} where $q$ and $ \kappa'$ are parameters. Rewriting in momentum space, we get, \begin{equation} \hat{H}_{ab} = q \sum_{k \in k_*} (\hat{b}_k^{\dagger} \hat{a}_k + \hat{a}_k^{\dagger} \hat{b}_k ) + \epsilon_b \sum_{k \in k_*} \hat{b}_k^{\dagger}\hat{b}_k \, + \, ..., \label{HX} \end{equation} where, $\epsilon_b$ measures the energy gap for the minimal excitation level of the input neurons, and $q$ parameterizes the strength of the synaptic connection between the input and the output neurons. Since we wish the input stimulus to be very soft, we shall take both $\epsilon_b$ and $q$ to be very small. Notice, because the $a$-neurons with $k \notin k_*$ have very high energy thresholds, they play no role in recognition of patterns fed by the soft external stimuli carried by $b$-neurons. Therefore, $k \notin k_*$ modes of $b$-neurons were disregarded in (\ref{HX}). So the sum only runs over the modes belonging to the critical level $k\in k_*$ and over the corresponding modes from the $b$-sector. For convenience, we shall label the latter $b$-modes by the same index $\gamma$ as the gapless $a$-modes: $\hat{b}_{*\gamma} \in \hat{b}_{k_*}$, where $ \gamma =1,2,...N_{gapless}$. \\ The interaction Hamiltonian (\ref{HX}) ensures that a pattern - initially encoded in the state of $b$-neurons - will get transmitted to $a$-neurons. The accuracy of the response is determined by how precisely the output state of $a$-neurons copies the input pattern of $b$-neurons. In the same time, the energy cost-efficiency of recognition is measured by the lower bound on the softness of the recognized input pattern. \\ Intuitively it is clear that the critical state must exhibit a maximal energy-cost-efficiency of recognition, since the gapless $a$-modes are able to align to an external pattern at an arbitrarily low energy cost. Indeed, let the initial input pattern be given by some {\it coherent} state of the $b$-modes $\ket{in}_b \equiv \ket{\beta_{1},... \beta_{N_{gapless}}}$, i.e., $\hat{b}_{*\gamma} \ket{in}_b = \beta_{\gamma} \ket{in}_b$, where $\beta_{\gamma}$ are the complex eigenvalues. Thus, the original pattern is encoded in form of the expectation values of the occupation numbers of $b$-neurons, with the pattern vector being $(|\beta_1|^2, |\beta_2|^2, ...,|\beta_{N_{gapless}}|^2)$. Let the initial state of gapless $\hat{a}_{*\gamma} $-neurons be given by their Fock vacuum $\ket{in}_a = \ket{0,0,0,...0}$ of the critical state. \\ The time-evolution of the state vector of the entire system is given by $\ket{t} = e^{-{i\over \hbar} \hat{H}_{ab}t }\ket{in}_b\otimes\ket{in}_a$, where we took into the account the double-scaling limit and the fact that the rest of the Hamiltonian stays zero throughout the evolution. It is easy to obtain the time-evolution of the expectation values of the excitation levels of $a$-neurons. For example, for $\epsilon_b=0$, we have \cite{giamischa},\cite{Gia}: \begin{equation} \bra{t} \hat{a}_{*\gamma}^{\dagger} \hat{a}_{*\gamma} \ket{t} \, = |\beta_{\gamma}|^2 {\rm sin}^2\left ({tq \over 2\hbar}\right ) \, , \label{evol1} \end{equation} Thus, after time $t={\pi \hbar\over q}$, the state of output $a$-neurons, copies the input pattern of $b$-neurons. In other words, the information can be encoded (or retrieved) at arbitrarily small energy cost. Due to criticality, the neural network is sensitive to arbitrarily soft external stimuli. \\ \section{Discussions} We have seen that a quantum brain network with the gravity-like synaptic connections can acquire a very high complexity and an ability to store an exponentially large number of patters within a narrow energy gap. Assuming a spherically symmetric structure of the synaptic connections, the entropy of the critical states obeys the area low. In such a state the network delivers a set of the gapless neurons that inhabit a sphere of one dimension less. The identification of neurons with the angular-momentum modes of a quantum field gives a well-defined geometric meaning to the neural network. \\ The considered phenomenon of the critical memory enhancement has a smooth classical limit and can thereby take place is classical neural networks. We have seen this explicitly by storing patterns in the coherent states of the gapless modes (\ref{coherent}). In the regime in which their mean occupation numbers are large, the states are effectively classical. The detailed discussion of classicality goes exactly as in \cite{Gia} and will not be repeated here. \\ The above features may serve as a supporting evidence that some version of black hole information storage may be taking place within classical brains. \\ Finally, we wish to stress that by no means our result should be interpreted as an indication that the real quantum gravity effects play any role in memory storage in biological brains. Such suggestions have been made in the past \cite{Nanopoulos} and have been partially addressed by \cite{tegmark}. This is not the question we are trying to discuss. \\ Our idea is fundamentally different. Following \cite{Gia}, we suggest that the enhanced memory capacity mechanism that operates in black holes is very general in its essence and goes beyond the gravitational systems. Moreover, it possess a well-defined classical counterpart. Correspondingly, this mechanism can be operative in the brain networks, both quantum and classical. \\ The key is the phenomenon of criticality that takes place in systems with gravity-like synaptic connections among the bosonic degrees of freedom that can be in highly excited (highly occupied) states. In such states many gapless modes emerge. For a certain symmetry structure of the network, the gapless modes appear to inhabit a lower dimensional surface area, thereby displaying a holographic behaviour. \section*{Acknowledgements} We thank Lasha Berezhiani, Allen Caldwell, Cesar Gomez, Tamara Mikeladze-Dvali and Sebastian Zell for discussions. An exchange on \cite{AREA} with Oliver Janssen is acknowledged. It is a pleasure to point out an ongoing communication with Dmitri Rusakov and Leonid Savchenko about realistic neural networks. This work was supported in part by the Humboldt Foundation under Humboldt Professorship Award, ERC Advanced Grant 339169 "Selfcompletion", by TR 33 "The Dark Universe", and by the DFG cluster of excellence "Origin and Structure of the Universe".
\section{Introduction} \label{sec::introduction} It is well established that coding is necessary to optimally use wireless broadcasting for information transfer. The index coding framework, in particular, exemplifies the benefits of coding when using broadcast channels. In fact, by leveraging their side information, the requests of multiple clients can be simultaneously satisfied by a set of coded broadcast transmissions, the number of which could potentially be much smaller than uncoded information transfer~\cite{bar2011index}. However, as we observed in~\cite{karmoose2017private,karmoose2017preserving}, coding also poses privacy concerns: by learning the coding matrix, a curious client can infer information about the identities of the side information and request of other clients. In this paper, we build on the work in \cite{karmoose2017private,karmoose2017preserving} with the goal to offer improved constructions and bounds that enable to balance the trade-off between privacy and efficient broadcasting. In an index coding setting, a server with $m$ messages is connected to $n$ clients via a lossless broadcast channel. Each client requests a specific message and may have a subset of the messages as side information. To satisfy all clients with the minimum number of transmissions $T$, the server can send coded broadcast transmissions; the clients then would use the coding matrix to decode their requests. In~\cite{karmoose2017preserving}, we mitigated the aforementioned privacy risk by providing clients with access not to the entire coding matrix, but {\it only} to the rows required for them to decode their own requests. In fact, given a coding matrix that uses $T$ transmissions to satisfy all clients, we can transform it into another coding matrix that uses $T_k\geq T$ transmissions to satisfy all clients, but where each client needs to learn only $k$ rows of the coding matrix. In~\cite{karmoose2017preserving}, we showed that the attained amount of privacy is dictated by $k$. This formulation admits a geometric interpretation. In~\cite{bar2011index}, it was shown that designing an index code is equivalent to the rank minimization of an $n\times m$ matrix $\mathbf{G}$, where the $i$-th row of $\mathbf{G}$ has certain properties which enable client $i$ to recover its request. Assume that the rank of $\mathbf{G}$ is $T$; then, we can use as a coding matrix $\mathbf{A}$ any basis of this $T$-dimensional space. By doing so, client $i$ can linearly combine some vectors of $\mathbf{A}$ to reconstruct the $i$-th row of $\mathbf{G}$. The geometric interpretation of our problem is therefore the following: Given $n$ distinct vectors in a $T$-dimensional space, represented as the rows $\mathbf{G}$, we wish to find an overcomplete basis $\mathbf{A}_k$ of dimension $T_k\geq T$, such that each of the $n$ vectors can be expressed as a linear combination of at most $k$ of the $\mathbf{A}_k$ vectors. In~\cite{karmoose2017preserving}, we formalized the intuition that the achieved level of privacy can increase by decreasing the number $k$ of rows of the coding matrix that a client learns. We also derived upper and lower bounds on $T_k$, with the former being independent of $n$. In this paper, our main contributions are as follows: \begin{enumerate} \item We derive an improved upper bound that again applies for all values of $n$, and show that, in contrast to the one in~\cite{karmoose2017preserving}, it is order-optimal. Our upper bound is constructive, i.e., it provides a concrete construction of a coding matrix. \item For general $n \leq 2^T-1$, the previous construction does not always offer benefits over uncoded transmissions. For such cases, we propose two novel algorithms and assess their analytical and numerical performance. In particular, we show their superior performance over other schemes through numerical evaluations. \end{enumerate} The paper is organized as follows. Section~\ref{sec::setup} formulates the problem and presents existing results. Section~\ref{sec::improved} provides a scheme for $n=2^T-1$. Section~\ref{sec::BipartiteGraphRep} discusses special instances of the problem for a general $n$, while Section~\ref{sec::algorithms} presents upper bounds and algorithms. Section~\ref{sec::evaluation} provides numerical evaluations, and finally Section~\ref{sec::related} discusses related work. \section{Problem Formulation and Previous Results} \label{sec::setup} \smallskip \noindent\textbf{Notation.} Calligraphic letters indicate sets; boldface lower case letters denote vectors and boldface upper case letters indicate matrices; $|\mathcal{X}|$ is the cardinality of $\mathcal{X}$; $[n]$ is the set of integers $\{1,\cdots,n\}$; $\emptyset$ is the empty set; for all $x \in \mathbb{R}$, the floor and ceiling functions are denoted with $\lfloor x \rfloor$ and $\lceil x \rceil$, respectively; $\mathbf{0}_{j}$ is the all-zero row vector of dimension $j$; $\mathbf{0}_{i \times j}$ is the all-zero matrix of dimension $i \times j$; $\mathbf{1}_{j}$ denotes a row vector of dimension $j$ of all ones; logarithms are in base 2. \smallskip {\noindent\textbf{Index Coding.} We consider a setup similar to the one in \cite{karmoose2017preserving}. We assume an index coding instance, where a server has a database $\mathcal{B}=\left \{ \mathbf{b}_{\mathcal{M}} \right \}$ of $m$ messages, with $\mathcal{M} = [m]$ being the set of message indices, and all messages $\mathbf{b}_j \in \mathbb{F}_{2}^{F}, j \in \mathcal{M},$ are $F$-long strings. The server is connected through a broadcast channel to a set of clients $\mathcal{C}=\left \{ c_{\mathcal{N}} \right \}$, where $\mathcal{N} = [n]$ is the set of client indices, and $m \geq n$. Each client {$c_i, i \in \mathcal{N},$} has a subset of the messages {$\left \{ \mathbf{b}_{\mathcal{S}_i}\right \}$, with $\mathcal{S}_i \subset \mathcal{M}$,} as side information and requests a new message {$\mathbf{b}_{q_i}$} with $q_i \in \mathcal{M} \setminus \mathcal{S}_i$ that {it} does not have. A \textit{linear index code} solution to the index coding instance is a designed set of broadcast transmissions that are linear combinations of the messages in {$\mathcal{B}$}. The linear index code can be represented as $\mathbf{A} \mathbf{B} = \mathbf{Y}$, where $\mathbf{A} \in \mathbb{F}_2^{T \times m}$ is the coding matrix, $\mathbf{B} \in \mathbb{F}_2^{m \times F}$ is the matrix of all the messages and $\mathbf{Y} \in \mathbb{F}_2^{T \times F}$ is the resulting matrix of linear combinations. Upon receiving these transmissions, client $c_i{, i \in \mathcal{N},}$ employs linear decoding to retrieve $\mathbf{b}_{q_i}$. A linear index code with the minimum number of transmissions is called an \textit{optimal} linear index code.} \smallskip \noindent\textbf{Problem Formulation.} {Designing the optimal linear index code is an NP-Hard problem, and therefore various algorithms exist for designing sub-optimal linear index codes (see Section~\ref{sec::related}). In this work, we are concerned with designing linear index codes that maintain higher privacy levels for the requests of clients. Our approach is based on using $k$-limited-access schemes~\cite{karmoose2017preserving}: given a coding matrix $\mathbf{A}$ of rank $T$, we wish to create an alternative index code $\mathbf{A}_k = \mathbf{P} \mathbf{A}$, where $\mathbf{P} \in \mathbb{F}_2^{T_k \times T}$ is to be designed such that client $c_i, i \in \mathcal{N}$ can retrieve $b_{q_i}$ using \textit{at most} $k$ vectors of $\mathbf{A}_k$, where $1 \leq k \leq T$. The value of $T_k$ represents the number of transmissions associated with the alternative index code $\mathbf{A}_k$, and therefore our goal is to design $\mathbf{P}$ with minimum $T_k$. In order to create such a linear index code, we note that the coding matrix $\mathbf{A}$ allows client $c_i, i \in \mathcal{N}$ to retrieve $b_{q_i}$ by a linear decoding operation expressed as $\mathbf{d}_i \mathbf{A} \mathbf{B} = \mathbf{d}_i \mathbf{Y}$, where $\mathbf{d}_i \in \mathbb{F}_2^T$ is the decoding row vector of $c_i$. The resulting vector $\mathbf{g}_i = \mathbf{d}_i \mathbf{A}$ possesses certain properties which allows $c_i$ to decode $b_{q_i}$ using $b_{\mathcal{S}_i}$~\cite{bar2011index}. Therefore, an alternative index code $\mathbf{A}_k$ would still allow client $c_i$ to decode $b_{q_i}$ if it is able to reconstruct $\mathbf{g}_i$ using $\mathbf{A}_k$. Our problem can therefore be stated as follows: {\it Given $\mathbf{g}_i, i \in \mathcal{N}$, can we design a matrix $\mathbf{P}$, with $T_k$ as small as possible, such that $\mathbf{g}_i, i \in \mathcal{N}$ can be reconstructed by adding at most $k$ vectors out of $\mathbf{A}_k$?} Note that, by definition, $\mathbf{g}_i, i \in \mathcal{N}$ lie in the row span of $\mathbf{A}$. Since the rank of $\mathbf{A}$ is $T$, the maximum number of distinct $\mathbf{g}_i$ vectors is $2^T-1$. Therefore, without loss of generality, we assume that $n \leq 2^T-1$. We refer to the case where $n = 2^T-1$ as {\it full-space covering}, and to the case where $n < 2^T-1$ as {\it partial-space covering}. Our previous work in~\cite{karmoose2017preserving} provided a lower bound on the minimum value of $T_k$, which we restate here for convenience. \begin{lemma} \label{lem::lowerbound}\cite[Theorem III.1]{karmoose2017preserving} Given an index coding matrix $\mathbf{A} \in \mathbb{F}_2^{T \times m}$ with $T \geq 2$, it is possible to transform it into ${\mathbf{A}_{k}} = \mathbf{P} \mathbf{A}$ with $\mathbf{P} \in \mathbb{F}_2^{T_k \times T}$, such that each client can recover its request by combining at most $k$ rows of it, if and only if \begin{align} T_k \geq T^\star \!=\! \min \left\{T_k : \sum\limits_{i=1}^{k} {T_k \choose i} \!\geq\! n \right\} \stackrel{(a)}{\geq} T^{\text{LB}} \!=\! \frac{2^{\frac{T\!-\!1}{k}} k^{\frac{k-1}{k}}}{e}, \label{eq::lb} \end{align} where $(a)$ holds when $n = 2^T-1$ and $k < \lceil T/2 \rceil$. \end{lemma} In addition, \cite[Theorem III.1]{karmoose2017preserving} provided a construction of a matrix $\mathbf{P}$ for which $T_k$ is shown to have an exponent that is order-optimal for the full-space covering case and for some regimes of $k$. Differently, one contribution in this paper is a matrix construction that is order-optimal for any value of $1 \leq k < \left\lceil T/2 \right\rceil$\footnote{The case $\left\lceil T/2 \right\rceil \leq k < T$ was solved in~\cite{karmoose2017preserving}, where we showed that $T_k= \min \{ T+1,n\}$.}. This is described in the next section. } \section{Improved Scheme for Full-Space Covering} \label{sec::improved} Here we provide a novel scheme for the full-space covering case (i.e., $n = 2^T-1$). This new scheme is order-optimal in the number of transmissions for the case when $ 1 \leq k < \left\lceil \frac{T}{2} \right\rceil$. This provides an improvement over the scheme presented in \cite[Theorem III.1]{karmoose2017preserving}. \begin{theorem} \label{thm::fullspacescheme} For $n = 2^T-1$ and $ 1 \leq k < \left\lceil \frac{T}{2} \right\rceil$ we have \begin{equation} \label{eq::fullspacescheme} T_k \leq 2^{\left\lceil \frac{T}{k} \right\rceil}k. \end{equation} \end{theorem} Before providing the proof for Theorem \ref{thm::fullspacescheme}, which shows how the scheme is constructed, we analyze the performance of the scheme in comparison to the lower bound in \eqref{eq::lb}. We do so in the next lemma (proof is in Appendix 1). \begin{lemma} \label{lem::orderoptimal} For $ 1 \leq k < \left\lceil \frac{T}{2} \right\rceil$, we have $T_k = \Theta(2^{\frac{T}{k}}k)$. \end{lemma} \begin{figure} \centering \includegraphics[width=3in]{SchemeComp-eps-converted-to.pdf} \caption{Comparison between the scheme in Theorem \ref{thm::fullspacescheme} and in~\cite{karmoose2017preserving}} \label{fig::compfullspace} \end{figure} The main difference between Scheme-1 (in Theorem~\ref{thm::fullspacescheme}) and Scheme-2 (in~\cite{karmoose2017preserving}) is as follows. Both schemes are designed {by: (i)} breaking the {binary} vector {of length $T$} into parts, {(ii)} providing all possible {non-zero binary} vectors that correspond to each part, and {(iii) combining} the solutions to {reconstruct the original vector. However,} the two schemes {differ} in the following: 1) Scheme-1 splits the vector into {\it larger} but {\it fewer} parts {than Scheme-2,} and 2) Scheme-1 aggregates the {solutions} {\it additively} while {Scheme-2} aggregates {them} {\it multiplicatively}. While it is indeed true that providing all possible vectors for the parts in Scheme-1 would lead to larger partial solutions than those in Scheme-2, aggregating those solutions additively eventually leads to a smaller number of vectors than in Scheme-2. Figure~\ref{fig::compfullspace} shows a comparison between the improved scheme proposed in~\ref{thm::fullspacescheme} and its counterpart in~\cite{karmoose2017preserving} for full-space covering. The remainder of this section proves Theorem \ref{thm::fullspacescheme} by showing how the scheme works (i.e. how $\mathbf{A}_k$ is constructed). \medskip \noindent \textbf{Example:} We first show how the scheme is constructed via a small example, where $T = 8$ and $k = 3$. The idea is that, to reconstruct a vector $\mathbf{v} \in \mathbb{F}_2^8$, we treat it as $k=3$ disjoint parts; the first $2$ are of length $\left\lceil \frac{T}{k} \right\rceil = 3$ and the remaining part is of length $T - (k-1)\left\lceil \frac{T}{k} \right\rceil = 2$. We then construct $\mathbf{A}_k$ as $k = 3$ disjoint sections, where each section allows us to reconstruct one part of the vector. Specifically, we construct $\mathbf{A}_k$ as \begin{equation} \nonumber \mathbf{A}_k = \left[ \begin{matrix} \bar{\mathbf{B}}_1 & \mathbf{0}_{7 \times 3} & \mathbf{0}_{7 \times 2} \\ \mathbf{0}_{7 \times 3} & \bar{\mathbf{B}}_2 & \mathbf{0}_{7 \times 2} \\ \mathbf{0}_{3 \times 3} & \mathbf{0}_{3 \times 3} & \bar{\mathbf{B}}_3 \end{matrix} \right], \end{equation} where \begin{equation} \nonumber \bar{\mathbf{B}}_1 = \bar{\mathbf{B}}_2 = \left[ \begin{matrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 1 & 1 \\ & \vdots & \\ 1 & 1 & 1 \end{matrix} \right], \quad \bar{\mathbf{B}}_3 = \left[ \begin{matrix} 0 & 1 \\ 1 & 0 \\ 1 & 1 \end{matrix} \right]. \end{equation} Then any vector $\mathbf{v}$ can be reconstructed by picking at most $k$ vectors out of $\mathbf{A}_k$, one from each section. For example, let $\mathbf{v} = \left[ 0 \: 1 \: 0 \: 0 \: 1 \: 1 \: 1 \: 0 \right]$. Then this vector can be reconstructed by adding vectors number $2$, $10$ and $16$ from $\mathbf{A}_k$. \medskip \noindent \textbf{Proof of Theorem \ref{thm::fullspacescheme}:} Let $T_{\text{rem}} = T - (k-1)\left\lceil \frac{T}{k}\right\rceil $. Then we can write \begin{equation} \nonumber \mathbf{A}_k = \left[ \begin{matrix} \mathbf{B}_1 \\ \mathbf{B}_2 \\ \vdots \\ \mathbf{B}_{k}\end{matrix} \right], \end{equation} where, for $i \in [k-1]$, the matrix $\mathbf{B}_i$, of dimension $b_i \times T$, is constructed as follows \begin{equation} \nonumber \mathbf{B}_i = \left[ \begin{matrix} \mathbf{0}_{b_i \times (i-1) \left\lceil \frac{T}{k} \right\rceil} & \bar{\mathbf{B}}_i & \mathbf{0}_{b_i \times (k-1-i) \left\lceil \frac{T}{k} \right\rceil} & \mathbf{0}_{b_i \times T_{\text{rem}}} \end{matrix} \right], \end{equation} where $\bar{\mathbf{B}}_i$, of dimension $b_i \times \left\lceil \frac{T}{k} \right\rceil$, has as rows all non-zero vectors of dimension $\left\lceil \frac{T}{k} \right\rceil$. Therefore we have $b_i = 2^{\left\lceil \frac{T}{k} \right\rceil }-1$. Similarly, the matrix $\mathbf{B}_k$, of dimension $b_k \times T$, is constructed as follows \begin{equation} \nonumber \mathbf{B}_k = \left[ \begin{matrix} \mathbf{0}_{b_k \times (k-1) \left\lceil \frac{T}{k} \right\rceil} & \bar{\mathbf{B}}_k \end{matrix} \right], \end{equation} where $\bar{\mathbf{B}}_k$, of dimension $b_k \times T_{\text{rem}}$, has as rows all non-zero vectors of dimension $T_{\text{rem}}$. Therefore we have $b_k = 2^{T_{\text{rem}}}-1$. In other words, the matrix $\mathbf{A}_k$ is constructed as a block-diagonal matrix, with the diagonal elements being $\bar{\mathbf{B}}_i$ for all $i \in [k]$. Therefore equation \eqref{eq::fullspacescheme} holds by computing \begin{equation} \nonumber T_k = \sum\limits_{i=1}^{k} b_i = (k-1)\left(2^{\left\lceil \frac{T}{k} \right\rceil} -1 \right) + 2^{T_{\text{rem}}} - 1 \leq k2^{\left\lceil \frac{T}{k} \right\rceil}, \end{equation} which follows by noting that $T_{\text{rem}} \leq \left\lceil \frac{T}{k} \right\rceil$. What remains is to show that any vector $\mathbf{v} \in \mathbb{F}_2^T$ can be reconstructed by adding at most $k$ vectors of $\mathbf{A}_k$. To show this, we can express it as $\mathbf{v} = \left[\mathbf{v}_1 \: \cdots \: \mathbf{v}_k \right]$ where $\mathbf{v}_i, i \in [k-1]$ are parts of the vector $\mathbf{v}$ each of length $ \left\lceil \frac{T}{k} \right\rceil $, while $\mathbf{v}_k$ is the last part of $\mathbf{v}$ of length $T_{\text{rem}}$. Then we can write \begin{equation} \nonumber \mathbf{v} = \sum\limits_{i=1}^k \bar{\mathbf{v}}_i = \sum\limits_{i \in \mathcal{K}(\mathbf{v})} \bar{\mathbf{v}}_i, \end{equation} where $\bar{\mathbf{v}}_i = \left[ \mathbf{0}_{(i-1) \left\lceil \frac{T}{k} \right\rceil} \quad \mathbf{v}_i \quad \mathbf{0}_{(k-1-i) \left\lceil \frac{T}{k} \right\rceil} \: \mathbf{0}_{T_{\text{rem}}} \right]$ for $i \in [k-1]$, $\bar{\mathbf{v}}_k = \left[ \mathbf{0}_{(k-1) \left\lceil \frac{T}{k} \right\rceil} \quad \mathbf{v}_k \right]$ and $\mathcal{K}(\mathbf{v}) \subseteq [k]$ is the set of indices for which $\mathbf{v}_i$ is not all-zero. Then, according to the construction of $\mathbf{A}_k$, for all $i \in \mathcal{K}(\mathbf{v})$, the corresponding vector $\mathbf{v}_i$ is one of the rows in $\mathbf{B}_i$, and therefore we can construct $\mathbf{v}$ by at most $k$ vectors of $\mathbf{A}_k$. \hfill$\blacksquare$ \section{Partial-Space Covering} \label{sec::BipartiteGraphRep} Here we study some specific instances of the problem, which we will later use in our algorithms. We first represent the problem through a bipartite graph as follows. We assume that the rank of the matrix $\mathbf{G}$ is $T$. Then, there exists a set of $T$ linearly independent vectors in $\mathbf{G}$; without loss of generality, denote them as $\mathbf{g}_1$ to $\mathbf{g}_T$. We can then represent the problem as a bipartite graph $(\mathcal{U} \cup \mathcal{V}, \mathcal{E})$ with $| \mathcal{U}| = T$ and $| \mathcal{V}| = n-T$, where $u_i \in \mathcal{U}$ represents vector $\mathbf{g}_{i}$ for $i \in [T]$, $v_i \in \mathcal{V}$ represents vector $\mathbf{g}_{i+T}$ for $i \in [n-T]$, and an edge exists from node $u_i$ to node $v_j$ if $\mathbf{g}_i$ is one of the component vectors of $\mathbf{g}_{j+T}$. Figure~\ref{fig::bipartitegraphrep} shows an example of such graph, where $n = 9$ and $T = 6$. For instance, $v_1$ (i.e., $\mathbf{g}_7$) can be reconstructed by adding $u_i, i \in [4]$. Given a node $s$ in the graph, we refer to the sets $\mathcal{O}_s$ and $\mathcal{I}_s$ as the {\it outbound} and {\it inbound} sets of $s$ respectively: the inbound set contains the nodes which have edges outgoing to node $s$, and the outbound set contains the nodes to which node $s$ has outgoing edges. For instance, with reference to Figure~\ref{fig::bipartitegraphrep}, $\mathcal{O}_{u_1} = \{v_1,v_2,v_3 \}$ and $\mathcal{I}_{v_1} = \{u_1,u_2,u_3,u_4 \}$. For this particular example, there exists a scheme with $T_2 = 6$ which can reconstruct any vector with at most $k=2$ additions. The matrix $\mathbf{A}_2$ which corresponds to this solution consists of the following vectors: \begin{equation} \mathbf{A}_2 = \left[ \begin{matrix} \mathbf{g}_1 \\ \mathbf{g}_1 + \mathbf{g}_2 \\ \mathbf{g}_1 + \mathbf{g}_2 + \mathbf{g}_3 \\ \mathbf{g}_1 + \mathbf{g}_2 + \mathbf{g}_3 + \mathbf{g}_4\\ \mathbf{g}_5 \\ \mathbf{g}_5 + \mathbf{g}_6 \end{matrix} \right]. \end{equation} It is not hard to see that each vector in $\mathbf{G}$ can be reconstructed by adding at most $2$ vectors in $\mathbf{A}_2$. The vectors in $\mathbf{A}_2$ that are not in $\mathbf{G}$ can be aptly represented as intermediate nodes on the previously described bipartite graph, which are shown in Figure \ref{fig::bipartitegraphrepsol} as highlighted nodes. Each added node represents a new vector, which is the sum of the vectors for the nodes in its inbound set. We refer to the process of adding these intermediate nodes as creating a {\it branch}, which is defined next. \begin{definition} Given an ordered set $\mathcal{S} = \{s_1, \: \cdots, \: s_S \}$ of nodes, where $s_i$ preceeds $s_{i+1}$ for $i \in [S-1]$, a {\it branch on $\mathcal{S}$} is a set $\mathcal{S}^\prime = \{ s^\prime_1, \: \cdots, \: s^\prime_{S-1} \}$ of $S-1$ intermediate nodes added to the graph with the following connections: node $s^\prime_1$ has two incoming edges from $s_1$ and $s_2$, and for $i \in [S-1] \setminus \{1\}$, $s^\prime_i$ has two incoming edges from nodes $s^\prime_{i-1}$ and $s_{i+1}$. \end{definition} For the example in Figure \ref{fig::bipartitegraphrepsol}, we created branches on two ordered sets, $\mathcal{S}_1 = \{u_1, \: u_2, \: u_3, \: u_4 \}$ and $\mathcal{S}_2 = \{u_5, \: u_6 \}$. Once the branch is added, we can change the {connections} of the nodes in $\mathcal{V}$ in accordance to the added vectors. For the example in Figure \ref{fig::bipartitegraphrepsol}, we can replace $u_{[4]}$ in $\mathcal{I}_{v_1}$ with only $s_{3}$. \begin{figure} \centering \begin{minipage}{0.49\columnwidth} \centering \includegraphics[width=0.95\textwidth]{algsmall.png} \caption{Bipartite graph representation.} \label{fig::bipartitegraphrep} \end{minipage} \begin{minipage}{0.49\columnwidth} \centering \includegraphics[width=0.95\textwidth]{algsmallsol.png} \caption{Optimal representation when $k=2$.} \label{fig::bipartitegraphrepsol} \end{minipage} \end{figure} Using this representation, we have the following lemma. \begin{lemma} \label{lem::subsetlem} If $\mathcal{O}_{u_{i_T}} \subseteq \mathcal{O}_{u_{i_{T-1}}} \subseteq \cdots \subseteq \mathcal{O}_{u_{i_1}}$ for some permutation $i_1, \cdots, i_T$ of $[T]$, then this instance can be solved by exactly $T$ transmissions for any $k \geq 2$. \end{lemma} \begin{Pf} One solution of such instance would involve creating a branch on the set $\mathcal{S} = \{u_{i_T}, \: u_{i_{T-1}}, \: \cdots, \: u_{i_1} \}$. The scheme used would have the matrix $\mathbf{A}_2$ with its $t$-th row $\mathbf{a}_t = \sum\limits_{\ell = 1}^{t} \mathbf{g}_{i_\ell}$ for $t \in [T]$. Note that $\mathbf{g}_{i_1} = \mathbf{a}_{1}$ and $\mathbf{a}_{t} + \mathbf{a}_{t-1} = \mathbf{g}_{i_t}$ for all $t \in [T]\setminus\{1\}$. Moreover, for $j \in [n]\setminus [T]$, if $v_{j-T} \in \mathcal{O}_{u_{i_t}}$ for some $i_t$, then $ v_{j-T} \in \mathcal{O}_{u_{i_\ell}}$ for all $\ell \leq t$. If we let $t$ be the maximum index for which $v_{j-T} \in \mathcal{O}_{u_{i_t}}$, then we have $\mathcal{I}_{v_{j-T}} = \{u_{i_1}, \: \cdots, \: u_{i_t}\}$, and so we get $\mathbf{g}_{j} = \sum\limits_{\ell = 1}^t \mathbf{g}_{i_\ell} = \mathbf{a}_t$. \end{Pf} \begin{corollary} \label{cor::circuit} For $\mathbf{G} \in \mathbb{F}_2^{n \times T}$ of rank $T$, if $n = T+1$, then this instance can be solved in $T$ transmissions for any $k \geq 2$. \end{corollary} \begin{Pf} Without loss of generality, let $\mathbf{g}_{[T]}$ be a set of linearly independent vectors of $\mathbf{G}$. Then we have $\mathcal{O}_{u_i} = \{v_1\}$ for $i \in \mathcal{I}_{v_1}$ and $\mathcal{O}_{u_j} = \emptyset$ for $j \in [T]\setminus \mathcal{I}_{v_1}$. Thus, from Lemma~\ref{lem::subsetlem}, this instance can be solved in $T$ transmissions. \end{Pf} \section{Algorithms for General Instances} \label{sec::algorithms} \subsection{Successive Circuit Removing (SCR) algorithm} Our first proposed algorithm is based on Corollary~\ref{cor::circuit}, which can be interpreted as follows: any matrix $\mathbf{G}$ of $r+1$ vectors and rank $r$ can be reconstructed by a corresponding $\mathbf{A}_2$ matrix with $r$ rows. We denote this collection of vectors as a \textit{circuit}\footnote{This is in accordance to the definition of a circuit for a matroid\cite{oxley2006matroid}.}. Our algorithm works for the case $k = 2^q$, for some integer $q$. We first describe SCR for the case where $q=1$, and then extend it to a general $q$. For $q=1$, the algorithm works as follows: \medskip \noindent $1)$ \textit{Circuit Finding:} find a set of vectors of $\mathbf{G}$ that form a circuit of small size. Denote the size of this circuit as $r+1$.\\ \noindent $2)$ \textit{Matrix Update:} apply Corollary \ref{cor::circuit} to find a set of $r$ vectors that can optimally reconstruct the circuit by adding at most $k=2$ of them, and add this set to $\mathbf{A}_2$.\\ \noindent $3)$ \textit{Circuit Removing:} update $\mathbf{G}$ by removing the circuit. Repeat the first two steps until the matrix $\mathbf{G}$ is of size $T^\prime \times T$ and of rank $T^\prime$, where $T^\prime \leq T$. Then add these vectors to $\mathbf{A}_2$. \medskip Once SCR is executed, the output is a matrix $\mathbf{A}_2$ such that any vector in $\mathbf{G}$ can be reconstructed by adding at most $k=2$ vectors of $\mathbf{A}_2$. Consider now the case where $q=2$ (i.e., $k=4$) for example. In this case, a second application of SCR on the matrix $\mathbf{A}_2$ would yield another matrix, denoted as $\mathbf{A}_4$, such that any row in $\mathbf{A}_2$ can be reconstructed by adding at most $2$ vectors of $\mathbf{A}_4$. Therefore any vector in $\mathbf{G}$ can now be reconstructed by adding at most $4$ vectors of $\mathbf{A}_4$. We can therefore extrapolate this idea for a general $q$ by successively applying SCR $q$ times on $\mathbf{G}$ to obtain $\mathbf{A}_k$, with $k=2^q$. The following theorem gives a closed form characterization of the best and worst case performance of SCR. \begin{theorem} \label{thm::SCR} Let $T_2^{\text{SRC}}$ be the number of vectors in $\mathbf{A}_k$ obtained via SCR. Then, for $k=2^q$ and integer $q$, we have \begin{equation} \label{eq::SRCPerf} \underbrace{f^{\text{Best}}(f^{\text{Best}}( \cdots f^{\text{Best}}(n)))}_{q \text{ times}} \!\leq\! T_q^{\text{SRC}} \!\leq \! \underbrace{f^{\text{Worst}}(f^{\text{Worst}}( \cdots f^{\text{Worst}}(n)))}_{q \text{ times}}, \end{equation} where $f^{\text{Best}}(n) = 2\left\lfloor \frac{n}{3}\right\rfloor$ and $f^{\text{Worst}}(n) = T \left( \left\lfloor \frac{n}{T+1} \right\rfloor + 1\right)$. \end{theorem} \begin{Pf} First we focus on the case $q = 1$. The lower bound in~\eqref{eq::SRCPerf} corresponds to the best case when the matrix $\mathbf{G}$ can be partitioned into disjoint circuits of size $3$. In this case, if SRC finds one such circuit in each iteration, then each circuit is replaced with $2$ vectors in $\mathbf{A}_2$ according to Corollary~\ref{cor::circuit}. To obtain the upper bound, note that any collection of $T+1$ has at most $T$ independent vectors, and therefore contains a circuit of at most size $T+1$. Therefore, the upper bound corresponds to the case where the matrix $\mathbf{G}$ can be partitioned into circuits of size $T+1$ and an extra $T$ linearly independent vectors. In that case, the algorithm can go through each of these circuits, adding $T$ vectors to $\mathbf{A}_2$ for each of these circuits, and then add the last $T$ vectors in the last step of the algorithm. Finally, the bounds in \eqref{eq::SRCPerf} for a general $q$ can be proven by a successive repetition of the above arguments. \end{Pf} \subsection{Branch-Search heuristic} A naive approach to determining the optimal matrix $\mathbf{A}_k$ is to consider the whole space $\mathbb{F}_2^T$, loop over all possible subsets of vectors of $\mathbb{F}_2^T$ and, for every subset, check if it can be used as a matrix $\mathbf{A}_k$. The minimum-size subset which can be used as $\mathbf{A}_k$ is indeed the optimal matrix. However, such algorithm requires in the worst case) $O\left (2^{2^T} \right )$ number of operations, which makes it prohibitively slow even for very small values of $T$. Instead, {the heuristic that we here propose} finds a matrix $\mathbf{A}_k$ more efficiently than the naive search scheme. The main idea behind the heuristic is based on providing a subset $\mathcal{R} \subset \mathbb{F}_2^T$ which is much smaller than $2^T$ and is guaranteed to have at least one solution. The heuristic then searches for a matrix $\mathbf{A}_k$ by looping over all possible subsets of $\mathcal{R}$. Our heuristic therefore consists of two sub-algorithms, namely Branch and Search. Branch takes as input $\mathbf{G}$, and produces as output a set of vectors $\mathcal{R}$ which contains at least one solution $\mathbf{A}_k$. The algorithm works as follows: \medskip \noindent 1) Find a set of $T$ vectors of $\mathbf{G}$ that are linearly independent. Denote this set as $\mathcal{B}$.\\ \noindent 2) Create a bipartite graph representation of $\mathbf{G}$ as discussed in Section~\ref{sec::BipartiteGraphRep}, using $\mathcal{B}$ as the independent vectors for $\mathcal{U}$.\\ \noindent 3) Pick the dependent node $v_i$ with the highest degree, and split ties arbitrarily. Denote by $\text{deg}(v_i)$ the degree of node $v_i$.\\ \noindent 4) Consider the inbound set $\mathcal{I}_{v_i}$, and sort its elements in a descending order according to their degrees. Without loss of generality, assume that this set of ordered independent nodes is $\mathcal{I}_{v_i} = \{u_1, \: u_2, \: \cdots , \: u_{\text{deg}(v_i)} \}$.\\ \noindent 5) Create a branch on $\mathcal{I}_{v_i}$. Denote the new branch nodes as $\{u^\star_1, \: u^\star_2, \: \cdots , \: u^\star_{\text{deg}(v_i)} \}$.\\ \noindent 6) Update the connections of all dependent nodes in accordance with the constructed branch. This is done as follows: for each node $v_j \in \mathcal{V}$ with $\text{deg}(v_j) \geq k$, if $\mathcal{I}_{v_j} \cap \mathcal{I}_{v_i}$ is of the form $\{u_1, \: u_2, \: \cdots, \: u_{\ell}\}$ for some $\ell \leq \text{deg}(v_i)$, then replace $\{u_1, \: u_2, \: \cdots, \: u_{\ell}\}$ in $\mathcal{I}_{v_j}$ with the single node $u^\star_{\ell}$.\\ \noindent 7) Repeat 3) to 6) until all nodes in $\mathcal{V}$ have degree at most $k$. \medskip The output $\mathcal{R}$ is the set of vectors corresponding to all nodes in the graph. The next theorem shows that $\mathcal{R}$ in fact contains one possible $\mathbf{A}_k$, and characterizes the performance of Branch. \begin{theorem} \label{thm::branch} (Proof in Appendix 2) For a matrix $\mathbf{G}$ of dimension $n \times T$, (a) Branch produces a set $\mathcal{R}$ which contains at least one possible $\mathbf{A}_k$, (b) the worst-case time complexity $t_{\text{Branch}}$ of Branch is $O(n^2)$, and (c) $|\mathcal{R}| \leq (n-T)T$. \end{theorem} Let $t_{\text{Search}}$ be the worst-time complexity of the Search step in Branch-Search. Then the worst-case time complexity of Branch-Search is equal to $t_{\text{BS}} = t_{\text{Branch}} + t_{\text{Search}} \leq O(n^2) + 2^{|\mathcal{R}|} = O(n^2) + O(2^{nT}) = O(2^{nT})$, which is exponentially better than the complexity of naive search. Although our heuristic is still of exponential runtime complexity, we observe from numerical simulations that $|\mathcal{R}|$ is usually much less than $(n-T)T$. Moreover, we believe that there exist more efficient ways of searching through the set $\mathcal{R}$ to find a better solution $\mathbf{A}_k$, which is part of our ongoing investigation. \section{Numerical Evaluation} \label{sec::evaluation} \begin{figure} \centering \includegraphics[width=0.933\columnwidth]{T6k2-eps-converted-to.pdf} \caption{Numerical evaluation - $T = 6$, $k=2$.} \label{fig::algperf} \end{figure} Here we evaluate the performance of our proposed schemes through numerical evaluations. Specifically, we assess the performance in terms of $T_k$ of the scheme in Theorem \ref{thm::fullspacescheme} (which we here refer to as Scheme-1), SCR and Branch-Search (labeled BS). {\color{black} We compare their performance against the lower bound in Lemma \ref{lem::lowerbound} (denoted by LB), and the upper bound of sending uncoded transmissions (denoted by UB).} For the case of partial-space covering, we adapt Scheme-1 in the following way: we first sort the columns of $\mathbf{G}$ in a decreasing order according to their weights (i.e., number of non-zero elements), then for the $i$-th section of length $\left\lceil T/k \right\rceil$, we fill $\mathbf{B}_i$, {\color{black} not with all non-zero vectors of length $\left\lceil T/k \right\rceil$ (as described in the proof of Theorem \ref{thm::fullspacescheme}), but only with all the vectors that appear for that section across all the $n$ vectors of $\mathbf{G}$}. This modification removes vectors from the matrix $\mathbf{A}_k$ that are not used by any vector in $\mathbf{G}$. For SCR, we evaluate its average performance as well as its upper and lower bound performance established in Theorem~\ref{thm::SCR}. For Branch-Search, we evaluate its average performance. Figure~\ref{fig::algperf} shows the performance of all the aforementioned schemes for $T=6$ and $k=2$. As can be seen, Scheme-1 does not perform well for small values of $n$. SCR consistently performs better than uncoded transmissions. In addition, although the current implementation of SCR greedy searches for a small circuit to remove, more sophisticated algorithms for small circuit finding could potentially improve its performance. However, the bounds in~\eqref{eq::SRCPerf} suggest that the performance of SCR is asymptotically $O(n)$. Branch-Search appears to perform better than other schemes in the average sense. Our current investigation includes understanding its asymptotic behavior in the worst-case. \section{Related Work} \label{sec::related} The problem of protecting privacy was initially proposed to enable the disclosure of databases for public access, while maintaining the anonymity of the users~\cite{aggarwal2008general}. In {\it Private Information Retrieval} (PIR)~\cite{chor1998private,banawan2016capacity}, clients ensure that no information about their requests is revealed to a set of malicious databases when they retrieve information from them. Similarly, the problem of {\it Oblivious Transfer} (OT)~\cite{mishra2014oblivious} establishes, by means of cryptographic techniques, two-way private connections between the clients and the server. We were here interested in addressing privacy concerns within the framework of index coding. This problem differs from secure index coding~\cite{dau2012security}: our goal is to protect the clients from an eavesdropper who wishes to learn the {\it identities}, rather than the {\it contents}, of the requested messages. Our initial work in~\cite{karmoose2017private} addressed the possibility of designing coding matrices that provide privacy guarantees for clients. The solutions based on $k$-limited-access schemes proposed in~\cite{karmoose2017preserving} can be interpreted as finding overcomplete bases that allow {\it sparse} representation of vectors, which is closely related to dictionary learning~\cite{rubinstein2010dictionaries}. However, finding lossless representation of vectors forbids us from using the efficient dictionary learning algorithms. \section*{Appendix 1} To prove Lemma \ref{lem::orderoptimal}, we have to show that $T_k(T) = O(2^{\frac{T}{k}}k)$ and $T_k(T) = \Omega(2^{\frac{T}{k}}k)$. The notation $T_k(T)$ is to explicate that we are interested in the limiting behavior of $T_k$ as $T$ varies. \\ \noindent\underline{$T_k(T) = O(2^{\frac{T}{k}}k)$:} Let $c = 2$, then we have $2^{\frac{T}{k}+1}k = c \cdot 2^{\frac{T}{k}}k$. Therefore, for all $T \geq 1$, we can write \begin{equation} \nonumber T_k(T) \leq 2^{\left\lceil \frac{T}{k} \right\rceil}k \leq 2^{\frac{T}{k}+1}k = c \cdot 2^{\frac{T}{k}}k, \end{equation} which proves the first part.\\ \noindent\underline{$T_k(T) = \Omega(2^{\frac{T}{k}}k)$:} Proving $T_k(T) = \Omega(2^{\frac{T}{k}}k)$ is equivalent to proving that $2^{\frac{T}{k}}k = O(T_k(T))$ \cite[Definition 2.1]{arora2009computational}. Let $c = e^{2/e}$. Then, for all $T \geq 1$, we have \begin{align} \nonumber 2^{\frac{T}{k}} k &= (2k)^{1/k} \cdot 2^{\frac{T-1}{k}} k^{\frac{k-1}{k}} \\ &\stackrel{(a)}{\leq} e^{2/e} \cdot 2^{\frac{T-1}{k}} k^{\frac{k-1}{k}} \\ &= c \cdot 2^{\frac{T-1}{k}} k^{\frac{k-1}{k}} \\ &\stackrel{(b)}{=} c \cdot e \cdot T_{\text{LB}} \leq c \cdot e \cdot T_k(T) \end{align} where $(a)$ follows by noting that $f(k) = (2k)^{1/k} \leq e^{\frac{2}{e}}$ and $(b)$ follows by noting \eqref{eq::lb}. This proves the second part. \hfill$\blacksquare$ \section*{Appendix 2} To see (a), note that the algorithm terminates when all dependent nodes have degrees $k$ or less. In every iteration of the algorithm, at least one dependent node is updated and its degree is reduced to $1$. Therefore the algorithm is guaranteed to terminate. Since all dependent nodes have degrees $k$ or less, then their corresponding vectors can be reconstructed by at most $k$ vectors in $\mathcal{R}$. Therefore, the set $\mathcal{R}$ contains one possible solution of $\mathbf{A}_k$. To prove (b), the worst-case runtime of Branch corresponds to going over all nodes in $\mathcal{V}$, creating a branch for each one. For the $i$-th node considered by Branch, the algorithm would update the dependencies of all dependent nodes with degrees greater than $k$, which are at most $n-i$ nodes. Therefore $ t_{\text{Branch}} = \sum\limits_{i=0}^{n-1} (n-i) = n(n-1) = O(n^2)$. To prove (c), note that $|\mathcal{R}|$ is equal to the total number of nodes in all branches created by the algorithm. Therefore we can write $|\mathcal{R}| \leq \sum\limits_{v_i \in \mathcal{V}} \text{deg}(v_i) \leq (n-T)T = O(nT)$. \hfill $\blacksquare$ \bibliographystyle{IEEEtran}
\section{Introduction} Reasoning about programs with loops requires loop invariants expressing properties that hold before and after every loop iteration. The difficulty of generating such properties automatically comes from the use of non-linear arithmetic, unbounded data structures, complex control flow, just to name few of the reasons. In this paper we focus on multi-path loops with numeric variables and polynomial arithmetic and introduce an automated approach inferring {\it all} loop invariants as polynomial equalities among program variables. For doing so, we identify a class of multi-path loops with nested conditionals, where assignments to program variables are polynomial expressions over program variables. Based on our previous work~\cite{issac2017}, we call this class of loops \emph{extended P-solvable}. Compared to~\cite{issac2017} where only single-path programs with polynomial arithmetic were treated, in this paper we generalize the notion of {extended P-solvable} loops to multi-path loops; single-path loops being thus a special case of our method. For the class of extended P-solvable loops, we introduce an automated approach computing all polynomial invariants. Our work exploits the results of~\cite{kapur,reasoningalgebraically} showing that the set of polynomial invariants forms a polynomial ideal, called the polynomial invariant ideal. Hence, the task of generating all polynomial invariants reduces to the problem of generating a basis of the polynomial invariant ideal. Following this observation, given an extended P-solvable loop with nested conditionals, we proceed as follows: we (i) turn the multi-path loop into a sequence of single-path loops, (ii) generate the polynomial invariant ideal of each single-path loop and (iii) combine these ideals iteratively until the polynomial invariant ideal of the multi-path loop is derived. A crucial property of extended P-solvable loops is that the single-path loops corresponding to one path of the multi-path loop are also extended P-solvable. For generating the polynomial invariant ideal of extended P-solvable single-path loops, we model loops by a system of algebraic recurrences, compute the closed forms of these recurrences by symbolic computation as described in~\cite{issac2017} and compute the Gr\"obner basis of the polynomial invariant ideal from the system of closed forms. When combining the polynomial invariant ideals of each extended P-solvable single-path loop, we prove that the ``composition'' maintains the properties of extended P-solvable loops. Further, by exploiting the algebraic structures of the polynomial invariant ideals of extended P-solvable loops, we prove that the process of iteratively combining the polynomial invariant ideals of each extended P-solvable single-path loop is finite. That is, a fixed point is reached in a finite number of steps. We prove that this fixed point is the polynomial invariant ideal of the extended P-solvable loop with nested conditionals. We also show that reaching the fixed point depends linearly on the number of program variables and the number of inner loops. In particular, for a loop with $m$ program variables and $r$ inner loops (paths) we prove an upper bound of $m\cdot r$ iterations. The termination proof of our method implies the completeness of our approach: for an extended P-solvable loop with nested conditionals, our method computes all its polynomial invariants. This result generalizes and corrects the result of~\cite{completeinvariant} on programs for more restricted arithmetic than extended P-solvable loops. Our class of programs extends the programming model of~\cite{completeinvariant} with richer arithmetic and our invariant generation procedure also applies to~\cite{completeinvariant}. As such, our proof of termination also yields a termination proof for~\cite{completeinvariant}. We implemented our approach in the open source Mathematica package \textsc{Aligator}\xspace{} and evaluated our method on 18 challenging examples. When compared to state-of-the-art tools in invariant generation, \textsc{Aligator}\xspace{} performed much better in 14 examples out of 18. The paper is organized as follows: We start by giving the necessary details about our programming model in Section~\ref{sec:programming-model} and provide background about polynomial rings and ideals in Section~\ref{sec:ideals}. In Section~\ref{sec:loopass} we recall the notion of extended P-solvable loops from~\cite{issac2017}. The lemmas and propositions of Section~\ref{sec:dependencies} will then help us to prove termination of our invariant generation procedure in Section~\ref{sec:loopcond}. Finally, Section~\ref{sec:implementation} describes our implementation in \textsc{Aligator}\xspace, together with an experimental evaluation of our approach. \\ \noindent{\bf Related Work.} Generation of non-linear loop invariants has been addressed in previous research. We discuss here some of the most related works that we are aware of. The methods of \cite{olm,san} compute polynomial equality invariants by fixing an a priori bound on the degree of the polynomials. Using this bound, a template invariant of fixed degree is constructed. Properties of polynomial invariants, e.g. inductiveness, are used to generate constraints over the unknown coefficients of the template coefficients and these constraints are then solved in linear or polynomial algebra. An a priori fixed polynomial degree is also used in~\cite{Carbonell07a,farewellgroebner}. Unlike these approaches, in our work we do not fix the degree of polynomial invariants but generate all polynomial invariants (and not just invariants up to a fixed degree). Our restrictions come in the programming model, namely treating only loops with nested conditionals and polynomial arithmetic. For such programs, our approach is complete. Another line of research uses abstract interpretation in conjunction with recurrence solving and/or polynomial algebra. The work of~\cite{kapur} generates all polynomial invariants of so-called {\it simple loops} with nested conditionals. The approach combines abstract interpretation with polynomial ideal theory. Our model of extended P-solvable loops is much more general than simple loops, for example we allow multiplication with the loop counter and treat algebraic, and not only rational, numbers in closed form solutions. Abstract interpretation is also used in~\cite{farzan,oliveira,kincaidPOPL18} to infer non-linear invariants. The programming model of these works handle loops whose assignments induce linear recurrences with constant coefficients. Extended P-solvable loops can however yield more complex recurrence equations. In particular, when comparing our work to~\cite{kincaidPOPL18}, we note that the recurrence equations of program variables in~\cite{kincaidPOPL18} correspond to a subclass of linear recurrences with constant coefficients: namely, recurrences whose closed form representations do not include non-rational algebraic numbers. Our work treats the entire class of linear recurrences with constant coefficients and even handles programs whose arithmetic operations induce a class of linear recurrences with polynomial coefficients in the loop counter. While the non-linear arithmetic of our work is more general than the one in~\cite{kincaidPOPL18}, we note that the programming model of~\cite{kincaidPOPL18} can handle programs that are more complex than the ones treated in our work, in particular due to the presence of nested loops and function/procedure calls. Further, the invariant generation approach of~~\cite{kincaidPOPL18} is property-guided: invariants are generated in order to prove the safety assertion of the program. Contrarily to this, we generate all invariants of the program and not only the ones implying the safety assertion. Solving recurrences and computing polynomial invariant ideals from a system of closed form solution is also described in~\cite{reasoningalgebraically}. Our work builds upon the results of~\cite{reasoningalgebraically} but generalizes~\cite{reasoningalgebraically} to extended P-solvable loops. Moreover, we also prove that our invariant generation procedure terminates. Our termination result generalizes~\cite{completeinvariant} by handling programs with more complex polynomial arithmetic. Furthermore, instead of computing the invariant ideals of all permutations of a given set of inner loops and extending this set until a polynomial ideal as a fixed point is reached, we generate the polynomial invariant ideal of just one permutation iteratively until we reach the fixed point. As a result we have to perform less Gr\"obner basis computations in the process of invariant generation. A data-driven approach to invariant generation is given in~\cite{datadriveninvariants}, where concrete program executions are used to generate invariant candidates. Machine learning is then used to infer polynomial invariants from the candidate ones. In our work we do not use invariant candidates. While the program flow in our programming model is more restricted then~\cite{datadriveninvariants}, to the best of our knowledge, none of the above cited methods can fully handle the polynomial arithmetic of extended P-solvable loops. \section{Preliminaries} \label{sec:prelims} \subsection{Programming Model and Invariants}\label{sec:programming-model} Let $\set K$ be a computable field of characteristic zero. This means that addition and multiplication can be carried out algorithmically, that there exists an algorithm to test if an element in $\set K$ is zero, and that the field of rational numbers~$\set Q$ is a subfield of $\set K$. For variables $x_1,\dots,x_n$, the ring of multivariate polynomials over $\set K$ is denoted by $\set K[x_1,\dots,x_n]$, or, if the number of variables is clear from (or irrelevant in) the context, by $\set{K}[\fls{x}]$. Correspondingly, $\set K(x_1,\dots,x_m)$ or $\set K(\fls{x})$ denotes the field of rational functions over $\set K$ in $x_1,\dots,x_m$. If every polynomial in $\set K[x]$ with a degree $\geq 1$ has at least one root in $\set K$, then $\set K$ is called algebraically closed. An example for such a field is $\overline{\set Q}$, the field of algebraic numbers. In contrast, the field of complex numbers $\set C$ is algebraically closed, but not computable, and $\set Q$ is computable, but not algebraically closed. We suppose that $\set K$ is always algebraically closed. This is not necessary for our theory, as we only need the existence of roots for certain polynomials, which is achieved by choosing~$\set K$ to be an appropriate algebraic extension field of $\set Q$. It does, however, greatly simplify the statement of our results. In our framework, we consider a program $B$ to be a loop of the form \begin{equation} \label{eq:program} \begin{tabular}{l} \reserved{while}\ \dots\ \reserved{do}\\ \quad $B'$\\ \reserved{end~while} \end{tabular} \end{equation} where $B'$ is a program block that is either the empty block~$\epsilon$, an assignment $v_i=f(v_1,\dots,v_m)$ for a rational function $f\in\set K(x_1,\dots,x_m)$ and program variables $v_1,\dots,v_m$, or has one of the composite forms \begin{equation*} \setlength{\tabcolsep}{12pt} \begin{tabular}{l|l|l} \text{sequential} & \hspace{4px}\text{inner loop} & \hspace{3px}\text{conditional}\\ & & \\ \ & \reserved{while}\ \dots\ \reserved{do} & \reserved{if}\ \dots\ \reserved{then}\\ \hspace{5px}$B_1; B_2$ & \quad $B_1$ & \quad $B_1$\ \reserved{else}\ $B_2$\\ \ & \reserved{end~while} & \reserved{end~if} \end{tabular} \end{equation*} for some program blocks $B_1$ and $B_2$ and the usual semantics. We omit conditions for the loop and if statements, as the problem of computing all polynomial invariants is undecidable when taking affine equality tests into account~\cite{olm}. Consequently, we regard loops as non-deterministic programs in which each block of consecutive assignments can be executed arbitrarily often. More precisely, grouping consecutive assignments into blocks $B_1,\dots,B_r$, any execution path of $B$ can be written in the form \[B_1^{n_1};B_2^{n_2};\dots;B_r^{n_r};B_1^{n_{r+1}};B_2^{n_{r+2}};\dots\] for a sequence $(n_i)_{i\in\set N}$ of non-negative integers with finitely many non-zero elements. To that effect, we interpret any given program~\eqref{eq:program} as the set of its execution paths, written as { \setlength\abovedisplayskip{2pt}% \setlength\belowdisplayskip{2pt}% \[B=(B_1^*;B_2^*;\dots;B_r^*)^*.\] } We adapt the well-established Hoare triple notation \begin{equation} \label{eq:hoare} \{P\}B\{Q\}, \end{equation} for program specifications, where $P$ and $Q$ are logical formulas, called the pre- and postcondition respectively, and $B$ is a program. In this paper we focus on partial correctness of programs, that is a Hoare triple~\eqref{eq:hoare} is correct if every terminating computation of $B$ which starts in a state satisfying $P$ terminates in a state that satisfies $Q$. In this paper we are concerned with computing polynomial invariants for a considerable subset of loops of the form~\eqref{eq:program}. These invariants are algebraic dependencies among the loop variables that hold after any number of loop iterations. \begin{definition} A polynomial $p\in\set K[x_1,\dots,x_m]$ is a polynomial loop invariant for a loop $B=B_1^*;\dots;B_r^*$ in the program variables $v_1,\dots,v_m$ with initial values $v_1(0),\dots,v_m(0)$, if for every sequence $(n_i)_{i\in\set N}$ of non-negative integers with finitely many non-zero elements, the Hoare triple { \setlength\abovedisplayskip{1pt}% \setlength\belowdisplayskip{1pt}% \begin{align*} & \{p(v_1,\dots,v_m)=0\wedge\bigwedge_{i=0}^m v_i=v_i(0)\}\\ &\quad B_1^{n_1};B_2^{n_2}\dots,B_r^{n_r};B_1^{n_{r+1}};\dots\\[5px] & \{p(v_1,\dots,v_m)=0\} \end{align*} }% is correct. \end{definition} \subsection{Polynomial Rings and Ideals} \label{sec:ideals} Polynomial invariants are algebraic dependencies among the values of the variables at each loop iteration. Obviously, non-trivial dependencies do not always exist. \begin{definition} Let $\set L\mathbin{/}\set{K}$ be a field extension. Then ${a_1,\dots,a_n \in\set L}$ are \emph{algebraically dependent} over $\set{K}$ if there exists a $p \in \set{K}[x_1,\dots,x_n]\setminus\{0\}$ such that $p(a_1,\dots,a_n) = 0$. Otherwise they are called \emph{algebraically independent}. \end{definition} In~\cite{laura,kapur}, it is observed that the set of all polynomial loop invariants for a given loop forms an ideal. It is this fact that facilitates all of our subsequent reasoning. \begin{definition} A subset $\mathcal{I}$ of a commutative ring $R$ is called an \emph{ideal}, written $\mathcal{I}\vartriangleleft R$, if it satisfies the following three properties: \begin{enumerate} \item $0\in\mathcal{I}$. \item For all $a,b\in\mathcal{I}$: $a+b\in\mathcal{I}$. \item For all $a\in\mathcal{I}$ and $b\in R$: $a\cdot b\in\mathcal{I}$. \end{enumerate} \end{definition} \goodbreak \begin{definition} Let $\mathcal{I}\vartriangleleft R$. Then $\mathcal{I}$ is called \begin{itemize} \item \emph{proper} if it is not equal to $R$, \item \emph{prime} if $a \cdot b \in\mathcal{I}$ implies $a\in\mathcal{I}$ or $b\in\mathcal{I}$, and \item \emph{radical} if $a^n\in\mathcal{I}$ implies $a\in\mathcal{I}$. \end{itemize} % The \emph{height} $\operatorname{hg}(\mathcal{I})\in\set N$ of a prime ideal $\mathcal{I}$ is equal to $n$ if $n$ is the maximal length of all possible chains of prime ideals $\mathcal{I}_0\subset \mathcal{I}_2\subset\dots\subset \mathcal{I}_n=\mathcal{I}$. \end{definition} \begin{example} The set of even integers $2\set{Z}$ is an ideal of $\set{Z}$. In general $n\set{Z}$ for a fixed integer $n$ is an ideal of $\set{Z}$. It is prime if and only if $n$ is a prime number. \end{example} Polynomial ideals can informally be interpreted as the set of all consequences when it is known that certain polynomial equations hold. In fact, if we have given a set $P$ of polynomials of which we know that they serve as algebraic dependencies among the variables of a given loop, the ideal generated by~$P$ then contains all the polynomials that consequently have to be polynomial invariants as well. \begin{definition} A subset $B\subseteq\mathcal{I}$ of an ideal $\mathcal{I}\vartriangleleft R$ is called a \emph{basis} for $\mathcal{I}$ if \begin{equation*} \mathcal{I}=\langle B\rangle :=\{a_0b_0+\dots+a_mb_m\mid m\in\set N, a_0,\dots,a_m\in R,b_0\dots,b_m\in B\}. \end{equation*} We say that $B$ \emph{generates} $\mathcal{I}$. \end{definition} A basis for a given ideal in a ring does not necessarily have to be finite. However, a key result in commutative algebra makes sure that in our setting we only have to consider finitely generated ideals. \begin{theorem}[Hilbert's Basis Theorem -- Special case] Every ideal in $\set{K}[\fls{x}]$ has a finite basis. \end{theorem} Subsequently, whenever we say we are given an ideal $\mathcal{I}$, we mean that we have given a finite basis of $\mathcal{I}$. There is usually more than one basis for a given ideal and some are more useful for certain purposes than others. In his seminal PhD thesis~\cite{Buchberger06}, Buchberger introduced the notion of Gr\"obner bases for polynomial ideals and an algorithm to compute them. While, for reasons of brevity, we will not formally define these bases, it is important to note that with their help, central questions concerning polynomial ideals can be answered algorithmically. \begin{theorem} \label{thm:gb} Let $p\in\set K[x_1,\dots,x_n]$ and $\mathcal{I},\mathcal{J}\vartriangleleft\set K[x_1,\dots,x_n]$. There exist algorithms to decide the following problems. \begin{enumerate} \item Decide if $p$ is an element of $\mathcal{I}$. \item Compute a basis of $\mathcal{I}+ \mathcal{J}$. \item Compute a basis of $\mathcal{I}\cap \mathcal{J}$. \item For $\{\tilde{x}_1,\dots\tilde{x}_m\}\subseteq\{x_1,\dots,x_n\}$, compute a basis of $\mathcal{I}\cap \set K[\tilde{x}_1,\dots,\tilde{x}_m]$. \item Let $q\in\set{K}[\fls{x}]$. Compute a basis for { \setlength\abovedisplayskip{5pt plus 2pt minus 2pt}% \setlength\belowdisplayskip{5pt plus 2pt minus 2pt}% \[\mathcal{I}\mathbin{:}\langle q\rangle^\infty:=\{q\in\set{K}[\fls{x}]\mid \exists n\in\set N: q^np\in\mathcal{I}\}.\] } The ideal $\mathcal{I}\mathbin{:}\langle q\rangle^\infty\kern-1pt$ is called the \emph{saturation} of $\mathcal{I}$ with respect to $q$. \end{enumerate} \end{theorem} We will use Gr\"obner bases to compute the ideal of all algebraic relations among given rational functions. For this, we use the polynomials $q_iy_i-p_i$ to model the equations $y_i=q_i/p_i$ by multiplying the equation with the denominator. In order to model the fact that the denominator is not identically zero, and therefore allowing us to divide by it again, we use the saturation with respect to the least common multiple of all denominators. To see why this is necessary, consider $y_1=y_2=\frac{x_1}{x_2}$. An algebraic relation among $y_1$ and $y_2$ is $y_1-y_2$, but with the polynomials $x_2y_1-x_1$ and $x_2y_2-x_1$, we only can derive $x_2(y_1-y_2)$. We have to divide by $x_2$. \begin{theorem} Let $r_1,\dots,r_m\in\set K(\fls{x})$ and let the numerator of $r_i\kern-2pt$ be given by $p_i\in\set{K}[\fls{x}]$ and the denominator by $q_i\in\set{K}[\fls{x}]$. The ideal of all polynomials $p$ in $\set K[\fls{y}]$ with $p(r_1,\dots,r_m)=0$ is given by \[\biggl(\smash{\sum_{i=1}^m}\langle q_iy_i-p_i\rangle\biggr)\mathbin{:}\langle\operatorname{lcm}(q_1,\dots,q_m)\rangle^\infty\cap \set K[\fls{y}],\] where $\operatorname{lcm}(\dots)$ denotes the least common multiple. \end{theorem} \begin{proof} Write $d:=\operatorname{lcm}(q_1,\dots,q_m)$. The theorem can be easily verified from the fact that, for any given $p$ with $p(r_1,\dots,r_m)=0$, there exists a $k\in\set N$ such that $d^kp(r_1,\dots,r_m)=0$ is an algebraic relation for $p_1,\dots,p_m$ (by clearing denominators in the equation $p(r_1,\dots,r_m)=0).$ \end{proof} A polynomial ideal $\mathcal{I}\vartriangleleft \set{K}[\fls{x}]$ gives rise to a set of points in~$\set K^n$ for which all polynomials in $\mathcal{I}$ vanish simultaneously. This set is called a \emph{variety}. \begin{definition} Let $\mathcal{I} \vartriangleleft \set{K}[x_1,\dots,x_n]$ be an ideal. The set { \setlength\abovedisplayskip{5pt plus 2pt minus 2pt}% \setlength\belowdisplayskip{5pt plus 2pt minus 2pt}% \[ V(\mathcal{I}) = \{ (a_1,\dots,a_n) \in \set{K}^n \mid p(a_1,\dots,a_n) = 0~\text{for all}~p\in\mathcal{I} \},\] }is the \emph{variety} defined by $\mathcal{I}$. \end{definition} Varieties are one of the central objects of study in algebraic geometry. Certain geometric shapes like points, lines, circles or balls can be described by prime ideals and come with an intuitive notion of a dimension, e.g.\ points have dimension zero, lines and circles have dimension one and balls have dimension two. The notion of the Krull dimension of a ring formalizes this intuition when being applied to the quotient ring $\set{K}[\fls{x}]/\mathcal{I}$. In this paper, we will use the Krull dimension to provide an upper bound for the number of necessary iterations of our algorithm. \begin{definition} The \emph{Krull dimension} of a commutative ring $R$ is the supremum of the lengths of all chains $\mathcal{I}_0\subset\mathcal{I}_1\subset\dots $ of prime ideals. \end{definition} \begin{theorem}\label{thm:finitedimension} The Krull dimension of $\set K[x_1,\dots,x_n]$ is equal to $n$. \end{theorem} \section{Extended P-Solvable Loops} In~\cite{issac2017} the class of \emph{P-solvable} loops~\cite{reasoningalgebraically} was extended to so-called \emph{extended P-solvable} loops. So far, this class captures loops with assignments only, i.e.~loops without any nesting of conditionals and loops. In Section~\ref{sec:loopcond} we close this gap by introducing a new approach for computing invariants of multi-path loops which generalizes the algorithm proposed in~\cite{completeinvariant}. Before dealing with multi-path loops, we recall the notion of extended P-solvable loops in Section~\ref{sec:loopass} and showcase the invariant ideal computation. \subsection{Loops with assignments only}\label{sec:loopass} In this section, we restrain ourselves to loops whose bodies are comprised of rational function assignments only. This means that we restrict the valid composite forms in a program of the form~\eqref{eq:program} to sequential compositions and, for the moment, exclude inner loops and conditional branches. We therefore consider a loop $L=B_1^*$ where $B_1$ is a single block containing only variable assignments. Each variable $v_i$ in a given loop of the form~\eqref{eq:program} gives rise to a sequence $(v_i(n))_{n\in\set{N}}$, where $n$ is the number of loop iterations. The class of eligible loops is then defined based on the form of these sequences. Let $r\fn{x}$ denote the \emph{falling factorial} defined as ${\prod_{i=0}^{n-1}r(x-i)}$ for any $r\in\set{K}(x)$ and $n\in\set{N}$. \begin{definition}\label{def:extendedpsolvable} A loop with assignments only is called \emph{extended P-solvable} if each of its recursively changed variables determines a sequence of the form % \begin{equation} \label{eq:psolvable} v_i(n)=\sum_{j\in\set Z^\ell}p_{i,j}(n,\theta_1^n,\dots,\theta_k^n)((n+\zeta_1)^{\underline n})^{j_1}\cdots ((n+\zeta_\ell)^{\underline n})^{j_\ell} \end{equation} % where $k,\ell\in\set N$, the $p_{i,j}$ are polynomials in $\set K(x)[y_1,\dots,y_k]$, not identically zero for finitely many $j\in\set Z^\ell$, the $\theta_i$ are elements of $\set K$ and the $\zeta_i$ are elements of $\set K\setminus\set Z^-$ with $\theta_i\neq\theta_j$ and $\zeta_i-\zeta_j\notin\set Z$ for $i\neq j$. \end{definition} Definition~\ref{def:extendedpsolvable} extends the class of P-solvable loops in the sense that each sequence induced by an extended P-solvable loop is the sum of a finitely many hypergeometric sequences. This comprises C-finite sequences as well as hypergeometric sequences and sums and Hadamard products of C-finite and hypergeometric sequences. In contrast, P-solvable loops induce C-finite sequences only. For details on C-finite and hypergeometric sequences we refer to~\cite{kauers}. Every sequence of the form~\eqref{eq:psolvable} can be written as { \setlength\abovedisplayskip{5pt plus 2pt minus 2pt}% \setlength\belowdisplayskip{5pt plus 2pt minus 2pt}% \[ \smash{v^{(1)}_j}\kern-2pt = \smash{r_j(\fls{v}^{(0)}}\kern-2pt,\fls{\theta},(n + \fls{\zeta})^{\underline n}, n) \] }where $r_j=p_i/q_i$ is a rational function, and $v^{(0)}$ and $v^{(1)}$ denote the values of $v$ before and after the execution of the loop. Let $I(\fls{\theta},\fls{\zeta})\vartriangleleft \set{K}[y_0,\dots,y_{k+\ell}]$ be the ideal of all algebraic dependencies in the variables $y_0,\dots,y_{k+\ell}$ between the sequence $(n)_{n\in\set N}$, the exponential sequences $\theta_1^n,\dots,\theta_k^n$ and the sequences $(n+\zeta_1)^{\underline{n}},\dots,(n+\zeta_\ell)^{\underline{n}}$. Note that it was shown in~\cite{issac2017} that this ideal is the same as the extension of the ideal $I(\fls{\theta})\vartriangleleft\set K[y_0,\dots,y_k]$ of all algebraic dependencies between the $\theta^n\kern-2pt$ in $\set K[y_0,\dots,y_k]$ to $\set K[y_0,\dots,y_{k+\ell}]$, as the factorial sequences $(n+\zeta_i)^{\underline{n}}$ are algebraically independent from the exponential sequences $\theta_i^n$. Now the following proposition states how the invariant ideal of an extended P-solvable loop can be computed. \begin{proposition}[\cite{issac2017}] \label{prop:psolvableideal} For an extended P-solvable loop with program variables $v_1,\dots,v_m$ the invariant ideal is given by % \[\Biggl(\Biggl(\sum_{j=1}^m \bigl\langle\smash{q_j(\fls{v}^{(0)}\kern-2pt,\fls{y})v^{(1)}_j}\kern-2pt - \smash{p_j(\fls{v}^{(0)}}\kern-2pt,\fls{y}) \bigr\rangle\Biggr)\mathbin{:}\langle \operatorname{lcm}(q_1,\dots,q_m)\rangle^\infty + I(\fls{\theta},\fls{\zeta})\Biggr) \cap \set{K}[\fls{v}^{(1)}\kern-2pt, \fls{v}^{(0)}].\] % \end{proposition} \begin{example} \newcommand{\lc}[1]{^{(#1)}\kern-2pt} \newcommand{\lcc}[1]{^{(#1)}} Consider the following loop with relevant program variables $a,b$ and $c$. % \begin{equation*} \begin{tabular}{ll} \reserved{while}\ true\ \reserved{do}\\ \quad $a\ass 2\cdot (n+1)(n+\frac{3}{2})\cdot a$\\ \quad $b\ass 4\cdot (n+1)\cdot b$\\ \quad $c\ass \frac{1}{2}\cdot (n+\frac{3}{2})\cdot c$\\ \quad $n\ass n+1$\\ \reserved{end~while}\\ \end{tabular} \end{equation*} % The extracted recurrence relations admit the following system of closed form solutions: % { \setlength\abovedisplayskip{0pt plus 2pt minus 2pt}% \setlength\belowdisplayskip{8pt plus 2pt minus 2pt}% \begin{align*} a_n &= 2^n\cdot a_0\cdot\fn{n}\cdot\fn{n+\frac{1}{2}},\\ b_n &= 4^n\cdot b_0\cdot\fn{n},\\ c_n &= 2^{-n}\cdot c_0\cdot\fn{n+\frac{1}{2}}. \end{align*} % }Since every closed form solution is of the form~(\ref{eq:psolvable}) we have an extended P-solvable loop, and we can apply Proposition~\ref{prop:psolvableideal} to compute the invariant ideal: % \begin{align*} (\mathcal{I} + I(\fls{\theta},\fls{\zeta})) \cap \set{K}[a\lc{1},b\lc{1},c\lc{1},a\lc{0},b\lc{0},c\lcc{0}] = \langle b\lc{1} \cdot c\lc{1} \cdot a\lc{0} - a\lc{1} \cdot b\lc{0} \cdot c\lcc{0} \rangle, \end{align*} % where % \begin{alignat*}2 &\mathcal{I} &\;=\;& \langle a\lc{1} - y_1\cdot a\lc{0} \cdot z_1 z_2, b\lc{1} - y_2\cdot b\lc{0} \cdot z_1, c\lc{1} - y_3\cdot c\lc{0} \cdot z_2 \rangle,\\ &I(\fls{\theta},\fls{\zeta}) &\;=\;& \langle y_1^2 - y_2, y_1 y_3 - 1, y_2 y_3 - y_1 \rangle. \end{alignat*} % The ideal $I(\fls{\theta},\fls{\zeta})$ in variables $y_1,y_2,y_3$ is the set of all algebraic dependencies among $2^n,4^n$ and $2^{-n}$, and $\mathcal{I}$ is generated by the closed form solutions where exponential and factorial sequences are replaced by variables $y_1,y_2,y_3$ and $z_1,z_2$. \end{example} \subsection{Algebraic Dependencies of Composed Rational Functions with Side Conditions} \label{sec:dependencies} In this section we give the prerequisites for proving termination of the invariant generation method for multi-path loops (Section~\ref{sec:loopcond}). The results of this section will allow us to proof termination by applying Theorem~\ref{thm:finitedimension}. Let $\fls{v}^{(i)} = v_1^{(i)},\dots,v_m^{(i)}$ and $\fls{y}^{(i)} = y_1^{(i)},\dots,y_\ell^{(i)}$ for $i\in\set N$. We model the situation in which the value of the $j$th loop variable after the execution of the $i$th block in~\eqref{eq:program} is given by a rational function in the $\fls{y}^{(i)}$ (which, for us, will be the exponential and factorial sequences as well as the loop counter) and the \lq old\rq\ variable values $\fls{v}^{(i-1)}$ and is assigned to $v_j^{(i)}$. Set ${\mathcal{I}_0=\sum_{j=1}^m\langle v^{(1)}_j\kern-2pt-v^{(0)}_j\rangle}$ and let ${I_i\vartriangleleft\set{K}[\fls{y}^{(i)}]}$ for $i\in\set N^*$. Furthermore, let $q^{(i)}_j,p^{(i)}_j\kern-2pt\in\set{K}[\fls{v}^{(i)}\kern-2pt,\fls{y}^{(i)}]$ such that for fixed~$i$ there exists a $\fls{y}\in V(I_i)$ with ${p_j^{(i)}(\fls{v}^{(i)}\kern-2pt,\fls{y})/q_j^{(i)}(\fls{v}^{(i)}\kern-2pt,\fls{y})=\fls{v}^{(i)}_j\kern-2pt}$ for all $j$ and with $d_i:=\operatorname{lcm}(q^{(i)}_1,\dots,q^{(i)}_m)$ we have $d_i\notin I_i$ and $d_i(\fls{v_i},\fls{y})=1$. Set { \setlength\abovedisplayskip{5pt plus 2pt minus 2pt}% \setlength\belowdisplayskip{5pt plus 2pt minus 2pt}% \[J_i=\sum_{j=1}^{m}\langle q^{(i)}_j(\fls{v}^{(i)}\kern-2pt,\fls{y}^{(i)})v^{(i+1)}_j\kern-2pt-p^{(i)}_j(\fls{v}^{(i)}\kern-2pt,\fls{y}^{(i)})\rangle.\]\vspace{-10pt} }\begin{remark} The requirement for the existence of a point $\fls{y}$ in $V(I_i)$ such that ${p_j^{(i)}(\fls{v}^{(i)}\kern-2pt,\fls{y})/q_j^{(i)}(\fls{v}^{(i)}\kern-2pt,\fls{y})=\fls{v}^{(i)}_j\kern-2pt}$ for all $j$ and $d_i(\fls{v_i},\fls{y})=1$ is always fulfilled in our context, as it is a formalization of the fact that the execution of a loop $L^*$ also allows that it is executed zero times, meaning the values of the program variables do not change. \end{remark} In order to develop some intuition about the following, consider a list of consecutive loops $L_1;L_2;L_3;\dots$ where each of them is extended P-solvable. Intuitively, the ideals $I_i$ then correspond to the ideal of algebraic dependencies among the exponential and factorial sequences occurring in $L_i$, whereas $J_i$ stands for the ideal generated by the closed form solutions of $L_i$. Moreover, the variables $v_j^{(i+1)}$ correspond to the values of the loop variables after the execution of the loop $L_i$. The following iterative computation then allows us to generate the invariant ideal for $L_1;L_2;L_3;\dots$ \[\mathcal{I}_i:=((J_i+\mathcal{I}_{i-1}+I_i)\mathbin{:}\langle d_i\rangle^\infty)\cap \set{K}[\fls{v}^{(i+1)}\kern-2pt,\fls{v}^{(0)}] \] Now the remaining part of this section is devoted to proving properties of the ideals $\mathcal{I}_i$ which will help us to show that there exists an index $k$ such that $\mathcal{I}_k = \mathcal{I}_{k'}$ for all $k' > k$ for a list of consecutive loops $L_1;\dots;L_r;L_1;\dots;L_r;\dots$ with $r\in\set{N}$. First note that the ideal $\mathcal{I}_i$ can be rewritten as \begin{align} \label{eq:ideal} \mathcal{I}_{i}=\{p&\in\smash{\set{K}[\fls{v}^{(i+1)}\kern-2pt,\fls{v}^{(0)}]}\mid \exists q\in \mathcal{I}_{i-1},k\in\set N: \notag\\ & q\equiv \smash{d_i^kp(r^{(i)}_1(\fls{v}^{(i)}\kern-2pt,\fls{y}^{(i)}),\dots,r^{(i)}_m(\fls{v}^{(i)}\kern-2pt,\fls{y}^{(i)}),\fls{v}^{(0)})} \;\;(\operatorname{\mathbf{mod}}\; I_i)\}. \end{align} If $I_i$ is radical, an equation $\mathbf{mod}\; I_i$ is, informally speaking, the same as substituting~$\fls{y}$ with values from $V(I_i)$, so~\eqref{eq:ideal} translates to \begin{align} \label{eq:radical} \mathcal{I}_{i}=\{p&\in\smash{\set{K}[\fls{v}^{(i+1)}\kern-2pt,\fls{v}^{(0)}]} \mid \exists q\in \mathcal{I}_{i-1},k\in\set N: \notag\\ &\forall\fls{y}\in V(I_i) : q=\smash{d_i^kp(r^{(i)}_1(\fls{v}^{(i)}\kern-2pt,\fls{y}),\dots,r^{(i)}_m(\fls{v}^{(i)}\kern-2pt,\fls{y}),\fls{v}^{(0)})}\}. \end{align} We now get the following subset relation between two consecutively computed ideals $\mathcal{I}_i$. \begin{lemma} \label{lem:radical} If $I_i$ is radical, then $\mathcal{I}_i \subseteq \mathcal{I}_{i-1}|_{\fls{v}^{(i-1)}\leftarrow \fls{v}^{(i)}}$. \end{lemma} \begin{proof} Let $p\in\mathcal{I}_i$. We have to show that there is an $r\in\mathcal{I}_{i-2}$ and a $k\in\set N$ such that \[r\equiv d_{i-1}^k\smash{p(r_1^{(i-1)}(\fls{v}^{(i-1)}\kern-2pt,\fls{y}^{(i-1)}),\dots,r^{(i-1)}_m(\fls{v}^{(i-1)}\kern-2pt,\fls{y}^{(i-1)}),\fls{v}^{(0)})}\;\;(\operatorname{\mathbf{mod}}\; I_{i-1}).\] Since $I_i$ is radical, there is a $q\in \mathcal{I}_{i-1}$, a $z\in\set N$, and a $\fls{y}\in V(I_i)$ with \[q=d_i^z\smash{p(r^{(i)}_1(\fls{v}^{(i)}\kern-2pt,\fls{y}),\dots,r^{(i)}_m(\fls{v}^{(i)}\kern-2pt,\fls{y}),\fls{v}^{(0)}) = p(\fls{v}^{(i)}\kern-2pt,\fls{v}^{(0)})}.\] Then, by Equation~\eqref{eq:ideal} for $\mathcal{I}_{i-1}$, there is an $r\in \mathcal{I}_{i-2}$ with the desired property. \end{proof} For prime ideals, we get an additional property: \begin{lemma} \label{lem:prime} If $\mathcal{I}_{i-1}$ and $I_i$ are prime, then so is $\mathcal{I}_i$. \end{lemma} \begin{proof} Let $a\cdot b\in \mathcal{I}_i$ and denote by $a|_r$ and $b|_r$ the rational functions where each $v_j^{(i+1)}$ is substituted by $r^{(i)}_j$ in $a,b$ respectively. Then there is a $q\in \mathcal{I}_{i-1}$ and a $k=k_1+k_2\in\set N$ with $d_i^{k_1}a|_r,d_i^{k_2}b|_r\in\set{K}[\fls{v}^{(i+1)}\kern-2pt,\fls{v}^{(0)}]$ \[q\equiv d_i^k(a\cdot b)|_{r} \equiv d_i^{k_1}a|_{r}\cdot d_i^{k_2}b|_{r} \;\;(\operatorname{\mathbf{mod}}\; I_i)\] If $d_i^ka|_r$ is zero modulo $I_i$, then $a$ is an element of $\mathcal{I}_i$, as $0\in\mathcal{I}_{i-1}$. The same argument holds for $b$. Suppose that $d_i^{k_1}a|_r,d_i^{k_2}b|_r\not\equiv 0\;(\operatorname{\mathbf{mod}}\; I_i)$. Then, since $I_i$ is prime, $\set{K}[\fls{y}^{(i)}]/I_i$ is an integral domain, and so it follows that $q\not\equiv 0\;(\operatorname{\mathbf{mod}}\; I_i)$. Now, because $\mathcal{I}_{i-1}$ is prime, it follows without loss of generality that $d_i^{k_1}a|_r\in\mathcal{I}_{i-1}$, from which we get $a\in\mathcal{I}_i$. \end{proof} We now use Lemmas~\ref{lem:radical} and~\ref{lem:prime} to give details about the minimal decomposition of $\mathcal{I}_i$. \begin{proposition} \label{prop:mindec} For fixed $i_0\in\set N$, let all $I_i$, $0\leq i \leq i_0$ be radical and let $\mathcal{I}_{i_0}=\smash{\bigcap_{k=0}^{n}} P_k$ be the minimal decomposition of $\mathcal{I}_{i_0}$. Then \begin{enumerate} \item for each $k$ there exist prime ideals $I_{k,1},I_{k,2},\dots$ such that $P_k$ is equal to a $\mathcal{I}_{k,{i_0}}$ constructed as above with $J_1,\dots,J_{i_0}$ and $I_{k,1},\dots,I_{k,{i_0}}$. \item if $I_{i_0+1}$ is radical and $\mathcal{I}_{{i_0}+1}=\smash{\bigcap_{j=0}^{n'}} P'_j$ is the minimal decomposition of $\mathcal{I}_{i+1},$ then, for each $P'_j$ there exists a $P_k$ such that $P'_j\subseteq P_k|_{\fls{v}^{(i_0)}\leftarrow \fls{v}^{(i_0+1)}}$. \end{enumerate} \end{proposition} \begin{proof} We prove 1.\ by induction. For $i_0=0$, there is nothing to show. Now assume the claim holds for some $i_0\in\set N$ and let $I_{i_0+1}=\smash{\bigcap_{j=0}^w} Q_j$ be the minimal decomposition of $I_{i_0+1}$. With this we get \begin{align*} \mathcal{I}_{i_0+1} & = (J_{i_0+1}+\mathcal{I}_{i_0}+I_{i_0+1})\mathbin{:}\langle d_{i_0+1}\rangle^\infty\cap \set{K}[\fls{v}^{(i_0+1)}\kern-2pt,\fls{v}^{(0)}]\\[6pt] & = \left(\bigcap_{k=0}^n J_{i_0+1} + P_k + \bigcap_{j=0}^w Q_j\right)\mathbin{:}\langle d_{i_0+1}\rangle^\infty\cap \set{K}[\fls{v}^{(i+1)}\kern-2pt,\fls{v}^{(0)}]\\ & = \raisebox{-1.5pt}{$\Biggl($}\bigcap_{k=0}^n\bigcap_{j=0}^w \underbrace{(J_{i_0+1}+P_k+Q_j)\mathbin{:}\langle d_{i_0+1}\rangle^\infty\cap \set{K}[\fls{v}^{(i_0+1)}\kern-2pt,\fls{v}^{(0)}]}_{\tilde{I}_{k,j}}\raisebox{-1.5pt}{$\Biggr)$}. \end{align*} By the induction hypothesis, each $P_k$ admits a construction as above, and thus so does $\tilde{I}_{k,j}$. By Lemma~\ref{lem:prime}, $\tilde{I}_{k,j}$ is prime. This shows 1. The second claim then follows from the fact that the prime ideals in the minimal decomposition of $\mathcal{I}_{i_0+1}$ are obtained from the $P_k$ via $J_{i_0+1}$ and $Q_j$. Since the $Q_j$ are prime, they are also radical, and the claim follows from Lemma~\ref{lem:radical}. \end{proof} \subsection{Loops with conditional branches}\label{sec:loopcond} In this section, we extend the results of Section~\ref{sec:loopass} to loops with conditional branches. Without loss of generality, we define our algorithm for a loop of the form \[\reserved{while}\ \dots\ \reserved{do}\ L_1;L_2;\dots;L_r\ \reserved{end~while}\] where $L_i = B_i^*$ and $B_i$ is a block containing variable assignments only. Let $I(\fls{\theta}_i,\fls{\zeta}_i)$ denote the ideal of all algebraic dependencies as described in Section~\ref{sec:loopass} for a inner loop $L_i$. As every inner loop provides its own loop counter, we have that the exponential and factorial sequences of distinct inner loops are algebraically independent. Therefore $I(\fls{\theta},\fls{\zeta}) := \sum_{i=0}^r I(\fls{\theta}_i,\fls{\zeta}_i)$ denotes the set of all algebraic dependencies between exponential and factorial sequences among the inner loops $L_1,\dots,L_r$. Consider loop bodies $B_1,\dots,B_r$ with common loop variables $v_1,\dots,v_m$. Suppose the closed form of $v_j$ in the $i$th loop body is given by a rational function in $m+k+\ell+1$ variables: \[\smash{v^{(i+1)}_j}\kern-2pt = \smash{r^{(i)}_j(\fls{v}^{(i)}}\kern-2pt,\fls{\theta}^n,(n+\fls{\zeta})^{\underline{n}},n),\] where $\smash{v^{(i)}_j}\kern-2pt$ and $\smash{v^{(i+1)}_j}\kern-2pt$ are variables for the value of $v_j$ before and after the execution of the loop body. Then we can compute the ideal of all polynomial invariants of the non-deterministic program $(B_1^*;B_2^*;\dots;B_r^*)^*$ with Algorithm~\ref{alg:polyinv-mutlipath}. \begin{algorithm} \caption{Invariant generation via fixed point computation} \label{alg:polyinv-mutlipath} \begin{algorithmic}[1] \vskip.5\baselineskip \Require{Loop bodies $B_1,\dots,B_r$ as described.} \Ensure{The ideal of all polynomial invariants of $(B_1^*;B_2^*;\dots;B_r^*)^*$.} \algrule \State Compute $I:=I(\fls{\theta},\fls{\zeta})$ as described above \label{line:algdep} \State $\mathcal{I}_{old}=\{0\}$, $\mathcal{I}_{new}=\smash{\sum_{j=1}^m\langle v^{(1)}_j-v^{(0)}_i\rangle}$, $j=0$ \While{$\mathcal{I}_{old}|_{\fls{v}^{((j-1)\cdot r + 1)}\leftarrow \fls{v}^{(j\cdot r+1)}}\neq \mathcal{I}_{new}$~\algorithmicand~$\mathcal{I}_{new}\neq \{0\}$}\label{line:loop} \State $\mathcal{I}_{old} \gets \mathcal{I}_{new}$, $j \gets j+1$ \For{$i=1,\dots,r$} \State $\mathcal{I}_{new} \gets (J_{i\cdot j}+\mathcal{I}_{old}+I)\cap \set{K}[\fls{v}^{(i\cdot j+1)},\fls{v}^{(0)}]$ \EndFor \EndWhile \State \Return $\mathcal{I}_{new}$ \end{algorithmic} \end{algorithm} \goodbreak \begin{lemma} \label{lem:seq} $I(\fls{\theta},\fls{\zeta})$ is a radical ideal. \end{lemma} \begin{proof} The elements of $I(\fls{\theta})$ represent C-finite sequences, i.e.\ sequences of the form \[f_1(n)\theta_1^n+\dots+f_k^n\theta_k^n,\] for univariate polynomials $f_1,\dots,f_k\in\set K[y_0]$ and pairwise distinct $\theta_1,\dots,\theta_k\in\set K$. The claim is then proven by the fact that the Hadamard-product $a^2(n,a(0))$ of a C-finite sequence $a(n,a(0))$ with itself is zero if and only if $a(n,a(0))$ is zero, and $I(\fls{\theta},\fls{\zeta})$ is the extension of $I(\fls{\theta})$ to $\set K[y_0,\dots,y_{k+\ell}]$. \end{proof} \begin{theorem} \label{thm:algo} Algorithm~\ref{alg:polyinv-mutlipath} is correct and terminates. \end{theorem} \begin{proof} The algorithm iteratively computes the ideals $\mathcal{I}_1,\mathcal{I}_2,\dots$ as in Section~\ref{sec:dependencies}, so we will refer to $I_{old}$ and $I_{new}$ as $\mathcal{I}_i$ and $\mathcal{I}_{i+1}$. \textit{Termination:} $\mathcal{I}_0$ is a prime ideal of height $m$. Suppose after an execution of the outer loop, the condition $\mathcal{I}_{i}|_{\fls{v}^{(i)}\leftarrow \fls{v}^{(i+1)}}\neq \mathcal{I}_{i+1}$ holds. As $I(\fls{\theta},\fls{\zeta})$ is radical by Lemma~\ref{lem:seq}, we then get $\mathcal{I}_{i+1}\subset\mathcal{I}_{i}|_{\fls{v}^{(i)}\leftarrow \fls{v}^{(i+1)}}$ by Lemma~\ref{lem:radical}. Thus there is a ${p\in\set{K}[\fls{v}^{(i+1)}\kern-2pt,\fls{v}^{(0)}]}$ with $p\in\mathcal{I}_{i}|_{\fls{v}^{(i)}\leftarrow \fls{v}^{(i+1)}}$ and $p\notin\mathcal{I}_{i+1}$. Then, by Proposition~\ref{prop:mindec}, all prime ideals $P_k$ in the minimal decomposition of $\mathcal{I}_{i+1}$ are have to be subsets of the prime ideals in the minimal decomposition of $\mathcal{I}_{i}|_{\fls{v}^{(i)}\leftarrow \fls{v}^{(i+1)}}$, where at least one of the subset relations is proper. Since $p\notin \mathcal{I}_{i+1}$, the height of at least one $P_k$ has to be reduced. The height of each prime ideal is bounded by the height of $\mathcal{I}_0$. \textit{Correctness:} Let $i\in\set{N}$ be fixed and denote by $I(B;i)\vartriangleleft\set{K}[\fls{v}^{(i+1)},\fls{v}^{(0)}]$ the ideal of all polynomial invariants for the non-deterministic program % \[(B_1^*;\dots;B_r^*)^{\sfrac{i}{r}};B_1^*;\dots;B_{i\;\mathrel{\operatorname{\mathbf{rem}}}\;r}^*.\] It suffices to % show that $\mathcal{I}_i$ is equal to $I(B;i)$. In fact, after $i_0$ iterations with $\mathcal{I}_{i_0}=\mathcal{I}_{i_0+1}=\mathcal{I}_{i_0+2}=\dots$, it follows that $\mathcal{I}_{i_0}$ is the ideal of polynomial invariants for $(B_1^*;\dots;B_r^*)^*\kern-2pt.$ Let $p\in I(B;i)$. The value of the program variable $v_j$ in the program $B_1^*;\dots;B_{i\;\mathrel{\operatorname{\mathbf{rem}}}\;r}^*$ is given as the value of a composition of the closed forms of each $B_k$: % \[v_j= \smash{p^{(i)}_j\bigg(p^{(i-1)}\Big(\dots\big(p^{(1)}(\fls{v}^{(0)}\kern-2pt,\fls{s}_{n_1}),\dots\big),\fls{s}_{n_{i-1}}\Big),\fls{s}_{n_i}\bigg)},\] % with $\fls{s}_n = n,\fls{\theta}^n,(n + \fls{\zeta})^{\underline{n}}$ and $n_1,\dots,n_i\in\set N$. The correctness then follows from the fact that that $\mathcal{I}_i$ is the ideal of all such compositions under the side condition that $(\fls{\theta}^n,(n+\fls{\zeta})^{\underline{n}},n)\in V(I(\fls{\theta},\fls{\zeta}))$ for any $n\in\set N$. \end{proof} Revisiting the subset relations of the prime ideals in the minimal decomposition of $\mathcal{I}_0,\mathcal{I}_1,\dots$ gives an upper bound for the necessary number of iterations in the algorithm. \begin{corollary}\label{cor:bound} Algorithm~\ref{alg:polyinv-mutlipath} terminates after at most $m$ iterations of the {while-loop} at line~\ref{line:loop}. \end{corollary} \begin{proof} Suppose the algorithm terminates after $k_0$ iterations of the outer loop. We look at the ideals $\mathcal{I}_{r\cdot k}$, $k\in\{0,\dots,k_0\}$. For a prime ideal $P$ in the minimal decomposition of any $\mathcal{I}_{r\cdot (k+1)}$, there is a prime ideal $Q$ in the minimal decomposition of $\mathcal{I}_{r\cdot k}$ such that $P\subseteq Q$. If $P=Q$, then $P$ is a prime ideal in the minimal decomposition of each $\mathcal{I}_{r\cdot (k')}$, $k'>k$. This holds because there are only $r$ many $J_i$. So if $Q$ does not get replaced by smaller prime ideals in $\mathcal{I}_{r\cdot k+1},\mathcal{I}_{r\cdot k+2}\dots,\mathcal{I}_{r\cdot (k+1)}$, it has to be part of the minimal decomposition for any subsequent $\mathcal{I}_i$. From this it follows that, for each $k$, there is a prime ideal $P_k$ in the minimal decomposition in $\mathcal{I}_{r\cdot k}$, such that $P_0\supset P_1\supset\dots\supset P_{k_0}$ is a chain of proper superset relations, which then proves the claim since the height of $P_0=\mathcal{I}_0$ is $m$. \end{proof} \begin{example}\label{ex:euclidex} Consider a multi-path loop $L$ % \[\reserved{while}\ \dots\ \reserved{do}~L_1;L_2~\reserved{end~while}\] % containing the following nested loops $L_1$ and $L_2$ and the corresponding closed form solutions: % \begin{center} \begin{minipage}{.22\columnwidth} \center \begin{tabular}{l} \reserved{while}\ \dots\ \reserved{do}\\ \quad $a\ass a - b$\\ \quad $p\ass p - q$\\ \quad $r\ass r - s$\\ \reserved{end~while}\\ \end{tabular} \end{minipage} \begin{minipage}{.22\columnwidth} \center \begin{tabular}{l} \\ $a_n = a_0 - nb_0$\\ $p_n = p_0 - nq_0$\\ $r_n = r_0 - ns_0$\\ \\ \end{tabular} \end{minipage} \qquad \begin{minipage}{.22\columnwidth} \center \begin{tabular}{l} \reserved{while}\ \dots\ \reserved{do}\\ \quad $b\ass b - a$\\ \quad $q\ass q - p$\\ \quad $s\ass s - r$\\ \reserved{end~while}\\ \end{tabular} \end{minipage} \begin{minipage}{.22\columnwidth} \center \begin{tabular}{l} \\ $b_m = b_0 - ma_0$\\ $q_m = q_0 - mp_0$\\ $s_m = s_0 - mr_0$\\ \\ \end{tabular} \end{minipage} \end{center} For simplicity we chose inner loops without algebraic dependencies, i.e.~$I$ at line~\ref{line:algdep} will be the zero ideal and we therefore neglect it in the following computation. Moreover, we write $a_i$ instead of $a^{(i)}$. We start with {% \setlength\abovedisplayskip{5pt}% \setlength\belowdisplayskip{5pt}% \[ \mathcal{I}_0 = \langle a_1-a_0, b_1-b_0, p_1-p_0, q_1-q_0, r_1-r_0, s_1-s_0 \rangle \] }% followed by the first loop iteration: {% \setlength\abovedisplayskip{5pt}% \setlength\belowdisplayskip{5pt}% \begin{align*} \mathcal{I}_1 &=(J_1 + \mathcal{I}_0) \cap \set{K}[a_0,b_0,p_0,q_0,r_0,s_0,a_2,b_2,p_2,q_2,r_2,s_2]\\ &= \langle b_0-b_2,q_0-q_2,s_0-s_2,-p_0 s_2+p_2 s_2+q_2 r_0-q_2 r_2,\\ &\qquad a_0 s_2-a_2 s_2-b_2 r_0+b_2 r_2,a_0 q_2-a_2 q_2-b_2 p_0+b_2 p_2 \rangle \end{align*} }% where {% \setlength\abovedisplayskip{5pt}% \setlength\belowdisplayskip{5pt}% \[ J_1 = \langle a_2-a_1+b_1 n,p_2 - p_1 + q_1 n,r_2 - r_1 + s_1 n,b_2-b_1,q_2-q_1,s_2-s_1 \rangle \] }% The following ideal $\mathcal{I}_2$ is then the invariant ideal for the first iteration of the outer loop $L$. {% \setlength\abovedisplayskip{5pt}% \setlength\belowdisplayskip{5pt}% \begin{align*} \mathcal{I}_2 &=(J_2 + \mathcal{I}_1) \cap \set{K}[a_0,b_0,p_0,q_0,r_0,s_0,a_3,b_3,p_3,q_3,r_3,s_3]\\ &= \langle-p_0 r_3 s_0+p_3 r_3 s_3+p_3 r_0 s_0-p_3 r_0 s_3-q_3 r_3^2+q_3 r_0 r_3,\\ &\qquad -p_3 s_0+p_3 s_3+q_0 r_3-q_3 r_3, -p_0 s_0+p_3 s_3+q_0 r_0-q_3 r_3, \\ &\qquad a_3 s_0-a_3 s_3-b_0 r_3+b_3 r_3, a_0 q_0-a_3 q_3-b_0 p_0+b_3 p_3,\\ &\qquad a_3 p_0 s_3-a_3 p_3 s_3-a_3 q_3 r_0+a_3 q_3 r_3-b_0 p_3 r_0+b_3 p_3 r_0+b_0 p_0 r_3-b_3 p_0 r_3,\\ &\qquad a_3 q_0-a_3 q_3-b_0 p_3+b_3 p_3, a_0 s_0-a_3 s_3-b_0 r_0+b_3 r_3,\\ &\qquad -a_0 p_3 s_3+a_3 p_3 s_3+a_0 q_3 r_3-a_3 q_3 r_3+b_0 p_3 r_0-b_0 p_0 r_3,\\ &\qquad -a_3 b_0 r_0+a_3 b_3 r_3+a_0 b_0 r_3-a_0 b_3 r_3-a_3^2 s_3+a_0 a_3 s_3,\\ &\qquad -a_3 b_0 p_0+a_3 b_3 p_3+a_0 b_0 p_3-a_0 b_3 p_3-a_3^2 q_3+a_0 a_3 q_3\rangle \end{align*} }% where {% \setlength\abovedisplayskip{5pt}% \setlength\belowdisplayskip{5pt}% \[ J_2 = \langle b_3 -b_2+ a_2 m,q_3 -q_2 + p_2 m,s_3 -s_2 + r_2 m,a_3-a_2,p_3-p_2,r_3-r_2 \rangle \] }% By continuing this computation we get the following ideals $\mathcal{I}_4$ and $\mathcal{I}_6$ which are the invariant ideals after two and three iterations of the outer loop $L$ respectively. \begin{align*} \mathcal{I}_4 &= \langle p_0 s_0 - p_5 s_5 - r_0 q_0 + r_5 q_5, \\ &\qquad b_5 p_5 - b_0 p_0 + a_0 q_0 - a_5 q_5, \\ &\qquad b_5 r_5 - b_0 r_0 + a_0 s_0 - a_5 s_5, \\ &\qquad b_5 (-p_5 s_0 + r_5 q_0) + b_0 (p_5 s_5 - r_5 q_5) + a_5 (-s_5 q_0 + s_0 q_5), \\ &\qquad b_5 (-p_5 r_0 + p_0 r_5) + a_5 (-p_0 s_5 + r_0 q_5) + a_0 (p_5 s_5 - r_5 q_5), \\ &\qquad b_0 p_0 (-p_5 s_5 + r_5 q_5) + b_5 (p_5^2 s_5 - p_0 r_5 q_0 + p_5 (r_0 q_0 - r_5 q_5)) + {}\\ &\qquad\qquad a_5 (p_0 s_5 q_0 + q_5 (-p_5 s_5 - r_0 q_0 + r_5 q_5))\rangle \end{align*} \begin{align*} \mathcal{I}_6 &= \langle p_0 s_0 - p_7 s_7 - r_0 q_0 + r_7 q_7, \\ &\qquad b_7 p_7 - b_0 p_0 + a_0 q_0 - a_7 q_7, \\ &\qquad b_7 r_7 - b_0 r_0 + a_0 s_0 - a_7 s_7, \\ &\qquad b_7 (-p_7 s_0 + r_7 q_0) + b_0 (p_7 s_7 - r_7 q_7) + a_7 (-s_7 q_0 + s_0 q_7), \\ &\qquad b_7 (-p_7 r_0 + p_0 r_7) + a_7 (-p_0 s_7 + r_0 q_7) + a_0 (p_7 s_7 - r_7 q_7), \\ &\qquad b_0 p_0 (-p_7 s_7 + r_7 q_7) + b_7 (p_7^2 s_7 - p_0 r_7 q_0 + p_7 (r_0 q_0 - r_7 q_7)) + {}\\ &\qquad\qquad a_7 (p_0 s_7 q_0 + q_7 (-p_7 s_7 - r_0 q_0 + r_7 q_7))\rangle \end{align*} Note that we now reached the fixed point as $\mathcal{I}_6 = \mathcal{I}_4|_{\fls{v}^{(5)}\leftarrow \fls{v}^{(7)}}$. \end{example} Corollary~\ref{cor:bound} provides a bound on the number of iterations in Algorithm~\ref{alg:polyinv-mutlipath}. Therefore, we know at which stage we have to reach the fixed point of the computation at the latest, viz.~after computing $\mathcal{I}_{r\cdot m}$. This fact allows us to construct a new algorithm which computes the ideal $\mathcal{I}_{r\cdot m}$ directly instead of doing a fixed point computation. The benefit of Algorithm~\ref{alg:nofixedpoint} is that we have to perform only one Gr\"obner basis computation in the end, although the new algorithm might performs more iterations than Algorithm~\ref{alg:polyinv-mutlipath}. \begin{algorithm} \caption{Invariant generation without fixed point computation} \label{alg:nofixedpoint} \begin{algorithmic}[1] \vskip.5\baselineskip \Require{Loop bodies $B_1,\dots,B_r$ as described.} \Ensure{The ideal of all polynomial invariants of $(B_1^*;B_2^*;\dots;B_r^*)^*$.} \algrule \State Compute $I:=I(\fls{\theta},\fls{\zeta})$ as described above \State $\mathcal{I}_{new}=\smash{\sum_{j=1}^m\langle v^{(1)}_j-v^{(0)}_i\rangle} + I$ \For{$j = 1,\dots,m$} \For{$i=1,\dots,r$} \State $\mathcal{I}_{new} \gets (J_{i\cdot j}+\mathcal{I}_{new})$ \EndFor \EndFor \State \Return $\mathcal{I}_{new} \cap \set{K}[\fls{v}^{(m\cdot r+1)},\fls{v}^{(0)}]$ \end{algorithmic} \end{algorithm} The proof of termination of the invariant generation method of~\cite{completeinvariant} assumes that the ideal of algebraic dependencies is prime. In general, this does not hold. Consider the following loop and its closed forms with exponential sequences $2^n$ and $(-2)^n$: \begin{center} \begin{minipage}{.35\columnwidth} \center \begin{tabular}{l} \reserved{while}\ \dots\ \reserved{do}\\ \quad $x\ass 2 x$\\ \quad $y\ass -2 y$\\ \reserved{end~while}\\ \end{tabular} \end{minipage} \begin{minipage}{.35\columnwidth} \center \begin{tabular}{l} \\ $x(n) = 2^n \cdot x(0)$\\ $y(n) = (-2)^n \cdot y(0)$\\ \\ \end{tabular} \end{minipage} \end{center} The ideal of algebraic dependencies among the before-mentioned exponential sequences is given by $\langle a^2 - b^2 \rangle$ which is obviously not prime. As a consequence, the termination proof of~\cite{completeinvariant} is incorrect. This paper closes this gap by providing a new algorithm and a corresponding termination proof. \section{Implementation and Experiments}\label{sec:implementation} We implemented our method in the Mathematica package \textsc{Aligator}\xspace\footnote{\textsc{Aligator}\xspace requires the Mathematica packages Hyper~\cite{hyper}, Dependencies~\cite{dependencies} and FastZeil~\cite{fastzeil}, where the latter two are part of the compilation package ErgoSum~\cite{ergosum}.}. \textsc{Aligator}\xspace is open source and available at: \begin{quote}\footnotesize\url{https://ahumenberger.github.io/aligator/}\end{quote} \newcommand{\textsc{Fastind}}{\textsc{Fastind}} \newcommand{\textsc{Duet}}{\textsc{Duet}} \paragraph{\bf Comparison of generated invariants.} Based on the examples in Figure~\ref{fig:loops} we show that our technique can infer invariants which cannot be found by other state-of-the-art approaches. Our observations indicate that our method is superior to existing approaches if the loop under consideration has some \emph{mathematical meaning} like division or factorization algorithms as depicted in Figure~\ref{fig:loops}, whereas the approach of \cite{kincaidPOPL18} has advantages when it comes to programs with complex flow. The techniques of \cite{farewellgroebner} and \cite{kincaidPOPL18} were implemented in tools called \textsc{Fastind}{}\footnote{Available at \url{http://www.irisa.fr/celtique/ext/polyinv/}} and \textsc{Duet}{}\footnote{Available at \url{https://github.com/zkincaid/duet}} respectively. Unlike \textsc{Aligator}\xspace{} and \textsc{Fastind}{}, \textsc{Duet}{} is not a pure inference engine for polynomial invariants, instead it tries to prove user-specified safety assertions. In order to check which invariants can be generated by \textsc{Duet}{}, we therefore asserted the invariants computed by \textsc{Aligator}\xspace{} and checked if \textsc{Duet}{} can prove them. \begin{figure} \begin{subfigure}[b]{0.30\textwidth} \centering \begin{tabular}{l} \reserved{while}\ $a \neq b$\ \reserved{do}\\ \quad\reserved{if}\ $a > b$\ \reserved{then} \\ \qquad $a\ass a - b$\\ \qquad $p\ass p - q$\\ \qquad $r\ass r - s$\\ \quad\reserved{else}\\ \qquad $b\ass b - a$\\ \qquad $q\ass q - p$\\ \qquad $s\ass s - r$\\ \quad\reserved{end~if}\\ \reserved{end~while}\\ \end{tabular} \caption{} \label{fig:euclidex} \end{subfigure} \quad % \begin{subfigure}[b]{0.30\textwidth} \centering \begin{tabular}{l} \reserved{while}\ $r \neq 0$\ \reserved{do}\\ \quad\reserved{if}\ $r > 0$\ \reserved{then} \\ \qquad $r\ass r - v$\\ \qquad $v\ass v + 2$\\ \quad\reserved{else}\\ \qquad $r\ass r + u$\\ \qquad $u\ass u + 2$\\ \quad\reserved{end~if}\\ \reserved{end~while}\\\\\\ \end{tabular} \caption{} \label{fig:fermat} \end{subfigure} \quad % \begin{subfigure}[b]{0.30\textwidth} \centering \begin{tabular}{l} \reserved{while}\ $d \geq E$\ \reserved{do}\\ \quad\reserved{if}\ $P < a + b$\ \reserved{then} \\ \qquad $b\ass b / 2$\\ \qquad $d\ass d / 2$\\ \quad\reserved{else}\\ \qquad $a\ass a + b$\\ \qquad $y\ass y + d / 2$\\ \qquad $b\ass b / 2$\\ \qquad $d\ass d / 2$\\ \quad\reserved{end~if}\\ \reserved{end~while}\\ \end{tabular} \caption{} \label{fig:wensley} \end{subfigure} \caption{Three examples: (a) Extended Euclidean algorithm, (b) a variant of Fermat's factorization algorithm and (c) Wensley's algorithm for real division.} \label{fig:loops} \end{figure} Let us consider the loop depicted in Figure~\ref{fig:euclidex}. Since we treat conditional branches as inner loops, we have that the invariants for this loop are the same as for the loop in Example~\ref{ex:euclidex}. By instantiating the generated invariants with the following initial values on the left we get the following polynomial invariants on the right: \begin{center} \vspace{-\baselineskip} \begin{minipage}{0.3\textwidth} \begin{align*} \hspace{5em} a_0 &\mapsto x \qquad \\ b_0 &\mapsto y \qquad \\ p_0 &\mapsto 1 \qquad \\ q_0 &\mapsto 0 \qquad \\ r_0 &\mapsto 0 \qquad \\ s_0 &\mapsto 1 \end{align*} \end{minipage} \begin{minipage}{0.69\textwidth} \begin{align} \tag{$I_1$} &1 + qr - ps \\ \tag{$I_2$} &bp - aq - y \\ \tag{$I_3$} &br - as + x \\ \tag{$I_4$} &-bp + aq - qry + psy \\ \tag{$I_5$} &br - as - qrx + psx \\ \tag{$I_6$} &(qr - ps)(-bp + aq + y) \end{align} \end{minipage} \end{center} Note that ($I_4$)-($I_6$) are just linear combinations of $(I_1)$-$(I_3)$. However, \textsc{Fastind}{} was able to infer $(I_1)$-$(I_3)$, whereas \textsc{Duet}{} was only able to prove $(I_2)$, $(I_5)$ and~$(I_6)$. Other examples where \textsc{Aligator}\xspace{} is superior in terms of the number of inferred invariants are given by the loops in Figures~\ref{fig:fermat} and~\ref{fig:wensley}. For Fermat's algorithm (Figure~\ref{fig:fermat}) and the following initial values, \textsc{Aligator}\xspace{} found one invariant, which was also found by \textsc{Fastind}{}. However, \textsc{Duet}{} was not able to prove it. \begin{center} \vspace{-\baselineskip} \begin{minipage}{.3\textwidth} \begin{align*} \hspace{4em}u_0 &\mapsto 2R + 1\\ v_0 &\mapsto 1\\ r_0 &\mapsto RR - N \end{align*} \end{minipage} \begin{minipage}{.69\textwidth} \begin{align*} \tag{$I_7$} &-4N - 4r - 2u + u^2 + 2v - v^2 \end{align*} \end{minipage} \end{center} In case of Wensley's algorithm (Figure~\ref{fig:wensley}) \textsc{Aligator}\xspace{} was able to identify the following three invariants. \textsc{Fastind}{} inferred the first two invariants, whereas \textsc{Duet}{} could not prove any of them. \begin{center} \vspace{-\baselineskip} \begin{minipage}{.3\textwidth} \begin{align*} \hspace{5em} a_0 &\mapsto 0 \\ b_0 &\mapsto Q/2 \\ d_0 &\mapsto 1 \\ y_0 &\mapsto 0 \end{align*} \end{minipage} \begin{minipage}{.69\textwidth} \begin{align*} \tag{$I_{8}$}&2b - dQ \\ \tag{$I_{9}$}&ad - 2by \\ \tag{$I_{10}$}&a - Qy \end{align*} \end{minipage} \vspace{-\baselineskip} \end{center} \noindent \paragraph{\bf Benchmarks and Evaluation.} For the experimental evaluation of our approach, we used the following set of examples: (i) 18 programs taken from~\cite{farewellgroebner}; (ii) 4 new programs of extended P-solvable loops that were created by us. All examples are available at the repository of \textsc{Aligator}\xspace. Our experiments were performed on a machine with a 2.9 GHz Intel Core i5 and 16 GB LPDDR3 RAM; for each example, a timeout of $300$ seconds was set. When using \textsc{Aligator}\xspace{}, the Gr\"obner basis of the invariant ideal computed by {\textsc{Aligator}\xspace} was non-empty for each example; that is, for each example we were able to find non-trivial invariants. We evaluated \textsc{Aligator}\xspace{} against \textsc{Fastind}{}. As \textsc{Duet}{} is not a pure inference engine for polynomial invariants, we did not include it in the following evaluation. When compared to~\cite{farewellgroebner}, we note that we do not fix the degree of the polynomial invariants to be generated. Moreover, our method is complete. That is, whenever \textsc{Aligator}\xspace{} terminates, the basis of the polynomial invariant ideal is inferred; any other polynomial invariant is a linear combination of the basis polynomials. \newcolumntype{R}{>{$}r<{$}} \begin{table} \centering \caption{Experimental evaluation of \textsc{Aligator}\xspace.} \label{tab:benchmarks} \def1.08{1.08} \begin{subtable}{.39\textwidth} \caption{} \label{tab:singlepath} \begin{tabular}{|l|R|R|} \hline \textit{Single-path} & \textsc{Aligator}\xspace & \textsc{Fastind}{} \\ \hline \texttt{cohencu} & 0.072 & 0.043 \\\hline \texttt{freire1} & 0.016 & 0.041 \\\hline \texttt{freire2} & 0.062 & 0.048 \\\hline \texttt{petter1} & 0.015 & 0.040 \\\hline \texttt{petter2} & 0.026 & 0.042 \\\hline \texttt{petter3} & 0.035 & 0.051 \\\hline \texttt{petter4} & 0.042 & 0.104 \\\hline \texttt{petter5} & 0.053 & 0.261 \\\hline \texttt{petter20} & 48.290 & 9.816 \\\hline \texttt{petter22} & 247.820 & 9.882 \\\hline \texttt{petter23} & TO & 9.853 \\\hline \end{tabular} \end{subtable} \quad \begin{subtable}{.575\textwidth} \caption{} \label{tab:multipath} \begin{tabular}{|l|R|R|R|R|R|R|} \hline \textit{Multi-path} & \#b & \#v & \#i & \textsc{Al1} & \textsc{Al2} & \textsc{Fastind}{} \\\hline \texttt{divbin} & 2 & 3 & 2 & 0.134 & 45.948 & 0.045 \\\hline \texttt{euclidex} & 2 & 6 & 3 & 0.433 & TO & 0.049 \\\hline \texttt{fermat} & 2 & 3 & 2 & 0.045 & 0.060 & 0.043 \\\hline \texttt{knuth} & 4 & 5 & 2 & ~55.791 & TO & 1.025 \\\hline \texttt{lcm} & 2 & 4 & 3 & 0.051 & ~87.752 & 0.043 \\\hline \texttt{mannadiv} & 2 & 3 & 2 & 0.022 & 0.025 & 0.048 \\\hline \texttt{wensley} & 2 & 4 & 2 & 0.124 & 41.851 & err \\\hline \texttt{extpsolv2} & 2 & 3 & 2 & 0.192 & TO & err \\\hline \texttt{extpsolv3} & 3 & 3 & 2 & 0.295 & TO & err \\\hline \texttt{extpsolv4} & 4 & 3 & 2 & 0.365 & TO & err \\\hline \texttt{extpsolv10}~ & 10 & 3 & 2 & 0.951 & TO & err \\\hline \end{tabular} \end{subtable} \begin{tabular}{rcl} \\ $\#b,\#v$ & $\dots$ & number of branches, variables \\ $\#i$ & $\dots$ & number of iterations until fixed point reached \\ $\textsc{Al1}$ & $\dots$ & \textsc{Aligator}\xspace with Algorithm~\ref{alg:polyinv-mutlipath} (timeout $300s$) \\ $\textsc{Al2}$ & $\dots$ & \textsc{Aligator}\xspace with Algorithm~\ref{alg:nofixedpoint} (timeout $100s$) \\ \textsc{Fastind}{} & $\dots$ & OCaml version of the tool in~\cite{farewellgroebner}\footnotemark \\ $TO,err$ & $\dots$ & timeout, error \end{tabular} \vspace{-\baselineskip} \end{table} \footnotetext{Testing the Maple implementation was not possible due to constraints regarding the Maple version.} Table~\ref{tab:singlepath} summarizes our experimental results on single-path loops, whereas Table~\ref{tab:multipath} reports on the results from multi-path programs. The first column of each table lists the name of the benchmark. The second and third columns of Table~\ref{tab:singlepath} report, on the timing results of \textsc{Aligator}\xspace{} and {\sc Fastind}, respectively. In Table~\ref{tab:multipath}, the second column lists the number of branches (paths) of the multi-path loop, whereas the third column gives the number of variables used in the program. The fourth column reports on the number of iterations until the fixed point is reached by \textsc{Aligator}\xspace{}, and hence terminates. The fifth and sixth columns, labeled {\sc Al1} and {\sc Al2}, show the performance of \textsc{Aligator}\xspace{} when using Algorithm~\ref{alg:polyinv-mutlipath} or Algorithm~\ref{alg:nofixedpoint}, respectively. The last column of Table~\ref{tab:multipath} lists the results obtained by {\sc Fastind}. In both tables, timeouts are denoted by $TO$, whereas errors, due to the fact that the tool cannot be evaluated on the respective example, are given as $err$. The results reported in Tables~\ref{tab:singlepath} and~\ref{tab:multipath} show the efficiency of \textsc{Aligator}\xspace{}: in 14 out of 18 examples, \textsc{Aligator}\xspace{} performed significantly better than {\sc FastInd}. For the examples \texttt{petter20}, \texttt{petter22} and \texttt{petter23}, the time-consuming part in \textsc{Aligator}\xspace{} comes from recurrence solving (computing the closed form of the recurrence), and not from the Gr\"obner basis computation. We intend to improve this part of \textsc{Aligator}\xspace{} in the future. The examples \texttt{extpsolv2}, \texttt{extpsolv3}, \texttt{extpsolv4} and \texttt{extpsolv10} are extended P-solvable loops with respectively 2, 3, 4, and 10 nested conditional branches. The polynomial arithmetic of these examples is not supported by \textsc{Fastind}{}. The results of \textsc{Aligator}\xspace{} on these examples indicate that extended P-solvable loops do not increase the complexity of computing the invariant ideal. We also compared the performance of \textsc{Aligator}\xspace{} with Algorithm~\ref{alg:polyinv-mutlipath} against Algorithm~\ref{alg:nofixedpoint}. As shown in columns 5 and 6 of Table~\ref{tab:multipath}, Algorithm~\ref{alg:nofixedpoint} is not as efficient as Algorithm~\ref{alg:polyinv-mutlipath}, even though Algorithm~\ref{alg:nofixedpoint} uses only a single Gr\"obner basis computation. We conjecture that this is due to the increased number of variables in the polynomial system which influences the Gr\"obner basis computation. We therefore conclude that several small Gr\"obner basis computations (with fewer variables) perform better than a single large one. \section{Conclusions} We proposed a new algorithm for computing the ideal of all polynomial invariants for the class of extended P-solvable multi-path loops. The new approach computes the invariant ideal for a non-deterministic program $(L_1;\dots;L_r)^*$ where the $L_i$ are single-path loops. As a consequence, the proposed method can handle loops containing (i) an arbitrary nesting of conditionals, as these conditional branches can be transformed into a sequence of single-path loops by introducing flags, and (ii) one level of nested single-path loops. Our method computes the ideals $\mathcal{I}_1,\mathcal{I}_2,\dots$ until a fixed point is reached where $\mathcal{I}_i$ denotes the invariant ideal of $(L_1;\dots;L_r)^i$. This fixed point is then a basis for the ideal containing all polynomial invariants for the extended P-solvable loop. We showed that this fixed point computation is guaranteed to terminate which implies the completeness of our method. Furthermore, we gave a bound on the number of iterations we have to perform to reach the fixed point. The proven bound is given by $m$ iterations where $m$ is the number of loop variables. We showed that our method can generate invariants which cannot be inferred by other state-of-the-art techniques. In addition, we showcased the efficiency of our approach by comparing our Mathematica package \textsc{Aligator}\xspace{} with state-of-the-art tools in invariant generation. Future research directions include the incorporation of the loop condition into our method. So far we operate on an abstraction of the loop where we ignore the loop condition and treat the loop as a non-deterministic program. By doing so we might loose valuable information about the control flow of the program. By employing $\mathrm{\Pi\Sigma^*}$-theory~\cite{carsten2} it might be possible to extend our work also to loops containing arbitrary nesting of inner loops, which reflects another focus for further research. \vspace{1em} \par\noindent {\bf Acknowledgments.} We want to thank the anonymous reviewers for their helpful comments and remarks. \balance \bibliographystyle{splncs03}
\section{Introduction} Recent progress in realistic electronic structure calculations of correlated materials is based on a combination of the density functional theory (DFT) with the dynamical mean-field theory (DMFT) ~\cite{kotliar_review,vollh2017}. The DFT+DMFT approach opens unique possibilities to investigate electronic and structural properties of solids with partially-filled $d$- and $f$-electron shells. The main reason for this success is based on the optimal nature of the local self-energy scheme in the DMFT method~\cite{geo96}, and on the development of efficient multi-orbital impurity solver within continuous-time quantum Monte-Carlo (CT-QMC) schemes~\cite{CTQMC_rev}. The ability to treat the non-spherical part of local Coulomb interactions exactly in the CT-QMC scheme brings an additional aspect to the so-called double-counting correction in the DFT+DMFT approach, which is commonly used to account for Coulomb interactions already treated on the DFT level. In a standard DFT+DMFT scheme~\cite{kotliar_review} the double-counting corrections are spherical and are designed to repair only the average Coulomb interactions either in the DFT or the DMFT parts. Usually, as in the static mean-field like DFT+U scheme, the double-counting correction consists of a subtraction of an average Coulomb interaction, that is taken either in the limits of itinerant or localised electrons ~\cite{LDA+U_rev}. With the full-potential DFT approach for different structural calculations, this will work only for a strictly spherical type of Hubbard $U$-corrections~\cite{du98}. Already in the non-spherical rotationally-invariant DFT+U investigations of orbital ordering and structural instability in the KCuF$_3$ perovskite~\cite{lic95}, care was taken to avoid full potential contributions of $d$-electrons in the DFT-part. Applications of the rotationally invariant DFT+U scheme to calculations of the complex crystal structure of cuprates~\cite{FPLO} and magnetic-anisotropy problems~\cite{FPLO_anis} show importance of accurate treatments of the double-counting corrections. Another way to solve the problem of the proper DFT+DMFT interface is related to transfer the double counting corrections to the DFT part, in order to substract the part of exchange-correlations energy related with $d$- or $f$- electrons~\cite{Nekrasov_LDA'+DMFT}. Recently, a so-called "exact" double-counting correction to the DFT+DMFT scheme employs a similar idea to subtract the exchange-correlations term that correspond to local Yukawa-like short-range interaction~\cite{hau15}. It is not clear which scheme is more appropriate for different classes of materials. For instance, a successful application of DFT+DMFT to the complicated problem of the anisotropic Fermi surface of Sr$_2$RuO$_4$~\cite{Pavarini_DC16} used a standard mean-field like double-counting correction for the itinerant limit. In this communication, we introduce a proper double-counting scheme for the atomic limit and make comparison with the recent "exact" scheme ~\cite{hau15}. As a test case we choose the problem of structurally optimizing the Fe-As distance in the pnictide superconductor LaFeAsO. \section{Methodology} In a practical implementation, the total energy of the charge self-consistent DFT+DMFT reads~\cite{pou07,dimarco2009}, \begin{eqnarray} E^{\rm DFT+DMFT}&=&E^{\rm DFT}[\rho^{\rm DMFT}(\boldsymbol {r})]+ \sum_{\boldsymbol k}\sum_{\nu} \epsilon_{\boldsymbol {k}\nu}\Delta N^{(\boldsymbol {k})}_{\nu\nu}\nonumber\\ &+&\langle\hat H_{\rm int}\rangle-E_{\rm dc} \; , \label{eq:1} \end{eqnarray} where $E^{\rm DFT}$ is a standard DFT functional acting on the DMFT charge density $\rho^{DMFT}$, $\epsilon_{\boldsymbol {k}\nu}$ are the Kohn-Sham (KS) energy eigenvalues, $\Delta N^{(\boldsymbol {k})}$ is the KS occupation matrix correction due to the DMFT self-energy~\cite{lec06}, $ <\hat H^{int}>$ is an expectation value of the Coulomb vertex, and $E_{\rm dc}$ marks the double-counting correction. Eq.~\ref{eq:1} assumes the use of the Bloch basis in which the kinetic energy operator is diagonal in a basis of the Kohn-Sham eigenstates. The double-counting correction $E_{\rm dc}$ in eq.~\ref{eq:1} accounts approximately for the mean-field value of the electron-electron interaction, already included in $E^{\rm DFT}$. Until recently, there was no precise solution of for the double counting when utilizing conventional DFT implemented in the local-density or generalized-gradient approximations (LDA or GGA). Most commonly used double counting correction forms in the DFT+DMFT scheme are the so-called''fully localized (or atomic-like) limit" (FLL)~\cite{sol94,lic95} \begin{equation} E_{\rm dc}^{\rm (FLL)} = \frac{U}{2}N(N-1) - \frac{J}{2}\sum_{\sigma} N_{\sigma}(N_{\sigma}-1)\;, \end{equation} or, the "around mean field" (AMF) scheme~\cite{ani91,sol98}, \begin{equation} E_{\rm dc}^{\rm (AMF)} = U n_{\uparrow}n_{\downarrow} + \frac{1}{2}\left( n_{\uparrow}^2 +n_{\downarrow}^2 \right)\frac{2l}{2l+1}\left(U-J\right)\;, \end{equation} where $n_{\sigma} = \Tr[n_{m \sigma, m^{\prime} \sigma}]$, $n= n_{\uparrow}+n_{\downarrow}$ is the total $d$(or $f$) on-site occupation, and $U$ and $J$ are the intra-atomic Coulomb repulsion and exchange parameter, respectively~\cite{ani911}. This $E_{\rm dc}$ stems from a spherically-symmetric treatment, while the DFT part of the Hartree and the exchange-correlation energies, \begin{equation} \label{eq:6} E_{\rm H} + E_{\rm XC} = \frac{1}{2} \int d \vec{r} d \vec{r}' \frac{\rho(\vec{r}) \rho(\vec{r}')}{|\vec{r} - \vec{r'}|} + \int d \vec{r} \rho(\vec{r}) \epsilon_{xc}(\rho(\vec{r})), \end{equation} remain accounted together with the non-spherical contributions into the DFT+DMFT energy functional eq.~\ref{eq:1} (for simplicity, we write everything in terms of a charge density only, while the inclusion of the spin is straightforward). One way to exclude this "non-spherical" double counting is to keep only the spherically-symmetric contributions in the $\langle\hat H_{int}\rangle$ term of eq.~\ref{eq:1}~\cite{du98}. But this is not what one truly aims for, the DFT+DMFT induced enhancement of the orbital polarization beyond DFT will be lost. Alternatively, the non-spherical contributions entering the DFT part of the Hartree and the exchange-correlation energies from the $d$ (or $f$) states can be excluded in a simple way, similar to what was proposed earlier in DFT+U~\cite{shi04}, and DFT+HIA~\cite{Shi09,del17} implementations of the full-potential linearized augmented plane wave (FLAPW) method~\cite{wim81}. In this work, we make use of the mixed-basis pseudopotential method (MBPP)~\cite{lou79,fu83,els90,mbpp_code}, and expand the KS wave function for Bloch vector $\boldsymbol{k}$ and band $\nu$ into plane waves (pw) and localized functions (lf), \begin{equation} \psi_{\boldsymbol{k}\nu}(\boldsymbol{r})=\frac{1}{\sqrt{\Omega_c}}\sum_{\boldsymbol{G}} \psi_{\boldsymbol{G}}^{\boldsymbol{k}\nu}\,{e}^{i(\boldsymbol{k}+ \boldsymbol{G})\cdot\boldsymbol{r}}+ \sum_{\gamma lm}\beta_{\gamma lm}^{\boldsymbol{k}\nu}\, \phi_{\gamma lm}^{\boldsymbol{k}}(\boldsymbol{r})\quad, \label{eq:2} \end{equation} where $\Omega_c$ is the unit-cell volume, $\boldsymbol{G}$ a reciprocal-lattice vector, $\gamma$ labels an atom in the unit cell and $lm$ are the usual angular-momentum quantum numbers. The localized functions are given by \begin{eqnarray} \phi_{\gamma lm}(\boldsymbol{r})&=& i^l\,g_{\gamma l}(r)\,K_{lm}(\hat{\boldsymbol{r}}) \qquad,\quad \nonumber\\ \phi_{\gamma lm}^{\boldsymbol{k}}(\boldsymbol{r})&=& \sum_{\boldsymbol{T}}{e}^{i\boldsymbol{k}\cdot(\boldsymbol{T}+ \boldsymbol{R}_{\gamma})}\phi_{\gamma lm} (\boldsymbol{r}-\boldsymbol{T}-\boldsymbol{R}_\gamma)\quad, \label{eq:2} \end{eqnarray} whereby $g$ is a radial function, and $K$ is a cubic harmonic. Accordingly, the MBPP electronic charge density $\rho(\boldsymbol{r})$ consists of three terms, i.e. \begin{equation} \rho(\boldsymbol{r})=\sum_{\boldsymbol{k}\nu} f_{\boldsymbol{k}\nu}|\psi_{\boldsymbol{k}\nu}(\boldsymbol{r})|^2= \rho^{pw, pw}(\boldsymbol{r})+\rho^{pw, lf}(\boldsymbol{r})+ \rho^{lf, lf}(\boldsymbol{r})\quad. \label{eq:3} \end{equation} For our concerns, the purely-local third term $\rho^{lf,lf}$ is of key interest. It is written as \begin{eqnarray} \rho^{lf,lf}(\boldsymbol{r})&=&\sum_{\boldsymbol{k}\nu}f_{\boldsymbol{k}\nu}\left| \sum_{\gamma lm}\beta_{\gamma lm}^{\boldsymbol{k}\nu}\, \phi_{\gamma lm}^{\boldsymbol{k}}(\boldsymbol{r})\right|^2 \nonumber\\ &=& \sum_{\boldsymbol{T},\gamma lm}\rho^{lf,lf}_{\gamma lm}(r)\,K_{lm}(\hat{\boldsymbol{r}})\quad, \label{eq:4} \end{eqnarray} with $\boldsymbol{r}'=\boldsymbol{r}-\boldsymbol{T}-\boldsymbol{R}_\gamma$, and hence can be understood as an expansion into the cubic harmonics on each site $\boldsymbol{R}_{\gamma}$. We spherically average the purely local term $\rho^{lf,lf}$ in eq.~\ref{eq:4} for those states which are corrected by DMFT (with $l=2$ for the $d$ states, and $l=3$ for the $f$ states). Thus, the local non-spherical parts in $\rho^{lf,lf}_\gamma$ vanish on each site $\boldsymbol{R}_{\gamma}$, and do not contribute to the DFT part of the Hartree and the exchange-correlation energies eq.~\ref{eq:6}. It removes the non-spherical double counting in the DFT+DMFT total energy charge self-consistent calculations. Until recently, there was no exact solution of the double-counting problem. Density funtional theory does not have a diagrammatic representation that would provide an explicit identification of corresponding many-body interaction terms. Also, it is not clear how to solve the Hubbard model by DFT. The FLL/AMF forms of $E_{\rm dc}$, which were discussed above, are derived in some static approximations to the Hubbard interaction term. The "physical" arguments prevailed in the choice of $E_{\rm dc}$. In Ref.~\cite{hau15}, K. Haule proposed a new ''exact" form of the double-counting correction making use of the Luttinger-Ward functional representation for both DFT and DMFT. This $E_{\rm dc}$ was applied to a number of correlated solids, and good agreement between the theory and experiment was achieved. Importantly, the $E_{\rm dc}$ of Ref.~\cite{hau15} is free from the non-spherical double counting, and no additional correction is required. Therefore, we applied it to the structural optimisation of the pnictide superconductor LaFeAsO. \section{Results} \begin{figure}[t] \includegraphics*[width=8.5cm]{tot_energy-new} \includegraphics*[width=8.5cm]{tot_energy-exact} \caption{(color online) The relative total energy of LaFeAsO as a function of the As height, expressed by the $z$ parameter, in the unit cell, A: MBPP based, B: Wien2K based). Dashed line marks the experimental $z$ position of the As atom.}\label{fig:toten} \end{figure} \begin{table}[b] \begin{ruledtabular} \begin{tabular}{lc|lc} MBPP & $z$ & Wien2K & $z$ \\ \hline DFT & 0.628 & DFT & 0.634 \\ DMFT(FLL) & 0.633 & DFT(FLL) & 0.638 \\ DMFT(FLL+NSPH) & 0.638 & DFT("exact") & 0.648 \\ \end{tabular} \end{ruledtabular} \label{tab1} \caption{Comparison of the As atom z position calclulated with different methods and codes.} \end{table} Electronic structure theory of the high-temperature superconductor LaFeAsO occupies a fundamental place in condensed matter physics and material science. The calculations are often performed either within the DFT or DFT+DMFT. Both approaches fall short in the correct description of the equilibrium crystal structure. When the paramagnetic high-temperature phase is modelled by a non-magnetic DFT calculation, a too short Fe-As distance, governed by the internal unit-cell parameter $z$, is obtained. The latters has a drastic influence on the low-energy electronic structure~\cite{ma}, and very precise electron-electron correlation effects need to be tackled. Charge self-consistency within DFT+DMFT becomes important and based thereon, previous studies~\cite{aic09,aic11} indeed improved upon pure nonmagnetic DFT calculations. However still, those correlated electronic structure results remain ambiguous, and depend on the choice of the double counting correction (FLL or AMF). We overtook the values of Hubbard-$U=2.7$\,eV and Hund's exchange of $J=0.8$\,eV for the local Coulomb interactions from Ref.~\cite{aic09}, which were calculated within the constrained random-phase approximation (cRPA)~\cite{miy10,miy08}. The inverse temperature is set to $\beta=40$\,eV$^{-1}$, that corresponds to room temperature $T=290$\,K. For the solution of the quantum impurity problem we apply the cthyb-QMC method~\cite{wer06}. The multiorbital Hubbard Hamiltonian of Slater-Kanamori form, parametrized by Hubbard-$U$ and Hund's exchange $J$ is applied to the respective full five-orbital $3d$ manifold. We performed the total-energy electronic structure DFT and DFT+DMFT calculations of LaFeAsO making use of the MBPP method~\cite{gri12} and compared them with Wien2K calculations~\cite{hau10}. The FLL form of the double-counting correction was used, as well as the "exact" double-counting from Ref.~\cite{hau15}. The total energy within the MBPP-based schemes are shown in Fig.~\ref{fig:toten}A, and are compared with Wien2K-based results shown in Fig.~\ref{fig:toten}B. The values of the As atom $z$ parameter that correspond to the total-energy minima are given in Tab.~\ref{tab1}. Both MBPP and Wien2K DFT calculations yield for the As atom $z$ parameter values substantially smaller (see Tab.~\ref{tab1}) than the experimental value of $z=0.651$~\cite{ma}. Inclusion of correlation effects by DFT+DMFT(FLL) without the non-spherical double-counting correction has visible effect on the total energy, and improves the As atom $z$ parameter over the DFT results. This is in agreement with the previous Wien2K-based DFT+DMFT calculations~\cite{aic09}. Still the difference $\Delta z=0.013$ between the experimental and theoretical values remains unresolved. Note that within identical setting, DFT and DFT+DMFT calculations based on the pseudopotential (MBPP) method produce $z$ parameter values by $\approx 0.005$ smaller than corresponding all-electron (Wien2K) calculations. Nevertheless, the difference between DFT and DFT+DMFT results obtained with MBPP is the same as from the Wien2K calculations, and illustrates the important role of electron correlation effects. It was proposed in Ref.~\cite{aic11} that futher improvement of the value of $z=0.643$ can be achieved by switching to the AMF form of $E_{\rm dc}$, suggesting partial delocalization of the $3d$ states in metallic LaFeAsO. However, no non-spherical double-counting corrections were used in these calculations. As it follows from our MBPP results shown in Fig.~\ref{fig:toten}A and Tab.~\ref{tab1}, avoiding non-sphericity in the FLL double counting leads to an increase of the $z$ parameter to $z=0.638$ over the $z=0.633$ FLL result with no non-spherical double-counting correction. Taking into account that MBPP yields slightly smaller values for the $z$ parameter, the proposed double counting correction brings the total energy minimum into close proximity of the experimental data. Finally, we performed calculations with the "exact" double counting implementation~\cite{hau15}, and obtained the total-energy minimum at $z=0.648$ (see Fig.~\ref{fig:toten}B and Tab.~\ref{tab1}.), now shifted close to the experimental value~\cite{ma}. This form is free from the non-spherical double counting. This supports our finding that the source of discrepancy between experiment and DFT+DMFT is not a form of the double-counting due to the metallic character of LaFeAsO, as suggested by Ref.~\cite{aic11}, but because of the non-spherical double counting in DFT and DMFT parts of DFT+DMFT. To conclude we developed a simple scheme for avoiding non-spherical double counting in DFT+DMFT and compared with the ``exact'' double counting scheme ~\cite{hau15}. As a proof of principles, the results show a similar shift of the Fe-As distance and bring results of DFT+DMFT closer to experiments. We think that the standard double-counting scheme in the atomic limit will be useful for strongly correlated $d$- and $f$ systems with anisotropic Coulomb interaction close to insulating states. \section{Acknowledgments} We thank Kristjan Haule and Eva Pavarini for helpful discussions. Financial support was provided by the Deutsche Forschungsgemeinschaft (DFG) Grant No. DFG LI 1413/8-1 and grant No. DFG LE 2446/4-1, as well as the Czech Science Foundation (GACR) Grant No.~15-05872J. Computations were performed at the University of Hamburg and at the North-German Supercomputing Alliance (HLRN) under Grant No. hhp00040 .
\section{Introduction} A dynamical model is an essential tool for robust measurement of a mass of a galaxy. In particular, for the Milky Way (Galaxy) there are a variety of techniques to measure its mass, e.g., the orbital evolution of satellite galaxies \citep{1982MNRAS.198..707L,2007ApJ...668..949B}; the timing argument \citep{2008MNRAS.384.1459L}; the escape velocity \citep{2007MNRAS.379..755S,2014A&A...562A..91P}; directly fitting tracer kinematics and spatial properties with some parametric models \citep{1998MNRAS.294..429D,2011MNRAS.414.2446M,2013A&A...549A.137I} or distribution function \citep{1999MNRAS.310..645W,2015MNRAS.453..377W,2015MNRAS.454.3653B,2016ApJ...829..108E}; or calibrating from numerical simulations \citep{2008ApJ...684.1143X,2013ApJ...773L..32R}. For a more comprehensive list of the literature that attempts to measure the dynamical mass of the MW galaxy see review articles \cite{2014RvMP...86...47C} and \cite{2016ARA&A..54..529B}. All these mass modelling schemes are known to have their own shortcomings and a common conclusion that can be inferred from the literature is that the typical precision in the mass measurement of the Galaxy is roughly $30 \%$ at best \citep[][see Fig. 1]{2015MNRAS.453..377W}. Generally, the systematics or biases introduced by the method of choice are largely ignored or inaccessible, and a detailed comparison of the different methods and their relative performances is the matter of a separate review. Inherently, the main challenge in our ability to achieve higher accuracy in these mass estimates is due to the lack of the tangential information of the halo tracers. With the ESA's {\it Gaia} mission \citep{2016A&A...595A...2G} we have now entered an era of precision astrometry. The upcoming DR2 and the subsequent data releases of the mission is expected to deliver the full phase-space information of the vast number of stars \citep{2002Ap&SS.280....1P,2005MNRAS.359.1287B} that is anticipated to allow us to measure the dynamical properties of the Galaxy, especially its mass with unprecedented accuracy. But, the {\it Gaia} data may not be a panacea as under the current framework of hierarchical structure formation, spiral galaxies like the Galaxy are considered to be formed through the merger of multiple proto-systems. In the Galaxy, there are both qualitative and quantitative observational evidence for the presence of a plethora of unrelaxed dynamical structures such as stellar streams and perished dwarf-galaxies \citep[e.g.][]{1993ARA&A..31..575M,2006ApJ...642L.137B,2008ApJ...680..295B,2008A&ARv..15..145H,2009ApJ...698..567S,2011MNRAS.417.2206C}, which supports the scenario of hierarchical galaxy formation. Unrelaxed substructures can violate the dynamical consistency of models as well as assumptions of azimuthal symmetry and sphericity. Such features perturb the matter distribution of the host galaxy causing the gravitational field to vary with time, which further complicates the mass measurement. While fitting the galaxy whether one should include or mask these sub-structures is still open to discussion. Moreover, the {\it Gaia} data also comes with uncertainties, which become even more significant at larger distances where the stellar halo is known to dominate. For example, even for RR Lyrae stars at galacto-centric radius of $40\,\kpc$, the percentage error in {\it Gaia} distance measurement is $>100\%$ and error in the tangential velocity is of the order of at-least $50\ifmmode \,\rm km\,s^{-1} \else $\,\rm km\,s^{-1} $ \fi $ \citep{2005MNRAS.359.1287B,2013ApJ...778L..12P}. An another approach for measuring the mass of the galaxy is a moment-based method using the \cite{1915MNRAS..76...70J} equation, which we focus on this paper. If the first and second order moments of the velocity of the mass tracers and their stellar density distribution, which are usually observables, are known, we can use the Jeans equation to infer the gradient of the underlying gravitational potential and hence, the mass of the system. In astrophysics, the Jeans formalism has often been used for the dynamical study of gravitational systems, ranging from the galaxy superclusters \citep{1999ApJ...512L...9M}, clusters \citep{1997ApJ...476L...7C, 1997ApJ...485L..13C,2003ApJ...585..205B}, groups \citep{2007MNRAS.375..313F,2015MNRAS.453.3848D}, distant galaxies \citep{1983ApJ...266...58T,1990ApJ...361...78B,2008MNRAS.390...71C} to stellar clusters \citep{1995AJ....109..209G,2001ApJ...559..828C,2010MNRAS.406.1220W,2014MNRAS.437.3172D} and satellite galaxies \citep{2007ApJ...663..948G,2009MNRAS.394L.102L,2009ApJ...704.1274W,2013NewAR..57...52B,2017MNRAS.470.2034D}. It has also been extensively used for the Galaxy \citep{2005MNRAS.364..433B,2010ApJ...720L.108G,2011A&A...531A..82S,2012ApJ...761...98K,2014ApJ...794...59K} and also recently in the neighbouring M31 galaxy \citep{2016MNRAS.460.2720K}. Generally, a key assumption made in these analysis is that the system is in dynamical equilibrium, without this assumption no information on the underlying gravitational potential can be obtained. Furthermore, \cite{2013NewAR..57...29B} argues that our strategy must be to start from the assumption of a steady state and then to use perturbation theory to understand how time-dependent effects modify a steady-state model. However, a crucial question to ask is to what extent do the unrelaxed substructures present in galaxies upset the estimated mass of the host using the Jeans analysis? This is the main question we aim to find answer to in this paper. More recently there have been attempts to test the efficacy of different methods in robustly measuring the mass distributions of the Milky Way (MW) like galaxies using spatial and kinematic data. Such as \cite{2016MNRAS.456.3456C} demonstrate the ability of cylindrical Jeans equation in reconstructing the surface density, the vertical force, and other disk parameters. Similarly, \cite{2015MNRAS.453..377W} test the accuracy of a phase-space distribution function in measuring the mass of the MW dark matter halo. Besides, \cite{2015ApJ...801...98S} investigate the application of action-space clustering of tidal streams, \cite{2013MNRAS.433.1826S} test stream modelling algorithm in action-angle space, and \cite{2012MNRAS.420.2562A} demonstrate the application of tracer mass formalism in correctly recovering the underlying potential of galaxies. Similarly, in this paper we test the \cite{1915MNRAS..76...70J} formalism, in particular of its spherical form in reconstructing the mass distribution of the N-body models of the Milky-Way. \begin{figure} \centering \includegraphics[width=1\columnwidth]{bnjpot} \caption{Mass profiles of the 11 \protect\citetalias{2005ApJ...635..931B} \LCDM\ halos and the parent galaxy. Dashed lines show the DM halo mass whereas the solid lines show the combined mass due to bulge, disk and halo. Vertical and horizontal black solid lines correspond to the virial properties of the halos for the concentration parameter of $c=14$. The systematic drift in the runs is due to the concentration $c$ varying among the halos.} \label{fig:bnjallhalomass} \end{figure} With the advent of large spectroscopic surveys such as Sloan Extension for Galactic Understanding and Exploration \citep[SEGUE,][]{2009AJ....137.4377Y}, LAMOST Experiment for Galactic Understanding and Exploration \citep[LEGUE,][]{2012RAA....12..735D} and GALactic Archaeology with HERMES \citep[GALAH,][]{2015MNRAS.449.2604D,2017MNRAS.465.3203M} we now have a large collection of stars of different stellar types tracing snapshots of the different age populations within the Galactic stellar halo. \cite{2005MNRAS.364..433B,2014ApJ...794...59K} have combined different stellar populations such as field horizontal branch stars, giant stars etc to measure the mass of the Galaxy. If these different sub-populations of stars trace similar spatio-kinematics loci, or in other words they have been orbiting in the galaxy for sufficient time to become fully mixed, it is sensible to combine and treat them as a single population from a dynamical point of view. Hence, it is also instructive to understand possible bias in the mass measurement resulting from the use of different stellar populations as a tracer. The rest of this paper is organized as follows. Section~\ref{sec:data} describes the data sets obtained from \cite[][hereafter BJ05]{2005ApJ...635..931B} and \cite[][hereafter J08]{2008ApJ...689..936J} simulations used in the paper. Section~\ref{sec:jeans} provides the formulary for the Jeans formalism and also, a test case is given in Section~\ref{sec:hqtest}. In Section~\ref{sec:results} we present our results and discuss them. Finally, we summarize our findings in Section~\ref{sec:conclusions}. \section{Data}\label{sec:data} \begin{figure*} \centering \includegraphics[width=1.9\columnwidth]{rvr_lcdm_y} \includegraphics[width=1.9\columnwidth]{rvr_bnjs_y} \caption{Radial phase-space diagrams ($v_r$ versus halo-centric radius $r$) of all the simulated stellar halos from the \protect\citetalias{2005ApJ...635..931B} (top panels) and \protect\citetalias{2008ApJ...689..936J} (bottom panels) simulations within $r/\kpc\in[1,100]$. } \label{fig:rvr} \end{figure*} Over the last decade there has been substantial development in simulating stellar halos in a cosmological context. Full hydrodynamical simulations of galaxies including star formation and feedback recipes have been done \citep{2006MNRAS.365..747A,2008MNRAS.391.1685S,2009ApJ...702.1058Z,2014MNRAS.444.1518V,2016MNRAS.457..844F,2016MNRAS.457.1931S}. However, modelling the stellar halo of galaxies is still a challenging task as it is intrinsically faint \citep{2002ARA&A..40..487F,2008A&ARv..15..145H,2009Natur.461...66M}. The highest resolution simulations only resolve stellar masses of $10^4-10^5 M_\odot$, and are unable to discern the features in the stellar halo. Pushing this further to resolve the faint structures within the stellar halo would require enormous computation power. Such simulations will be further complicated by the gas inflow into galaxies, the star-formation physics and its feedback, effects that are poorly understood. Alternatively, one could utilise models from hybrid techniques \citep{2005ApJ...635..931B,2008MNRAS.391...14D,2010MNRAS.406..744C} that use collision-less simulations to track the evolution of dynamical tracers in an analytical potential and also, incorporate star formation processes in a semi-analytical form. In this paper we use the \citetalias{2005ApJ...635..931B} and \citetalias{2008ApJ...689..936J} suites of simulations. These are readily available and have been widely used in the MW studies for its ability to reproduce substructures in great detail \citep{2008ApJ...680..295B,2009ApJ...703.1061S,2011ApJ...728..106S}. The \citetalias{2005ApJ...635..931B} and \citetalias{2008ApJ...689..936J} simulations adopt a two-phase approach: a simulation phase where the N-body simulations of the dark matter (in a short form, DM) satellites with known binding energy, accretion time, and eccentricity adopted from the \LCDM\ models are run in an analytic disk, bulge and halo potential representing the parent galaxy; and a prescription phase where star particles are embedded within the cores of the accreted satellite dark halos. In other words, the satellite stellar distribution is not modelled during the N-body simulations, rather to each DM particle within a satellite the stars are painted on subsequently. Semi-analytical prescriptions are used to assign a star formation history to each accreted satellite and the luminosity function of the satellite galaxies is assumed to follow King model. Afterwards, the orbit of the accreted satellites that contain a significant stellar component are tracked from entry into the parent halo up to the present time. Only satellite halos more massive than $10^8 M_\odot$ are tracked as the smaller systems never contain enough number of star particles and thus do not contribute significantly to the build up of the tracer population of the parent halo. Time since accretion, luminosity and the eccentricity of the orbit of a satellite are the three key properties that define the course of its accretion. A full accretion history of the tracer population is a result of the combination of these three properties of all the contributing satellites. Finally, the above hybrid simulations provide us with two types of dynamical tracers, namely (a) accreted DM particles and (b) stellar particles (essentially accreted DM particles with luminosity weights), originating from dissolving satellites. Note, the density distribution of the stellar particles shows more substructures than the DM particles as the stellar particles are more tightly bound to the accreting satellites. Since, the stellar particles are the ones that have the observational relevance, for our analysis we primarily make use of them. For the sake of completeness the results with DM tracer particles are presented in the Appendix~\ref{sec:dmcase}. \subsection{Simulated stellar halos with \LCDM\ accretion history} The \citetalias{2005ApJ...635..931B} simulation comprise a suite of 11 random realizations of the MW stellar halo, namely, \begin{itemize} \renewcommand{\labelitemi}{\scriptsize$\blacksquare$} \item \emph{halos}: 02, 05, 07, 08, 09, 10, 12, 14, 15, 17 and 20\footnote{we keep the numbering convention of the halos identical to \url{http://galaxia.sourceforge.net/Galaxia3pub.html} \citep[{{\sc galaxia}},][]{2011ApJ...730....3S}, which are originally labelled as halos 1-11 in \citetalias{2005ApJ...635..931B}.}, \end{itemize} here onward we collectively refer to them as \LCDM\ halos. As we mentioned earlier the potential of the parent galaxy is comprised of three components --- \cite{1990ApJ...356..359H} bulge, \cite{1975PASJ...27..533M} disk and the Navarro-Frenk-White \citep[NFW]{1996ApJ...462..563N} DM halo. The concentration parameter describes the characteristic inner scale radius of the DM halo, and evolves with time as the galaxy accretes more and more satellites. It can be found by combining the Table 1 and the Eqn. 5 of \citetalias{2005ApJ...635..931B} and we provide the value for each case in Fig.~\ref{fig:bnjallhalomass}. Also, in the figure we display the present day (redshift, $z=0$) masses of the parent galaxy as a function of halo-centric distance $r$, where the total combined mass due to bulge, disk and DM halo is shown with solid lines and the sole contribution of the DM halo is shown with the dashed-lines. The horizontal and vertical black solid lines demarcate the virial mass $M_\text{vir}=1.4\times10^{12}\,\Msun$ and the virial radius $r_\text{vir} = 289\,\kpc$ respectively, which are constants for all the simulated stellar halos. In the figure we see that the effect of choice of concentration on the overall mass profiles of the parent galaxy is substantial at small radii, and negligible near and past the virial radius. It is important to note here that while the disk of the parent galaxy is assumed to have an axisymmetric potential, the underlying DM halo potential is spherically symmetric and this may be of some concern as the DM halos under \LCDM\ paradigm are expected to be of triaxial nature \citep[e.g.][]{2002ApJ...574..538J,2014MNRAS.439.2863V}. We discuss the cases with triaxial halo in Section~\ref{sec:triaxial}. \subsection{Simulated stellar halos with artificial accretion history} Besides the \LCDM\ halos, we also utilize additional six simulated stellar halos obtained from \citetalias{2008ApJ...689..936J}, which we refer to as artificial halos. These halos are also simulated in the exact same way as the \LCDM\ halos except that these halos have artificial accretion history, that is they are constructed by collaging accretion events from a library of satellites involved in creating the \LCDM\ halos described previously, but chosen to acquire the following properties: \begin{itemize} \renewcommand{\labelitemi}{\scriptsize$\blacksquare$} \item \emph{rad}: a radial halo built from events predominantly on radial orbits, i.e., ratio of the angular momenta of the orbit to a circular orbit of same energy, $\epsilon<0.2$ \item \emph{circ}: a circular halo built from events predominantly on circular orbits, i.e., ratio of the angular momenta of the orbit to a circular orbit of same energy, $\epsilon>0.7$ \item \emph{old/ancient}: a old halo built from events entirely accreted, the time since accretion, more than 11 Gyr ago, \item \emph{young/recent}: a young halo built from events entirely accreted, the time since accretion, less than 8 Gyr ago. \item \emph{highl}: a high in luminosity halo built from events that were more luminous than $10^{7} L_\odot$, and \item \emph{lowl}: a low in luminosity halo built from events that were less luminous than $10^{7} L_\odot$. \end{itemize} These halos possess roughly $10^9 L_\odot$ stellar tracers. The artificial halos are not cosmologically motivated as they are constructed from a collage of different satellites that have been evolved in different host potential having different concentration parameter $c$. Hence, the intrinsic mass profiles of the resultant artificial halos cannot be properly defined. Therefore, we only use these halos to study the sensitivity of the properties of substructures in the halo to accretion history. All of the above \LCDM\ as well as artificial halos are built up from the disruption of >300 satellites. Among these satellites, only the 15 largest satellites account for $75-90\%$ of the luminosity of the halo. As such, we are only interested in the tracer population dispersed from disrupted satellites that orbit and hence, trace the underlying potential of the parent galaxy. Therefore, we exclude the particles that are still bound to the host satellites as they are not in equilibrium with the parent galaxy. In Fig.~\ref{fig:rvr} we show the radial velocity distributions of the stellar tracer population of the simulated stellar halos as a function of halo-centric distance $r/\kpc\in[1,100]$. In the bottom panel where we show the artificial halos, we see that the tracers of the \emph{young} halo are relatively less relaxed compare to the \emph{old}, \emph{rad} and \emph{lowl} halos, which are better phase-mixed and is as expected. In the top panel of the figure where we show the 11 \LCDM\ halos demonstrate diverse distribution of sub-structures, akin to the distinct accretion history of the halos. The effective number of star particles in these simulated stellar halos ranges between $2-8 \times 10^4$, exception to this are the \emph{rad}, \emph{circ} and \emph{lowl} halos which have $10^5$, $10^5$ and $6\times10^5$ particles respectively. \section{Dynamical Mass: Jeans Formalism}\label{sec:jeans} \begin{figure*} \centering \includegraphics[width=2.1\columnwidth]{HQ_test_log} \caption{Jeans formalism implemented on a synthetic data sampled from the Hernquist distribution. Panels show (a) radial (red line), angular (green line) and azimuthal (black line) velocity dispersions, (b) velocity anisotropy (grey band: measured, red dashed-line: the input profile), (c) number density (grey band: measured, red dashed-line: the input profile), (d) measured radial pressure (e) cumulative mass (grey band: reconstructed from the Jeans equation, red dashed-line: the input profile), and (f) percentage error in the mass measurement (black dots) with dashed lines at $\pm10\%$ as a guide.} \label{fig:test_withHQ} \end{figure*} \subsection{Formulary} The \cite{1915MNRAS..76...70J} equation for a pressure-supported, collision-less and spherically symmetric dynamical system in equilibrium is customarily expressed in spherical polar coordinates as follows: \begin{equation}\label{eqn:jeanseqn} M_{\textrm{Jeans}}(<r) = -\frac{r\,\sigma_r^2}{G} \left( \frac{\text{d} \ln \rho}{\text{d}\ln r} + \frac{\text{d} \ln \sigma_r^2}{\text{d}\ln r} + 2\,\beta \right) \end{equation} \citep{2008ApJ...684.1143X,2012MNRAS.424L..44D,2012ApJ...761...98K,2013MNRAS.432.3361R,2015ApJ...813...89K}. When number density $\rho(r)$, radial velocity dispersion $\sigma_r(r)$ and velocity anisotropy $\beta(r)$ runs of the dynamical tracer population are known, one can substitute them in the Jeans equation to derive the underlying mass $M_{\textrm{Jeans}}(<r)$ (or $M$ for conciseness) distribution of the system. Here, $r$ stands for a distance from the centre of the system, and the velocity anisotropy is expressed as \[\beta=1 - \frac{\sigma_\theta^2 + \sigma_\phi^2}{2 \sigma_r^2},\] where $\sigma_\theta$ and $\sigma_\phi$ are angular and azimuthal velocity dispersions of the tracer population. The $\beta$ parameter can have values between $[-\infty, 1]$, where $\beta<0, \beta =0, \,\text{and}\, \beta>0$ signify tangential, isotropic and radial system. We rearrange equation~\ref{eqn:jeanseqn} and express it in terms of the radial pressure term $(p=\rho\sigma_r^2)$ as follow: \begin{equation}\label{eqn:p_jeanseqn} M(<r) = -\frac{r}{G} \left[ \sigma_r^2 \left( \frac{\text{d} \ln p}{\text{d} \ln r} + 2 \right) - (\sigma_\theta^2 + \sigma_\phi^2) \right] \end{equation} Compared to equation~\ref{eqn:jeanseqn}, equation~\ref{eqn:p_jeanseqn} has one less differentiation operation and also, it does not contain the $\beta$ term explicitly, which makes the analysis simpler. We numerically compute the terms in the right side of the equation in concentric radial shells. The density $\rho_i$ of the $i_{\text{th}}$ bin between radii $r_{i}$ and $r_{i+1}$ is calculated directly from the frequency of the corresponding bin $n_i$ using \begin{equation}\label{eqn:density} \rho_i = \frac{n_i}{(4\pi/3) (r_{i+1}^3 - r_{i}^3) \sum_i n_i}. \end{equation} Here, we have rescaled the density by the total number of tracers ($\sum_i n_i$) and this is to facilitate comparison amongst the simulated halos with varying number of tracers. The scaling has no effect in the final mass measurement as the Jeans equation only demands for the logarithmic slope of the density distribution and not its normalisation. In our case, where star particles are essentially the accreted DM tracer particles with individual luminosity weight ($w_i$), we replace the frequency $n_i$ with the effective sample size = $(\sum_i w_i)^2/\sum_i w_i^2$. Similarly, in this case we calculate the weighted velocity dispersions using \begin{equation}\label{eqn:veldisp} \sigma_w = \sqrt{\frac{\sum_i w_i v_i^2}{\sum_i w_i} - \left( \frac{\sum_i w_i v_i}{\sum_i w_i} \right)^2}, \end{equation} where, $v_i$ represents $v_r/v_\theta/v_\phi$, spherical polar component of the velocity vector of the $i_{\text{th}}$ star particle. Irrespective of the chosen form of the Jeans equation, there are some sources of noise, which are inevitable as they akin to physical processes. For example, the number of dynamical tracers drop sharply at large radii resulting large scatter in $\rho$ and $p$ estimates. Additionally, dispersed (not yet fully phase-mixed) substructures are ubiquitous feature of the \LCDM\ halos that can be present at different radius. In such radial shells velocity dispersions and density measurements are likely to be biased and dominated by the substructures. Consequently, this can bias the slope of the radial pressure ($\text{d} \ln p/\text{d} \ln r$) as well. Also, in the very inner $r\lesssim1$ kpc region of the simulated stellar halo there is usually a sharp rise and then fall in the velocity dispersion profiles. The sudden change in the kinematics for a small change in radius makes the pressure-slope ($\text{d}\ln p/\text{d}\ln r$) poorly measured. Moreover, in reality this region is completely dominated by the bulge and the disc, where it is not relevant to consider finding the potential from the halo tracers. For these reasons we restrict our study to $1<r/\text{kpc}<100$. Finally, we estimate the scatter around our all measurements using the bootstrap scheme, which is implemented by constructing 100 sub-samples (with replacement) of the dataset. We consider the mean and standard deviation of the bootstrapped measurements at each bin as our best measurement and associated uncertainties of the relevant physical quantities respectively. Moreover, to quantify the bias in the mass measurement we define \begin{equation}\label{eqn:massoffset} {\rm mass\ offset (in\ per\ centage)} = 100 \times \frac{M - M_\text{True}}{M_\text{True},} \end{equation} where $M_\text{True}$ denotes the intrinsic mass profile of the parent galaxy (shown in Fig.~\ref{fig:bnjallhalomass}) whereas $M$ represents the galaxy mass estimated from the Jeans formalism. \subsection{Tests with a featureless simple model}\label{sec:hqtest} To investigate inherent biases in our Jeans formalism, first we test the scheme on toy data sampled from an ergodic \cite{1990ApJ...356..359H} model with scale-length $a=15$~kpc, total mass = $1.4 \times 10^{12}~\Msun$, and isotropic velocity distribution ($\beta=0$). By nature the data is smooth, i.e., devoid of any sub-structures or tidal features, and therefore allows us to understand, if any, intrinsic bias in our scheme. To facilitate comparison to our main results with simulated stellar halos, we generate a sample roughly of the same order of magnitude, i.e., $10^5$. In our context where we are probing an order of magnitude range in distances and also, where sample size sharply declines at large distance the logarithmic binning in radius is more appropriate compare to a linear equal width or equal number binning schemes. Therefore, we divide our sample into 15 logarithmically spaced radial shells, and present the key spatio-kinematics properties of the tracers in Fig.~\ref{fig:test_withHQ}. Intrinsically all three velocity dispersion profiles ($\sigma_r$, $\sigma_\theta$ and $\sigma_\phi$) of the tracer population are identical, therefore to make them visually distinct we systematically shift the angular and azimuthal dispersions by $\pm 5 \ifmmode \,\rm km\,s^{-1} \else $\,\rm km\,s^{-1} $ \fi $ (Fig.~\ref{fig:test_withHQ} a). In the figure thickness of all, but except red-dashed, lines presented in panels (a)-(e) show the $1\sigma$ uncertainty levels. Panel (e) compares the underlying mass distribution using the Jeans formalism with the intrinsic values of the system, and finally, panel (f) shows the residual in the mass measurement. In summary, the exercise demonstrates that the spatio-kinematic runs of the test data and the underlying mass distributions of the system at $r>5~\kpc$ can be recovered well enough with negligible mass offset of $0.14^{+1.3}_{-1.9}\%$, where average dispersion is consistent with the median random uncertainties of $1.6\%$. However, due to abrupt change in the slopes of the velocity dispersions the mass profiles in the inner region deteriorates. Additionally, we also achieve similar level of accuracy for alternative cases such as when the velocity distributions of the data are assumed to be radial ($\beta=0.5$ and $0.9$) or tangential ($\beta=-0.5$ and $-1.0$). \section{Results}\label{sec:results} \subsection{Spatio-kinematic profiles of the simulated stellar halos} \begin{figure*} \centering \includegraphics[width=0.925\columnwidth]{allhalos_raddisp_log_weighted} \includegraphics[width=0.925\columnwidth]{allhalos_tandisp_log_weighted} \includegraphics[width=0.925\columnwidth]{allhalos_aniso_log_weighted} \includegraphics[width=0.925\columnwidth]{allhalos_rho_log_weighted} \includegraphics[width=0.925\columnwidth]{allhalos_pressure_log_weighted} \includegraphics[width=0.925\columnwidth]{allhalos_mass_log_weighted} \caption{Key spatio-kinematic properties of the tracer population of the simulated stellar halos and inferred mass distribution of the parent galaxy taken from \protect\citetalias{2005ApJ...635..931B} and \protect\citetalias{2008ApJ...689..936J} simulations.} \label{fig:profiles_wt} \end{figure*} In Fig.~\ref{fig:profiles_wt} we demonstrate the key spatial and kinematic properties of the tracer populations of the 11 \LCDM\ (top panels) and 6 artificial (bottom panels) halos binned respectively in 25 concentric radial shells. As labelled in the figure, each solid line of different colour represents different halo. Panels (a) and (b) show the measured radial velocity dispersion $\sigma_r(r)$, panels (c) and (d) show the measured angular\footnote{to save the space we do not show the azimuthal velocity dispersion $\sigma_\phi$, which generally has runs identical to $\sigma_\theta$.} velocity dispersion $\sigma_\theta(r)$, and panels (e) and (f) show the corresponding velocity anisotropy $\beta(r)$ profiles of the tracer populations. Similarly, panels (g and h) and (i and j) show the measured number density and pressure distributions of the tracer population. Finally, substituting the above measured tracer properties into the Jeans formalism (equation~\ref{eqn:p_jeanseqn}) we estimate the mass profiles of the parent galaxy, which are shown with solid lines in panels (k) and (l). For an easy comparison, in panels (k) and (l) we also over-plot the inherent mass profiles of the parent galaxy assuming maximum (red dashed-line), minimum (green dashed-line) and average (black dashed-line) values of concentration adopted from Fig.~\ref{fig:bnjallhalomass}. The width of the lines in panels (a-j) depict the scatter around the relation obtained from bootstrapping whereas to avoid further cluttering we only show mean relations in panels (k) and (l). There are a few trends we note in Fig.~\ref{fig:profiles_wt}. For example, both the $\sigma_r$ and $\sigma_\theta$ (also $\sigma_\phi$, not shown in the figure) attain highest value for small $r$ and vice-versa, which turn-over at $r \simeq 5$ kpc. Also, all of the halos except the {\it circ} have predominantly radial orbits i.e. $\beta>0$ (see panels e and f). Furthermore, it can be visually attested that the logarithmic density distributions $\rho(r)$ of the tracer particles seem to follow a double power-law with a break at $r \sim20$ kpc. \subsection{Mass reconstruction from tracer population} \begin{figure*} \centering \includegraphics[width=2.1\columnwidth]{allhalos_mass_lcdm_log} \includegraphics[width=2.1\columnwidth]{allhalos_mass_newhalo_log} \caption{Mass profiles of the parent galaxy obtained from the Jeans formalism using the spatio-kinematic profiles of the tracer populations. Black dashed lines show the intrinsic mass profile of the parent galaxy whereas magenta and blue solid solid lines are estimated masses of the galaxy when stellar and accreted DM particles are used as dynamical tracers respectively. The magenta and blue dashed lines shown in small panels at ordinates $\simeq0$ are respective measurements of $|\langle v_r \rangle|/\sigma_r$. The bands of corresponding colours around the blue and magenta lines show the associated uncertainties obtained from the bootstrapping.} \label{fig:massprofile} \end{figure*} \begin{figure*} \centering \includegraphics[width=1\columnwidth]{allhalos_mass_lcdm_offset_log_weighted} \includegraphics[width=1\columnwidth]{allhalos_mass_lcdm_variance_log_weighted} \includegraphics[width=1\columnwidth]{allhalos_massoffset_lcdm_errhist_log_weighted} \includegraphics[width=1\columnwidth]{allhalos_massoffset_lcdm_errhist_log_weighted_rms} \caption{Error analysis of the estimated masses of the parent galaxy using the stellar tracer population of the 11 \LCDM\ halos. Panel (a) shows the percentage mass offset and panel (b) shows the random uncertainties in mass measurements, both as a function of distance, where different colours represent different halos as labelled in Fig.\ref{fig:bnjallhalomass} and for the aesthetic reason we have not shown the uncertainty bands around these trends. Panels (c) and (d) show distributions of the mass offset for cases where we respectively use standard deviation and root-mean square velocity as a measure for the velocity dispersion.} \label{fig:lcdm_mpe} \end{figure*} For clarity, in Fig.~\ref{fig:massprofile} we recast the mass profiles of the parent galaxy of 11 \LCDM\ (top panels) and the 6 artificial (bottom panels) halos, taken originally from panels (k) and (l) of Fig.~\ref{fig:profiles_wt}. The magenta bands with solid lines show the mass profiles of the parent galaxy reconstructed from the Jeans equation using the spatio-kinematic profiles of the stellar tracer populations. The bands around the lines show the bootstrapped uncertainties around the mean measurements. Furthermore, the intrinsic mass distributions of the parent galaxy is shown with the black dashed-line. As mentioned earlier in Section ~\ref{sec:data}, the intrinsic mass profiles of the artificial halos are not known as they are constructed from a mixture of satellites that have been evolved in different host potential. Therefore, in the case of artificial halos we only use the black dashed-lines as a rough guide for the purpose of a qualitative assessment, which are derived assuming the concentration of the artificial halos to be an average concentration of the satellites that make up these halos. The spikes in the mass profiles are far more prominent than the uncertainties in the measured values, therefore statistical noise as a potential cause for the spikes can be ruled out. We now investigate the cause of these spikes. We expect that the mass distributions of the parent galaxy monotonically increase as a function of radius. However, this is not strictly the case for our estimated mass profiles, again magenta lines shown in Fig.~\ref{fig:massprofile}. At many places the mass profiles are bumpy (e.g. {\it halo 09} at $r\sim60~\kpc$, {\it halo 10} at $r\sim70~\kpc$) and in some cases the cumulative mass dips (e.g. {\it halo 08} at $r>60~\kpc$, {\it highl} halo at $r>50~\kpc$), which is unphysical. Similarly, the mass profiles of the {\it highl} halo at $r\gtrsim60~\kpc$ and {\it young} halo at all radius are also bumpy. This discrepant output of our scheme can be understood in conjunction with the radial phase-space diagram shown in Fig.~\ref{fig:rvr}. It is clear from this figure that at some intermittent radius satellites are just dispersing (say, {\it halo 15} at $r\sim80~ \kpc$, {\it halo 09} at $r\sim60~ \kpc$ etc). In such radial shells we will measure biased $\sigma_r$ and $\rho(r)$ and hence, the Jeans equation locally fails here as it demands velocity dispersions of stars evenly populating the velocity range not one biased by clumps. The {\it young} halo (built from recent <8 Gyr ago events), which have not had enough time to fully relax suffers the worst from this scenario. Also, {\it highl} halo (dominated by the massive accretion events) shows significant undulations in mass profiles at large radius. On the contrary, halos such as {\it halo14} does not contain any dominant sub-structures and hence, result a well-behaving mass profile. Similarly, the halos such as {\it old} and {\it lowl}, which are expected to be better phase-mixed halos by construction, have comparatively smoother mass profiles. In the end, we like to validate if the erratic mass measurements at intermittent radii are due to the presence of sub-structures that are out of equilibrium. The mean radial velocity $v_r=0$ is a necessary condition for a system in equilibrium (although not a sufficient condition). So, $|\langle v_r \rangle|/\sigma_r$ can be used to gauge the departure from equilibrium. Note, for N stars in a bin $|\langle v_r \rangle|/(\sigma_r/\sqrt{N})$ is a better measure of the statistically significance of departure of $v_r$ from zero, as it takes the effect of Poisson noise into account. However, we choose to study $|\langle v_r \rangle|/\sigma_r$ as it is physically more meaningful and significant. From equation~\ref{eqn:jeanseqn} we get, \begin{equation} \delta M/M \simeq 2 \delta \sigma_r/\sigma_r \simeq 2 v_r/\sigma_r, \end{equation} assuming that the change in dispersion $ \delta \sigma_r$ is of the order of $v_r$. Hence, $v_r/\sigma_r$ is useful to gauge if a change in $|\langle v_r \rangle|/\sigma_r$ is enough to explain a corresponding change in mass profile. The magenta dashed lines in all the tiny panels of Fig.~\ref{fig:massprofile} we show $|\langle v_r \rangle |/\sigma_r$ the profile. Additionally, to check that a spike in $|\langle v_r \rangle|/\sigma_r$ is statistically significant and not caused by Poisson noise, we show the dispersion with band around $|\langle v_r \rangle|/\sigma_r$ profile using bootstrapping. We find that the erratic spikes seen in the mass profiles at many places, e.g., halo09 at $\sim55\,\kpc$, halo02 at $\sim20\,\kpc$, coincide with spikes in $|\langle v_r \rangle|/\sigma_r$ runs. Moreover, we see that the mass reconstructions outside $r>60\,\kpc$ generally deteriorate for all the halos, which is mainly because of the paucity of mass tracers and dominance of unrelaxed sub-structures in the outskirts. In the figure the blue solid and dashed lines are the corresponding reconstructed mass profiles of the parent galaxy when the accreted DM particles are used as a dynamical tracer. The dark matter particles are not directly observable and the discussion of this case is not useful for pragmatic reasons. However, for the completeness reason we briefly present and discuss the spatio-kinematic profiles and error analysis of this case in the Appendix~\ref{sec:dmcase}. For almost all the halos, we observe that the stellar tracers show comparatively less ridges in the reconstructed mass profiles compare to the cases when DM tracers are used. This is because the DM tracer population have large number of prominent substructures with zero luminosity, and hence zero stellar mass. The intermittent noise in the inferred mass distributions can be reduced by fitting a smooth parametric models to the velocity dispersions and pressure/density runs that enter the Jeans analysis. We restrain from doing so mainly because a smooth model can not capture the impact of substructures in the mass profiles. Also, it leads to a natural question of what are the good models for the dispersion profiles, number density etc. Therefore, we decided to use the binned data directly. A takeaway point from the Fig.~\ref{fig:massprofile} is that in overall the shape of the mass profiles of the parent galaxy of the simulated stellar halos (except for the flagged halos such as {\it highl}, {\it young}), although bumpier at places where sub-structures locally dominate, can be recovered well using the Jeans analysis. Below we provide a more detail account of the biases in our overall mass reconstruction. In Fig.~\ref{fig:lcdm_mpe} we present the error analysis of the mass measurements of the parent galaxy using the stellar tracer populations for all 11 \LCDM\ halos. Panel (a) shows the mass offsets (defined in equation~\ref{eqn:massoffset}) in the estimated mass $M_{\rm Jeans}$ compared to the intrinsic masses as a function of $r$. Similarly, in panel (b) we show the fractional uncertainty ($\sigma_{M}/M$) on the estimated mass measured using bootstrapping as a function of $r$. Different colours of the circles or lines in panels (a) and (b) represents different halos, the labellings consistent with Fig.~\ref{fig:bnjallhalomass}. The average of the coloured lines in panel (b) is shown with the black dashed-line whereas the black solid line is the dispersion profile of the mass offsets obtained from panel (a). The mass offset is due to two sources, a) random uncertainty in the estimator, which is mainly due to Poisson noise and b) the tracers not being in dynamical equilibrium with the potential in which they are orbiting. We can estimate the random uncertainty by bootstrapping and this is given by $\sigma_{M}$. We label the dispersion due to non-equilibrium effects by $\sigma_{\rm noneq}$. The dispersion in mass offset can then be written as \begin{equation}\label{eqn:sig_massoffset} \left(\frac{\sigma_{\rm mass\ offset}}{M}\right)^2= \left(\frac{\sigma_{M}}{M}\right)^2+ \left(\frac{\sigma_{\rm noneq}}{M}\right)^2 \end{equation} If we consider the standard error of mean around the average $\sigma_{\rm mass\ offset}/M$ relation in Fig.~\ref{fig:lcdm_mpe} (b), the solid black line coincides within the $2\sigma$ confidence interval of the mean relation in the inner $r<10~\kpc$. The two relations tracing each other in this regime means that the dispersion in mass offset is dominated by random uncertainty due to Poisson noise and can be reduced by increasing the sample size of the tracers. Moreover, the large uncertainty in the inner $r<10~\kpc$ is of the least concern to us as we are mainly interested in measuring mass for $r\gtrsim10~\kpc$. However, for $r\gtrsim10~\kpc$, the dispersion in mass offset is consistently larger than the random uncertainty and the difference keeps on increasing with increase of $r$. This means that dispersion is dominated by non-equilibrium effects instead of random uncertainty and this dispersion cannot be reduced by increasing the sample size or the precision of observables. Finally, to quantify the bias and dispersion in the mass measurement we present the distributions of the mass offsets in panel (c), where blue, orange and black histograms show the cases with $r\geqslant10~\kpc$, $r<10~\kpc$ and $r/\kpc \in [1,100]$ respectively. The median and the $16^{\rm th}$ and $84^{\rm th}$ percentile ranges are shown in the panels (denoted by per.). In essence, from panel (c) we conclude that in reconstructing the mass profile of the parent galaxy using the stellar halo tracer populations within $r/\kpc\in[10,100]$ the bias is $\sim10\%$ and the dispersion is $\sim14\%$. When we include the results from the inner $r<10~\kpc$ as well, the bias remains the same whereas dispersion marginally increases to $\sim20\%$. Additionally, we also confirm that the bias in the mass measurements are not introduced due to the consideration of mean motion while calculating the velocity dispersion in Equation~\ref{eqn:veldisp}. Importantly from Fig.~\ref{fig:lcdm_mpe}(b) we measure that the random error in mass measurement in the case of $r\gtrsim10~\kpc$ is $\sim7\%$ that is approximately half of the dispersion ($\sim14\%$). Substituting, this value in equation~\ref{eqn:sig_massoffset} we measure the contribution of non-equilibrium effect to be $12\%$. To investigate this we repeat our analysis with root-mean square velocity as a measure for the velocity dispersion and we observe effectively similar bias in mass measurements as demonstrated in panel (d) of the figure. \subsection{Deviation from spherical symmetry}\label{sec:triaxial} \begin{figure} \centering \includegraphics[width=1\columnwidth]{triaxialhalo_qsmhalo} \caption{Distributions of (a) intermediate/major axis ratio (b) minor/major axis ratio, and (c) halo mass in logarithmic scale for triaxial DM halos taken from the {\sc surfs}\ simulation.} \label{fig:triaxialprops} \end{figure} \begin{figure*} \centering \includegraphics[width=2.1\columnwidth]{profiles_halo_63} \caption{Spherical Jeans formalism in a triaxial DM halo from the {\sc surfs}\ simulation with velocity anisotropy, number density and cumulative mass profiles of the halo shown in panels a, b and c respectively. The grey bands show the measured quantities with bootstrapped uncertainties whereas red-dashed line in panel (c) represents the intrinsic mass distribution of the halo.} \label{fig:triaxialprofs} \end{figure*} \begin{figure*} \centering \includegraphics[width=1\columnwidth]{triaxialhalo_mass_offset} \includegraphics[width=1\columnwidth]{triaxialhalo_mass_offset_hist} \includegraphics[width=2\columnwidth]{triaxialhalo_qsmhalo_massoffset_correlation} \caption{Error analysis of the mass measurement of triaxial DM halos taken from the {\sc surfs}\ simulation. Panel (a) shows the random uncertainties in mass measurements and panel (b) shows the percentage mass offset both as a function of scaled radius for all 58 halos whereas panel (c) shows the distribution of the mass offset. Panels d-f show the correlation of the mass offset with triaxiality parameters and the mass of the halo.} \label{fig:triaxialerrs} \end{figure*} A generic prediction of structure formation under the \LCDM\ paradigm is that galactic DM halos are triaxial \citep[e.g.][]{2002ApJ...574..538J,2005ApJ...627..647B,2006MNRAS.367.1781A,2014MNRAS.439.2863V}, which has been shown to become comparatively more spherical due to influence of the baryonic processes \citep{2004ApJ...611L..73K,2006PhRvD..74l3522G,2010ApJ...720L..62K}. The observations of the Galaxy show varying results. In this, study of debris of the Sagittarius dwarf tidal stream distributed on a great circle \citep{2001ApJ...551..294I} and also, the bifurcation in the stream \citep{2006ApJ...651..167F} suggest near spherical Galactic DM halo. In contrast, the line-of-sight velocities of the stream favour a triaxial Galactic halo \citep{2004MNRAS.351..643H}. More recently \cite{2009ApJ...703L..67L,2013MNRAS.428..912D}, while fitting spatio-kinematics of the Sagittarius stream find Galactic potential consistent to be triaxial and determine halo intermediate/major ($b/a$) axis ratio of 0.83 and minor/major ($c/a$) axis ratio of 0.67. The constraints on the shape of the MW DM halo is still an unresolved subject; for additional constraints and further discussion of the topic see the review by \cite{2014JPhG...41f3101R}. As discussed earlier the DM halo potential of the parent galaxy in \citetalias{2005ApJ...635..931B} simulations is spherical. Therefore, to investigate the applicability of the spherical Jeans equation in the case of triaxial halos, here we utilise the {\sc surfs}\ simulation \citep{2017arXiv171201988E}. The {\sc surfs}\ simulation is a suite of cosmological N-body simulations and we focus on its subset with box sizes 40$h^{-1}$ Mpc. The halo catalogues are constructed with the VELOCIraptor phase-space halo finder \citep{2011MNRAS.418..320E}. From the {\sc surfs}\ halo catalogue we focus on low mass groups with virial masses \footnote{mass enclosed within the radius where the over density is 200 times the critical density of the universe} of $\sim 10^{12.5}\,M_\odot$, which provides us with a sufficient statistical sample of well resolved halos composed of $\sim 5\times10^4$ DM particles. Unfortunately, the {\sc surfs}\ simulation does not readily provide stellar tracer population and therefore, hindering a more realistic test. As such it is not crucial at this point as we are only interested in understanding the sensitivity of the spherical Jeans equations in reconstructing the mass profiles of triaxial systems. We note that the mass range of the selected halos we assume is slightly larger than a typical observational estimate of $\sim 10^{12}\,M_\odot$ for the virial mass of the Galaxy \citep[e.g.][]{2011MNRAS.414.2446M,2014ApJ...794...59K,2014A&A...562A..91P,2016ARA&A..54..529B}, a result of requiring haloes resolved with several tens of thousands of particles and the mass resolution of the simulation used. This mass difference between our mock haloes and the MW is irrelevant as in this narrow mass interval we expect that the number density and kinematic profiles of the halos tracer populations remain self-similar. Critically, here we are only testing the applicability of the spherical Jeans formalism in mass reconstruction of the non-spherical halos, therefore all we need is a set of realistic triaxial halos. Haloes within this mass range span a range of triaxiality parameters\footnote{the shape is calculated using the reduced inertia tensor \citep{1991ApJ...378..496D,2006MNRAS.367.1781A}}, from $b/a=[0.35,0.95]$ with typical values of 0.78 and with $c/a=0.7\,b/c$ \citep[][see Fig.7]{2017arXiv171201988E}. In the end, we only use halos that have the triaxiality parameters reasonably close to the observed values of $b/a \approx 0.8$ and $c/a \approx 0.7$ for the MW DM halo \citep{2009ApJ...703L..67L,2013MNRAS.428..912D}. The distributions of the axis ratio and halo mass of our final sample of 58 halos are shown in the top panels of the Fig.~\ref{fig:triaxialprops}. Finally, we split the DM tracer population of these halos into 15 concentric spherical radial shells within $r\leqslant100\,\kpc$, and apply the spherical Jeans formalism (Section~\ref{sec:jeans}). The grey bands in Fig.~\ref{fig:triaxialprofs} (a) and (b) show the measured anisotropy and number density of the tracer population whereas panel (c) shows the derived cumulative mass profile of the underlying DM halo with the total mass of $\log_{10}(M_\text{halo}/M_\odot) = 12.9$ and axial ratios of $b/a=0.8$ and $c/a=0.7$. In panel (c) the over-plotted red dashed-line represents a spherically averaged intrinsic mass profile of the halo. We see that the spherical Jeans formalism reconstruct the mass profile of the halo reasonably well and results of the remaining 57 halos are also consistent with this. In Figure~\ref{fig:triaxialerrs} we provide an error analysis of the estimated masses of the triaxial halos. The panel (b) demonstrates the mass offset (in percentage) for all the 58 halos as a function of scaled radius $r/r_\text{max}$, where $r_\text{max}$ corresponds to the radius $r$ at which the circular velocity of the halo is maximum. Dashed lines in the panel highlights the offset of $10\%$ and $20\%$. The blue and orange histograms shown in panel (c) however show the distributions of mass offset at all scaled-radii $r/r_\text{max}>0.2$ and $>0.0$ respectively. The median mass offset at $r/r_\text{max}>0$ is $-5.9^{+16.4}_{-31.9}\%$, and $-2.4^{+9.4}_{-9.9}\%$ at $r/r_\text{max}>0.2$. The dispersion in the mass offset in the case of DM tracer populations of the 11 \LCDM\ halos of \citetalias{2005ApJ...635..931B} at outer region ($r\geq10~\kpc$) is of similar level $\sim 7 \%$ although the bias is positive here ($\sim 3\%$). The dispersion obtained for $r/r_\text{max}>0.2$ case is $8.7\%$ after adjusting for random uncertainty. In agreement with the \citetalias{2005ApJ...635..931B} \LCDM\ halos, here again we confirm that the biases in the mass measurements are not due to subtracting mean motion while calculating the velocity dispersion (in Equation~\ref{eqn:veldisp}). In the figure we observe that generally in the inner $r/r_\text{max}<0.2$ region the scatter in the residual of the mass estimate is large. To further investigate the anomaly, in panels (d), (e) and (f) we show the relation of average mass offset at $r/r_\text{max}<0.2$ as a function of $b/a$, $c/a$ and halo mass respectively, and also provide their respective correlation measurements. We fail to find any correlations between the observed mass offsets and the aforementioned intrinsic properties of the halos. Finally, from panel (a), where the ratios of dispersion to the estimated mass $M_{\mathrm{Jeans}}$ of the triaxial halos are shown, and similar to the earlier cases of \citetalias{2005ApJ...635..931B} \LCDM\ halos, here also we find that the large scatter in the residual of the mass estimate in the inner region is mainly due to Poisson noise. In summary, we conclude that in the outer $r/r_{\mathrm{max}}>0.2$ the underlying mass profiles of the {\sc surfs}\ halos can be determined with a bias of $\sim-2.4\%$ and a dispersion of $\sim10\%$. Note, this dispersion includes the effects of triaxiality as well as departures from equilibrium. \section{Discussion and conclusion}\label{sec:conclusions} In this paper, we utilise the 11 Milky Way stellar halos simulated in accordance with \LCDM\ by \citetalias{2005ApJ...635..931B}, 6 additional simulated stellar halos from \citetalias{2008ApJ...689..936J} built to have artificial accretion histories dominated by events that are predominantly recent/old, on radial/circular orbits or having larger/smaller satellite mass, and 58 triaxial DM halos obtained from the {\sc surfs}\ simulation \citep{2017arXiv171201988E} to test the efficacy of the spherical \cite{1915MNRAS..76...70J} formalism in predicting the mass distribution of the Milky Way analogues in a \LCDM\ universe. In overall, using the spatio-kinematic profiles of the stellar tracer population and the spherical Jeans equation we recover the underlying mass distribution of the Milky Way analogues in a \LCDM\ universe within $r/\kpc\in[10,100]$, with a bias of $\sim 12\%$ and a dispersion of $\sim14\%$ ($12\%$ when adjusted for random uncertainty). Additionally, analysing triaxial DM halos obtained from the {\sc surfs}\ simulation with intermediate/major axis ratio in range [0.5, 1] and minor/major axis ratio in range [0.5, 0.7], we are able to recover the underlying mass distribution of the halos with a bias of $\sim -2.4\%$ and a dispersion of $\sim10\%$ ($8.7\%$ when adjusted for random uncertainty), in the outer $r/r_\text{max}>0.2$ region of the halos. Similar level of dispersion ($\sim7\%$ or $\sim6\%$ when adjusted for random uncertainty) is also observed for the case of the DM halos of \citetalias{2005ApJ...635..931B} but with positive bias of $\sim 3\%$. In perfect conditions, a spherical system in equilibrium, we can correctly reconstruct the mass profile and there is no bias and dispersion that can be accounted by random uncertainty on the estimated mass. When applied to data from simulations we do see some bias and dispersion, meaning the bias and dispersion can be either due to system being aspherical and out-of-equilibrium or due to an unknown effect in simulations. We find little correlation of mass offsets with asphericity, so out-of-equilibrium effects seem to be the main cause behind the observed mass offsets. The out-of-equilibrium effects will shift the mass estimates at any given radius and this will lead to a non-zero dispersion. So the dispersion in principle sets a limit on the accuracy with which we can expect to measure mass at a given radius for any halo using the spherical Jeans equation. This limit is set due to the inherent nature of the \LCDM\ halos and is independent of the quality and the quantity of the observational data. Using {\sc galaxia} \citep{2011ApJ...730....3S}, a stellar population synthesis software utilising Padova isochrones \citep{2008A&A...482..883M}, we estimate that, till the magnitude limit of 17 in V-band, {\it Gaia} will have more than 5 times the number of tracers that we have investigated here. So, the error on the mass estimates of the Galaxy using stellar tracers provided by the {\it Gaia} using the Jeans analysis will be limited by the non-equilibrium effects as well as uncertainties in observed distances and tangential velocities rather than the sample size. The fact that the two different simulations (with DM particles as tracers) give similar level of dispersion ($10\%$ for {\sc surfs}\ and $7\%$ for \citetalias{2005ApJ...635..931B} halos) in estimated masses is reassuring for our estimate of the dispersion. When applied to \citetalias{2005ApJ...635..931B} stellar halos (stellar particles as tracers) we get a higher dispersion ($14\%$). This is the case that is of practical use, as we observe stars rather than dark matter particles. The higher dispersion here is also as expected, since, the stellar halos have more substructures than dark matter halos. Dispersion could also be due to random uncertainty associated with our mass estimator (effect of Poisson noise). We have shown that the random uncertainty is a factor of two smaller than the measured dispersion for all analysed cases. The total variance being the sum of squares of random and intrinsic scatter, the random uncertainty should make very little contribution to the dispersion. Taking the random uncertainty into account we estimate the intrinsic scatter due to non-equilibrium effects to be $12\%$ for the case of stellar halos. The interpretation of bias is less obvious. Naively we expect the bias to be zero, at a given radius, the non equilibrium effect can shift the mass in either direction (as the quantities on the right side of equation~\ref{eqn:jeanseqn} can shift in either direction). For the {\sc surfs}\ as well as \citetalias{2005ApJ...635..931B} dark matter halos, although not negligible but the bias is a factor of two smaller than the dispersion. For the \citetalias{2005ApJ...635..931B} stellar halos the bias is much higher but still less than the dispersion. The sign of the bias is different for the {\sc surfs}\ and \citetalias{2005ApJ...635..931B} simulations, and we have not been able to find a reason for it. However, the bias is significant only if we treat the measurement at each radius as independent and this might not be true. Typically, a few luminous/massive accretion events dominate in shaping the overall properties of a given the stellar halo. Specifically the fraction of material in substructures is dominated by a few luminous accretion events \citep[Sec 4.4]{2011ApJ...728..106S}. So mass measurements of a given halo at different radius can be correlated. Given that we only have 58 independent halos for the {\sc surfs}\ and 11 for \citetalias{2005ApJ...635..931B}, the measured biases are less than twice of (disperion/$\sqrt \textrm{number of halos}$) and are within the $2\sigma$ limit. For the case of stellar halos the bias is higher but still within $2.5\sigma$ limit. We note that in \citetalias{2005ApJ...635..931B} simulations, a stellar halo is created by assigning unequal weights to dark matter particles. Although less likely (as after getting disrupted the particles of a satellite behave more or less independently) but it is worth exploring in future if this weighting scheme can introduce a systematic bias. Another possibility could be that the bias is a reflection of the initial conditions used to generate the accretion history of the halo. The accreting satellites tend to be closer to (or further from) peri- or apo-centre than one would expect for a phase mixed population, meaning that their radial velocities are lower (or higher) than in that case. When the satellites disrupt and get fully phase mixed the system will be in equilibrium and the bias would vanish. However, here we are analysing a partially relaxed system, as evidenced by the presence of significant amount of substructure, and this can can lead to a non zero bias. For example, if we consider the simple spherical collapse model of the formation of a dark matter halo, at turn around the total energy is mostly potential, while at the collapse it is kinetic. Applying Jeans equation here will give systematically lower mass at the turn around stage and higher mass at the collapse stage. The fact that the initial conditions are different in {\sc surfs}\ and \citetalias{2005ApJ...635..931B} simulations, could possibly lead to different biases in them. Additionally, the investigation of the simulated stellar halos with artificial accretion history suggests that the young halo built from events less than 8 Gyr and the halo dominated by high luminosity ($>10^7$ L$_\odot$) accretion events, show the most undulations in the mass profiles and hence, are the most error prone cases to apply the Jeans analysis. This is due to significant amount of unrelaxed substructures inherently present in these halos. On the contrary, a halo dominated by less luminous ($<10^7$ L$_\odot$) accretion events, a well mixed halo, provide good scenario to apply the Jeans formalism. \section*{ACKNOWLEDGEMENTS} PRK is funded through Australian Research Council (ARC) grant DP140100395 and the University of Western Australia Research Collaboration Awards PG12104401 and PG12105203. We like to thank the referee for constructive and insightful comments that helped to improve the paper significantly. We also thank Prof. Chris Power and Dr. Claudia Lagos for providing the {\sc surfs}\ data, and Prof. Geraint Lewis and Dr. Luke Davies for discussions related to the paper. \emph{Software credit}: {\sc ipython} \citep{ipython}, {\sc matplotlib} \citep{matplotlib}, {\sc seaborn} \citep{seaborn}, {\sc pandas} \citep{pandas}, {\sc numpy} \citep{numpy} and {\sc scipy} \citep{scipy}. \section{Appendix}\label{sec:dmcase} \subsection*{The case of accreted DM tracer population} \begin{figure*} \centering \includegraphics[width=0.9\columnwidth]{allhalos_raddisp_log} \includegraphics[width=0.9\columnwidth]{allhalos_tandisp_log} \includegraphics[width=0.9\columnwidth]{allhalos_aniso_log} \includegraphics[width=0.9\columnwidth]{allhalos_rho_log} \includegraphics[width=0.9\columnwidth]{allhalos_pressure_log} \includegraphics[width=0.9\columnwidth]{allhalos_mass_log} \caption{Analogous to Fig.~\ref{fig:profiles_wt}, but for the case when accreted DM particles taken from \protect\citetalias{2005ApJ...635..931B} and \protect\citetalias{2008ApJ...689..936J} simulations are used as a dynamical tracer.} \label{fig:profiles} \end{figure*} \begin{figure*} \centering \includegraphics[width=1\columnwidth]{allhalos_massoffset_lcdm_errhist_log} \caption{Error analysis of the estimated masses of the parent galaxy using the accreted DM tracer populations of the 11 \LCDM\ halos, with labels same as Fig.~\ref{fig:lcdm_mpe}(c).} \label{fig:lcdm_dm_mpe} \end{figure*} Here we demonstrate key results obtained using the accreted DM tracer population although this may not have any observational relevance as it is not possible to directly observe the DM. Nonetheless, we conduct the exercise to establish a few point discussed below. First, in Figure~\ref{fig:profiles} (analogous to Fig.~\ref{fig:profiles_wt}) we demonstrate key spatio-kinematic properties of the accreted DM tracer population (with sample size of $10^5$) from \citetalias{2005ApJ...635..931B} and \citetalias{2008ApJ...689..936J} simulations. We note that similar to Fig.~\ref{fig:profiles_wt}, where stellar tracer populations are utilised, both the $\sigma_r$ and $\sigma_\theta$ (also $\sigma_\phi$, not shown in the figure) attain highest value for small $r$ and vice-versa, which turn-over at $r \simeq 5$ kpc. Similarly, except the case of {\it circ} halo all the simulated stellar halo have predominantly radial orbits. However, we note that compare to the earlier case when stellar tracers are used, the velocity dispersion profiles and hence, also anisotropy, have larger inter-halo scatter. Notably, we also find that the density slope at $r<$ break-radius is comparatively steeper in the current case. Second, the corresponding reconstructed mass profiles of the individual halos are already shown with blue lines in Fig.~\ref{fig:massprofile}. Finally, in Fig.~\ref{fig:lcdm_dm_mpe} (analogous to Fig.~\ref{fig:lcdm_mpe} c) we present the distributions of the biases in the estimated masses at various distance range. Number of DM tracers we utilise in Fig.~\ref{fig:massprofile} are roughly of the similar order of magnitude to that of the stellar tracers we had in Section~\ref{sec:results}, i.e., $10^5$. We find that in this case the overall mass offset is $\sim3\%$ with $\sim7\%$ ($\sim6\%$ when corrected for random uncertainty) of dispersion, which are clearly better than the respective errors of $12\%$ and $14\%$ we obtained earlier with the stellar tracer populations. This is expected and has a physical cause. As mentioned in Section~\ref{sec:data}, in the \citetalias{2005ApJ...635..931B} simulation the stars are ``painted on'' by assigning a luminosity weight to each dark matter particle within an accreted satellite. These luminosity weights are proportional to the binding energy of the satellite meaning the stellar tracer populations generally comes from the core of the accreted satellites, hence, takes longer to relax compare to the DM tracer population resulting larger upset in the estimated mass profiles. \bibliographystyle{mnras}
\subsection{Modelling the dressed MOT} As discussed in the main text, the light induced forces in the MOT are weak compared to gravity. Therefore the atoms in the MOT fall under gravity until the Zeeman shift, induced by the MOT quadrupole field, matches the MOT beam detuning. Due to the nature of the quadrupole field, the resulting resonance condition forms an elliptical ‘shell’ around the quadrupole centre, as shown by the contours of constant energy in Fig. \ref{fig:Res_cond}(a). The application of the dressing beam induces a spatially dependent AC Stark shift of the MOT transition, due to its Gaussian intensity profile. This leads to a distortion of the elliptical energy contours. The distortion is strikingly dependent of the sign of $\Delta$. Fig. \ref{fig:Res_cond}(b) and (c) show the energy contours for $\Delta<0$ and $\Delta>0$. For the case of $\Delta<0$, the resonance condition becomes shallower and `double-welled', leading to a spreading of the MOT and a weakening of the confinement. This can be seen in the top row of Fig. \ref{fig:Res_cond_data} where the MOT appears to form in two separate locations. This is the dominant reason for the difficulty in compensating the dressed MOT for $\Delta<0$. Conversely, for $\Delta>0$, the resonance condition becomes more deeply furrowed, facilitating strong confinement and making it easier to maintain a compensated MOT. This can also be seen in the top row of Fig. \ref{fig:Res_cond_data} where the MOT appears to form in lower positions, creating a vertically elongated MOT. Below the experimental data in Fig. \ref{fig:Res_cond_data} is the results of a two-dimensional Monte Carlo simulation, based upon \cite{Hanley2017}. The model is semi-classical and based upon the optical Bloch equations. From the steady-state solution of the optical Bloch equations, the scattering dynamics of the atoms are calculated. The addition of the dressing beam is included by solving the three-level optical Bloch equations analytically, using Mathematica. This gives rise to the AC Stark shift of the MOT transition as well as facilitating the inclusion of an atomic loss rate, where the probability of loss is given by \begin{equation} P = \Gamma_r \rho_{rr} \delta t~, \end{equation} where $\Gamma_r$ is the Rydberg state decay rate, $\rho_{rr}$ is the Rydberg state population and $\delta t$ is the simulation time-step. This simulates the event that the direct excitation of a Rydberg atom leads to the loss of that atom from the MOT. We observe excellent agreement between the theoretical and experimental spatial distributions of the atoms in the MOT, allowing us to include density dependent Rydberg-dressed interactions into our model. \begin{figure} \centering \includegraphics[width=\columnwidth]{Resonance_condition.pdf} \caption{\label{fig:Res_cond} The figure shows contours of constant energy of the $m_j = -1$ state in the presence of the magnetic quadrupole field, with a vertical gradient of $\SI{8}{G cm^{-1}}$, for the case of no dressing (a) and dressing with $\Delta<0$ (b) or $\Delta>0$ (c) respectively.} \end{figure} \begin{figure*} \centering \includegraphics[width=\textwidth]{figure-appendix-img-func-UV-det-final.pdf} \caption{\label{fig:Res_cond_data} The top (experimental) and bottom (theoretical) rows show absorption images of the MOT for $\tilde{\Omega}/2\pi = \SI{2.1}{MHz}$, $\delta/2\pi =\SI{-400}{kHz}$ and a variety of $\Delta$. } \end{figure*} \subsubsection{Adding Rydberg-dressed interactions} Once the local density distribution of the atoms is known, it is possible to add density-dependent interactions to the model. However, as the Rydberg-dressed interactions only occur between atoms in the dressed state $\left|\tilde{e}\right\rangle$, we must first estimate $\eta$. Naively, one would expect that the steady-state, three-level Bloch solution would lead to an accurate value of $\rho_{ee}$. However, due to the motion of the atoms in the quadrupole field, this is not the case. We estimate $\eta$ by taking the average value of $\rho_{ee}$ calculated from the simulation. Fig. \ref{fig:rho_ee} shows $\eta$ as a function of $S$ for two experimental configurations. The first (blue diamonds) is where the power in all MOT beam directions is equal. The second (red circles) is where the power of the MOT beam in the vertical direction is three times that of the other MOT beams. We clearly observe a saturation effect at larger values of $S$ which arises from the frequency shift due to the atomic recoil following the absorption or emission of a photon. \begin{figure} \centering \includegraphics[width=\columnwidth]{eta_func_s_figure.pdf} \caption{\label{fig:rho_ee} The figure shows the average excited fraction as a function of MOT beam power for beam powers in a ratio of 1:1:1 (blue diamonds) and 1:1:3 (red circles) where the ratio is between $\bm{\hat{x}}:\bm{\hat{y}}:\bm{\hat{z}}$ laser beam axes. The error bar shows the standard error on the mean.} \end{figure} The Rydberg-dressed MOT operates in a complex regime where the interaction strength, dissipation and kinetic energy are all comparable in scale, limiting the usefulness of common approximations \cite{Macri2014,Genkin2014,Buchmann2017,Malossi2014,Marcuzzi2014,Weimer2010} for such many-body systems. To fully treat this interacting system, one must include correlations between atoms as the Rydberg-dressed interactions strongly correlates the scattering rate and hence the cooling of neighboring atoms. However, the coupling of correlations as well as atomic motion is a formidable theoretical challenge. For this reason, we consider a first-order mean-field approximation to the Rydberg-dressed potential. We approximate the Rydberg-dressed potential as \begin{align} V\left(N\left(\bm{r^{\prime}}\right),\bm{r}\right) &= \frac{N\left(\bm{r^{\prime}}\right)-1}{2}\eta V_0~&\rm{for}~&\left|\bm{r}-\bm{r^{\prime}}\right|<R_C~,\\ V\left(N\left(\bm{r^{\prime}}\right),\bm{r}\right) &= 0~&\rm{for}~&\left|\bm{r}-\bm{r^{\prime}}\right|>R_C~, \end{align} where $N\left(\bm{r^{\prime}}\right) = \pi R_{\rm{c}}^2 \rho_{\rm{2D}}\left(\bm{r^{\prime}}\right)$. This leads to an additional energy shift $V\left(N\left(\bm{r^{\prime}}\right)\right)/\hbar$ of $\left|\tilde{e}\right\rangle$ that depends on the local atomic density $\rho_{\rm{2D}}\left(\bm{r^{\prime}}\right)$. This additional energy shift is included in the model which in turn alters the scattering dynamics. \subsection{Radiation Pressure} Here we detail radiation pressure effects in both the undressed and dressed MOT. The signatures of radiation trapping have been studied in a number of experiments \cite{Overstreet05,Townsend1995,Drewsen1994,Grego1996,Gabbanini1997,Vorozcovs05}, where the re-absorption of spontaneously emitted photons results in a repulsive force between the atoms which limits the maximum achievable density. For MOTs formed on inter-combination lines (as in our experiment) there is a suppression of this effect due to the reduced scattering rate compared to that of conventional MOTs, leading to larger achievable densities \cite{Katori1999}. However at high densities we observe an increase in both cloud temperature and width which can be attributed to radiation trapping. The radiation trapping force between two atoms separated by a distance $d$ is defined as \cite{Sesko1991,Foot1992} \begin{equation} F_{\rm{R}} = \frac{\sigma_{\rm{l}}\sigma_{\rm{r}}I}{4\pi cd^2}, \label{eqn:rad_press} \end{equation} where $\sigma_{\rm{l}}$ is the cross-section for absorption of a laser photon, $\sigma_{\rm{r}}$ a re-radiated photon and $I$ is the beam intensity. We define $\sigma_{\rm{l}}$ using the on resonance cross-section, $\sigma_{\rm{0}} = 3\lambda^{2}/2\pi$, \begin{equation} \sigma_{\rm{l}} = \frac{\sigma_{\rm{0}}}{1+S+4(\Delta/\Gamma)^{2}}. \end{equation} \begin{figure} \centering \includegraphics[width=\columnwidth]{appendix_radpress1.pdf} \caption{\label{fig:radpress1} MOT volume versus the number of trapped atoms (black circles). Red dashed line is a fit through the origin for atoms numbers $>$ \num{2.5e5}. } \end{figure} From \cite{Sesko1991}, the ratio $\sigma_{\rm{r}}/\sigma_{\rm{l}}$ can be determined from $n_{\rm{ms}}$, the maximum attainable density in the multiple scattering regime. Due to the repulsive force between the atoms at higher trap densities, the MOT radius is determined by the number of atoms $N$, rather than the temperature, and scales as $N^{1/3}$. Fig.~\ref{fig:radpress1} shows the undressed MOT volume as a function of atom number. Here the increase in volume for atom numbers $> \SI{2.5e5}{}$ indicates the onset of radiation trapping. Fitting a straight line to the data in this regime predicts an $n_{\rm{ms}}= \SI{1.1 \pm 0.6 e12}{cm^{-3}}$ and hence a cross-section ratio $\sigma_{\rm{r}}/\sigma_{\rm{l}} \sim 1$. An increase in temperature of \SI{0.3}{\upmu K} over a range $\rho$ of \SIrange[range-phrase = --,range-units = brackets]{1}{7e11}{cm^{-3}} provides further evidence of radiation trapping. This is in agreement with data shown in \cite{Katori1999}. As shown in the main text, applying the dressing laser causes the cloud to expand and hence leads to a fast decay in density. The expansion results from a combination of radiation trapping along with a weakening in the trap confinement due to the Gaussian profile of the dressing beam, as described in the previous section. To first approximation, the instantaneous `switch-on' of the dressing beam means that the atoms do not initially strongly interact with the MOT beams due to the change in resonance condition (see Fig.~\ref{fig:Res_cond}). This implies that radiation pressure is the dominant force in the first $\sim\SI{2}{ms}$ and forces attributed to MOT beam scattering can be neglected. We simulate the initial expansion process of the MOT whilst dressing using a simple one-dimensional model which is based upon Eq. \ref{eqn:rad_press}. Initially we use a normal distribution of atoms with a $1/e^2$ radius of $\SI{60}{\upmu m}$, similar to the experimentally measured value. The total simulation is broken down into a series of time steps. At each time-step, we calculate the force and velocity of each atom due to the presence of all others. The atoms are then allowed to evolve following Newtonian dynamics, before the force is re-calculated. At each time step, the position of the atoms is recorded from which the width of the resulting distribution is measured. Fig.\ref{fig:rad_press2} shows the model produces a similar expansion rate of the atoms in the first \SI{2}{ms}, compared to the experimentally measured widths $w_x$ of the high density MOT. For a low initial density the increase in width is much less significant, but at longer times as MOT forces become dominant we see similar gradients at both low and high densities. Furthermore, experiments taken at different states under the same conditions show that the expansion in cloud width is independent of the Rydberg state from $34<n<37$. These results provide evidence that the decay in density within the dressed MOT is due to a combination of radiation trapping and the change in resonance condition due to the non-uniform profile of the dressing beam. \begin{figure} \centering \includegraphics[width=\columnwidth]{appendix_radpress2.pdf} \caption{\label{fig:rad_press2} Dressed MOT width $w_x$ plotted as a function of dressing time $t_d$ for the $\rm{5s34d \ ^{3}D_{2}}$ (blue circles) and $\rm{5s37d \ ^{3}D_{2}}$ (purple squares) at high (filled markers) and low (hollow markers) initial densities. Also shown is the cloud width determined from the model (grey) as described in the text. } \end{figure}
\section{Introduction} \label{sec.introduction} Ever since the discovery of the exotic $^{11}$Li nucleus~\cite{1986Tanihata}, there have been many experimental~\cite{2003Jonson,BAUMANN12,TANIHATA13} and theoretical~\cite{2003Okolowicz,2014Volya,MICHEL09} studies of nuclei far from the beta stability line. On the experimental side, new techniques were developed to produce and study the properties of rare isotopes. On the theoretical side, new models were developed to guide and explain the experimental findings. The theoretical and experimental understanding of unstable nuclei will continue to be one of the main goals of the nuclear physics community~\cite{2013Nap}, as testified by the construction and updating of a number of facilities around the world~\cite{2000Mueller,2000Nupecc,2013Blumenfeld,2014Motobayashi}. Experimentally, one method of studying unstable nuclei is by means of their decay energy spectrum, which measures the number of decays per unit of energy versus energy (see for example Refs.~\cite{PEREZ16,VANDEBROUCK17}). In particular, by using techniques such as invariant-mass spectroscopy, it is possible to obtain the experimental decay energy spectrum of some unstable nuclei that decay by neutron emission (see for example Refs.~\cite{BAUMANN12,SPYROU10,SPYROU12,THOENNESSEN12}). Hence, it is important to be able to calculate such spectra theoretically. In Refs.~\cite{NPA15,NPA17}, the resonant (Gamow) state was used to obtain a theoretical expression for the decay energy spectrum of an unstable system decaying into the continuum. The purpose of the present paper is to use the formalism of Refs.~\cite{NPA15,NPA17} to obtain the energy spectrum of the $^{25}$O nucleus, which decays by neutron emission. Dripline Oxygen isotopes are currently of great interest, both theoretically and experimentally. From the excited states of $^{19}$O~\cite{2016Dungan} to the isotopes well beyond the neutron drip line~\cite{2017Fossez}, there are several Oxygen isotopes whose energies, widths, and decay energy spectra can be used as a test bench for different theories. The heavier neutron drip line nucleus that has been observed experimentally is $^{24}$O, which was found to be doubly magic~\cite{2009Hoffman}. An excited state of $^{24}$O was found~\cite{JONES15} to decay sequentially to $^{22}$O. In addition, other low-lying neutron-unbound excited states of $^{24}$O have been measured~\cite{ROGERS15}. The energy and width of the unbound ground state of $^{25}$O were investigated in Refs.~\cite{HOFFMAN08,CAESAR13,KONDO16,2017Jones}, and strong evidence for the first excited state of $^{25}$O was found in Ref.~\cite{2017Jones}. The ground state~\cite{LUNDERBERG12,KONDO16}, excited states and decay modes~\cite{THOENNESSEN12,CAESAR13} of $^{26}$O have also been studied. In our analysis, we will use the neutron-unbound $^{25}$O because its decay energy spectrum has been measured experimentally~\cite{HOFFMAN08,CAESAR13,KONDO16,2017Jones}. Since $^{24}$O is doubly magic, we will treat $^{25}$O as a valence neutron in an $^{24}$O core, and we will describe the valence neutron by a Gamow state. This two-body model is able to reproduce the experimental ground state of $^{25}$O, 3/2$^+$. However, our two-body model yields 7/2$^-$ as the first excited state, instead of the one found experimentally, 1/2$^+$. The structure of the paper is as follows. In Sec.~\ref{sec.formalism}, we summarize the formalism needed to calculate the theoretical decay energy spectrum. In Sec.~\ref{sec.validation}, we assess the validity of the code. In Sec.~\ref{sec.oxygen25}, we apply the code to the $^{25}$O nucleus. We will model the interaction between the valence neutron and the $^{24}$O core by the Woods-Saxon and the spin-orbit potentials, and obtain the energies, widths and decay energy spectra of the ground and first excited states. We will compare our results with those obtained by the Continuum and the Gamow Shell Models~\cite{MICHEL09,2014Volya}. We will also compare the theoretical decay energy spectrum with the experimental ones~\cite{HOFFMAN08,CAESAR13,KONDO16,2017Jones}. In addition, we will discuss the similarities and differences (both quantitative and phenomenological) between the Gamow-state decay energy spectra and the Breit-Wigner distributions with energy-dependent width. In Sec.~\ref{sec.conclusions}, we summarize our main results and present an outlook of future applications. \section{Formalism} \label{sec.formalism} In order to be self-contained, in this section we outline the main ingredients needed to calculate the decay energy spectrum of $^{25}$O. \subsection{The decay energy spectrum of a Gamow state} Let $H=H_0 + V$ be the Hamiltonian that describes the decaying system, formed in our model by an inert $^{24}$O core and a valence neutron. The free Hamiltonian $H_0$ is the part of the Hamiltonian that describes the valence neutron after it has been ejected and is far away from the core, whereas $V$ is the interaction potential between the core and the valence neutron. Let us describe the unstable state by a Gamow~\cite{1928Gamow} state $|z_{\text{\tiny R}} \rangle$ such that $H |z_{\text{\tiny R}} \rangle = z_{\text{\tiny R}} |z_{\text{\tiny R}} \rangle$ and $z_{\text{\tiny R}} =E_{\text{\tiny R}} - {\rm i}\, \Gamma _{\text{\tiny R}} /2$. Then, the differential decay width $\frac{d\overline{\Gamma}}{dE}$, which describes the strength of the interaction between the resonance and the continuum at each scattering energy $E$, is given by~\cite{NPA15} \begin{equation} \frac{d\overline{\Gamma}(E)}{dE} = 2\pi L(E) | \langle E | V | z_{\text{\tiny R}} \rangle |^2 \, , \label{eq.ddw} \end{equation} where $L(E)$ is the Lorentzian distribution \begin{equation} L(E) = \frac{1}{\pi} \frac{\Gamma _{\text{\tiny R}} /2}{(E - E_{\text{\tiny R}} )^2 + (\Gamma _{\text{\tiny R}} /2)^2} \, , \end{equation} and $|E\rangle$ is an eigenstate of the free Hamiltonian with energy $E$, $H_0|E\rangle =E|E\rangle$. The normalized, theoretical decay energy spectrum of a resonance decaying into the continuum is then obtained as~\cite{NPA15} \begin{equation} \frac{dP(E)}{dE} = \frac{1}{\overline{\Gamma}} \frac{d\overline{\Gamma}(E)}{dE} = \frac{2\pi}{\overline{\Gamma}} L(E) \, | \langle E | V | z_{\text{\tiny R}} \rangle |^2 \, , \label{eq.des} \end{equation} where $\overline{\Gamma}$ is the total decay width, \begin{equation} \overline{\Gamma} = \int_0^\infty \left( \frac{d\overline{\Gamma}}{dE} \right) dE = 2\pi \int_0^\infty L(E) | \langle E | V |z_{\text{\tiny R}} \rangle |^2 dE \, . \label{eq.tdw} \end{equation} We will identify the theoretical spectrum of Eq.~(\ref{eq.des}) with the experimental decay energy spectrum. It should be noted that $\overline{\Gamma}$ is in general different from $\Gamma _{\text{\tiny R}}$, and therefore $\overline{\Gamma}$ is not related to the lifetime of the resonance. Physically, we can interpret $\overline{\Gamma}$ as a measure of the overall strength of the interaction between the resonance and the continuum. This is why in Sec.~\ref{sec.oxygen25} we will use $\overline{\Gamma}$ to quantify the relative strength of the spectra of different resonances. It should also be noted that Eqs.~(\ref{eq.des}) and~(\ref{eq.tdw}) represent, in a way, an extension of Fermi's Golden Rule to the case where the broadening of the decay energy spectrum is taken into account. Such broadening is provided by the Breit-Wigner distribution. \subsection{The Schr\"odinger equation of the valence neutron} Because $^{24}$O is a doubly magic nucleus~\cite{2009Hoffman}, we are going to neglect the many-body nature of $^{25}$O and treat it as an $^{24}$O core plus a single neutron that is subject to a mean-field potential created by the $^{24}$O core. As it is customary, we will model such mean-field potential by the Woods-Saxon potential and a spin-orbit interaction, \begin{equation} V(r)= V_{\text{\tiny WS}} (r) + V_{\text{\tiny SO}} (r)= -V_0 f(r) + V_{\rm so} \frac{1}{r} \frac{df(r)}{dr} \xi_{l,j} \, , \label{eq.se} \end{equation} where $V_0>0$ represents the potential well depth, and $V_{\rm so}>0$ represents the strength of the spin-orbit interaction. The function $f(r)$ is given by \begin{equation} f(r) = \frac{1}{1+{\rm exp}\left( \frac{r-R}{a}\right)} \, , \label{fofr} \end{equation} where $a$ is the diffuseness parameter (or surface thickness), and $R=r_0A^{1/3}$ is the nuclear radius, $A$ being the mass number. The function $\xi_{l,j}$ is given by \begin{equation} \xi_{l,j}= \left\{ \begin{array}{ccc} \frac{l}{2} & \quad \textnormal{for} & j=l+\frac{1}{2} \, , \\ -\frac{(l+1)}{2} & \quad \textnormal{for} & j=l-\frac{1}{2} \, , \end{array} \right. \end{equation} where $l$ and $j$ are the orbital and the total angular momentum of the valence neutron, respectively. Due to the spherical symmetry of the potential, we can work with spherical coordinates, separate the radial and angular dependences, and obtain the radial Schr\"odinger equation for each partial wave, \begin{equation} \biggl(\frac{-\hbar^2}{2\mu}\frac{d^2}{dr^2}+\frac{\hbar^2l(l+1)}{2\mu r^2} +V(r) \biggr) u_l(r;E)=E u_l(r;E)\, , \label{baba} \end{equation} where $\mu$ is the reduced mass of the system. By solving Eq.~(\ref{baba}) subject to purely outgoing boundary conditions, we obtain the resonant (Gamow) eigenfunctions $u_l(r;z_{\text{\tiny R}})$. When $z_{\text{\tiny R}}$ is real and negative, $u_l(r;z_{\text{\tiny R}})$ becomes a bound state. Under the appropriate boundary conditions, Eq.~(\ref{baba}) yields the scattering eigenfunctions when $E$ is positive. After the neutron is expelled from the nucleus, it behaves like a free particle, and therefore its radial wave function $\chi_l(r;E)$ satisfies the radial, free Schr\"odinger equation, \begin{equation} \biggl(\frac{-\hbar^2}{2\mu}\frac{d^2}{dr^2}+\frac{\hbar^2l(l+1)}{2\mu r^2} \biggr) \chi_l(r;E)=E \chi_l(r;E) \, , \label{schroeqfree} \end{equation} subject to the boundary condition that the eigenfunction is regular at the origin, $\chi_l(0;E)=0$. The delta-normalized solution of Eq.~(\ref{schroeqfree}) that is regular at the origin is given by the reduced Riccati-Bessel function $\hat{j}_l$ (see for example Ref.~\cite{TAYLOR}), \begin{equation} \chi_l(r;E)= \sqrt{\frac{2\mu}{\hbar ^2}} \frac{1}{\sqrt{k\pi}} \hat{j}_l (kr) \, , \label{freeeign} \end{equation} where $k=\sqrt{\frac{2\mu}{\hbar ^2}E}$ is the wave number. The Riccati-Bessel function can be written~\cite{TAYLOR} in terms of the spherical Bessel function $j_l(z)$ and the ordinary Bessel function $J_{\lambda}(z)$ as $\hat{j}_l (z)= zj_l(z)= \sqrt{\frac{\pi z}{2}} J_{l+1/2}(z)$. By combining Eq.~(\ref{eq.des}) with the Gamow eigenfunction $u_l(r;z_{\text{\tiny R}})$ and with the free, radial eigenfunction $\chi_l(r;E)$, we can obtain the theoretical decay energy spectrum of $^{25}$O. \section{Validation of the numerical procedure} \label{sec.validation} We have used the code {\sc Gamow}~\cite{1982Vertse} to solve numerically the Schr\"odinger equation (\ref{baba}) in order to obtain the resonant energies and the Gamow states. We have used the code {\sc Anti}~\cite{1995Ixaru,1996Liotta} to obtain the scattering states. The resulting energies and eigenfunctions were afterward plugged into Eq.~(\ref{eq.des}) to obtain the numerical decay energy spectrum. Because the Gamow eigenfunctions diverge exponentially, and because the resonant energies are usually very sensitive to small changes in the parameters of the potential, we performed three tests to validate our numerical procedure. \subsection{First test: The energy density of the free eigenfunctions} In the first test, we calculated the energy density of the free scattering eigenfunctions, $\int dr \, |\chi_l(r;E)|^2$, using the code {\sc Anti}~\cite{1995Ixaru,1996Liotta} and Mathematica~\cite{Mathematica}. We have plotted the results for $l=6$ in Fig.~\ref{fig:freedensitymath}, where we can see that the plots are essentially the same. In particular, {\sc Anti} and Mathematica yield a maximum of 0.7254 MeV$^{-1}$ at the energies of 1.677~MeV and 1.65~MeV, respectively. \begin{figure}[h!] \vspace{6mm} \begin{center} \includegraphics[angle=0,width=0.65 \columnwidth]{two_plots.eps} \end{center} \caption{(Color online) Comparison of the integral $\int_0^{50} |\chi_l(r;E)|^2 \, dr$ for $l=6$ and $\frac{2\mu}{\hbar^2}=0.047892$ MeV$^{-1}$-fm$^{-2}$ obtained numerically using Mathematica (thin, blue line) and the code {\sc Anti} (thick, dashed, black line). The plots are essentially indistinguishable.} \label{fig:freedensitymath} \vspace{6mm} \end{figure} \subsection{Second test: Location of the resonant energy in the energy density of the scattering eigenfunctions} In order to test the accuracy of the resonant energies, we compared the real part of such energies with the peaks in the energy density of the scattering eigenfunctions. In this second test, we fixed the parameters of the Woods-Saxon potential so that we can reproduce the lowest energy levels of $^{133}$Sn. For simplicity, in this second test we neglected the spin-orbit interaction. The values of the parameters we used are $V_0= 43.5$~MeV and $R=6.466$~fm ($r_0=1.27$ fm). For $l=6$, we obtained a sharp resonance of complex energy $z_{\text{\tiny R}} = (4.460- {\rm i} \, 0.014)$ MeV. We then obtained the scattering eigenfunctions $u_l(r;E)$ of Eq.~(\ref{baba}) for $l=6$. The resulting energy density, $\int | u_l(r;E)|^2 \, dr $, where $r$ is in fm and $E>0$ is in MeV, is plotted in Fig.~\ref{fig:intescattersq}. \begin{figure}[h!] \begin{center} \includegraphics[angle=-90,width=0.65\columnwidth]{0fig.IntegralSquareScattForV043.5.eps} \caption{Plot of the energy density of the scattering eigenfunction, $\int_0^{50} | u_l(r;E)|^2 \, dr $.} \label{fig:intescattersq} \end{center} \end{figure} It is clear from Fig.~\ref{fig:intescattersq} that the radial probability density of the scattering wave function is sharply peaked around the energy $4.46$~MeV. This energy coincides with the real part of the resonant energy $z_{\text{\tiny R}} = (4.460- {\rm i} \, 0.014)$ MeV. \subsection{Third test: The delta-shell potential} \label{subsec.third} The formalism of Ref.~\cite{NPA15} was applied in Ref.~\cite{NPA17} to the delta-shell potential $V_\delta(r) = g \, \delta(r-R)$ for $l=0$. It was found in Ref.~\cite{NPA17} that the $s$-wave resonant energies of the delta-shell potential can be expressed in terms of the Lambert $W$ function, and therefore one can calculate the resonant energies, decay widths and decay energy spectra of $V_{\delta}(r)$ exactly. As a third validation of our numerical procedure, we have applied it to an almost delta-shell potential\footnote{In Appendix~\ref{sec.appendix}, we explain in what sense the potential of Eq.~(\ref{almostdelta}) is almost a delta-shell potential.} and compared the results with those of Ref.~\cite{NPA17}. Our almost delta-shell potential is given by \begin{equation} V_a(r) = - g \frac{d f(r)}{d r}= \frac{g}{a} \frac{e ^{ \frac{r-R}{a}}}{\left[ 1+e ^{\frac{r-R}{a}} \right] ^2} \, , \label{almostdelta} \end{equation} where $a$ is very small. It should be noted that the choice $g>0$ ($g<0$) makes the potential repulsive (attractive). As explained in Appendix~\ref{sec.appendix}, when $a$ is very small, $V_a(r)$ becomes, for practical purposes, the delta-shell potential centered at $r=R$. Since the potential $V_a(r)$ becomes very singular when $a$ is small, care must be taken in obtaining the resonant energies when $a$ tends to zero. In our case, we used a two-step process to obtain the resonant energies. In the first step, we obtained the resonant energies for decreasing values of $a$; in the second step, we extrapolated~\cite{nr} the result to $a \rightarrow 0$. In this way, we first calculated the $l=0$ ground (bound) and first excited (unbound) states for the case that $R=6.466$~fm and $\frac{2\mu}{\hbar^2}=0.047892$~MeV$^{-1}$-fm$^{-2}$ (which correspond to $^{133}$Sn), and for decreasing values of $a$ up to $a=0.04$~fm. Afterward, we extrapolated the results using four order algebraic extrapolation~\cite{nr} up to $a=10^{-5}$~fm. In order to compare our results with those of Ref.~\cite{NPA17}, we need to recall that the results of Ref.~\cite{NPA17} were given in terms of the dimensionless coupling constant $\lambda=\frac{2\mu}{\hbar^2}Rg$, Hence, with our choice of $R$ and $\mu$ ($R=6.466$~fm and $\frac{2\mu}{\hbar^2}=0.047892$~MeV$^{-1}$-fm$^{-2}$), the strength $g$ can be written in terms of $\lambda$ as $g=3.229\, \lambda$~MeV-fm, and the energies and widths of Ref.~\cite{NPA17} are given in units of $\hbar^2/2\mu R^2=0.4994$~MeV. In Table~\ref{table.energies}, we compare the calculated ground state and first-excited state energies with those of Ref.~\cite{NPA17} for $\lambda=-0.5,\, -10,$ and $-100$. As can be seen in Table~\ref{table.energies}, our numerical results are in fairly good agreement with the exact ones. \vskip0.5cm \begin{table}[ht] \begin{center} \caption{Comparison of the calculated ground state energy $E_{\rm gs}$ and first excited state energy $z_{\text{\tiny R}}$ with those of Ref.~\cite{NPA17}.} \begin{tabular}{|cc|cc|cc|} \hline \multicolumn{2}{|c|}{Strength} & \multicolumn{2}{c|}{$E_{\rm gs}$ (MeV)} & \multicolumn{2}{c|}{$z_{\text{\tiny R}}$ (MeV)} \\ $\lambda$ & $g$ (MeV) & Exact & Present work & Exact & Present work \\ \hline $-$0.5 & $-$1.6146 & $-$0.19711 & $-$0.20554 & 5.935 $-$ i 5.180 & 5.895 $-$ i 5.204 \\ $-$10 & $-$32.29 & $-$12.484 & $-$12.475 & 5.897 $-$ i 0.356 & 5.823 $-$ i 0.335 \\ $-$100 & $-$322.9 & $-$1248.5 & $-$1139.0 & 5.029 $-$ i 0.00320 & 5.030 $-$ i 0.00298\\ \hline \end{tabular} \end{center} \label{table.energies} \end{table} \vskip1cm The calculation of the decay width of Eq.~(\ref{eq.tdw}) involves the resonant states and the free scattering states, and therefore constitutes a more demanding test. In Table~\ref{table.tdw}, we compare the calculated decay width with the exact one for the first excited state when $\lambda=-0.5,\, -10,$ and $-100$. \begin{table}[ht] \caption{Comparison of the calculated $\overline{\Gamma}$ with that of Ref.~\cite{NPA17} for the first excited state.} \begin{center} \begin{tabular}{|cc|cc|} \hline \multicolumn{2}{|c|}{Strength} & \multicolumn{2}{c|}{$\overline{\Gamma}$ (MeV)} \\ $\lambda$ & $g$ (MeV) & Exact & Present work \\ \hline $-$0.5 & $-$1.6146 & 0.22769 & 0.0688 \\ $-$10 & $-$32.29 & 0.9335 & 0.825 \\ $-$100 & $-$322.9 & 0.01283 & 0.0127\\ \hline \end{tabular} \end{center} \label{table.tdw} \end{table} As can be seen in Table~\ref{table.tdw}, our calculated decay width agrees well with the exact one for strong couplings ($\lambda = -10, \, -100$) but not for weak couplings ($\lambda = -0.5$). The reason why our calculated $\overline{\Gamma}$ is not accurate when $\lambda$ is small is that, for weak couplings, the resonance is broad, its decay energy spectrum is also broad, and hence its tails are not negligible at energies much higher than the resonant energy. Since our numerical procedure to calculate $\overline{\Gamma}$ omits the high-energy tails, our decay constant is much smaller than the exact one when the coupling is weak. Overall, our numerical results are accurate for sharp resonances, but not for broad ones. However, since the resonances of $^{25}$\rm{O} are sharp, we expect that our numerical results for $^{25}$\rm{O} to be fairly accurate, except for underestimating the decay widths $\overline{\Gamma}$ due to the neglect of the high-energy tails of the decay energy spectrum. \section{The decay energy spectrum of $^{25}$\rm{O}} \label{sec.oxygen25} In this section, we are going to calculate the decay energy spectrum of the ground state and of the first excited state of the unbound oxygen isotope $^{25}$O using a simple two-body model, i.e., one valence neutron outside the $^{24}$O core that creates the potential of Eq.~(\ref{eq.se}). We choose the radius and diffuseness of the mean field potential (the same for the Woods-Saxon and the spin-orbit parts) as in Ref.~\cite{2006Volya}, $a=0.65$ fm and $r_0=1.06$ fm. The Woods-Saxon $V_0$ and spin-orbit $V_{\rm so}$ strengths are chosen to approximately account for the average $768.5$ keV of the experimental ground state energies of $^{25}$O reported in Refs.~\cite{HOFFMAN08} ($770$ keV), \cite{CAESAR13} ($725$ keV), \cite{KONDO16} ($749$ keV) and \cite{2017Jones} ($830$ keV), and for the experimental gap between the ground state energy of $^{25}$O with that of the first hole state in the $^{24}$O core, $E_{0d_{3/2}} - E_{1s_{1/2}}=4.857$~MeV~\cite{HOFFMAN08}. Such criteria, and the experimental neutron separation energy $S_n(^{25}\rm{O})=-0.776$ MeV~\cite{nndc}, lead to the following parameters: $V_0=57.7$~MeV, and $V_{\rm so}=15.32$~MeV-fm$^2$. For the above parameters, the complex energy of the ground state was found to be $z_{d_{3/2}}=(0.766 - \rm{i}\, 0.034)$~MeV. Thus, the ground state's pole width is $\Gamma _{\text{\tiny R},d_{3/2}} = 68$~keV. This pole width is similar to the pole width of the Continuum Shell Model~\cite{2014Volya} ($63$ keV), and slightly higher than that of the Gamow Shell Model (the average of the two models used in Ref.~\cite{2017Fossez} yields $49.5$ keV, whereas Ref.~\cite{2017Jones} reports a pole width of $51$~keV). Comparison of $\Gamma _{\text{\tiny R},d_{3/2}}$ with the experimental pole widths is not so straightforward, because the experimental pole widths vary wildly ($172$ keV in Ref.~\cite{HOFFMAN08}, $20$ keV in Ref.~\cite{CAESAR13}, and $88$ keV in Ref.~\cite{KONDO16}). Their average, 93~keV, is larger than any theoretical pole widths. In fact, the experimental pole widths are usually overestimated, because the experimental error is convoluted with the ideal decay energy spectrum, which makes the experimental decay energy spectrum broader than the ideal one. In the four-body model of Ref.~\cite{2017Jones}, the first excited state of $^{25}$O was reported to be a $1/2^+$ state, and strong experimental evidence for such state was also found~\cite{2017Jones}. However, our simple two-body model is unable to produce such $1/2^+$ as the first excited state.\footnote{The $1/2^+$ state may be seen as an excitation of the $^{24}$O core~\cite{1991Frauenfelder}, which in our model is inert.} Instead, the first excited state of our two-body model is $f_{7/2}=7/2^-$, whose complex energy is $z_{f_{7/2}}=(5.588 - \rm{i}\, 0.697)$ MeV. The four-body model of Ref.~\cite{2017Jones} also produces an $f_{7/2}=7/2^-$ state, whose complex energy is $5.536 - \rm{i}\, 0.0075$ MeV. Thus, the energy predicted by our two-body model for the $f_{7/2}=7/2^-$ state is consistent with that of the four-body model of Ref.~\cite{2017Jones},\footnote{The energy of the $f_{7/2}=7/2^-$ state reported in Ref.~\cite{2017Jones} is 4.77~MeV, and it is given with respect to the ground state. Thus, in order to make a proper comparison with the results of Ref.~\cite{2017Jones}, we have added to 4.77~MeV the energy of the ground state $d_{3/2}=3/2^+$, resulting in $4.77~\text{MeV}+0.766~\text{MeV}=5.536~\text{MeV}$.} although our pole width is much larger than that of Ref.~\cite{2017Jones}. Figure~\ref{fig.spectrum} shows the decay energy spectrum of Eq.~(\ref{eq.des}) for the ground state $d_{3/2}=3/2^+$ and for the first exited state $f_{7/2}=7/2^-$ of our two-body model. The spectrum of the ground state is a narrow, sharp peak, whereas that of the first excited state is less pronounced and much wider. \begin{figure} \begin{center} \includegraphics[angle=-90,width=0.65\columnwidth]{0fig.energyspectrum.eps} \caption[T]{ (Color online) Decay energy spectrum of the ground state $3/2^+$ (solid, black line) and the first excited state $7/2^-$ (red, dashed line) of $^{25}$O.} \label{fig.spectrum} \end{center} \end{figure} In Ref.~\cite{NPA15}, it was proposed that the decay widths can account for the overall strength of the interaction between the resonance and the continuum. In our case, $\overline{\Gamma}_{d_{3/2}}=0.133$~MeV, and $\overline{\Gamma}_{f_{7/2}}=2.424$~MeV. Clearly, the coupling with the continuum is much stronger for the first excited state, which makes it less sharp (i.e., less ``bound'') than the ground state. It was also proposed in Ref.~\cite{NPA15} that one could use the dimensionless decay constant $\Gamma=\frac{\overline{\Gamma}}{\Gamma _{\text{\tiny R}}}$ as a measure of the coupling between the resonance and the continuum: The larger $\Gamma$, the more ``bound'' the resonance is, and hence the weaker the coupling to the continuum is. In our case, $\Gamma _{d_{3/2}}=7.824$, and $\Gamma_{f_{7/2}}=6.956$. Thus, their dimensionless decay constants also indicate that the ground state is more ``bound'' than the first excited state, as it should be. The experimental decay energy spectrum of Ref.~\cite{2017Jones} was consistent with the inclusion of a first-excited 1/2$^+$ state of $^{25}$O. The relative cross section of the ground and first excited states was determined to be $\frac{\sigma_{3/2^+}}{\sigma_{1/2^+}} = 4$, which can be interpreted by saying that producing the ground state is four times as likely as producing the first excited state. Using the Gamow-state description of resonances, it is possible to introduce a different way to quantify the relative likelihood of production of two resonances. Since the decay width $\overline{\Gamma}$ quantifies the overall strength of the coupling between the resonance and the continuum, and since resonances with small decay widths would be sharper than those with larger decay widths, we can use the ratio of the decay widths of two resonances as a measure of the relative strength of their decay energy spectra, i.e., as a measure of how likely one can observe the decay energy spectra of a given resonance compared to that of another one. In our model, $d_{3/2}=3/2^+$ is the ground state and $f_{7/2}=7/2^-$ is the first excited state, and we have that $\frac{\overline{\Gamma}_{f_{7/2}} }{\overline{\Gamma}_{d_{3/2}} }\sim 18$. This means that, according to our two-body model, it is much more likely to produce the ground state $d_{3/2}=3/2^+$ than the first-excited state $f_{7/2}=7/2^-$, as is already clear by visually inspecting their spectra in Fig.~\ref{fig.spectrum}. Theoretically, the width of the peaks of decay energy spectra are determined by the pole widths $\Gamma _{\text{\tiny R}}$ rather than by the decay widths $\overline{\Gamma}$, as can be seen in Fig.~\ref{fig.spectrum}. However, the theoretical pole widths are usually much smaller than the widths of the experimental decay energy spectra. The reason is that the experimental resolution of the detector is usually convoluted with the true decay energy spectrum, and such convolution tends to broaden the spectrum. Thus, in order to compare our theoretical formula with experiment, we would need to deconvolute the experimental resolution from the true decay energy spectrum. The resonant peaks in experimental decay energy spectra are usually fitted with symmetric distributions, although there are examples of asymmetric ones (see for example Refs.~\cite{2009Hoffman,2017LHCb}). However, as can be seen in Fig.~\ref{fig.spectrum}, the Gamow-state spectra are always slightly asymmetric. Such asymmetry is not part of any background, but arises from the energy dependence of the matrix element. Nevertheless, for sharp resonances the asymmetry is small. Experimental decay energy spectra are often fitted with a Breit-Wigner distribution that has an energy-dependent width, as was done in Refs.~\cite{VANDEBROUCK17,HOFFMAN08,2009Hoffman,KOHLEY13,2017Jones}. It seems therefore pertinent to discuss the similarities and differences between Eq.~(\ref{eq.des}) and the Breit-Wigner distribution with energy-dependent width. First, both approaches yield quasi-Lorentzian peaks. However, in the case of Eq.~(\ref{eq.des}), the Lorentzian is distorted by the matrix element of the interaction, whereas in the case of the Breit-Wigner distribution with energy-dependent width the distortion is produced by the energy dependence of the width. Second, a fit of the experimental decay energy spectrum (after deconvolution of the experimental error) using Eq.~(\ref{eq.des}) would yield quantitatively different resonant energies and widths than using the Breit-Wigner distribution with energy-dependent width. Third, and most importantly, an energy-dependent width $\Gamma (E)$ implies an energy-dependent lifetime $\tau (E)=\frac{\hbar}{\Gamma(E)}$. Thus, although from a data-analysis point of view the Breit-Wigner distributions with energy-dependent width may not seem very different from Eq.~(\ref{eq.des}), from a theoretical point of view they imply that resonances have different lifetimes for different energies. By contrast, when one describes a resonance by a Gamow state and its decay energy spectrum by Eq.~(\ref{eq.des}), the (mean) lifetime is given by $\tau _{\text{\tiny R}}=\frac{\hbar}{\Gamma _{\text{\tiny R}}}$, and it is an intrinsic property of the resonance that doesn't depend on its energy. Four, instead of the pole width $\Gamma _{\text{\tiny R}}$ being energy dependent, in the Gamow-state approach what depends on the energy is the differential decay width $d\overline{\Gamma}(E)/dE$ of Eq.~(\ref{eq.ddw}), and such dependence takes into account that the resonance couples to the continuum with different strengths at different energies, while at the same time $\Gamma _{\text{\tiny R}}$, and therefore $\tau _{\text{\tiny R}}$, are energy independent. In principle, it is possible to test experimentally whether Eq.~(\ref{eq.des}) or the Breit-Wigner distribution with energy-dependent width should be used as the true theoretical decay energy distribution of resonances. One could prepare the resonance at different energies, measure the mean lifetime for each energy, and check whether the lifetime changes with energy (as in Breit-Wigner distributions with energy-dependent width) or not (as in Eq.~(\ref{eq.des})). \section{Conclusions} \label{sec.conclusions} Decay energy spectra of radioactive nuclei are routinely measured, and theoretical nuclear models should be able to predict such spectra. Within the limitations of a simple two-body model of $^{25}$O, we have shown that the Gamow-state description of resonances is able to produce such spectra. We have modeled the $^{25}$O nucleus as a valence neutron interacting with an $^{24}$O core, and applied the formalism of Ref.~\cite{NPA15} to obtain the decay spectra of the ground and first-excited states. The resulting spectra have a quasi-Lorentzian peak centered around the resonant energy, and are qualitatively similar to those of simpler models~\cite{NPA17}, another example of the universality of resonance phenomena. We have also seen that the fits of experimental decay energy spectra that use a Breit-Wigner distribution with energy-dependent width are different, both quantitatively and phenomenologically, from fits that use the Gamow-state approach. In particular, the Breit-Wigner distributions with energy-dependent width imply an energy-dependent lifetime, whereas in the Gamow-state approach the lifetime is energy independent. We can, in principle, use the energy (non)dependence of the lifetime $\tau _{\text{\tiny R}}$ of a resonance to check whether the Gamow-state decay spectrum or the Breit-Wigner distribution with an energy-dependent width should be used as the true theoretical decay energy spectrum. There are several ways in which the results of the present paper can be expanded. The most obvious one is the calculation of the decay energy spectrum of an unstable nucleus using the Gamow Shell Model. In particular, for $^{25}$O, most of the ingredients needed to calculate the decay energy spectrum have already been obtained~\cite{2017Fossez,2017Jones}, and it should be possible to obtain theoretical decay energy spectra that can be compared with experimental ones after deconvoluting the experimental error. Another way to extend the results of the present paper is by applying the Gamow-state description of decay energy spectra to multi-channel problems. There are methods to calculate the partial decay widths and branching fractions in a multi-channel system~\cite{2017Rakityansky}, but the calculation of the decay energy spectrum of a multi-channel potential is still awaiting. \ack The work of R.I.B.~was supported by the National Council of Research PIP-625 (CONICET, Argentina).
\section*{Theoretical calculations} Turning now to the origin of these RTNs, we note that these can possibly arise, in CDW systems which have a single-particle energy gap at the Fermi level (e.g. NbSe$_3$ and TaS$_3$)~\cite{bloom1994discrete,marley1994temperature,bloom1994correlation}, due to the switching of the ground state of the system between pinned and sliding states. In some of these systems sharp noise peaks were observed even at values of electric fields lower than the threshold field for slippage of the CDW~\cite{pokrovskii1989solitary}.Our results differ from what was observed in these systems in two important aspects: (1) our measurements were performed under electric fields of magnitude few V/m which were at least two orders of magnitude smaller than the electric fields applied to observe RTN in these systems ~\cite{pokrovskii1989solitary, bloom1994discrete,marley1994temperature,bloom1994correlation}, and (2) unlike in NbSe$_3$ and TaS$_3$, the observed RTN in 2H-NbSe$_2$ were independent of electric field~\cite{pokrovskii1989solitary}. However, unlike NbSe$_3$ and TaS$_3$, the CDW in 2H-NbSe$_2$ does not slide. This is consistent with our observation that the RTN in 2H-NbSe$_2$ were independent of electric field. This suggests that RTN in 2H-NbSe$_2$ must have an origin distinct from those seen in gapped CDW systems like NbSe$_3$ and TaS$_3$. There is a due concern that the observed RTN may arise due to the interplay of superconducting fluctuations above $T_c$ and CDW order. Measurements performed under perpendicular magnetic fields much higher than $H_{c2}$ of bulk 2H-NbSe$_2$ do not have any effect on either the frequency or the amplitude of these two level fluctuations, ruling out this interpretation [Supplementary information]. We also considered the possibility that the RTN can arise due to the quantization of the number of density waves along the perpendicular direction, as seen in some systems~\cite{kummamuru2008electrical,PhysRevLett.98.117206}. We ruled this out by noting that in 2H-NbSe$_2$ the weak inter-layer van der waals interaction precludes the formation of any long range density waves perpendicular to the planes. This is supported by spectroscopic studies. The most compelling explanation of the RTN we observe in 2H-NbSe$_2$ is phase fluctuations between 1Q and 3Q phases. Earlier calculations~\cite{flicker2015charge2}, supported by the STM measurements~\cite{soumyanarayanan2013quantum}, demonstrated that the crossover between 3Q and a 1Q CDW phases at a given temperature can be induced by a strain as small as 0.1\%. Experiments show that suspended 2H-NbSe$_2$ devices in contact with Au pads experience an average strain of about 0.1\% at low temperatures~\cite{PhysRevB.82.155432} which is sufficient to drive the system close to the boundary separating these two quantum phases~\cite{flicker2015charge2}. In such a suspended mesoscopic device, at a finite temperature, the strain dynamically fluctuates due to thermally enhanced mechanical vibrations. This fluctuating strain can lead to a dynamical phase transition from 3Q to 1Q and vice versa in 2H-NbSe$_2$ at a fixed temperature. This would cause the conductance of the system to fluctuate between two well defined values if the conductivity of the two phases are different. We validate this conjecture through detailed Density-functional theory (DFT) based band structure calculations of the conductance in the two distinct quantum phases of 2H-NbSe$_2$. We calculate the DC conductivity $\sigma$ in both the 3Q and 1Q CDW phases using a two-band model, relevant for this compound~\cite{PhysRevB.64.235119}. The non-interacting dispersions $\xi_{1k,2k}$ are directly deduced from the DFT calculations [Supplementary Information]. \footnote{\label{myfootnote} The wavevector of the CDW state is known to be ${\bf Q}_{\nu} \approx 1/3$ ${\bf G}^{\nu}_0$, where ${\bf G}^{\nu}_0$ are the three reciprocal lattice vectors, and $\nu=1, 2, 3$ in the 3Q phase. In the 1Q phase, only one of the ${\bf Q}_{\nu}$ values remain active along the CDW propagation direction (we take ${\bf Q}_1$)}. The CDW order parameters are introduced within the mean-field approximation: \begin{eqnarray} H &=& \sum_{i,{\bf k}}\Big[\xi_{i,{\bf k}} c^{\dag}_{i,{\bf k}}c_{i,{\bf k}} + \sum_{\nu}\big(\xi_{i,{\bf k}+{\bf Q}_{\nu}} c^{\dag}_{i,{\bf k}+{\bf Q}_{\nu}}c_{i,{\bf k}+{\bf Q}_{\nu}},\nonumber\\ &&\qquad\qquad\qquad\qquad +\Delta_{i,\nu} c^{\dag}_{i,{\bf k}}c_{j,{\bf k}+{\bf Q}_{\nu}}\big) \Big]+ {\rm h.c.}. \label{Ham} \end{eqnarray} \noindent Here the band index $i=1,2$, and the nesting index $\nu$ takes 3 values in the 3Q phase and 1 value in the 1Q phase. $c_{i,{\bf k}}$ is the annihilation operator for the electron in the $i^{\rm th}$-band at momentum ${\bf k}$. The mean-field CDW gap $\Delta_{i,\nu}$ is defined between the two bands. We obtain the quasiparticle energies $E_{i,{\bf k}}$ by exact diagonalization of the Hamiltonian in ~\eqref{Ham}, and there are four, and eight quasiparticle states in the 1Q and 3Q phases, respectively. \begin{figure*}[t!] \begin{center} \includegraphics[width=\textwidth]{figure4.pdf} \small{\caption{(a) Plot of the time-series of conductance per square (left-axis) and conductance (right-axis) measured at T = 25~K for the suspended 10 layer thick 2H-NbSe$_2$ device (S5) fabricated on BTO substrate. The numbers in the legend refer to the voltage $V_B$ across the substrate while the length of the double headed arrows correspond to $\Delta G= 2e^2/h$. (b) Dependence of the number of conductance jumps, measured over a period of thirty minutes on the voltage $V_B$. (c) Schematic phase diagram of the system in temperature-strain plane. The blue shaded region is in the 3Q phase while the pink shaded region is in the 1Q phase. The green dotted line represents the isotherm at 25~K along which the data presented in panels (a) and (b) were collected. \label{fig:strain}}} \end{center} \end{figure*} The conductivity of the two phases primarily depends on the CDW gap values $\Delta_{i,\nu}$, which are related to the CDW potential $V_{\nu}$ by $\Delta_{i,\nu}=V_{\nu}\sum_{i,{\bf k}}\frac{\Delta_{i,\nu}}{2E_{i,{\bf k}}}{\rm tanh}(\beta E_{i,{\bf k}}/2)$, with $\beta=1/k_BT$. The interaction $V_{\nu}$ arises from the electron-phonon coupling~\citep{flicker2015charge2} and is directly related to strain, and therefore it becomes directional dependent. A CDW phase arises along a direction $\nu$ when the corresponding strain induced potential exceeds the critical potential $V_{\nu}>V_c\sim2W$, where $W\sim 1.21 eV$ is the bandwidth. Since the present system reside in the vicinity of the critical point, $V_{\nu}\sim V_c$, and the phase diagram is very sensitive to strain. In the 3Q phase, all three $V_{\nu}>V_c$, while in 1Q phase, only $V_1>V_c$, and the rest are $<V_c$. In the mean-field state, we find a substantial suppression of the density of state (DOS) at $E_F$ in the 3Q phase, with a gap which is calculated to be $\Delta_0\sim$35~meV~[Fig.~\ref{fig:th}(a)]. However, in the 1Q phase, the spectral weight loss at $E_F$ is significantly less. These results are consistent with the STM data~\cite{soumyanarayanan2013quantum}. Therefore, we anticipate that the conductivity in the 3Q phase will be lower than that in the 1Q phase. We first calculate the conductivity $\sigma$ using the standard Kubo formula. We then obtain the conductance G by normalizing the value of $\sigma$ with the dimensions of the present device ($G=\sigma \times$(width/length)). We assume band independent gap values. For the ratio of $\Delta_{\rm 3Q}/\Delta_{\rm 1Q}=1.06$, we find that the difference in conductance between the two CDW phases, $\Delta G=G_{\rm 1Q}-G_{\rm 3Q}\sim e^2/h$, as seen experimentally. We also notice that over the temperature range $T=$17K-24K, $\Delta G$ changes very little as the self-consistent gap remains essentially unchanged over this narrow temperature window [Fig.~\ref{fig:th}(b)]. This result is consistent with our experimental observations. We do not have a microscopic understanding of why this quantity should be an integral multiple of $e^2/h$. This may require the inclusion of topological terms in the calculation which is beyond the scope of the present work. If dynamical phase fluctuations between the two CDW phases is indeed responsible for the observed RTN, it should be possible to modulate the frequency of the conductance jumps by driving the system controllably between the two competing CDW phases. To test this hypothesis, suspended devices of few layer 2H-NbSe$_2$ are fabricated on piezoelectric BaTiO$_3$/SrTiO$_3$ (BTO) substrates. In this device, the strain across the device can be modulated by varying the voltage $V_{B}$ across the substrate. Fig.~\ref{fig:strain}(a) shows the evolution of the conductance fluctuations with changing $V_B$ obtained for one such device at 25~K. At very low values of $V_B$ (strain), the frequency of the conductance jumps is low and the system is seen to spend statistically similar amounts of time in both the high and low conductance states. With increasing $V_{B}$ (and consequently increasing strain across the device), the frequency of the conductance jumps initially increases and then decreases rapidly. However, the magnitude of the conductance jumps throughout this process remained quantized in units of $e^2/h$. Eventually, the conductance jumps vanishes as the system stabilized in the higher conduction state [Fig.~\ref{fig:strain}(b)]. We note that in different sweep cycles in $V_B$ the RTN are not exactly reproducible. It is difficult at this stage to comment on whether this is due to inherent hysteresis in the piezoelectric response of BTO or if it indicates non-reversibility of the properties of NbSe$_2$. These results can be understood as follows: with increasing strain \textit{via} $V_B$, the system approaches the phase boundary separating the 3Q and 1Q phases, leading to an increased probability of switching between the two states. Eventually, the system crosses the phase boundary and consequently, the switching frequency starts decreasing and finally vanishes as the system settles into the 1Q state. These measurements establish conclusively that, consistent with theoretical calculations, strain can drive the system to the higher conducting 1Q phase from lower conducting 3Q phase. As seen from STM measurements on substrated devices, local random strain due to lattice imperfections causes the system to spatially phase separate into an inhomogeneous mixture of 3Q and 1Q phases~\cite{soumyanarayanan2013quantum}. This local phase separation can not cause the measured conductance, which is a macroscopic global averaged property, to fluctuate dynamically between two well defined conductance levels separated by the quantum of conductance. To validate this conjecture, measurements were performed on 2H-NbSe$_2$ devices of various thicknesses prepared on SiO$_2$/Si$^{++}$ substrates [Supplementary Information]. Although we observed clear CDW transition in this set of devices from resistivity measurements, no signature of RTN was seen in any of them. The conductance fluctuations in these devices, at all temperatures $T>T_C$, consisted only of generic $1/f$ fluctuations arising from defect dynamics. The magnitude of noise $\langle\delta R^2\rangle/ \langle R\rangle^2$ remained constant over the temperature range $T_{CDW}>T>T_C$ before showing the sharp rise near superconducting transition [Fig. \ref{fig:fc}(c)]. To test the effect of disorder, measurements were performed on suspended devices exfoliated from bulk 2H-NbSe$_2$ crystals having low bulk T$_c$ and low residual resistivity ratio and from bulk 2H-NbSe$_2$ crystals doped with 0.1\% Co. Atomic Force microscopy measurements showed that the rms surface roughness of the low T$_c$ flakes was about 3 times higher than that of the high T$_c$ flakes [Supplementary Information]. Although we observed dR/dT peak at ~35 K in these devices indicating the presence of CDW, we did not observe RTN in any of them. The noise in these devices was similar to what was seen for substrated devices indicating the suppression of RTN due to disorder in the system~[Fig. \ref{fig:fc}(c)]. The absence of RTN in all the control experiments involving substrated, Co-doped and disordered suspended 2H-NbSe$_2$ devices, as well as the insensitivity of the conductance fluctuations in clean suspended devices to high magnetic fields reinforces our interpretation of the origin of the observed RTN in clean suspended devices as lattice fluctuation mediated. To conclude, in this letter we demonstrate controlled, strain induced phase transition between the 1Q and 3Q CDW phases in suspended 2D 2H-NbSe$_2$. With this, we resolve a long standing question of finite temperature dynamic phase transition between two quantum phases of the CDW system. We show the energy scale of $\pm$ 35meV, seen repeatedly in spectroscopic measurements~\cite{borisenko2009two, soumyanarayanan2013quantum}, to be the barrier corresponding to 1Q-3Q phase transition. Our work establishes conductance fluctuation spectroscopy as a technique to probe phase co-existence and phase transitions in nanoscale systems and can thus be a step forward in the understanding of competing quantum phases in strongly correlated systems. A.B. acknowledges financial support from Nanomission, DST, Govt. of India project SR/NM/NS-35/2012; SERB, DST, Govt. of India and Indo-French Centre for the Promotion of Advanced Recearch (CEFIPRA). H.K.K. thanks CSIR, MHRD, Govt. of India for financial support. TD acknowledgesthe financial support from the DST, India under the Start Up Research Grant (Young Scientist) [SERB No: YSS/2015/001286]. We acknowledge discussions with A.~V.~Mallik, B. F. Gao, D.~Nordlund, A.~N.~Pasupathy and Diptiman Sen. \clearpage \section*{Supplementary Information} \renewcommand{\thesection}{S\arabic{section}} \section{Effect of magnetic field on the observed RTN:} In many low-dimensional superconductors, superconducting fluctuations can persist at temperatures much higher than the mean field transition temperature $T_C$. In the case of our cleanest bulk samples, the measured $T_C$ was $\sim7.2~K$. Thus, there might be a concern that the two-level conductance fluctuations observed by us in the clean suspended 2H-NbSe$_2$ flakes at 15~K and above might have some contributions from superconducting phase/amplitude fluctuations. To rule out this possibility, we have studied the effect of magnetic field $B$ (with $B$ much larger than the critical field $B_C$) on the observed RTN. Fig.~\ref{fig:S1} shows plots of conductance fluctuation measured at 24~K at zero field and in the presence of an 8~T perpendicular field, the data are statistically identical showing that magnetic field had no discernible effect on the two-level conductance fluctuations. \section{Resistance fluctuation spectroscopy:} To probe resistance fluctuation and its statistics, we used a standard 4-probe digital signal processing (DSP) based ac noise measurement technique~\cite{ghosh2004set}. This technique allows us to simultaneously measure the background noise as well as sample noise. The device was biased by a constant ac current source, typical currents used during the measurement were 10 $\mu$A. A low-noise pre-amplifier (SR552) was used to couple the voltage across the device to dual channel digital lock-in-amplifier (LIA). The bias frequency of the LIA (228~Hz) was chosen to lie in the eye of the noise figure of the pre-amplifier to reduce the contribution of amplifier noise. The output of the LIA was digitized by a high speed 16 bit analog-to-digital conversion card and stored in computer. The complete data set for each run, containing $1.5 \times 10^{6}$ data points, was decimated and digitally filtered to eliminate the 50~Hz line frequency component. This filtered time series was then used to calculate the power spectral density (PSD) of voltage fluctuation S$_V$ over specified frequency window using the method of Welch Periodogram. The lower frequency limit $\sim 4$~mHz and the upper frequency limit $\sim4$~Hz were limited by the ratio of the sample noise to background noise. The PSD of voltage fluctuation was converted to the PSD of resistance fluctuation $S_R(f)$ by the relation $S_R(f) = \frac{S_V (f)}{I^2}$ where $I$ is rms value of constant current used to bias the device. The measurement set up has been calibrated by thermal noise measurements on standard resistors to measure spectral density down to $S_V ~ 10^{-20} V^2 Hz^{-1}$. The measured thermal background noise on the 2H-NbSe$_2$ devices were found to be bias independent and frequency independent; and the PSD matched the value of 4$k_BTR$, as expected from Johnson-Nyquist noise. The PSD of resistance fluctuation was subsequently integrated over the bandwidth of measurement to obtain the relative variance of resistance fluctuations: $$\frac{\langle\delta R^2\rangle}{\langle R^2\rangle} = \frac{1}{R^2}\int_{f_{min}}^{f_{max}} S_R(f)df $$ \section{Absence of RTN in on-substrate and disordered 2H-NbSe$_2$ devices:} To conclusively establish that the RTN seen by us in 2H-NbSe$_2$ is present only in suspended clean devices, we fabricated on-substrate devices from the same high quality bulk 2H-NbSe$_2$ from which the suspended devices showing RTN were exfoliated. In all our substrated device, we observed CDW transition with similar T$_{CDW}$ ~ 35 K but did not find signatures of RTN at any temperature [fig.~\ref{fig:Substrated_RT_TS}]. Similarly, suspended devices fabricated from bulk 2H-NbSe$_2$ crystals having low superconducting $T_C$, despite undergoing a CDW transition at 35~K, did not show any RTN as shown in \ref{fig:Substrated_RT_TS}[d]. These control experiments confirm that the two-level conductance fluctuations seen by us are a property of clean suspended 2H-NbSe$_2$ devices. We have performed AFM measurements to map the topography of the flakes and their thicknesses. It was observed that flakes exfoliated from bulk crystal of lower T$_C$ had a much higher surface roughness ($\approx$ 3-4 times) than those from high quality bulk crystals - the AFM topography images are shown in fig.~\ref{fig:AFM}. The observation of RTN in all the different classes of samples measured is summarised in fig. \ref{fig:flowchart}. This flowchart shows that RTN is observed only in suspended devices made from disorder free flakes. In Ref.~\cite{soumyanarayanan2013quantum} the two phases are found to coexist due to non-uniform local strains because of underlying defects -- these devices were all on substrate. Since the thermodynamic phase of the system is well defined in the temperature-phase plane, for uniform strain the whole sample will undergo the transformation simultaneously in which case there is no phase co-existence. Thus, we believe that the coexistence between the two phases happens only in the case of non-uniform strain. It should be noted that for non-uniform strain, fractional steps in conductance could be expected. We explain below why we do not see them in our measurements. As seen from the data presented in~\cite{soumyanarayanan2013quantum}, in on-substrate devices the domains are of the order of ten nm and more importantly, are static in time. This nanoscale phase separation is detectable in STM tunneling spectroscopic measurements which is a local probe. Our transport measurements, on the other hand, were time-dependent and performed between electrical probes separated by hundreds of nanometers. That is why we do not observe any conductance jumps from the static nanoscale phase separation seen in the on-substrate devices of the type studied in Ref.~\cite{soumyanarayanan2013quantum}. We note that for Co-doped samples one can expect fractional jumps. Unfortunately, we do not observe any RTN in the case of suspended Co-doped 2H-NbSe$_2$ devices. We believe that this can be due to disorder inhibiting the formation of long range order in the system. It is also possible that Co doping might modify the phonon dispersion spectrum and suppress the formation of one of the two CDW phases. Further experimental and theoretical work is required to settle this issue. \section{Quantization of conductance fluctuation:} {We have measured different suspended devices with different thickness and observed that the two level conductance fluctuation is always present with the conductance jump of integer multiple of $e^2/h$. We have found that for thicker samples the jump is larger than thinner ones. In fig. \ref{fig:histAll} the distribution function of conductance fluctuation is plotted. The conductance jump is 1$G_0$ and 3$G_0$ for the two thin samples, S1 and S4 and is large $\sim$370$G_0$ for the thick sample S6. It can be seen from the data that the quantization is seen most clearly in the thinnest flakes. This is because, for thicker devices, the ratio of the magnitude of $1/f$ noise to the amplitude of RTN jumps is much larger than that in thin flakes. As discussed in the manuscript, this ratio is parametrized by the quantity $A/B$ (see discussion following Eqn. 1 in the main text). For example, for the sample S4 this ratio was ten times higher than that in sample S1 (Fig.~\ref{fig:AbyB}). This higher 1/f noise cause the peaks to broaden for thicker samples.} \section{Number of layers participating in RTN} {An important question is whether all the layers in the flake contribute to the observed RTN. In case of suspended devices where RTN is seen with strain, we can envisage two possible scenarios which are as follows. First probable case is that the bottom layer gets strained and the top layers slip on this layer to relax the strain. This will entail an energy cost, $E_{NC}$ due to non-conformity between the layers. We estimate this energy cost for relative displacement between two layers of 2H-NbSe$_2$ to be about $6.6 \times 10^{-5}$ eV/unit cell~\cite{levita2014sliding, nagapriya2008torsional,shmeliov} [See Fig.~\ref{fig:sliding}]. An alternate scenario is where all the layers get strained equally. We estimate the elastic energy cost in this process, for small strains of the magnitude applied by us (0.1\%), to be about $3\times 10^{-7}$ eV/unit cell~\cite{PhysRevB.82.155432}. It thus appears that it is energetically favourable for all the layers to strain together by the same amount. The reality of course could lie somewhere in between these two extremes - especially for very thick flakes where it is highly plausible that the strain relaxes beyond the first few layers. } \section{Details of DFT calculations} Electronic structure of bilayer 2H-NbSe$_2$ was calculated by using density functional theory (DFT) with the generalized gradient approximation (GGA) in the parametrization of Perdew, Burke and Ernzerhof~\cite{PBE} as implemented in the Vienna ab-initio simulation package~\cite{vasp}. Projected augmented-wave (PAW) ~\cite{paw} pseudopotentials are used to describe core electrons.The electronic wavefunction is expanded using plane waves up to a cut-off energy of 600 eV. Brillouin zone sampling is done by using a 12$\times$ 12$\times$ 1 Monkhorst-Pack k-grid for the primitive unit-cell's calculations. The conjugate gradient method is used to obtain relaxed geometries. Both atomic positions and cell parameters are allowed to relax, until the forces on each atom are less than 0.01 eV/Angstrom. Force constants were calculated for a 3$\times$3$\times$1 supercell within the framework density functional perturbation theory ~\cite{dfpt} using the VASP code. Subsequently, phonon dispersions were calculated using phonopy package[\cite{phonopy}]. We calculate the conductivity using the standard Kubo formula. \begin{eqnarray} \sigma=\frac{e^{2}}{3\hbar^{2}} \int\frac{d\varepsilon}{2\pi} \left(-\frac{df(\varepsilon)}{d\varepsilon}\right)\sum_{\bf k}v_{\bf k}^{2} {\rm Tr}\big[A^{2}({\bf k},&\varepsilon)\big], \end{eqnarray} where $f(\epsilon)$ is the Fermi-distribution function, $v_k$ is the band velocity. $e$, and $\hbar$ have the usual meanings. $A$ is the spectral function which is obtained from the imaginary part of the Green's function obtained from Eq. 2. We averaged the conductivity over the entire Basel plane as $v_{\bf k}^2=v_{{\bf k}_x}^2+v_{{\bf k}_y}^2$. The temperature dependence of the conductivity comes from the Fermi function $f$, as well as from the $T$-dependence of the gap, and its behavior is dominated by the latter function. \section*{Theoretical calculations} Turning now to the origin of these RTNs, we note that these can possibly arise, in CDW systems which have a single-particle energy gap at the Fermi level (e.g. NbSe$_3$ and TaS$_3$)~\cite{bloom1994discrete,marley1994temperature,bloom1994correlation}, due to the switching of the ground state of the system between pinned and sliding states. In some of these systems sharp noise peaks were observed even at values of electric fields lower than the threshold field for slippage of the CDW~\cite{pokrovskii1989solitary}.Our results differ from what was observed in these systems in two important aspects: (1) our measurements were performed under electric fields of magnitude few V/m which were at least two orders of magnitude smaller than the electric fields applied to observe RTN in these systems ~\cite{pokrovskii1989solitary, bloom1994discrete,marley1994temperature,bloom1994correlation}, and (2) unlike in NbSe$_3$ and TaS$_3$, the observed RTN in 2H-NbSe$_2$ were independent of electric field~\cite{pokrovskii1989solitary}. However, unlike NbSe$_3$ and TaS$_3$, the CDW in 2H-NbSe$_2$ does not slide. This is consistent with our observation that the RTN in 2H-NbSe$_2$ were independent of electric field. This suggests that RTN in 2H-NbSe$_2$ must have an origin distinct from those seen in gapped CDW systems like NbSe$_3$ and TaS$_3$. There is a due concern that the observed RTN may arise due to the interplay of superconducting fluctuations above $T_c$ and CDW order. Measurements performed under perpendicular magnetic fields much higher than $H_{c2}$ of bulk 2H-NbSe$_2$ do not have any effect on either the frequency or the amplitude of these two level fluctuations, ruling out this interpretation [Supplementary information]. We also considered the possibility that the RTN can arise due to the quantization of the number of density waves along the perpendicular direction, as seen in some systems~\cite{kummamuru2008electrical,PhysRevLett.98.117206}. We ruled this out by noting that in 2H-NbSe$_2$ the weak inter-layer van der waals interaction precludes the formation of any long range density waves perpendicular to the planes. This is supported by spectroscopic studies. The most compelling explanation of the RTN we observe in 2H-NbSe$_2$ is phase fluctuations between 1Q and 3Q phases. Earlier calculations~\cite{flicker2015charge2}, supported by the STM measurements~\cite{soumyanarayanan2013quantum}, demonstrated that the crossover between 3Q and a 1Q CDW phases at a given temperature can be induced by a strain as small as 0.1\%. Experiments show that suspended 2H-NbSe$_2$ devices in contact with Au pads experience an average strain of about 0.1\% at low temperatures~\cite{PhysRevB.82.155432} which is sufficient to drive the system close to the boundary separating these two quantum phases~\cite{flicker2015charge2}. In such a suspended mesoscopic device, at a finite temperature, the strain dynamically fluctuates due to thermally enhanced mechanical vibrations. This fluctuating strain can lead to a dynamical phase transition from 3Q to 1Q and vice versa in 2H-NbSe$_2$ at a fixed temperature. This would cause the conductance of the system to fluctuate between two well defined values if the conductivity of the two phases are different. We validate this conjecture through detailed Density-functional theory (DFT) based band structure calculations of the conductance in the two distinct quantum phases of 2H-NbSe$_2$. We calculate the DC conductivity $\sigma$ in both the 3Q and 1Q CDW phases using a two-band model, relevant for this compound~\cite{PhysRevB.64.235119}. The non-interacting dispersions $\xi_{1k,2k}$ are directly deduced from the DFT calculations [Supplementary Information]. \footnote{\label{myfootnote} The wavevector of the CDW state is known to be ${\bf Q}_{\nu} \approx 1/3$ ${\bf G}^{\nu}_0$, where ${\bf G}^{\nu}_0$ are the three reciprocal lattice vectors, and $\nu=1, 2, 3$ in the 3Q phase. In the 1Q phase, only one of the ${\bf Q}_{\nu}$ values remain active along the CDW propagation direction (we take ${\bf Q}_1$)}. The CDW order parameters are introduced within the mean-field approximation: \begin{eqnarray} H &=& \sum_{i,{\bf k}}\Big[\xi_{i,{\bf k}} c^{\dag}_{i,{\bf k}}c_{i,{\bf k}} + \sum_{\nu}\big(\xi_{i,{\bf k}+{\bf Q}_{\nu}} c^{\dag}_{i,{\bf k}+{\bf Q}_{\nu}}c_{i,{\bf k}+{\bf Q}_{\nu}},\nonumber\\ &&\qquad\qquad\qquad\qquad +\Delta_{i,\nu} c^{\dag}_{i,{\bf k}}c_{j,{\bf k}+{\bf Q}_{\nu}}\big) \Big]+ {\rm h.c.}. \label{Ham} \end{eqnarray} \noindent Here the band index $i=1,2$, and the nesting index $\nu$ takes 3 values in the 3Q phase and 1 value in the 1Q phase. $c_{i,{\bf k}}$ is the annihilation operator for the electron in the $i^{\rm th}$-band at momentum ${\bf k}$. The mean-field CDW gap $\Delta_{i,\nu}$ is defined between the two bands. We obtain the quasiparticle energies $E_{i,{\bf k}}$ by exact diagonalization of the Hamiltonian in ~\eqref{Ham}, and there are four, and eight quasiparticle states in the 1Q and 3Q phases, respectively. \begin{figure*}[t!] \begin{center} \includegraphics[width=\textwidth]{figure4.pdf} \small{\caption{(a) Plot of the time-series of conductance per square (left-axis) and conductance (right-axis) measured at T = 25~K for the suspended 10 layer thick 2H-NbSe$_2$ device (S5) fabricated on BTO substrate. The numbers in the legend refer to the voltage $V_B$ across the substrate while the length of the double headed arrows correspond to $\Delta G= 2e^2/h$. (b) Dependence of the number of conductance jumps, measured over a period of thirty minutes on the voltage $V_B$. (c) Schematic phase diagram of the system in temperature-strain plane. The blue shaded region is in the 3Q phase while the pink shaded region is in the 1Q phase. The green dotted line represents the isotherm at 25~K along which the data presented in panels (a) and (b) were collected. \label{fig:strain}}} \end{center} \end{figure*} The conductivity of the two phases primarily depends on the CDW gap values $\Delta_{i,\nu}$, which are related to the CDW potential $V_{\nu}$ by $\Delta_{i,\nu}=V_{\nu}\sum_{i,{\bf k}}\frac{\Delta_{i,\nu}}{2E_{i,{\bf k}}}{\rm tanh}(\beta E_{i,{\bf k}}/2)$, with $\beta=1/k_BT$. The interaction $V_{\nu}$ arises from the electron-phonon coupling~\citep{flicker2015charge2} and is directly related to strain, and therefore it becomes directional dependent. A CDW phase arises along a direction $\nu$ when the corresponding strain induced potential exceeds the critical potential $V_{\nu}>V_c\sim2W$, where $W\sim 1.21 eV$ is the bandwidth. Since the present system reside in the vicinity of the critical point, $V_{\nu}\sim V_c$, and the phase diagram is very sensitive to strain. In the 3Q phase, all three $V_{\nu}>V_c$, while in 1Q phase, only $V_1>V_c$, and the rest are $<V_c$. In the mean-field state, we find a substantial suppression of the density of state (DOS) at $E_F$ in the 3Q phase, with a gap which is calculated to be $\Delta_0\sim$35~meV~[Fig.~\ref{fig:th}(a)]. However, in the 1Q phase, the spectral weight loss at $E_F$ is significantly less. These results are consistent with the STM data~\cite{soumyanarayanan2013quantum}. Therefore, we anticipate that the conductivity in the 3Q phase will be lower than that in the 1Q phase. We first calculate the conductivity $\sigma$ using the standard Kubo formula. We then obtain the conductance G by normalizing the value of $\sigma$ with the dimensions of the present device ($G=\sigma \times$(width/length)). We assume band independent gap values. For the ratio of $\Delta_{\rm 3Q}/\Delta_{\rm 1Q}=1.06$, we find that the difference in conductance between the two CDW phases, $\Delta G=G_{\rm 1Q}-G_{\rm 3Q}\sim e^2/h$, as seen experimentally. We also notice that over the temperature range $T=$17K-24K, $\Delta G$ changes very little as the self-consistent gap remains essentially unchanged over this narrow temperature window [Fig.~\ref{fig:th}(b)]. This result is consistent with our experimental observations. We do not have a microscopic understanding of why this quantity should be an integral multiple of $e^2/h$. This may require the inclusion of topological terms in the calculation which is beyond the scope of the present work. If dynamical phase fluctuations between the two CDW phases is indeed responsible for the observed RTN, it should be possible to modulate the frequency of the conductance jumps by driving the system controllably between the two competing CDW phases. To test this hypothesis, suspended devices of few layer 2H-NbSe$_2$ are fabricated on piezoelectric BaTiO$_3$/SrTiO$_3$ (BTO) substrates. In this device, the strain across the device can be modulated by varying the voltage $V_{B}$ across the substrate. Fig.~\ref{fig:strain}(a) shows the evolution of the conductance fluctuations with changing $V_B$ obtained for one such device at 25~K. At very low values of $V_B$ (strain), the frequency of the conductance jumps is low and the system is seen to spend statistically similar amounts of time in both the high and low conductance states. With increasing $V_{B}$ (and consequently increasing strain across the device), the frequency of the conductance jumps initially increases and then decreases rapidly. However, the magnitude of the conductance jumps throughout this process remained quantized in units of $e^2/h$. Eventually, the conductance jumps vanishes as the system stabilized in the higher conduction state [Fig.~\ref{fig:strain}(b)]. We note that in different sweep cycles in $V_B$ the RTN are not exactly reproducible. It is difficult at this stage to comment on whether this is due to inherent hysteresis in the piezoelectric response of BTO or if it indicates non-reversibility of the properties of NbSe$_2$. These results can be understood as follows: with increasing strain \textit{via} $V_B$, the system approaches the phase boundary separating the 3Q and 1Q phases, leading to an increased probability of switching between the two states. Eventually, the system crosses the phase boundary and consequently, the switching frequency starts decreasing and finally vanishes as the system settles into the 1Q state. These measurements establish conclusively that, consistent with theoretical calculations, strain can drive the system to the higher conducting 1Q phase from lower conducting 3Q phase. As seen from STM measurements on substrated devices, local random strain due to lattice imperfections causes the system to spatially phase separate into an inhomogeneous mixture of 3Q and 1Q phases~\cite{soumyanarayanan2013quantum}. This local phase separation can not cause the measured conductance, which is a macroscopic global averaged property, to fluctuate dynamically between two well defined conductance levels separated by the quantum of conductance. To validate this conjecture, measurements were performed on 2H-NbSe$_2$ devices of various thicknesses prepared on SiO$_2$/Si$^{++}$ substrates [Supplementary Information]. Although we observed clear CDW transition in this set of devices from resistivity measurements, no signature of RTN was seen in any of them. The conductance fluctuations in these devices, at all temperatures $T>T_C$, consisted only of generic $1/f$ fluctuations arising from defect dynamics. The magnitude of noise $\langle\delta R^2\rangle/ \langle R\rangle^2$ remained constant over the temperature range $T_{CDW}>T>T_C$ before showing the sharp rise near superconducting transition [Fig. \ref{fig:fc}(c)]. To test the effect of disorder, measurements were performed on suspended devices exfoliated from bulk 2H-NbSe$_2$ crystals having low bulk T$_c$ and low residual resistivity ratio and from bulk 2H-NbSe$_2$ crystals doped with 0.1\% Co. Atomic Force microscopy measurements showed that the rms surface roughness of the low T$_c$ flakes was about 3 times higher than that of the high T$_c$ flakes [Supplementary Information]. Although we observed dR/dT peak at ~35 K in these devices indicating the presence of CDW, we did not observe RTN in any of them. The noise in these devices was similar to what was seen for substrated devices indicating the suppression of RTN due to disorder in the system~[Fig. \ref{fig:fc}(c)]. The absence of RTN in all the control experiments involving substrated, Co-doped and disordered suspended 2H-NbSe$_2$ devices, as well as the insensitivity of the conductance fluctuations in clean suspended devices to high magnetic fields reinforces our interpretation of the origin of the observed RTN in clean suspended devices as lattice fluctuation mediated. To conclude, in this letter we demonstrate controlled, strain induced phase transition between the 1Q and 3Q CDW phases in suspended 2D 2H-NbSe$_2$. With this, we resolve a long standing question of finite temperature dynamic phase transition between two quantum phases of the CDW system. We show the energy scale of $\pm$ 35meV, seen repeatedly in spectroscopic measurements~\cite{borisenko2009two, soumyanarayanan2013quantum}, to be the barrier corresponding to 1Q-3Q phase transition. Our work establishes conductance fluctuation spectroscopy as a technique to probe phase co-existence and phase transitions in nanoscale systems and can thus be a step forward in the understanding of competing quantum phases in strongly correlated systems. A.B. acknowledges financial support from Nanomission, DST, Govt. of India project SR/NM/NS-35/2012; SERB, DST, Govt. of India and Indo-French Centre for the Promotion of Advanced Recearch (CEFIPRA). H.K.K. thanks CSIR, MHRD, Govt. of India for financial support. TD acknowledgesthe financial support from the DST, India under the Start Up Research Grant (Young Scientist) [SERB No: YSS/2015/001286]. We acknowledge discussions with A.~V.~Mallik, B. F. Gao, D.~Nordlund, A.~N.~Pasupathy and Diptiman Sen. \clearpage \section*{Supplementary Information} \renewcommand{\thesection}{S\arabic{section}} \section{Effect of magnetic field on the observed RTN:} In many low-dimensional superconductors, superconducting fluctuations can persist at temperatures much higher than the mean field transition temperature $T_C$. In the case of our cleanest bulk samples, the measured $T_C$ was $\sim7.2~K$. Thus, there might be a concern that the two-level conductance fluctuations observed by us in the clean suspended 2H-NbSe$_2$ flakes at 15~K and above might have some contributions from superconducting phase/amplitude fluctuations. To rule out this possibility, we have studied the effect of magnetic field $B$ (with $B$ much larger than the critical field $B_C$) on the observed RTN. Fig.~\ref{fig:S1} shows plots of conductance fluctuation measured at 24~K at zero field and in the presence of an 8~T perpendicular field, the data are statistically identical showing that magnetic field had no discernible effect on the two-level conductance fluctuations. \section{Resistance fluctuation spectroscopy:} To probe resistance fluctuation and its statistics, we used a standard 4-probe digital signal processing (DSP) based ac noise measurement technique~\cite{ghosh2004set}. This technique allows us to simultaneously measure the background noise as well as sample noise. The device was biased by a constant ac current source, typical currents used during the measurement were 10 $\mu$A. A low-noise pre-amplifier (SR552) was used to couple the voltage across the device to dual channel digital lock-in-amplifier (LIA). The bias frequency of the LIA (228~Hz) was chosen to lie in the eye of the noise figure of the pre-amplifier to reduce the contribution of amplifier noise. The output of the LIA was digitized by a high speed 16 bit analog-to-digital conversion card and stored in computer. The complete data set for each run, containing $1.5 \times 10^{6}$ data points, was decimated and digitally filtered to eliminate the 50~Hz line frequency component. This filtered time series was then used to calculate the power spectral density (PSD) of voltage fluctuation S$_V$ over specified frequency window using the method of Welch Periodogram. The lower frequency limit $\sim 4$~mHz and the upper frequency limit $\sim4$~Hz were limited by the ratio of the sample noise to background noise. The PSD of voltage fluctuation was converted to the PSD of resistance fluctuation $S_R(f)$ by the relation $S_R(f) = \frac{S_V (f)}{I^2}$ where $I$ is rms value of constant current used to bias the device. The measurement set up has been calibrated by thermal noise measurements on standard resistors to measure spectral density down to $S_V ~ 10^{-20} V^2 Hz^{-1}$. The measured thermal background noise on the 2H-NbSe$_2$ devices were found to be bias independent and frequency independent; and the PSD matched the value of 4$k_BTR$, as expected from Johnson-Nyquist noise. The PSD of resistance fluctuation was subsequently integrated over the bandwidth of measurement to obtain the relative variance of resistance fluctuations: $$\frac{\langle\delta R^2\rangle}{\langle R^2\rangle} = \frac{1}{R^2}\int_{f_{min}}^{f_{max}} S_R(f)df $$ \section{Absence of RTN in on-substrate and disordered 2H-NbSe$_2$ devices:} To conclusively establish that the RTN seen by us in 2H-NbSe$_2$ is present only in suspended clean devices, we fabricated on-substrate devices from the same high quality bulk 2H-NbSe$_2$ from which the suspended devices showing RTN were exfoliated. In all our substrated device, we observed CDW transition with similar T$_{CDW}$ ~ 35 K but did not find signatures of RTN at any temperature [fig.~\ref{fig:Substrated_RT_TS}]. Similarly, suspended devices fabricated from bulk 2H-NbSe$_2$ crystals having low superconducting $T_C$, despite undergoing a CDW transition at 35~K, did not show any RTN as shown in \ref{fig:Substrated_RT_TS}[d]. These control experiments confirm that the two-level conductance fluctuations seen by us are a property of clean suspended 2H-NbSe$_2$ devices. We have performed AFM measurements to map the topography of the flakes and their thicknesses. It was observed that flakes exfoliated from bulk crystal of lower T$_C$ had a much higher surface roughness ($\approx$ 3-4 times) than those from high quality bulk crystals - the AFM topography images are shown in fig.~\ref{fig:AFM}. The observation of RTN in all the different classes of samples measured is summarised in fig. \ref{fig:flowchart}. This flowchart shows that RTN is observed only in suspended devices made from disorder free flakes. In Ref.~\cite{soumyanarayanan2013quantum} the two phases are found to coexist due to non-uniform local strains because of underlying defects -- these devices were all on substrate. Since the thermodynamic phase of the system is well defined in the temperature-phase plane, for uniform strain the whole sample will undergo the transformation simultaneously in which case there is no phase co-existence. Thus, we believe that the coexistence between the two phases happens only in the case of non-uniform strain. It should be noted that for non-uniform strain, fractional steps in conductance could be expected. We explain below why we do not see them in our measurements. As seen from the data presented in~\cite{soumyanarayanan2013quantum}, in on-substrate devices the domains are of the order of ten nm and more importantly, are static in time. This nanoscale phase separation is detectable in STM tunneling spectroscopic measurements which is a local probe. Our transport measurements, on the other hand, were time-dependent and performed between electrical probes separated by hundreds of nanometers. That is why we do not observe any conductance jumps from the static nanoscale phase separation seen in the on-substrate devices of the type studied in Ref.~\cite{soumyanarayanan2013quantum}. We note that for Co-doped samples one can expect fractional jumps. Unfortunately, we do not observe any RTN in the case of suspended Co-doped 2H-NbSe$_2$ devices. We believe that this can be due to disorder inhibiting the formation of long range order in the system. It is also possible that Co doping might modify the phonon dispersion spectrum and suppress the formation of one of the two CDW phases. Further experimental and theoretical work is required to settle this issue. \section{Quantization of conductance fluctuation:} {We have measured different suspended devices with different thickness and observed that the two level conductance fluctuation is always present with the conductance jump of integer multiple of $e^2/h$. We have found that for thicker samples the jump is larger than thinner ones. In fig. \ref{fig:histAll} the distribution function of conductance fluctuation is plotted. The conductance jump is 1$G_0$ and 3$G_0$ for the two thin samples, S1 and S4 and is large $\sim$370$G_0$ for the thick sample S6. It can be seen from the data that the quantization is seen most clearly in the thinnest flakes. This is because, for thicker devices, the ratio of the magnitude of $1/f$ noise to the amplitude of RTN jumps is much larger than that in thin flakes. As discussed in the manuscript, this ratio is parametrized by the quantity $A/B$ (see discussion following Eqn. 1 in the main text). For example, for the sample S4 this ratio was ten times higher than that in sample S1 (Fig.~\ref{fig:AbyB}). This higher 1/f noise cause the peaks to broaden for thicker samples.} \section{Number of layers participating in RTN} {An important question is whether all the layers in the flake contribute to the observed RTN. In case of suspended devices where RTN is seen with strain, we can envisage two possible scenarios which are as follows. First probable case is that the bottom layer gets strained and the top layers slip on this layer to relax the strain. This will entail an energy cost, $E_{NC}$ due to non-conformity between the layers. We estimate this energy cost for relative displacement between two layers of 2H-NbSe$_2$ to be about $6.6 \times 10^{-5}$ eV/unit cell~\cite{levita2014sliding, nagapriya2008torsional,shmeliov} [See Fig.~\ref{fig:sliding}]. An alternate scenario is where all the layers get strained equally. We estimate the elastic energy cost in this process, for small strains of the magnitude applied by us (0.1\%), to be about $3\times 10^{-7}$ eV/unit cell~\cite{PhysRevB.82.155432}. It thus appears that it is energetically favourable for all the layers to strain together by the same amount. The reality of course could lie somewhere in between these two extremes - especially for very thick flakes where it is highly plausible that the strain relaxes beyond the first few layers. } \section{Details of DFT calculations} Electronic structure of bilayer 2H-NbSe$_2$ was calculated by using density functional theory (DFT) with the generalized gradient approximation (GGA) in the parametrization of Perdew, Burke and Ernzerhof~\cite{PBE} as implemented in the Vienna ab-initio simulation package~\cite{vasp}. Projected augmented-wave (PAW) ~\cite{paw} pseudopotentials are used to describe core electrons.The electronic wavefunction is expanded using plane waves up to a cut-off energy of 600 eV. Brillouin zone sampling is done by using a 12$\times$ 12$\times$ 1 Monkhorst-Pack k-grid for the primitive unit-cell's calculations. The conjugate gradient method is used to obtain relaxed geometries. Both atomic positions and cell parameters are allowed to relax, until the forces on each atom are less than 0.01 eV/Angstrom. Force constants were calculated for a 3$\times$3$\times$1 supercell within the framework density functional perturbation theory ~\cite{dfpt} using the VASP code. Subsequently, phonon dispersions were calculated using phonopy package[\cite{phonopy}]. We calculate the conductivity using the standard Kubo formula. \begin{eqnarray} \sigma=\frac{e^{2}}{3\hbar^{2}} \int\frac{d\varepsilon}{2\pi} \left(-\frac{df(\varepsilon)}{d\varepsilon}\right)\sum_{\bf k}v_{\bf k}^{2} {\rm Tr}\big[A^{2}({\bf k},&\varepsilon)\big], \end{eqnarray} where $f(\epsilon)$ is the Fermi-distribution function, $v_k$ is the band velocity. $e$, and $\hbar$ have the usual meanings. $A$ is the spectral function which is obtained from the imaginary part of the Green's function obtained from Eq. 2. We averaged the conductivity over the entire Basel plane as $v_{\bf k}^2=v_{{\bf k}_x}^2+v_{{\bf k}_y}^2$. The temperature dependence of the conductivity comes from the Fermi function $f$, as well as from the $T$-dependence of the gap, and its behavior is dominated by the latter function.
\section{Introduction} A central property of the chemistry of living systems is that they combine two basic features: (i) the ability to survive on an ambient food source, and (ii) each biochemical reaction in the system requires only reactants and a catalyst that are provided by other reactions in the system (or are present in the food set). The notion of a self-sustaining `collectively autocatalytic set' tries to capture these basic features formally, and was pioneered by Stuart Kauffman \cite{kau1, kau2}, who investigated a simple binary polymer model to address questions that relate to the origin of life. The notion of a collectively autocatalytic set was subsequently formalised more precisely as `Reflexively Auto-catalytic and F-generated' (RAF) sets (defined shortly) and explored by others \cite{vas, hor17}. RAFs are related to other notions such as Rosen's (M;R) systems \cite{jar}, and `organisations' in Chemical Organisation Theory \cite{hor17a}. The application of RAFs has expanded beyond toy polymer models to analyse both real living systems (e.g. the metabolic network of {\em Escherichia coli} \cite{sou}) and simple autocatalytic RNA systems that have recently been generated in laboratory studies by \cite{vai}. The generality of RAF theory also means that a `reaction' need not refer specifically to a chemical reaction, but to any process in which `items' are combined and transformed into new `items', and where similar `items' that are not used up in the process facilitate (or `catalyse') the process. This has led to application of RAF theory to processes beyond biochemistry, including biodiversity \cite{gat}, cognitive psychology \cite{gab}, and (more speculatively) economics \cite{hor17}. In this paper, we show how RAF theory can be developed further to: \begin{itemize} \item provide an exact and tractable characterisation of RAFs and subRAFs when reactants involve just food molecules; \item extend this last concept to general catalytic reaction networks by defining a new type of RAF (`generative') which couples realism with tractability; and \item include reaction rates into RAF theory and show that an optimal RAF can be calculated in polynomial time. \end{itemize} We begin with some definitions. \subsection{Catalytic reaction systems (CRSs)} A {\em catalytic reaction system} (CRS) consists of a set $X$ of `molecule types', a set $\mathcal{R}$ of `reactions', an assignment $C$ describing which molecule types catalyse which reactions, and a subset $F$ of $X$ consisting of a `food set' of basic building block molecule types freely available from the environment. Here, a `reaction' refers to a process that takes one or more molecule types (the `reactants') as input and produces one or more molecule types as output (`products'). $C$ can be viewed as a subset of $X \times \mathcal{R}$. A CRS can be represented mathematically in two essentially equivalent ways: Firstly as a directed graph with two types of vertices (corresponding to molecule types (some of which lie in the food set $F$) and reactions) and two types of arcs (arcs from molecule types into and out of reaction vertices (as reactants and products, respectively, and arcs from molecule types to reactions to denote catalysis). Fig.~\ref{fig1} provides a simple example of a CRS represented in this way. Alternatively, one can list the reactions explicitly, writing each in the form $$r: A \xrightarrow{c_1, c_2, \ldots} B,$$ where $A$ denotes the set of reactants of reaction $r$, $B$ the set of products of $r$, and $c_1, c_2, \ldots$ are the possible catalysts for $r$. For example, for $r_2$ and $r_3$ in the CRS of Fig.~\ref{fig1} we write: $$r_2: f_2+f_3 \xrightarrow{p_3} p_2, $$ $$r_3: f_3+f_4 \xrightarrow{p_2} p_3,$$ to denote that $r_2$ is catalysed by $p_3$ and $r_3$ is catalysed by $p_2$. \begin{figure}[htb] \centering \includegraphics[scale=1.1]{fig1a.pdf} \caption{A simple CRS involving five reactions (box vertices), $r_1, \ldots, r_5$, and ten molecule types (round vertices) namely, a food set $F = \{f_1, \ldots, f_5\}$ together with five other molecule types $p_1, \ldots, p_5$). Catalysation arcs are shown as dashed arrows. In this CRS, the subsets $\{r_2, r_3\}$ and $\{r_1, r_2, r_3\}$ are the two RAFS (the former is an irrRAF, the latter is the maxRAF). In this example, each reaction has exactly two reactants, one product, and at most one catalyst, however a CRS can have reactions with an arbitrary number of reactants, products and possible catalysts. } \label{fig1} \end{figure} \bigskip {\bf Definitions (RAFs, maxRAF)}. Given a CRS $\mathcal{Q}=(X,\mathcal{R}, C, F)$, a subset $\mathcal{R}'$ of $\mathcal{R}$ is a said to be a {\em RAF} for $\mathcal{Q}$ if $\mathcal{R}'$ is nonempty and satisfies the following two conditions. \begin{itemize} \item {\em Reflexively autocatalytic} (RA): each reaction $r \in \mathcal{R}'$ is catalysed by at least one molecule type that is either present in the food set or is generated by another reaction in $\mathcal{R}'$. \item {\em Food-generated (F)}: for each reaction $r\in \mathcal{R}'$, each reactant of $r$ is either present in the food set $F$ or can be generated by a sequence of reactions from $\mathcal{R}'$, each of which has each of its reactants present either in the food set or as a product of an earlier reaction in the sequence. \end{itemize} In other words, a RAF is a subset of reactions that is both self-sustaining (from the food set) and collectively autocatalytic. In forming a RAF from the food set, some reactions may initially need to proceed uncatalysed (and thereby at a lower rate) but once formed every reaction in the RAF will be catalysed. A simple example of a RAF is the pair of reactions $\{r_3, r_4\}$ shown in the CRS of Fig.~\ref{fig1}. Note that in this example either $r_3$ or $r_4$ must first proceed uncatalysed, but once one reaction has occurred, the system continues with both reactions catalysed. The food-generated condition (F) can also be formalised as follows: For an arbitrary subset $\mathcal{R}'$ of $\mathcal{R}$ let ${\rm cl}_{\mathcal{R}'}(F)$ be the (unique) minimal subset $W$ of $X$ that contains $F$ and has the property that if $r \in \mathcal{R}'$ and all the reactants of $r$ are in $W$ then the product(s) of $r$ are also in $W$. The (F) condition now becomes the statement that each reactant of each reaction in $\mathcal{R}'$ is present in ${\rm cl}_{\mathcal{R}'}(F)$. Note also that, assuming the (F) condition holds, the (RA) condition becomes equivalent to the stronger condition that each reaction $r \in \mathcal{R}'$ is catalysed by at least one molecule type that is present in ${\rm cl}_{\mathcal{R}'}(F)$. Two fundamental combinatorial results concerning RAFs (from \cite{hor}) which will be applied in this paper are the following: \begin{itemize} \item If $\mathcal{Q}$ has a RAF then it has a unique maximal RAF which contains all other RAFs for $\mathcal{Q}$ (referred to as the {\em maxRAF} of $\mathcal{Q}$, denoted ${\rm maxRAF}(\mathcal{Q})$). \item Determining whether or not $\mathcal{Q}$ has a RAF, and if so constructing ${\rm maxRAF}(\mathcal{Q})$ can be solved by an algorithm that is polynomial-time in the size of $\mathcal{Q}$. \end{itemize} By contrast to the second point, finding a {\em smallest} RAF in a CRS $\mathcal{Q}$ has been shown to be NP-hard \cite{ste13}. The maxRAF of the CRS shown in Fig.~\ref{fig1} is $\{r_1, r_2, r_3\}$. \bigskip {\bf Definitions:} (subRAFs, irrRAFs, closure, closed RAFs, CAFs) We now introduce some further notions related to different types of RAFs. The maxRAF of a CRS $\mathcal{Q}$ may contain one or more proper subsets of reactions that are themselves RAFs for $\mathcal{Q}$, in which case we call any such subset a {\em subRAF} of the maxRAF. A RAF $\mathcal{R}'$ is said to be an {\em irreducible} RAF (irrRAF) if it contains no proper subset of $\mathcal{R}'$ that is a RAF. In other words, removing any single reaction from an irrRAF $\mathcal{R}'$ gives a set of reactions that does not contain a RAF for $\mathcal{Q}$. Constructing an irrRAF for $\mathcal{Q}$ (or determining than none exists when $\mathcal{Q}$ has no RAFs) can also be carried out in polynomial-time \cite{hor}, however the number of irrRAFs can grow exponentially with the size of the CRS \cite{hor12}. To illustrate this notion, the RAF $\{r_2, r_3\}$ is the only irrRAF for the CRS in Fig.~\ref{fig1}. Given any subset $\mathcal{R}'$ of reactions from $\mathcal{R}$, the {\em closure} of $\mathcal{R}'$ in $\mathcal{Q}$, denoted $\overline{\mathcal{R}'}$ is the (unique) minimal subset $\mathcal{R}''$ of $\mathcal{R}$ that contains $\mathcal{R}'$ and satisfies the property that if a reaction $r$ from $\mathcal{R}$ has each of its reactants and at least one catalyst present in the food set or as a product of a reaction from $\mathcal{R}''$ then $r$ is in $\mathcal{R}''$. It is easily seen that the closure of any RAF is always a RAF. We say that a RAF $\mathcal{R}'$ is a {\em closed} RAF if it is equal to its closure (i.e. $\mathcal{R}' = \overline{\mathcal{R}'}$). In particular, the maxRAF is always closed (closed RAFs are the type of RAF that is most closely related to, but still different from, organisations in Chemical Organisation Theory \cite{hor17a}). Referring again to Fig.~\ref{fig1}, the closure of the RAF $\{r_2, r_3\}$ is the maxRAF $\{r_1, r_2, r_3\}$. A {\em minimal closed RAF} for a CRS $\mathcal{Q}$ is a closed RAF $\mathcal{R}'$ for $\mathcal{Q}$ that does not contain any other closed RAF for $\mathcal{Q}$ as a strict subset. Any closed irrRAF is a minimal closed RAF but a minimal closed RAF need not be an irrRAF. Once again Fig.~\ref{fig1} illustrates this last concept: for this CRS, the minimal closed RAF is the maxRAF $\{r_1, r_2, r_3\}$ but it is not an irrRAF since it contains the RAF $\{r_2, r_3\}$. Given a CRS $\mathcal{Q}=(X,\mathcal{R}, C, F)$, a stronger notion than a RAF is that of a {\em constructively autocatalytic F-generated} (CAF) set for $\mathcal{Q}$ (introduced in \cite{mos}). A CAF for $\mathcal{Q}$ is a nonempty subset $\mathcal{R}'$ of $\mathcal{R}$ for which the reactions in $\mathcal{R}'$ can be ordered in such a way that for each reaction $r$ in $\mathcal{R}'$, each reactant and at least one catalyst of $r$ has the property that it is either produced by an earlier reaction from $\mathcal{R}'$ or is present in the food set. In other words, a CAF is like a RAF with the extra requirement that no spontaneous (uncatalysed) reactions are required for its formation (i.e. the catalyst needs to be already present when it is first needed). For example, both the RAFs in Fig.~\ref{fig1} fail to be a CAF. \section{The structure of RAFs in `elementary' catalytic reactions systems} Let CRS $\mathcal{Q} = (X, \mathcal{R}, C, F)$. We say that $\mathcal{Q}$ is {\em elementary} if it satisfies the following condition: \begin{itemize} \item Each reaction $r$ in $\mathcal{R}$ has all its reactants in $F$. \end{itemize} An elementary CRS is a very special type of CRS; however it has arisen both in applications to real experimental chemical systems \cite{ash, vai} and in theoretical models \cite{jai98}. The CRS shown in Fig.~\ref{fig1} is not an elementary CRS, but it becomes so if reaction $r_5$ is removed. It is possible to extend the definition of elementary CRS to also allow for reversible reactions, by requiring only one side of the reaction to contain molecule types that are exclusively from $F$. In this section, we show that elementary RAFs have sufficient structure to allow a very concise classification of their RAFs, closed subRAFs, irrRAFs, and `uninhibited' closed RAFs (a notion described below), something which is problematic in general. We then extend this analysis to more complicated types of RAFs in the next section. Our analysis in this section relies heavily on some key notions from graph theory, so we begin by recalling some concepts from that area. \subsection{Definitions} In this paper, all graphs will be finite. Given a directed graph $\mathcal{D}=(V,A)$, recall that a {\em strongly connected component} of $\mathcal{D}$ is a maximal subset $W$ of $V$ with the property that for any vertices $u, v$ in $W$, there is a path from $u$ to $v$ and a path from $v$ to $u$. It is a classical result that for any directed graph $\mathcal{D}=(V,A)$, the vertex set $V$ can be partitioned into strongly connected components. This, in turn, induces a directed graph structure, called the {\em condensation (digraph) of $\mathcal{D}$}, which we will denote by $\mathcal{D}^*$. In this directed graph, the vertex set is the collection of strongly connected components of $\mathcal{D}$ and there is an arc $(U,V)$ in $\mathcal{D}^*$ if there is an arc $(u,v)$ in $\mathcal{D}$ with $u \in U$ and $v \in V$. By definition, $\mathcal{D}^*$ is an acyclic directed graph. Moreover, the task of partitioning $V$ into strongly connected components and constructing the graph $\mathcal{D}^*$ can both be carried out in polynomial time \cite{tar}. Note that the strongly connected component containing $v$ will consist just of $v$ if $v$ is not part of a cycle involving another vertex. We now introduce some further definitions. Given a directed graph $\mathcal{D}=(V,A)$: \begin{itemize} \item We say that a strongly connected component $S$ of $\mathcal{D}$ is a {\em core} if either $|S|>1$ or $|S|=1$ (say $S=\{r\}$) and there is an arc from $r$ to itself. Note that $\mathcal{D}$ has a core if and only if $\mathcal{D}$ has a directed cycle. \item A {\em chordless cycle} in a directed graph $\mathcal{D}= (V, A)$ is a subset $U$ of vertices of $\mathcal{D}$ for which the induced graph $\mathcal{D}|U$ is a directed cycle (here $\mathcal{D}|U = (U, A')$ where the arc set $A'$ for $\mathcal{D}|U$ is given by $A'= \{(u,v)\in A: u, v \in U\}$). Note that if $|U|=1$, this means that there is an arc from the vertex in $U$ to itself. \item A vertex $v$ in $V$ is {\em reachable} from some subset $S$ of $V$ if there is a directed path from some vertex in $S$ to $v$. More generally, a subset $U$ of $V$ is reachable from $S$ if there is some vertex $v \in U$ that is reachable from $S$. \end{itemize} The terminology `core' follows a similar usage by \cite{vas}, in which the set of vertices (molecule types) that are reachable from a core is referred to as the `periphery' of the core. \subsection{First main result} The following theorem provides graph-theoretic characterisations of RAFs, irrRAFs, closed RAFs, and minimal closed RAFs within any elementary CRS. Given any CRS, $\mathcal{Q}$, consider the directed graph $\mathcal{D}_{\mathcal{Q}}$ with vertex set $\mathcal{R}$ and with an arc $(r, r')$ if a product of reaction $r$ is a catalyst of reaction $r'$. In addition, for any reaction $r$ that has a catalyst in $F$, we add the arc $(r,r)$ (i.e. a loop) into $\mathcal{D}_{\mathcal{Q}}$ if this arc is not already present; this step is just a formal strategy to allow the results to be stated more succinctly, and does not necessarily mean that a product of $r$ is an actual catalyst of $r$. \begin{thm} \label{bulletthm} Let $\mathcal{Q}$ be an elementary CRS. Then: \begin{itemize} \item[(i)] $\mathcal{Q}$ has a RAF if and only if $\mathcal{D}_{\mathcal{Q}}$ has a directed cycle, and this holds if and only if $\mathcal{D}_{\mathcal{Q}}$ contains a chordless directed cycle. The RAFs of $\mathcal{Q}$ correspond to the subsets $\mathcal{R}'$ of $\mathcal{R}$ for which the induced directed graph $\mathcal{D}_{\mathcal{Q}}|\mathcal{R}'$ has the property that each vertex has in-degree at least 1. \item[(ii)] The irrRAFs of $\mathcal{Q}$ are the chordless cycles in $\mathcal{D}_{\mathcal{Q}}$. The closed irrRAFs of $\mathcal{Q}$ are chordless cycles from which no other vertex of $\mathcal{D}_{\mathcal{Q}}$ is reachable. The smallest RAFs of $\mathcal{Q}$ are the shortest directed cycles in $\mathcal{D}_{\mathcal{Q}}$. \item[(iii)] The closed RAFs of $\mathcal{Q}$ are the subsets of $\mathcal{R}$ obtained by taking the union of any one or more cores of $\mathcal{D}_{\mathcal{Q}}$ and adding in all the reactions in $\mathcal{R}$ that are reachable from this union. \item[(iv)] Each minimal closed RAF of $\mathcal{Q}$ is obtained by taking any core $C$ of $\mathcal{D}_{\mathcal{Q}}$ for which no other core of $\mathcal{D}_{\mathcal{Q}}$ is reachable from $C$, and adding in all reactions in $\mathcal{R}$ that are reachable from $C$. \item[(v)] The number of minimal closed RAFs of $\mathcal{Q}$ is at most the number of cores in $\mathcal{D}_{\mathcal{Q}}$, and thus it is bounded above by $|{\rm maxRAF}(\mathcal{Q})|$. These can all be found and listed in polynomial time in $|\mathcal{Q}|$. \item[(vi)] The question of whether or not a given RAF for $\mathcal{Q}$ (e.g. the maxRAF) contains a closed RAF as a strict subset can be solved in polynomial-time. \end{itemize} \end{thm} \begin{proof} \mbox{} A key observation throughout is that in an elementary CRS $\mathcal{Q}$, any nonempty subset $\mathcal{R}'$ of reactions automatically satisfies the $F$--generated property, so $\mathcal{R}'$ forms a RAF for $\mathcal{Q}$ if and only if $\mathcal{R}'$ satisfies the reflexively autocatalytic (RA) property. By the manner in which $\mathcal{D}_{\mathcal{Q}}$ is constructed, the RA property means that the induced subgraph $\mathcal{D}_{\mathcal{Q}}|\mathcal{R}'$ has the property that each vertex has in-degree at least 1. In particular, $\mathcal{R}$ has a RAF if and only if $\mathcal{D}_{\mathcal{Q}}$ has a directed cycle. The `if' direction of this claim is clear. For the `only if' direction, suppose that $\mathcal{R}'$ is a RAF and $r \in \mathcal{R}'$. By the assumption that each vertex in $\mathcal{D}_{\mathcal{Q}}$ has in-degree at least 1, there is a directed walk of length $k$ (for any $k \geq 1$) involving vertices in $\mathcal{R}'$ and ending in $r$. Since $\mathcal{R}'$ is finite if we take $k> |\mathcal{R}'|$ then two vertices on this directed walk must coincide and the resulting sub-walk between this vertex to itself gives a directed cycle in $\mathcal{D}_{\mathcal{Q}}$. Moreover, $\mathcal{D}_{\mathcal{Q}}|\mathcal{R}'$ contains a directed cycle if and only if this sub-digraph contains a chordless cycle (again, the `if' direction is clear and the `only if' direction follows by the finiteness of $\mathcal{R}$, so shortening each directed cycle by following a chord leads to a sequence of cycles of decreasing length that eventually terminates on a chordless cycle). This establishes Part (i). For Part (ii), a subset $\mathcal{R}'$ of $\mathcal{R}$ has the property that $\mathcal{D}_{\mathcal{Q}}|\mathcal{R}'$ is a chordless cycle, which implies (by Part (i)) that $\mathcal{R}'$ is a RAF. It is also an irrRAF; otherwise, the cycle would have a chord. Conversely, if $\mathcal{R}'$ has the property that $\mathcal{D}_{\mathcal{Q}}|\mathcal{R}'$ is not a chordless cycle, then either $\mathcal{D}_{\mathcal{Q}}$ does not contain a cycle (in which case it is not a RAF) or it contains a cycle which either has a chord or has other vertices reachable from it, in which case $\mathcal{R}'$ is not an irrRAF. This establishes the first sentence of Part (ii). The arguments for the second and third sentences follow similar lines. For Part (iii), it is clear that the union of one or more cores is a RAF; however, the resulting set of reactions is closed if and only if all reactions that are reachable from that set are also included. For Part (iv), suppose that a core $c'$ is reachable from another core $c$ (by definition, $c$ is not reachable from $c'$). Any closed RAF $\mathcal{R}'$ that contains both $c$ and $c'$ is thus not minimal, since we could delete $c'$ and all the reactions that are reachable from $c'$ but not from $c$ and obtain a strict subset of $\mathcal{R}'$ that is also a closed RAF. On the other hand, if $\mathcal{R}'$ has the property described in Part (iv), then it is a closed RAF by Part (iii) and it is also minimal, since any closed RAF must contain at least one core, alongside all the reactions that are reachable from it. Part (v) follows from Part (iv), since each minimal closed RAF is associated with exactly one core, and since cores are strongly connected components of $\mathcal{D}_{\mathcal{Q}}$ these cores are vertex-disjoint (i.e. two cores share no reaction). Consequently, the number of cores is bounded above by the number of reactions in the maxRAF of $\mathcal{D}_{\mathcal{Q}}$. Moreover, finding the strongly connected components of any digraph can be done in polynomial time in the size of the digraph \cite{tar}. Each of these strongly connected components can then be tested in polynomial time to determine if it is a core; if so, one can then determine in polynomial time which other vertices are reachable from it. Thus the minimal closed RAFs can be listed in polynomial time in the size of $\mathcal{Q}$. Part (vi) follows from Part (v) since $\mathcal{Q}$ contains a closed subRAF if and only if it contains a minimal closed subRAF. \end{proof} \hfill$\Box$ Figs.~\ref{fig2}, \ref{fig3} and \ref{fig4} illustrate Parts (i)--(iv) of Theorem~\ref{bulletthm}. Some of these examples are based on reaction networks that come from actual experimental RAF sets. \begin{figure}[htb] \centering \includegraphics[scale=1.0]{fig2.pdf} \caption{The directed graph $\mathcal{D}_{\mathcal{Q}}$ for an elementary CRS $\mathcal{Q}$ (adapted from an experimental system of \cite{ash}) that has three strongly connected components ($S_1, S_2, S_3$), of which $S_1$ and $S_2$ are cores. The associated (acyclic) condensation digraph $\mathcal{D}^*_{\mathcal{Q}}$ is shown on the right. The unique minimal closed RAF is $S_2 \cup S_3$; the other closed RAF is the full set itself, namely $S_1 \cup S_2 \cup S_3$. The reactions subsets $S_1$, $S_1 \cup S_3$, $S_1 \cup S_2$, $S_1 \cup S_3$, and $S_2$ are all RAFs but not closed RAFs. A computer-based search finds 305 RAFs altogether. There are six chordless cycles in this CRS, which correspond to the six irrRAFs: $\{r_2\}, \{r_5\}, \{r_8\}, \{r_1, r_4\}, \{r_4, r_7\}$ and $\{r_3, r_7\}$. Note that this representation of the CRS is in terms of the molecules produced by reactions that have reactants in the food set. However, each reaction produces a single (and unique) product so we can identify the product with the reaction in this example.} \label{fig2} \end{figure} \begin{figure}[htb] \centering \includegraphics[scale=0.8]{fig3.pdf} \caption{(i) An elementary CRS (with food set $F$ equal to the 12 elements labelled $a_i, a_i', b_i, b_i'$ for $i=1,2,3$) that has eight irrRAFs, each of which has size 3 (this example can be extended to produce an elementary CRS with $2n$ reactions and $2^n$ irrRAFs \cite{hor12}). These irrRAFs correspond to the eight chordless cycles in the graph $\mathcal{D}_{\mathcal{Q}}$ shown in (ii), with one of these chordless cycles indicated by the three bold arcs. None of these irrRAFs is closed. There are 27 RAFs for $\mathcal{Q}$ in total.} \label{fig3} \end{figure} \begin{figure}[htb] \centering \includegraphics[scale=1.2]{fig4.pdf} \caption{The directed graph $\mathcal{D}_{\mathcal{Q}}$ for an elementary CRS (from an experimental system \cite{hor13}), shown on the left, has 67 RAFs and two closed RAFs (the whole set and $\{r_4, r_5, r_6, r_7\}$). The strongly connected components of $\mathcal{D}_{\mathcal{Q}}$ are $\{r_1\}, \{r_2\}, \{r_3\}$ and $\{r_4, r_5, r_6, r_7\}$, two of which are cores (namely, $\{r_1\}$ and $\{r_4, r_5, r_6, r_7 \}$). The associated condensation digraph $\mathcal{D}^*_{\mathcal{Q}}$ is shown on the right. For this RAF, there are four irrRAFs, namely $\{r_1\}, \{r_5\}, \{r_6\}$, and $\{r_4, r_7\}$.} \label{fig4} \end{figure} \newpage {\bf Remarks:} \begin{itemize} \item Parts (ii)--(vi) of Theorem~\ref{bulletthm} hold even when $\mathcal{Q}$ is not elementary, provided that $\mathcal{Q}' = (X, \mathcal{R}', C, F)$ is elementary where $\mathcal{R}'$ is the maxRAF of $\mathcal{Q}$. \item Although cores share no reactions in common, it is quite possible for minimal closed RAFs to share reactions in common. \item The last sentence of Part (ii) implies that the size of the smallest RAF is equal to the length of the shortest directed cycle in $\mathcal{D}_\mathcal{Q}$ and this can be found in polynomial time in $|\mathcal{Q}|$ (by a depth-first-search or network flow techniques). This is in contrast to the problem of finding the size of a smallest RAF in a general CRS, which has been shown to be NP-hard in \cite{ste13}. \item An important extension of the RAF concept allows for molecule types to inhibit reactions (as well as being able to catalyse reactions). For a general CRS $\mathcal{Q}$ it is known that determining whether or not a CRS $\mathcal{Q}$ has a RAF $\mathcal{R}'$ for which no reaction is inhibited by any molecule produced by $\mathcal{R}'$ is NP-hard \cite{mos}. However, for any elementary CRS, Theorem~\ref{bulletthm}(v) provides the following positive result. \begin{cor} When inhibition is also allowed in an elementary CRS $\mathcal{Q}$, it is possible to determine in polynomial time whether $\mathcal{Q}$ contains a closed RAF $\mathcal{R}'$ for which no reaction is inhibited by any molecule type produced by $\mathcal{R}'$. \end{cor} \begin{proof} There is a closed RAF for $\mathcal{Q}$ that has no inhibition if and only if there is a minimal closed RAF for $\mathcal{Q}$ that has no inhibition. By Part (v) of Theorem~\ref{bulletthm}, there are at most $|{\rm maxRAF}(\mathcal{Q})|$ minimal closed RAFs for an elementary CRS $\mathcal{Q}$, and these can all be checked in polynomial time to determine if any of them have the property that no reaction is inhibited by any molecule type produced by the reactions in the set. \end{proof} \item Part (v) of Theorem~\ref{bulletthm} raises the question of whether this result might apply with the restriction that $\mathcal{Q}$ is elementary. In other words, is the number of minimal closed RAFs in a (general, nonelementary) CRS bounded polynomially in the size of $\mathcal{Q}$? The answer turns out to be `no' as the following example shows. Consider the CRS $\mathcal{Q}_k: = (X, \mathcal{R}, C, F)$ where $$X= \{f, x, \theta\} \cup \{x_1, x'_1, \ldots, x_k, x'_k\} \cup \{\theta_1, \ldots, \theta_k\}, F=\{f\},$$ and for $[k] = \{1,2, \ldots, k\}$, the reaction set is: $$\mathcal{R} = \{r_x, r_\theta\} \cup \{r_i: i \in [k]\} \cup \{r'_i, i \in [k]\} \cup \{\overline{r_i}:i \in [k]\} \cup \{\overline{r'_i}: i \in [k]\},$$ where these reactions are described as follows (with catalysts indicated above the arrows): $$r_x: f \xrightarrow{\theta} x,$$ $$r_\theta: \theta_1+\theta_2 + \cdots + \theta_k \xrightarrow{\theta} \theta,$$ and for all $i \in [k]$: $$r_i: x \xrightarrow{x_i} x_i, \mbox{ } r'_i: x \xrightarrow{x'_i} x'_i,$$ $$\overline{r_i}: x_i \xrightarrow{\theta_i} \theta_i, \mbox{ } \overline{r'_i}: x'_i \xrightarrow{\theta_i} \theta_i.$$ Thus, $\mathcal{Q}_k$ has a food set of size 1, a reaction set of size $4k+2$, and $3k+3$ molecule types. Fig.~\ref{fig5} provides a graphical representation of $\mathcal{Q}_3$. \begin{figure}[htb] \centering \includegraphics[scale=0.8]{fig5.pdf} \caption{The CRS $\mathcal{Q}_3$.} \label{fig5} \end{figure} \begin{prop} \label{thetapro} The minimal closed RAFs of $\mathcal{Q}_k$ coincide with the irrRAFs for $\mathcal{Q}_k$, and there are $2^k$ of them. More precisely, $\mathcal{R}'$ is a minimal closed RAF of $\mathcal{Q}_k$ if and only if $\mathcal{R}'$ contains $r_x$ and $r_\theta$ and for each $i \in [k]$, $\mathcal{R}'$ contains either (i) $r_i$ and $\overline{r_i}$ but neither $r'_i$ nor $\overline{r'_i}$, or (ii) $r'_i$ and $\overline{r'_i}$ but neither $r_i$ nor $\overline{r_i}$. \end{prop} \begin{proof} The `if' direction in the second sentence is clear, since any such $\mathcal{R}'$ is easily seen to be a closed subRAF, as well as being an irrRAF, and thus is a minimal closed RAF. For the `only if' direction, a subset $\mathcal{R}'$ of $\mathcal{R}$ is a RAF of $\mathcal{Q}_k$ precisely if the following two properties hold: (a) $\mathcal{R}'$ contains $r_x$ and $r_\theta$, and (b) for each $i$, $\mathcal{R}'$ contains either $r_i$ and $\overline{r_i}$ or $r'_i$ and $\overline{r'_i}$ (in order to generate $\theta_i$, which is required by $r_\theta$). Unless $\mathcal{R}'$ satisfies the stronger condition (i) or (ii) (for each $i \in [k]$) listed in the statement of Proposition~\ref{thetapro}, $\mathcal{R}'$ is not minimal. \end{proof} \end{itemize} Another question that Part (v) of Theorem~\ref{bulletthm} suggests is the following: does an elementary CRS always have at most a polynomial number of closed RAFs? Again, the answer is `no', and the construction to show this is much simpler than the previous example. Consider the elementary CRS with $F=\{f_1, \ldots, f_n\}, \mbox{ } X= F \cup \{x_1, \ldots, x_n\},$ together with the set $\mathcal{R}$ of $k$ catalysed reactions $r_i: f_i \xrightarrow{x_i} x_i$ for $i=1, \ldots, k$. This CRS has $2^k-1$ closed RAFs, one for each nonempty subset of $\mathcal{R}$. \subsection{The probability of a RAF in an elementary CRS} Given an elementary CRS $\mathcal{Q}$, suppose that catalysis is assigned randomly as follows: each molecule type catalyses each given reaction in $\mathcal{R}$ with a fixed probability $p$, independently across all pairs $(x,r)$ of molecule type $x$ and reaction $r$. The probability $p_\mathcal{Q}$ that $\mathcal{Q}$ has a RAF is simply the probability that $\mathcal{D}_{\mathcal{Q}}$ has a directed cycle (by Theorem~\ref{bulletthm}(i)). In the case where each reaction in $\mathcal{R}$ has just a single product, then the asymptotic behaviour of $p_\mathcal{Q}$ as $|\mathcal{R}| \rightarrow \infty$ is equivalent to the emergence of a directed cycle in a large random directed graph, which has been previously studied in the random graph literature by \cite{bol}. Here we provide a simple lower bound on $p_\mathcal{Q}$. Let $\lambda = p|\mathcal{R}|$ be the expected number of reactions that each molecule type catalyses. The following result gives a lower bound on $p_\mathcal{Q}$ that depends only on $\lambda$ and which converges towards 1 as $\lambda$ grows. \begin{prop} $p_\mathcal{Q} \geq 1-\left(1-\frac{\lambda}{|\mathcal{R}|}\right)^{|\mathcal{R}|} \sim 1- e^{-\lambda}$, where $\sim$ denotes asymptotic equality as $|\mathcal{R}|$ grows. \end{prop} \begin{proof} Consider the probability $p_r$ that a single reaction $r$ has an arc to itself (such an event is sufficient but not necessary for $\mathcal{D}_{\mathcal{Q}}$ to contain a directed cycle). If $r$ produces $m\geq 1$ products, we have $p_r = 1- (1-p)^m \geq pm \geq p = \lambda/|\mathcal{R}|.$ The probability that no reaction has an arc to itself is therefore $\left(1-\frac{\lambda}{|\mathcal{R}|}\right)^{|\mathcal{R}|}$. Since $(1-x/n)^n \sim e^{-x}$, we obtain the result claimed. \end{proof} \subsection{Eigenvector analysis} A previous study by \cite{jai98} considered the dynamical aspects of an `autocatalytic set' in a CRS, which is closely related to the notion of an RAF (our graph $\mathcal{D}_\mathcal{Q}$ differs from theirs in two respects, firstly the vertices here represent reactions rather than molecule types, and we also permit self-loops from a reaction to itself). We now present the analogues of these earlier dynamical findings in our setting (and formally, with proofs). Given an elementary CRS $\mathcal{Q}$, let $A_\mathcal{Q}$ denote the adjacency matrix of the directed graph $\mathcal{D}_{\mathcal{Q}}$. Thus the rows and columns of $A_\mathcal{Q}$ are indexed by the reactions in $\mathcal{R}$ in some given order, and the entry of $A_Q$ corresponding to the pair $(r, r')$ is 1 precisely if $(r,r')$ is an arc of $\mathcal{D}_{\mathcal{Q}}$ and is zero otherwise. By Perron-Frobenius theory for non-negative matrices, $A_Q$ has a non-negative real eigenvalue $\lambda$ of maximal modulus (amongst all the eigenvalues) and if $\mathcal{D}_{\mathcal{Q}}$ is strongly-connected (i.e. $A_Q$ is irreducible), then $A_Q$ has a left (and a right) eigenvector with eigenvalue $\lambda$ whose components are all positive. The following results are analogues of the former study by \cite{jai98} to our setting. \begin{prop} \label{jaiprop} \mbox{} \begin{itemize} \item[(i)] If $\mathcal{Q}$ contains no RAF, then $\lambda=0$. \item[(ii)] If $\mathcal{Q}$ contains a RAF, then $\lambda \geq 1$. \item[(iii)] If $A_Q$ has an eigenvalue $>0$ with an associated left eigenvector $w$, then the set of reactions $r$ for which $w_r>0$ forms a RAF for $\mathcal{Q}$. \end{itemize} \end{prop} \begin{proof} Part (i) follows from Part (i) of Theorem~\ref{bulletthm}, combined with the fact that the adjacency matrix $A$ of an acyclic directed graph is nilpotent (i.e. specifically, $A^{l+1}$ is the all-zero matrix when $l$ is the length of a longest path in the directed graph) and thus all the eigenvalues of $A$ are equal to zero \cite{cv}. For Part (ii), if $\mathcal{Q}$ contains a RAF, then $\mathcal{D}_{\mathcal{Q}}$ has a minimal (chordless) directed cycle (which could just be a loop on a vertex). Let $w$ be the vector that has value 1 for each vertex in this minimal directed cycle and is zero otherwise. Then $w$ is both a left and right eigenvector for $A_Q$ with eigenvalue 1. For Part (iii), let $\mathcal{R}'=\{r \in \mathcal{R}: w_r>0\}$. The condition $wA_Q = \lambda w$ translates as $\sum_{r \in \mathcal{R}} w_{r} A_{rr'} = \lambda w_{r'}$. Since the right-hand side is non-zero for each reaction $r'\in \mathcal{R}'$, it follows that $w_{r}A_{rr'} \neq 0$ for at least one reaction $r \in \mathcal{R}'$; In other words, each reaction is $\mathcal{R}'$ is catalysed by the product of at least one reaction in $\mathcal{R}'$. Since $\mathcal{Q}$ is elementary, this implies that $\mathcal{R}'$ is a RAF. \end{proof} To illustrate an application of Proposition~\ref{jaiprop}, consider the system of 9 reactions from Fig.~\ref{fig2}. In this case, $\lambda \geq 1$ since the system contains a RAF ({\em cf.} Proposition~\ref{jaiprop}(ii)). Regarding Part (iii), three of the eigenvalues of $\mathcal{A}_\mathcal{Q}$ are strictly positive, and for the three corresponding left eigenvectors, one has strictly positive entries for the three reactions $r_2, r_6, r_8$, which form the subRAF $S_1$ shown in Fig.~\ref{fig2}. A second left eigenvector has strictly positive entries for the reactions $r_1, r_3, r_4, r_5, r_7, r_9$, and these form the minimal closed subRAF $S_2 \cup S_3$ shown in Fig.~\ref{fig2}. The third left eigenvector has strictly positive entries for the reactions $r_1, r_4, r_7$ which forms a subRAF of $S_2$. We end this section by noting that Part (iii) of Proposition~\ref{jaiprop} does not hold if left eigenvectors are substituted for right ones. A counterexample is given by the elementary CRS for which $A_\mathcal{Q}$ is the $2 \times 2$ matrix with both rows equal to $[0,1]$; in this case, $A_\mathcal{Q}$ has a principal eigenvalue of $+1$ but the associated right eigenvector is a column vector with strictly positive entries, but this does not correspond to a RAF for $\mathcal{Q}$. \section{Generative RAFs} We now introduce a new notion which describes how simple RAFs can develop into more complex ones in a progressive way. This section will build on, and apply the results concerning elementary CRSs, particularly Theorem~\ref{bulletthm}. Given a CRS $\mathcal{Q} = (X, \mathcal{R}, C, F)$ and a subset $Y$ of $X$ containing $F$, let $\mathcal{R}|Y$ be the subset of reactions in $\mathcal{R}$ that have all their reactants in $Y$, and let $$\mathcal{Q}|Y:=(X, \mathcal{R}|Y, C, Y).$$ In other words, $\mathcal{Q}|Y$ is the CRS obtained from $\mathcal{Q}$ by deleting each reaction from $\mathcal{R}$ that does not have all its reactants in $Y$, and by expanding the food set to include all of $Y$. \bigskip {\bf Definition (genRAFs):} Given a CRS $\mathcal{Q}=(X,\mathcal{R}, C, F)$, we say that a RAF $\mathcal{R}'$ for $\mathcal{Q}$ is a {\em genRAF} (or {\em generative RAF}) if there is a sequence $\mathcal{R}_1, \mathcal{R}_2, \ldots, \mathcal{R}_k$ of subsets of $\mathcal{R}$ with $\mathcal{R}_k = \mathcal{R}'$ and that satisfy the following properties: \begin{itemize} \item[(i)] $\mathcal{R}_{1}$ is the closure in $\mathcal{Q}$ of a RAF of $\mathcal{Q}|F$; \item[(ii)] for each $i>1$, $\mathcal{R}_{i}$ is the closure in $\mathcal{Q}$ of a RAF of $\mathcal{Q}|Y_i$ where $Y_i=F \cup \pi(\mathcal{R}_{i-1})$, and where $\pi(\mathcal{R}_{i-1})$ refers to all molecule types that are produced by a reaction from $\mathcal{R}_{i-1}$. \end{itemize} \bigskip Thus, a genRAF is any RAF for $\mathcal{Q}$ that can be formed by taking $\mathcal{R}_1$ to be the closure (within $\mathcal{Q}$) of a RAF within the elementary CRS $\mathcal{Q}|F$, and for each $i>1$, adding the products of $\mathcal{R}_{i-1}$ to the food set $F$ of $\mathcal{Q}$ and taking $\mathcal{R}_i$ to be the closure (within $\mathcal{Q}$) of the the resulting (induced) elementary CRS. In other words, the next closed RAF in the sequence is built upon an enlarged food set generated by the previous closed RAFs in the sequence and considering just those reactions that use this enlarged food set as reactants, and then forming the closure of this set in $\mathcal{Q}$. As an example, the CRS in Fig.~\ref{fig6}(a) is itself a genRAF (but not a CAF), as it has the generating sequence $\mathcal{R}_1, \mathcal{R}_2$ where $\mathcal{R}_1=\{r_1, r_2,\}$ and $\mathcal{R}_2 = \{r_1, r_2, r_3\}$, however the CRS in Fig.~\ref{fig6}(b) is not a genRAF (even though it is an RAF). \begin{figure}[htb] \centering \includegraphics[scale=0.9]{fig6.pdf} \caption{(a): This CRS that is a genRAF (a generating sequence starts with the elementary closed RAF $\{r_1, r_2\}$, and then adds $r_3$). (b): A different pattern of catalysis converts the three reactions into a RAF that is no longer a genRAF. In both cases, the food set is $F=\{f_1, f_2, f_3\}$.} \label{fig6} \end{figure} The motivation for considering the notion of genRAFs is two-fold. Firstly a genRAF can be built up from simpler RAFs (starting with an elementary one) by generating the required catalysts at each step (i.e. some reactions may still need to proceed initially uncatalysed, but a catalyst for the reaction will be generated by some other reaction by the end of the same step). This avoids the possibility of long chains of reactions that need to proceed uncatalysed until a catalyst for the very first link in the chain is produced, which seems less biochemically plausible. A second motivation for considering genRAFs is that they combine two further desirable properties: namely an emphasis on RAFs that are closed (i.e. all reactions that are able to proceed and for which a catalyst is available will proceed), and genRAFs are sufficiently well-structured that some questions can be answered in polynomial time that are problematic for general RAFs (Theorem~\ref{secondmain}(iv) provides an explicit example). We will call the sequence $\mathcal{R}_1, \mathcal{R}_2, \ldots, \mathcal{R}_k$ in the above definition a {\em generating sequence} for $\mathcal{R}'$. We now make two observations, that are formalized in the following lemma. \begin{lemma} \label{nesting} Suppose that a genRAF $\mathcal{R}'$ has generating sequence $\mathcal{R}_1, \mathcal{R}_2, \ldots, \mathcal{R}_k$. Then: \begin{itemize} \item[(i)] $\mathcal{R}'$ and each set in its generating sequence is a closed RAF for $\mathcal{Q}$. \item[(ii)] $\mathcal{R}_i$ is a nested increasing sequence (i.e. $\mathcal{R}_i \subseteq \mathcal{R}_{i+1}$ for each $i \in \{1, \ldots, k-1\}$). \end{itemize} \end{lemma} \begin{proof} Part (i) follows by definition, since each set in the generating sequence is the closure of a subRAF of $\mathcal{Q}$ and is therefore a closed RAF for $\mathcal{Q}$, and a genRAF is the final set in its generating sequence. Part (ii): For each reaction $r \in \mathcal{R}$, let $\rho(r)$ denote the set of reactants of $r$. We prove Part(ii) by induction on $k$. For $k=2$, suppose that $r \in \mathcal{R}_1$. Then $\rho(r) \subseteq F$ and there exists some molecule type $x \in F \cup \pi(\mathcal{R}_1)$ that catalyses $r$. Since $\mathcal{R}_2$ is a closed RAF, and since the reactants and at least one catalyst (namely $x$) are available in the enlarged food set for $\mathcal{R}_2$, namely $Y_2 = F \cup \pi(\mathcal{R}_1)$, then $r \in \mathcal{R}_2$. Thus Part (ii) holds for $k=2$. Suppose now that Part (ii) holds for $k=m$ and that $\mathcal{R}_1, \mathcal{R}_2, \ldots, \mathcal{R}_{m+1}$ is a generating sequence for $\mathcal{Q}$. We need to show that $\mathcal{R}_{m}\subseteq \mathcal{R}_{m+1}$. To this end, suppose that $r \in \mathcal{R}_{m}$. Then $\rho(r) \subseteq \pi(\mathcal{R}_{m-1})$ and there exists a molecule type $x \in F \cup \pi(R_m)$ that catalyses $r$. Now $\mathcal{R}_{m-1} \subseteq \mathcal{R}_m$ by induction and so $\rho(r) \subseteq \pi(\mathcal{R}_m)$. Thus the reactants and at least one catalyst of $r$ are in $Y_{m+1} = F \cup \pi(R_m)$, and so, by the closure property, $r \in \mathcal{R}_{m+1}$. This establishes the induction step, and thereby Part (ii). \end{proof} A natural question in the light of Lemma~\ref{nesting}(i) is the following: Is every closed RAF in a CRS generative? The answer to this is `no' in general; for example, a CRS may have a maxRAF that requires too much `jumping ahead' with catalysis (chains of initially spontaneous reactions) to be built up in this way, as in Fig.~\ref{fig6}(b). Shortly (Theorem~\ref{secondmain}) we will provide a precise, and efficiently checkable, characterisation for when a closed RAF is a genRAF. Another instructive example is the following maxRAF that arose in a study of the binary polymer model from \cite{hor17}: \begin{align*} r_1 &: 10 + 0 \xrightarrow{01100} 100\\ r_2 &: 01+100 \xrightarrow{0} 01100\\ r_3 &: 10+1 \xrightarrow{0} 101\\ r_4 &: 11+10 \xrightarrow{101} 1110\\ r_5 &: 1110+0 \xrightarrow{101} 11100 \end{align*} where $F=\{0, 1, 00, 01, 10, 11\}$. This maxRAF contains six subRAFs, two of which are closed, namely, the full set of all five reactions, which is not generative, and the subset $\{r_3, r_4, r_5\}$, which is a genRAF. \bigskip {\bf A maximal generative RAF:} Given a CRS $\mathcal{Q}= (X, \mathcal{R}, C, F)$, consider the following sequence $(\overline{\mathcal{R}}_i, i \geq 1)$ of subsets of $\mathcal{R}$. Let $\mathcal{Q}_1 := \mathcal{Q}|F$, let $\mathcal{R}_i ={\rm maxRAF}(\mathcal{Q}_1)$ and let $\overline{\mathcal{R}}_1$ be the closure of $\mathcal{R}_1$ in $\mathcal{Q}$. For $i>1$, let $$\mathcal{R}_i = {\rm maxRAF}(\mathcal{Q}_i), \mbox{ where } \mathcal{Q}_i:= F \cup \pi(\overline{\mathcal{R}}_{i-1}),$$ and let $\overline{\mathcal{R}}_i$ be the closure of $\mathcal{R}_i$ in $\mathcal{Q}$. Note that $\mathcal{R}_1$ may be empty even if $\mathcal{Q}$ has a RAF (as Fig.~\ref{fig6}(b) shows), in which case, $\overline{\mathcal{R}}_i = \emptyset$ for all $i \geq 1$. However, if $\mathcal{R}_1$ is nonempty, then $\overline{\mathcal{R}}_i$ forms an increasing nested sequence of closed RAFs for $\mathcal{Q}$ and so the sequence stabilises at some subset of reactions that we denote by $\overline{\mathcal{R}}(\mathcal{Q})$. Thus, $\overline{\mathcal{R}}(\mathcal{Q}) = \cup_{i\geq1} \overline{\mathcal{R}}_i$, and this set is identical to $\overline{\mathcal{R}}_k$ for some sufficiently large value of $k$ (with $k\leq |\mathcal{R}|$). We can now state the main result of this section. \begin{thm} \label{secondmain} Suppose that $\mathcal{Q}= (X, \mathcal{R}, C, F)$ is a CRS. \begin{itemize} \item[(i)] $\mathcal{Q}$ contains a genRAF if and only if $\mathcal{R}_1 \neq \emptyset$, in which case $\overline{\mathcal{R}}(\mathcal{Q})$ is a genRAF for $\mathcal{Q}$ that contains all other genRAFs for $\mathcal{Q}$. \item[(ii)] If $\mathcal{R}'$ is a closed RAF for $\mathcal{Q}$ then $\mathcal{R}'$ is a genRAF for $\mathcal{Q}$ if and only if $\mathcal{R}' =\overline{\mathcal{R}}(\mathcal{Q}')$, where $\mathcal{Q}' = (X, \mathcal{R}', C, F)$. \item[(iii)] The construction of $\overline{\mathcal{R}}(\mathcal{Q})$ and determining whether an arbitrary closed RAF $\mathcal{R}'$ for $\mathcal{Q}$ is generative can be determined in polynomial time in $|\mathcal{Q}|$. \item[(iv)] Determining whether a given closed genRAF $\mathcal{R}'$ contains a strict subset that is a closed RAF for $\mathcal{Q}$ can be solved in polynomial time in $|\mathcal{Q}|$. \end{itemize} \end{thm} \begin{proof} For the first claim in Part (i), if $\mathcal{R}_1=\emptyset$ then $\mathcal{Q}|F$ contains no RAF and so $\mathcal{Q}$ has no genRAF. Suppose that $\mathcal{R}_1\neq \emptyset$. Then $\overline{\mathcal{R}}(\mathcal{Q})$ is a genRAF for $\mathcal{Q}$ since it has the generating sequence $\overline{\mathcal{R}}_i$ ($i \geq 1$) (noting that $\overline{\mathcal{R}}_i$ is the closure in $\mathcal{Q}$ of $\mathcal{R}_i$ which is the maxRAF (and so a RAF) for $\mathcal{Q}|F$ when $i=1$, and for $\mathcal{Q}|(F \cup \pi(\overline{\mathcal{R}}_{i-1})$, when $i>1$). For the second claim in Part (i), suppose that $\mathcal{R}'$ is a genRAF for $\mathcal{Q}$; will show that $\mathcal{R}' \subseteq \overline{\mathcal{R}}(\mathcal{Q})$. Let $(\mathcal{R}'_i, i \geq 1)$ be a generating sequence for $\mathcal{R}'$. We show by induction on $i$ that $\mathcal{R}'_i \subseteq \overline{\mathcal{R}}_i$ for all $i>1$. The base case $i=1$ holds since $\mathcal{R}_1$ is the maxRAF of $\mathcal{Q}|F$ which contains any other RAF of $\mathcal{Q}|F$, and so the closure of $\mathcal{R}_1$ in $\mathcal{Q}$, namely $\overline{\mathcal{R}}_1$ contains the closure in $\mathcal{Q}$ of any other RAF of $\mathcal{Q}|F$. Suppose the induction hypothesis holds for all values of $i$ up to $j\geq 1$. Then $\mathcal{R}_{j+1}$ is the maxRAF of $\mathcal{Q}|(F \cup \pi(\overline{\mathcal{R}}_j))$ and so it contains any RAF of $\mathcal{Q}|(F \cup \pi(\mathcal{R}'_j))$ since $\mathcal{R}'_j \subseteq \overline{\mathcal{R}}_j$ (by the induction hypothesis) and so $F \cup \pi(\mathcal{R}'_j) \subseteq F \cup \pi(\overline{\mathcal{R}}_j)$. Consequently, the closure of $\mathcal{R}_{j+1}$ in $\mathcal{Q}$, namely, $\overline{\mathcal{R}}_{j+1}$, contains the closure in $\mathcal{Q}$ of any RAF of $\mathcal{Q}|(F \cup \pi(\mathcal{R}'_j))$. Thus the induction hypothesis holds, which establishes that $\mathcal{R}' \subseteq \overline{\mathcal{R}}(\mathcal{Q})$. For Part (ii), observe that $\overline{\mathcal{R}}(\mathcal{Q}')$ is a genRAF for $\mathcal{Q}'$ (by Part (i)) and so if $\mathcal{R}' = \overline{\mathcal{R}}(\mathcal{Q}')$ then $\mathcal{R}'$ is a genRAF for $\mathcal{Q}'$. Since $\mathcal{R}'$ is a closed RAF for $\mathcal{Q}$, $\mathcal{R}'$ is also a genRAF for $\mathcal{Q}$ (since the closure in $\mathcal{Q}$ of any subset of reactions from $\mathcal{R}'$ is a subset of $\mathcal{R}'$). Conversely, suppose that $\mathcal{R}'$ is a genRAF for $\mathcal{Q}$. Then since $\mathcal{R}'$ is a closed RAF for $\mathcal{Q}$, $\mathcal{R}'$ is also a genRAF for $\mathcal{Q}'$. Now, $\overline{\mathcal{R}}(\mathcal{Q}') \subseteq \mathcal{R}'$, and since $\overline{\mathcal{R}}(\mathcal{Q}')$ contains any other genRAF for $\mathcal{Q}'$ (in particular, $\mathcal{R}'$) by Part (i), we have $\overline{\mathcal{R}}(\mathcal{Q}') = \mathcal{R}'$, as required. For Part (iii), the proof of the claim (regarding the construction of $\overline{\mathcal{R}}(\mathcal{Q})$) follows from the fact that the maxRAF (of $\mathcal{Q}_i$), and its closure (in $\mathcal{Q}$) can be computed in polynomial time in the size of the CRS \cite{hor}. The the second claim then follows from Part (ii). For Part (iv), consider the following algorithm. Given a closed RAF $\mathcal{R}'$ for $\mathcal{Q}$, let $\overline{\mathcal{R}}'_1, \overline{\mathcal{R}}'_2, \ldots$ be the generating sequence for $\overline{\mathcal{R}}(\mathcal{Q}')$ (described above, but with $\mathcal{R}$ replaced by $\mathcal{R}'$ and $\mathcal{Q}$ by $\mathcal{Q}' = (X, \mathcal{R}', C, F)$). From Part (ii) we have $\overline{\mathcal{R}}(\mathcal{Q}')= \mathcal{R}'$, and so $\overline{\mathcal{R}}'_1, \overline{\mathcal{R}}'_2, \ldots$ is a generating sequence for $\mathcal{R}'$. Now, let $\mathcal{Q}'_1 = \mathcal{Q}'|F$ and for $i>1$, let $\mathcal{Q}'_i = \mathcal{Q}|(F \cup \pi(\overline{\mathcal{R}}'_{i-1})).$ Notice that $\mathcal{Q}'_1$ is an elementary CRS, and for $i>1$ we can regard $\mathcal{Q}'_i$ as an elementary RAF with enlarged food set $F \cup \pi(\overline{\mathcal{R}}'_{i-1})$. Thus we can apply Part (v) of Theorem~\ref{bulletthm}, and in polynomial time in $|\mathcal{Q}|$ search all the minimal closed RAFs for $\mathcal{Q}_j$ and determine whether the closure in $\mathcal{Q}$ of any of these results in a strict subset (say $\mathcal{R}''$) of $\mathcal{R}'$. When such a set $\mathcal{R}''$ exists, its closure is clearly a closed RAF for $\mathcal{Q}$ that is a strict subset of $\mathcal{R}'$. However, if no such set $\mathcal{R}''$ is located then we claim that $\mathcal{R}'$ contains no closed RAF for $\mathcal{Q}$ as a strict subset. To see why, suppose that there is a closed RAF for $\mathcal{Q}$ that is strictly contained within $\mathcal{R}'$. In that case there exists a minimal closed RAF for $\mathcal{Q}$ that is strictly contained in $\mathcal{R}'$, and we denote such a minimal closed RAF as $\mathcal{R}_*$. Let $j$ be the smallest value of $i$ for which $\mathcal{R}_*$ is contained in $\overline{\mathcal{R}}'_i$ as a strict subset (this is well defined, since $\mathcal{R}_*$ is strictly contained in $\mathcal{R}'$). Then $\mathcal{R}_*$ is a closed RAF for $\mathcal{Q}_j$ also, and its closure in $\mathcal{Q}$ is a strict subset of $\mathcal{R}'$, so the closure in $\mathcal{Q}$ of any minimal closed RAF for $\mathcal{Q}_j$ that lies strictly within $\mathcal{R}_*$ would also be a strict subset of $\mathcal{R}'$. \end{proof} \hfill$\Box$ {\bf Remarks:} \begin{itemize} \item If a CRS has a CAF (defined at the end of the Introduction), then the (unique) maximal CAF is generative. However, a genRAF need not necessarily correspond to a maximal CAF. \item Part (iv) of Theorem~\ref{secondmain} provides an interesting contrast to the general RAF setting. There the question of determining whether a closed RAF (e.g. the maxRAF) in an arbitrary CRS contains another closed RAF as a strict subset has unknown complexity. \end{itemize} \bigskip \section{RAFs with reaction rates} In this section, we consider a further refinement of RAF theory, by explicitly incorporating reaction rates into the analysis. This conveniently addresses one shortcoming implicit in the generative RAF definition from the last section -- namely a generative RAF necessarily grows as a monotonically increasing nested system with the length of its associative generating sequence (Lemma~\ref{nesting}). However, once a sufficiently large generative RAF is established, one or more of its subRAFs may then become dynamically favoured if it is more `efficient' (i.e. all its reactions proceed at higher reaction rates than the generative RAF it lies within), as we shortly illustrate with a simple example. Suppose that we have a CRS $\mathcal{Q} = (X, \mathcal{R}, C, F)$ and a function $f: C \rightarrow \mathbb{R}^{\geq 0}$ that assigns a non-negative real number to each pair $(x, r) \in C$. The interpretation here is that $f(x, r)$ describes the {\em rate} at which reaction $r$ proceeds when the catalyst $x$ is present. Given $\mathcal{Q}$ and $f$, together with a RAF $\mathcal{R}'$ for $\mathcal{Q}$, let: $$\varphi(\mathcal{R}') =\min_{r \in \mathcal{R}'} \{\max\{f(x,r): (x, r) \in C, x \in {\rm cl}_{\mathcal{R}'}(F)\}\}$$ In other words, $\varphi(\mathcal{R}')$ is the rate of the slowest reaction in the RAF $\mathcal{R}'$ under the most optimal choice of catalyst for each reaction in $\mathcal{R}'$ amongst those catalysts that are present in ${\rm cl}_{\mathcal{R}'}(F)$. \begin{figure}[htb] \centering \includegraphics[scale=1.2]{fig7.pdf} \caption{(a) A RAF in which the catalysis arcs have associated rates (namely, the values 1 and 2 as indicated). The poset consisting of the maxRAF and its three subRAFs (partially ordered by set inclusion) is shown by the Hasse diagram in (b). All four RAFs have $\varphi$--values of $1$ except for the subRAF $\{r_2, r_3\}$, which has a $\varphi$--value of $2$. This optimal RAF $\{r_2, r_3\}$ is not a generative RAF (whereas the other three RAFs are generative; indeed, $\{r_1\}$ and $\{r_1, r_2\}$ are elementary). Nevertheless, once the generative maxRAF $\{r_1, r_2, r_3\}$ has formed, $\{r_2, r_3\}$ can then emerge as the dominant sub-RAF.} \label{fig7} \end{figure} {\bf Example:} Fig.~\ref{fig7} provides an example to illustrate the notions above. In this CRS the three reactions comprises a RAF, with a $\varphi$--value equal to 1. However there are three subRAFs, and one of these (namely $\{r_2, r_3\}$) has a higher $\varphi$--value. However, the less optimal closed subRAF $\{r_1, r_2\}$ is generative and likely to have formed before the optimal one; otherwise $\{r_2, r_3\}$ would require a chain of two reactions to occur uncatalysed ($r_2$ followed by $r_3$) before the catalysts for them become available. The closed RAF $\{r_1, r_2\}$ may then expand to $\{r_1,r_2, r_3\}$ before this second closed RAF is subsequently out-competed by its subRAF $\{r_2, r_3\}$, since the catalysed reactions in this subRAF run twice as fast as the reaction $r_1$. Our main result in this section shows that finding a RAF to maximise $\varphi$ can be achieved by an algorithm that runs in polynomial time in the size of $\mathcal{Q}$. \begin{thm} \label{thm3} \mbox{} There is a polynomial-time algorithm to construct a RAF with largest possible $\varphi$--value from any CRS $\mathcal{Q}$ that contains RAF. Moreover, this constructed RAF is the maximal RAF with this $\varphi$--value. \end{thm} \begin{proof} Let $\mathcal{L} = \{f(x, r): (x,r) \in C\}$, and let $M = \max \mathcal{L}$. Consider the CRS $\mathcal{Q}' = (X', \mathcal{R}^*, C^*, F)$ obtained from $\mathcal{Q}$ by first deleting any uncatalysed reaction and then replacing each reaction $r$ that is catalysed by (say) $k \geq 1$ molecule types with $k$ distinct copies of this reaction $r_1, \ldots, r_k$, each of which is catalysed by a different one of the $k$ molecule types. Thus each reaction $r$ in $\mathcal{R}^*$ is catalysed by exactly one molecule type, which we will denote as $x(r)$. For the associated catalysis set $C^* = \{(x(r), r): r \in \mathcal{R}^*\}$, let $f'$ be the rate function induced by $f$ (i.e. if $r \in \mathcal{R}$ is replaced by $r_1, \ldots, r_k \in \mathcal{R}^*$ then $f'(x(r_i), r_i) := f(x(r), r)$). For each $\ell \in \mathcal{L}$ let: $$\mathcal{R}^*_\ell = \{r \in \mathcal{R}^*: f'(x(r), r) \geq \ell \}.$$ In other words, $\mathcal{R}^*_\ell$ is the set of catalyst-reaction pairs $(x(r), r)$ where the rate of reaction $r$ when catalysed by the molecule type $x(r)$ is at least $\ell$ (as specified by the rate function $f$). Now, let $\widetilde{\mathcal{R}}$ be the maxRAF of $\mathcal{R}^*_\ell$ for the largest value of $\ell \in \mathcal{L}$ for which maxRAF($\mathcal{R}^*_\ell$) is nonempty. This set is well-defined, since $\mathcal{R}^*= \mathcal{R}^*_\ell$ when $\ell = 0$, and because $\mathcal{R}$ (and thereby $\mathcal{R}^*$) is assumed to have a RAF. Notice that $\widetilde{\mathcal{R}}$ can be efficiently determined, by starting at $\ell = M$ and decreasing $\ell$ through the (at most $|\mathcal{L}|\leq |C|$) possible values it can take until a nonempty maxRAF first appears (alternatively, one could start at $\ell=0$ and increase $\ell$ until the last value for which a nonempty maxRAF is present). {\em Claim}: $\widetilde{\mathcal{R}}$ is a RAF that has the largest possible $\varphi$--value of any RAF for $\mathcal{Q}'$, and $\widetilde{\mathcal{R}}$ contains any other RAF for $\mathcal{Q}'$ with this maximal $\varphi$--value. To establish this claim, suppose that $\widetilde{\mathcal{R}} = {\rm maxRAF}(\mathcal{R}_\ell)$ for $\ell = t$ and that ${\rm maxRAF}(\mathcal{R}_\ell) = \emptyset$ for $\ell > t$ (i.e. $t$ is the largest value of $\ell$ in $\mathcal{L}$ for which $\mathcal{R}_\ell$ has a (nonempty) maxRAF). For each reaction $r$ in $\widetilde{\mathcal{R}}$, we then have $f'(x(r), r) \geq t$, and for at least one reaction $r$ in $\widetilde{\mathcal{R}}, f'(x(r), r) = t$ (otherwise, a larger value of $\ell$ would support a maxRAF). It follows that $\varphi(\widetilde{\mathcal{R}})=t$. Now if $\mathcal{R}'$ is any other RAF for $\mathcal{Q}'$, let $t'$ be the minimal value of $f'(x(r), r)$ over all choices of $r \in \mathcal{R}'$. Then $t' \leq t$ otherwise, $\mathcal{R}_\ell$ would have a nonempty maxRAF for a value $\ell =t'$ that is greater than $t$, contradicting the maximality of $t$. Thus $\mathcal{R}' \subseteq \mathcal{R}^*_t$ and so $$\mathcal{R}' = {\rm maxRAF}(\mathcal{R}') \subseteq {\rm maxRAF}(\mathcal{R}^*_t) =\widetilde{\mathcal{R}},$$ which shows that $\widetilde{\mathcal{R}}$ contains any other RAF with this maximal value. This establishes the above Claim, and thereby Theorem~\ref{thm3} for $\mathcal{Q}'$. However, the subset of reactions of $\mathcal{R}$ whose copies are present in $\widetilde{\mathcal{R}}$ provides a RAF for $\mathcal{Q}$ that has the largest possible $\varphi$--value (namely $t$) and which contains any other RAF for $\mathcal{Q}$ with this $\varphi$--value. \hfill$\Box$ \end{proof} {\bf Remark:} For the example in Fig.~\ref{fig7}, we have the subRAFs $\mathcal{R}_1 = \{r_1\}, \mathcal{R}_2 = \{r_2, r_3\}$ with $\varphi(\mathcal{R}_1)< \varphi(\mathcal{R}_2)$. In this case, there is a path in the poset from $\mathcal{R}_1$ to $\mathcal{R}_2$ on which $\varphi$ is non-decreasing (this path goes `up' then `down' in Fig.~\ref{fig7}(b)). An interesting question might be to determine when this holds: in other words, from a sub-optimal RAF, can a more optimal RAF be reached by a chain of RAFs that, at each stage, either adds certain reactions or deletes one or more reactions, and so that the optimality score (as measured by $\varphi$) does not decrease? \subsection{Rates for `catalytic ensembles'} We can extend the results on rates in the previous section to accommodate the following feature: a reaction for which a combination of two or more catalysts is present may proceed at a rate that is higher than if just one catalyst is present. We formalize this as follows. Recall that in a CRS $\mathcal{Q} = (X, \mathcal{R}, C, F)$, the set $C$ represents the pattern of catalysis and is a subset of $X \times \mathcal{R}$. Thus $(x,r) \in C$ means that $x$ catalyses reaction $r$. Now suppose we wish to allow a combination (ensemble) of one or more molecules to act as a catalyst for a reaction. In this case, we can represent the CRS as a quadruple $\mathcal{Q} = (X, \mathcal{R}, \mathcal{C}, F)$ where $\mathcal{C} \subseteq (2^X-\emptyset) \times \mathcal{R}$ and where $(A,r) \in \mathcal{C}$ means that the ensemble of molecules in $A$ acts as a (collective) catalyst for $r$, provided they are all present. We refer to $\mathcal{Q}$ as a {\em generalised} CRS. The notions of RAF, subRAF, CAF, and so on, can be generalized naturally. For example, the RA condition for a subset $\mathcal{R}'$ is that for each reaction $r$, there is a pair $(A, r) \in \mathcal{C}$ where each of the molecule types in $A$ is in the closure of $F$ relative to $\mathcal{R}'$. Note that an ordinary CRS can be viewed as a special case of a generalised CRS by identifying $(x,r)$ with the pair $(\{x\}, r)$. Note also that each reaction may have several ensembles of possible catalysts, and some (or all of these) may be just single molecule types. Given a generalised CRS $\mathcal{Q} = (X, \mathcal{R}, \mathcal{C}, F)$ we can associate an ordinary CRS $\mathcal{Q}' =(X', \mathcal{R}', C', F)$ to $\mathcal{Q}$ as follows. Let $$\mathcal{A}_\mathcal{C} := \{A \subseteq 2^X - \emptyset: \exists r \in \mathcal{R}: (A,r) \in \mathcal{C}\};$$ (so $\mathcal{A}_\mathcal{C}$ is the collection of catalyst ensembles in $\mathcal{Q}$). For each $A \in \mathcal{A}_C$, let $x_A$ be a new molecule type, and let $r_A$ be the (formal) reaction $A \rightarrow x_A$. Now let \begin{align*} X' := & X\mbox{ } \dot\cup \mbox{ } \{x_A: A \in \mathcal{A}_\mathcal{C}\}; \\ \mathcal{R}' := & \mathcal{R} \mbox{ } \dot\cup \mbox{ } \{r_A: A \in \mathcal{A}_\mathcal{C}\}; \mbox{ and }\\ C' := & \{(x_A, r): (A, r) \in \mathcal{C}\} \mbox{ } \dot\cup \mbox{ } \{(x_A, r_A): A \in \mathcal{A}_C\}. \end{align*} Note that $C' \subseteq X' \times \mathcal{R}'$. In other words, $\mathcal{Q}'$ is obtained from $\mathcal{Q}$ by replacing each catalytic ensemble $A$ by a new molecule type $x_A$ and adding in the reaction $r_A: A \rightarrow x_A$ catalysed by $x_A$. The proof of the following lemma is straightforward. \begin{lemma} \label{helps} A generalised CRS $\mathcal{Q}$ has a RAF if and only if the associated ordinary CRS $\mathcal{Q}'$ has a RAF that contains at least one reaction from $\mathcal{R}$. Moreover, in this case, the RAFs of $\mathcal{Q}$ correspond to the nonempty intersections of RAFs of $\mathcal{Q}'$ with $\mathcal{R}$. \end{lemma} Now suppose that we have a generalised CRS $\mathcal{Q} = (X, \mathcal{R}, \mathcal{C}, F)$ and a function $f: \mathcal{C} \rightarrow \mathbb{R}^{\geq 0}$. The interpretation here is that $f(A, r)$ describes the {\em rate} at which reaction $r$ proceeds when the catalyst ensemble $A$ is present. Given a RAF $\mathcal{R}'$ for $\mathcal{Q}$, let: $$\varphi(\mathcal{R}') :=\min_{r \in \mathcal{R}'} \{\max\{f(A,r): (A, r) \in \mathcal{C}, A \subseteq {\rm cl}_{\mathcal{R}'}(F)\}\}$$ In other words, $\varphi(\mathcal{R}')$ is the rate of the slowest reaction in the RAF $\mathcal{R}'$ under the most optimal choice of catalyst ensemble for each reaction in $\mathcal{R}'$ amongst catalyst ensembles that are subsets of ${\rm cl}_{\mathcal{R}'}(F)$. Lemma~\ref{helps} now provides the following corollary of Theorem~\ref{thm3}. \begin{cor} \label{cor} There is a polynomial-time algorithm to construct a RAF for $\mathcal{Q}$ with largest possible $\varphi$--value from any CRS $\mathcal{Q}$ that contains a RAF. Moreover, this constructed RAF is the maximal RAF for $\mathcal{Q}$ with this $\varphi$--value. \end{cor} \section{Concluding comments} In this paper, we have considered special types of RAFs that allow for exact yet tractable mathematical and algorithmic analysis, and which also incorporate additional biochemical realism (restricting the depth of uncatalysed reactions chains in generative RAFs and allowing reaction rates). We first considered the special setting of `elementary' systems in which all reactions (or at least those present in the maxRAF) have all their reactants present in the food set. This allows for the structure of the collection of RAFs, irrRAFs, and closed subRAFs to be explicitly described graph-theoretically. As a result, some problems that are computationally intractable in the general CRS setting turn out to be polynomial-time for an elementary CRS. For example, one can efficiently find the smallest RAFs in an elementary CRS, which is an NP-hard problem in general \cite{ste13}. Also, the number of minimal closed subRAF in an elementary CRS is linear in the size of the set of reactions (for a general CRS, they can be exponential in number). For future work, it may be of interest to determine if there are polynomial-time algorithms that can answer the following questions for an elementary CRS: (i) What is the size of the largest irrRAF? (ii) If inhibition is allowed, then is there a RAF that has no inhibition? The concept of an `elementary' CRS is an all-or-nothing notion. One way to extend the results above could be to define the notion of `level', whereby a CRS has level $k$ if the length of the longest path from the food set to any reaction product goes through at most $k$ reactions (an elementary CRS thus has level 1). We have not explored this further here but instead, we consider the related alternative notion of a generative RAF. Briefly, a generative RAF allows a RAF to form by effectively enlarging its `food set' with products of reactions, so that each step only requires catalysts that are either present or produced by reactions in the RAF at that stage. Although generative RAFs are more complex than elementary ones, their close connection to elementary RAFs (in a stratified way) allows for a more tractable analysis than for general RAFs. Moreover, unlike elementary RAFs, no special assumption is required on the underlying CRS; generative RAFs are just a special type of RAF that can be generated in a certain sequential fashion in any CRS. In the final section, we considered the impact of rates of RAFs (which need not be generative), and particularly the algorithmic question of finding a RAF that maximises the rates of its slowest reaction. Not only is this problem solvable in the size of the CRS, but it can also be extended to the slightly more general setting of allowing `catalytic ensembles'. The introduction of rates allows for the study of how a population of different closed subRAFs might evolve over time, in which primitive subRAF are replaced (out-competed) by efficient ones that rely on new catalysts in place of more primitive ones. We hope to explore this further in future work. \section*{Acknowledgments} WH thanks the {\em Institute for Advanced Study}, Amsterdam, for financial support in the form of a fellowship. \bibliographystyle{siamplain}
\section{Introduction} What is the meaning of the information sent from one system to another? Does a better understanding of this meaning help us to reduce the necessary effort to achieve semantic interoperability for today's IoT devices? Under the term “Internet of Things (IoT)”, several global synergistic trends are subsumed: There is a dramatic increase in the number of electronic devices, the interconnectivity of each device increases, the interactions with humans and the environment increase and the devices become more and more autonomous. In the past, the exponential growth of the internet was mainly due to semantically agnostic transport protocols like HTTP, FTP, SMTP, etc. The content was mainly processed by humans. Now, IoT puts a vigorous pressure on including also machines in the human interaction networks. Our contribution is a ''conceptual framework for understanding significant relationships among the entities of networking systems, based on a small number of unifying concepts'' \cite{OASIS2006_SOA_RM_1}. We present a reference model in this sense for the interaction semantics of networking systems. The ultimate goal of this paper is to bridge the gap between the world of physics, information and the human sphere of meaning. We would like to measure our model by its conceptual sparseness, its fit to other important models, its consistency and the practical usefulness of the derivable entities and their relations for software engineering of networking applications. \subsection{Preliminaries} Elements and functions are denoted by small letters, sets and relations by large letters, and mathematical structures by large calligraphic letters. The components of a structure may be denoted by the structure's symbol or, in case of enumerated structures, index as subscript. The subscript is dropped if it is clear to which structure a component belongs. Character sets are assumed to be enumerable if not stated otherwise. For any character set $A$, $A^\epsilon := A\cup\{\epsilon\}$ where $\epsilon$ is the empty character. If not stated otherwise, characters can be vectors. If $A = A_1 \times \dots \times A_n$ then $A^\epsilon = A_1^\epsilon \times \dots \times A_n^\epsilon$. The power set of $A$ is $\wp(A)$. \section{Other work}\label{s_other_work} The need for a better understanding of the problem of semantic interoperability can be read off the many current efforts to create reference models dealing with interoperability issues in the IoT space (e.g. \cite{DIN_SPEC_16593,DIN_SPEC_91345:2016-04,IICRefArch2017_V18}). This article touches many rather fundamental issues of informatics. We have the impression that there is a broad consensus about the definitions of physical state quantities, systems and information. However already the transition from the general system definition to more specific versions has created a plethora of different approaches, especially for reactive systems or processes. Petri nets were introduced \cite{Petri1962} to describe asynchronous information flow in analogy to physical flow determined by conservation laws. Although this basic assumption turned out to be false, Petri nets have been studied and extended in great detail (e.g. \cite{Ehrig2004}, for an overview). However, Petri nets play no role in our reference model. The attempt to describe business processes as so called ''event-driven process chains'' \cite{Keller1992} has been proven to be difficult to formalize \cite{vdAalst2002}. There have been many attempts to classify interactions by message exchange patterns (e.g. \cite{WSDL11,WSDL20Adjunct,SOAP12part1,DIN_SPEC_16593}), communicative acts (e.g. \cite{Poslad2007_Protocols,Paurobally2005_Framework}), or transaction patterns \cite{UMM2003UserGuide,RNIF20}. Typically, one- (e.g. notification) and two-way patterns (e.g. request-response) are specified. These approaches neglect the important role of the interaction context (see section \ref{s_semantics}). There are many algebraic approaches to describe processes which are based on named actions (for a recent overview, see \cite{BaetenBastenReniers2010_ProcessAlgebra}). All these calculi have in common, that their semantics is provided by transition systems where each transition label is interpreted as the name of the action causing the state change. An interaction becomes the simultaneous execution of equally named actions. As a result, an important difference to the presented approach with anonymous actions but named I/O-characters is the different support for describing composition behavior. As the names of the actions are arbitrary, they do not help to express the fact that some transitions may refer to the same action, but only from a different perspective/projection. Additionally, with named actions, the second --- internal --- coupling mechanism for protocol roles of the same system gets lost \cite{Reich2016_systems}. There are very interesting parallels between games and process interactions \cite{Graedel_Thomas_Wilke2002,vBenthem2002,Nisan2007,Reich2009}. As game theory is a mathematical theory of social interaction, any theory of interaction semantics should clarify its relation to game theory. As there are so many different approaches to describe systems in their different flavors, there are many different reference models with the aim to facilitate interoperability. Very influential had been the Open Systems Interconnection (OSI) basic reference model \cite{ISO_OSI_1994}. It already referred to interactions to qualify horizontal versus vertical component relations. But without a clear concept of interaction semantics it remained too simplistic. It is not a declarative issue which entities reside in which layer, but a semantic one. However, one could view our reference model as an advancement on the ideas of the OSI-model, supplemented by sound semantic concepts. Another prominent reference model had been the so called ''service oriented architecture (SOA)'' \cite{SchulteNatis1996,OASIS2006_SOA_RM_1}. However, at no place within SOA the service definition refers to its transformational behavior \cite{WSDL11,WSDL20}. Thus, from our point of view, the semantics of a ''SOA-service'' is not well defined. Additionally, the bipartition in service ''provider'' and ''consumer'' is inadequate to describe the interaction of networking systems in their different roles. The DIN SPEC 91345 Reference Architecture Model Industrie 4.0 (RAMI4.0) \cite{DIN_SPEC_91345:2016-04} demands that the architectural style of the industry 4.0 stack should be ''service-oriented''. Unfortunately, no layering criterion is provided for the proposed ''layers'' which are actually rather aspects. To clarify the distinction between the ''service'' and the ''protocol'' concept the DIN SPEC 16593 RM-SA \cite{DIN_SPEC_16593} was written. However, it suffers from the semantic vagueness of the SOA-model and its proposed conceptualization seems to be unnecessarily ad hoc. Currently, the concept of representational state transfer (REST) \cite{Fielding2000} is often positioned as a simpler variant of SOA. It can be viewed as the attempt to transfer the principles of the HTTP-protocol, stateless communication together with semantic agnostics, onto the interactions of networking applications. However, the proposed statelessness directly contradicts the core insight of our model of interaction semantics that loosely coupled interactions are stateful. And surely, language philosophy has a long tradition to reflect on the concept of meaning. In modern times, it was the late L. Wittgenstein who stressed the function of language as a tool for interaction. P. Grice \cite{Grice1989_Studies} emphasized the interactive character of meaning by noting that to understand an utterance is to understand what the utterer intended to convey - and that what has been traditionally understood as its ''meaning'' is only loosely related to that. Quite recently, K.M. Jaszczolt proposed that to understand the concept of meaning one has to investigate ''not the language system and its relation to context but principally the context of interaction itself, with all its means of conveying information'' (\cite{Jaszczolt2016_Meaning} pp.12-13). \section{Systems and information}\label{sectionSystemsInformation} \subsection{Signals and information} Our unified description of the things in the physical, the information and the human world is based on the system notion. The system notion rests on time dependent properties $s:T\rightarrow D$ mapping time $T$ onto some value domain $D$. This can be a position, a velocity, a current, etc. We take the informatics point of view \cite{Hartley1928,Shannon1948} if we disregard the concrete values of pressure or voltage as such, but take interest only in the values of these quantities as they can be distinguished. This comes at the cost that we have to name these distinguishable values somehow. But we gain the ability to talk about the ''something'' that can be transported between state quantities of different sorts and processed in a somewhat abstract, mathematical way: information. We use the term ''state quantity'' for the physical entities and the term ''signal'' for the same entities viewed through the informatics glasses. We call the value domain of a signal an ''alphabet'' and its elements ''characters''. \subsection{Simple systems} In line with current system theory (e.g. \cite{Lunze2006_Ereignisdiskrete,LeeVaraiya2011}) we speak of a system if the relation between signals can be described by a function $f$. It’s this signal mapping functionality that is system constitutive, allows for provable system borders, and thereby separates the world into an inside and an outside. It also gives us a defined composition behavior of systems to super systems. The structure of $T$, $D$ and $f$ allows to classify systems. The time domain $T$ can be discrete or continuous. $D$ can be finite, infinite or can allow only atomic elements versus sets, etc. $f$ can be computable, finite, analytic, allow for causality, etc. In the following we will assume a discrete time scale, signals representing only single values and a computable functionality with the special property that the mapping between the signals can be reduced to a mapping between signal values at two consecutive points in time. We thereby gain a simple time scale and causality. We usually will mean this mapping with the term ''system function''. \begin{definition} \label{def_system} A simple (discrete) system ${\cal{S}}$ is defined as ${\cal{S}} = (T, succ, Q, I, O, q,$ $ in, out, f)$, where $Q$ is a non-empty alphabet and $I$ and $O$ are possibly empty alphabets. The signals $(q, in, out):T\rightarrow Q \times I \times O$ are said to form a simple system for time step $(t, t'=succ(t))$ if they are aggregated by a partial function $f:Q \times I \rightarrow Q \times O$ with $f =(f^{int}, f^{ext})$ such that\footnote{This is in contrast to some approaches in the literature [e.g. \cite{Lunze2006_Ereignisdiskrete}, p. 94] where input and output signal relate to the same point in time, leading to substantial complexity dealing with sequential or even recursive system composition.} \[\left(q(t'),out(t')\right) = \left(f^{int}(q(t), i(t)), f^{ext}(q(t), i(t))\right)\,.\] \end{definition} Each system has its own time structure ${\mathcal T} = (T, succ)$ where $T$ is the enumerable set of all time values and $succ:T\rightarrow T$ is the successor function. For an infinite number of time values, $T$ can be identified with the set of natural numbers $\mathbb{N}$. In the finite case, $succ(t_{max})$ is undefined. The system function need not be a total function, as it only has to be defined for all possibly occurring combinations of $(q(t), i(t))$ and not all combinations. We can describe the behavior of such systems by simple I/O-transition systems (e.g \cite{Reich2016_systems,Alur2015_Principles}). \begin{definition} The I/O-transition system ${\cal A} = (I, O, Q, q_0, \Delta)_{\cal A}$ with $\Delta_{\cal A} \subseteq I \times O \times Q \times Q$ describes the behavior of the system ${\cal S}$ if $Q_{\cal S} \subseteq Q_{\cal A}$, $I_{\cal S} \subseteq I_{\cal A}$, $O_{\cal S} \subseteq O_{\cal A}$, $q_0 = q(0)$ and $\Delta_{\cal A}$ is the smallest possible set such that for each time pair $(t, t'=succ(t)) \in T_{\cal S} \times T_{\cal S}$, $(in(t), out(t'), q(t), q(t')) \in \Delta_{\cal A}$. \end{definition} The transition relation $\Delta_{\cal A}$ is the graph of the system function $f_{\cal S}$. We call the behavior of a system (or the system itself) that does not depend on any internal state, that is with $|Q_{\cal A}| = 1$, {\it stateless} and otherwise {\it stateful}. We call the application of a system’s function an {\it action}. An action is therefore the transition $(i,o,p,q)$ happening in the context of the deterministic transition relation $\Delta_{\mathcal A} \subseteq I_{\mathcal A}\times O_{\mathcal A}\times Q_{\mathcal A}\times Q_{\mathcal A}$ which defines the system function. An example for a simple system is an iterator which has an internal state holding the current number and whose system function reacts to a single input character with an increment of the internal state and a mapping of the internal state to the output state. \subsection{Processes or reactive systems} \label{ss_processes} The systems according to Def. \ref{def_system} transform their complete input and internal state into a new internal state and output in one step. However, reactive systems or processes get their input from more than one other system, and provide their output to multiple other systems. So, the difference between reactive systems and simple systems is not that they do not compute a function, as it is sometimes stated (e.g. \cite{HarelPnueli1985_Reactive}), but that they operate only on parts of their inputs and maps them only on parts of their outputs and are therefore capable to interact with multiple systems in an ongoing and nondeterministic way. To model reactive systems, we allow input and output signals to represent the empty value $\epsilon$, that is, $(q, in, out):T\rightarrow Q \times I^\epsilon \times O^\epsilon$. Second, we require the input signal to be at least two-dimensionally, whereby for each point in time there is exactly one non-empty component of the input signal. And third we require that a reactive system shows a nondeterministic behavior with respect to a single input component. The transition relation $\Delta_{\cal A}$ of a behavior defining transition system ${\cal A}$ of a reactive system ${\cal S}$ therefore relates to the extended input and output alphabets $\Delta_{\cal A} \subseteq I^\epsilon_{\cal A} \times O^\epsilon_{\cal A} \times Q_{\cal A} \times Q_{\cal A}$. According to our third requirement, its projection onto the $k$-th input component $\Delta^{(k)} \subseteq I_k^\epsilon \times O^\epsilon \times Q \times Q$ is not allowed to represent the graph of any function $g: I_k \times Q \rightarrow O \times Q$. \begin{definition} The I/O-transition system ${\cal A} = (I, O, Q, q_0, \Delta)_{\cal A}$ with $\Delta_{\cal A} \subseteq I^\epsilon_{\cal A} \times O^\epsilon_{\cal A} \times Q_{\cal A} \times Q_{\cal A}$ describes some of the behavior of the reactive system ${\cal S}$ if $Q_{\cal S} \subseteq Q_{\cal A}$, $I_{\cal S} \subseteq I_{\cal A}$, $O_{\cal S} \subseteq O_{\cal A}$, $q(0) = q_0$, there is a projection function\footnote{A projection function $\pi$ is defined by the property $\pi = \pi \circ \pi$.} $\pi = (\pi_Q, \pi_I, \pi_O): Q_{\cal S} \times I_{\cal S}^{\epsilon}\times O_{\cal S}^{\epsilon} \rightarrow Q_{\cal A} \times I_{\cal A}^{\epsilon}\times O_{\cal A}^{\epsilon}$, and $\Delta_{\cal A}$ is the smallest possible set such that for each time pair $(t, t'=succ(t)) \in T_{\cal S} \times T_{\cal S}$, $(\pi_Q(q(t)), \pi_Q(q(t')), \pi_I(in(t)), \pi_O(out(t'))) \in \Delta_{\cal A}$. \end{definition} $\Delta_{\cal A}$ is a projection of the graph of the system function $f_{\cal S}$. A direct consequence of the third requirement is the following proposition: \begin{proposition} A reactive system ${\cal S}$ behaves stateful. \end{proposition} \begin{proof} We have to show that we need $|Q_{\cal S}| \geq 2$ to describe the behavior of a reactive system. Let us assume that $|Q_{\cal S}| = 1$. Then there is a function $g :I^\epsilon_{\cal S} \rightarrow O_{\cal S}$ with $g(i) = f(i,q)$ for all $i\in I^\epsilon$ and $q\in Q$. And because the elements of $I$ equal $\epsilon$ in all but one component, $g$ can be partitioned into $g_1, \dots, g_n$ where $g_k:I_k \rightarrow O$ with $g(i) = g_k(i_k)$ for all $i\in I^\epsilon$, representing a deterministic behavior with respect to these components, invalidating our third requirement. \end{proof} Transitions that from an interaction perspective seem to occur completely spontaneously could be modeled by an internal tick signal. For reactive systems or processes the knowledge of the transition relation from an interaction perspective does not suffice to define a transition function, mapping elements on elements. In the context of such a nondeterministic transition relation we therefore name a transition an ''event''. \subsection{Interactions}\label{sectionActionEventInteraction} In the proposed model, systems interact by producing the value of the ''sender'' system’s output signal onto the ''receiver'' system’s input signal at defined times. Following \cite{BangemannDiedrichReich2016}, we call such a signal coupling a ''Shannon channel''. \begin{definition} Be $out = (out_1, \dots, out_m):T\rightarrow O$ and $in = (in_1, \dots, in_n):T\rightarrow I$ two signals and be $Idx \subseteq \{1, \dots m\} \times \{1, \dots n\}$ a set of index pairs such that for all $idx_1 = (k_1, l_1)$ and $idx_2 = (k_2, l_2)$ holds $k_1 = k_2 \leftrightarrow l_1 = l_2$. The components of $in$ and $out$ referenced by $Idx$ form a channel for $T$, if for all $t\in T$ and $(k,l)\in Idx$ holds $in_k(t) = out_l(t)$. \end{definition} In our further considerations we assume the idealized case, where the coupled input and output signal components are just identical. We then speak about an ''idealized Shannon channel''. In the framework of transition systems, an interaction requires us to declare two attuned transitions, where the output character of the ''sending'' transition equals the input character of the ''receiving'' transition. This external coupling mechanism formally relies on identical names for the ''exchanged'' values, mirroring the concept of the theory of information transport. Thereby a product automaton is created whose transition relation is restricted by the information exchange mechanism, as is described in detail in \cite{Reich2016_systems}. System interaction may lead to super system formation in case a super ordinated system function becomes identifiable. This always happens if two actions are coupled in this way but not necessarily for two coupled events. Based on the composition structure of computable functionality \cite{Kleene1936}, we distinguish the following cases of system composition \cite{Reich2016_systems}: sequential and parallel system composition, loop composition and while composition. Please note, that this understanding implies that it does not make sense to speak about interactions between systems and their eventual subsystems. Interestingly, for simple systems, the coupling idealized Shannon channels disappear in the description of the resulting super systems, while for reactive systems these idealized Shannon channels are essential for their description. \section{Semantics }\label{s_semantics} The focus on distinguishability created information that could be transported between systems. Thus, we can say that the theory of information aims at system interactions. But not everything that is distinguishable is of the same significance for the interaction. Actually, the ancient Greek word {\selectlanguage{greek} σημαντικός} (semantikos) meant ''significant''. In our opinion, a theory of interaction semantics must at least account for \begin{enumerate} \item consistency with the model of information and its transport, \item a concept of significance, \item a concept of equal meaning of two different characters based on Leibniz substitution principle, \item the definition and role of 'context', \item the definition and role of 'interpretation', \end{enumerate} The requirement to remain consistent with the theory of information entails at least two consequences. First, the semantics of exchanged characters must be invariant against renaming. That is, the character names themselves do not carry any semantics beyond their distinguishability. Second, as all that is transported is information, meaning cannot be transported. Instead, we propose a theory of local semantics where meaning is attributed to a signal value as a character by processing, that is by its transformation in a given context. We approach the definition of the meaning of a character by applying Leibniz substitution principle. What has to be the case that we can substitute one character for another one in an interaction? \begin{definition} \label{def_meaning_of_charcter} The {\it meaning} of the input character $i\in I_{\mathcal A}$ at $p$ within the behavior description ${\mathcal A}$ is the result set of the indexed function $mng_p: I_{\mathcal A} \rightarrow \wp(O_{\mathcal A}^{\epsilon} \times Q_{\mathcal A})$ with $mng_p(i) = \{(o,q)|(i,o,p,q) \in \Delta\}$. We also write $({\mathcal A}, p) \models i$. Two characters have the same meaning $i \sim_p i'$ for a given receiver state $p$ if $mng_p(i) = mng_p(i')$. To interpret an incoming character $i$ means to calculate one element of $mng_p(i)$. The size of $mng_p(i)$ is the {\it scope for interpretation}. We call $\Delta$ the context of interpretation. \end{definition} Then the following substitution proposition becomes trivial. \begin{proposition} Within an interaction step, a sender ${\cal S}$ can substitute a character $i$ by a character $i'$ if $i \sim_p i'$ holds for the current state $p$ of the receiver ${\cal R}$. It can be substituted in the complete interaction off $i \sim_p i$ holds for every $p\in Q_{\cal R}$. \end{proposition} Def. \ref{def_meaning_of_charcter} could naturally be extended to the $\epsilon$-closure, that is, all pairs $(o,q)$ that can be produced without any new input character. Please note, that with this definition, we only define the meaning of the incoming characters. The resulting output characters become meaningful only for some other receiving system, for example in a protocol. \subsection{Compositionality} The semantics of formal languages is usually strictly compositional, as the meaning of the composite-entities can be deduced entirely from the meaning of the parts down to some predefined semantic ''atoms''. In the interaction semantics this is only the case within a given transition relation, the interpretation context. We define the meaning of two consecutive characters $i_1.i_2$ as $mng_p(i_1.i_2) = \{(o_1.o_2,q_2)| (i_1,o_1,p,q_1) \in \Delta \, \mbox{and}\, (i_2,o_2,q_1,q_2) \in \Delta\}$ To determine the meaning of the character concatenation $mng_p(i_1.i_2)$ from the meaning of the parts, that is from $mng_p(i_1)$ and $mng_{q_1}(i_2)$, the operator must contain the knowledge that equal names of the state values in $mng_p(i_1)$ and the index state value $q_1$ of $mng_{q_1}(i_2)$ refer to identical state values --- which is part of convention underlying the description of the transition relation. So we have the following proposition: \begin{proposition} The meaning of received single characters as well as the composed meaning of concatenated characters depends on the context of interpretation. \end{proposition} So, from a semantic point of view, any change in context becomes interesting. This is the case if we change our perspective, that is our projection under which we look at a system, either by looking from a different perspective, or by looking at it in its entirety. The meaning of flipping a switch is definitively different if it relates only to a flashing red light or, in addition, to some detonating explosive. An interesting aspect of this definition of compositional meaning is that completely different character sequences might have identical meanings, that is, result in the same output character sequences and final state. \subsection{Significance: equivalence partition of the transition relation} We propose to capture the concept of significance with the model of equivalence class construction. Actually, the condition of having equal meaning already creates an equivalence partition. So, the concept of meaning imposes a compatibility condition on any additional equivalence relation. \begin{definition} An equivalence partition $\{\Delta_l\}$ of $\Delta_{\mathcal A}$ is compatible with the meaning of the input characters, if for all $i, i' \in I$ with $(i, o, p, q) \in \Delta_k$ and $i \sim_p i'$ also $(i', o, p, q)\in \Delta_k holds$. \end{definition} We show the consequences with two examples. \subsubsection{Example: equivalence partition for deterministic transition relations} In case of deterministic transition relations, we say that the meaning of the input characters is unambiguously determined as the scope for interpretation is one. Any equivalence partition of a deterministic I/O-transition relation results in disjoint deterministic I/O-subrelations, each defining a transition function $\delta_l:Dom_l \rightarrow Codom_l$ with $Dom_l\subseteq I\times Q$, $Codom_l \subseteq O\times Q$ and $(o,q) = \delta_l(i,p)$. Combining the external part of these equations with data typing we arrive at the current object oriented way of describing state transitions of ''objects'' (or abstract data types) whose syntax is in many object oriented programming languages more or less outputParameters = objectName.method(inputParameters). Partitioning the internal state into a mode component that signals a certain class of behavior and a rest component that parameterizes this behavior $Q = Q_{mode} \times Q_{rest}$, results in a partitioned transition function: $(o,q) = \delta_l(i,p) = \delta_l(i,p_{mode}, p_{rest}) = {\delta_l}_{p_{mode}}(i, p_{rest})$. Such a partition is called ''state pattern'' in the object oriented community \cite{Gamma1995}. It can be used for generic bottom-up events in a leveled architecture. See Fig. \ref{fig_simple_tank_model} for an example. \begin{figure}[!t] \centering \includegraphics[width=3.5in]{fig/simple_tank_model.png} \caption{This Fig. shows the equivalence classes of a simple tank model with the partly redundant state $\{empty, filled, full\} \times \{0, \dots, max\}$ and the two function $\delta_1 = fill$ and $\delta_2 = take$. $fill$ adds $dx$ to $x$ until $x=max$ and $take$ takes $dx$ away until $x=0$. $dx$ in the context $fill$ means that some content is added, while $dx$ in the context of $take$ means that some content is taken away. } \label{fig_simple_tank_model} \end{figure} \begin{proposition} Input characters with the same meaning deliver the same results in the sub-functions defined by some meaning compatible equivalence relation on a deterministic $\Delta_{\mathcal A}$ \end{proposition} \begin{proof}Be $t, t' \in \Delta_{\mathcal A}$ with $t \sim t'$ and $\sim$ is compatible with $\sim_p$. Then there is a subrelation $\Delta_k$ defining the function $\delta_k$ with $t, t' \in \Delta_k$. From $i \sim_p i'$ it follows that, in addition to $(i,p)$ and $(i',p')$, $(i', p)$ must also be in the domain of $\delta_k$ and $(i',o,p,q) \in \Delta_l$ such that $\delta_k(i,p) = \delta_k(i',p)$. \end{proof} \subsubsection{Exceptions:} If, for whatever reason, we want to stick to our deterministic point of view even in case of a nondeterministic transition relation, we can partition this relation into a deterministic part, signifying the desired transition function and an exceptional part, signifying the undesired rest. \subsubsection{Example: Nondeterministic transition relations \label{sss_nondeterministic_transition_relation}} A natural partition of a nondeterministic transition relation leads to what \cite{Reich2016_systems} called ''Extended I/O-automaton''. We create the partition function $part:I^\epsilon \times O^\epsilon \times Q\times Q \rightarrow \mathbb{N}$ with the following assumptions: \begin{enumerate} \item For all I/O-characters $a\in I\cup O$ there exists an invertible parse-function $parse:I\cup O \rightarrow DocCls \times Prm$, with $(docCls, prm) = parse (a)$ which attributes to each character $a$ a document class $docCls$ and values of additional parameters $prm$. Thus we can interpret differently parameterized documents of a document classes as different characters of an I/O-alphabet (or characters as parameterized documents of a document class). \item The internal state value is partitioned in a mode and rest part $Q = Q_{mode} \times Q_{rest}$. \item There is a set of conditions operating on the internal rest state and the parameters of the incoming documents $Cond:Q_{rest} \times Prm \rightarrow \{true, false\}$. \end{enumerate} Leaving $prm_o$ unconsidered, we can construct a partition function $part$ as \[ part(i,o,p,q) = part(docCls_i, docCls_o, p_{mode}, q_{mode}, cond). \] Thereby we can write for each equivalence class: \begin{equation} \label{eq_partition} \Delta_l = p_{mode}\stackrel{docCls_i, cond/docCls_o}{\xrightarrow{\hspace*{4cm}}} q_{mode} \end{equation} Clearly the following proposition holds. \begin{proposition} Every nondeterministic system interaction based on the system model of section \ref{ss_processes} can be modeled according to the schema of Eq. \ref{eq_partition}. \end{proposition} The semantic compatibility condition demands that characters with equal meaning must belong to the same class of input documents, or formally \begin{proposition} $i \sim_p i' \rightarrow DocCls(i) = DocCls(i')$ \end{proposition} \section{Classes of interfaces} We follow the definition of an interface as the shared boundary across which two separate systems exchange information. Interfaces in this sense can be technically classified according to the direction of the flow of information: unidirectional and bidirectional. And, we can classify them according to properties of the sender’s and receiver’s transformational behavior that are of direct relevance for their syntactical representation in modern programming languages. Namely along the 3 dimensions determinism and statefulness of the receiver and synchronicity of the sender \cite{Reich2015_kvsi}. In bidirectional interactions we distinguish two main interaction classes: \noindent {\bf Symmetric:} the participants behave according to the same criteria if they are in the sender and receiver role, respectively. The most relevant combination is “mutual hinting” where all interaction parties behave nondeterministically and statefully as receiver and asynchronously as sender. \noindent {\bf Asymmetric:} the factors attributed to the systems as sender or receiver are different. The most relevant combination is “use + observation”: A user behaves synchronously as sender and nondeterministically as receiver and the used system behaves deterministically as receiver. \subsection{Classes of unidirectional Interfaces} As backward communication is irrelevant for unidirectional interfaces, we can disregard any synchronicity. \noindent {\bf Pipes} just couple the output of a simple system to the input of another simple system. Thereby pipes provide the means for sequential and parallel system coupling in the sense of \cite{Reich2016_systems}. To be complete, a pipe mechanism must be able to fork and join pipes. \noindent {\bf Observation} denotes an information flow from an (observed) system to an (observer) system where the sender system makes no assumptions at all on the determinism and statefulness of the receiver system. \subsection{Classes of bidirectional interfaces} It is very important to note that in bidirectional interactions the semantic symmetry or asymmetry between the interaction partners is much more important than the flow of information. Or, to put it differently, the flow of information as such does not determine the semantic direction of the interaction relation!\\ \noindent {\bf Operations} are directed interfaces, representing asymmetric interactions. In this case the transition relation represents a (partial) function and we can write as usual: $(o,q) = f_p(i)$. Within a traditional instruction based program, after successful computation of an operation, the control flow picks the next operation in the program. From a compositional perspective a call of an operation results in a trivial recursive loop system with one iteration step in the sense of \cite{Reich2016_systems}. Thus, operations semantically represent mathematical functions with a special composition behavior, still providing the freedom to choose the implemented algorithm but no ''loose coupling'' in the sense as protocols do. Due to their asymmetric interaction character, operations provide a natural mean to express hierarchical component relations. Objects in the object oriented sense with operations encapsulating data are simple systems in the sense of definition \ref{def_system}. This encapsulation determines the meaning of the input data completely and therefore represents a very strong semantic determination. \noindent {\bf Operations with exceptions} are created if we partition an actually nondeterministic transition relation into a deterministic and a rest part. Most modern programming languages provide syntactical means for handling desired – deterministic – versus exceptional – nondeterministic – behavior, for example by try-catch-clauses where the deterministic part is described as an operation and the exceptional behavior as an event mechanism, modifying the control flow of the calling component. \noindent {\bf Remote operations} take advantage of the fact that the functions of serialization and deserialization of data, transport, data processing and waiting can be concatenated into one function which can then be represented by a ''remote'' operation. An important difference between remote and local operations is the nondeterminism introduced by the imponderables of the data transport, requiring additional so called ''remote exceptions'', for example for time outs.\\ \noindent {\bf Protocols} arise if reactive systems interact without supersystem creation. According to Holzmann \cite{Holzmann1991}, Scantlebury and Bartlett \cite{Scantlebury1967} introduced this term in 1967. To represent the concept of a ''successful'' cooperation, it is necessary to refer to additional acceptance rules based on an acceptance component added to the I/O-transition system, creating traditional Mealy automata or transducers in case all sets are finite. We call such an automaton a {\it role} of a reactive system or process. Protocols therefore can be described by product automata where the interacting roles are coupled by Shannon channels \cite{Reich2011}. Protocols have to fulfill certain conditions: They have to be well formed in the sense that there are no open channels and all sent characters are processed. This can be expressed with relation to the meaning of all sent characters: \begin{proposition} A protocol is well formed if the meaning of all sent characters of all involved roles is well defined. \end{proposition} Protocols also have to be consistent in the sense that for each reachable protocol state the protocol acceptance condition must hold, that is, deadlocks, livelocks and starvation have to be avoided. See Fig. \ref{fig_trains} for an example. \begin{figure}[!t] \centering \includegraphics[width=6cm]{fig/trains_v01.png} \includegraphics[width=6cm]{fig/trains_state_chart_protocol_v01.png} \caption{Illustration of the single-lane railway bridge problem and the protocol definition between either train and a central controller (taken from \cite{Alur2015_Principles}). Both, train and controller have the state values $Q=\{away, wait, bridge\}$. The train's input alphabet $I_{train} = \{go\}$ is the controller's output alphabet and the train's output alphabet $O_{train} = \{arrived, left\}$ is the controller's input alphabet. It's the controller's task to coordinate both trains such that at most one train will enter the bridge at a given time. } \label{fig_trains} \end{figure} Protocols are very much like games \cite{Reich2009}. While protocols focus solely on the interactions, within a game, the actions of the players are determined by their decisions. The relation between protocol and games can be used to refine the decision notion. Combining both approaches, we could for example say that an order puts the seller into the position to decide about entering into a delivery contract. The order together with a positive decision results in an order confirmation. Both characters together mean that the seller incurs the commitment to deliver the good. To sensibly speak about a decision, the interaction has to leave room for interpretation, it has to be nondeterministic. It doesn't make sense to speak of decisions of a system that just provides a deterministic mapping, that is, a function within an interaction. A protocol is best understood as a signaling game in the sense of P. Grice \cite{Grice1989_Studies} where all participants give each other mutual hints and rely on the fact that they will be appropriately understood. As P. Grice pointed out we can distinguish between an assumed semantics of the sender and the actual semantics of the receiver. As both relate to the processing of the receiver, they can be easily compared: we name an unintended mismatch a misconception or a misunderstanding, depending on whether the sender or the receiver made the fault. And we name an intentionally precipitated mismatch a deception. Describing protocol based interactions with an imperative programming language, we usually refrain from explicitly describing what the receiver does by typed operations in the sender's program. If we did, we would actually have to use operations which map values to sets of values which leads to exponential complexity with the number of possible alternatives in each interaction step. Instead we only use transport functionality whose semantic guarantees do not specify the processing context for the transported information. Due to our lack of attributing any action to the sent information, we intuitively name these documents not with verbs, but with nouns: request, confirmation, order, etc. \section{Components} Components are supposed to be building blocks which easily fit together (e.g. \cite{HeinemanCouncill2001,Szyperski2002}). For the construction of computational systems this implies: \begin{enumerate} \item A component must combine the characteristics of its I/O relation and its composition behavior in a sensible way. Two components might comprise the same functionality but may differ in their composition behavior like operations and pipes. \item Recursive interactions in a general loop or while sense, creating complex recursive functionality, do not follow any simple composition scheme and should be avoided on the level of components. Components thereby mark a systematic border of complexity, where any functionality that is created by general recursion moves into the component’s innards. Allowed is sequential and parallel composition as well as the trivial one-step loop composition of an operation call. \end{enumerate} Thus, components should sensibly be classified according to both: their classes of interfaces and their composition behavior. \section{Software layers} Although the layer notion is very important in software engineering, as is demonstrated by the impact of the OSI-model \cite{ISO_OSI_1994}, we are not aware of any attempt to deduce this notion from a system interaction model. We think that a statement ''component ${\mathcal A}$ resides in software layer $n$'' has to be provable and that the interaction semantics show us the right direction. First we note that the system-subsystem relation is not appropriate for comprising the layer semantics of software applications as there simply is no interaction between a system and its subsystems. Second we note, that unidirectional interactions, although defining an interaction direction, make any classification into ''horizontal'' versus ''vertical'' an arbitrary convention. It are the bidirectional system interactions with their semantic symmetry or asymmetry which enable the very important distinction between ''horizontal'' and ''vertical''– or ''directed'' versus ''undirected''. \subsection{Hierarchical interactions: use and observation} The most important asymmetric interaction contains two different components. The top-down component is deterministic and synchronous and is represented by operations, that is, traditional API-calls. The bottom-up component is characterized by an event semantic, enabling the semantically superior entities to observe the behavior of the semantically subordinated entities. The very important consequence is that a traditional API-call (no matter of whether local or remote) then becomes a formal indicator for stepping into a lower semantic layer. Without a bottom-up event mechanism, explicit API-calls become necessary to signal state changes ''upwards'', and the significance of API-calls as a formal indicator for layering gets lost. \subsection{Non-hierarchical interactions: mutual hinting by protocols} In the symmetric case, the interaction parties behave identical with respect to their determinism, statefulness and synchrony, resulting in eight theoretical possible combinations. But, only one combination really makes sense. All parties acting deterministically is only possible with an additional clock-tick. And even then, this results in complex recursive functionality which we would like to avoid on a component level. We have already proven that reactive systems behave statefully. And the general requirement to behave synchronously as sender is in conflict with the general ability of nondeterministically acting partners to transit spontaneously. So, in symmetric interactions all interaction parties usually behave nondeterministically and statefully as receiver and asynchronously as sender. Interestingly, in this sense the so called ''three-tier-architecture'' separating presentation-, logic- , and persistence management is not a layered architecture, if the interaction between them is designed as protocols. Instead it is a partition of a complex task into three equally important complementary reactive components interacting on eye level. \section{Conclusion }\label{s_conclusion} We proposed a reference model for the interaction semantics of networking systems. It uses very little ad hoc assumptions and fits nicely to the model of systems that is consensus in system theory, to the model of information, to the theory of reactive systems and to the protocol model. Also, the kinship to game theory is obvious. We propose a local model of semantics with the key understanding that semantics is not somehow transported but is attributed by processing within a given context. Semantic interoperability means that the processing of the information that the systems exchange has to be aligned according to a superordinate context of interaction. Our reference model is also expressive as with its classification of interactions based on semantic criteria, it paves the way towards an ''interaction oriented architecture'' of applications, with provable software layers and process-level roles. The challenge, such an interaction oriented architecture should take up is the fact that seemingly small changes in a process' interactions may result in major changes of the composition structure of its system function. The resulting high efforts to change affected nodes currently seems to hinder the scaling of our system design with the size of the interaction networks. We think that one approach to this challenge will be not to formulate the process semantic top layer as an executable operation but to view it as a coordination problem, where a process is a coordination of its different roles. Then, we might achieve a reuse of role implementations with conservation of all role-based guarantees and thereby become more robust in our process implementations against changes in the interactions. It seems to us that the coordination could become an equally important area of informatics as computability. As an outlook we think that it will be very interesting to study coordination problems where the coordination conditions by themselves do not result in determinism but still leave some degree of freedom usable for other, more qualitative optimizations by some game theoretic mechanisms. \bibliographystyle{splncs}
\section{Introduction} Non-orthogonal multiple access (NOMA) has been widely recognized as a promising multiple access technology to enable efficient utilization of spectrum resources in 5G wireless networks \cite{Al-Imari_Imran_2017,Octavia_JSAC2017,LDai_CM2015,Ioannis_SPL2015,Octavia_CST2017,QYang_JSAC2017}. The key idea of NOMA is to encourage spectrum sharing among multiple users within one resource block by exploiting power domain multiplexing, fundamentally differing from conventional orthogonal multiple access (OMA) technologies (which rely on time/frequency/space domain multiplexing). More recently, NOMA has been incorporated in various standardizations, for example, multi-user superposition transmission (MUST) in 3rd-generation partnership project long-term evolution (3GPP-LTE) and layered division multiplexing (LDM) in digital TV standard ATSC 3.0 \cite{Ding_JSAC2017}. It has also been known that more efficient use of wireless spectrum can be achieved by cognitive radio (CR), where secondary users (SUs) intelligently adapt their operating parameters to access a spectrum band occupied by primary users (PUs), in an opportunistic or collaborative manner \cite{Octavia_CST2016,Goldsmith_PROC2009}. To date, exploiting CR technology to support emerging applications has received considerable attention, where novel architectures for CR networks based on full-duplex, device-to-device, and multiple-input multiple-output (MIMO) have been studied to further increase spectrum efficiency. More particularly, existing research on the combination of NOMA and CR (i.e., \cite{Lu_TVT,YLiu_TVT2016,Ding_TVT2016,WLiang_TCOM2017,Lu_TCOM}) has shown the possibility to meet 5G requirements of high throughput, massive connectivity, as well as low latency. Despite these potential benefits, building efficient cognitive NOMA is a challenging issue in practice. This is because both NOMA and CR are interference-limited, and thus, coexistence of inter-network interference between the primary and secondary networks and intra-network interference (also called co-channel interference) caused by power domain multiplexing of NOMA undoubtedly results in severe performance degradation of reception reliability. Therefore, it is necessary to combine NOMA with CR in an appropriate manner for minimizing the interference and better utilizing the underlying spectrum resource. In this article, we integrate NOMA capabilities into CR concepts to achieve more intelligent spectrum sharing. We begin our attempt with a concise introduction of NOMA and CR paradigms, along with motivations of cognitive NOMA as well as cooperative strategies to further improve performance. Then we provide an in-depth overview of three cognitive NOMA architectures, namely underlay NOMA networks, overlay NOMA networks, and CR-inspired NOMA networks (termed CR-NOMA networks), and discuss their key operating principles. Note that both NOMA and CR are interference-limited, which might undermine reception reliability. To address this challenging issue, for each cognitive NOMA architecture, we propose a cooperative relaying strategy for reliability enhancement. Since studies of cognitive NOMA networks are still in a nascent stage, several potential challenges in this research field are also outlined, many of which are promising avenues for future works. Finally, we make concluding remarks to this article. \section{Rationales of Cognitive NOMA Networks} This section first introduces basics of NOMA and CR. Then the motivations of cognitive NOMA networks and cooperative strategies are discussed. \subsection{Understanding NOMA and CR} \subsubsection{NOMA Principles} The main idea of NOMA is to exploit power domain multiplexing at transmitter(s) for signal combination, and successive interference cancellation (SIC) at receiver(s) for signal detection. NOMA can be realized in downlink or uplink as follows. \begin{itemize} \item {\it Downlink NOMA}: An example of downlink NOMA transmission is shown in the left-hand side of Fig.~\ref{NOMA-basic}. Upon NOMA signaling, a base station (BS) broadcasts a signal mixture $(a_1s_1+a_2s_2)$ to user $U_1$ (who has a strong channel condition, referred to as {\it the strong user}) and $U_2$ (who has a weak channel condition, referred to as {\it the weak user}), where $s_1$ and $s_2$ are signals intended for the two users, and $a_1$ and $a_2$ are the corresponding power allocation coefficients with $a_1^2+a_2^2=1$ and $a_1<a_2$. At $U_1$, SIC is carried out to remove $s_2$ and then recover its own $s_1$. At $U_2$, its signal $s_2$ is decoded directly by treating $s_1$ as interference. Consequently, the weak user ($U_2$) suffers interference from the other user, and the strong user ($U_1$) enjoys interference-free transmission. \item {\it Uplink NOMA}: In uplink NOMA transmission shown in the right-hand side of Fig.~\ref{NOMA-basic}, usually a control message containing information of power allocation should be sent by the BS at the initial stage \cite{Ding_JSAC2017}. Then $U_1$ (with a strong channel condition, referred to as {\it the strong user}) and $U_2$ (with a weak channel condition, referred to as {\it the weak user}) transmit desired signals $s_1$ and $s_2$ to the BS using different power levels $a_1$ and $a_2$, respectively. On receiving these signals, SIC is carried out at the BS, and an optimal detection ordering would be to decode starting from the stronger signal first and moving towards the weaker signal. It is preferable to have distinct received power strength for SIC processing, and thus, we choose $a_1>a_2$ in uplink NOMA so that the BS first decodes $s_1$ and then cancels it to recover $s_2$. Therefore, the weak user ($U_2$) enjoys interference-free transmission while the strong user ($U_1$) observes interference. \end{itemize} \begin{figure}[t] \centering \includegraphics[width=0.8\textwidth]{COMMAG-17-00687-fig1.eps} \caption{An illustration of NOMA systems. Left: downlink NOMA signaling; right: uplink NOMA signaling.}\vspace{-2mm}\label{NOMA-basic} \end{figure} \subsubsection{CR Paradigms} A major objective of CR is to realize dynamic spectrum access/sharing by learning its surrounding environments and adapting its operating parameters. Currently, there exist three CR paradigms \cite{Goldsmith_PROC2009} \begin{itemize} \item {\it Interweave}: A SU can transmit only when no PU occupies the licensed spectrum. \item {\it Underlay}: Concurrent primary and secondary transmissions are allowed, under the condition that the interference on the primary network is below a controllable level. \item {\it Overlay}: A SU provides relaying services to the primary network, and at the same time, transmits its own signal. \end{itemize} \subsection{What Drives Cognitive NOMA Networks?} Both NOMA and CR target efficient spectrum utilization. They enhance spectrum efficiency from different perspectives. CR helps low-priority secondary access in an opportunistic manner (i.e., in an interweave or an underlay mode when secondary access does not affect much the primary network) or in a collaborative manner (i.e., in an overlay mode). NOMA enables multiple users to transmit simultaneously by differentiating their power levels. Thus, cognitive NOMA expects to provide more intelligent spectrum sharing, by combining the CR spectrum sharing and NOMA spectrum sharing in a constructive way to further improve the spectrum utilization. Benefits resulted from the intelligent spectrum sharing of cognitive NOMA are listed below. \begin{itemize} \item {\it Improved spectrum efficiency}: Cognitive NOMA networks can make PUs and SUs active simultaneously with acceptable reception quality. Thus, spectrum utilization efficiency is largely improved. \item {\it Massive connectivity}: 5G wireless networks are envisioned to support a massive number of smart devices, such as augmented reality (AR), virtual reality (VR), on-line health care, and Internet of things (IoTs). This demand can be fulfilled by cognitive NOMA networks, where multiple PUs and/or SUs can be served simultaneously in one resource block with different power levels \cite{YLiu_TVT2016}. \item {\it Low latency}: Transmission delay of SUs can be reduced in cognitive NOMA networks, yielding low latency performance. For example, by leveraging NOMA to underlay CR networks, multiple SUs can be connected simultaneously, fundamentally differing from the OMA scenario in which only one SU can transmit when a resource block becomes available, thus potentially reducing the transmission delay for secondary access \cite{Ding_JSAC2017}. \item {\it Better fairness}: Cognitive NOMA networks can guarantee improved user fairness. For instance, SUs in an underlay NOMA network have an equal chance to utilize the licensed spectrum, and a SU with a weak channel condition is allocated with more power to achieve a high data rate requirement \cite{YLiu_TVT2016}. This yields a balanced tradeoff between fairness and throughput in the secondary network. \end{itemize} Despite many benefits shown above, there is still room to further improve performance of cognitive NOMA. Due to the coexistence of inter- and intra-network interference in cognitive NOMA networks, as well as possible poor channel conditions of transmission links because of severe path loss and/or deep fading, outage performance in cognitive NOMA networks may be degraded considerably. To tackle this challenge, we further propose to use cooperative relaying in cognitive NOMA networks, which shows a great potential to improve reception reliability. \section{Cognitive NOMA Architectures and Cooperative Relaying Strategies} In this section, we elaborate on existing cognitive NOMA architectures, including underlay NOMA networks, overlay NOMA networks, and CR-NOMA networks. We also show how cooperative relaying can help improve reception quality in each cognitive NOMA architecture. \subsection{Underlay NOMA Networks} An example of underlay NOMA networks is depicted in the left-hand side of Fig.~\ref{underlay-NOMA}, where a secondary transmitter (ST) serves multiple secondary receivers (SRs) directly by NOMA signaling, given that the interference inflicted at the primary receiver (PR) is controllable. Compared with underlay OMA networks, more efficient spectrum utilization can be achieved. This is due to the fact that, by employing NOMA in a secondary network, more SRs can simultaneously receive individual signals in the same shared spectrum, which improves connectivity of SRs and achieves high throughput for secondary access. On the other hand, in underlay OMA networks, only one SR is allowed for transmission and other SRs should wait until the current transmission is completed (i.e., the SRs utilize the spectrum in a sequential manner). \begin{figure}[t] \centering \includegraphics[width=0.8\textwidth]{COMMAG-17-00687-fig2.eps}\vspace{-3mm} \caption{Underlay NOMA architectures. Left: non-cooperative underlay NOMA network; right: cooperative underlay NOMA network.}\vspace{-3mm}\label{underlay-NOMA} \end{figure} Compared with traditional NOMA networks, underlay NOMA networks face challenges of more strict interference management, as follows. \begin{itemize} \item NOMA assisted SRs suffer not only intra-network interference within the secondary network, but also inter-network interference generated from primary transmitters (PTs). Therefore, signal detection at NOMA assisted SRs is largely affected in presence of strong interference. In this regard, an interference guard zone aided scheme in underlay NOMA has been proposed to improve reception reliability \cite{YLiu_TVT2016}. More specifically, each NOMA assisted SR is protected by a circle with a radius of $d_0$ (called a guard zone, as shown in Fig.~\ref{underlay-NOMA}), and in the circle there is no PT. It has been shown that acceptable outage performance is achieved for secondary transmissions, and full diversity order is obtained at each NOMA assisted SR. \item As a distinct feature of the underlay CR paradigm, transmissions of the primary network should not be interfered with when allowing secondary access. This means that power control at STs is critical to underlay NOMA networks, in the sense that the inter-network interference at a PR should be lower than a preset threshold. Moreover, power allocation at STs also needs to ensure that the intra-network interference among NOMA assisted SRs is carefully regulated, such that diverse quality-of-service (QoS) requirements of SRs can be strictly satisfied. \end{itemize} Traditional underlay CR is often limited to short-range communications, due to restricted transmit power levels at STs \cite{Octavia_CST2016}. In underlay NOMA, radio coverage of a secondary network is more strictly bounded, due to coexistence of inter- and intra-network interference. Note also that it is not always possible to find an appropriate interference guard zone for each SR, since the distance from PTs to SRs may be short in practical CR scenarios and such a guard zone may not exist. To address these challenges, we propose a cooperative underlay NOMA architecture by enlisting the help of a relay, to provide radio coverage extension and outage minimization for underlay NOMA networks. The proposed cooperative underlay NOMA network is depicted in the right-hand side of Fig.~\ref{underlay-NOMA}, where multiple NOMA assisted SRs are connected with a ST via an amplify-and-forward (AF) relay $R$. In this scenario, $R$ amplifies power superimposed signals sent by the ST using an amplifying coefficient. Thereby, the achievable signal-to-interference-plus-noise ratios (SINRs) at NOMA assisted SRs can be increased significantly, which is beneficial for SIC processing. In turn, radio coverage of the secondary network can be potentially extended without degrading its outage performance. Furthermore, the transmit power of the ST and $R$ can be lowered thanks to the small path-loss by cooperative relaying, which better ensures the interference constraint at the PR. Secondary outage performance of the cooperative/non-cooperative underlay NOMA architectures are shown in Fig.~\ref{sim-overlay}, in which NOMA user grouping includes all SRs (note that other grouping methods \cite{Ding_TVT2016} can also be used). It is clear that the proposed cooperative NOMA architecture can significantly improve secondary outage performance. It can also be seen that, for a specific outage probability, the cooperative NOMA needs smaller signal-to-noise ratio (SNR), which also means less transmit power and less energy consumption, than its non-cooperative counterpart. \subsection{Overlay NOMA Networks} An illustration of overlay NOMA networks is depicted in the left-hand side of Fig.~\ref{overlay-NOMA}, where a ST helps forward a PT's signal to a PR, and simultaneously sends its own signals to multiple SRs, by using NOMA principles. The NOMA enabled spectrum sharing protocol is described as follows \cite{Lu_TVT}. \begin{itemize} \item In the first time slot, the PT sends its primary signal to the PR. The signal is also received by the ST and the SRs. \item In the second time slot, the ST regenerates the primary signal and superimposes with its own signals by using NOMA. Then ST sends the signal mixture to the PR and SRs. \end{itemize} Compared with traditional NOMA, overlay NOMA needs extra efforts in handling inter-network interference, as follows. Since the PR receives the primary signal in both time slots, it treats secondary signals as noise and decodes the primary signal by using maximal ratio combining (MRC). At a SR, it first decodes the primary signal by using MRC, and then employs SIC to sequentially decode secondary signals until its own signal is retrieved. Several benefits can be obtained from this overlay NOMA network, such that (i) superior spectrum utilization: the underlying spectrum is exploited by simultaneous primary and secondary transmissions, giving efficient two-time-slot communications, and (ii) enhanced reception performance: inter-network interference from the primary network to the secondary network is cancelled at SRs, and primary outage can be largely improved thanks to an increased diversity gain by ST relaying. Therefore, a balanced tradeoff between spectrum efficiency and reception reliability can be achieved. \begin{figure}[t] \centering \includegraphics[width=0.9\textwidth]{COMMAG-17-00687-fig4.eps} \caption{Overlay NOMA architectures. Left: overlay NOMA network; right: cooperative overlay NOMA network.}\vspace{-2mm}\label{overlay-NOMA} \end{figure} When the primary and secondary networks experience deep fading or shadowing, the PT$\rightarrow$PR and ST$\rightarrow$SR direct links may have poor channel conditions. To address this problem, we propose to implement a cooperative relay to improve outage performance. The proposed cooperative overlay NOMA network is shown in the right-hand side of Fig.~\ref{overlay-NOMA}. One advantage of the proposed framework is that both PT and ST can share the same relay. In particular, transmissions over the two time slots are as follows. \begin{itemize} \item In the first time slot, uplink NOMA is used at the PT and ST where a large power allocation coefficient is assigned to the primary signal due to its high priority \cite{Octavia_CST2016}. With SIC, the relay performs decoding of the primary and secondary signals sequentially. \item Based on its decoding result in the first time slot, the relay dynamically selects a proper multiple access mode in the second time slot: (i) if both primary and secondary signals are decoded correctly, downlink NOMA begins immediately, and (ii) if only the primary signal is retrieved, the relay solely forwards the primary signal by conventional OMA. \end{itemize} It is clear that reception reliability of both PR and SRs can be significantly improved by using the relay sharing cooperative overlay NOMA architecture. There are other promising directions in the field of relay sharing cooperative overlay NOMA networks. For example, when multiple relays are available, spatial diversity gains offered by relay selection and/or collaborative relay beamforming can be exploited to further improve the outage performance. Figure~\ref{sim-overlay} (the figure that we used to show performance of cooperative underlay NOMA) illustrates the primary and secondary outage performance of the cooperative/non-cooperative overlay NOMA schemes. Here NOMA user grouping includes the PR (with large power allocation coefficient) and all SRs (with small power allocation coefficients). It is demonstrated that the cooperative overlay NOMA outperforms its non-cooperative counterpart in terms of more reliable primary and secondary transmissions. \begin{figure}[t] \centering \includegraphics[width=0.6\textwidth]{COMMAG-17-00687-fig3.eps}\\\vspace{-5mm} \caption{Outage performance of cooperative/non-cooperative NOMA schemes for underlay and overlay paradigms in single-input single-output (SISO) scenario, where ``PN'' is short for ``primary network'' and ``SN'' is short for ``secondary network''. All channels experience independent and identically distributed (i.i.d.) Rayleigh fading. For both paradigms, we consider one PR and two NOMA assisted SRs. The target data rate for PR is $0.8$ bps/Hz, and the target data rate for each SR is $0.5$ bps/Hz. For underlay paradigm, the average channel gains from ST to SRs and $R$ are 1 and 3, and average channel gain from $R$ to SRs is 3. The interference from PT is Gaussian noise with power $10$ dB \cite{YLiu_TVT2016}. The power allocation coefficients for the two SRs are 0.8 and 0.2, respectively. For overlay paradigm, the average channel gains are set the same as 2, and the number of relays is $N=3$. The power allocation coefficients for the PR and the two SRs are set to 0.8, 0.15, and 0.05, respectively}\vspace{-2mm}\label{sim-overlay} \end{figure} \subsection{CR-NOMA Networks} A simple CR-NOMA network is shown in the left-hand side of Fig.~\ref{CR-NOMA}, in which a time slot is assigned to user A for downlink transmission. User A's channel is weak. If OMA is applied, user A solely occupies the channel, and thus, the spectrum is not efficiently utilized due to the weak channel. To improve spectrum efficiency, NOMA can be applied to user A and another user, say user B, that has a strong channel. This actually fits within the CR concept: user A is assigned the time slot, and thus, is the PR; user B is not assigned the time slot, but accesses the spectrum in the slot, and thus, is a SR.\footnote{When user A's channel is strong, NOMA is not applied because in this scenario, NOMA does not bring many benefits in spectrum efficiency compared to OMA.} Accordingly, this setting is referred to as CR-inspired NOMA or CR-NOMA \cite{Ding_TVT2016}. A QoS-guaranteed power allocation scheme, which divides the power into two parts for the PR's reliable reception and the SR's opportunistic transmission \cite{Ding_TVT2016}, can be applied to increase network throughput and promise user fairness. Spectrum efficiency is largely improved since the SR has a strong channel condition. In \cite{WLiang_TCOM2017}, user pairing for CR-NOMA networks with multiple pairs of PRs and SRs is investigated, where a low-complexity matching algorithm is designed to increase individual data rates of the paired users and the throughput of primary and secondary networks. \begin{figure}[t] \centering \includegraphics[width=0.8\textwidth]{COMMAG-17-00687-fig5.eps} \caption{CR-NOMA architectures. Left: simple CR-NOMA network; right: cooperative CR-NOMA network.}\vspace{-2mm}\label{CR-NOMA} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.6\textwidth]{COMMAG-17-00687-fig6.eps}\\\vspace{-5mm} \caption{Outage performance of cooperative/non-cooperative CR-NOMA schemes and an OMA-TDMA scheme in SISO scenario. All channels are i.i.d. Rayleigh fading. For illustration purpose, the average channel gains from the BS to the PR, from the BS to SRs, and from SRs to the PR are set to 0.5, 1 and 1, respectively, and the average channel gains among all SRs are set to 2. The target data rate for PR is $1$ bps/Hz, and the target data rate for SRs is $1.5$ bps/Hz. The power allocation coefficients for PR and SRs are 0.8 and 0.2, respectively.}\vspace{-2mm}\label{sim-CR-NOMA} \end{figure} In CR-NOMA networks, the SR enjoys interference-free transmission, while the PR suffers from inter-network interference (i.e., interference from the secondary transmission). Thus, the received SINR at the PR in CR-NOMA is smaller than that in the case when the PR solely occupies the spectrum. Furthermore, if the interference from the simultaneous secondary transmission is strong, primary outage may happen. Therefore, the PR may not have an incentive to share the spectrum with the SR. To overcome this challenge, a SR can be recruited as a cooperative relay to help improve reception reliability of the PR. This cooperation is particularly preferred when we need to send multicast content to SRs, as multiple SRs will provide additional benefits by appropriate user scheduling strategies. The proposed cooperative CR-NOMA is shown in the right-hand side of Fig.~\ref{CR-NOMA}, with two-phase transmissions. In the first phase, the BS sends a unicast signal to the PR and a multicast signal to the SRs. A SR that decodes both unicast and multicast signals successfully can be designated as a relay, and superimposes these signals for transmission to the PR and other SRs in the second phase \cite{Lu_TCOM}. In each phase, a large power allocation coefficient is assigned to the unicast primary signal, and a small power allocation coefficient is assigned to the multicast secondary signal. As a result, outage performance of the primary and secondary networks is boosted significantly. The performance of the cooperative CR-NOMA architecture can be further improved by using a dynamic multiple access scheme which switches between cooperative NOMA and cooperative OMA \cite{Lu_TCOM}. Figure~\ref{sim-CR-NOMA} shows the outage performance improvement of the cooperative CR-NOMA network with one PR and two SRs. It is clear that for both primary and secondary networks, the outage probability curves decrease faster in the cooperative CR-NOMA than those of non-cooperative CR-NOMA and OMA-time division multiple access (TDMA). Thus, enhanced primary and secondary outage performance is achieved by cooperative CR-NOMA. \section{Open Challenges and Future Research Directions} In this section, for implementing cognitive NOMA networks, we discuss some potential challenges and future research directions, most of which are also highly relevant to cooperative cognitive NOMA. \subsubsection{Interference Management} Cognitive NOMA networks retain highly interference-limited. Consider underlay NOMA networks, SRs suffer not only intra-network interference caused by power domain multiplexing, but also inter-network interference due to primary transmission. Moreover, total interference observed at a PR should be constrained by a controllable level. Therefore, interference management plays an important role in the design of cognitive NOMA networks. Solutions well known for conventional wireless networks, such as interference alignment and joint transceiver beamforming, can be applied to mitigate inter-network interference. In addition, power allocation should be carefully designed to minimize the negative impact of intra-network interference to underlay NOMA networks. \subsubsection{Imperfect Channel State Information (CSI)} Most existing cognitive NOMA research assumes that perfect CSI is available. However, in practice, channel estimation errors, mobility and feedback delay render the case of imperfect CSI, which potentially degrades the system performance. In underlay NOMA networks, imperfect CSI results in an inappropriate power allocation at the ST, which further leads to additional interference at the PR and error propagation at SRs. Furthermore, in cooperative overlay NOMA and CR-NOMA networks, a relay may be wrongly selected with a delayed version of CSI, therefore deteriorating the outage performance due to a diversity order loss for both networks. To this end, novel transmission designs which are robust to CSI errors should be developed for cognitive NOMA networks. \subsubsection{Energy Efficiency} Future wireless networks are expected to be green with very low energy consumption \cite{Zhang_Wang_TVT2017}. Several recent works have studied spectrum efficiency and reliability in cognitive NOMA, while the problem of energy efficiency maximization in cognitive NOMA networks is still unexplored, and can be investigated in future research. Moreover, simultaneous wireless information and power transfer can be introduced to overlay NOMA networks, where the ST extracts both information and energy from the PT's signals, and then uses the harvested energy to simultaneously serve the PR and SRs using NOMA signaling, thus achieving joint spectrum and energy efficiency. In this context, spectrum and energy efficiency tradeoff is an important metric to evaluate the overall network performance. Therefore, designs of efficient resource allocation algorithms are more than necessary. \subsubsection{Multi-Carrier Cognitive NOMA} Interweave NOMA is another promising paradigm for cognitive NOMA networks, which can be regarded as a multi-carrier cognitive NOMA architecture. Specifically, all SUs are first divided into multiple groups. Then the SUs in each group are served with NOMA signaling in the same resource block which is detected available via spectrum sensing, and different groups are allocated to different orthogonal resource blocks for communications. Developing corresponding resource allocation algorithms plays a crucial role in improving network performance and user fairness. However, this seems rather challenging as problems of spectrum sensing, user grouping, and subcarrier/power allocation are coupled together, which deserves more research efforts. \subsubsection{Cognitive MIMO-NOMA} The application of MIMO to NOMA is capable of providing additional performance gains as spatial diversity is exploited \cite{Octavia_JSAC2017}, and the extension to cognitive MIMO-NOMA is expected to still preserve this benefit. Nevertheless, designing efficient cognitive MIMO-NOMA networks is a challenging task. For example, in downlink underlay MIMO-NOMA networks, user ordering is difficult, because 1) channels of the users are represented by matrices or vectors (different from the single-input single-output [SISO] case in which the channels are represented by scalars), and 2) the users may experience different inter-network interference, and the interference at each user is also represented by a matrix or a vector. Power allocation is an opening topic, in order to restrict the resultant interference to the primary network and improve the sum rate of the secondary network. Joint transceiver beamforming is a method to achieve this, at a price of increased complexity. \subsubsection{Relay Selection/User Scheduling} As aforementioned, deployment of cooperative relaying has shown its great potential to improve reception reliability in cognitive NOMA networks. When multiple relays and/or SUs are available, relay selection/user scheduling is an effective yet simple approach to exploit multiuser diversity. However, conventional relay selection/user scheduling strategies mainly focus on performance of a single receiver, and thus, cannot be directly applied to cognitive NOMA networks since reception reliability of multiple NOMA assisted PUs and/or SUs should be jointly guaranteed. This motivates the design of advanced relay selection/user scheduling for future cognitive NOMA networks. \subsubsection{Physical Layer Security} Physical layer security is a challenging topic for cognitive NOMA networks. As previously stated, cognitive NOMA networks are vulnerable to interference. This, however, is a critical weakness that can be exploited by a denial-of-service attacker by emitting harmful radio signals to interfere with SIC processing at NOMA assisted SUs. Another security issue for cognitive NOMA networks is that a relay used for cooperation may be compromised. In other words, the untrusted relay intends to eavesdrop the confidential information for its own purpose. The application of physical layer security technologies (i.e., cooperative jamming) is a promising solution to prevent information leakage. \subsubsection{Full-Duplex} Integration of full-duplex technology to cognitive NOMA can further enhance spectrum efficiency. With a full-duplex relay, there is no need for an extra time slot for relaying. When the transmitter(s) and receiver(s) are with full-duplex capability, downlink and uplink transmissions can be carried out over the the same spectrum simultaneously. However, the benefit comes with some costs. Consider underlay NOMA with full duplex as an example, in which a secondary BS has full-duplex NOMA communications with multiple SUs over the same spectrum. For downlink reception, each SU experiences inter-network interference, intra-network interference, its residual self-interference, as well as interference from other SUs' uplink transmissions. An interesting research topic is on analytical evaluation of benefits and costs of full-duplex in cognitive NOMA. It is also crucial to investigate optimal resource allocation in full-duplex cognitive NOMA, which should jointly consider user pairing, power allocation, and interference management. \section{Conclusion} In this article, rationales of cognitive NOMA networks have been first illustrated. Then the state-of-the-art cognitive NOMA architectures, including underlay NOMA networks, overlay NOMA networks, and CR-NOMA networks, have been discussed in details. Cooperative relaying strategies in cognitive NOMA networks have also been proposed to improve reception reliability, with cost of installing relays. Some open challenges and future research trends in the context of cognitive NOMA networks have been discussed as well. \section*{Acknowledgment} The work of L. Lv and J. Chen was supported in part by the National Natural Science Foundation of China under Grants 61771366 and 61601347, and in part by the ``111'' project of China under Grant B08038. The work of Q. Ni was supported by the EU FP7 CROWN project under Grant PIRSES-GA-2013-610524. The work of Z. Ding was supported in part by the UK EPSRC under Grant EP/N005597/1, and in part by H2020-MSCA-RISE-2015 under Grant 690750. The work of H. Jiang was supported by the Natural Sciences and Engineering Research Council of Canada.
\section{Introduction} \label{sec:intro} Over the last two decades, the number and scale of online peer-production systems has become truly massive, driven by better information networks and advances in collaborative software. At the time of writing, \num{128643} editors contribute regularly to \num{5}+ million articles of the English Wikipedia \citep{wikipedia2017wikipedians} and over \num{15600} developers have authored code for the Linux kernel \citep{corbet2017linux}. On GitHub, \num{24} million users collaborate on \num{25.3} million active software repositories \citep{github2017octoverse}. In order to ensure that such projects advance towards their goals, it is necessary to identify whether edits made by users are beneficial. As the number of users and components of the project grows, this task becomes increasingly challenging. In response, two types of solutions are proposed. On the one hand, some advocate the use of \emph{user reputation systems} \citep{resnick2000reputation, adler2007content}. These systems are general, their predictions are easy to interpret and can be made resistant to manipulations \citep{dealfaro2013content}. On the other hand, a number of highly specialized methods are proposed to automatically predict the quality of edits in particular peer-production systems \citep{druck2008learning, wikimedia2015artificial}. These methods can attain excellent predictive performance \citep{heindorf2016vandalism} and usually significantly outperform predictors that are based on user reputation alone \citep{druck2008learning}, but they are tailored to a particular peer-production system, use domain-specific features and rely on models that are difficult to interpret. In this work, we set out to explore another point in the solution space. We aim to keep the generality and simplicity of user reputation systems, while reaching the predictive accuracy of highly specialized methods. We ask the question: Can one predict the outcome of contributions simply by observing \emph{who edits what} and whether the edits eventually survive? We address this question by proposing a novel statistical model of edit outcomes. We formalize the notion of collaborative project as follows. $N$ users can propose edits on $M$ distinct items (components of the project, such as articles on Wikipedia or a software's modules), and we assume that there is a process for validating edits (either immediately or over time). We observe triplets $(u, i, q)$ that describe a user $u \in \{1, \ldots, N\}$ editing an item $i \in \{1, \ldots, M\}$ and leading to outcome $q \in \{0, 1\}$; the outcome $q = 0$ represents a rejected edit, whereas $q = 1$ represents an accepted, beneficial edit. Given a dataset of such observations, we seek to learn a model of the probability $p_{ui}$ that an edit made by user $u$ on item $i$ is accepted. This model can then be used to help moderators and project maintainers prioritize their efforts once new edits appear: For example, edits that are unlikely to survive could be sent out for review immediately. Our approach borrows from probabilistic models of pairwise comparisons \citep{zermelo1928berechnung, rasch1960probabilistic}. These models learn a real-valued score for each object (user or item) such that the difference between two objects' scores is predictive of comparison outcomes. We take a similar perspective and view each edit in a collaborative project as a game between the user who tries to effect change and the item that resists change\footnote{Obviously, items do not really ``resist'' by themselves. Instead, this notion should be taken as a proxy for the combined action of other users (e.g., project maintainers) who can accept or reject an edit depending, among others, on standards of quality.}. Similarly to pairwise-comparison models, our approach learns a real-valued score for each user and each item. In addition, it also learns latent features of users and items that capture interaction effects. In contrast to quality-prediction methods specialized on a particular peer-production system, our approach is general and can be applied to any system in which users contribute by editing discrete items. It does not use any explicit content-based features: instead, it simply learns by observing triplets $\{ (u, i, q) \}$. Furthermore, the resulting model parameters can be interpreted easily. They enable a principled way of \begin{enuminline} \item ranking users by the quality of their contributions, \item ranking items by the difficulty of editing them and \item understanding the main dimensions of the interaction between users and items. \end{enuminline} We apply our approach on two different peer-production systems. We start with Wikipedia and consider its Turkish and French editions. Evaluating the accuracy of predictions on an independent set of edits, we find that our model approaches the performance of the state of the art. More interestingly, the model parameters reveal important facets of the system. For example, we characterize articles that are easy or difficult to edit, respectively, and we identify clusters of articles that share common editing patterns. Next, we turn our attention to the Linux kernel. In this project, contributors are typically highly skilled professionals, and the edits that they make affect \num{394} different subsystems (kernel components). In this instance, our model's predictions are \emph{more accurate} than a random forest classifier trained on domain-specific features. In addition, we give an interesting qualitative description of subsystems based on their difficulty score. In short, our paper \begin{enuminline} \item gives evidence that observing \emph{who edits what} can yield valuable insights into peer-production systems and \item proposes a statistically grounded and computationally inexpensive method to do so. \end{enuminline} The analysis of two peer-production systems with very distinct characteristics demonstrates the generality of the approach. \paragraph{Organization of the Paper} We start by reviewing related literature in Section~\ref{sec:relwork}. In Section~\ref{sec:models}, we describe our statistical model of edit outcomes and briefly discuss how to efficiently learn a model from data. In Sections~\ref{sec:wikipedia} and~\ref{sec:linux}, we investigate our approach in the context of Wikipedia and of the Linux kernel, respectively. Finally, we conclude in Section~\ref{sec:conclusion}. \section{Related Work} \label{sec:relwork} With the growing size and impact of online peer-production systems, the task of assessing contribution quality has been extensively studied. We review various approaches to the problem of quantifying and predicting the quality of user contributions and contrast them to our approach. \paragraph{User Reputation Systems} Reputation systems have been a long-standing topic of interest in relation to peer-production systems and, more generally, in relation to online services \citep{resnick2000reputation}. \citet{adler2007content} propose a point-based reputation system for Wikipedia and show that reputation scores are predictive of the future quality of editing. As almost all edits to Wikipedia are immediately accepted, the authors define an \emph{implicit} notion of edit quality by measuring how much of the introduced changes is retained in future edits. The ideas underpinning the computation of implicit edit quality are extended and refined in subsequent papers \citep{adler2008measuring, dealfaro2013content}. This line of work leads to the development of WikiTrust \citep{dealfaro2011reputation}, a browser add-on that highlights low-reputation texts in Wikipedia articles. When applying our methods to Wikipedia, we follow the same idea of measuring quality implicitly through the state of the article at subsequent revisions. We also demonstrate that by automatically learning properties of the \emph{item} that a user edits (in addition to learning properties of the user, such as a reputation score) we can substantially improve predictions of edit quality. This was also noted recently by \citet{tabibian2017distilling} in a setting similar to ours, but using a temporal point process framework. \paragraph{Specialized Classifiers} Several authors propose quality-prediction methods tailored to a specific peer-production system. Typically, these methods consist of a machine-learned classifier trained on a large number of content-based and system-based features of the users, the items and the edits themselves. \citet{druck2008learning} fit a maximum entropy classifier for estimating the lifespan of a given Wikipedia edit, using a definition of edit longevity similar to that of \citet{adler2007content}. They consider features based on the edit's content (such as: number of words added / deleted, type of change, capitalization and punctuation, etc.) as well as features based on the user, the time of the edit and the article. Their model significantly outperforms a baseline that only uses features of the user. Other methods use support vector machines \citep{bronner2012user}, random forests \citep{bronner2012user, javanmardi2011vandalism} or binary logistic regression \citep{potthast2008automatic}, with varying levels of success. In some cases, content-based features are refined using natural-language processing, leading to substantial performance improvements. However, these improvements are made to the detriment of general applicability. For example, competitive natural language processing tools have yet to be developed for the Turkish language (we investigate the Turkish Wikipedia in Section~\ref{sec:wikipedia}). In contrast to these methods, our approach is general and broadly applicable. Furthermore, the use of black-box classifiers can hinder the interpretability of predictions, whereas we propose a statistical model whose parameters are straightforward to interpret. \paragraph{Truth Inference} In crowdsourcing, a problem related to ours consists of \emph{jointly} estimating \begin{enuminline} \item model parameters (such as user skills or item difficulties) that are predictive of contribution quality, and \item the quality of each contribution, \end{enuminline} without ground truth \citep{dawid1979maximum}. Our problem is therefore easier, as we assume access to ground-truth information about the outcome (quality) of past edits. Nevertheless, some methods developed in the crowdsourcing context \citep{whitehill2009whose, welinder2010multidimensional, zhou2012learning} provide models that can be applied to our setting as well. In Sections~\ref{sec:wikipedia} and~\ref{sec:linux}, we compare our models to GLAD \citep{whitehill2009whose}. \paragraph{Pairwise Comparison Models} Our approach draws inspiration from probabilistic models of pairwise comparisons. These have been studied extensively over the last century in the context of psychometrics \citep{thurstone1927law, bradley1952rank}, item response theory \citep{rasch1960probabilistic}, chess rankings \citep{zermelo1928berechnung, elo1978rating}, and more. The main paradigm posits that every object $i$ has a latent \emph{strength} (skill or difficulty) parameter $\theta_i$, and that the probability $p_{ij}$ of observing object $i$ ``winning'' over object $j$ increases with the distance $\theta_i - \theta_j$. Conceptually, our model is closest to that of \citet{rasch1960probabilistic}. \paragraph{Collaborative Filtering} Our method also borrows from collaborative filtering techniques popular in the recommender systems community. In particular, some parts of our model are remindful of matrix-factorization techniques \citep{koren2009matrix}. These techniques automatically learn low-dimensional embeddings of users and items based on ratings, with the purpose of producing better recommendations. Our work shows that these ideas can also be helpful in addressing the problem of predicting outcomes of edits in peer-production systems. Like collaborative-filtering methods, our approach is exposed to the \emph{cold-start} problem: with no (or few) observations about a given user or item, the predictions are notably less accurate. In practice, this problem can be addressed, e.g., by using additional features of users and / or items \citep{schein2002methods, lam2008addressing} or by clustering users \citep{levi2012finding}. \section{Statistical Models} \label{sec:models} In this section, we describe and explain two variants of a statistical model of edit outcomes based on \emph{who} edits \emph{what}. In other words, we develop models that are predictive of the outcome $q \in \{0, 1\}$ of a contribution of user $u$ on item $i$. To this end, we represent the probability $p_{ui}$ that an edit made by user $u$ on item $i$ is successful. In collaborative projects of interest, most users typically interact with only a small number of items. In order to deal with the sparsity of interactions, we postulate that the probabilities $\{ p_{ui} \}$ lie on a low-dimensional manifold and propose two model variants of increasing complexity. In both cases, the parameters of the model have intuitive effects and can be interpreted easily. \paragraph{Basic Variant} The first variant of our model is directly inspired by the Rasch model \citep{rasch1960probabilistic}. The probability that an edit is accepted is defined as \begin{align} \label{eq:basicmodel} p_{ui} = \frac{1}{1 + \exp[-(s_u - d_i + b)]}, \end{align} where $s_u\in\mathbf{R}$ is the \emph{skill} of user $u$, $d_i\in\mathbf{R}$ is the \emph{difficulty} of item $i$, and $b \in \mathbf{R}$ is a global parameter that encodes the overall skew of the distribution of outcomes. We call this model variant \interank{basic}. Intuitively, the model predicts the outcome of a ``game'' between an item with inertia and a user who would like to effect change. The \emph{skill} quantifies the ability of the user to enforce a contribution, whereas the \emph{difficulty} quantifies how ``resistant'' to contributions the particular item is. Similarly to reputation systems \citep{adler2007content}, \interank{basic} learns a score for each user; this score is predictive of edit quality. However, unlike these systems, our model also takes into account that some items might be more challenging to edit than others. For example, on Wikipedia, we can expect high-traffic, controversial articles to be more difficult to edit than less popular articles. As with user skills, the article difficulty can be inferred \emph{automatically} from observed outcomes. \paragraph{Full Variant} Although the \emph{basic} variant is conceptually attractive, it might prove to be too simplistic in some instances. In particular, the \emph{basic} variant implies that if user $u$ is more skilled than user $v$, then $p_{ui} > p_{vi}$ for \emph{all} items $i$. In many peer-production systems, users tend to have their own specializations and interests, and each item in the project might require a particular mix of skills. For example, with the Linux kernel, an engineer specialized in file systems might be successful in editing a certain subset of software components, but might be less proficient in contributing to, say, network drivers, whereas the situation might be exactly the opposite for another engineer. In order to capture the multidimensional interaction between users and items, we add a bilinear term to the probability model~\eqref{eq:basicmodel}. Letting $\bm{x}_u, \bm{y}_i \in \mathbf{R}^D$ for some dimensionality $D \in \mathbf{N}_{>0}$, we define \begin{align} \label{eq:fullmodel} p_{ui} = \frac{1}{1 + \exp[-(s_u - d_i + \bm{x}_u^\top \bm{y}_i + b)]}. \end{align} We call the corresponding model variant \interank{full}. The vectors $\bm{x}_u$ and $\bm{y}_i$ can be thought of as embedding users and items as points in a latent $D$-dimensional space. Informally, $p_{ui}$ increases if the two points representing a user and an item are close to each other, and it decreases if they are far from each other (e.g., if the vectors have opposite signs). If we slightly oversimplify, the parameter $\bm{y}_i$ can be interpreted as describing the set of skills needed to successfully edit item $i$, whereas $\bm{x}_u$ describes the set of skills displayed by user~$u$. The bilinear term is reminiscent of matrix-factorization approaches in recommender systems \citep{koren2009matrix}; indeed, this variant can be seen as a \emph{collaborative-filtering} method. In true collaborative-filtering fashion, our model is able to learn the latent feature vectors $\{ \bm{x}_i \}$ and $\{ \bm{y}_i \}$ \emph{jointly}, by taking into consideration all edits and without any additional content-based features. Finally, note that the skill and difficulty parameters are retained in this variant and can still be used to explain first-order effects. The bilinear term explains only the additional effect due to the user-item interaction. \subsection{Learning the Model} \label{sec:learning} From~\eqref{eq:basicmodel} and~\eqref{eq:fullmodel}, it should be clear that our probabilistic model assumes no data other than the identity of the user and that of the item. This makes it generally applicable to any peer-production system in which users contribute to discrete items. Given a dataset of $K$ independent observations $\mathcal{D} = \{ (u_k, i_k, q_k) \mid k = 1, \ldots, K \}$, we infer the parameters of the model by maximizing their likelihood under $\mathcal{D}$. That is, collecting all model parameters into a single vector $\bm{\theta}$, we seek to minimize the negative log-likelihood \begin{align} \label{eq:nll} - \ell (\bm{\theta} ; \mathcal{D}) = \sum_{(u,i,q) \in \mathcal{D}} \left[ -q \log p_{ui} - (1 - q) \log (1 - p_{ui}) \right], \end{align} where $p_{ui}$ depends on $\bm{\theta}$. In the \emph{basic} variant, the negative log-likelihood is convex, and we can easily find a global maximum by using standard methods from convex optimization. In the \emph{full} variant, the bilinear term breaks the convexity of the objective function, and we can no longer guarantee that we will find parameters that are global minimizers. In practice, we do not observe any convergence issues but reliably find good model parameters on all datasets. Note that~\eqref{eq:nll} easily generalizes from binary outcomes ($q \in \{0, 1\}$) to continuous-valued outcomes ($q \in [0, 1]$). Continuous values can be used to represent the \emph{fraction} of the edit that is successful. \paragraph{Implementation} We implement the models in Python by using the TensorFlow library \citep{abadi2016tensorflow}. Our code is publicly available online at \url{https://github.com/lca4/interank}. In order to avoid overfitting the model to the training data, we add a small amount of $\ell_2$ regularization to the negative log-likelihood. We minimize the negative log-likelihood by using stochastic gradient descent \citep{bishop2006pattern} with small batches of data. For \interank{full}, we set the number of latent dimensions to $D = 20$ by cross-validation. \paragraph{Running Time} Our largest experiment consists of learning the parameters of \interank{full} on the entire history of the French Wikipedia (c.f. Section~\ref{sec:wikipedia}), consisting of over \num{65} million edits by \num{5} million users on \num{2} million items. In this case, our TensorFlow implementation takes approximately \num{2} hours to converge on a single machine. In most other experiments, our implementation takes only a few minutes to converge. This demonstrates that our model effortlessly scales, even to the largest peer-production systems. \subsection{Applicability} Our approach models the difficulty of effecting change through the affected item's identity. As such, it applies particularly well to peer-production systems where users \emph{cooperate} to improve the project, i.e., where each edit is judged independently against an item's (latent) quality standards. This model is appropriate for a wide variety of projects, ranging from online knowledge bases (such as Wikipedia, c.f. Section~\ref{sec:wikipedia}) to open source software (such as the Linux kernel project, c.f. Section~\ref{sec:linux}). In some peer-production systems, however, the contributions of different users \emph{compete} against each other, such as multiple answers to a single question on a Q\&A platform. In these cases, our model can still be applied, but fails to capture the fact that edit outcomes are interdependent. \section{Wikipedia} \label{sec:wikipedia} Wikipedia is a popular free online encyclopedia and arguably one of the most successful peer-production systems. In this section, we apply our models to the French and Turkish editions of Wikipedia. \subsection{Background \& Datasets} The French Wikipedia is one of the largest Wikipedia editions. At the time of writing, it ranks in third position both in terms of number of edits and number of users\footnote{% We chose the French edition over the English one because our computing infrastructure could not support the $\approx15$ TB needed to store the entire history of the English Wikipedia. The French edition contains roughly $5\times$ fewer edits. }. In order to obtain a complementary perspective, we also study the Turkish Wikipedia, which is roughly an order of magnitude smaller. Interestingly, both the French and the Turkish editions score very highly on Wikipedia's \emph{depth} scale, a measure of collaborative quality \citep{wikimedia2017depth}. The Wikimedia Foundation releases periodically and publicly a database dump containing the successive revisions to all articles\footnote{% See: \url{https://dumps.wikimedia.org/}.}. In this paper, we use a dump that contains data starting from the beginning of the edition up to the fall of 2017. \subsubsection{Computation of Edit Quality} On Wikipedia, any user's edit is immediately incorporated into the encyclopedia\footnote{Except for a small minority of protected articles.}. Therefore, in order to obtain information about the quality of an edit, we have to consider the implicit signal given by subsequent edits to the same article. If the changes introduced by the edit are preserved, it signals that the edit was beneficial, whereas if the changes are reverted, the edit likely had a negative effect. A formalization of this idea is given by \citet{adler2007content} and \citet{druck2008learning}; see also \citet{dealfaro2013content} for a concise explanation. In this paper, we essentially follow their approach. Consider a particular article and denote by $v_k$ its $k$-th revision (i.e., the state of the article after the $k$-th edit). Let $d(u, v)$ be the Levenshtein distance between two revisions \citep{kruskal1983overview}. We define the \emph{quality} of edit $k$ from the perspective of the article's state after $\ell \ge 1$ subsequent edits as \begin{align*} q_{k \mid \ell} = \frac{1}{2} + \frac{d(v_{k-1}, v_{k + \ell}) - d(v_k, v_{k + \ell})}{2 d(v_{k-1}, v_k)}. \end{align*} By properties of distances, $q_{k \mid \ell} \in [0, 1]$. Intuitively, the quantity $q_{k \mid \ell}$ captures the proportion of work done in edit $k$ that remains in revision $k + \ell$. It can be understood as a \emph{soft} measure of whether edit $k$ has been reverted or not. We compute the unconditional quality of the edit by averaging over multiple future revisions: \begin{align} \label{eq:wikiqual} q_k = \frac{1}{L} \sum_{\ell = 1}^L q_{k \mid \ell}, \end{align} where $L$ is the minimum between the number of subsequent revisions of the article and $10$ (we empirically found that \num{10} revisions is enough to accurately assess the quality of an edit). Note that even though $q_k$ is no longer binary, our models naturally extend to continuous-valued $q_k \in [0,1]$ (c.f. Section~\ref{sec:learning}). In practice, we observe that edit quality is bimodal and asymmetric. Most edits have a quality close to either \num{0} or \num{1} and a majority of edits are of high quality. The two rightmost columns of Table~\ref{tab:wikidata} quantify this for the French and Turkish editions. \subsubsection{Dataset Preprocessing} We consider all edits to the pages in the main namespace (i.e., articles), including those from anonymous contributors identified by their IP address\footnote{% Note, however, that a large majority of edits are made by registered users (\num{82.7} \% and \num{76.6} \% for the French and Turkish editions, respectively).}. Sequences of consecutive edits to an article by the same user are collapsed into a single edit in order to remove bias in the computation of edit quality \citep{adler2007content}. To evaluate methods in a realistic setting, we split the data into a training set containing the first \num{90} \% of edits, and we report results on an independent validation set containing the remaining \num{10} \%. Note that the quality is computed based on subsequent revisions of an article: In order to guarantee that the two sets are truly independent, we make sure that we never use any revisions from the validation set to compute the quality of edits in the training set. A short summary of the data statistics after preprocessing is provided in Table~\ref{tab:wikidata}. \subsection{Evaluation} In order to facilitate the comparison of our method with competing approaches, we evaluate the performance on a binary classification task consisting of predicting whether an edit is of poor quality. To this end, we assign binary labels to all edits in the validation set: the label \emph{bad} is assigned to every edit with $q < 0.5$, and the label \emph{good} is assigned to all edits with $q \ge 0.5$. The predictions of the classifier might help Wikipedia administrators to identify edits of low quality; these edits might then be sent to domain experts for review. As discussed in Section~\ref{sec:models}, we consider two versions of our model. The first one, \textsc{interank} \emph{basic}, simply learns scalar user skills and article difficulties. The second one, \textsc{interank} \emph{full}, additionally includes a latent embedding of dimension $D = 20$ for each user and article. \subsubsection{Competing Approaches} \label{sec:wikicompeting} To set our results in context, we compare them to those obtained with four different baselines. \paragraph{Average} The first approach always outputs the marginal probability of a bad edit in the training set, i.e., \begin{align*} p = \frac{\text{\# bad edits in training set}}{\text{\# edits in training set}} \end{align*} This is a trivial baseline, and it gives an idea of what results we should expect to achieve without any additional information on the user, article or edit. \paragraph{User-Only} The second approach models the outcome of an edit using only the user's identity. In short, the predictor learns skills $\{s_u \mid u = 1, \ldots, N\}$ and a global offset $b$ such that, for each user $u$, the probability \begin{align*} p_u = \frac{1}{1 + \exp[- (s_u + b)]} \end{align*} maximizes the likelihood of that user's edits in the training set. This baseline predictor is representative of user reputation systems such as that of \citet{adler2007content}. \paragraph{GLAD} In the context of crowdsourcing, \citet{whitehill2009whose} propose the GLAD model that postulates that \begin{align*} p_{ui} = \frac{1}{1 + \exp(- s_u / d_i)}, \end{align*} where $s_u \in \mathbf{R}$ and $d_i \in \mathbf{R}_{>0}$. This reflects a different assumption on the interplay between user skill and item difficulty: under their model, an item with a large difficulty value makes every user's skill more ``diffuse''. In order to make the comparison fair, we add a global offset parameter $b$ to the model (similarly to \textsc{interank} and the user-only baseline). \paragraph{ORES reverted} The fourth approach is a state-of-the-art classifier developed by researchers at the Wikimedia Foundation as part of Wikipedia's Objective Revision Evaluation Service \citep{wikimedia2015artificial}. We use the two classification models specifically developed for the French and Turkish editions. Both models use over \num{80} content-based and system-based features extracted from the user, the article and the edit to predict whether the edit will be reverted, a target which essentially matches our operational definition of \emph{bad} edit. Features include the number of vulgar words introduced by the edit, the length of the article and of the edit, etc. This predictor is representative of specialized, domain-specific approaches to modeling edit quality. \subsubsection{Results} \begin{figure*} \centering \includegraphics[scale=1.2]{wikipedia-pr} \includegraphics[scale=1.2]{wikipedia-cs} \caption{Precision-recall curves on the \emph{bad edit} classification task for the Turkish and French editions of Wikipedia (top). Average log-likelihood as a function of the number of observations of the user and item in the training set (bottom).} \label{fig:wikipr} \end{figure*} Table~\ref{tab:wikiperf} presents the average log-likelihood and the area under the precision-recall curve (AUPRC) for each method. \textsc{interank} \emph{full} has the highest average log-likelihood of all models, meaning that its predictive probabilities are well calibrated with respect to the validation data. \begin{table} \caption{Predictive performance on the \emph{bad edit} classification task for the French and Turkish editions of Wikipedia. The best performance is highlighted in bold.} \label{tab:wikiperf} \centering \begin{tabular}{llrr} \toprule Edition & Model & Avg. log-likelihood & AUPRC \\ \midrule French & \textsc{interank} \emph{basic} & \num{-0.339} & \num{0.399} \\ & \textsc{interank} \emph{full} & \textbf{\num{-0.336}} & \num{0.413} \\ \addlinespace & Average & \num{-0.389} & \num{0.131} \\ & User-only & \num{-0.346} & \num{0.313} \\ & GLAD & \num{-0.344} & \num{0.369} \\ & ORES reverted & \num{-0.469} & \textbf{\num{0.453}} \\ \midrule Turkish & \textsc{interank} \emph{basic} & \num{-0.380} & \num{0.494} \\ & \textsc{interank} \emph{full} & \textbf{\num{-0.379}} & \num{0.503} \\ \addlinespace & Average & \num{-0.461} & \num{0.168} \\ & User-only & \num{-0.390} & \num{0.410} \\ & GLAD & \num{-0.387} & \num{0.471} \\ & ORES reverted & \num{-0.392} & \textbf{\num{0.552}} \\ \bottomrule \end{tabular} \end{table} Figure~\ref{fig:wikipr} (top) presents the precision-recall curves for all methods. The analysis is qualitatively similar for both Wikipedia editions. All non-trivial predictors perform similarly in the high-recall regime, but present significant differences in the high-precision regime, on which we will focus. The ORES predictor performs the best. \textsc{interank} comes second, reasonably close behind ORES, and the \emph{full} variant has a small edge over the \emph{basic} variant. GLAD is next, and the user-only baseline is far behind. This shows that \begin{enuminline} \item incorporating information about the article being edited is crucial for achieving a good performance on a large portion of the precision-recall trade-off, and \item modeling the outcome probability by using the \emph{difference} between skill and difficulty (\textsc{interank}) is better than by using the \emph{ratio} (GLAD). \end{enuminline} We also note that in the validation set, approximately \num{20} \% (\num{15} \%) of edits are made by users (respectively, on articles) that are never encountered in the training set (the numbers are similar in both editions). In these cases, \textsc{interank} reverts to average predictions, whereas content-based methods can take advantage of other features of the edit to make an informed prediction. In order to explore this \emph{cold-start} effect in more detail, we group users and articles into bins based on the number of times they appear in the training set, and we compute the average log-likelihood of validation examples separately for each bin. Figure~\ref{fig:wikipr} (bottom) presents the results for the French edition; the results for the Turkish edition are similar. Clearly, predictions for users and articles present in the training set are significantly better. In a practical deployment, several methods can help to address this issue \citep{schein2002methods, lam2008addressing, levi2012finding}. A thorough investigation of ways to mitigate the cold-start problem is beyond the scope of this paper. In summary, we observe that our model, which incorporates the articles' identity, is able to bridge the gap between user-only prediction approach and a specialized predictor (ORES reverted). Furthermore, modeling the interaction between user and article (\textsc{interank} \emph{full}) is beneficial and helps further improve predictions, particularly in the high-precision regime. \subsection{Interpretation of Model Parameters} The parameters of \textsc{interank} models, in addition to being predictive of edit outcomes, are also very interpretable. In the following, we demonstrate how they can surface interesting characteristics of the peer-production system. \subsubsection{Controversial Articles} Intuitively, we expect an article $i$ whose difficulty parameter $d_i$ is large to deal with topics that are potentially controversial. We focus on the French Wikipedia and explore a list of the ten most controversial articles given by \citet{yasseri2014most}. In this 2014 study, the authors identify controversial articles by using an ad-hoc methodology. Table~\ref{tab:wikicontrov} presents, for each article identified by \citeauthor{yasseri2014most}, the percentile of the corresponding difficulty parameter $d_i$ learned by \textsc{interank} \emph{full}. We analyze these articles approximately four years later, but the model still identifies them as some of the most difficult ones. Interestingly, the article on Sigmund Freud, which has the lowest difficulty parameter of the list, has become a \emph{featured} article since \citeauthor{yasseri2014most}'s analysis---a distinction awarded only to the most well-written and neutral articles. \begin{table} \caption{The ten most controversial articles on the French Wikipedia according to \citet{yasseri2014most}. For each article $i$, we indicate the percentile of its corresponding parameter $d_i$.} \label{tab:wikicontrov} \centering \begin{tabular}{rlr} \toprule Rank & Title & Percentile of $d_i$ \\ \midrule 1 & Ségolène Royal & \num{99.840} \% \\ 2 & Unidentified flying object & \num{99.229} \% \\ 3 & Jehovah's Witnesses & \num{99.709} \% \\ 4 & Jesus & \num{99.953} \% \\ 5 & Sigmund Freud & \num{97.841} \% \\ 6 & September 11 attacks & \num{99.681} \% \\ 7 & Muhammad al-Durrah incident & \num{99.806} \% \\ 8 & Islamophobia & \num{99.787} \% \\ 9 & God in Christianity & \num{99.712} \% \\ 10 & Nuclear power debate & \num{99.304} \% \\ \addlinespace & \emph{median} & \num{99.710} \% \\ \bottomrule \end{tabular} \end{table} \subsubsection{Latent Factors} \begin{table*} \caption{A selection of articles of the Turkish Wikipedia among the top-\num{20} highest and lowest coordinates along the first principal axis of the matrix $\bm{Y}$.} \label{tab:wikitrlatent} \centering \begin{tabular}{lp{5in}} \toprule Direction & Titles \\ \midrule Lowest & Harry Potter's magic list, List of programs broadcasted by Star TV, Bursaspor 2011-12 season, Kral Pop TV Top 20, Death Eater, Heroes (TV series), List of programs broadcasted by TV8, Karadayı, Show TV, List of episodes of Kurtlar Vadisi Pusu. \\ Highest & Seven Wonders of the World, Thomas Edison, Cell, Mustafa Kemal Atatürk, Albert Einstein, Democracy, Isaac Newton, Mehmed the Conqueror, Leonardo da Vinci, Louis Pasteur. \\ \bottomrule \end{tabular} \end{table*} Next, we turn our attention to the parameters $\{ \bm{y}_i \}$. These parameters can be thought of as an embedding of the articles in a latent space of dimension $D = 20$. As we learn a model that maximizes the likelihood of edit outcomes, we expect these embeddings to capture latent article features that explain edit outcomes. In order to extract the one or two directions that explain most of the variability in this latent space, we apply principal component analysis \citep{bishop2006pattern} to the matrix $\bm{Y} = [\bm{y}_i]$. In Table~\ref{tab:wikitrlatent}, we consider the Turkish Wikipedia and list a subset of the \num{20} articles with the highest and lowest coordinates along the first principal axis of $\bm{Y}$. We observe that this axis seems to distinguish articles about popular culture from those about ``high culture'' or timeless topics. This discovery supports the hypothesis that users have a propensity to successfully edit \emph{either} popular culture \emph{or} high-culture articles on Wikipedia, but not \emph{both}. Finally, we consider the French Wikipedia. Once again, we apply principal component analysis to the matrix $\bm{Y}$ and keep the first two dimensions. We select the \num{20} articles with the highest and lowest coordinates along the first two principal axes\footnote{% Interestingly, the first dimension has a very similar interpretation to that obtained on the Turkish edition: it can also be understood as separating popular culture from high culture.}. A two-dimensional $t$-SNE plot \citep{vandermaaten2008visualizing} of the 80 articles selected using PCA is displayed in Figure~\ref{fig:wikifrlatent}. The plot enables identifying meaningful clusters of related articles, such as articles about tennis players, French municipalities, historical figures, and TV or teen culture. These articles are representative of the latent dimensions that separate editors the most: a user skilled in editing pages about ancient Greek mathematicians might be less skilled in editing pages about \emph{anime}, and vice versa. \begin{figure} \centering \includegraphics[width=0.6\linewidth]{wikipedia-latentfact} \caption{$t$-SNE visualization of 80 articles of the French Wikipedia with highest and lowest coordinates along the first and second principal axes of the matrix $\bm{Y}$.} \label{fig:wikifrlatent} \end{figure} \section{Linux Kernel} \label{sec:linux} In this section, we apply the \interank{} model to the Linux kernel project, a well-known open-source software project. In contrast to Wikipedia, most contributors to the Linux kernel are highly skilled professionals who dedicate a significant portion of their time and efforts to the project. \subsection{Background \& Dataset} The Linux kernel has fundamental impact on technology as a whole. In fact, the Linux operating system runs 90 \% of the cloud workload and 82 \% of the smartphones \citep{corbet2017linux}. To collectively improve the source code, developers submit bug fixes or new features in the form of a \emph{patch} to collaborative repositories. Review and integration time depend on the project's structure, ranging from a few hours or days for Apache Server \citep{rigby2008open} to a couple of months for the Linux kernel \citep{jiang2013will}. In particular for the Linux kernel, developers submit patches to subsystem mailing lists, where they undergo several rounds of reviews. After suggestions are implemented and if the code is approved, the patch can be committed to the subsystem maintainer's software repository. Integration conflicts are spotted at this stage by other developers monitoring the maintainer's repository and any issues must be fixed by the submitter. If the maintainer is satisfied with the patch, she commits it to Linus Torvalds' repository, who decides to include it or not with the next Linux release. \subsubsection{Dataset Preprocessing} We use a dataset collected by \citet{jiang2013will} which spans Linux development activity between 2005 and 2012\footnote{% The dataset is publicly available online at \url{http://mcis.polymtl.ca/publications/2013/linux_patch_final.arff.gz}.}. It consists of \num{670 533} patches described using \num{62} features derived from e-mails, commits to software repositories, the developers' activity and the content of the patches themselves. \citeauthor{jiang2013will} scraped patches from the various mailing lists and matched them with commits in the main repository. In total, they managed to trace back 75 \% of the commits that appear in Linus Torvalds' repository to a patch submitted to a mailing list. A patch is labeled as \emph{accepted} ($q = 1$) if it eventually appears in a release of the Linux kernel, and \emph{rejected} ($q = 0$) otherwise. We remove data points with empty subsystem and developer names, as well as all subsystems with no accepted patches. Finally, we chronologically order the patches according to their mailing list submission time. After preprocessing, the dataset contains $K= \num{619419}$ patches proposed by $ N = \num{9672} $ developers on $M = \num{394}$ subsystems. 34.12 \% of these patches are accepted. We then split the data into training set containing the first 80 \% of patches and a validation set containing the remaining 20 \%. \subsubsection{Subsystem-Developer Correlation} Given the highly complex nature of the project, one could believe that developers tend to specialize in few, independent subsystems. Let $X_u = \{ X_{ui} \}_{i=1}^M$ be the collection of binary variables $ X_{ui} $ indicating whether developer $u$ has an accepted patch in subsystem $i$. We compute the sample Pearson correlation coefficient $r_{uv} = \rho(X_u, X_v)$ between $X_u$ and $X_v$. We show in Figure \ref{fig:linux_correlation} the correlation matrix $ \bm{R} = [r_{uv}] $ between developers patching subsystems. Row $\bm{r}_u$ corresponds to developer $u$, and we order all rows according to the subsystem each developer $u$ contribute to the most. We order the subsystems in decreasing order by the number of submitted patches, such that larger subsystems appear at the top of the matrix $\bm{R}$. Hence, the blocks on the diagonal roughly correspond to subsystems and their size represents the number of developers involved with the subsystem. As shown by the blocks, developers tend to specialize into one subsystem. However, as the numerous non-zero off-diagonal entries reveal, they still tend to contribute substantially to other subsystems. Finally, as highlighted by the dotted, blue square, subsystems number three to six on the diagonal form a cluster. In fact, these four subsystems (\texttt{include/linux}, \texttt{arch/x86}, \texttt{kernel} and \texttt{mm}) are core subsystems of the Linux kernel. \begin{figure} \centering \includegraphics[width=0.6\linewidth]{linux/correlation-matrix} \caption{Correlation matrix $ \bm{R} $ between developers ordered according to the subsystem they contribute to the most. The blocks on the diagonal correspond to subsystems. Core subsystems form a strong cluster (blue square).} \label{fig:linux_correlation} \end{figure} \subsection{Evaluation} We consider the task of predicting whether a patch will be integrated into a release of the kernel. Similarly to Section \ref{sec:wikipedia}, we use \interank{basic} and \interank{full} with $D = 20$ latent dimensions to learn the developers' skills, the subsystems' difficulty, and the interaction between them. \subsubsection{Competing Approaches} Three baselines that we consider---\emph{average}, \emph{user-only} and \emph{GLAD}---are identical to those described in Section~\ref{sec:wikicompeting}. In addition, we also compare our model to a random forest classifier trained on domain-specific features similar to the one used by \citet{jiang2013will}. In total, this classifier has access to 21 features for each patch. Features include information about the developer's experience up to the time of submission (e.g., number of accepted commits, number of patches sent), the e-mail thread (e.g., number of developers in copy of the e-mail, size of e-mail, number of e-mails in thread until the patch) and the patch itself (e.g., number of lines changed, number of files changed). We optimize the hyperparameters of the random forest using a grid-search. As the model has access to domain-specific features about each edit, it is representative of the class of specialized methods tailored to the Linux kernel peer-production system. \subsubsection{Results} Table \ref{tab:linux_results} displays the average log-likelihood and area under the precision-recall curve (AUPRC). \interank{full} performs best in terms of both metrics. In terms of AUPRC, it outperforms the random forest classifier by 4.4 \%, GLAD by 5 \%, and the \emph{user-only} baseline by 7.3 \%. \begin{table} \caption{Predictive performance on the \emph{accepted patch} classification task for the Linux kernel. The best performance is highlighted in bold.} \label{tab:linux_results} \centering \begin{tabular}{lrr} \toprule Model & Avg. log-likelihood & AUPRC \\ \midrule \interank{basic} & -0.589 & 0.525 \\ \interank{full} & \textbf{-0.588} & \textbf{0.527} \\ \addlinespace Average & -0.640 & 0.338 \\ User-only & -0.601 & 0.491 \\ GLAD & -0.598 & 0.502 \\ Random forest & -0.599 & 0.505 \\ \bottomrule \end{tabular} \end{table} We show the precision-recall curves in Figure \ref{fig:linux_results}. Both \interank{full} and \interank{basic} perform better than the four baselines. Notably, they outperform the random forest in the high-precision regime, even though the random forest uses content-based features about developers, subsystems and patches. In the high-recall regime, the random forest attains a marginally better precision. The \emph{user-only} and GLAD baselines perform worse than all non-trivial models. \begin{figure} \centering \includegraphics[width=0.6\linewidth]{linux/results} \caption{Precision-recall curves on the bad edit classification task for the Linux kernel. \textsc{interank} (solid orange and red) outperforms the user-only baseline (dotted green), the random forest classifier (dashed blue), and GLAD (dash-dotted purple).} \label{fig:linux_results} \end{figure} \subsection{Interpretation of Model Parameters} We show in Table \ref{tab:linux_subsystems} the top-five and bottom-five subsystems according to difficulties $\{d_i\}$ learned by \interank{full}. We note that even though patches submitted to difficult subsystems have in general low acceptance rate, \interank{} enables a finer ranking by taking into account \emph{who} is contributing to the subsystems. This effect is even more noticeable with the five subsystems with smallest difficulty value. The subsystems $i$ with largest $d_i$ are \emph{core} components, whose integrity is crucial to the system. For instance, the \texttt{usr} subsystem, providing code for RAM-related instructions at booting time, has barely changed in the last seven years. On the other hand, the subsystems $i$ with smallest $d_i$ are \textit{peripheral} components serving specific devices, such as digital signal processors or gaming consoles. These components can arguably tolerate a higher rate of bugs, and hence they evolve more frequently. \begin{table} \caption{Top-five and bottom-five subsystems according to their difficulty $d_i$.} \label{tab:linux_subsystems} \centering \begin{tabular}{llrrr} \toprule Difficulty & Subsystem & \% Acc. & \# Patch & \# Dev.\\ \midrule +2.664 & \texttt{usr} & 1.88 \% & 796 & 70 \\ +1.327 & \texttt{include} & 7.79 \% & 398 & 101 \\ +1.038 & \texttt{lib} & 15.99 \% & 5642 & 707 \\ +1.013 & \texttt{drivers/clk} & 34.34 \% & 495 & 81 \\ +0.865 & \texttt{include/trace} & 17.73 \% & 547 & 81 \\ \midrule -1.194 & \texttt{drivers/addi-data} & 78.31 \% & 272 & 8 \\ -1.080 & \texttt{net/tipc} & 43.11 \% & 573 & 44 \\ -0.993 & \texttt{drivers/ps3} & 44.26 \% & 61 & 9 \\ -0.936 & \texttt{net/nfc} & 73.04 \% & 204 & 26 \\ -0.796 & \texttt{arch/mn10300} & 45.40 \% & 359 & 63 \\ \bottomrule \end{tabular} \end{table} \citet{jiang2013will} establish that a high prior subsystem churn (i.e., high number of previous commits to a subsystem) leads to lower acceptance rate. We approximate the number of commits to a subsystem as the number of patches submitted multiplied by the subsystem's acceptance rate. The first quartile of subsystems according to their increasing difficulty, i.e., the least difficult subsystems, has an average churn of \num{687}. The third quartile, i.e., the most difficult subsystems, has an average churn of \num{833}. We verify hence that higher churn correlates with difficult subsystems. This corroborates the results obtained by \citeauthor{jiang2013will} As shown in Figure \ref{fig:linux_results}, if false negatives are not a priority, \interank{} will yield a substantially higher precision. In other words, if the task at hand requires that the patches classified as accepted are actually the ones integrated in a future release, then \interank{} will yield more accurate results. For instance, it would be efficient in supporting Linus Torvalds in the development of the Linux kernel by providing him with a restricted list of patches that are likely to be integrated in the next release of the Linux kernel. \section{Conclusion} \label{sec:conclusion} In this paper, we have introduced \interank{}, a model of edit outcomes in peer-production systems. Predictions generated by our model can be used to prioritize the work of project maintainers by identifying contributions that are of high or low quality. Similarly to user reputation systems, \interank{} is simple, easy to interpret and applicable to a wide range of domains. Whereas user reputation systems are usually not competitive with specialized edit quality predictors tailored to a particular peer-production system, \interank{} is able to bridge the gap between the two types of approaches, and it attains a predictive performance that is competitive with the state of the art---without access to content-based features. We have demonstrated the performance of the model on two peer-production systems exhibiting different characteristics. Beyond predictive performance, we can also use model parameters to gain insight into the system. On Wikipedia, we have shown that the model identifies controversial articles, and that latent dimensions learned by our model display interesting patterns related to cultural distinctions between articles. On the Linux kernel, we have shown that inspecting model parameters enables to identify core subsystems (large difficulty parameters) from peripheral components (small difficulty parameters). \paragraph{Future Work} In the future, we would like to investigate the idea of using the latent embeddings learned by our model in order to recommend items to edit. Ideally, we could match items that need to be edited with users that are most suitable for the task. For Wikipedia, an ad-hoc method called ``SuggestBot'' was proposed by \citet{cosley2007suggestbot}. We believe it would be valuable to propose a method that is applicable to peer-production systems in general. \paragraph{Acknowledgments} We are grateful to Yujuan Jiang for providing the Linux data and to Aaron Halfaker for helping us understand ORES. We thank Patrick Thiran, Brunella Spinelli, Vincent Etter, Ksenia Konyushkova, Holly Cogliati-Bauereis and the anonymous reviewers for careful proofreading and constructive feedback.
\section{Introduction} Inertialess locomotion in Stokes flow describes the motility of many types of sperm, bacteria, algae and protozoa. This topic has received extensive attention from mathematical modellers, starting with the classic work of Taylor \cite{taylor1951} and continuing to the present day \cite{keaveny2013,simons2015,ishimoto2017}. From the early work into the swimming of sea-urchin spermatozoa \cite{gray1955}, to investigations into the orientation of biflagellates in shear flows \cite{omalley2012}, there has been a lot of interest into modelling biological swimmers. This interest has been extended recently towards understanding and developing novel microswimmers. Topical examples of these involve studies into the microscale flow dynamics of ribbons and sheets \cite{montenegro201}, and the modelling of self-propelling toroidal swimmers based on the hypotheses of Taylor and Purcell \cite{huang2017}, as well as the study of phoretic toroidal swimmers \cite{schmieding2017}. Such works have the potential to enable the use of targeted drug delivery, amongst other things, through being able to guide microswimmers through complex biological environments \cite{montenegro2018}, and improve diagnostics and management of male infertility by analysis of imaging data. Of particular recent interest is the collective behaviours of microswimmers. The differences in these behaviours appear to have significant biological implications, an example of which is the collective swimming of bovine sperm in the presence of viscoelasticity, behaviour which is not apparent in a purely viscous fluid \cite{tung2017}. Other species of sperm exhibit collective behaviours which impact both swimming and the ability to effectively fertilise the egg, some species of opossum sperm are often seen swimming as a cooperative pair \cite{cripe2016}. In addition to collective behaviours, the effects of interactions with other particles and/or boundaries have been recently shown to create interesting dynamics \cite{simons2014,lushi2017,shum2017,zottl2017}. While each of the models presented above are in some sense idealised, the ability to further reduce detailed swimmer models to simplified representations provides the opportunity for extracting significant scientific information which may not be accessible otherwise. Such models allow for creation of a coarse-grained representation of a swimmer \cite{ishimoto2017} reducing complex behaviour into a set of swimming `modes' and their associated limit cycles. Detailed fluid dynamic modelling can also allow for calculation of parameters for continuum models \cite{pedley1990} and give understanding of hidden aspects of swimmers' characteristics such as energy transport along a flagellum \cite{gaffney2011} or internal moment generation \cite{brokaw1971}, as well as providing insight into the exact mechanisms for the collective swimming behaviours mentioned above. Numerical methods are generally required to model finite amplitude motions, wall effects and swimmer-swimmer interactions. A range of numerical approaches exist, with perhaps the most extensively-studied being those based on singular, or regularized singular solutions of the Stokes flow equations, specifically resistive force theory \cite{gray1955}, slender body theory \cite{higdon1979}, boundary integral methods \cite{phan1987}, and regularized Stokeslet methods \cite{cortez2005,gillies2009,shankar2015,rostami2016}. These techniques remove the need to mesh the volume of fluid, requiring only the solution of integral equations formulated on the surface of the swimming body/bodies and lines such as cilia and flagella, reducing both the cost of meshing/remeshing a continually moving domain, and the number of degrees of freedom of the resulting linear system. Other techniques can be used to perform computational analysis of swimmers, such as the use of the force coupling method to investigate the dynamics of suspensions of up to $1000$ swimmers \cite{schoeller2018}, and the immersed boundary method \cite{peskin2002} for understanding the role of fluid elastic stress on flagellar swimming \cite{li2017}. As reviewed recently \cite{smith2018}, regularized Stokeslet methods have the further major advantage of removing the need to evaluate weakly-singular surface integrals, and enabling slender bodies such as cilia and flag To improve on the computational efficiency of the regularized Stokeslet method while retaining most of its simplicity of implementation, a method was proposed by Smith \cite{smith2018}, involving taking a coarser discretisation for the unknown traction than that used for numerical quadrature of the kernel, enabled by the use of nearest-neighbour discretisation. The method proved significantly more accurate for significantly lower computational cost, potentially enabling more complex and realistic problems to be investigated with given computational resources. In this article we generalise the nearest-neighbour discretisation three dimensional regularized Stokeslet method to inertialess locomotion, in particular focusing on uniflagellate pushers modelling human sperm and a model biflagellate. In section~\ref{sec:fsp} we will briefly review the mathematical definition of the inertialess free-swimming problem in the boundary integral formulation. In section~\ref{sec:nnd} we implement the nearest-neighbour discretisation of the free-swimming problem with a single swimmer in an unbounded fluid. We then formulate the task of tracking the trajectory of the cell as an initial-value problem. The discretisation is then generalised in section~\ref{sec:generalisation} to incorporate rigid boundaries and multiple swimming cells. Finally, in section~\ref{sec:results} we present the results of numerical experiments with uniflagellate and biflagellate swimmers, and in section~\ref{sec:discussion} we discuss the method and further practical applications. Key aspects of the implementation in Matlab\textsuperscript{\textregistered}/GNU Octave are given, and a \verb@github@ repository is provided with the full code necessary to generate the results in the report, as well as templates for applying the method to novel problems in very low Reynolds number locomotion. \section{The free-swimming problem}\label{sec:fsp} The dynamics of a Newtonian fluid at very low Reynolds numbers, associated with locomotion of cells, is described by the Stokes flow equations. The dimensionless form of the equations is, \begin{equation} -\bm{\nabla}p+\nabla^2\bm{u}=0, \quad \nabla \cdot \bm{u}=0,\label{eq:stokes} \end{equation} augmented with the no-slip, no-penetration boundary condition \(\bm{u}(\bm{X})=\dot{\bm{X}}\) for boundary points \(\bm{X}\), where overdot denotes time-derivative. We note here that, for the kinematic-driven problems in the present paper, the viscosity term has been non-dimensionalised out of the PDE; for a force-driven problem the viscosity term would appear in the dimensionless group (the sperm number). Initially we will consider a single swimmer in a three dimensional unbounded fluid which is stationary at infinity. Two classical problems in Stokes flow are the \emph{resistance problem} -- which involves calculating the force and moment on a rigid body made to translate and rotate in stationary fluid, and the \emph{mobility problem} -- which involves calculating the rigid body motion due to an imposed force and moment. The free-swimming problem in Stokes flow is a variant of the mobility problem. Rather than -- or perhaps in addition to -- the body being driven by imposed forces, it translates and rotates as a result of changing its shape. In this section we will briefly review this problem, which has been solved numerically in many previous studies, and introduce our notation. As usual for the regularized Stokeslet method, the fluid velocity \(u_j\) at location \(\bm{x}\) (suppressing time-dependence) is approximated by a surface integral over the surface \(\partial D\) of the swimmer, \begin{equation} u_i(\bm{x}) \approx- \frac{1}{8\pi} \iint_{\partial D} S_{ij}^{\epsilon}(\bm{x},\bm{X})f_j(\bm{X})dS_{\bm{X}}. \label{eq:rsbi} \end{equation} The regularisation error associated with equation~\eqref{eq:rsbi} has been discussed previously \cite{cortez2005} and will not be reviewed here. In this paper we will treat the approximation as exact. The surface of the body will undergo motions that may be described by a model formulated in a body frame -- for example a frame in which the head of the cell does not move. If the body frame coordinates are \(\bm{\xi}\), and the body frame is described by the matrix of basis vectors (equivalently a rotation matrix) \(\bm{B}=(\bm{b}^{(1)}|\bm{b}^{(2)}|\bm{b}^{(3)})\) and origin \(\bm{x}_0\) then the laboratory frame coordinates and velocities are, \begin{align} \bm{x} & = \bm{x}_0+\bm{B}\cdot \bm{\xi}, \\ \dot{\bm{x}} & = \dot{\bm{x}}_0 + \dot{\bm{B}}\cdot \bm{\xi} + \bm{B}\cdot\dot{\bm{\xi}}. \end{align} Denoting the rigid body velocity and angular velocity of the frame by \(\bm{U}\) and \(\bm{\Omega}\) respective, we then have, \begin{align} \bm{x} & = \bm{x}_0 + \bm{B}\cdot \bm{\xi}, \\ \dot{\bm{x}} & = \bm{U} + \bm{\Omega}\times (\bm{x}-\bm{x}_0) + \bm{B}\cdot\dot{\bm{\xi}}. \end{align} Applying the condition \(\bm{u}(\bm{x})=\dot{\bm{x}}\) on \(\partial D\) in equation~\eqref{eq:rsbi} yields the regularized Stokeslet boundary integral equation, \begin{equation} - \frac{1}{8\pi} \iint_{\partial D} S_{ij}^{\epsilon}(\bm{x},\bm{X})f_j(\bm{X})dS_{\bm{X}} = \dot{x}_i, \quad \mbox{all} \quad \bm{x} \in \partial D, \label{eq:rsbie} \end{equation} where it is understood that repeated indices (such as \(j\) in the above) are summed over, and unrepeated indices (such as \(i\) in the above) range over \(\{1,2,3\}\). If at time \(t\), the body frame origin \(\bm{x}_0\) and orientation \(\bm{B}\) are known, and a model is given for the swimmer shape \(\bm{\xi}\) and motion \(\dot{\bm{\xi}}\) in the body frame, then then unknowns of the problem are the surface traction \(\bm{f}(\bm{X})\) for \(\bm{X}\in \partial D\), the translational velocity \(\bm{U}\) and angular velocity \(\bm{\Omega}\). The problem is closed by augmenting equation~\eqref{eq:rsbie} with the force and moment balance equations; here we assume that the inertia and moment of inertia of the swimmer are negligible. The full problem is then given by, \begin{equation}\label{eq:swimprob} \begin{aligned} - U_i - \epsilon_{ijk} \Omega_j (x_k-x_{0k}) - \frac{1}{8\pi} \iint_{\partial D} S_{ij}^{\epsilon}(\bm{x},\bm{X})f_j(\bm{X})dS_{\bm{X}}, & = B_{ij} \dot{\xi}_j \quad \mbox{all} \quad \bm{x} \in \partial D, \\ \iint_{\partial D} f_i(\bm{X})dS_{\bm{X}} & = 0, \\ \iint_{\partial D} \epsilon_{ikj}X_k f_j(\bm{X}) dS_{\bm{X}} & = 0, \end{aligned} \end{equation} where \(\epsilon_{ijk}\) is the Levi-Civita symbol Numerical discretisation of the problem~\eqref{eq:swimprob} will in general involve \(N\) vector degrees of freedom for the traction \(\bm{f}\), three unknowns for the components of the translational velocity \(\bm{U}\) and three unknowns for the components of the angular velocity \(\bm{\Omega}\), totalling \(3N+6\) scalar unknowns in total. Through numerical collocation, problem~\eqref{eq:swimprob} can be formulated as \(3N+6\) linear equations. In the next section we will describe a nearest-neighbour regularized Stokeslet discretisation of this problem. \section{Nearest-neighbour discretisation}\label{sec:nnd} \subsection{A single swimmer in an unbounded fluid}\label{sec:singleUnbounded} The discretisation of the regularized Stokeslet method is discussed in detail in \cite{smith2018}; in brief we suggest that a good balance of ease-of-implementation and numerical efficiency can be achieved by discretising the integrals via a quadrature rule, with the key modification of using a finer discretisation for the rapidly-varying regularised Stokeslet and a coarser discretisation for the more slowly-varying traction. A simple way to achieve this is through nearest-neighbour interpolation of the traction. The resulting method contains the original and extensively-used method of Cortez and colleagues \cite{cortez2005} as the limiting case in which the discretisations are equal. Replacing the integrals in problem~\eqref{eq:swimprob} with numerical quadrature yields the discrete problem, \begin{equation}\label{eq:swimprobnystrom} \begin{aligned} - U_i - \epsilon_{ij\ell} \Omega_j (x_k[m]-x_{0k}) - \frac{1}{8\pi} \sum_{q=1}^Q S_{ij}^\epsilon(\bm{x}[m],\bm{X}[q]) f_j(\bm{X}[q]) dS(\bm{X}[q]) & = B_{ij} \dot{\xi}_j[m] , \\ & \mbox{for} \quad m=1,\ldots, N, \\ \sum_{q=1}^Q f_i(\bm{X}[q]) dS(\bm{X}[q]) & = 0, \\ \sum_{q=1}^Q \epsilon_{ikj}X_k[q] f_j(\bm{X}[q]) dS(\bm{X}[q]) & = 0, \end{aligned} \end{equation} where \(dS(\bm{X}[q])\) denotes the quadrature weight associated with the local surface metric. The coarse traction discretisation will be denoted as \(\{\bm{x}[1],\ldots,\bm{x}[N]\}\) and the finer quadrature discretisation as \(\{\bm{X}[1],\ldots,\bm{X}[Q]\}\); the \(Q\times N\) nearest-neighbour matrix is then \begin{equation} \mathsf{\nu}[q,n]=\begin{cases} 1 \quad \mbox{if} \quad n = \underset{\hat{n}=1,\ldots,N}{\mbox{argmin}} \, |\bm{x}[\hat{n}]-\bm{X}[q]|, \\ 0 \quad \mbox{otherwise}. \end{cases} \end{equation} A subtlety here concerns the calculation of the nearest-neighbour matrix when dealing with time-evolving geometries, and in particular the case when different bodies approach closely. As an example consider the case of a biflagellate swimmer: as the flagellum gets close to the body there is the potential for a quadrature point on the body to have a nearest force point on the flagellum (or \textit{vice versa}) leading to incorrect calculation of the traction at these points. For rigid bodies this is easily solved by calculating the nearest-neighbour matrix carefully at a single time point, before the bodies closely approach, and then treating $ \nu $ as constant in time. Alternatively one can calculate a time-evolving $ \nu $ on a body-by-body basis, considering separately (for example) the discretisations of a flagellum, cell body and any boundaries. Defining \(g_i[n]:=-f_i(\bm{x}[n])\); the nearest-neighbour interpolation of the traction then corresponds to \(-f_i(\bm{X}[q]) dS(\bm{X}[q]) \approx\sum_{n=1}^N \mathsf{\nu}[q,n] g_i[n] dS(\bm{x}[n])\). Applying this interpolation to problem~\eqref{eq:swimprobnystrom} yields, \begin{equation} \begin{aligned} \frac{1}{8\pi} \sum_{n=1}^N g_j[n] dS(\bm{x}[n]) \sum_{q=1}^Q S_{ij}^\epsilon(\bm{x}[m],\bm{X}[q]) \mathsf{\nu}[q,n] & - U_i - \epsilon_{ijk} \Omega_j (x_k[m]-x_{0k}) \\ & = B_{ij} \dot{\xi}_j[m] , \quad \mbox{for} \quad m=1,\ldots, N, \\ \sum_{n=1}^N g_j[n] dS(\bm{x}[n]) \sum_{q=1}^Q \delta_{ij} \nu[q,n] & = 0, \\ \sum_{n=1}^N g_j[n] dS(\bm{x}[n]) \sum_{q=1}^Q \epsilon_{ikj}X_k[q] \nu[q,n] & = 0. \end{aligned}\label{eq:swimprobnn} \end{equation} Computationally, problem~\eqref{eq:swimprobnn} corresponds to \(3N+3+3\) linear equations in \(3N+3+3\) scalar unknowns (\(F_j[n] := g_j[n] dS(\bm{x}[n])\) for \(n=1,\ldots,N\), followed by \(U_j\) and \(\Omega_j\)). These equations can be expressed in block form as, \begin{equation} \begin{pmatrix} \, \\[0.5em] \, & A_{11}^S & \, & A_{12}^S & \, & A_{13}^S & \, & A_1^U & A_1^\Omega \\[3.9em] \, & A_{21}^S & \, & A_{22}^S & \, & A_{23}^S & \, & A_2^U & A_2^\Omega \\[3.9em] \, & A_{31}^S & \, & A_{32}^S & \, & A_{33}^S & \, & A_3^U & A_3^\Omega \\[2.0em] \, & A_1^F & \, & A_2^F & \, & A_3^F & \, & & \\[0.5em] \, & A_1^M & \, & A_2^M & \, & A_3^M & \, & & \\[0.2em] \end{pmatrix} \begin{pmatrix} F_1[1] \\ \vdots \\[0.3em] F_1[N] \\[0.7em] F_2[1] \\ \vdots \\[0.3em] F_2[N] \\[0.7em] F_3[1] \\ \vdots \\[0.3em] F_3[N] \\[0.5em] \bm{U} \\[0.2em] \bm{\Omega} \end{pmatrix} = \begin{pmatrix} B_{1j}\dot{\xi}_j[1] \\ \vdots \\[0.2em] B_{1j}\dot{\xi}_j[N] \\[0.5em] B_{2j}\dot{\xi}_j[1] \\ \vdots \\[0.2em] B_{2j}\dot{\xi}_j[N] \\[0.5em] B_{3j}\dot{\xi}_j[1] \\ \vdots \\[0.2em] B_{3j}\dot{\xi}_j[N] \\[0.5em] \bm{0} \\[0.2em] \bm{0} \end{pmatrix} , \end{equation} where the blocks have entries given by, \begin{equation} \begin{aligned} A_{ij}^S\{m,n\} & = \frac{1}{8\pi}\sum_{q=1}^Q S_{ij}(\bm{x}[m],\bm{X}[q]) \nu[q,n] \quad & \mbox{for} \quad m,n=1,\ldots,N , \\ A_i^U\{m,j\} & = -\delta_{ij} \quad & \mbox{for} \quad m=1,\ldots, N, \\ A_i^\Omega\{m,j\} & = -\epsilon_{ijk} (x_k[m]-x_{0k}) \quad & \mbox{for} \quad m=1,\ldots, N, \\ A_j^F\{i,n\} & = \delta_{ij} \sum_{q=1}^Q \nu[q,n] \quad & \mbox{for} \quad n=1,\ldots, N, \\ A_j^M\{i,n\} & = \epsilon_{ikj} X_k \sum_{q=1}^Q \nu[q,n] \quad & \mbox{for} \quad n=1,\ldots, N, \end{aligned} \end{equation} and the velocity \(\bm{U}\) and angular velocity \(\bm{\Omega}\) are expressed as \(3\times 1\) column vectors. \subsection{Computing swimmer trajectories via an initial-value problem} The position and orientation of a swimmer can be expressed as a position vector and a frame of basis vectors \(\bm{b}^{(j)}\). Given \(\bm{b}^{(1)},\bm{b}^{(2)}\), we then have \(\bm{b}^{(3)}=\bm{b}^{(1)}\times\bm{b}^{(2)}\) so it is sufficient to formulate the problem in terms of two basis vectors only, or six scalar degrees of freedom. Of course, this formulation still contains redundant information -- three Euler angles constrain precisely the body frame, however the basis vector approach is very straightforward to implement. Noting that \begin{equation}\label{eq:trajectoryprob} \begin{aligned} \dot{\bm{x}}_0 & = \bm{U}(\bm{x}_0,\bm{b}^{(1)},\bm{b}^{(2)},t), \\ \dot{\bm{b}}^{(j)} & = \bm{\Omega}(\bm{x}_0,\bm{b}^{(1)},\bm{b}^{(2)},t)\times {\bm{b}}^{(j)}, \quad j=1,2, \end{aligned} \end{equation} we may then formulate the calculation of trajectories as a system of \(9\) ordinary differential equations, where evaluation of the functions \(\bm{U}(\bm{x}_0,\bm{b}^{(1)},\bm{b}^{(2)},t)\) and \(\bm{\Omega}(\bm{x}_0,\bm{b}^{(1)},\bm{b}^{(2)},t)\) involves solving the swimming problem~\eqref{eq:swimprob}, for example via the discretisation~\eqref{eq:swimprobnn}. The `outer' problem~\eqref{eq:trajectoryprob} can be solved using built-in functions such as \verb@ode45@ in Matlab\textsuperscript{\textregistered} or \verb@lsode@ in GNU Octave. For practical purposes, when using a built-in initial value problem solver such as \verb@ode45@, the tractions \(f_i(\bm{X})\), required to compute the rate of energy dissipation and the flow field, may not be automatically available. To record this information, we may introduce the variable \(H_i(\bm{X},t)\), defined by, \begin{equation}\label{eq:addivp} \begin{aligned} \dot{H}_i(\bm{x},t) & = f_i(\bm{x},t), \quad \bm{x}\in \partial D, \\ H_i(\bm{x},0) & = 0. \end{aligned} \end{equation} Augmenting the swimming problem~\eqref{eq:trajectoryprob} with equations~\eqref{eq:addivp} then yields an approximation to the force distribution available external to \verb@ode45@ by numerically differentiating \(H_i(\bm{x},t)\) with respect to time. \section{Generalisation: boundaries and multiple swimmers}\label{sec:generalisation} \subsection{Boundaries and fixed obstacles} Mammalian sperm usually migrate and fertilise within a thin film of viscous fluid between opposed surfaces, and are typically imaged between a microscope slide and coverslip. Indeed, the major effect of boundaries on microswimmer flow fields has long been recognised \cite{liron1981}. Therefore it is important to take boundary effects into account in fluid dynamic simulations. The `Blakelet' and its regularized counterpart found by Ainley and colleagues \cite{ainley2008} (see also recent work by Cortez) is an elegant and efficient way to model a single infinite plane boundary; certain other geometrically simple situations possess similar fundamental solutions. However, it is important for full generality to take into account more complex boundary, and perhaps also fixed obstacles, present in the flow. Representing the boundary by \(B\), the swimming problem becomes, \begin{equation}\label{eq:swimprobbdry} \begin{aligned} - U_i - \epsilon_{ijk} \Omega_j (x_k-x_{0k}) - \frac{1}{8\pi} \iint_{\partial D \cup B} S_{ij}^{\epsilon}(\bm{x},\bm{X})f_j(\bm{X})dS_{\bm{X}} & = B_{ij} \dot{\xi}_j , \quad \mbox{all} \quad \bm{x} \in \partial D, \\ - \frac{1}{8\pi} \iint_{\partial D \cup B} S_{ij}^{\epsilon}(\bm{x},\bm{X})f_j(\bm{X})dS_{\bm{X}} & = \dot{x}_i , \quad \mbox{all} \quad \bm{x} \in B , \\ \iint_{\partial D} f_i(\bm{X})dS_{\bm{X}} & = 0 , \\ \iint_{\partial D} \epsilon_{ijk}X_j f_k(\bm{X}) dS_{\bm{X}} & = 0 . \end{aligned} \end{equation} Numerically, we may represent the swimmer by the force points \(\{\bm{x}[1],\ldots,\bm{x}[N_s]\}\) and quadrature points \(\{\bm{X}[1],\ldots, \bm{X}[Q_s]\}\); the boundary is then discretised by the force points \(\{\bm{x}[N_s+1],\ldots,\bm{x}[N_s+N_b]\}\) and quadrature points \(\{\bm{X}[Q_s+1],\ldots, \bm{X}[Q_s + Q_b]\}\). Nearest neighbour discretisation then leads to a system of the form, \begin{equation} \begin{pmatrix} \, \\[0.5em] \, & A_{11}^S & \, & A_{12}^S & \, & A_{13}^S & \, & A_1^U & A_1^\Omega \\[3.9em] \, & A_{21}^S & \, & A_{22}^S & \, & A_{23}^S & \, & A_2^U & A_2^\Omega \\[3.9em] \, & A_{31}^S & \, & A_{32}^S & \, & A_{33}^S & \, & A_3^U & A_3^\Omega \\[2.0em] \, & A_1^F & \, & A_2^F & \, & A_3^F & \, & & \\[0.5em] \, & A_1^M & \, & A_2^M & \, & A_3^M & \, & & \\[0.2em] \end{pmatrix} \begin{pmatrix} \, \\[0.5em] F_1 \\[3.9em] F_2 \\[3.9em] F_3 \\[2.0em] \bm{U} \\[0.5em] \bm{\Omega} \\[0.2em] \end{pmatrix} = \begin{pmatrix} \, \\[0.5em] V_1 \\[3.9em] V_2 \\[3.9em] V_3 \\[2.0em] \bm{0} \\[0.5em] \bm{0} \\[0.2em] \end{pmatrix} . \label{eq:blockSystem} \end{equation} The blocks have entries given by, \begin{equation} \begin{aligned} A_{ij}^S\{m,n\} & = \frac{1}{8\pi}\sum_{q=1}^Q S_{ij}(\bm{x}[m],\bm{X}[q]) \nu[q,n] \quad \mbox{for} \quad m,n=1,\ldots,N , \\ A_i^U\{m,j\} & = \begin{cases} -\delta_{ij} \quad & \mbox{for} \quad m=1,\ldots, N_s, \\ 0 & \mbox{for} \quad m=N_s+1,\ldots, N_s+N_b, \end{cases} \\ A_i^\Omega\{m,j\} & = \begin{cases} -\epsilon_{ijk} (x_k[m]-x_{0k}) \quad & \mbox{for} \quad m=1,\ldots, N_s, \\ 0 & \mbox{for} \quad m=N_s + 1,\ldots, N_s+N_b, \end{cases} \\ A_j^F\{i,n\} & = \begin{cases} \delta_{ij} \sum_{q=1}^Q \nu[q,n] \quad & \mbox{for} \quad n=1,\ldots, N_s, \\ 0 \quad & \mbox{for} \quad n=N_s+1,\ldots, N_s+N_b, \end{cases} \\ A_j^M\{i,n\} & = \begin{cases} \epsilon_{ikj} X_k \sum_{q=1}^Q \nu[q,n] \quad & \mbox{for} \quad n=1,\ldots, N_s, \\ 0 \quad & \mbox{for} \quad n=N_s+1,\ldots, N_s+N_b, \end{cases} \end{aligned} \end{equation} where the total number of force unknowns is $N = N_s + N_b$, the symbols \(F_j\) denote \((N_s+N_b)\times 1\) vectors of scalar unknowns \(F_j[1],\ldots,F_j[N_s+N_b]\), and the right hand sides are given by, \begin{equation} V_i[n] = \begin{cases} B_{ij}\dot{\xi}_j[n] , \quad & \mbox{for} \quad n=1,\ldots, N_s, \\ 0 , \quad & \mbox{for} \quad n=N_s+1, \ldots, N_s+N_b. \end{cases} \end{equation} \subsection{Multiple swimmers}\label{sec:multiple} The last situation we will consider is where there are multiple swimmers --- which are not necessarily discretised by equal size sets --- as well as a boundary. The numerical discretisation is somewhat more complicated, and so we modify our notation in an attempt to make the implementation more interpretable. Suppose that we now have \(N_{sw}\) swimmers, described by collocation points with \(i\)th components \(x_i^{(1)}[\cdot],\ldots, x_i^{(N_{sw})}[\cdot]\), their translational and angular velocities being denoted \(U_i^{(1)},\ldots, U_i^{(N_{sw})}\) and \(\Omega_i^{(1)},\ldots, \Omega_i^{(N_{sw})}\); the boundary points will be denoted by the array \(x_i^{(b)}[\cdot]\). The discretisation will follow the ordering convention, \begin{equation} \mathsf{x} = \begin{pmatrix} \mathsf{x}_1\{\cdot\},\quad \mathsf{x}_2\{\cdot\},\quad\mathsf{x}_3\{\cdot\} \end{pmatrix}^T, \quad\text{with}\quad \mathsf{x}_i\{\cdot\} = \begin{pmatrix} x_i^{(1)}[\cdot],\quad \hdots,\quad x_i^{(N_{sw})}[\cdot],\quad x_i^{(b)}[\cdot] \end{pmatrix}^T, \end{equation} which is inherited by the right hand side velocities and the force discretisation. If the number of force points associated with swimmer \(r\) is \(N_s(r)\), and the number of force points associated with the boundary is \(N_b\), then the number of vector force unknowns is \(N_f=\sum_{r=1}^{N_{sw}} N_s(r)+N_b\). The size of \(\mathsf{x}\) is then \(3N_f\) and the total number of scalar degrees of freedom in the system is \(3N_f + 6N_{sw}\). We will define the index \(\iota(r)\) to be the location of the \(r\)th swimmer in the \(\mathsf{x}_i\) vector, with \(\iota(1)=1\) and \(\iota(r)=\sum_{\gamma=1}^{r-1} N_{s}(\gamma)\) for \(1<r\leqslant N_{sw}\). The quadrature points may be denoted \(\bm{X}[1],\ldots, \bm{X}[Q]\) as previously; the Stokeslet matrix is then constructed as, \begin{equation} A_{ij}^S\{\alpha,\beta\} = \frac{1}{8\pi} \sum_{q=1}^Q S_{ij} (\mathsf{x}_i[\alpha], \bm{X}[q] ) \nu[q,\beta], \quad \mbox{for} \quad \alpha, \beta = 1,\ldots,N_f. \end{equation} To construct the remaining blocks, we introduce the notation \(\mathbf{1}^{(n)}\) to be the column vector of length \(n\) with every entry equal to \(1\) and \(\mathbf{0}^{(m\times n)}\) to be the \(m\times n\) matrix of zeros. We also define the \(N_f\times N_{sw}\) matrices, \begin{equation} \tilde{x}_i\{\cdot,\cdot\} = \begin{pmatrix} \, & & \\[0.5em] x_i^{(1)}[\cdot]-x_{0i}^{(1)} & & \\[2.0em] & \ddots & \\[2.0em] & & x_i^{(N_{sw})}[\cdot]-x_{0i}^{(N_{sw})} \\[3.0em] & \, \mathbf{0}^{(N_b\times N_{sw})} & \\[3.0em] \end{pmatrix}. \end{equation} Then, \begin{equation} A^U = I_3 \otimes \begin{pmatrix} \, & & \\[0.5em] -\mathbf{1}^{(N_s(1))} & & \\[2.0em] & \ddots & \\[2.0em] & & -\mathbf{1}^{(N_s(N_{sw}))}\\[3.0em] & \, \mathbf{0}^{(N_b\times N_{sw})} & \\[3.0em] \end{pmatrix},\quad\text{and}\quad A^\Omega = \begin{pmatrix} & \, & \\[0.5em] & - \tilde{x}_3\{\cdot,\cdot\} & \tilde{x}_2\{\cdot,\cdot\} \\[2.0em] \tilde{x}_3\{\cdot,\cdot\} & & -\tilde{x}_1\{\cdot,\cdot\} \\[2.0em] -\tilde{x}_2\{\cdot,\cdot\} & \tilde{x}_1\{\cdot,\cdot\} & \\[2.0em] \end{pmatrix}, \end{equation} with \(\otimes\) denoting the Kronecker product. Recalling that \(\nu[\cdot,\cdot]\) denotes the nearest-neighbour matrix, we define the \(N_s(r) \times 1\) column vectors, \begin{equation} \begin{aligned} \lambda^{(r)}[\cdot] & = \sum_{q=1}^Q \nu[q,\iota(r):\iota(r+1)-1], \\ \chi_j^{(r)}[\cdot] & = \sum_{q=1}^Q X_j(q) \nu[q,\iota(r):\iota(r+1)-1], \end{aligned} \end{equation} and the \(N_{sw}\times N_f\) matrices, \begin{equation} \tilde{\chi}_j \{\cdot,\cdot\} = \begin{pmatrix} \quad \chi_j^{(1)T}[\cdot] \quad & & & \\ & \ddots & & \quad \mathbf{0}^{(N_{sw}\times N_{b})} \quad \\ & & \quad \chi_j^{(N_{sw})T}[\cdot] \quad & \end{pmatrix}. \end{equation} Then the \(3N_{sw} \times 3N_f\) blocks \(A^F\) and \(A^M\) are, \begin{equation} \begin{aligned} A^F & = I_3 \otimes \begin{pmatrix} \quad \lambda^{(1)T}[\cdot] \quad & & & \\ & \ddots & & \quad \mathbf{0}^{(N_{sw}\times N_{b})} \quad \\ & & \quad \lambda^{(N_{sw})T}[\cdot] \quad & \end{pmatrix}, \\ A^M & = \begin{pmatrix} \, & & \\ & \quad -\tilde{\chi}_3 \quad & \quad \tilde{\chi}_2 \quad \\[1.0em] \quad \tilde{\chi}_3 \quad & & \quad -\tilde{\chi}_1 \quad \\[1.0em] \quad -\tilde{\chi}_2 \quad & \quad \tilde{\chi}_1 \quad \\ & & \, \end{pmatrix}. \end{aligned} \end{equation} Finally, denoting the orientation matrix of the \(r\)th swimmer by \(B_{ij}^{(r)}\) and its body frame waveform as \(\xi_j^{(r)}\), the terms of the right hand side take the form, \begin{equation} V_i = \begin{pmatrix} V_i^{(1)}[\cdot],\quad \hdots,\quad V_i^{(N_{sw})}[\cdot],\quad\mathbf{0}^{(N_{sw}\times 1)}\end{pmatrix}^T, \end{equation} where \begin{equation} V_i^{(r)}[n] = B_{ij}^{(r)} \dot{\xi}_j^{(r)}[n]. \end{equation} Now that we have defined \(A_{ij}^S\), \(A^U\), \(A^{\Omega}\), \(A^F\), \(A^M\) and \(V_i\), the \(3(N_f+2)\times 3(N_f+2)\) linear system is of the form given by equation~\eqref{eq:blockSystem}. \section{Results and analysis}\label{sec:results} We now turn our attention to the application of this method to two model problems: (1) a single biflagellate swimming in an infinite fluid, and (2) multiple sperm cells swimming between two boundaries. The implementation for both these model problems is provided in the associated github repository. After presenting the results for these swimming problems we will discuss the convergence of the method for the two types of swimmer provided and compare with the results obtained through the classic Nystr\"om discretisation (when the force and quadrature discretisations are the same). \subsection{Biflagellate in an infinite fluid} \label{sec:biflagellate} We will first apply the algorithm in section~\ref{sec:singleUnbounded} to model a biflagellate, superficially similar to various marine algae, swimming in an unbounded fluid. We model the beat pattern of the cell (figure~\ref{fig:chlamy}a) following Sartori et al \cite{sartori2016}, writing the flagellar tangent angle $ \psi $ in the form \begin{equation} \psi\left(s,t\right) = \psi_0\left(s\right) - \psi_1\left(s\right)\cos{\left(t + \phi\left(s\right)\right)}, \end{equation} where $ s $ and $ t $ are dimensionless arclength along the flagellum and time respectively. We find that choosing \begin{equation} \psi_0\left(s\right) = -2.5 s,\quad \psi_1 = 0.7 + 0.15\sin\left(2\pi s\right),\quad \phi\left(s\right) = -2\pi s,\quad 0 \leq s \leq 1, \end{equation} provides a sufficiently representative test case for the computational algorithm. Of course a more realistic beat for a genuine biflagellate species such as \emph{Chlamydomonas reinhardtii} could be appended as required. The two flagella are synchronised; for the force discretisation, 40 points are used to discretise each flagellum, and 96 points are used for the cell body, totalling \(176\) vector degrees of freedom (figure~\ref{fig:chlamy}). For the quadrature discretisation, \(400\) points are used for each flagellum, and \(600\) points for the cell body, giving a total of \(1400\) quadrature points (figure~\ref{fig:chlamy}b). The regularisation parameter is chosen as $ \epsilon = 0.25/20$ to represent the radius of the flagellum (scaled with flagellar length). Results showing the displacement of the swimming cell are shown in figure~\ref{fig:chlamy}c, and the flow field at three points of the beat in figure~\ref{fig:chlamy}d, \ref{fig:chlamy}e and \ref{fig:chlamy}f. The latter calculation can be carried out in a `post-processing' step from the computed swimmer position, orientation and force distribution. To further visualise the flow we have included in figures \ref{fig:chlamy}g and \ref{fig:chlamy}h a selection of streamlines plotted over the fluid velocity. While the figures show a 2D projection, the computation is fully three-dimensional, and the instantaneous flow field on any (finite) subset of \(\mathbb{R}^3\) can be computed. The computation and creation of figure~\ref{fig:chlamy} required \(33.4\)~s on a desktop computer (2017 Lenovo Thinkstation P710; Intel(R) Xeon(TM) E5-2646 CPU @ 2.40GHz; 128GB 2400 MHz RDIMM RAM). \begin{figure} \centering \includegraphics[width=\textwidth]{fig1.pdf} \caption{\footnotesize{Computational results for a free-swimming model biflagellate in an unbounded fluid, implemented with the script \texttt{GenerateSwimmingFigureChlamy.m} (a,b) Model biflagellate showing beat pattern, visualised via (a) force discretisation, (b) quadrature discretisation. (c) $x_2$ coordinate of free-swimming cell over five beat cycles, where positive $x_2$ is the overall swimming direction. (d,e,f) computed flow fields at (d) $t=2\pi/3$, (e) $t=4\pi/3$ and (f) $t=2\pi$ (three points during the beat cycle). (g,h) computed velocity profile with streamlines at $t = 0$, cross sections of the (g) $\left(x_1,x_2\right)$ and (h) $\left(x_2,x_3\right)$ planes respectively.}} \label{fig:chlamy} \end{figure} \subsection{Sperm between two opposed surfaces} \label{sec:sperm} We now turn our attention to the more general problem of section~\ref{sec:multiple} involving multiple swimming cells and boundaries. The computational domain contains two no-slip square surfaces with sides of length \(3L\), separated by a distance \(0.4L\), where \(L\) is the flagellar length (for human sperm typically \(L\approx 45\)~\(\mu\)m). The swimmer heads are ellipsoids with axes of length $0.044L$, $0.036L$ and $0.022L$. The flagellar movement is based on the classic planar `activated' beat of Dresdner \& Katz \cite{dresdner1981}; the sperm head (cell body) is a scalene ellipsoid. Figures~\ref{fig:sperm}a and \ref{fig:sperm}b show the beat pattern via the force and quadrature discretisations respectively. The force discretisation consists of \(136\) points per cell and \(480\) points for the boundary, totalling \(3480\) scalar degrees of freedom for a simulation with five cells. The quadrature discretisation consists of \(700\) points per swimmer and \(1920\) points for the boundary, totalling \(5420\) quadrature points. The regularisation parameter is chosen as $ \epsilon = 0.25/45$ to represent the radius of the flagellum (scaled with flagellar length). The computation shown in figure~\ref{fig:sperm} involves tracking five cells each with slightly perturbed beat cycle and head morphology parameters, swimming mid-way between the no-slip boundaries described above (visualised in figure~\ref{fig:sperm}c), for five beat cycles. Figure~\ref{fig:sperm}d shows the cell trajectories, and figures~\ref{fig:sperm}d and \ref{fig:sperm}e show the cell positions, orientations and surrounding flow fields at two distinct time points. To further visualise the flow we have included in figures \ref{fig:sperm}g and \ref{fig:sperm}h a selection of streamlines plotted over the fluid velocity. The calculated dimensionfull swimmer velocity is $ \approx 43~\mu\mathrm{m s}^{-1} $, this is comparable to the results of Smith \textit{et al.} \cite{smith2009} who report a numerical calculation of the speed of a sperm with the same waveform, swimming at a distance $0.2$ flagellar lengths from a surface, as $\approx 42~\mu\mathrm{m s}^{-1}$. While the computation was more intensive than that described in the previous section, it was still easily within reach of the same computer, requiring $127~s$ of wall time. \begin{figure} \centering \includegraphics[width=\textwidth]{fig2} \caption{\footnotesize{Computational results for a group of free-swimming model sperm swimming midway between two opposed no-slip surfaces separated by \(0.4\) flagellar lengths, implemented with the script \texttt{GenerateSwimmingFigureSperm.m} (a,b) Model sperm showing beat pattern of Dresdner \& Katz \cite{dresdner1981}, visualised via (a) force discretisation, (b) quadrature discretisation. (c) Visualisation of sperm placed between the discretised boundaries (note that the sperm heads appear rounder than they actually are due to the aspect ratio chosen for plotting). (d) Trajectories of free-swimming cells over five beat cycles. (e,f) computed cell positions (with 5 randomly-perturbed beat cycles and head dimensions), and flow fields at (e) \(t=0\) and (f) \(t=2.5\)~cycles. (g,h) computed velocity profile with streamlines of a single sperm at \(t=0\), cross sections of the (g) $\left(x_1,x_2\right)$ and (h) $\left(x_1,x_3\right)$ planes respectively.}}\label{fig:sperm} \end{figure} \subsection{Convergence of the method with discretisation refinement} \label{sec:convergence} A practical refinement heuristic for assessing the convergence (with increased discretisation) of the nearest neighbour method is given by Smith \cite{smith2018}. For testing the convergence of the present swimming problems we denote the maximum discretisation spacings from \cite{smith2018} as \begin{align} h_f = \max_{m=1,\hdots,N} \min_{\substack{n = 1,\hdots,N\\ n \neq m}} \left\lvert \bm{x}\left[m\right] - \bm{x}\left[n\right]\right\rvert,\quad h_q = \max_{p=1,\hdots,Q} \min_{\substack{q = 1,\hdots,Q\\ q \neq p}} \left\lvert \bm{X}\left[p\right] - \bm{X}\left[q\right]\right\rvert. \end{align} In the present work we note that we may have different discretisations for each swimmer, and indeed for each component of a single swimmer (the head and flagellum may be discretised differently for example). To this end we apply the existing convergence heuristic in stages as outlined in table \ref{tab:heuristic}. To measure the convergence we compare the straight line distance travelled over one full beat of the swimmer's flagellum. In contrast to the classical (Nystr\"{o}m) discretisation \cite{cortez2005}, there is no tight coupling between the regularisation parameter $\epsilon$ and the discretisation length scales \cite{smith2018}. As a consequence of this we allow the choice of regularisation parameter $ \epsilon $ to be guided by the geometry of the swimmer (chosen here to be related to the dimensions of the flagellum). \begin{table}[t] \caption{Heuristic for analysing the convergence of the results.} \label{tab:heuristic} \hrulefill \begin{enumerate} \item Generate an initial force and quadrature discretisation for the swimmer head $ h_f^H $ and $ h_q^H $. \item Assess convergence by the heuristic in \cite{smith2018} through varying the flagellar discretisations $ h_f^F $ and $ h_q^F $. \item Generate a more refined head quadrature discretisation by halving $ h_q^H $ and repeat step 2. \item Generate a more refined head force discretisation by halving $ h_f^H $ and repeat step 2. \item Repeat steps 3 and 4 until a suitable level of convergence is reached. \end{enumerate} \hrulefill \end{table} \begin{table}[!htp] \footnotesize \centering \caption{New nearest-neighbour convergence results: Straight line distance traveled by a single biflagellate swimmer, as described in \S\ref{sec:biflagellate}, after one complete flagellar beat cycle. Here, the discretisation for the cell head is fixed with $ N^H = 96 $ and $ Q^H = 600 $ force and quadrature points respectively. The number of points discretising the flagellum have been chosen following the convergence algorithm in table \ref{tab:heuristic}, with the regularisation parameter $ \epsilon = 0.25/20 $ being the ratio between flagellar radius and length. When $ N^F > Q^F $ a singular linear system is formed, this is denoted by the entry `NaN' (`not-a-number'). (a) Distance traveled by the swimmer, (b) and (c) show the percentage change in this distance when halving $ h_f^F $ and $h_q^F $ respectively.} \label{tab:chlamy1} \subtable[\ Distance traveled in multiples of $ \left(\text{flagellar length}\right)\cdot 10^{-2} $]{ \begin{tabular}{ l l l l l| l l l l } & & & & \multicolumn{1}{r|}{$Q^H$} & $600$ & $600$ & $600$ & $600$ \\ & & & & \multicolumn{1}{r|}{$h_q^H$}& $0.1137$ & $0.1137$ & $0.1137$ & $0.1137$ \\ & & & & \multicolumn{1}{r|}{$Q^F$} & $100$ & $200$ & $400$ & $800$ \\ DOF & $N^H$ & $h_f^H$ & $N^F$ & \diagbox{$h_f^F$}{$ h_q^F$} & $0.09767$ & $0.04859$ & $0.02424$ & $0.01210$ \\ \hline $ 528 $ & $ 96 $ & $0.2272$ & $ 40 $ & $ 0.2479 $ & $ 5.521 $ & $ 5.521 $ & $ 5.526 $ & $ 5.527 $ \\ $ 768 $ & $ 96 $ & $0.2272$ & $ 80 $ & $ 0.1224 $ & $ 5.503 $ & $ 5.501 $ & $ 5.498 $ & $ 5.498 $ \\ $ 1248 $ & $ 96 $ & $0.2272$ & $ 160 $ & $ 0.06082 $ & NaN & $ 5.504 $ & $ 5.503 $ & $ 5.502 $ \\ $ 2208 $ & $ 96 $ & $0.2272$ & $ 320 $ & $ 0.03032 $ & NaN & NaN & $ 5.487 $ & $ 5.432 $ \end{tabular} } \subtable[\ Percentage change in distance traveled when halving $ h_f^F $]{ \begin{tabular}{ l | l l l l l} \diagbox{$h_f^F$}{$ h_q^F$} & $0.09767$ & $0.04859$ & $0.02424$ & $0.01210$ \\ \hline $ 0.1224 $ & $ 0.32\%$ & $ 0.37\% $ & $ 0.49\% $ & $ 0.52\% $ \\ $ 0.06082 $ & & $ 0.06\% $ & $ 0.08\% $ & $ 0.08\% $\\ $ 0.03032 $ & & & $ 0.29\% $ & $ 1.28\% $ \end{tabular} }\qquad\qquad \subtable[\ Percentage change in distance traveled when halving $ h_q^F $]{ \begin{tabular}{ l | l l l l} \diagbox{$h_f^F$}{$ h_q^F$} & $0.04859$ & $0.02424$ & $0.01210$\\ \hline $ 0.2479 $ & $ 0.01\% $ & $ 0.08\% $ & $ 0.02\% $ \\ $ 0.1224 $ & $ 0.03\% $ & $ 0.05\% $ & $ 0.01\% $ \\ $ 0.06082 $ & & $ 0.02\% $ & $ 0.01\% $ \\ $ 0.03032 $ & & & $ 1.00\% $ \end{tabular} } \end{table} \begin{table}[!htp] \centering \caption{Nystr\"om (classical) regularised Stokeslet convergence results for comparison purposes: Straight line distance traveled by a single biflagellate swimmer, as described in \S\ref{sec:biflagellate}, after one complete flagellar beat cycle with the Nystr\"om discretisation. The number of points have been chosen following the convergence algorithm in table \ref{tab:heuristic}, with the regularisation parameter $ \epsilon = 0.25/20 $ being the ratio between flagellar radius and length. (a) Distance traveled by the swimmer, (b) and (c) show the percentage change in this distance when doubling $ N^H $ and $N^F$ respectively.} \label{tab:chlamyNys} \subtable[\ Distance traveled in multiples of $ \left(\text{flagellar length}\right)\cdot 10^{-2} $]{ \begin{tabular}{ l| l l l l l} \diagbox{$N^H$}{$N^F$} & $ 40 $ & $ 100 $ & $ 200 $ & $ 400 $\\ \hline $ 96 $ & $ 6.542 $ & $7.148$ & $7.151$ & $7.165$\\ $ 600 $ & $ 5.320 $ & $5.794$ & $5.803$ & $5.819$\\ $ 2646 $ & $ 5.105 $ & $5.554$ & $5.563$ & $5.578$ \end{tabular} } \subtable[\ Percentage change in distance traveled when doubling $ N^F $]{ \begin{tabular}{ l| l l l l l} \diagbox{$N^H$}{$N^F$} & $ 100 $ & $ 200 $ & $ 400 $\\ \hline $ 96 $ & $9.29\%$ & $0.05\%$ & $0.19\%$\\ $ 600 $ & $8.91\%$ & $0.14\%$ & $0.28\%$\\ $ 2646 $ & $8.79\%$ & $0.16\%$ & $0.27\%$ \end{tabular} }\qquad\qquad \subtable[\ Percentage change in distance traveled when doubling $ N^H $]{ \begin{tabular}{ l| l l l l l} \diagbox{$N^H$}{$N^F$} & $ 40 $ & $ 100 $ & $ 200 $ & $ 400 $\\ \hline $ 600 $ & $18.68\%$ & $18.94\%$ & $18.86\%$ & $18.79\%$\\ $ 2646 $ & $4.04\%$ & $4.15\%$ & $4.13\%$ & $4.15\%$ \end{tabular} }\end{table} \begin{figure} \centering \includegraphics[width=\textwidth]{fig3.pdf} \caption{\footnotesize{Visual comparison of how the swimming distance for the biflagellate swimmer converges with (a) the nearest-neighbour and (b) the classic (Nystr\"{om}) discretisations. The swimming distance is shown with increasing number of points for both the head ($N^H$) and flagellum ($N^F$) discretisations. In (a) the quadrature discretisation is chosen to be twice as fine as the force discretisation.}} \label{fig:conv} \end{figure} \begin{table}[!htb] \centering\scriptsize \caption{New nearest-neighbour convergence results: Straight line distance traveled by a single sperm, swimming between two opposed surfaces, as described in \S\ref{sec:multiple}, after one complete flagellar beat cycle. Here, the discretisation for the cell head is fixed with $ N^H = 96 $ and $ Q^H = 600 $ force and quadrature points respectively. The number of points discretising the flagellum have been chosen following the convergence algorithm in table \ref{tab:heuristic}, with the regularisation parameter $ \epsilon = 0.25/45 $ being the ratio between flagellar radius and length. When $ N^F > Q^F $ a singular linear system is formed, this is denoted by the entry `NaN' (`not-a-number'). (a) Distance traveled by the swimmer, (b) and (c) show the percentage change in this distance when halving $ h_f^F $ and $h_q^F $ respectively.} \label{tab:spermBound} \subtable[\ Distance traveled in multiples of $ \left(\text{flagellar length}\right)\cdot 10^{-2} $]{ \begin{tabular}{ l l l l l| l l l l l} & & & & \multicolumn{1}{r|}{$Q^H$} & $600$ & $600$ & $600$ & $600$ & $600$ \\ & & & & \multicolumn{1}{r|}{$h_q^H$}& $0.006702$ & $0.006702$ & $0.006702$ & $0.006702$ & $0.006702$ \\ & & & & \multicolumn{1}{r|}{$Q^F$} & $100$ & $200$ & $400$ & $800$ & $1600$ \\ DOF & $N^H$ & $h_f^H$ & $N^F$ & \diagbox{$h_f^F$}{$ h_q^F$} & $0.01011$ & $0.005032$ & $0.002510$ & $0.001254$ & $0.0006265$ \\ \hline $ 408 $ & $ 96 $ & $0.01314$ & $ 40 $ & $ 0.02564 $ & $ 6.912 $ & $ 6.957 $ & $ 6.992 $ & $ 7.004 $ & $ 7.011 $ \\ $ 528 $ & $ 96 $ & $0.01314$ & $ 80 $ & $ 0.01267 $ & $ 7.003 $ & $ 6.935 $ & $ 6.939 $ & $ 6.749 $ & $ 6.950 $ \\ $ 768 $ & $ 96 $ & $0.01314$ & $ 160 $ & $ 0.006297 $ & NaN & $ 6.925 $ & $ 6.924 $ & $ 6.924 $ & $ 6.924 $ \\ $ 1248 $ & $ 96 $ & $0.01314$ & $ 320 $ & $ 0.003140 $ & NaN & NaN & $ 6.920 $ & $ 6.918 $ & $ 6.919 $ \end{tabular} } \subtable[\ Percentage change in distance traveled when halving $ h_f^F $]{ \begin{tabular}{ l | l l l l l l} \diagbox{$h_f^F$}{$ h_q^F$} & $0.01011$ & $0.005032$ & $0.002510$ & $0.001254$ & $0.0006265$ \\ \hline $ 0.01267 $ & $ 1.32\%$ & $ 0.31\% $ & $ 0.75\% $ & $ 3.64\% $ & $ 0.86\% $ \\ $ 0.006297 $ & & $ 0.15\% $ & $ 0.21\% $ & $ 2.59\% $ & $ 0.39\% $ \\ $ 0.003140 $ & & & $ 0.05\% $ & $ 0.09\% $ & $ 0.07\% $ \end{tabular} } \qquad\qquad \subtable[\ Percentage change in distance traveled when halving $ h_q^F $]{ \begin{tabular}{ l | l l l l l} \diagbox{$h_f^F$}{$ h_q^F$} & $0.005032$ & $0.002510$ & $0.001254$ & $0.0006265$ \\ \hline $ 0.02564 $ & $ 0.65\% $ & $ 0.50\% $ & $ 0.18\% $ & $ 0.10\% $ \\ $ 0.01267 $ & $ 0.97\% $ & $ 0.06\% $ & $ 2.74\% $ & $ 2.98\% $ \\ $ 0.006297 $ & & $ 0.01\% $ & $ 0.01\% $ & $ 0.00\% $ \\ $ 0.003140 $ & & & $ 0.04\% $ & $ 0.01\% $ \end{tabular} } \end{table} We have analysed the convergence of the results for the following cases: a single swimming biflagellate (as described in \S\ref{sec:biflagellate}), a single swimming sperm (as in \S\ref{sec:sperm}) with no boundary, and a single swimming sperm with boundary. We also assess the effect of the boundary through fixing the sperm discretisation and applying the heuristic of table \ref{tab:heuristic} to the boundary discretisations, and through fixing the sperm and boundary discretisations and increasing the boundary length. The effects of refining the flagellum discretisations in the biflagellate and single sperm models are shown in tables \ref{tab:chlamy1} and \ref{tab:spermBound}, with the full convergence results provided in the supplemental material. Here, we have used the straight line distance travelled by the swimmer as the objective for convergence, and it is clear from tables \ref{tab:chlamy1} and \ref{tab:spermBound}, together with the associated tables in the supplemental material, that the method is well converged for each swimmer, both in the presence of boundaries and not. Increasing the size of the boundaries resulted in a negligible change to the distance traveled by the swimmer. We note here that the head discretisation for the sperm case is very fine, this has been chosen to illustrate the convergence results following the heuristic of Smith \cite{smith2018}. For comparison with our method, in table \ref{tab:chlamyNys} we present the straight line distance travelled by the biflagellate swimmer when the Nystr\"om discretisation is used. We can see from the data in the table \ref{tab:chlamyNys} that the Nystr\"om discretisation requires $8538$ degrees of freedom ($ N^H = 2646 $ and $ N^F = 100 $) to approach within $ 1\% $ the converged distance of $ \approx 5.5\cdot 10^{-2} $ flagellar lengths, while the current method is within $ 1\% $ of the converged distance in the first entry of table \ref{tab:chlamy1}, with only $528$ degrees of freedom ($ N^H = 96 $ and $ N^F = 40 $). In figure \ref{fig:conv} we show the convergence of the swimming distance for both the nearest-neighbour and classic (Nystr\"{o}m) discretisations, where for the former we have chosen the quadrature discretisation to be twice as fine as the force. This figure visually emphases the convergnece results of tables \ref{tab:chlamy1} and \ref{tab:chlamyNys} from which we see that, for the choice of $ \epsilon = 0.25/20$, the Nystr\"om method requires many more degrees of freedom to reach the same levels of convergence. This convergence rate could be improved in the Nystr\"om case by varying $ \epsilon $ (as discussed in \cite{cortez2005}), however as previously discussed the nearest neighbour discretisation is much more robust to this parameter. \section{Discussion}\label{sec:discussion} This report has described an extension of the nearest-neighbour regularized Stokeslet method \cite{smith2018} to enable the simulation of multiple force- and moment-free cells swimming in a bounded domain. Cell trajectory calculations were achieved by casting the task as an initial-value problem; by integrating the force at each step it was additionally possible to store the evolving force distribution to enable post-calculation of the velocity field. The method was assessed on two problems of a type which may be of interest in the biological fluid mechanics community: swimming of a biflagellate in an unbounded domain, and motility of multiple human sperm between two no-slip surfaces. Numerical experiments provide evidence that the method is relatively efficient and converges well, requiring minutes to solve the problems described above, without specialist computational hardware, and we note with interest the significantly improved convergence of this method when compared to the classic Nystr\"om discretisation. While the construction of the matrices is somewhat tedious, the underlying concept of the method --- a coarse/fine discretisation of the boundary integral equations to address the fact that the force distribution varies more slowly than the kernel --- should ensure that the method is comprehensible and extensible by non-specialists. Crucially, no true `mesh' generation (i.e.\ with connectivity tables) is required to simulate a new swimmer of interest. We hope that these properties of ease-of-use, extensibility and efficiency make the method appealing to potential users, and in support of this aim we provide all Matlab\textsuperscript{\textregistered} code used to generate this report in the repository \texttt{github.com/djsmithbham/nearestStokesletSwimmers}. Within this repository, a template file \texttt{nnSwimmerTemplate.m} is provided which sets out how new swimmers can be added to the existing codebase. There are many potential extensions for this work spanning the whole field of locomotion at low Reynolds number. The convergence properties of this method mean that it may be valuable for high-throughput analysis of experimental data, or (perhaps with adaptations to deal efficiently with long-range interactions) suspensions of relatively large numbers of swimmers. It would be interesting to see if the modification of the method to take into account viscoelastic effects would allow for the collective swimming behaviour of sperm seen by Tung et al. \cite{tung2017} to be reproduced from an idealised model of swimming. There is potential for this method to be applied to the world of phoretic swimmers to examine the dynamics of many phoretic particles, or to the case of swimmers driven by magnetic fields. The computational efficiency of this method can also be exploited through modelling multiple swimmers in complex environments, for example ciliary flow. While such flows would previously have been simulated and then applied as a background flow to a swimmer, with this efficient method one would be able to model the ciliary beating patterns directly and could allow for a more realistic interaction between swimmers and their environment. \section{Acknowledgements} This work was supported by Engineering and Physical Sciences Research Council award EP/N021096/1. We would also like to thank Gemma Cupples (University of Birmingham) for helpful comments on the manuscript and template files in the code repository, and Marco Polin (University of Warwick), Hermes Gad{\^e}lha (University of York), Eamonn Gaffney and Kenta Ishimoto (University of Oxford), and Hao Wu (University of Minnesota) for helpful discussions. See Supplemental Material at [URL will be inserted by publisher] for the complete set of convergence tables for the swimmers provided in this manuscript.
\section{Introduction} \subsection{Background and statement of main result} Let $M^{n}\ (n \geq 3)$ be an oriented, smooth, compct Riemannian manifold, with $\partial M \neq 0$. The main goal of the present paper is to study the limiting behavior as $\epsilon \to 0$ of solutions to the following boundary value problem for the Ginzburg-Landau equation on $M$. \begin{equation}\label{GLNeumann} \left\{ \begin{array}{cl} - \Delta u &= \epsilon^{-2}(1 - |u|^{2})u \text{ in }M,\\ \partial_{\nu}u &= 0 \text{ on }\partial M, \end{array} \right. \end{equation} where the functions $u$ are complex-valued. Notice that solutions to \eqref{GLNeumann} correspond to critical points of the Ginzburg-Landau functional, defined to be \begin{equation} E_{\epsilon}(u) = \int_{M} e_{\epsilon}(u) \dvol,\ \text{where } e_{\epsilon}(u) = \frac{|\nabla u|^{2}}{2} + \frac{(1 - |u|^{2})^{2}}{4\epsilon^{2}}. \end{equation} Specifically, $u$ is a solution to \eqref{GLNeumann} if and only if \begin{equation}\label{GLvariation} \delta E_{\epsilon}(u)(\zeta) \equiv \int_{M} \langle \nabla u, \nabla \zeta \rangle + \frac{|u|^{2} - 1}{\epsilon^{2}}u \cdot \zeta \dvol = 0, \end{equation} for all $\zeta \in C^{1}(\overline{M}; \mathbb{C})$. Basic elliptic theory shows that if $u \in W^{1, 2}\cap L^{4}(M;\mathbb{C})$ satisfies \eqref{GLvariation} for all $\zeta \in C^{1}(\overline{M}; \mathbb{C})$, then $u$ is in fact smooth on $\overline{M}$. The Ginzburg-Landau functional in dimensions three or higher ($n \geq 3$) is known to be closely related to the $(n-2)$-volume functional as $\epsilon \to 0$. Among the large number of works along this line, we mention the result of Bethuel, Brezis and Orlandi (\cite{bbo}), which concerns the case where $M = \Omega$ is a simply-connected domain in $\mathbb{R}^{n}$ and the boundary condition in \eqref{GLNeumann} is replaced by a sequence of Dirichlet boundary data $g_{\epsilon}: \partial \Omega \to \mathbb{C}$ arranged to blow up on a smooth $(n-3)$-dimensional submanifold $S$ of $\partial \Omega$. What they showed is that if for each $\epsilon$ there is a solution $u_{\epsilon}$ to \begin{equation}\label{GLDirichlet} \left\{ \begin{array}{cl} - \Delta u_{\epsilon} &= \epsilon^{-2}(1 - |u_{\epsilon}|^{2})u_{\epsilon} \text{ in }\Omega,\\ u_{\epsilon} &= g_{\epsilon} \text{ on }\partial \Omega, \end{array} \right. \end{equation} and if $\left| \log\epsilon \right|^{-1}E_{\epsilon}(u_{\epsilon})$ is bounded uniformly in $\epsilon$, then, after possibly taking a subsequence, the measures \begin{equation} \mu_{\epsilon} = \frac{e_{\epsilon}(u_{\epsilon})}{\left| \log\epsilon \right|} dx \end{equation} converges weakly to the volume measure of a rectifiable $(n-2)$-varifold which is stationary in the interior of $\Omega$. We remark here that prior to \cite{bbo}, Lin and Rivi\`ere (\cite{lr}) have studied the case where the solutions $u_{\epsilon}$ are assumed to minimize $E_{\epsilon}$ subject to the Dirichlet boundary condition in \eqref{GLDirichlet}. They proved that in this case, the limit measure supports an integral $(n-2)$-current which minimizes volume among integral currents with boundary $S$. Recently, Stern has succeeded in adapting the Bethuel-Brezis-Orlandi result to closed manifolds and combining it with a min-max construction to prove the existence of a non-zero stationary rectifiable $(n-2)$-varifold (\cite{stern1}, \cite{stern2}). His work can roughly be divided into two parts: First, he showed that if for each $\epsilon > 0$ there is a solution $u_{\epsilon}$ to \begin{equation}\label{GLclosed} -\Delta u_{\epsilon} = \epsilon^{-2}(1 - |u_{\epsilon}|^{2})u_{\epsilon} \text{ on }M, \end{equation} and if $E_{\epsilon}(u_{\epsilon}) = O(\left| \log\epsilon \right|)$ as $\epsilon \to 0$, then there exists a sequence of $S^{1}$-valued harmonic maps $\varphi_{\epsilon}$ on $M$ and a subsequence $\epsilon_{k}$ such that, denoting $\tilde{u}_{\epsilon} = \varphi_{\epsilon}^{-1} u_{\epsilon}$, the measures $\nu_{k} = \left| \log\epsilon_{k} \right|^{-1} e_{\epsilon_{k}}(\tilde{u}_{k})\dvol$ converge weakly to $\|V\|$, the volume measure of a stationary rectifiable $(n-2)$-varifold $V$. Moreover, the mass of $V$ is given by \begin{equation} \|V\|(M) = \lim\limits_{k \to \infty} \left| \log\epsilon_{k} \right|^{-1}\left( E_{\epsilon_{k}}(u_{k}) - \frac{\| h_{\epsilon_{k}} \|^{2}_{2; M}}{2}\right), \end{equation} where $h_{\epsilon_{k}}$ is the harmonic part in the Hodge decomposition of the $1$-form $u_{\epsilon_{k}} \times du_{\epsilon_{k}}$. Then, via a two-parameter min-max construction, he produced a sequence of solutions $\{u_{\epsilon}\}$ to which the above convergence result can be applied to get a limit varifold and showed that this varifold is non-zero. We refer the reader to \cite{stern1} and \cite{stern2} for the details. In light of Stern's work, it's natural ask whether one can follow a similar strategy when $\partial M \neq \emptyset$ to prove the existence of a rectifiable $(n-2)$-varifold which is stationary with free boundary, i.e. stationary with respect to deformations preserving $\partial M$. From a variational point of view, the correct boundary value problem to study for the above purpose is the homogeneous Neumann problem \eqref{GLNeumann}, and the principal result of this paper, stated below as Theorem \ref{GLgeneralconvergence}, establishes a version of the Bethuel-Brezis-Orlandi result for solutions to \eqref{GLNeumann} under a convexity assumption on $\partial M$. This extends the first part of Stern's work to manifolds with boundary. Below, we will assume that our manifold $M^{n}\ (n \geq 3)$ is isometrically embedded in a closed Riemannian manifold $\widetilde{M}$ of the same dimension, and that the latter is isometrically embedded in an Euclidean space $\mathbb{R}^{N}$. Furthermore, we assume that $\partial M$ is convex in the sense that if $\nu$ denotes the unit normal of $\partial M$ pointing into $M$, then we have \begin{equation}\label{convexboundary} \langle \nabla_{\xi}\nu(p), \xi \rangle \leq 0\text{ for all } \xi \in T_{p}\partial M \text{ and for all } p \in \partial M. \end{equation} We now state our main theorem. \begin{thm}\label{GLgeneralconvergence} Under the above assumptions, take a sequence $\{\epsilon_{k}\}$ of parameters converging to zero and suppose for each $k$ there is a solution $u_{k}$ to \eqref{GLNeumann} with $\epsilon = \epsilon_{k}$. Moreover, assume that there exists a constant $K_{0}$ independent of $k$ such that \begin{equation}\label{GLenergyupperbound} E_{\epsilon_{k}}(u_{k}) \leq K_{0}\left| \log\epsilon_{k} \right| \text{ for all }k, \end{equation} and define the following Radon measures \begin{equation}\label{energymeasure} \mu_{k} = \left| \log\epsilon_{k} \right|^{-1} e_{\epsilon_{k}}(u_{k})\dvol. \end{equation} Then, the exists a closed, countably $(n-2)$-rectifiable set $\Sigma \subset \overline{M}$ with $H^{n-2}(\Sigma) < \infty$, and a harmonic $1$-form $\psi$ on $M$ with $\psi(\nu) \equiv 0$ on $\partial M$, such that, passing to a subsequence if necessary, the following statements hold. \begin{enumerate} \item[(1)] In the sense of measures on $\overline{M}$, \begin{equation}\label{GLlimitdecomp} \mu \equiv \lim\limits_{k \to \infty}\mu_{k} = \frac{|\psi|^{2}}{2}\dvol+ \mu_{s}. \end{equation} where $\mu_{s}$ is a nonnegative measure with $\supp(\mu_{s}) = \Sigma$. \item[(2)] Denoting by $B^{N}_{r}(p)$ the ball in $\mathbb{R}^{N}$ centered at $p$ with radius $r$, the density $\Theta(\mu_{s}, p) \equiv \lim_{r \to 0}r^{2-n}\mu_{s}(B^{N}_{r}(p) \cap \overline{M})$ exists for all $p \in \Sigma$. Moreover, the rectifiable $(n-2)$-varifold $V \equiv (\Sigma, \Theta(\mu_{s}, \cdot))$ satisfies \begin{equation}\label{GLlimitstationary} \delta V(X) = \int_{\Sigma} \Div_{T_{y}\Sigma} X(y) \Theta(\mu_{s}, y)dH^{n-2}(y) = 0, \end{equation} for all $C^{1}$-vector fields $X$ on $\widetilde{M}$ satisfying $\langle X(y), \nu(y) \rangle = 0$ for $y \in \partial M$. \end{enumerate} \end{thm} \begin{defi}\label{stationaryterminology} We take this opportunity to introduce the following terminology. \begin{enumerate} \item[(1)] The class of vector fields considered in conclusion (2) will be referred to as the class of \textit{admissible vector fields}. Note that the deformations of $\widetilde{M}$ generated by an admissible vector field always preserve $\partial M$, and hence $\overline{M}$. \item[(2)] Borrowing the terminology from \cite{martinxin}, we say that a varifold is stationary \textit{with free boundary} if it satisfies \eqref{GLlimitstationary} for all admissible vector fields. \end{enumerate} \end{defi} \begin{rmk}\label{simplyconnected} Regarding the conclusions of Theorem \ref{GLgeneralconvergence}, we note the following. \begin{enumerate} \item[(1)] Unless further topological constraints are put on $M$, we cannot rule out the absolutely continuous part on the right-hand side of \eqref{GLlimitdecomp}. In fact, one may take $M = S^{1} \times S^{2}_{+}$ with the standard product metric $g = ds^{2} + dr^{2} + \sin^{2}r d\theta$, $\epsilon_{k} = e^{-k^{2}}$ and $u_{k}(s, r, \theta) = (1 - k^{2}\epsilon_{k}^{2})^{1/2}e^{iks}$. Then, similar to Remark 1.3 of \cite{stern1} one verifies that $u_{k}$ is a solution to \eqref{GLNeumann} with $\epsilon = \epsilon_{k}$, but the measures $\mu_{k} =\left| \log\epsilon_{k} \right|^{-1}e_{\epsilon_{k}}(u_{k})\dvol$ converge to a constant (non-zero) multiple of the volume measure of $M$. In particular, the singular part $\mu_{s} = \|V\|$ in \eqref{GLlimitdecomp} vanishes altogether in this case. \item[(2)] As in \cite{bbo} and \cite{stern1}, \cite{stern2}, we do not know if the density $\Theta(\mu_{s}, \cdot)$ is an integer (up to a constant multiple) at $H^{n-2}$-a.e. $p \in \Sigma$. However, by the work of Lin and Rivi\`ere (\cite{lr}), this would be true at $H^{n-2}$-a.e. interior points $p \in \Sigma \cap M$ provided we assume in addition that each $u_{\epsilon}$ minimizes $E_{\epsilon}$ on compact subsets of $M$. \item[(3)] Note that any $(n-2)$-varifold supported on $\partial M$ and stationary with respect to tangential deformations is also stationary with free boundary. Thus \eqref{GLlimitstationary} alone does not rule out the possibility that $\|V\|(\partial M) > 0$. In fact, in Section 8 we construct a sequence of solutions such that the varifold $V$ yielded by Theorem \ref{GLgeneralconvergence} satisfies $V \neq 0$ but $\|V\|(M) = 0$. In other words, all the energy is concentrating on the boundary. \end{enumerate} \end{rmk} \begin{rmk}\label{bpwoverlap} We mention a few previous or recent results besides \cite{bbo}, \cite{stern1} and \cite{stern2} that are related to Theorem \ref{GLgeneralconvergence}. All the results below assume an energy upper bound similar to \eqref{GLenergyupperbound}. \begin{enumerate} \item[(1)] Bethuel, Orlandi and Smets (\cite{bosring}) considered solutions to a slightly more general class of equations on a domain $\Omega\subset \mathbb{R}^{n}$, but without imposing a boundary condition. They established a version of \eqref{GLlimitdecomp} for the limit measure restricted to $\Omega$. Moreover, the singular part was shown to define a rectifiable $(n-2)$-varifold which is stationary in the interior, i.e. \eqref{GLlimitstationary} holds for all $X$ compactly supported in $\Omega$. The same authors also studied the parabolic Ginzburg-Landau equation on the whole space (\cite{bospara}). \item[(2)] The Neumann problem \eqref{GLNeumann} was previously studied by Chiron (\cite{chiron}) on a domain $\Omega \subset \mathbb{R}^{n}$. (In fact, he worked with the same type of equations as in \cite{bosring}.) A principal result there was a boundary $\eta$-ellipticity theorem (cf. Sections 1.2 and 5 below). In addition, by locally reflecting across $\partial \Omega$, he invoked the interior estimates in \cite{bosring} to get a rectifiable varifold $V$ in $\overline{\Omega}$ and inferred that the sum of $V$ and its reflection is stationary. However, unless $\partial\Omega$ is totally geodesic, the reflected metric is generally not $C^{1}$, and thus the results in \cite{bosring} may not directly apply. For this reason, below we have taken slightly more care when using reflection to deduce finer properties of the solutions near the boundary. \item[(3)] Very recently, Bauman, Phillips and Wang (\cite{bpw}) studied solutions on a simply-connected domain $\Omega \subset \mathbb{R}^{n}$ under the "weak anchoring" boundary condition: \begin{equation*} \partial_{\nu}u + \lambda_{\epsilon}(u_{\epsilon} - g_{\epsilon}) = 0 \text{ on }\partial \Omega, \end{equation*} where $\lambda_{\epsilon} = K\epsilon^{-\alpha}$ for some $K > 0$, $\alpha \in [0, 1)$, and $\{g_{\epsilon}\}$ is a prescribed bounded sequence in $C^{2}(\partial \Omega; S^{1} )$. They derived interior and boundary estimates to show that the limit measure is rectifiable in $\overline{\Omega}$ and defines a stationary varifold in the interior. Moreover, as in \cite{bbo}, the solutions were shown to converge to an $S^{1}$-valued harmonic map away from the support of the varifold. \end{enumerate} \end{rmk} \subsection{Outline of proof} The proof of Theorem \ref{GLgeneralconvergence} is modeled on the arguments in \cite{bbo}, with some devices adapted from \cite{bbh}, \cite{bos} and \cite{bospara}. Our main contribution would be the analysis of $\{u_{k}\}$ near boundary points of $M$, since most of the necessary interior estimates were already done in \cite{bbo} or \cite{stern2}. Note that by the assumption \eqref{GLenergyupperbound}, passing to a subsequence if necessary, we may assume that $\mu_{k}$ converges in the sense of measures on $\overline{M}$ to a limit measure $\mu$. The proof then goes through the following steps. \vskip 2mm \noindent\textbf{Step 1: $\eta$-ellipticity and local estimates.} We begin with a version of the so-called "$\eta$-ellipticity" theorem that applies to boundary points of $M$. Roughly speaking, we show that there exists a threshold $\eta_{0}$ depending only on $\overline{M}$ and the isometric embedding $\widetilde{M} \to \mathbb{R}^{N}$ such that for small enough balls and for sufficiently large $k$, if \begin{equation}\label{GLenergyeta} r^{2-n}\int_{B_{r}^{N}(p) \cap \overline{M}} e_{\epsilon_{k}}(u_{k}) \dvol \leq \eta \left| \log(r^{-1}\epsilon_{k}) \right|, \end{equation} for some $\eta < \eta_{0}$, then in fact $|u|$ is close to $1$ in a smaller ball. Consequently, we may locally write $u_{k} = |u_{k}| e^{i\varphi_{k}}$, with $\varphi_{k}$ single-valued, and estimate $|u_{k}|$ and $\varphi_{k}$ separately as in \cite{bbh} and \cite{bos} to show that, decreasing the threshold $\eta_{0}$ above if necessary, we obtain estimates on the derivatives of $\{u_{k}\}$ within balls verifying \eqref{GLenergyeta}. (It is in order to obtain boundary estimates at this stage that we use the convexity assumption on $\partial M$.) \vskip 2mm \noindent\textbf{Step 2: Definitions and properties of $\Sigma$ and $\psi$.} We define the set $\Sigma$ in the conclusion of Theorem \ref{GLgeneralconvergence} to be \begin{equation}\label{GLsigmadefinition} \Sigma = \{ p \in \overline{M}| \ \Theta(\mu, p) \equiv \lim\limits_{r \to 0}r^{2-n}\mu(B_{r}^{N}(p) \cap \overline{M}) > 0 \}, \end{equation} and show that in fact \begin{equation}\label{GLdensitybounds} CK_{0} \geq \Theta(\mu, p) \geq \underline{\eta} > 0, \text{ everywhere on }\Sigma, \end{equation} where $\underline{\eta}$ is a threshold determined by the previous step, and $C$ is a universal constant. The existence of the limit in \eqref{GLsigmadefinition} as well as the upper bound in \eqref{GLdensitybounds} are consequences of a monotonicity formula, whereas the lower bound follows from the estimates in the previous step. Note that the density lower bound and the assumption \eqref{GLenergyupperbound} imply that $H^{n-2}(\Sigma) < \infty$. Next, again using the estimates in Step 1, we show that up to taking a further subsequence, the $1$-forms $\left| \log\epsilon_{k} \right|^{-1}u_{k} \times du_{k} \equiv \left| \log\epsilon_{k} \right|^{-1}\left(u^{1}_{k}du^{2}_{k} - u^{2}_{k}du^{1}_{k}\right)$ converge in $C^{m}_{\loc}(M \setminus \Sigma)$ for all $m$ and in $C^{1}_{\loc}(\overline{M} \setminus \Sigma)$. Moreover, the limit 1-form $\psi$ is actually smooth across $\Sigma$ (here we need to use the fact that $H^{n-2}(\Sigma) < \infty$) and has all the asserted properties. A consequence of the convergence of $\left| \log\epsilon_{k} \right|^{-1}u_{k} \times du_{k}$ to $\psi$ is that $\mu = (|\psi|^{2}/2)\dvol$ when restricted to $\overline{M} \setminus \Sigma$. \vskip 2mm \noindent\textbf{Step 3: Rectifiability and stationarity of $\mu\ \llcorner \Sigma$.} Defining $\mu_{s} \equiv \mu - (|\psi|^{2}/2)\dvol = \mu\ \llcorner \Sigma$, then clearly conclusion (1) of Theorem \ref{GLgeneralconvergence} holds. Moreover, the previous step implies that $\Theta(\mu_{s}, p) = \Theta(\mu, p) \in [\eta_{0}, CK_{0}]$ everywhere on $\Sigma$. We then invoke Preiss' theorem (\cite{preiss}) to conclude that $\Sigma$ is an $(n-2)$-rectifiable set in $\mathbb{R}^{N}$, and that $\mu_{s} = \Theta(\mu_{s}, \cdot) H^{n-2}\ \llcorner \Sigma$. To obtain the identity \eqref{GLlimitstationary}, we choose an admissible vector field $X$ and substitute $\zeta = \langle X, \nabla u_{k} \rangle$ in \eqref{GLvariation} to obtain \begin{equation} \int_{M} e_{\epsilon_{k}}(u_{k}) \Div_{g}X - \langle \nabla_{\nabla u_{k}}X, \nabla u_{k} \rangle \dvol_{g} = 0. \end{equation} Introducing a local orthonormal frame $\{e_{i}\}_{i\leq n}$ on $\overline{M}$, we shall see that as $k \to \infty$, the above identity yields \begin{equation}\label{GLfreelystationary} \int_{\Sigma} (\delta_{ij} - A_{ij}(p)) \langle \nabla_{e_{i}}X, e_{j} \rangle(p) \Theta(\mu_{s}, p)dH^{n-2}(p) = 0, \end{equation} for some $H^{n-2}$-measurable functions $(A_{ij})_{i, j \leq n}$ on $\Sigma$. Finally, we show that for $H^{n-2}$-a.e. $p \in \Sigma$, the matrix $\delta_{ij} - A_{ij}(p)$ represents orthogonal projection onto the approximate tangent plane to $\Sigma$ at $p$, and hence by \eqref{GLfreelystationary}, the rectifiable $(n-2)$-varifold $(\Sigma, \Theta(\mu_{s}, \cdot))$ is stationary with free boundary. Our approach to Step 3 is similar to that in \cite{bospara}, Part II, Section 5. \subsection{Organization of the paper} The remainder of this paper is organized as follows: In Section 2, we set up various notations and introduce some terminology. In Section 3, we recall some basic properties of solutions to \eqref{GLNeumann}, among which is a reflection lemma (Lemma \ref{GLreflection}) which will be used repeatedly to help us obtain estimates near the boundary. Then, Section 4 is devoted to the monotonicity formula, which relate the Ginzburg-Landau energy of a solution at different scales. In Sections 5 and 6, we carry out Step 1 and Step 2 in the proof of Theorem \ref{GLgeneralconvergence}. Specifically, Section 5 establishes the $\eta$-ellipticity theorem and some of its consequences. Sections 6.1 and 6.2 derives higher-order estimates. In Section 6.3, we define $\Sigma$ and obtain $\psi$ as a limit away from $\Sigma$. We then verify that $\psi$ has all the asserted properties. After that, Section 7 is devoted to Step 3 of the proof of Theorem \ref{GLgeneralconvergence}. Finally, in Section 8 we give an example where the limit varifold $V$ is non-zero but supported on $\partial M$. Certain details have been relegated to the appendices. In Appendix A we adapt some devices from \cite{bbh} to our setting. In Appendix B, we prove an upper bound for the Green matrix of a class of second order elliptic systems, which is important for the boundary estimates in Section 5. In Appendix C, we gather some known results concerning the Hodge Laplacian with respect to a Lipschitz metric, and also explain how the results in Appendix B apply in this setting. In Appendix D, we give a proof of the fact that, near a boundary point, the metric components in terms of Fermi coordinates (introduced in Section 2.2) can be estimated depending only on the geometry of $M$ and $\partial M$. \vskip 2mm \noindent\textbf{Acknowledgements.} This paper is an extension of my thesis work, and I'd like to thank my advisor Richard Schoen for his guidance and encouragements along the way. Thanks also go to Andre Neves for several enlightening conversations, and to Changyou Wang for having kindly responded to my questions concerning \cite{bpw}. I also thank the Forschungsinstitut f\"ur Mathematik at ETH Z\"urich, where part of the work was carried out. \section{Notation and terminology} \subsection{Basic conventions} Below we summarize the general terms and notations to be used in this paper. Some additional notation and terminology are introduced in Sections 2.2 through 2.4. \begin{center} \begin{tabular}{ll} $\mathbb{D}$ & The open unit disk in $\mathbb{R}^{2} \simeq \mathbb{C}$.\\ $B^{k}_{r}(p)$ & The open ball in $\mathbb{R}^{k}$ centered at $p$ with radius $r$.\\ \ & (We often drop $k$ if $k = n = \dim(M)$, $r$ if $r = 1$ and $p$ if $p = 0$.)\\ $B^{+}_{r}(p)$ & The p[en upper half ball $B_{r}(p) \cap \{x^{n} > 0\}$ for $p \in \{x^{n} = 0\}$.\\ $T_{r}(p)$ & The set $B_{r}(p) \cap \{x^{n} = 0\}$ for $p \in \{x^{n} = 0\}$.\\ $D, \partial$ & Usual partial derivative.\\ $\nabla^{g}$ & Covariant derivative with respect to the metric $g$.\\ $\Delta_{g}$ & Laplace-Beltrami operator (or the Hodge Laplace operator) with respect to $g$.\\ \ & (In the two previous notations, we drop $g$ when this is not misleading.)\\ $|f|_{0; A}$ & The $C^{0}$-norm of $f$ on $A$.\\ $[f]_{0, \mu; A}$ & The $C^{0, \mu}$ H\"older semi-norm of $f$ on $A \subset \mathbb{R}^{n}$.\\ $|f|_{k, 0; A}$ & The $C^{k}$-norm $\sum_{i = 0}^{k}|D^{i}f|_{0; A}$ for $A \subset \mathbb{R}^{n}$.\\ $|f|_{k, \mu; A}$ & The $C^{k, \mu}$-norm $|f|_{k, 0; A} + [D^{k}f]_{0, \mu; A}$ for $A\subset \mathbb{R}^{n}$.\\ $\|f\|_{p; A}$ & The $L^{p}$-norm of $f$ on $A$.\\ $\|f\|_{k, p; A}$ & The $W^{k, p}$-norm $\sum_{i =0}^{k}\|D^{i}f\|_{p; A}$ for $A \subset \mathbb{R}^{n}$.\\ $H^{s}(E)$ & The $s$-dimensional Hausdorff measure of the set $E \subset \mathbb{R}^{N}$.\\ $\mu\ \llcorner K$ & The restriction of the measure $\mu$ to $K$, defined by $(\mu\ \llcorner K)(E) = \mu(E \cap K)$.\\ $\dvol$ or $\dvol_{g}$ & The volume measure with respect to the metric $g$.\\ $d_{g}(\cdot, \cdot)$ or $d(\cdot, \cdot)$ & The distance on $\widetilde{M}$ with respect to $g$.\\ $d_{0}(\cdot, \cdot)$ & Euclidean distance on $\mathbb{R}^{N}$.\\ $\langle \cdot,\ \cdot \rangle$ & An innerproduct induced by $g$.\\ $\cdot$ & Standard innerproduct on Euclidean space.\\ \end{tabular} \end{center} In addition, for two complex numbers $u = u^{1} + iu^{2}$ and $v = v^{1} + iv^{2}$, we let \begin{equation*} u\times v = u^{1}v^{2} - u^{2}v^{1} = -\text{Im}(u\overline{v}). \end{equation*} Finally, in what follows, a constant is said to be \textit{universal} if it depends only on $M, \widetilde{M}$, the metric on $\widetilde{M}$, and the isometric embedding $\widetilde{M} \to \mathbb{R}^{N}$. \subsection{Classes of metrics} A good portion of the results we discuss in this paper are local, and hence we will often be working on a ball or half ball in $\mathbb{R}^{n}$ and equipped with a metric $g$ in one of the classes defined below. \begin{defi}\label{interiorclass} Fix $\mu \in (0, 1]$ and $r, \lambda, \Lambda > 0$, we define $\mathcal M_{\lambda, \Lambda; r}$ to be the class of metrics $g = (g_{ij})$ with Lipschitz continuous components on $B_{r}$, satisfying the following estimates. \begin{enumerate} \item[(l1)] $g_{ij}(0) = \delta_{ij}$ and $r\left[g_{ij}\right]_{0, 1; B_{r}} \leq \Lambda$ for all $i, j$. \item[(l2)] $\lambda |\xi|^{2} \leq g_{ij}(x)\xi^{i}\xi^{j} \leq \lambda^{-1} |\xi|^{2},\text{ for all }x\in B_{r},\ \xi \in \mathbb{R}^{n}.$ \end{enumerate} Similarly, we define $\mathcal M_{\mu, \lambda, \Lambda; r}$ to consist of metrics $g = (g_{ij})$ with components in $C^{1, \mu}(B_{r})$, such that \begin{enumerate} \item[(h1)] $g_{ij}(0) = \delta_{ij}$ and $r|\partial_{k}g_{ij}|_{0; B_{r}} + r^{1 + \mu}\left[\partial_{k}g_{ij}\right]_{0, \mu; B_{r}} \leq \Lambda$ for all $i, j, k$. \item[(h2)] $\lambda |\xi|^{2} \leq g_{ij}(x)\xi^{i}\xi^{j} \leq \lambda^{-1} |\xi|^{2},\text{ for all }x\in B_{r},\ \xi \in \mathbb{R}^{n}.$ \end{enumerate} \end{defi} \begin{defi}\label{boundaryclass} For $\mu \in (0, 1]$ and $r, \lambda, \Lambda > 0$, we let $\mathcal M^{+}_{\lambda, \Lambda; r}$ (resp., $\mathcal M^{+}_{\mu, \lambda, \Lambda; r}$) consist of metrics $g = (g_{ij}) \in \mathcal M_{\lambda, \Lambda; r}$ satisfying conditions (l1) and (l2) (resp., (h1) and (h2)) in the previous definition, but with $B_{r}$ replaced by $B_{r}^{+}$. In addition, we require that \begin{enumerate} \item[(1)] $g_{in}(x) = \delta_{in}$ for all $x \in T_{r}$ and for all $i$. \item[(2)] $g_{nn}$ and $g_{ij}$ for $i, j \leq n-1$ are all even functions in the $x^{n}$-variable, while $g_{in}$ for $i \leq n-1$ are odd functions. \end{enumerate} \end{defi} \begin{rmk} \begin{enumerate} \item[(1)] Conditions (1) and (2) in Definition \ref{boundaryclass} implies that $\tau^{\ast}g = g$, where $\tau:(x', x^{n}) \to (x', -x^{n})$ denotes reflection across $T$. Consequently the inward unit normal to $T$ with respect to $g$ coincides with $\partial_{n}$. \item[(2)]We clearly have $\mathcal M_{\mu, \lambda, \Lambda; r} \subset \mathcal M_{\lambda, \Lambda; r}$ and $\mathcal M^{+}_{\mu, \lambda, \Lambda; r} \subset \mathcal M_{\lambda, \Lambda; r}^{+}$ for all $\mu \in (0, 1]$. \item[(3)]When $r = 1$, we drop the subscript $r$ from the notation for the classes. \end{enumerate} \end{rmk} \begin{rmk}\label{singularmetric} The motivation for introducing these classes is that we want to derive boundary estimates by reflection, but the metric is not $C^{1}$ across the boundary unless the boundary is totally geodesic. \end{rmk} \subsection{Local coordinates} For $p \in \widetilde{M}$, the open geodesic ball on $\widetilde{M}$ centered at $p$ with radius $r$ is denoted by $\tilde{B}_{r}(p)$. On the other hand, if $p \in \partial M$, then we take geodesic normal coordinates $(x^{1}, \cdots, x^{n-1})$ of $\partial M$ centered at $p$ and let $x^{n} = t = \dist(\cdot, \partial M)$. These constitute a system of coordinates near $p$, sometimes referred to as Fermi coordinates. Borrowing the terminology in \cite{martinxin}, we define the Fermi distance $\tilde{r}$ to be $\sqrt{|x_{1}|^{2} + \cdots + |x_{n-1}|^{2} + t^{2}}$ and define the Fermi ball $\tilde{B}_{r}^{+}(p)$ to be $\{ q \in M|\ \tilde{r} < r \}$, which corresponds to the half ball $B_{r}^{+} \subset \mathbb{R}^{n}$ under Fermi coordinates. The metric components and their derivatives in Fermi coordinates can be estimated through the geometry of $M$ and $\partial M$. Namely, letting $R$ denote the curvature tensor of $M$ and $h$ the second fundamental form of $\partial M$ in $M$, then we have the following proposition, which is a well-known fact. Nonetheless, we give a proof in Appendix D. We also note here that similar estimates have been derived in \cite{martinxin}. \begin{prop}[cf. \cite{martinxin}, Appendix A] \label{fermiproperties} Letting $B_{0} = \sup_{M}\left| R \right|_{g}$ and $A_{0} = \sup_{\partial M}|h|$. Then there exists a small radius $r_{0} < 1$ depending only on $n, B_{0}$ and $A_{0}$ such that for all $p \in \partial M$, the following holds. \begin{equation}\label{fermicomparable} \frac{1}{2}\delta_{ij}\xi^{i}\xi^{j} \leq g_{ij}(x)\xi^{i}\xi^{j} \leq 2 \delta_{ij}\xi^{i}\xi^{j}, \text{ for all }x \in B_{r_{0}}^{+}, \xi \in \mathbb{R}^{n}, \end{equation} where $g_{ij}$ are the components of the metric in terms of Fermi coordinates $(x^{1}, \cdots, x^{n-1}, t)$ centered at $p$. Moreover, for each $k$ there is a constant $C$ depending only on $n, k, \{B_{j} \equiv \sup_{M}\left| \nabla^{j}R \right|_{g}\}_{1\leq j \leq k}$ and $\{A_{j} \equiv \sup_{\partial M} \left| \nabla^{j}h \right|_{g} \}_{1 \leq j \leq k}$, such that \begin{equation}\label{fermiderivative} \left| \paop{x^{i_{1}}}\cdots \paop{x^{i_{k}}} g_{ij} \right| \leq C_{k} \text{ on }B_{r_{0}}^{+}. \end{equation} \end{prop} \begin{rmk}\label{fermirmk} \begin{enumerate} \item[(1)] Let $(g_{ij})$ be as in Proposition \ref{fermiproperties} and reflect each component evenly across $T$. Then it follows from Proposition \ref{fermiproperties} that the resulting metric lies in $\mathcal M^{+}_{1, \lambda, \Lambda; r_{0}}$, where $\Lambda$ and $\lambda$ depend only on the parameters listed before \eqref{fermiderivative} (with $k = 1$). \item[(2)] By Proposition \ref{fermiproperties} one infers that there exists a threshold $\tilde{r}_{0}$ and an increasing function $c:(0, \tilde{r}_{0}) \to (0, 1/2)$ with $\lim_{r \to 0}c(r) = 0$, both universally determined, such that \begin{equation*} B^{N}_{(1 - c(r))r}(p) \cap \overline{M} \subset \tilde{B}^{+}_{r}(p) \subset B^{N}_{(1 + c(r))r}(p)\cap \overline{M}, \end{equation*} for all $p \in \partial M$ and $r < \tilde{r}_{0}$. A similar relation holds between geodesic balls $\tilde{B}_{r}(p)$ and the balls $B^{N}_{r}(p) \cap \widetilde{M}$. \end{enumerate} \end{rmk} \subsection{Differential forms} The reference for the material summarized below is Chapter 7 of \cite{morreybook} or Chapter 5 of \cite{gms}, although our notation will sometimes be different. Given a Riemannian manifold $(M, g)$, possibly with non-empty boundary, we let $L^{p}_{r}(M)$ denote the space of $r$-forms $\omega$ such that \begin{equation*} \|\omega\|_{p; M}^{p} \equiv \int_{M} |\omega|_{g}^{p}\dvol_{g} < \infty. \end{equation*} We say that $\omega \in W^{m, p}_{r}(M)$ if and only if \begin{equation*} \|\omega\|_{m, p; M}^{p} \int_{M} \sum\limits_{0 \leq k \leq m}|\nabla^{k}\omega|_{g}^{p}\dvol_{g} < \infty. \end{equation*} For each $r \geq 1$ and $x \in M$, the innerproduct induced by $g$ on $\bigwedge^{r}T_{x}^{\ast}M$ will be denoted simply by $\langle \cdot,\ \cdot \rangle$. Integrating over $M$, we get a pairing between differential forms on $M$, which we denote by $(\cdot, \ \cdot)$. Letting $d$ denote the exterior differential, we denote by $d^{\ast}$ its formal adjoint with respect to $(\cdot,\ \cdot)$. Thus $d$ and $d^{\ast}$ are related by the fact that for all $\alpha \in C^{\infty}(\overline{M}; \bigwedge^{r}T^{\ast}M )$ and $\beta \in C^{\infty}_{c}(M; \bigwedge^{r}T^{\ast}M)$, we have \begin{equation}\label{exteriorduality} (d^{\ast}\alpha, \beta) = (\alpha, d\beta). \end{equation} Given a form $\omega \in C^{\infty}(M; \bigwedge^{r}T^{\ast}M)$, its tangential and normal traces on $\partial M$, denoted $\mathfrak{t} \omega$ and $\mathfrak{n} \omega$, respectively, are defined as in Section 7.5 of \cite{morreybook}. Both $\mathfrak{t}$ and $\mathfrak{n}$ maps from $W^{1, p}_{r}(M)$ to $L^{p}_{r}(\partial M)$, and we define $W^{1, p}_{r, \mathfrak{t}}(M)$ to be the subspace of $W^{1, p}_{r}(M)$ consisting of those forms $\omega$ with $\mathfrak{t} \omega = 0$. Next we let $\cH_{r, \mathfrak{t}}(M)$ denote the space of forms $\omega$ in $W^{1, 2}_{r, \mathfrak{t}}(M)$ such that \begin{equation}\label{harmonicdefi} \cD_{g}(\omega, \zeta; M) \equiv \int_{M}\langle d\omega, d\zeta \rangle + \langle d^{\ast}\omega, d^{\ast}\zeta \rangle \dvol_{g} = 0, \text{ for all } \zeta \in W^{1, 2}_{r, \mathfrak{t}}(M). \end{equation} The Hodge decomposition theorem (cf. \cite{morreybook}, Theorem 7.7.7) then says that each form $\omega \in L^{2}_{r}(M)$ can be uniquely decomposed as \begin{equation*} \omega = h + d\alpha + d^{\ast}\beta, \end{equation*} where $h \in \cH_{r, \mathfrak{t}}(M)$, $\alpha \in W^{1, 2}_{r-1, \mathfrak{t}}(M)$ and $\beta \in W^{1, 2}_{r + 1, \mathfrak{t}}(M)$, with $d^{\ast}\alpha = 0$ and $d\beta = 0$. The spaces $W^{1, p}_{r, \mathfrak{n}}(M)$ and $\cH_{r, \mathfrak{n}}(M)$ are defined similarly, and the above decomposition theorem also holds with $\mathfrak{t}$ replaced by $\mathfrak{n}$. Also, the $\|\cdot\|_{1, 2; M}$-closure of smooth, compactly supported $r$-forms in $W^{1, 2}_{r}(M)$ will be denoted $W^{1, 2}_{r, 0}(M)$. In the case $M = B_{1}$, we introduce one more class of differential forms and define \begin{equation*} W^{1, 2, +}_{r, \mathfrak{t}}(B_{1}) \equiv \{ \varphi \in W^{1, 2}_{r, \mathfrak{t}}(B_{1})|\ \tau^{\ast}\varphi = \varphi \}, \end{equation*} where $\tau: (x', x^{n}) \to (x', -x^{n})$ denotes reflection across $\{x^{n} = 0\}$. \begin{rmk}\label{lipschitzhodge} Most of the results in Chapter 7 of \cite{morreybook}, including the definitions of $\mathfrak{t}$ and $\mathfrak{n}$, and the decomposition Theorem 7.7.7, require only a Lipschitz metric, and hence apply when we equip $B_{1}$ with a metric from $\mathcal M_{\lambda, \Lambda}$ or $\mathcal M^{+}_{\lambda, \Lambda}$. In particular, this implies that $\cH_{r, \mathfrak{t}}(B_{1}) = \cH_{r, \mathfrak{n}}(B_{1}) = \{0\}$ for any metric $g \in \mathcal M_{\lambda, \Lambda}$, as is the case when $g$ is smooth. \end{rmk} \section{Basic properties of solutions} In this short section, we recall a few basic local and global properties of solutions to \eqref{GLNeumann}, beginning with the following standard estimates. \begin{lemm}\label{GLbasicbounds} Suppose $u$ solves \eqref{GLNeumann}. Then the following estimates hold. \begin{enumerate} \item[(1)] $|u| \leq 1$ on $M$. \item[(2)] $|\nabla u| \leq C\epsilon^{-1}$ on $M$, with $C$ a universal constant. \end{enumerate} \end{lemm} \begin{proof} To prove assertion $(1)$, we observe that the function $\varphi \equiv |u|^{2} - 1$ satisfies \begin{equation}\label{modulussquareeq} \Delta_{g} \varphi - 2\frac{|u|^{2}}{\epsilon^{2}}\varphi \geq 0. \end{equation} Moreover, we clearly have $\partial_{\nu}\varphi = 0$ on $\partial M$. Thus by the strong maximum principle and the Hopf lemma, either $\varphi$ is a constant (which must then be non-positive by \eqref{modulussquareeq}) or $\varphi$ has a non-positive maximum. In either case, we conclude that $|u| \leq 1$. For $(2)$ we cover $M$ by geodesic or Fermi balls and use $(1)$ in conjunction with the multiplicative Schauder estimates in Lemmas \ref{interiormulti} and \ref{boundarymulti}. \end{proof} The gradient estimate in Lemma \ref{GLbasicbounds}(2) can of course be localized, and we get the following. \begin{lemm}\label{localbasicGLestimate} Let $g \in \mathcal M_{\lambda, \Lambda}$ and suppose $u : (B_{1}, g) \to \mathbb{D}$ is a solution to \begin{equation}\label{GLequation} - \Delta_{g} u = \epsilon^{-2}(1 - |u|^{2})u, \end{equation} where $\mathbb{D}$ is the unit disk in $\mathbb{C}$. Then \begin{equation*} |\nabla u|_{0; B_{3/4}} \leq C\epsilon^{-1}, \end{equation*} where $C$ depends only on $n, \lambda$ and $\Lambda$. \end{lemm} \begin{proof} Since $|\Delta_{g}u|_{0; B_{1}} \leq \epsilon^{-2}$, we apply Lemma \ref{interiormulti} with $s = 3/4$ to see that \begin{equation*} |Du|_{0; B_{3/4}} \leq C\left( 1 + \epsilon^{-1} \right), \end{equation*} which gives the result since $\nabla u = g^{ij}\partial_{j}u \partial_{i}$. \end{proof} The following reflection lemma was already used in \cite{chiron} and will also be important to us. \begin{lemm}\label{GLreflection} Let $g \in \mathcal M^{+}_{\lambda, \Lambda}$ and suppose $u \in W^{1, 2}_{\text{loc}}(B_{1}^{+} \cup T; \mathbb{D})$ solves \begin{equation}\label{halfGL} \left\{ \begin{array}{cl} -\Delta_{g} u &= \epsilon^{-2}(1 - |u|^{2})u \text{ in }B_{1}^{+},\\ \partial_{n} u &= 0 \text{ in }T. \end{array} \right. \end{equation} Then, letting \begin{equation} \tilde{u}(x', x^{n}) = \left\{ \begin{array}{cl} u(x', x^{n}) & \ x^{n} > 0,\\ u(x', -x^{n}) & \ x^{n} < 0, \end{array} \right. \end{equation} we have that $\tilde{u}$ lies in $W^{1, 2}_{\text{loc}}(B_{1}; \mathbb{D})$ and solves \begin{equation}\label{wholeGL} -\Delta_{g} \tilde{u} = \epsilon^{-1}(1 - |\tilde{u}|^{2})\tilde{u} \text{ on }B_{1}. \end{equation} \end{lemm} \begin{proof} The first assertion is standard. To prove that $\tilde{u}$ solves \eqref{wholeGL} we take $\zeta \in C^{1}_{c}(B_{1})$ and use the symmetry of $\tilde{u}$ and $g$ to compute \begin{align*} &\int_{B_{1}} \langle \nabla\tilde{u}, \nabla\zeta \rangle + \epsilon^{-2}(|\tilde{u}|^{2}-1)\tilde{u}\cdot \zeta \dvol_{g}\\ &= \int_{B_{1}^{+}} \langle \nabla u, \nabla\left( \zeta + \tau^{\ast}\zeta \right) \rangle + \epsilon^{-2}(|u|^{2} - 1)u\cdot (\zeta + \tau^{\ast}\zeta) \dvol_{g} = 0. \end{align*} The second inequality follows because $u$ solves \eqref{halfGL}. \end{proof} \begin{comment} The condition \eqref{halfGL} is to be understood in the weak sense, that is, \begin{equation} \int_{B_{1}^{+}} \langle \nabla u, \nabla \zeta \rangle + \frac{|u|^{2} - 1}{\epsilon^{2}} u \cdot \zeta \dvol = 0, \end{equation} for all $\zeta \in C^{1}_{0}(B_{1}; \mathbb{C})$. \end{comment} \begin{comment} To see that $\tilde{u} \in W^{1, 2}_{\loc}(B_{1}; \mathbb{C})$, we first note that obviously, $\|\tilde{u}\|_{\infty; B_{1}} \leq 1$. Next, we take a smooth function $\eta: \mathbb{R}_{+} \to [0, 1]$ satisfying $\eta(t) = 0$ for $t \leq 1$ and $\eta(t) = 0$ for $t \geq 2$, and define a sequence of cut-off functions $\eta_{k}$ by $\eta_{k}(x', x_{n}) = \eta(k|x^{n}|)$. Next, we let $\zeta$ be a test function in $C^{1}_{0}(B_{1}; \mathbb{C})$ and compute, for each $k$, \begin{align*} \int_{B_{1}} \tilde{u} \partial_{n} \left( \eta_{k}\zeta \right)dx =& \int_{B_{1}^{+}} \tilde{u}(x', x^{n}) \partial_{n}\eta_{k}(x', x^{n})\left( \zeta(x', x^{n}) - \zeta(x', - x^{n}) \right)dx\\ &+ \int_{B_{1}} \tilde{u} \eta_{k} \partial_{n}\zeta dx\\ \longrightarrow & \int_{B_{1}}\tilde{u}\partial_{n}\zeta dx \text{ as }k \to \infty. \end{align*} On the other hand, since $u \in W^{1, 2}_{\text{loc}}(B_{1}^{+}\cup T; \mathbb{C})$, by definition of $\tilde{u}$ we have \begin{align*} \int_{B_{1}} \tilde{u}\partial_{n} \left( \eta_{k}\zeta \right)dx = & -\int_{B_{1}^{+}} \partial_{n}u\ \eta_{k}\zeta dx + \int_{B_{1}^{-}} \partial_{n}u(x', - x^{n}) \eta_{k}(x)\zeta(x) dx\\ \longrightarrow & - \int_{B_{1}^{+}}\partial_{n}u(x', x^{n})\zeta(x)dx + \int_{B_{1}^{-}}\partial_{n}u(x', -x^{n})\zeta(x)dx \text{ as }k \to \infty. \end{align*} Combining the above two calculations gives \begin{equation} \partial_{n}\tilde{u}(x', x^{n}) = \left\{ \begin{array}{cl} \partial_{n} u(x', x^{n}) & \ x^{n} > 0,\\ - \partial_{n} u(x', -x^{n}) & \ x^{n} < 0. \end{array} \right. \end{equation} The computations for the remaining partial derivatives are similar (in fact simpler), and we get, for $i = 1, \cdots, n-1$, \begin{equation} \partial_{i}\tilde{u}(x', x^{n}) = \left\{ \begin{array}{cl} \partial_{i} u(x', x^{n}) & \ x^{n} > 0,\\ \partial_{i} u(x', -x^{n}) & \ x^{n} < 0. \end{array} \right. \end{equation} Thus $\tilde{u} \in W^{1, 2}_{\text{loc}}(B_{1}; \mathbb{D})$. \end{comment} \section{Energy monotonicity formulae} \input{monotonicity} \section{The $\eta$-ellipticity theorem} \input{etaellip} \section{Convergence of Ginzburg-Landau solutions I: The regular part} \input{convergence1} \section{Convergence of Ginzburg-Landau solutions II: The singular part} \input{convergence2} \section{An example} \input{boundaryconcentration} \subsection{Improvement of the $\eta$-ellipticity theorem} The main result of this section is the following improvements of Theorems \ref{interioreta} and \ref{boundaryeta}, which require slightly better regularity of the metrics. The precise statements are given below. \begin{prop}[Interior version, cf. \cite{bos}] \label{interioretareg} There exists constants $\eta_{3}, \epsilon_{3}$ and $C$, depending only on $n, \lambda$ and $\Lambda$ such that given $g \in \mathcal M_{1, \lambda, \Lambda}$ and a solution $u: (B_{1}, g)\to \mathbb{D}$ to \eqref{GLequation}, satisfying \begin{equation} \int_{B_{1}}e_{\epsilon}(u) \dvol_{g} \leq \eta\left| \log\epsilon \right| \end{equation} with $\eta < \eta_{3}$ and $\epsilon < \epsilon_{3}$, we have that $|u| \geq 3/4$ on $B_{3/4}$, and that \begin{equation} \sup\limits_{x \in B_{1/2}} e_{\epsilon}(u)(x) \leq C\int_{B_{1}}e_{\epsilon}(u)\dvol_{g}. \end{equation} \end{prop} \begin{prop}[Boundary version] \label{boundaryetareg} There exists constants $\eta_{3}', \epsilon_{3}'$ and $C$, depending only on $n, \lambda$ and $\Lambda$ such that if $g$ is a metric in $\mathcal M^{+}_{1, \lambda, \Lambda}$ with respect to which $T$ is convex, and if $u: (B^{+}_{1}, g)\to \mathbb{D}$ is a solution to \eqref{halfGL} satisfying \begin{equation} \int_{B^{+}_{1}}e_{\epsilon}(u) \dvol_{g} \leq \eta\left| \log\epsilon \right| \end{equation} with $\eta < \eta_{3}'$ and $\epsilon < \epsilon_{3}'$, then we have $|u| \geq 3/4$ on $B^{+}_{3/4}$ and there holds \begin{equation}\label{boundaryetaregconclusion} \sup\limits_{x \in B^{+}_{1/3}} e_{\epsilon}(u)(x) \leq C\int_{B^{+}_{1}}e_{\epsilon}(u)\dvol_{g}. \end{equation} \end{prop} We only prove the boundary version here since the proof of the interior version is essentially the same as in \cite{bos}. A key ingredient would be the following result, the interior version of which was first proven by Chen and Struwe (\cite{chenstruwe}). \begin{lemm} \label{gammareg} There exist constants $\gamma_{0}$ and $C$, depending only on $n, \lambda$ and $\Lambda$, such that if $g$ is a metric in $\mathcal M^{+}_{1, \lambda, \Lambda}$, $T$ is convex with respect to $g$ and $u:(B^{+}_{1}, g) \to \mathbb{D}$ is a solution to \eqref{halfGL} satisfying \begin{equation}\label{gammasmall} \int_{B^{+}_{1}}e_{\epsilon}(u)\dvol_{g} \leq \gamma_{0}, \end{equation} then there holds \begin{equation}\label{gammabound} \sup\limits_{x \in B_{1/2}^{+}} e_{\epsilon}(u)(x) \leq C \int_{B^{+}_{1}} e_{\epsilon}(u)\dvol_{g}. \end{equation} \end{lemm} \begin{proof} The proof we give below is adapted from that of Theorem 2.2 \cite{schoenharmonic}. We begin by noting the following B\^ochner-type inequality on $B_{1}^{+}$: \begin{equation}\label{GLbochner} \Delta e_{\epsilon}(u) \geq |\nabla^{2} u|^{2} + \Ric(\nabla u, \nabla u) + \epsilon^{-2}\left| \nabla |u|^{2} \right|^{2} - C_{n}e_{\epsilon}(u)^{2}, \end{equation} where $C_{n}$ is a dimensional constant. This inequality makes sense almost everywhere since $g$ is $C^{1, 1}$ and since $u \in W^{3, 2}$ by elliptic regularity. Moreover, \eqref{GLbochner} can be easily derived from the Ginzburg-Landau equation following the computations in \cite{chenstruwe} or \cite{js}, the only difference being that a Ricci-term appears when one commutes the covariant derivative with the Laplace operator. Next, we use Lemma \ref{GLreflection} to reflect $u$ evenly across $T$, let $r_{1} = 3/4$ and consider a point $x_{0} \in B^{+}_{r_{1}}$ where the following maximum is attained. \begin{equation*} \max\limits_{x \in B^{+}_{r_{1}}} \left( r_{1} - |x| \right)^{2}e_{\epsilon}(u)(x). \end{equation*} Following the proof of Theorem 2.2 of \cite{schoenharmonic}, we rescale by letting $e_{0} = e_{\epsilon}(u)(x_{0}), \rho_{0} = (r_{1} - |x_{0}|)/2$ and defining \begin{equation*} \tilde{\epsilon} = e_{0}^{1/2}\epsilon;\ \tilde{g}_{ij}(y) = g_{ij}(x_{0} + e_{0}^{-1/2}y) ;\ \tilde{u}(y) = u(x_{0} + e_{0}^{-1/2}y), \text{ for } y \in B_{e_{0}^{1/2}\rho_{0}}. \end{equation*} Then, as in \cite{schoenharmonic} there hold \begin{equation}\label{rescaledGLbound} e_{\tilde{\epsilon}}(\tilde{u})(0) = 1 \text{ and }e_{\tilde{\epsilon}}(\tilde{u})(y) \leq 4, \text{ for }y \in B_{e_{0}^{1/2}\rho_{0}}. \end{equation} To continue, we let $\psi(y) = x_{0} + e^{-1/2}_{0}y$ and define \begin{equation*} B_{r, +}(y) \equiv B_{r}(y) \cap \psi^{-1}(B_{1}^{+}) \text{ and } \tilde{T}_{r}(y) \equiv B_{r}(y)\cap \psi^{-1}(T). \end{equation*} Then we claim that for all $0 \leq \zeta \in W^{1, 2}_{0}(B_{e_{0}^{1/2}\rho_{0}})$, there holds \begin{equation}\label{improvedetaclaim} \int_{B_{e_{0}^{1/2}\rho_{0}, +}(0)} \langle \nabla \zeta, \nabla e_{\tilde{\epsilon}}(\tilde{u}) \rangle \dvol_{\tilde{g}} \leq C_{n, \lambda, \Lambda}\left( 1 + e_{0}^{-1} \right)\int_{B_{e_{0}^{1/2}\rho_{0}, +}(0)} \zeta e_{\tilde{\epsilon}}(\tilde{u}) \dvol_{\tilde{g}}. \end{equation} To see this, we first integrate by parts to get \begin{equation}\label{bochnerbyparts} \int_{B_{e_{0}^{1/2}\rho_{0}, +}(0)} \langle \nabla \zeta, \nabla e_{\tilde{\epsilon}}(\tilde{u}) \rangle \dvol_{\tilde{g}} = -\int_{\tilde{T}_{e_{0}^{1/2}\rho_{0}}(0)} \zeta \partial_{n} e_{\tilde{\epsilon}}(\tilde{u}) d\sigma_{\tilde{g}} - \int_{B_{e_{0}^{1/2}\rho_{0}, +}(0)} \zeta \Delta e_{\tilde{\epsilon}}(\tilde{u})\dvol_{\tilde{g}}. \end{equation} For the boundary term on the right, we note that the following holds on $\tilde{T}_{e_{0}^{1/2}\rho_{0}}(0)$. \begin{equation} \partial_{n}e_{\tilde{\epsilon}}(\tilde{u}) = \langle \nabla_{\partial_{n}} \nabla u, \nabla u \rangle = \langle \nabla_{\nabla u}\nabla u, \partial_{n} \rangle = -\langle \nabla_{\nabla u}\partial_{n}, \nabla u \rangle \geq 0, \end{equation} where in the last inequality we used the convexity assumption, and the preceding equality follows from the Neumann boundary condition. On the other hand, for the second term on the right-hand side of \eqref{bochnerbyparts}, we use \eqref{GLbochner} (properly scaled), \eqref{rescaledGLbound} and the fact that $g \in \mathcal M^{+}_{1, \lambda, \Lambda}$ to infer that \begin{equation} \Delta e_{\tilde{\epsilon}}(\tilde{u}) \geq - C_{n}\left( 1 + \frac{C_{n, \lambda, \Lambda}}{e_{0}} \right) e_{\tilde{\epsilon}}(\tilde{u}). \end{equation} Plugging the two inequalities above into \eqref{bochnerbyparts}, we get \eqref{improvedetaclaim} as claimed. To conclude, we write $x_{0} = (x_{0}', t_{0})$ and distinguish two cases according to the ratio of $t_{0}$ to $\rho_{0}$. \begin{enumerate} \item[(1)] If $t_{0} \geq \rho_{0}/4$, then $B_{e_{0}^{1/2}\rho_{0}/4, +} = B_{e_{0}^{1/2}\rho_{0}/4}$ and we can finish the proof as in Theorem 2.2 of \cite{schoenharmonic}, with the help of \eqref{improvedetaclaim}. (See also the arguments for Case (2) below.) Note that our inequalities \eqref{energydensitybound} and \eqref{GLbochner} should replace inequalities (2.5) and (2.1) of \cite{schoenharmonic}, respectively. \vskip 2mm \item[(2)] If $t_{0} \leq \rho_{0}/4$, we in fact still follow \cite{schoenharmonic}, only that slightly more care is needed. For convenience, we introduce the notation $\hat{y} = \psi^{-1}\left((x_{0}', 0)\right) = (0, - e_{0}^{1/2}t_{0})$. We now show that $e_{0}^{1/2}\rho_{0} \leq 2$. Suppose not, then we have $e_{0}^{-1} \leq \rho_{0}^{2} \leq 1$. Hence by \eqref{improvedetaclaim} and the mean value inequality (see for instance \cite{gt}, Theorem 8.17, but with balls replaced by half-balls) applied to $B_{1, +}(\hat{y}) \subseteq B_{e_{0}^{1/2}\rho_{0}, +}(0)$, we have \begin{align*} 1 = e_{\tilde{\epsilon}}(\tilde{u})(0) &\leq \sup\limits_{y \in B_{e_{0}^{1/2}t_{0}, +}(\hat{y})}(\tilde{u})(y) \leq C\int_{B_{1, +}(\hat{y})} e_{\tilde{\epsilon}}(\tilde{u}) \dvol_{\tilde{g}}\\ & = C \left( e_{0}^{-1/2} \right)^{2-n}\int_{B^{+}_{e_{0}^{-1/2}}(x'_{0})} e_{\epsilon}(u)\dvol_{g}\\ & \leq C \int_{B_{1}} e_{\epsilon}(u)\dvol_{g} \leq C\gamma_{0}, \end{align*} where we used \eqref{energydensitybound} in the third inequality, and the last inequality follows from \eqref{gammasmall}. We then arrive at a contradiction if $\gamma_{0}$ is chosen small enough, and therefore $e_{0}^{1/2}\rho_{0} \leq 2$ as claimed. Now we use the mean value inequality again, but this time on $B_{e_{0}^{1/2}\rho_{0}/2, +}(\hat{y})$ to get \begin{align*} 1 = e_{\tilde{\epsilon}}(\tilde{u})(0) &\leq \sup\limits_{y \in B_{e_{0}^{1/2}t_{0}, +}(\hat{y})} e_{\tilde{\epsilon}}(\tilde{u})(y) \leq C \left( e_{0}^{1/2}\rho_{0} \right)^{-n} \int_{B_{e_{0}^{1/2}\rho_{0}/2, +}(\hat{y})} e_{\tilde{\epsilon}}(\tilde{u}) \dvol_{\tilde{g}}\\ &= C\left( e_{0}^{1/2}\rho_{0} \right)^{-2} \rho_{0}^{2-n} \int_{B^{+}_{\rho_{0}/2}(x_{0}')} e_{\epsilon}(u)\dvol_{g}\leq Ce_{0}^{-1}\rho_{0}^{-2} \int_{B_{1}}e_{\epsilon}(u)\dvol_{g}. \end{align*} Thus we conclude that \begin{equation} \left( r_{1} - |x_{0}| \right)^{2}e_{\epsilon}(u)(x_{0}) = 4\rho_{0}^{2}e_{0} \leq C\int_{B_{1}^{+}}e_{\epsilon}(u)\dvol_{g}, \end{equation} which immediately implies \eqref{gammabound} by our choice of $x_{0}$. \end{enumerate} \end{proof} A second ingredient we need for the proof of Theorem \ref{boundaryetareg} is a boundary version of Theorem A.2 of \cite{bos}. \begin{lemm}\label{boundarybos} There exists constants $\tilde{\epsilon}, \sigma_{0}, \alpha_{0}$ and $C$, depending only on $n, \lambda$ and $\Lambda$ such that if $g \in \mathcal M_{1, \lambda, \Lambda}^{+}$, $T$ is convex with respect to $g$, and $u: (B_{1}^{+}, g) \to \mathbb{D}$ is a solution to \eqref{halfGL} with $\epsilon < \tilde{\epsilon}$, satisfying \begin{equation} \label{alphaenergy} \int_{B_{1}^{+}} e_{\epsilon}(u)\dvol_{g} \leq \epsilon^{-\alpha_{0}} \text{, and } \end{equation} \begin{equation} \label{sigmaclose} |u| \geq 1 - \sigma_{0} \text{ on }B_{1}^{+}, \end{equation} then the gradient estimate \eqref{gammabound} holds. \end{lemm} \begin{proof}[Sketch of proof] We begin by reflecting $u$ using Lemma \ref{GLreflection}. Then the arguments for inequality (A.28) in \cite{bos} carries over with only minor modifications to show that when $\sigma_{0}$ is small enough, we have, for $x_{0} \in B_{1/2}$ and $r_{0} \in (0, 1/8)$, \begin{align}\label{boscopy} r_{0}^{2-n}\int_{B_{r_{0}}} e_{\epsilon}(u)\dvol_{g} &\leq C\left( r_{0}^{2} + r_{0}^{2-n}\epsilon^{\beta_{0}} \right) \int_{B_{1}}e_{\epsilon}(u)\dvol_{g}\\ \nonumber & \leq C\left( r_{0}^{2} + r_{0}^{2-n}\epsilon^{\beta_{0}} \right)\epsilon^{-\alpha_{0}}, \end{align} where $C$ and $\beta_{0}$ are some constants depending at most on $n, \lambda$ and $\Lambda$. Choosing $r_{0} = \epsilon^{\beta_{0}/n}$ and requiring that $\alpha_{0} < 2\beta_{0}/n$, we see that for $\epsilon$ small enough, there holds \begin{equation}\label{gammaassumption} r_{0}^{2-n}\int_{B_{r_{0}}(x_{0})}e_{\epsilon}(u)\dvol_{g} \leq \gamma_{0}/4^{n-2}. \end{equation} As in the previous proof, we now let $x_{0} = (x_{0}', t_{0})$ and distinguish two cases. \begin{enumerate} \item[(1)] If $r_{0} \leq 4t_{0}$, then obviously $B_{r_{0}/4}(x_{0}) \subseteq B_{1}^{+}$. Moreover, from \eqref{gammaassumption} we see that \begin{equation} \left( \frac{r_{0}}{4} \right)^{2-n}\int_{B_{r_{0}/4}(x_{0})} e_{\epsilon}(u)\dvol_{g} \leq \gamma_{0}. \end{equation} An argument similar to the proof of Lemma \ref{etadecentralized} then allows us to apply Lemma \ref{gammareg}, or rather its interior version, on $B_{r_{0}/4}(x_{0})$ to infer that \begin{equation} r_{0}^{2}e_{\epsilon}(u)(x_{0}) \leq Cr_{0}^{2-n}\int_{B_{r_{0}/4}(x_{0})}e_{\epsilon}(u)\dvol_{g} \leq Cr_{0}^{2}\int_{B_{1}}e_{\epsilon}(u)\dvol_{g}, \end{equation} and we are done. Note that we used \eqref{boscopy} in the second inequality. \vskip 2mm \item[(2)] If $r_{0} > 4t_{0}$, then we have $B^{+}_{r_{0}/2}(x_{0}') \subseteq B_{r_{0}}(x_{0})$ and \eqref{gammaassumption} yields \begin{equation} \left( \frac{r_{0}}{2} \right)^{2-n}\int_{B_{r_{0}/2}^{+}(x_{0}')}e_{\epsilon}(u)\dvol_{g} \leq \gamma_{0}, \end{equation} and therefore we may use Lemma \ref{gammareg} on $B_{r_{0}/2}^{+}(x_{0}')$ to get \begin{align} r_{0}^{2} e_{\epsilon}(u)(x_{0}) &\leq r_{0}^{2}\sup\limits_{x \in B_{r_{0}/4}(x_{0}')} e_{\epsilon}(u)(x) \leq Cr_{0}^{2-n}\int_{B^{+}_{r_{0}/2}(x_{0}')}e_{\epsilon}(u)\dvol_{g} \\ \nonumber &\leq Cr_{0}^{2}\int_{B_{1}} e_{\epsilon}(u)\dvol_{g}, \end{align} and again we're done upon dividing through by $r_{0}^{2}$. \end{enumerate} \end{proof} \begin{proof}[Proof of Proposition \ref{boundaryetareg}] By Corollary \ref{etacoro}, if we choose $\eta_{3}'$ and $\epsilon_{3}'$ small enough, then $u$ verifies \eqref{sigmaclose} on $B_{3/4}^{+}$ for some $\sigma_{0} < 1/4$, which verifies the first assertion. Moreover, decreasing $\epsilon_{3}'$ if necessary, we can also ensure that $\left| \log\epsilon \right| < \epsilon^{-\alpha_{0}}$ for all $\epsilon < \epsilon_{3}'$. Therefore we may apply Lemma \ref{boundarybos} on $B_{3/4}^{+}$ to conclude that \begin{equation} \sup\limits_{x \in B_{3/8}^{+}} e_{\epsilon}(u)(x) \leq C\int_{B_{3/4}^{+}} e_{\epsilon}(u)\dvol_{g}, \end{equation} which certainly implies the desired estimate, \eqref{boundaryetaregconclusion}. \end{proof} \subsection{Higher-order estimates} Starting from Propositions \ref{interioretareg} and \ref{boundaryetareg}, we may derive higher-order interior and boundary estimates by an inductive argument adapted from \cite{bbh}. \begin{thm}[Interior estimates] \label{interiorhigher} Suppose that $g$ is a smooth metric on $B_{1}$ and that $u : (B_{1}, g) \to \mathbb{D}$ is a solution to \eqref{GLequation} satisfying \begin{equation}\label{energyeta} \int_{B_{1}} e_{\epsilon}(u)\dvol_{g} < \eta\left| \log\epsilon \right|, \end{equation} for some $\eta < \eta_{3}$ and $\epsilon < \epsilon_{3}$, where $\eta_{3}, \epsilon_{3}$ are determined by Theorem \ref{interioretareg}. Then, letting $X \equiv \epsilon^{-2}(1 - |u|)$ and writing $u$ in polar coordinates as $u = \rho e^{i\varphi}$, we have \begin{align} |\nabla \varphi|_{l, 0; B_{3^{-3l-1}}} &\leq C_{l}\left| \log\epsilon \right|^{1/2}, \label{inductivephase}\\ |X|_{l, 0; B_{3^{-3l-2}}} &\leq C_{l} \left| \log\epsilon \right|, \label{inductivemodulus}\\ |\nabla \rho|_{l, 0; B_{3^{-3l-3}}} & \leq C_{l}\epsilon^{a_{l}} \left| \log\epsilon \right|^{b_{l}}, \label{inductivegradmodulus} \end{align} for all $l \geq 0$, where $a_{l}$ and $b_{l}$ are constants depending only on $n$, $l$ and $g$. \end{thm} \begin{rmk}\label{phiSV} Note that, under the assumptions of Proposition \ref{interiorhigher}, we have $|u| > 3/4$ on $B_{3/4}$, and hence $\varphi$ is single-valued on $B_{3/4}$. Also, without loss of generality we require that $\fint_{B_{1}}\varphi \in [0, 2\pi)$. Then it's clear that $|\varphi|_{0; B_{1/3}} \leq 2\pi + |\nabla \varphi|_{0; B_{1/3}}$. \end{rmk} \begin{proof}[Proof of Theorem \ref{interiorhigher}] The proof will proceed by induction on $l$. When $l = 0$, the estimate \eqref{inductivephase} follows from \eqref{energyeta} and Proposition \ref{interioretareg}. To see \eqref{inductivemodulus}, we note that $\varphi$ and $\rho$ satisfy \begin{equation}\label{phiPDE} \Delta \varphi + 2 \rho^{-1} \langle \nabla \rho, \nabla \varphi \rangle = 0. \end{equation} \begin{equation}\label{rhoPDE} -\Delta \rho + \rho |\nabla\varphi|^{2} = \epsilon^{-2}\left( 1 - \rho^{2} \right)\rho. \end{equation} A direct computation using \eqref{rhoPDE} then shows that \begin{equation}\label{XPDE} -\epsilon^{2}\Delta X + \rho(1 + \rho) X = \rho |\nabla\varphi|^{2}. \end{equation} Therefore, from \eqref{inductivephase} and the fact that $1 \geq \rho > 3/4$ on $B_{3/4}$ we infer that \begin{equation*} -\epsilon^{2}\Delta X + X \leq C\left| \log\epsilon \right|, \text{ on }B_{1/3} \end{equation*} Therefore, with the help of Lemma \ref{bbhmax}, we easily get \eqref{inductivemodulus}. Next, we return to the equation \eqref{rhoPDE} and observe that, by \eqref{inductivephase} and \eqref{inductivemodulus}, we have \begin{equation*} |\Delta \rho|_{0; B_{3^{-2}}} \leq C\left| \log\epsilon \right| \text{ and } |1 - \rho|_{0; B_{3^{-2}}} \leq C\epsilon^{2}\left| \log\epsilon \right|. \end{equation*} Combining this with Lemma \ref{interiormulti} applied to $1 - \rho$, we obtain \eqref{inductivegradmodulus} with $\alpha_{0} = \beta_{0} = 1$. For the inductive step, we assume the desired estimates hold for $0, 1, \cdots, l$ and prove them for $l + 1$. For later use, we fix radii $3^{-3l-4} < r_{3} < r_{2} < r_{1} < 3^{-3l-3}$. Also, $C$, $a$ and $b$ will denote positive constants that depend only on $n$, $l$ and $g$, and may change from line to line. To begin, we see from \eqref{phiPDE} and the induction hypotheses that \begin{equation}\label{Deltaphicl} |\Delta \varphi |_{l; B_{3^{-3l-3}}} \leq C\epsilon^{a} \left| \log\epsilon \right|^{b}. \end{equation} By \eqref{Deltaphicl} and the interior Schauder estimates, we have (recall Remark \ref{phiSV}) \begin{equation}\label{philplus1} | \varphi |_{l+1, 1/2; B_{r_{1}}} \leq C\left( |\varphi |_{0; B_{1/3}} + |\Delta \varphi |_{l; B_{3^{-3l-3}}} \right) \leq C\left| \log \epsilon \right|^{1/2}. \end{equation} \begin{comment} On the other hand, by the induction hypotheses and \eqref{rhoPDE}, there holds \begin{equation}\label{Deltathetacl} |\Delta \rho |_{l; B_{3^{-3l-2}}} \leq C\left| \log\epsilon \right|. \end{equation} Thus the interior Schauder estimates give \begin{equation} |\nabla \rho|_{l; B_{3^{-3l-3}}} \leq C\left| \log\epsilon \right|. \end{equation} \end{comment} On the other hand, taking a multi-index $\alpha$ with length $l$ and apply $\partial^{\alpha}$ to \eqref{rhoPDE}, then we get \begin{equation}\label{rhopartialPDE} -\Delta \partial^{\alpha}\rho + \partial^{\alpha}\left( \rho |\nabla \varphi|^{2} \right) = \partial^{\alpha}\left( X(1 + \rho)\rho \right) + \left[ \partial^{\alpha}, \Delta \right]\rho, \end{equation} where $\left[ \partial^{\alpha}, \Delta \right]$ denotes the commutator $\partial^{\alpha}\Delta - \Delta \partial^{\alpha}$. Moreover, a straightforward computation shows that, pointwise, there holds \begin{equation}\label{commutatorpointwise} \left| [\partial^{\alpha}, \Delta] \rho \right| \leq C\sum\limits_{0 \leq j \leq |\alpha|}|\nabla^{j + 1} \rho |, \end{equation} where $C$ depends only on $n, |\alpha|$ and the $C^{|\alpha|+1}$-norm of $g$. Note that the right-hand side of the above inequality can be controlled with the help of \eqref{inductivegradmodulus}. Using this and the induction hypotheses in \eqref{rhopartialPDE}, we infer that \begin{equation} |\Delta \partial^{\alpha}\rho|_{0; B_{3^{-3l-3}}} \leq C\left| \log\epsilon \right|. \end{equation} Since $|\partial^{\alpha}(1 - \rho)|_{0; B^{-3l-2}} \leq C\epsilon^{2}\left| \log\epsilon \right|$ by \eqref{inductivemodulus}, Lemma \ref{interiormulti} then yields \begin{align}\label{rholplus1} \nonumber &|\nabla \partial^{\alpha}\rho|_{0, 1/2; B_{r_{1}}} \leq C \epsilon^{a}\left| \log\epsilon \right|^{b}, \text{ for all }|\alpha| = l. \\ &\Longrightarrow |\nabla \rho|_{l, 1/2; B_{r_{1}}} \leq C\epsilon^{a}\left| \log\epsilon \right|^{b}. \end{align} Now, using \eqref{philplus1} and \eqref{rholplus1} in \eqref{phiPDE} yields \begin{equation} |\Delta \varphi |_{l, 1/2; B_{r_{1}}} \leq C\epsilon^{a}\left| \log \epsilon \right|^{b}, \end{equation} from which we get that \begin{equation}\label{phiclplus1} | \varphi |_{l+2, 1/2; B_{r_{2}}} \leq C \left( |\varphi |_{0; B_{1/3}} + |\Delta\varphi |_{l, 1/2; B_{r_{1}}} \right) \leq C \left| \log \epsilon \right|^{1/2}. \end{equation} In particular, this proves \eqref{inductivephase} with $l+1$ in place of $l$, since $r_{2} > 3^{-3l-4}$. Next we prove \eqref{inductivemodulus} for $l + 1$. To that end, notice that by the equation \eqref{XPDE} and the induction hypotheses, we have \begin{equation}\label{DeltaXcl} |\Delta X |_{l; B_{3^{-3l-2}}} \leq C \epsilon^{-2} \left| \log\epsilon \right|. \end{equation} Hence the interior Schauder estimates yield \begin{equation}\label{Xclplus1preliminary} | X |_{l+1; B_{3^{-3l-3}}} \leq C \epsilon^{-2}\left| \log \epsilon \right|. \end{equation} Taking a multi-index $\alpha$ with $|\alpha| = l$ and applying $\partial^{\alpha}$ to both sides of \eqref{XPDE}, we see that \begin{align}\label{DeltapartialalphaX} | \Delta \partial^{\alpha}X |_{0; B_{3^{-3l-3}}} &\leq | \partial^{\alpha}\Delta X |_{0; B_{3^{-3l-3}}} + |[\partial^{\alpha}, \Delta]X|\\ \nonumber &\leq | \partial^{\alpha}\Delta X |_{0; B_{3^{-3l-3}}} + C | X |_{l+1; B_{3^{-3l-3}}}\\ \nonumber&\leq C \epsilon^{-2} \left| \log \epsilon \right|, \end{align} where the last inequality follows from \eqref{DeltaXcl} and \eqref{Xclplus1preliminary}, and the second inequality follows from \eqref{commutatorpointwise} with $X$ in place of $\rho$. Therefore, Lemma \ref{interiormulti} gives \begin{align*} |\nabla \partial^{\alpha} X |_{0; B_{r_{1}}}\leq C\left( |\partial^{\alpha}X |_{0; B_{3^{-3l-3}}} + |\partial^{\alpha}X |_{0; B_{3^{-3l-3}}}^{1/2} | \Delta\partial^{\alpha}X |_{0; B_{3^{-3l-3}}}^{1/2} \right)\leq C \epsilon^{-1}\left| \log\epsilon \right|. \end{align*} Since $\alpha$ is any multi-index with $|\alpha| = l$, we see that \begin{equation}\label{Xclplus1almost} |X |_{l + 1; B_{r_{1}}} \leq C \epsilon^{-1} \left| \log\epsilon \right|. \end{equation} Next we want to improve \eqref{Xclplus1almost} to get \eqref{inductivemodulus} for $l + 1$. Before that, let us observe that we can use \eqref{Xclplus1almost} to get a $C^{l+2}$-estimate on $X$, which will be useful for handling commutator terms in the subsequence argument. Specifically, looking back at \eqref{XPDE}, we see from \eqref{inductivegradmodulus}, \eqref{phiclplus1} and \eqref{Xclplus1almost} that \begin{equation}\label{DeltaXclplus1} |\Delta X |_{l + 1; B_{r_{2}}} \leq C \epsilon^{-3}\left| \log\epsilon \right|. \end{equation} Therefore, interior Schauder estimates give \begin{equation}\label{Xclplus2} |X |_{l + 2; B_{r_{3}}} \leq C \epsilon^{-3}\left| \log\epsilon \right|. \end{equation} Arguing as in \eqref{DeltapartialalphaX}, for $|\alpha| = l + 1$ we have \begin{equation}\label{Deltapartialalphaplus1X} |\Delta \partial^{\alpha}X|_{0; B_{r_{3}}} \leq C \epsilon^{-3}\left| \log\epsilon \right|. \end{equation} Then, as above, we infer from \eqref{Deltapartialalphaplus1X}, \eqref{Xclplus1almost} and Lemma \ref{interiormulti} that \begin{equation}\label{Xclplus2almost} |X|_{l + 2; B_{3^{-3l-4}}} \leq C \epsilon^{-2}\left| \log\epsilon \right|. \end{equation} We now proceed to improve \eqref{Xclplus1almost} to the desired estimate. To that end, we follow \cite{bbh} and rewrite \eqref{XPDE} as \begin{equation}\label{XPDEalt} -\epsilon^{2}\Delta X + 2X = \rho |\nabla \varphi |^{2} + 3\epsilon^{2}X^{2} - \epsilon^{4}X^{3} \equiv R. \end{equation} By \eqref{inductivemodulus}, \eqref{inductivegradmodulus}, \eqref{phiclplus1} and \eqref{Xclplus1almost}, we have $| R |_{l+1; B_{r_{2}}} \leq C \left| \log\epsilon \right|$. Next, we take a multi-index $\alpha$ of length $l+1$ and apply it to both sides of the above equation, getting \begin{equation} -\epsilon^{2}\Delta \partial^{\alpha}X + 2\partial^{\alpha}X = \epsilon^{2} [\partial^{\alpha}, \Delta]X + \partial^{\alpha}R. \end{equation} By the $C^{l+1}$-bound on $R$ and the estimates \eqref{Xclplus2almost} and \eqref{commutatorpointwise}, we see that the right-hand side of the above equation is bounded pointwise on $B_{3^{-3l-4}}$ by $ C \left| \log\epsilon \right|$. Therefore we may use Lemma \ref{bbhmax} to get \begin{equation}\label{Xclplus1} |\partial^{\alpha}X|_{0; B_{3^{-3l-5}}} \leq C \left( 1 + \epsilon^{-1} e^{-\frac{C}{\epsilon}} \right)\left| \log\epsilon \right| \leq C \left| \log\epsilon \right|. \end{equation} Since $\alpha$ is any multi-index with length $l+1$, we conclude that \begin{equation}\label{Xlplusonefinal} |X|_{l + 1; B_{3^{-3l-5}}} \leq C\left| \log\epsilon \right|; \end{equation} in other words, the estimate \eqref{inductivemodulus} holds for $l + 1$. Finally, we prove \eqref{inductivegradmodulus} for $l + 1$. From \eqref{rhoPDE}, \eqref{phiclplus1} and \eqref{Xlplusonefinal}, we infer that $|\Delta \rho|_{l+1; B_{3^{-3l-5}}} \leq C \left| \log\epsilon \right|$, and hence \begin{equation} |\rho|_{l + 2; B_{r_{4}}} \leq C\left| \log\epsilon \right|, \end{equation} where $3^{-3l-6} < r_{4} < 3^{-3l-5}$. Letting $\alpha$ be a multi-index of length $l + 1$ and applying $\partial^{\alpha}$ to both sides of \eqref{rhoPDE}, we see with the help of \eqref{commutatorpointwise} that \begin{equation} |\Delta \partial^{\alpha}\rho|_{0; B_{r_{4}}} \leq C\left| \log\epsilon \right| \end{equation} Hence, recalling that $|\partial^{\alpha}\rho|_{0; B_{r_{4}}} \leq |\nabla \rho|_{l; B_{3^{-3l-3}}} \leq C\epsilon^{a}\left| \log\epsilon \right|^{b}$ and again using Lemma \ref{interiormulti}, we arrive at \begin{equation} |\nabla \partial^{\alpha} \rho |_{0; B_{3^{-3l-6}}} \leq C \epsilon^{a} \left| \log\epsilon \right|^{b}, \end{equation} and the estimate \eqref{inductivegradmodulus} for $l+1$ follows immediately. By induction, we complete the proof of the Theorem. \end{proof} \begin{rmk} The structure of the above proof is borrowed from \cite{bbh}. However, in the setting of \cite{bbh} the authors were able to obtain estimates independent of $\epsilon$, whereas here we have to keep track of the $|\log\epsilon|$-factors. \end{rmk} \begin{thm}[Boundary estimates]\label{boundaryhigher} Let $g = (g_{ij})$ be a smooth metric on $B_{1}^{+}$ satisfying $g_{nn} \equiv 1$ and $g_{in} \equiv 0$ for all $i = 1, \cdots , n-1$ and suppose that $u:(B_{1}^{+}, g) \to \mathbb{D}$ is a solution to \eqref{halfGL} such that \begin{equation} \int_{B_{1}^{+}} e_{\epsilon}(u)\dvol_{g} < \eta \left| \log\epsilon \right|, \end{equation} for some $\eta < \eta_{3}'$ and $\epsilon < \epsilon_{3}'$, where $\eta_{3}', \epsilon_{3}'$ are as in Proposition \ref{boundaryetareg}. Then, letting $X$, $\rho$ and $\theta$ be as in Theorem \ref{interiorhigher}, we have \begin{align} |\nabla \varphi|_{1, 1/2; B_{3^{-4}}} &\leq C \left| \log\epsilon \right|^{1/2}, \label{boundaryphase}\\ |X|_{1, 0; B_{3^{-5}}} &\leq C \left| \log\epsilon \right|, \label{boundarymodulus}\\ |\nabla \rho|_{1, 1/2; B_{3^{-6}}} & \leq C\epsilon^{a} \left| \log\epsilon \right|^{b}, \label{boundarygradmodulus} \end{align} where $C, a$ and $b$ are positive constants depending only on $n$ and the metric $g$. \end{thm} \begin{proof} Below we will use $C, a, b$ to denote positive constants depending only on $n$ and $g$. We first note that, by our assumptions and Proposition \ref{boundaryetareg}, there holds $\rho \geq 3/4$ on $B_{3/4}^{+}$ and that \begin{equation}\label{c1phi} |\nabla \varphi|_{0; B_{1/3}^{+}} \leq C\left| \log\epsilon \right|^{1/2}. \end{equation} Then, as in the proof of Theorem \ref{interiorhigher}, we know that $X$ satisfies \begin{equation*} -\epsilon^{2}\Delta X + X \leq C\left| \log\epsilon \right| \text{ on }B_{1/3}^{+}. \end{equation*} Moreover, since $\partial_{\nu}X = 0$ on $T$, we may invoke Lemma \ref{bbhmaxboundary} to infer that \begin{equation*} |X|_{0; B_{1/9}^{+}} \leq C\left| \log\epsilon \right|. \end{equation*} By the above two estimates, the equation \eqref{rhoPDE}, and the fact that $\partial_{\nu}\rho = 0$ on $T$, we can use Lemma \ref{boundarymulti} in place of \eqref{interiormulti} and argue as in Theorem \ref{interiorhigher} to get \begin{equation*} |\nabla \rho|_{0; B_{1/27}^{+}} \leq C\epsilon \left| \log\epsilon \right|. \end{equation*} To go from here to the desired estimates, we would follow the induction step in the previous proof with $l = 0$, except that we replace Lemma \ref{interiormulti} by Lemma \ref{boundarymulti} or Remark \ref{dirichletmulti}, and replace Lemma \ref{bbhmax} by Lemma \ref{bbhmaxboundary} or \ref{bbhmaxdirichlet}. These boundary versions would be applicable because by \eqref{halfGL}, $\varphi$, $\rho$, $X$, and $\partial_{i}X$ for $i = 1, \cdots, n-1$ all satisfy the homogeneous Neumann condition on $T$, while $\partial_{n}X$ satisfies the homogeneous Dirichlet condition on $T$ since it equals $\partial_{\nu}X$ by our assumptions on $g$. The details will be omitted to avoid repetition. \begin{comment} we fix radii $3^{-3} > r_{1} > r_{2} > r_{3} > 3^{-4}$. Using the estimates derived so far in \eqref{phiPDE}, we find that $|\Delta \varphi|_{0; B_{3^{-3}}} \leq C\epsilon\left| \log\epsilon \right|^{3/2}$. Since $\partial_{\nu}\varphi = 0$ on $T$, we may use the boundary Schauder estimates to infer that \begin{equation*} |\varphi|_{1, 1/2; B_{r_{1}}^{+}}\leq C\left| \log\epsilon \right|^{1/2}. \end{equation*} On the other hand, from \eqref{rhoPDE} and the above $C^{0}$-estimates for $\nabla\varphi$ and $X$, we have $|1 - \rho|_{0; B^{+}_{3^{-2}}} \leq C\epsilon^{2}\left| \log\epsilon \right|$ and that $|\Delta \rho|_{0; B^{+}_{3^{-3}}} \leq C\left| \log\epsilon \right|$. Since $\partial_{\nu}\rho = 0$ on $T$, we may use Lemma \ref{boundarymulti} to infer that there exists constants $a, b$ such that \begin{equation*} |\nabla \rho|_{0, 1/2; B^{+}_{r_{1}}} \leq C\epsilon^{a}\left| \log\epsilon \right|^{b}, \end{equation*} Using this along with the $C^{1, 1/2}$-bound on $\varphi$ derived above, we know from \eqref{phiPDE} that $|\Delta \varphi|_{0, 1/2; B_{r_{1}}^{+}} \leq C\epsilon^{a}\left|\log\epsilon \right|^{b}$. Since $\partial_{\nu}\varphi = 0$, we infer that \begin{equation*} |\varphi|_{2, 1/2; B_{r_{2}}^{+}} \leq C\left| \log\epsilon \right|^{1/2}, \end{equation*} which establishes \eqref{boundaryphase}. Next we prove \eqref{boundarymodulus}. By the bounds on $|\nabla\varphi|_{0, B_{1/3}^{+}}$ and $|X|_{0; B_{1/9}^{+}}$ in the beginning of the proof, and the equation \eqref{XPDE}, we have $|\Delta X|_{0; B_{1/9}^{+}} \leq C\epsilon^{-2}\left| \log\epsilon \right|$. We can then use \eqref{boundarymulti} (recall that $\partial_{\nu}X = 0$ on T as is easily seen) to get \begin{equation*} |\nabla X|_{0; B_{3^{-3}}^{+}} \leq C\epsilon^{-1}\left| \log\epsilon \right|. \end{equation*} We can now follow the arguments used to derive \eqref{Xclplus2almost} in the proof of Proposition \ref{interiorhigher} (using boundary Schauder estimates and Lemma \ref{boundarymulti} instead of interior Schauder estimates and Lemma \ref{interiormulti}, respectively) to obtain \begin{equation*} |X|_{2; B_{3^{-4}}^{+}} \leq C\epsilon^{-2}\left| \log\epsilon \right|. \end{equation*} Recalling the equation \eqref{XPDEalt}, we see that in the present situation we have $|R|_{1; B_{r_{2}}^{+}} \leq C\left| \log\epsilon \right|$. Next we apply $\partial_{i}$ to \eqref{XPDEalt} to get \begin{equation*} -\epsilon^{2}\Delta \partial_{i}X + 2\partial_{i}X = \epsilon^{2}[\partial_{i}, \Delta]X + \partial_{i}R. \end{equation*} It follows from the estimates we just derived on $X$ and $R$ that the right-hand side of the above equation is bounded on $B_{3^{-4}}$ by $C \left| \log\epsilon \right|$. Since we have $\partial_{\nu}\partial_{i}X = 0$ on $T$ for $i = 1, \cdots, n-1$, and $\partial_{i}X = \partial_{\nu}X = 0$ on $T$ for $i = n$, we see that we can apply Lemma \ref{bbhmaxboundary} when $i \neq n$ and Lemma \ref{bbhmaxdirichlet} when $i = n$ to conclude that \begin{equation*} |\nabla X|_{0; B_{3^{-5}}^{+}} \leq C\left| \log\epsilon \right|, \end{equation*} which verifes \eqref{boundarymodulus}. From \eqref{boundaryphase}, \eqref{boundarymodulus} and \eqref{rhoPDE} we infer that $|\Delta\rho|_{1; B_{3^{-5}}^{+}} \leq C\left| \log\epsilon \right|$ and therefore $|\rho|_{2; B_{r_{4}}^{+}} \leq C\left| \log\epsilon \right|$, where $r_{4}$ is some radius we choose that lies in $(3^{-6}, 3^{-5})$. Now, differentiating \eqref{rhoPDE}, we get after an easy calculation that \begin{equation*} - \Delta\partial_{i}\rho + \partial_{i}\left( \rho |\nabla\varphi|^{2} \right) = \partial_{i}\left( X(1 + \rho)\rho \right) + [\partial_{i}, \Delta]\rho. \end{equation*} By the above $C^{2}$-estimate for $\rho$ as well as \eqref{boundaryphase} and \eqref{boundarymodulus}, we infer that $|\Delta\partial_{i}\rho|_{0; B_{3^{-5}}} \leq C\left| \log\epsilon \right|$. Recalling the bound $|\nabla \rho|_{0; B_{1/27}^{+}} \leq C\epsilon \left| \log\epsilon \right|$ and the fact that $\partial_{\nu}\partial_{i}\rho = 0$ for $i \neq n$ and $\partial_{n}\rho = \partial_{\nu}\rho = 0$ on $T$, by Lemma \ref{boundarymulti} and Remark \ref{dirichletmulti}, we have \begin{equation} |\nabla \rho|_{1, 1/2; B_{3^{-6}}^{+}} \leq C\epsilon^{a}\left| \log\epsilon \right|^{b}. \end{equation} This establishes \eqref{boundarygradmodulus}, and completes the proof of Proposition \ref{boundaryhigher}. \end{comment} \end{proof} \subsection{Convergence away from singular set} Up to this point, we have mostly been working with solutions to the Ginzburg-Landau equation on a ball. We now return to the manifold setting. Recall that $M$ is isometrically embedded in a closed manifold $\widetilde{M}$ of the same dimension, which is isometrically embedded in $\mathbb{R}^{N}$. Also, in this section and in Section 7, we will regard $\mu_{k}$, $\mu$ and any other measure we introduce as measures on $\mathbb{R}^{N}$ supported on $\overline{M}$. For instance, $\mu(B^{N}_{r}(p))$ would be the same as $\mu(B^{N}_{r}(p) \cap \overline{M})$. We begin with the following consequence of the monotonicity formula, Proposition \ref{lipschitzmonotonicity}. \begin{prop}\label{globalmono} There exist universal positive constants $r_{2}, \chi, C$, such that whenever $u: M \to \mathbb{C}$ is a solution to \eqref{GLNeumann}, the following hold. \begin{enumerate} \item[(1)] For all $p \in M$, the function $\rho \mapsto e^{\chi\rho}\rho^{2-n}\mu_{k}(\tilde{B}_{\rho}(p))$ is increasing whenever $\rho \in (0, \min\{r_{2}, d(p, \partial M)\})$. \item[(2)] For all $p \in \partial M$, the function $\rho \mapsto e^{\chi\rho}\rho^{2-n}\mu_{k}(\tilde{B}^{+}_{\rho}(p))$ is increasing for $\rho \in (0, r_{2})$. \end{enumerate} \end{prop} \begin{proof} For (1), we simply apply Proposition \ref{lipschitzmonotonicity} on small enough geodesic balls (cf. Remark \ref{fermirmk}(2)). For (2), we take Fermi coordinates at $p \in \partial M$, reflect the solution using Lemma \ref{GLreflection} (cf. Remark \ref{fermirmk}(1)), and then apply Proposition \ref{lipschitzmonotonicity}. \end{proof} As a consequence of the above proposition and \eqref{GLenergyupperbound}, we get the following uniform upper bound. \begin{prop}\label{strongdensityupperbound} Let $K_{0}$ be as in \eqref{GLenergyupperbound}. There exists universal constants $r_{3}, C > 0$ such that for all $p \in \overline{M}$, $\rho < r_{3}$ and for all $k$, we have $\rho^{2-n}\mu_{k}(B^{N}_{\rho}(p)) \leq CK_{0}$. \end{prop} \begin{proof} Note that by Remark \ref{fermirmk}(2) there exists a universal $s_{1}$ such that for all $s < s_{1}$ we have \begin{equation}\label{geoeuclidean} B^{N}_{s/2}(p) \cap \widetilde{M} \subset \tilde{B}_{s}(p) \subset B^{N}_{2s}(p) \cap \widetilde{M}, \text{ if $p \in \widetilde{M}$; } \end{equation} \begin{equation}\label{fermieuclidean} B^{N}_{s/2}(p) \cap \overline{M} \subset \tilde{B}^{+}_{s}(p) \subset B^{N}_{2s}(p) \cap \overline{M},\text{ if if $p \in \partial M$. } \end{equation} Note that by \eqref{geoeuclidean} we have \begin{equation}\label{distancerel} d_{0}(p, \partial M)/2 \leq d(p, \partial M) \leq 2 d_{0}(p, \partial M), \end{equation} whenever $d < s_{1}/4$. We will take $r_{3} = \min\{s_{1}, r_{2}\}/64$, where $r_{2}$ is as in Proposition \ref{globalmono}. To continue, we distinguish four cases. \noindent\textbf{Case 1:} If $p \in \partial M$, then since $\rho < r_{3}$, we have \begin{align*} \rho^{2-n}\mu_{k}(B^{N}_{\rho}(p)) &\leq 2^{n-2}(2\rho)^{2-n}\mu_{k}(\tilde{B}^{+}_{2\rho}(p)) \leq Cr_{2}^{2-n}\mu_{k}(\tilde{B}^{+}_{r_{2}}(p))\\& \leq Cr_{2}^{2-n}\mu_{k}(\overline{M}) \leq CK_{0}. \end{align*} In the second inequality we invoked Proposition \ref{globalmono}(2) since $2\rho < r_{2}$, and in the last inequality we absorbed $r_{2}$ into the universal constant $C$. \vskip1mm \noindent\textbf{Case 2:} If $p \in M$ and $d \equiv d_{g}(p, \partial M) \geq 8r_{3}$, then we have \begin{align*} \rho^{2-n}\mu_{k}(B^{N}_{\rho}(p)) &\leq \rho^{2-n}\mu_{k}(\tilde{B}_{2\rho}(p)) \leq Cr_{3}^{2-n}\mu_{k}(\tilde{B}_{2r_{3}}(p))\\ &\leq Cr_{3}^{2-n}\mu_{k}(\overline{M}) \leq CK_{0}. \end{align*} In the second inequality we used Proposition \ref{globalmono}(1) since $2\rho < 2r_{3} < \min\{d, r_{2}\}$. \vskip 1mm \noindent\textbf{Case 3:} If $p \in M$ and $r_{3} > \rho \geq d/8$, then we may use \eqref{distancerel} to infer that $d_{0} \leq 2d < 16r_{3}$ and take $q \in B^{N}_{d_{0}}(p) \cap \partial M$ to estimate \begin{align*} \rho^{2-n}\mu_{k}(B_{\rho}^{N}(p)) & \leq \rho^{2-n}\mu_{k}(B^{N}_{\rho + d_{0}}(q)) \leq \rho^{2-n}\mu_{k}(\tilde{B}^{+}_{2\rho + 2d_{0}}(q))\\ &\leq C(\rho + d_{0})^{n-2}\rho^{2-n}r_{2}^{2-n}\mu_{k}(\tilde{B}^{+}_{r_{2}}(q)) \leq Cr_{2}^{2-n}\mu_{k}(\overline{M})\\ &\leq CK_{0}. \end{align*} Note that we used Proposition \ref{globalmono}(2) in the third inequality, since $2\rho + 2d_{0} \leq 34r_{3} < r_{2}$. Also, in the fourth inequality we used $d_{0} \leq 2d \leq 16\rho$ to bound $(\rho + d_{0})/\rho$. \vskip 1mm \noindent\textbf{Case 4:} If $p \in M$ and $\rho < d/8 < r_{3}$, then since $d < 8r_{3} < s_{1}/4$, we may use \eqref{distancerel} to deduce that $2\rho \leq d/4 \leq d_{0}/2 \leq d$. We now estimate \begin{align*} \rho^{2-n}\mu_{k}(B_{\rho}^{N}(p)) & \leq \rho^{2-n}\mu_{k}(\tilde{B}_{2\rho}(p)) \leq Cd_{0}^{2-n}\mu_{k}(\tilde{B}_{d_{0}/2}(p)) \leq Cd_{0}^{2-n}\mu_{k}(B^{N}_{d_{0}}(p)). \end{align*} Note that Proposition \ref{globalmono}(1) is used in the second inequality. The last term can then be estimated as in Case 3. \end{proof} \begin{rmk}\label{localizeduppersemicont} The above argument can be localized to show that for all $k \in \mathbb{N}$, $p \in \partial M$, $r < \min\{r_{2}, s_{1}/4\}$ and $q \in B^{N}_{r/4}(p)\cap \overline{M}$ we have \begin{equation} \rho^{2-n}\mu_{k}(B^{N}_{\rho}(q)) \leq Cr^{2-n}\mu_{k}(B^{N}_{r}(p)), \end{equation} where we require that $\rho < \min\{r_{3}, r/200\}$. \end{rmk} Going back to Proposition \ref{globalmono} and letting $k$ tend to infinity, one can easily show that the limit measure $\mu$ has the same monotonicity properties as does each $\mu_{k}$. Moreover, since both the geodesic distance (at interior points) and the Fermi distance (at boundary points) eventually agree with the Euclidean distance on smaller and smaller balls, we infer that the density $\Theta(\mu, \cdot)$ defined below exists everywhere on $\overline{M}$ and we could use either geodesic/Fermi balls or Euclidean balls in the definition. \begin{equation}\label{densityrel} \Theta(\mu, p) \equiv \lim\limits_{r \to 0}r^{2-n}\mu(B^{N}_{r}(p)) = \left\{ \begin{array}{cl} \lim\limits_{r \to 0}r^{2-n}\mu(\tilde{B}_{r}(p)) & \text{ if }p \in M,\\ \lim\limits_{r \to 0}r^{2-n}\mu(\tilde{B}^{+}_{r}(p)) & \text{ if }p \in \partial M. \end{array} \right. \end{equation} The singular set $\Sigma$ is then defined as the set of points where $\mu$ has positive density, i.e. \begin{equation*} \Sigma \equiv \{ p \in \overline{M} |\ \Theta(\mu, p) > 0 \}. \end{equation*} \begin{prop}\label{sigmaclosed} The set $\Sigma$ is closed. \end{prop} \begin{proof} We will show that $\overline{M}\setminus \Sigma$ is relatively open. To that end, suppose that $\Theta(\mu, p) = 0$ at some $p \in \overline{M}$. If $p \in \partial M$, then we may fix a small enough radius $r < \min\{r_{2}, s_{1}\}$ such that for all sufficiently large $k$ there holds \begin{equation} r^{2-n}\mu_{k}(B_{r}^{N}(p)) < \min\{\eta_{3}, \eta_{3}'\}/(2^{n-2}C), \end{equation} where $\eta_{3}, \eta_{3}'$ are from Propositions \ref{interioretareg}, \ref{boundaryetareg}, respectively, and $C$ is the constant from Remark \ref{localizeduppersemicont}. By Remark \ref{localizeduppersemicont} and \eqref{geoeuclidean}, for each $q \in B_{r/4}^{N}(p) \cap M$ we may choose $\rho < \min\{r_{3}, r/200, d_{0}(q, \partial M)\}$ and apply Proposition \ref{interioretareg} to the geodesic ball $\tilde{B}_{\rho/2}(q)$ to get \begin{equation*} \sup\limits_{\tilde{B}_{\rho/4}(q)}e_{\epsilon_{k}}(u_{k}) \leq C\rho^{-n}\int_{\tilde{B}_{\rho/2}(q)}e_{\epsilon_{k}}(u_{k})\dvol \leq C\rho^{-2}\eta_{3}'\left| \log\epsilon_{k} \right|. \end{equation*} Hence for all $s < \rho/2$, we have \begin{equation*} s^{2-n}\mu_{k}(\tilde{B}_{s}(q)) \leq Cs^{2}\rho^{-2}. \end{equation*} Passing to the limit as $k \to \infty$, we infer that $\Theta(\mu, q) = 0$. Similarly, for each $q \in B_{r/4}^{N}(p) \cap \partial M$ we may apply Proposition \ref{boundaryetareg} to a small enough Fermi ball around $q$ to conclude that $\Theta(\mu, q) = 0$. Therefore $\Theta(\mu, \cdot)$ vanishes in a relative neighborhood of $p$. If $p \in M$, the argument is similar (and in fact simpler), and we also get that $\Theta(\mu, \cdot)$ vanishes near $p$. \end{proof} \begin{rmk}\label{finitemeasure} The previous proof actually shows that if $\Theta(\mu, p) < \min\{\eta_{3}, \eta_{3}'\}/2^{n-2}C \equiv \underline{\eta}$, then $\Theta(\mu, p) = 0$ and $p \notin \Sigma$. Therefore we infer that \begin{equation}\label{lowerdensityboundpointwise} \underline{\eta} \leq \Theta(\mu, p)\text{ for all }p \in \Sigma. \end{equation} Combining this density lower bound and the assumption \eqref{GLenergyupperbound} with a standard covering argument, we get that $H^{n-2}(\Sigma) < \infty$. \end{rmk} In Section 7 we will need a slightly more quantitative version of the lower density bound in the previous remark. \begin{prop}\label{densitybounds} Let $\underline{\eta}$ be as in Remark \ref{finitemeasure}. There exists constants $r_{4}$ and $C$ such that \begin{equation}\label{densityinequalities} 5^{-n}\underline{\eta} \leq r^{2-n}\mu(B_{r}^{N}(p)) \text{ for all $p \in \Sigma$ and $r < r_{4}$.} \end{equation} \end{prop} \begin{proof} We argue by contradiction. Negating the statement we obtain sequences $r_{i} \to 0$ and $p_{i} \in \Sigma$ such that \begin{equation}\label{lowerboundnegation} \mu(B_{r_{i}}^{N}(p_{i})) < 5^{-n}\underline{\eta}r_{i}^{n-2}. \end{equation} Next, note that if \begin{equation*} \limsup\limits_{i \to \infty}r_{i}^{-1}d(p_{i}, \partial M) > 1/5, \end{equation*} then along a subsequence, which we do not relabel, we may use monotonicity and \eqref{lowerdensityboundpointwise} to estimate \begin{align*} 5^{-n}\underline{\eta} &\geq r_{i}^{2-n}\mu(B_{r_{i}}^{N}(p_{i})) \geq 5^{2-n}(r_{i}/5)^{2-n}\mu(\tilde{B}_{r_{i}/5}(p_{i}))\\ &\geq 5^{2-n}e^{-\chi(r_{i}/5)}\underline\eta, \end{align*} which is a contradiction for sufficiently large $i$. Hence in what follows we may assume that \begin{equation*} \limsup\limits_{i \to \infty}r_{i}^{-1}d(p_{i}, \partial M) \leq 1/5. \end{equation*} Then eventually, by \eqref{distancerel}, we have $d_{0}(p_{i}, \partial M) \leq 2d(p_{i}, \partial M) < r_{i}/2$, which allows us to choose $q_{i} \in B_{r_{i}/2}^{N}(p_{i}) \cap \partial M$. Note that we then have \begin{equation} \tilde{B}^{+}_{r_{i}/4}(q_{i}) \subset B^{N}_{r_{i}/2}(q_{i}) \subset B^{N}_{r_{i}}(p_{i}). \end{equation} Consequently we apply Proposition \ref{globalmono}(2) to estimate \begin{align*} 5^{-n}\underline\eta & \geq r_{i}^{2-n}\mu(B^{N}_{r_{i}}(p_{i})) \geq 4^{2-n}(r_{i}/4)^{2-n}\mu(\tilde{B}^{+}_{r_{i}/4}(q_{i}))\\ &\geq 4^{2-n}e^{-\chi(r_{i}/4)}\underline\eta, \end{align*} again a contradiction for $i$ large. \end{proof} The remaining properties of $\Sigma$ will be established in the next section. We now define the harmonic $1$-form $\psi$ in the conclusion of Theorem \ref{GLgeneralconvergence} and prove its asserted properties. \begin{thm}\label{regpartconvergence} Let $\rho_{k} = |u_{k}|$, $X_{k} = \epsilon_{k}^{-2}(1 - \rho_{k})$ and let $\psi_{k} = \left| \log\epsilon_{k} \right|^{-1/2}u_{k}\times du_{k}$. Then, passing to a subsequence if necessary, the following hold. \begin{enumerate} \item[(1)] $\nabla \rho_{k} \to 0$ and $\epsilon_{k}X_{k}\to 0$ in $C_{\loc}^{m}(M\setminus\Sigma)\cap C_{\loc}^{1}(\overline{M}\setminus \Sigma)$ for all $m$. \item[(2)] $\psi_{k}$ converges in $C^{m}_{\loc}(M\setminus \Sigma) \cap C^{1}_{\loc}(\overline{M}\setminus\Sigma)$ for all $m$. \item[(3)] Denoting the limit $1$-form in part (2) by $\psi$, then \begin{equation*} \lim_{k \to \infty}\mu_{k}\llcorner K = (|\psi|^{2}/2)\dvol\ \llcorner K \end{equation*} for all compact set $K \subset \overline{M}\setminus\Sigma$. In particular, $\int_{M}|\psi|^{2}\dvol \leq 2K_{0} < \infty.$ \item[(4)] $\psi$ is smooth and harmonic over all of $\overline{M}$, and satisfies $\mathfrak{n} \psi = 0$ on $\partial M$. \end{enumerate} \end{thm} \begin{proof} The proof will be based on the estimates obtained in Section 6.2. To begin, take $p \in M \setminus \Sigma$. Then, by the definition of $\Sigma$, we can fix a small enough radius $r = r_{p}$ such that for $k$ sufficiently large, there holds \begin{equation*} r^{2-n}\int_{B_{r}(p)}e_{\epsilon_{k}}(u_{k}) < \eta_{3}\left| \log\frac{\epsilon_{k}}{r} \right|. \end{equation*} But then, writing $u_{k}$ locally in polar form as $\rho_{k}e^{i\varphi_{k}}$ with the requirement that $\fint_{B_{r}(p)} \varphi_{k}\dvol \in [0, 2\pi)$ and recalling that $X_{k} = \epsilon_{k}^{-2}(1 - \rho_{k})$, we may apply Theorem \ref{interiorhigher} (suitably scaled) and pass to subsequences to arrange the following: \begin{comment} \begin{align*} r^{l+1} |\nabla\varphi_{k}|_{l, 0; B_{3^{-3l-1}r}(p)} &\leq C_{l}\left| \log (r^{-1}\epsilon_{k}) \right|^{1/2},\\ r^{l}|X_{k}|_{l, 0; B_{3^{-3l-2}r}(p)} &\leq C_{l}\left| \log (r^{-1}\epsilon_{k}) \right|,\\ r^{l + 1} |\nabla\rho_{k}|_{l, 0; B_{3^{-3l-3}r}(p)} & \leq C_{l}\epsilon_{k}^{a_{l}}\left| \log (r^{-1}\epsilon_{k}) \right|^{b_{l}}. \end{align*} Therefore, since $r = r_{p}$ is fixed, passing to a diagonal subsequence if necessary, we can guarantee the following. \end{comment} \begin{enumerate} \item[(i)] $|\log\epsilon_{k}|^{-1/2}d\varphi_{k}$ converges in $C^{l}(\tilde{B}_{3^{-3l-4}r}(p))$ for each $l$. \item[(ii)] $\left|\nabla\rho_{k}\right| $ and $\epsilon_{k}X_{k}$ converge in $C^{l}(\tilde{B}_{3^{-3l-3}r}(p))$ to zero for all $l$. \end{enumerate} Next we notice that since $u_{k} = \rho_{k}e^{i\varphi_{k}}$, we have \begin{align*} du_{k} &= e^{i\varphi_{k}}(d\rho_{k} + i\rho_{k}d\varphi_{k});\\ \left| \log\epsilon_{k} \right|^{1/2}\psi_{k} &= u_{k} \times du_{k} = \rho_{k}^{2}d\varphi_{k} = d\varphi_{k} - \epsilon_{k}^{2}X_{k}d\varphi_{k}. \end{align*} Hence by (i) and (ii) above, $\psi_{k}$ converges in $C^{l}(\tilde{B}_{3^{-3l-4}r}(p))$ to some limit $\psi$. Moreover, noting that $d^{\ast}(u_{k}\times du_{k}) = 0$ by \eqref{GLNeumann}, and that \begin{align*} d\psi_{k} &= 2|\log\epsilon_{k}|^{-1/2}\rho_{k}d\rho_{k}\wedge d\varphi_{k} \to 0 \text{ in }C^{0}(\tilde{B}_{3^{-3}r(p)}), \end{align*} we conclude that $d\psi = 0$ and $d^{\ast}\psi = 0$ pointwise on $\tilde{B}_{3^{-7}r}(p)$. Therefore $\psi$ is harmonic and smooth in the same ball. Next, consider $p \in \partial M \setminus \Sigma$. Then we can choose $r$ such that, eventually, \begin{equation*} r^{2-n}\int_{\tilde{B}^{+}_{r}(p)}e_{\epsilon_{k}}(u_{k}) < \eta_{3}'\left| \log\frac{\epsilon_{k}}{r} \right|. \end{equation*} Again writing $u_{k} = \rho_{k}e^{i\varphi_{k}}$ on $\tilde{B}^{+}_{r}(p)$, but using Theorem \ref{boundaryhigher} in place of Theorem \ref{interiorhigher}, we may argue as above and conclude that $|\nabla \rho_{k}|$ and $\epsilon_{k}X_{k}$ converge in $C^{1}$ to zero in $\tilde{B}^{+}_{3^{-6}r}(p)$, and that $\psi_{k}$ converges in $C^{1}(\tilde{B}^{+}_{3^{-6}r}(p))$ to a limit $1$-form $\psi$ satisfying that $d\psi = 0$ and $d^{\ast}\psi = 0$. Moreover, by \eqref{GLNeumann}, we deduce that $\mathfrak{n} \psi = 0$ on $\tilde{B}^{+}_{3^{-6}r}(p) \cap \partial M$. Therefore $\psi$ is harmonic in $\tilde{B}^{+}_{3^{-6}r}(p)$ and smooth up to $\tilde{B}^{+}_{3^{-6}r}(p)\cap \partial M$. From these local results, we infer after possibly passing to further subsequences that \begin{enumerate} \item[(i)'] $\psi_{k}$ converges in $C^{m}_{\loc}(M\setminus \Sigma) \cap C_{\loc}^{1}(\overline{M}\setminus \Sigma)$ for all $m$ to a $1$-form $\psi \in C^{\infty}(\overline{M}\setminus \Sigma)$ which is harmonic in $M\setminus \Sigma$ and satisfies $\mathfrak{n}\psi = 0$ on $\partial M \setminus \Sigma$. \item[(ii)'] $\nabla \rho_{k}$ and $\epsilon_{k}X_{k}$ converge in $C^{m}_{\loc}(M\setminus\Sigma) \cap C_{\loc}^{1}(\overline{M}\setminus\Sigma)$ to zero for all $m$. \end{enumerate} Note that properties (i)' and (ii)' establish conclusion (1) and (2) of Theorem \ref{regpartconvergence} and almost gives assertion (4), except that $\psi$ is not yet shown to be smooth across $\Sigma$. To prove that, we need assertion (3), which we now turn to. Recalling \eqref{gradientdecomposition}, we observe that $e_{\epsilon_{k}}(u_{k})$ can be decomposed as follows: \begin{align}\label{densitydecomposition} e_{\epsilon_{k}}(u_{k}) &= \frac{|u_{k}\times du_{k}|^{2}}{2} + \frac{\left| \nabla |u_{k}|^{2} \right|^{2} }{8} + \frac{(1 - |u_{k}|^{2}) |\nabla u_{k}|^{2} }{2} + \frac{(1 - |u_{k}|^{2})^{2}}{4\epsilon_{k}^{2}}\\\nonumber &= \left| \log\epsilon_{k} \right|\frac{|\psi_{k}|^{2}}{2} + \frac{\rho_{k}^{2} \left| \nabla \rho_{k} \right|^{2} }{2} + \epsilon_{k}^{2}X_{k}\frac{|\nabla u_{k}|^{2}}{2} + \epsilon_{k}^{2}\frac{X_{k}^{2}}{4}. \end{align} Dividing through by $|\log\epsilon_{k}|$ and using (i)' and (ii)' above, we see that $\lim_{k\to \infty}\mu_{k} \llcorner K = (|\psi|^{2}/2)\dvol\ \llcorner K$ in the sense of measures for each compact set $K \subset \overline{M}\setminus \Sigma$. Consequently, \begin{equation}\label{psil2finite} \int_{K}\frac{|\psi|^{2}}{2}\dvol \leq \limsup\limits_{k \to \infty}\mu_{k}(\overline{M}),\text{ for all }K \subset\subset \overline{M}\setminus\Sigma, \end{equation} which implies the second assertion of conclusion (3) since $\Sigma$ has zero measure with respect to $\dvol$ by Remark \ref{finitemeasure}. Finally we return to (4). With the help of (i)' above, we will show that $\psi$ agrees with the harmonic part in its Hodge decomposition. Specifically, by Theorem 7.7.7 of \cite{morreybook}, we can write \begin{equation}\label{psihodge} \psi = d\alpha + d^{\ast}\beta + h, \end{equation} where $\alpha \in W^{1, 2}(M)$, $\beta \in W^{1, 2}_{2, \mathfrak{n}}(M)$ and $h \in \cH_{1, \mathfrak{n}}$. To proceed, we note the following. \begin{equation}\label{psidclosed} \int_{M}\langle \psi, d^{\ast}\xi \rangle\dvol =0 \text{ for all }\xi \in W^{1, 2}_{2, \mathfrak{n}}(M). \end{equation} \begin{equation}\label{alphaharmonic} \int_{M}\langle d\alpha, dv \rangle\dvol = 0\text{ for all }v \in W^{1, 2}(M). \end{equation} We assume these for now and give their proofs at the end. Substituting $\xi = \beta$ into \eqref{psidclosed}, we immediately see that $d^{\ast}\beta = 0$. On the other hand, putting $v = \alpha$ in \eqref{alphaharmonic} shows that $d\alpha = 0$. Recalling \eqref{psihodge}, we see that $\psi$ must be equal to $h$, which establishes assertion (4) and finishes the proof of Theorem \ref{regpartconvergence}. \end{proof} \begin{proof}[Proof of \eqref{psidclosed}] Take a sequence $\{W_{k}\}$ of open subsets of $\widetilde{M}$ such that $W_{1} \supset W_{2} \supset \cdots \supset \Sigma = \cap_{k = 1}^{\infty}W_{k}$. Since $\Sigma$ has finite $H^{n-2}$-measure and hence vanishing $2$-capacity (cf. \cite{evansgariepy}, Section 4.7), we may obtain as in Theorem 3, Section 4.7.2 of \cite{evansgariepy} a sequence of cut-off functions $\{\zeta_{k}\}$ such that $\supp \zeta_{k} \subset\subset W_{k}$, $\zeta_{k}\equiv 1$ on $W_{k + 1}$, and that \begin{equation}\label{cap2vanish} \int_{W_{k}}|\nabla\zeta_{k}|^{2}\dvol < 1/k. \end{equation} Recalling that $d\psi = 0$ away from $\Sigma$, we see that for each $k$ and for all smooth $2$-form $\xi$ satisfying $\mathfrak{n} \xi = 0$ on $\partial M$, we may integrate by parts and obtain \begin{align*} 0 &= \int_{M}\langle d\psi, (1 - \zeta_{k})\xi \rangle \dvol = \int_{M}\langle \psi, d^{\ast}\left( (1 - \zeta_{k})\xi \right) \rangle\dvol \\ &= \int_{M}\langle \psi, (1 - \zeta_{k})d^{\ast}\xi \rangle\dvol - \int_{M}\langle \psi, \xi \llcorner d\zeta_{k} \rangle\dvol\\ &= I - II. \end{align*} By construction of $\{W_{k}\}$ and $\{\zeta_{k}\}$ and the finiteness of $\|\psi\|_{2; M}$, we deduce that (I) tends to $\int_{M}\langle \psi, d^{\ast}\xi \rangle\dvol$ while (II) tends to zero as $k$ tends to infinity. Hence we obtain \eqref{psidclosed} for all smooth $\xi$ with $\mathfrak{n}\xi= 0$. Since $\psi$ has finite $L^{2}$-norm, we may extend the identity to all $\xi$ lying in $W^{1, 2}_{2,\mathfrak{n}}$ by approximation. \end{proof} \begin{proof}[Proof of \eqref{alphaharmonic}] As mentioned in the proof of Theorem \ref{regpartconvergence}, \eqref{psidclosed} implies that $d^{\ast}\beta = 0$ and thus $d\alpha = \psi - h$. Next, letting $v \in C^{1}_{c}(\overline{M}\setminus\Sigma)$ and integrating by parts using the boundary condition on $\psi$ and $h$ and the fact that they are $d^{\ast}$-closed away from $\Sigma$, we get \begin{equation*} \int_{M}\langle d\alpha, dv \rangle\dvol = \int_{M\setminus\Sigma} \langle \psi, dv \rangle\dvol - \int_{M}\langle h, dv \rangle\dvol = 0. \end{equation*} Now, by a capacity argument similar to the one in the previous proof, we may extend the above to any $v \in C^{1}(\overline{M})$, and then to any $v \in W^{1, 2}(M)$ by approximation. \end{proof} \subsection{Energy decay estimate} The main result of this section is the following. \begin{prop} \label{energydecay} Let $g \in \mathcal M^{+}_{\mu, \lambda, \Lambda}$ and suppose $u: (B_{1}^{+}, g) \to \mathbb{D}$ is a solution to \eqref{halfGL}. Then there exists $\delta_{0} < 1/4$, depending on $n, \mu, \lambda$, and $\Lambda$, such that for $\delta < \delta_{0}$ there holds \begin{align}\label{energydecayestimate} \int_{B_{\delta}^{+}}e_{\epsilon}(u) \dvol_{g} \leq C &\left[ \left( \int_{B_{1}^{+}}\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}} \dvol_{g} \right)^{1/3}\left( \int_{B^{+}_{1}}e_{\epsilon}(u) \dvol_{g} \right) \right.\\ \nonumber &+ \left.\left( \int_{B^{+}_{1}}\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}}\dvol_{g} \right)^{2/3} + \delta^{n}\int_{B^{+}_{1}}e_{\epsilon}(u)\dvol_{g} \right], \end{align} where $C$ depends only on $n, \mu, \lambda$ and $\Lambda$. \end{prop} \begin{proof} We begin by treating the gradient term in $e_{\epsilon}(u)$, which can be decomposed as follows. \begin{equation}\label{gradientdecomposition} |\nabla u|^{2} = \left( 1 - |u|^{2} \right) |\nabla u|^{2} + \frac{1}{4}\left| \nabla |u|^{2} \right|^{2} + |u \times \nabla u|^{2}, \end{equation} where $u \times \nabla u \equiv u^{1}\nabla u^{2} - u^{2}\nabla u^{1}$ in terms of the components of $u = (u^{1}, u^{2})$. We will estimate these terms one by one, starting with the last term. \vskip 2mm \noindent\textbf{Step 1: Decomposition of $u \times \nabla u$.} \vskip 1mm We first use Lemma \ref{GLreflection} to extend $u$ to a solution on all of $B_{1}$ by even reflection across $T$. The reflected function will still be denoted by $u$. Next, for some $R < 3/4$ to be fixed later depending only on $n, \lambda, \Lambda$ and $\mu$, we choose a radius $r_{1} \in [R/2, R]$ satisfying \begin{align}\label{goodshell} \int_{S_{r_{1}}}|\nabla u|^{2}\sqrt{\det(g)}dH^{n-1} &\leq C \int_{B_{1}}|\nabla u|^{2}\dvol,\\ \nonumber\int_{S_{r_{1}}}\left( 1 - |u|^{2} \right)^{2} \sqrt{\det(g)}dH^{n-1} &\leq C\int_{B_{1}}\left( 1 - |u|^{2} \right)^{2}\dvol. \end{align} Note that since $R$ will later be chosen to depend only on predetermined parameters, we will not keep track of the $R$-dependences of the constants $C$. We now want to perform a Hodge decomposition on the one-form $u \times du$ restricted to $B_{r_{1}}$. To that end, we let $\xi$ be the solution to \begin{equation}\label{xiBVP} \left\{ \begin{array}{crl} \Delta \xi &= & 0 \text{ on $B_{r_{1}}$},\\ \nabla_{\nu}\xi & = & u \times \nabla_{\nu}u \text{ on $\partial B_{r_{1}}$},\\ \int_{B_{r_{1}}} \xi \dvol &= & 0. \end{array} \right. \end{equation} We see immediately by standard elliptic theory that \begin{equation}\label{xiw12} |\nabla \xi|_{0; B_{R/4}} \leq C\|\nabla \xi\|_{2; B_{r_{1}}}\leq C\| \nabla u \|_{2; S_{r_{1}}} \leq C\| \nabla u \|_{2; B_{1}}, \end{equation} where we used \eqref{goodshell} in the last inequality. Consequently, for $\delta < R/4$, \begin{equation}\label{xiestimate} \int_{B_{\delta}} |\nabla \xi|^{2}\dvol \leq C\delta^{n} \int_{B_{1}}|\nabla u|^{2}\dvol. \end{equation} Next, consider the one-form $\chi_{B_{r_{1}}} (u\times du - d\xi)$ and compute \begin{align*} \int_{B_{r_{1}}} \langle u \times du - d\xi, d\zeta \rangle \dvol = &\int_{\partial B_{r_{1}}} \zeta (u \times \nabla_{\nu} u - \nabla_{\nu}\xi) \sqrt{\det(g)}dH^{n-1}\\ &+ \int_{B_{r_{1}}} \zeta d^{\ast}(u \times du - d\xi) \dvol = 0, \end{align*} for all $\zeta \in W^{1, 2}_{0}(B_{1}; \mathbb{R})$. Therefore, by Theorem 7.7.7 of \cite{morreybook} and inequality \eqref{hodgecoercive}, there exists a two-form $\varphi \in W^{1, 2}_{2, \mathfrak{t}}(B_{1})$ such that \begin{align}\label{phibasic} d^{\ast}\varphi = (u \times du - d\xi)\chi_{B_{r_{1}}}&;\ d\varphi = 0.\\ \nonumber\| \varphi\|_{1, 2; B_{1}} \leq C (\|du\|_{2; B_{r_{1}}} + \|d\xi\|_{2; B_{r_{1}}}) &\leq C\|\nabla u\|_{2; B_{1}}. \end{align} Therefore, on $B_{r_{1}}$ we have \begin{equation}\label{hodgedecomposition} u \times du = d^{\ast}\varphi + d\xi. \end{equation} We also note that $\varphi$ belongs to the class $W^{1, 2, +}_{2, \mathfrak{t}}(B_{1})$, since both $u$ and $\xi$ are even functions in $x^{n}$ (cf. Remark \ref{symmetry}). \vskip 2mm \noindent\textbf{Step 2: Estimates for $d^{\ast}\varphi$.} \vskip 1mm To derive estimates on $\varphi$, we follow \cite{bbo} and define the cut-off function \begin{equation*} \alpha(x) = \left\{ \begin{array}{cl} f(|u(x)|)^{2} & \text{ in }B_{r_{1}}\\ 1 & \text{ elsewhere.} \end{array} \right., \end{equation*} where the function $f$ satisfies $|f'| \leq 4$ and is given as follows for some constant $\beta < 1/4$ to be determined later. \begin{equation*} f(t) = \left\{ \begin{array}{cl} \frac{1}{t} & \text{ if }t\geq 1-\beta\\ 1 & \text{ if }t \leq 1-2\beta.\\ \end{array} \right. \end{equation*} Later in the proof, we will need to use the simple observation that $1 - \alpha \leq 4\beta$. Note that on $B_{1}$, we certainly have \begin{equation*} \Delta \varphi = d((1 - \alpha)d^{\ast}\varphi) + d(\alpha d^{\ast}\varphi). \end{equation*} Moreover, the second term on the right can be computed as in \cite{bbo}. Specifically, for any two-form $\zeta \in W^{1, 2}_{2, \mathfrak{t}}(B_{1})$, we have \begin{equation}\label{laplaciancomputation} \int_{B_{1}}\langle \alpha d^{\ast}\varphi, d^{\ast}\zeta \rangle= \int_{B_{r_{1}}}\langle \alpha u\times du, d^{\ast} \zeta \rangle - \int_{B_{r_{1}}} \langle \alpha d\xi, d^{\ast} \zeta \rangle = (I) + (II) \end{equation} For $(I)$, we have \begin{equation*} (I) = \int_{\partial B_{r_{1}}} \mathfrak{t}\alpha u \times du \wedge \mathfrak{t}\ast\zeta + \int_{B_{r_{1}}}\langle d(\alpha u \times du), \zeta \rangle , \end{equation*} While for $(II)$, we have \begin{align*} (II) &= \int_{B_{r_{1}}} \langle (1 - \alpha)d\xi, d^{\ast}\zeta \rangle - \int_{B_{r_{1}}}\langle d\xi, d^{\ast}\zeta \rangle\\ &= \int_{B_{r_{1}}} \langle (1 - \alpha)d\xi, d^{\ast}\zeta \rangle - \int_{\partial B_{r_{1}}}\mathfrak{t} d\xi \wedge \mathfrak{t} \ast \zeta. \end{align*} Therefore, putting everything together, $\varphi$ satisfies \begin{align}\label{phiequation} \int_{B_{1}}\langle d^{\ast}\varphi, d^{\ast}\zeta \rangle =& \int_{B_{r_{1}}}\langle d(\alpha u \times du), \zeta \rangle + \int_{\partial B_{r_{1}}} \mathfrak{t}\alpha u \times du \wedge \mathfrak{t}\ast\zeta\\ \nonumber & +\int_{B_{r_{1}}} \langle (1 - \alpha)d\xi, d^{\ast}\zeta \rangle - \int_{B_{r_{1}}}\langle d\xi, d^{\ast}\zeta \rangle + \int_{B_{1}}\langle (1 - \alpha)d^{\ast}\varphi, d^{\ast}\zeta \rangle\\ \nonumber \equiv&\ w_{1}(\zeta) + w_{2}(\zeta)\\ \nonumber & + w_{3}(\zeta) + w_{4}(\zeta) + w_{5}(\zeta), \end{align} for all $\zeta \in W^{1, 2}_{2, \mathfrak{t}}(B_{1})$, where the five $w_{i}$'s are bounded linear functionals on $W^{1, 2}_{2, \mathfrak{t}}(B_{1})$ defined by the five terms in the two lines above them, respectively. Given \eqref{phiequation}, we use Lemma \ref{hodgeinvertible} to decompose $\varphi$ into $\varphi_{1} + \cdots \varphi_{5}$, with each $\varphi_{i}$ being the unique solution in $W^{1, 2}_{2, \mathfrak{t}}(B_{1})$ to \begin{equation}\label{phiiequation} \cD(\varphi_{i}, \zeta) = w_{i}(\zeta), \text{ for all }\zeta \in W^{1, 2}_{2, \mathfrak{t}}(B_{1}). \end{equation} Note also that $\varphi_{i} \in W^{1, 2, +}_{2, \mathfrak{t}}(B_{1})$ for $i = 1, \cdots, 5$. Below we estimate these $2$-forms one by one, with $\varphi_{1}$ requiring the most work. On the other hand, $\varphi_{2}$ to $\varphi_{5}$ are estimated in essentially the same way as in \cite{bbo} or \cite{bpw}. Nonetheless, we indicate the arguments for the reader's convenience. We first handle $\varphi_{3}$ by taking itself as a test form in \eqref{phiiequation} to get \begin{align*} \cD(\varphi_{3}, \varphi_{3}) &= w_{3}(\varphi_{3}) = \int_{B_{r_{1}}} \langle (1 - \alpha)d\xi, d^{\ast}\varphi_{3} \rangle\\ &\leq \|(1 - \alpha) \nabla \xi\|_{2; B_{r_{1}}} \| d^{\ast}\varphi_{3} \|_{2; B_{1}} \leq C\beta \|\nabla u\|_{2; B_{1}}\| d^{\ast}\varphi_{3} \|_{2; B_{1}}, \end{align*} where in the last inequality we used the estimate \eqref{xiw12} and the fact that $|1 - \alpha| \leq 4\beta$. Hence, since $\cD$ controls the $W^{1, 2}$-norm, we get \begin{equation}\label{phi3estimate} \| \varphi_{3} \|_{1, 2; B_{1}} \leq C\beta \|\nabla u\|_{2; B_{1}}. \end{equation} A similar argument using the $W^{1, 2}$-estimate for $\varphi$ in \eqref{phibasic} in place of \eqref{xiw12} shows that, \begin{equation}\label{phi5estimate} \| \varphi_{5}\|_{1, 2; B_{1}} \leq C\beta \| \nabla u \|_{2; B_{1}}, \end{equation} Next, for $\varphi_{2}$, we notice that there holds \begin{align*} \cD(\varphi_{2}, \varphi_{2}) &= w_{2}(\varphi_{2}) = \int_{\partial B_{r_{1}}} \mathfrak{t} \alpha u\times du \wedge \mathfrak{t} \ast \varphi_{2}\\ &\leq \| \nabla u \|_{2; \partial B_{r_{1}}} \|\varphi_{2}\|_{2; \partial B_{r_{1}}} \leq C\| \nabla u\|_{2; B_{1}} \| \varphi_{2} \|_{1, 2; B_{r_{1}}}. \end{align*} Note that the last inequality follows from our choice of $r_{1}$ and the trace inequality. We therefore obtain \begin{equation}\label{phi2w12} \| \varphi_{2}\|_{1, 2; B_{1}} \leq C\|\nabla u\|_{2; B_{1}}. \end{equation} To proceed, we note that since $w_{2}$ is defined by a boundary integral on $\partial B_{r_{1}}$, we have, in particular, \begin{equation*} \cD_{g}(\varphi_{2}, \zeta) = 0,\text{ for all }\zeta \in W^{1, 2, +}_{2, 0}(B_{r_{1}}). \end{equation*} Since we are assuming that $g \in \mathcal M_{\mu, \lambda, \Lambda}^{+}$, we infer with the help of Lemma \ref{ellipticform} and Remark \ref{fitfundamentalsolution} that $\varphi_{2} \in C^{1, \mu}_{\text{loc}}(B_{r_{1}}^{+} \cup T_{r_{1}})$, with the following estimate \begin{equation} |\varphi_{2}|_{1, 0; B_{R/4}^{+}} \leq C\|\varphi_{2}\|_{1, 2; B_{1}}. \end{equation} Combining this with \eqref{phi2w12}, we infer that for $\delta < R/4$, \begin{equation} \| \varphi_{2}\|^{2}_{1, 2; B_{\delta}^{+}} \leq C \delta^{n} \|\nabla u\|^{2}_{2; B_{1}}. \end{equation} Next, we note that \begin{equation*} w_{4}(\zeta) = - \int_{B_{r_{1}}}\langle d\xi, d^{\ast}\zeta \rangle = - \int_{\partial B_{r_{1}}} \mathfrak{t} d\xi \wedge \mathfrak{t} \ast \zeta, \end{equation*} and therefore we can follow the arguments above to obtain \begin{equation} \|\varphi_{4}\|^{2}_{1, 2; B_{\delta}^{+}} \leq C\delta^{n}\|\nabla u\|_{2; B_{1}}^{2}, \text{ for }\delta < R/4. \end{equation} Finally we estimate $\varphi_{1}$. We first observe that, using \eqref{hodgecoercive} and recalling how we handled (I) in \eqref{laplaciancomputation}, we have \begin{align*} c_{0}\|\varphi_{1}\|_{1, 2; B_{1}}^{2} & \leq \cD_{g}(\varphi_{1}, \varphi_{1}) = w_{1}(\varphi_{1})\\ &= -\int_{\partial B_{r_{1}}}\mathfrak{t} \alpha u \times du \wedge \mathfrak{t} \ast \varphi_{1} + \int_{B_{r_{1}}}\langle \alpha u \times du, d^{\ast}\varphi_{1} \rangle. \end{align*} From this and our choice of $r_{1}$ we infer that \begin{equation}\label{phi1w12bound} \|\varphi_{1}\|_{1, 2; B_{1}} \leq C\|\nabla u\|_{2; B_{1}}. \end{equation} Next, since $u$ takes values in $\mathbb{C}$, we have the following pointwise bound for $\omega_{1}$ on $B_{r_{1}}$ (see \cite{bbo}, equation (III.28)): \begin{equation}\label{w1good} |d(\alpha u \times du)| = \left| d\left( f(|u|)u \right) \times d\left( f(|u|)u \right) \right| \leq C\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}\beta^{2}}. \end{equation} We now let $w = d(\alpha u \times du)\chi_{B_{r_{1}}}$ and let $\tilde{\varphi}$ be the unique solution in $W^{1, 2}_{0}(B_{1}; \mathbb{R}^{N})$ to \begin{equation}\label{tildephipde} \cD_{g}(\tilde{\varphi}, \zeta) = \int_{B_{r_{1}}}\langle w, \zeta\rangle, \text{ for all } \zeta \in W^{1, 2}_{0}(B_{1}; \mathbb{R}^{N}). \end{equation} Then, by the first part of Lemma \ref{hodgegreengrowth} we infer that, for $H^{n}$-a.e. $x \in B_{1}$, there holds \begin{equation} \tilde{\varphi}_{\gamma} (x) = \int_{B_{r_{1}}} w_{\alpha}(y)G_{\alpha\gamma}(x, y) dy. \end{equation} We now choose the radius $R$ introduced at the beginning of Step 1 to be \begin{equation} R = \{ R_{1}, \lambda^{2}/6\}, \end{equation} where $R_{1}$ is as in Lemma \ref{hodgegreengrowth}. The bound \eqref{w1good} and the second part of Lemma \ref{hodgegreengrowth} then imply that for $x \in B_{r_{1}} \subset B_{R}$ we have \begin{align*} \left| \tilde{\varphi}_{\gamma}(x) \right| &\leq \int_{B_{r_{1}}}|w_{\alpha}(y)| |G_{\alpha\gamma}(x, y)|dy\\ &\leq C\int_{B_{r_{1}}} |x - y|^{2-n}\frac{(1 - |u(y)|^{2})^{2}}{\epsilon^{2}\beta^{2}}dy\\ &\leq C\int_{B_{r_{1}}} |x - y|^{2-n}\frac{(1 - |u(y)|^{2})^{2}}{\epsilon^{2}\beta^{2}}\dvol_{g}. \end{align*} We now use \eqref{potentialdensitybound} to estimate \begin{align*} \int_{B_{r_{1}}} |x - y|^{2-n}\frac{(1 - |u(y)|^{2})^{2}}{\epsilon^{2}\beta^{2}}\dvol_{g} & \leq \int_{B_{3r_{1}}(x)} |x - y|^{2-n}\frac{(1 - |u(y)|^{2})^{2}}{\epsilon^{2}\beta^{2}}\dvol_{g}\\ &\leq C\beta^{-2}\int_{B_{1}}e_{\epsilon}(u)\dvol_{g}. \end{align*} Combining the above two strings of inequalities gives \begin{equation}\label{tildephisup} |\tilde{\varphi}|_{0; B_{r_{1}}} \leq C\beta^{-2}\int_{B_{1}}e_{\epsilon}(u)\dvol_{g}. \end{equation} Testing the system \eqref{tildephipde} against $\tilde{\varphi}$ itself, we obtain with the help of \eqref{hodgecoercive} and the estimates \eqref{w1good}, \eqref{tildephisup} that \begin{align} \| \tilde{\varphi} \|_{1, 2; B_{1}}^{2} &\leq C \|w_{1}\|_{1; B_{r_{1}}} |\tilde{\varphi}|_{0; B_{r_{1}}}\\ &\leq C\beta^{-4} \left( \int_{B_{1}} \frac{(1 - |u|^{2})^{2}}{\epsilon^{2}}\dvol_{g} \right) \left( \int_{B_{1}}e_{\epsilon}(u) \dvol_{g}\right). \end{align} Next, since $u$ is an even function across $T$, we have by uniqueness that $r^{\ast}\tilde{\varphi} = \tilde{\varphi}$, and therefore the difference $\varphi_{1} - \tilde{\varphi}$ lies in $W^{1, 2, +}_{2, \mathfrak{t}}(B_{1})$. Moreover, it satisfies \begin{equation*} \cD_{g}(\varphi_{1} - \tilde{\varphi}, \zeta) = 0, \text{ for all }\zeta \in W^{1, 2, +}_{2, 0}(B_{1}). \end{equation*} Using Lemma \ref{ellipticform}, Remark \ref{fitfundamentalsolution}, \eqref{phi1w12bound} and interior elliptic estimates, we infer that \begin{align*} |\varphi_{1} - \tilde{\varphi}|^{2}_{0; B_{1/2}^{+}} &\leq C\| \varphi_{1} - \tilde{\varphi} \|^{2}_{1, 2; B_{1}^{+}} \leq C\|\varphi_{1}\|^{2}_{1, 2; B_{1}^{+}} + C\|\tilde{\varphi}\|^{2}_{1, 2; B_{1}^{+}}\\ &\leq C\|\nabla u\|_{2; B_{1}}^{2} +C\beta^{-4} \left( \int_{B_{1}} \frac{(1 - |u|^{2})^{2}}{\epsilon^{2}} \dvol_{g}\right) \left( \int_{B_{1}}e_{\epsilon}(u) \dvol_{g}\right). \end{align*} Hence, for all $\delta < R/4$, we have \begin{align*} \| \varphi_{1} \|^{2}_{1, 2; B_{\delta}^{+}} &\leq C\|\tilde{\varphi}\|^{2}_{1, 2; B_{\delta}^{+}} + C\| \varphi_{1} - \tilde{\varphi} \|^{2}_{1, 2; B_{\delta}^{+}}\\ &\leq C(1 + \delta^{n})\beta^{-4} \left( \int_{B_{1}} \frac{(1 - |u|^{2})^{2}}{\epsilon^{2}} \dvol_{g} \right) \left( \int_{B_{1}}e_{\epsilon}(u) \dvol_{g}\right) + C\delta^{n}\| \nabla u \|^{2}_{2; B_{1}}. \end{align*} Combining the above estimates for $\xi$ and for $\varphi_{i}$, $i = 1, \cdots, 5$, we arrive at \begin{align}\label{phaseestimate} \| u \times du \|_{2; B_{\delta}^{+}}^{2} \leq&\ C(1 + \delta^{n})\beta^{-4} \left( \int_{B_{1}} \frac{(1 - |u|^{2})^{2}}{\epsilon^{2}} \dvol_{g} \right) \left( \int_{B_{1}}e_{\epsilon}(u) \dvol_{g}\right)\\\nonumber &+ C\left( \beta^{2} + \delta^{n} \right)\|\nabla u\|^{2}_{2; B_{1}}. \end{align} \vskip 2mm \noindent\textbf{Step 3: Estimates for $\left| \nabla |u|^{2} \right|^{2}$ and $(1 - |u|^{2})|\nabla u|^{2}$.} \vskip 1mm The estimates in this step are done exactly the same as in \cite{bbo}, and thus we'll merely state the conclusions and refer the reader to \cite{bbo} for details. Specifically, the following hold. \begin{equation}\label{modulusestimate} \int_{B_{r_{1}}}\left| \nabla |u|^{2} \right|^{2}\dvol_{g} \leq \beta^{2}\|\nabla u\|^{2}_{2; B_{1}} + C\beta^{-2}\int_{B_{1}}\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}}\dvol_{g}. \end{equation} \begin{equation}\label{remainingestimate} \int_{B_{r_{1}}} (1 - |u|^{2})|\nabla u|^{2}\dvol_{g} \leq \beta^{2}\|\nabla u\|^{2}_{2; B_{1}} + C\beta^{-2}\int_{B_{1}}\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}}\dvol_{g}. \end{equation} \vskip 2mm \noindent\textbf{Step 4: Conclusion} \vskip 1mm Putting together \eqref{phaseestimate}, \eqref{modulusestimate} and \eqref{remainingestimate}, we conclude that for $\delta < R/4$, \begin{align*} \int_{B_{\delta}} e_{\epsilon}(u) \dvol_{g} \leq&\ C \left( \beta^{2} + \delta^{n} \right) \| \nabla u \|^{2}_{2; B_{1}} + C\beta^{-2}\int_{B_{1}} \frac{(1 - |u|^{2})^{2}}{\epsilon^{2}}\dvol_{g}\\ &+ C\beta^{-4} \left( \int_{B_{1}} \frac{(1 - |u|^{2})^{2}}{\epsilon^{2}} \dvol_{g} \right) \left( \int_{B_{1}}e_{\epsilon}(u) \dvol_{g}\right). \end{align*} We can now finish the proof as in \cite{bbo} by distinguishing two cases. If \begin{equation*} p_{\epsilon} \equiv \int_{B_{1}}\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}}\dvol_{g} \leq (1/8)^{6}, \end{equation*} then we may choose $\beta = p_{\epsilon}^{1/6}$ and get the desired estimate \eqref{energydecayestimate}. On the other hand, if $p_{\epsilon} \geq (1/8)^{6}$, then \eqref{energydecayestimate} holds obviously. Hence the proof of Proposition \ref{energydecay} is complete. (The inequality \eqref{energydecayestimate} was stated for half balls, but since $u$ is even across $T$, it doesn't matter whether we use half balls or whole balls.) \end{proof} \subsection{Proof of Theorem \ref{boundaryeta}} The proof consists of applying Proposition \ref{energydecay} at a suitable scale, to be chosen with the help of the following result. \begin{prop}[\cite{bbo}, Lemma III.1] \label{goodradius} Let $g \in \mathcal M_{\lambda, \Lambda}$ and let $u: (B_{1}, g) \to \mathbb{C}$ solve \eqref{GLequation}. Assume in addition that \eqref{smallenergyscaled} holds for some $\eta$. Then, for $\delta < \min\{1/4, \rho_{0}\}$ (with $\rho_{0}$ given by Proposition \ref{reversemonotonicity}) and $\epsilon < \delta^{2}$, there exists a radius $r_{0} \in (\epsilon^{1/2}, \delta)$ such that the following three inequalities hold. \begin{equation}\label{potentialbound} r_{0}^{2-n}\int_{B_{r_{0}}}\frac{(1 - |u|^{2})^{2}}{2\epsilon^{2}}\dvol \leq K\eta \left| \log\delta \right|, \end{equation} \begin{equation}\label{boundfrommonotonicity} \int_{\delta r_{0}}^{r_{0}}\left[ r^{1-n} \int_{B_{r}}\frac{(1 - |u|^{2})^{2}}{2\epsilon^{2}}\dvol +r^{2-n} \int_{\partial B_{r}}|\nabla_{r}u|^{2} \sqrt{\det(g)}dH^{n-1} \right] dr \leq K\eta \left| \log\delta \right|, \end{equation} \begin{equation}\label{boundfromreversemono} r_{0}^{2-n}\int_{B_{r_{0}}} e_{\epsilon}(u) \dvol \leq K(\delta r_{0})^{2-n}\int_{B_{\delta r_{0}}}e_{\epsilon}(u)\dvol + K \eta \left| \log\delta \right|, \end{equation} where $K$ is a constant depending only on $n, \lambda$ and $\Lambda$. \end{prop} \begin{proof}[Sketch of proof] We follow step-by-step the proof of Lemma III.1 in \cite{bbo} to find $r_{0} \in (\epsilon^{1/2}, \delta)$ such that \eqref{potentialbound} and \eqref{boundfrommonotonicity} hold, with the only change being that \eqref{lipschitzmonotonicity1} should be used in place of the monotonicity formula (II.1) used there. Next, we use Proposition \ref{reversemonotonicity} in place of of Lemma II.2 of \cite{bbo} to derive \eqref{boundfromreversemono} from \eqref{boundfrommonotonicity}. We refer the reader to Lemma III.1 of \cite{bbo} for details. \end{proof} The conclusion of Theorem \ref{boundaryeta} now follows from Propositions \ref{energydecay} and \ref{goodradius} in the same way Theorem 2 follows from Theorem 3 and Lemma III.1 in \cite{bbo}. Nevertheless, we include this argument with the necessary modifications. Reflecting $u$ evenly across $T$ and letting $\delta < \delta_{0}$ be a small constant to be determined later, with $\delta_{0}$ given by Proposition \ref{energydecay}, then Proposition \ref{goodradius} yields a radius $r_{0} \in (\epsilon^{1/2}, \delta_{0})$ for which \eqref{potentialbound}, \eqref{boundfrommonotonicity} and \eqref{boundfromreversemono} hold. Next, we consider the following rescaling: \begin{equation} \tilde{u}(x) = u(r_{0}x);\ \tilde{\epsilon} = \epsilon/r_{0};\ \tilde{g}_{ij}(x) = g_{ij}(r_{0}x). \end{equation} Then its easy to see that $\tilde{g}$ again belongs to $\mathcal M^{+}_{\mu, \lambda, \Lambda}$ and that $\tilde{u}$ solves \eqref{halfGL} with $\tilde{\epsilon}$ in place of $\epsilon$. Therefore, since $\delta < \delta_{0}$, we may apply Proposition \ref{energydecay} to get \eqref{energydecayestimate} with $\tilde{u}$, $\tilde{\epsilon}$ and $\tilde{g}$ in place of $u$, $\epsilon$ and $g$, respectively. Scaling back, we obtain \begin{align} r_{0}^{2-n}\int_{B_{\delta r_{0}}}e_{\epsilon}(u) \dvol_{g} \leq &C \left[ \left( r_{0}^{2-n}\int_{B_{r_{0}}}\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}} \dvol_{g} \right)^{1/3}\left( r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u) \dvol_{g} \right) \right.\\ \nonumber &+ \left.\left( r_{0}^{2-n}\int_{B_{r_{0}}}\frac{(1 - |u|^{2})^{2}}{\epsilon^{2}}\dvol_{g} \right)^{2/3} + \delta^{n}r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u)\dvol_{g} \right]. \end{align} Combining the above inequality and \eqref{boundfromreversemono} from Proposition \ref{goodradius} and recalling \eqref{potentialbound}, we get the following inequality. \begin{align} r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u) \dvol \leq &C \left[ \left( \eta \left| \log\delta \right| \right)^{1/3}\left( \delta^{2-n} r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u) \dvol \right) \right.\\ \nonumber &+ \left. \delta^{2-n}\left( \eta \left| \log\delta \right| \right)^{2/3} + \delta^{2}r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u)\dvol \right] + K\eta \left|\log\delta \right|. \end{align} Moving all the terms involving $r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u)\dvol$ to the left-hand side, we get \begin{align} &\left( 1 - \frac{C\left( \eta \left| \log\delta \right| \right)^{1/3}}{\delta^{n-2}} - C\delta^{2} \right) r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u)\dvol \\ \nonumber \leq &C\delta^{2-n} \left( \eta \left| \log\delta \right| \right)^{2/3}+ K\eta \left| \log\delta \right|\\ \nonumber \leq & C\delta^{2-n}\left( \eta \left| \log\delta \right| \right)^{2/3}, \end{align} where in going from the second to the third line we absorbed the term $K\eta \left| \log\delta \right|$. To continue, we choose $\delta = \eta^{1/3n}$ if $\epsilon^{3n/2} < \eta$ (we required that $\delta^{2} > \epsilon$). Then the above inequalities give \begin{equation} \left( 1 - C\eta^{2/3n} \left| \log\eta \right| \right) r_{0}^{2-n}\int_{B^{+}_{r_{0}}}e_{\epsilon}(u)\dvol \leq C\eta^{(n+2)/3n}\left| \log\eta \right|^{2/3}. \end{equation} Hence, if $\eta_{0}$ is chosen small enough, then we have \begin{equation}\label{energyboundrscale} r_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u)\dvol \leq C\eta^{(n + 2)/3n}\left| \log\eta \right|^{2/3}, \end{equation} provided $\epsilon^{3n/2} < \eta < \eta_{0}$. However, by the monotonicity formula \eqref{lipschitzmonotonicity1} and the bound \eqref{smallenergyscaled}, inequality \eqref{energyboundrscale} also holds when $\epsilon^{3n/2} \geq \eta$. Therefore \eqref{energyboundrscale} holds as long as $\eta < \eta_{0}$. Next, we invoke Corollary \ref{monotonicitydecentralized} (appropriately scaled) and the remark following it to get that, for all $x \in B_{3r_{0}/4}$ and $\epsilon$ sufficiently small such that $\epsilon < \epsilon^{1/2}/8 < r_{0}/4$, there holds \begin{equation} \epsilon^{2-n}\int_{B_{\epsilon}(x)}e_{\epsilon}(u)\dvol_{g} \leq Cr_{0}^{2-n}\int_{B_{r_{0}}}e_{\epsilon}(u)\dvol_{g} \leq C\eta^{(n+2)/3n}\left| \log\eta \right|^{2/3}. \end{equation} In particular, we have \begin{equation}\label{meanvaluesmall} \epsilon^{-n}\int_{B_{\epsilon}(x)}(1 - |u|^{2})^{2}\dvol_{g} \leq C\eta^{(n + 2)/3n}\left| \log\eta \right|^{2/3}. \end{equation} Combining \eqref{meanvaluesmall} and Lemma III.3 of \cite{bbo}, we get \eqref{etaellipticityconclusion}, and hence Theorem \ref{boundaryeta} is proved with $r_{1} = 3r_{0}/4$. \begin{rmk} Lemma III.3 of \cite{bbo} remains valid in our case because its proof only requires a gradient estimate of the form $|\nabla u| = O(\epsilon^{-1})$, which we have from Lemma 3.1. \end{rmk} \subsection{A corollary of $\eta$-ellipticity} Combining Theorems \ref{interioreta} and \ref{boundaryeta}, we get the following corollary which will be useful in Section 6. \begin{coro}\label{etacoro} For all $\sigma \in (0, 1/4)$, there exists constants $\eta_{1}, \epsilon_{1}$, depending only on $n, \mu, \lambda, \Lambda$ and $\sigma$, such that if $g$ and $u$ are as in Theorem \ref{boundaryeta}, with $\epsilon < \epsilon_{1}$ and $u$ satisfying \eqref{smallenergyscaledbdy} for some $\eta < \eta_{1}$, then we have \begin{equation} |u(x)| \geq 1 - \sigma, \text{ for all }x \in B_{3/4}^{+}. \end{equation} \end{coro} The proof of Corollary \ref{etacoro} requires the following two preliminary results, which roughly say that we can apply Theorems \ref{interioreta} and \ref{boundaryeta} to balls $B_{r}(x) \subset B_{1}$ not necessarily centered at the origin. \begin{lemm}\label{etadecentralized} For all $\sigma \in (0, 1/4)$, there exists constants $\eta_{2}, \epsilon_{2}$, depending only on $n, \mu, \lambda, \Lambda$ and $\sigma$, such that if $g \in \mathcal M_{\mu, \lambda, \Lambda}$, $x_{0} \in B_{4/5}, \rho < 1/5$ and $u: B_{\rho}(x_{0}) \to \mathbb{D}$ is a solution to the Ginzburg-Landau equation satisfying \begin{equation}\label{rescaledeta} \rho^{2-n}\int_{B_{\rho}(x_{0})} e_{\epsilon}(u)\dvol_{g} \leq \eta \left| \log\frac{\epsilon}{\rho} \right|, \end{equation} where $\epsilon < \rho\epsilon_{2}$ and $\eta < \eta_{2}$, then there holds \begin{equation} |u(x)| \geq 1 - \sigma, \text{ for all } x \in B_{\lambda \rho \sqrt{\epsilon}/2}(x_{0}). \end{equation} \end{lemm} \begin{comment} \begin{proof} As in the proof of Corollary \ref{monotonicitydecentralized}, fixing a point $x_{0} \in B_{4/5}$, we find an affine transformation $\psi(y) = x_{0} + Ay$ such that letting $\tilde{g} = \psi^{\ast}g$ and $\tilde{u} = u \circ \psi$, then $\tilde{u}$ solves \eqref{GLequation} on $B_{\sqrt{\lambda}/5}$ with respect to $\tilde{g}$, which satisfies $[\tilde{g}_{ij}]_{0, 1; B_{\sqrt{\lambda}/5}} \leq C_{n, \lambda, \Lambda}$ and \begin{equation*} \lambda^{2} |\xi|^{2} \leq \tilde{g}_{ij}(y)\xi_{i}\xi_{j} \leq \lambda^{-2} |\xi|^{2}, \text{ for all } y \in B_{\sqrt{\lambda}/5} \text{ and } \xi \in \mathbb{R}^{n}. \end{equation*} With the help of \eqref{rescaledeta} and the above properties, we infer that \begin{align*} \left( \sqrt{\lambda}\rho \right)^{2-n}\int_{B_{\sqrt{\lambda}\rho}} e_{\epsilon}(\tilde{u})\dvol_{\tilde{g}} & \leq \left( \sqrt{\lambda} \rho \right)^{2-n}\int_{B_{\rho}(x_{0})}e_{\epsilon}(u) \dvol_{g} \leq \sqrt{\lambda}^{2-n} \eta \left| \log\frac{\epsilon}{\rho} \right|\\ & \leq 2\sqrt{\lambda}^{2-n}\eta \left| \log\frac{\epsilon}{\sqrt{\lambda}\rho} \right| \end{align*} Thus, if $\eta$ and $\epsilon/\rho$ are sufficiently small, then we may apply Theorem \ref{interioreta} (suitably scaled) to infer that \begin{equation} |\tilde{u}(y)| \geq 1 - \sigma, \text{ for all }y \in B_{\sqrt{\lambda}\rho \epsilon^{1/2}/2}. \end{equation} Since $\psi(B_{\lambda \rho\epsilon^{1/2}/2}) \subset B_{\sqrt{\lambda}\rho\epsilon^{1/2}/2}$, we conclude that \begin{equation} |u(x)| \geq 1 - \sigma, \text{ for all } x \in B_{\lambda\rho\epsilon^{1/2}/2}, \end{equation} and we're done. \end{proof} \end{comment} \begin{lemm}\label{etadecentralizedbdy} For all $\sigma \in (0, 1/4)$, there exists constants $\eta_{2}', \epsilon_{2}'$, depending only on $n, \mu, \lambda, \Lambda$ and $\sigma$, such that if $g \in \mathcal M^{+}_{\mu, \lambda, \Lambda}$, $x_{0} \in T_{4/5}, \rho < 1/5$ and $u: B^{+}_{\rho}(x_{0}) \to \mathbb{D}$ is a solution to the Ginzburg-Landau equation satisfying \begin{equation}\label{rescaledetabdy} \rho^{2-n}\int_{B^{+}_{\rho}(x_{0})} e_{\epsilon}(u)\dvol_{g} \leq \eta \left| \log\frac{\epsilon}{\rho} \right|, \end{equation} where $\epsilon < \rho\epsilon_{2}'$ and $\eta < \eta_{2}'$, then there holds \begin{equation} |u(x)| \geq 1 - \sigma, \text{ for all } x \in B^{+}_{\lambda \rho \sqrt{\epsilon}/2}(x_{0}). \end{equation} \end{lemm} Lemma \ref{etadecentralized} can be proved using suitable affine transformations as in the proof of Corollary \ref{monotonicitydecentralized}, and the proof is almost the same for Lemma \ref{etadecentralizedbdy}, except that we have to choose the affine transformations to preserve $T$, which can be done thanks to (1) and (2) in Definition \ref{boundaryclass}. We proceed to give the proof of Corollary \ref{etacoro}. \begin{proof}[Proof of Corollary \ref{etacoro}] We first reflect $u$ across $T$ using Lemma \ref{GLreflection}. Next, notice that for all $x_{0} \in B_{4/5} \cap T$ and for sufficiently small $\epsilon$, there holds \begin{equation} \left( \frac{1}{5} \right)^{2-n}\int_{B^{+}_{1/5}(x_{0})} e_{\epsilon}(u)\dvol_{g} \leq 2\cdot5^{n-2} \eta\left| \log\frac{\epsilon}{5} \right| \end{equation} Thus, requiring $\eta$ and $\epsilon$ to be small enough, we may apply Lemma \ref{etadecentralizedbdy} on $B_{1/5}^{+}(x_{0})$ for all $x_{0} \in B_{4/5} \cap T$ to get that $|u(x)| \geq 1 - \sigma$ whenever $x = (x', t) \in B_{4/5}^{+}$ satisfies $t \leq \lambda \epsilon^{1/2}/10 \equiv \rho_{0}$. On the other hand, for $x_{0} = (x_{0}', t) \in B_{3/4}^{+}$ with $t \geq \rho_{0}$, we have, for sufficiently small $\epsilon$, \begin{align*} \rho_{0}^{2-n}\int_{B_{\rho_{0}}(x_{0})} e_{\epsilon}(u)\dvol_{g} &\leq C \left( \frac{1}{4} \right)^{2-n}\int_{B_{1/4}(x_{0})}e_{\epsilon}(u)\dvol_{g} \\ &\leq C \cdot 4^{n-2} \eta \left| \log\epsilon \right| \\ &\leq \tilde{C} \cdot 2 \cdot 4^{n-2}\eta \left| \log \rho_{0}^{-1}\epsilon \right|, \end{align*} where the first line follows from Proposition \ref{monotonicitydecentralized}. Since $\epsilon/\rho_{0} = 10 \epsilon^{1/2}/\lambda$, we see from the above inequality that for sufficiently small $\eta$ and $\epsilon$, we may apply Lemma \ref{etadecentralized} to infer that $|u(x_{0})| \geq 1 - \sigma$. Combining the results of the previous two paragraphs, we get $|u(x)| \geq 1 - \sigma$ whenever $x \in B_{3/4}^{+}$, and the proof of Corollary \ref{etacoro} is complete. \end{proof}
\section{INTRODUCTION} \label{Sec:Introduction} Using optical- rather than radio-frequency range for satellite communication prospectively offers higher bandwidths for data transfer, reduces diffractive losses in signal transmission, and additionally alleviates certain regulatory issues. However, in the deep-space regime the diminishing power of the received signal requires different signal modulation methods compared e.g.\ to conventional fiber-optic communication. A widely used format in deep-space communication is pulse position modulation (PPM), which encodes information in the temporal position of a light pulse within a frame of otherwise empty time bins.\cite{Hemmati,HemmatiBiswasProcIEEE2011} The standard technique to detect the PPM signal relies on time-resolved photon counting. Registering a photocount identifies the position of a pulse, while no photocount event within the frame implies erasure of the prepared PPM symbol. Such erasures can be dealt with efficiently using suitable forward error correcting codes. The purpose of this paper is to identify the attainable efficiency of the PPM format under the constraint of a specified average signal power. The analysis includes counts generated by background noise assuming an arbitrary relation between the signal and the noise power, which goes beyond previously obtained results for noiseless or moderate-noise scenarios.\cite{WasedaSasakiJOCN2011,KochmanWangTIT2014,JarzynaKuszajOPEX2015,JarzynaBanaszekICSOS2017} Optimization is carried out with respect to the length of the PPM frame. Two statistical models for background counts motivated by different physical photodetection setups are considered. The Poissonian model is applicable to standard photodetection, while the Gaussian model would be relevant to more advanced mode-selective detection. In the latter scheme the temporal mode carrying the modulated signal is separated prior to direct detection using e.g.\ nonlinear optical frequency conversion.\cite{EcksteinBrechtOpEx2011,BrechtEcksteinNJP2011,ReddyRaymerOpEx2013,BrechtReddyPRX2015,ReddyRaymerOpEx2017} The efficiency limits are quantified with the help of Shannon mutual information which sets the theoretical upper bound on the attainable transmission rate for a given modulation/detection technique.\cite{CoverThomas} Shannon mutual information can be in principle attained with the help of forward error correction, although the efficiency of practical codes usually remains below that value. In the presence of background noise the timing of a photocount does not necessarily match the position of a pulse. Furthermore, photocounts may occur in multiple time bins within a single PPM frame. The simple decoding strategy extracts information only from events when one photocount has been registered over the PPM frame, treating multiple photocounts as erasures. In this scenario mutual information exhibits unfavorable, quadratic scaling with the signal power for a fixed noise power \cite{Moision2014}. The PPM format can be viewed as a keying scheme using a binary constellation of elementary single-bin symbols ``on'' (a pulse) and ``off'' (an empty time bin) with a constraint that the ``on'' symbol is used exactly once in each predefined frame of time bins. In order to investigate the full potential of binary constellations for deep-space communication, generalized on-off keying (OOK) is considered in which the ``on'' and ``off'' symbols can be chosen freely at the input with arbitrary a priori probabilities and information is retrieved from all sequences of photocount events. This additional leeway turns out to improve qualitatively the scaling of mutual information to linear with the signal power when background noise is taken into account. If the Gaussian model for the background noise is chosen, the result can be compared directly with the ultimate quantum mechanical capacity of a narrowband optical channel. Noticeably, the scaling of optimized generalized on-off keying follows that of the quantum capacity limit in the regime of weak signal power, although a difference in the multiplicative scaling factor indicates that further improvement should be possible by resorting to sub-shot noise quantum receivers.\cite{GuhaHabifJMO2011,ChenHabifNPH2012,BecerraFanNatPhot2013,FerdinandDiMarionpjQI2017} Another issue emerging from the presented analysis is the very high peak-to-average power ratio required to implement optimal generalized OOK in the deep-space regime, which may have a negative impact on the overall electrical-to-optical conversion efficiency of the transmitter module. However, this issue can be in principle dealt with by implementing recently proposed structured optical receivers which enable efficient optical communication in the photon-starved regime using keying constellation with more uniform instantaneous power distribution.\cite{GuhaPRL2011,RosatiMariPRA2016,BanaszekJachuraICSOS2017} This paper is organized as follows. In Sec.~\ref{Sec:Operating} we review parameters characterizing a communication link and discuss limits on the communication efficiency. Two models for background noise are introduced in Sec.~\ref{Sec:NoiseModels}. Optimization of the PPM format in the presence of background noise is carried out in Sec.~\ref{Sec:EfficiencyLimits} with the analysis extended to generalized OOK. An example of a structured optical receiver which may reduce requirements for the peak optical power produced by the transmitter module is discussed in Sec.~\ref{Sec:PowerConsiderations}. Finally, Sec.~\ref{Sec:Conclusions} concludes the paper. \section{OPERATING REGIME} \label{Sec:Operating} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{TimeBins1} \caption{(a) Time-frequency diagram of a narrowband communication channel characterized by a carrier frequency $f_c$ and a bandwidth $B$. The channel bandwidth defines the minimum duration $\Delta t = 1/B$ of an individual time bin in which an elementary symbol can be transmitted. (b) Photon information efficiencies for the Shannon (dashed lines) and the Holevo (solid lines) channel capacities as a function of the average signal optical energy $n_a$ for several values of the noise strength $n_b$ expressed in photons per time bin.\label{Fig:TimeFrequencyDiagram}} \end{figure} Parameters characterizing the efficiency of a narrowband optical communication channel can be conveniently discussed using the time-frequency diagram shown in Fig.~\ref{Fig:TimeFrequencyDiagram}(a). Suppose that the transmitter produces a signal with an average optical power $P$ spread over a bandwidth $B$ centered around the carrier frequency $f_c$. The channel bandwidth defines the minimum duration $\Delta t = 1/B$ of an individual time bin in which an elementary symbol can be transmitted. The energy available in a single time bin is therefore equal to $P \Delta t = P/B$. Hence for channel transmission $\eta_{\text{ch}}$ the received optical energy is given by $\eta_{\text{ch}} P / B$. This quantity is usually referred to as the {\em power spectral density} at the channel output. Multiplying it by the efficiency $\eta_{\text{det}}$ of the optical detector yields the detected power spectral density which is a basic figure of merit when calculating the capacity limits. For the purpose of the quantum mechanical analysis of the channel capacity it is convenient to express the average optical energy detected in a single time bin in the units of the energy $hf_c$ of a single photon at the carrier frequency $f_c$, where $h$ is Planck's constant. This yields the dimensionless figure of merit in the form of the average output photon number per one time bin \begin{equation} n_a = \eta_{\text{det}} \eta_{\text{ch}} \frac{ P}{ h f_c B}. \end{equation} In conventional optical communication one typically has $n_a \gg 1$. This allows one to encode individual bits of the data stream into a pair of distinct values of the field amplitude and/or phase that can be discriminated at the channel output with a satisfactorily low error probability. For a sufficiently high power, multiple bits can be transmitted in a single time bin using larger constellations of input symbols. In contrast, deep-space optical communication operates in the {\em photon starved regime} when $n_a \ll 1$. This also presents a departure from the typical radio frequency (RF) regime, as presented in Table~\ref{tab:Regimes}. \begin{table} \caption{Examples of operating regimes of radio frequency and optical communication links for deep-space communication.\cite{Moision2014} Channel transmission $\eta_{\text{ch}}$ is calculated for the distance $R = 1~\mathrm{AU} = 149\cdot 10^9$ m as $\eta_{\text{ch}} = [ \pi D_{t} D_{r} f_{c}/(4 c R)]^{2} $, where $c=3 \cdot 10^{8}$~m/s is the speed of light in vacuum.} \label{tab:Regimes} \begin{center} \begin{tabular}{|l|l|l|} \hline \rule[-1ex]{0pt}{3.5ex} \textbf{Operating regime} & \textbf{RF} & \textbf{Optical} \\ \hline \hline \rule[-1ex]{0pt}{3.5ex} Carrier frequency $f_c$ & 32 GHz & $2\cdot 10^5$ GHz \\ \hline \rule[-1ex]{0pt}{3.5ex} Transmit antenna diameter $D_{t}$ & 3 m & 0.22 m \\ \hline \rule[-1ex]{0pt}{3.5ex} Receiver antenna diameter $D_{r}$ & 34 m & 11.8 m \\ \hline \rule[-1ex]{0pt}{3.5ex} Channel transmission $\eta_{\text{ch}}$ & $3.29\cdot 10^{-15}$ & $8.32\cdot 10^{-11}$ \\ \hline \rule[-1ex]{0pt}{3.5ex} Detector efficiency $\eta_{\text{det}}$ & 0.1 & 0.025 \\ \hline \rule[-1ex]{0pt}{3.5ex} Bandwidth $B$ & 0.5 GHz & 2 GHz \\ \hline \rule[-1ex]{0pt}{3.5ex} Transmit power $P$ & 35 W & 4 W \\ \hline \rule[-1ex]{0pt}{3.5ex} Average output photon number $n_a$ & 1.08 & 0.03 \\ \hline \rule[-1ex]{0pt}{3.5ex} Average noise photon number $n_b$ & 66.68 & 0.03 \\ \hline \rule[-1ex]{0pt}{3.5ex} Shannon limit transmission rate $B \cdot C_{\text{Shannon}}$ & 11.4 Mbps & 87 Mbps \\ \hline \rule[-1ex]{0pt}{3.5ex} Holevo limit transmission rate $B \cdot C_{\text{Holevo}} $ & 11.5 Mbps & 273 Mbps \\ \hline \end{tabular} \end{center} \end{table} The standard Shannon limit on the efficiency of communication using electromagnetic radiation is derived under several assumptions following from the classical wave picture. First, information is encoded in the complex amplitude of the field emitted in consecutive time bins. In the course of transmission this amplitude is affected by additive, phase-insensitive Gaussian noise which adds on average power equivalent to $n_b$ photons per time bin at the detection stage. Finally, the real and imaginary parts of the complex amplitude are simultaneously read out using conventional detection, e.g.\ based on homodyning. Under the constraint of a fixed average detected signal power, equal to $n_a$ photons per time bin, the information-maximizing probability distribution of the input field amplitude is Gaussian. The effective noise strength at the detection stage is $n_b+1$, where the additional term $1$ comes from the shot noise inherent to homodyne detection. The resulting {\em Shannon capacity} per time bin is given by \begin{equation}\label{eq:shannon} C_{\text{Shannon}} = \log_2 \left( 1 + \frac{n_a}{n_b+1} \right) \end{equation} which follows directly from the Shannon-Hartley theorem. The ultimate quantum mechanical limit on the transmission rate takes into account both wave and particle properties of electromagnetic radiation as a carrier of information. This limit is explicitly given by the {\em Holevo capacity} which reads \cite{GiovannettiGarciaPatronNPH2014} \begin{equation} C_{\text{Holevo}} = g(n_a+n_b) - g(n_b), \qquad g(x) = (x + 1) \log_2 (x + 1) - x \log_2 x. \label{Eq:HolevoCapacity} \end{equation} Importantly, the Holevo capacity includes optimization over the constellations of symbols (states) used at the channel input and all detection schemes. It is in principle saturable, but may require unconventional measurements beyond direct or homodyne detection.\cite{GuhaHabifJMO2011,ChenHabifNPH2012,BecerraFanNatPhot2013,FerdinandDiMarionpjQI2017} While for $n_b \gg 1$ the Shannon and the Holevo capacities nearly coincide, as illustrated by the example shown in Tab.~\ref{tab:Regimes}, there is a substantial difference between these two quantities in the photon-starved regime. When $n_a \ll 1$ the channel capacities tend to zero, which somewhat complicates a discussion of their behavior over a broad parameter range. A convenient solution is to use {\em photon information efficiency} (PIE) defined as $\textrm{PIE}=C/n_a$ which quantifies the maximum information that can be transmitted per time bin per one detected photon. In Fig.~\ref{Fig:TimeFrequencyDiagram}(b) we plot respective PIEs for the Shannon and the Holevo capacities as a function of the signal power $n_a$ for several fixed values of the noise power $n_b$. Conveniently, PIEs tend to constant values for $n_a \rightarrow 0$. It is seen that the Shannon capacity is not noticeably affected by the background noise as long as $n_b \ll 1$. This is because in the case of the Shannon capacity the noise floor is effectively defined by the shot noise of homodyne detection. On the other hand, the Holevo capacity takes into account more general detection schemes and the particle nature of electromagnetic radiation, which is essential to achieve efficient communication in the photon-starved regime. Applying the Taylor expansion to Eq.~(\ref{Eq:HolevoCapacity}) yields that in the limit $n_a \rightarrow 0$ the Holevo PIE is given by $g'(n_b) = \log_2(1+n_b^{-1})$. The analogous figure for the Shannon capacity is equal to $(\log_2 \textrm{e}) /(1+n_b)$. As a side note let us note that in telecommunication engineering the term capacity is used to describe the attainable transmission rate per unit time for a given combination of modulation format and detection scheme. Hence it is specified in bits per second. The ultimate quantum mechanical bound on this quantity is given by the product of the Holevo capacity and the channel bandwidth $B$. The capacity per unit bandwidth is referred to as the {\em spectral efficiency} and measured in $\text{bits}/(\text{s} \cdot \text{Hz})$. Hence Eqs.~(\ref{eq:shannon}) and (\ref{Eq:HolevoCapacity}) can be directly used as bounds on the spectral efficiency. \section{BACKGROUND NOISE} \label{Sec:NoiseModels} The model of the physical layer considered here can be summarized using a diagram presented in Fig.~\ref{Fig:probability}(a). The two elementary single-bin symbols ``on'' (a pulse) and ``off'' (an empty time bin) generate either a photocount or a no-count response on the detector. For PPM with frames spanning over $M$ time bins the pulse contains the optical energy available for the entire frame, which is equivalent to $M n_a$ photons at the detection stage. In the case of shot-noise limited direct detection the only type of an imperfection is that a pulse will not produce a photocount. According to the standard theory of photodetection,\cite{MandelWolfSemiclPhot} the probability that a photocount is generated is given by $p_p = 1 - e^{-M n_a}$. It is assumed here that the detector does not have the capability to resolve the number of photons that generated a photocount. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{ookandpp} \caption{(a) Photodetection model. A photocount is generated with conditional probabilities $p_p$ and $p_b$ respectively for the incoming light pulse and an empty time bin. A no-count response is obtained in the remaining cases with respective probabilities $1-p_p$ and $1-p_b$. (b) The probability of generating a photocount for an incoming light pulse as a function of the pulse optical energy for the Poissonian (solid lines) and Gaussian (dashed lines) models of background counts.\label{Fig:probability}} \end{figure} In a general noisy scenario one needs to include also a possibility that an empty time bin will result in a photocount. We will consider two models for noisy signal detection. The first model, referred to as {\em Poissonian} (P), assumes that background counts in a single time bin are described by a Poissonian distribution with a mean $n_b$ and that they are statistically independent from the counts generated by the incoming optical signal. Consequently, the probabilities of generating at least one count by an empty time bin and a light pulse are respectively given by \begin{equation} p_b^{(P)} = 1 - e^{-n_b}, \qquad p_p^{(P)} = 1 - e^{-M n_a - n_b} \label{Eq:PoissonianModel} \end{equation} where the product $M n_a$ specifies the mean number of photons carried by the pulse. The second noise model, called {\em Gaussian} (G), is based on an assumption that the complex amplitude $\alpha$ of the modulated signal prepared in a given time bin experiences additive noise $\alpha \rightarrow \alpha + \beta$, where $\beta$ is a random, complex, phase-invariant Gaussian variable with a mean $\langle\beta\rangle =0$ and the second moment of the absolute value equal to $\langle |\beta|^2 \rangle = n_b$. In this scenario, the count probabilities for an empty time bin and a light pulse read respectively: \begin{equation} p_b^{(G)} = \langle 1 - e^{-|\beta|^2} \rangle = \frac{n_b}{n_b+1}, \qquad p_p^{(G)} = \langle 1 - e^{-|\alpha+ \beta|^2} \rangle = 1 - \frac{e^{-Mn_a/(n_b+1)}}{n_b+1}, \label{Eq:GaussianModel} \end{equation} where in the second expression $\alpha$ is the complex amplitude of the signal pulse, $|\alpha|^2 = M n_a$. Expressions for $p_p$ given in Eqs.~(\ref{Eq:PoissonianModel}) and (\ref{Eq:GaussianModel}) have the same expansion up to linear terms in $Mn_a$ and $n_b$. They also coincide for any $Mn_a$ when $n_b=0$. Fig.~\ref{Fig:probability}(b) presents their comparison for the parameter ranges that will be relevant for the further analysis. Although the difference is rather minor, one will be able to see noticeable effects on the transmission rate for the highest noise levels considered here. The two models specified above follow from different physical pictures of the noise process. The Poissonian model corresponds to a scenario when the radiation seen by the detector comprises multiple modes, each carrying a small fraction of the noise power. Incoherent summation of contributions from these modes results in statistics that can be well approximated by the Poissonian distribution. This model can include also dark counts generated by thermal excitations in the active medium of the photodetector, provided that they are independent from the incoming radiation. It is worth noting that this would not be the case when a non-negligible role is played by the afterpulsing effect. In contrast, the Gaussian model is based on an assumption that in each time bin the detector effectively sees only one mode carrying the modulated signal. Such a regime of operation may be enabled by a selective transfer of the relevant mode to another frequency range,\cite{EcksteinBrechtOpEx2011,BrechtEcksteinNJP2011,ReddyRaymerOpEx2013,BrechtReddyPRX2015,ReddyRaymerOpEx2017} where it could be detected without the background noise contributed by other orthogonal modes. Transferring individual temporal modes is possible in principle using frequency conversion in non-linear optical media, but this technology still requires maturing before it becomes a viable option. An additional issue would be ensuring synchronization of the incoming signal with the operation of the mode-selective detector. Although mode selectivity should in principle enable substantial reduction of the background noise, in order to facilitate comparison between the two models introduced here we will assume that the background noise parameter $n_b$ is the same in both cases. \section{EFFICIENCY LIMITS} \label{Sec:EfficiencyLimits} The efficiency of a concrete combination of a modulation format and a detection technique can be characterized with the help of Shannon mutual information which characterizes the strength of correlations between signal preparations and detection outcomes \cite{CoverThomas}. Simple decoding will be considered here, assuming that information is extracted only from events when a photocount occurred in a single time bin within one PPM frame. Detected frames with multiple photocounts are interpreted as erasures. Optimization is carried out over the size $M$ of the PPM frame treated as a continuous real parameter, which is admissible as long as the optimal $M^\ast \gg 1 $. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{FullPanelLetters1} \caption{Optimized communication using a binary constellation of ``on'' and ``off'' symbols for simple decoded PPM (a-c) and generalized OOK (d-f) assuming the background noise power equivalent to $n_b = 10^{-1}, 10^{-2}, 10^{-3}, 10^{-4}$ detected photons per time bin. The PIE attainable in both scenarios is shown in (a,d). In the case of PPM optimization is carried out over the frame length $M$ with results shown in (b), which for generalized OOK corresponds to the inverse of the probability of using the ``on'' symbol depicted in (e). The optimal detected optical energy of a pulse is plotted in (c) and (f). Results are shown for the Poissonian (solid lines) and the Gaussian (dashed lines) models of the background noise.} \label{Fig:OptimizedPPMandOOK} \end{figure} Fig.~\ref{Fig:OptimizedPPMandOOK}(a) depicts the optimal PIE for simple-decoded PPM with direct detection optimized over the frame length. It is known that in the noiseless scenario the PIE grows unlimited with the diminishing signal power provided that the PPM frames can be arbitrarily long.\cite{KochmanWangTIT2014,JarzynaKuszajOPEX2015} In the presence of noise, Fig.~\ref{Fig:OptimizedPPMandOOK}(a) shows that for a given noise power $n_b$ such growth can be observed for signal powers $n_a \gtrsim n_b$. In the opposite regime, when $n_a \lesssim n_b$, the PIE decreases with the diminishing signal power. In the limit $n_a \rightarrow 0$ it exhibits approximately linear scaling with $n_a$. As seen in Fig.~\ref{Fig:OptimizedPPMandOOK}(b), in this limit the optimal PPM frame length $M^\ast$ saturates at a constant value dependent on the background noise power. Consequently, the detected optical energy of the pulse, given by $M^\ast n_a$ and shown in Fig.~\ref{Fig:OptimizedPPMandOOK}(c), tends to zero when $n_a \rightarrow 0$. As a result, received pulses introduce only a minor modification in the statistics of the generated photocounts which becomes dominated by the background noise. The above conclusions hold irrespectively of the Poissonian or the Gaussian model for the background noise employed in the calculations. A binary alphabet consisting of a pulse and an empty time bin can be used to implement generalized OOK, where the two input symbols can be used with different a priori probabilities. Denoting these probabilities respectively by $1/M$ and $1-1/M$ allows one to establish a direct correspondence with the PPM format in which a pulse is sent exactly once in each frame of $M$ otherwise empty time bins. From the information-theoretic viewpoint, generalized OOK with direct detection is described by a binary asymmetric channel with conditional probabilities depicted in Fig.~\ref{Fig:probability}(a). In order to investigate the full potential of this scheme, we will carry out optimization of generalized OOK over $M$ without any constraint on the maximum optical energy of the pulse. According to Fig.~\ref{Fig:OptimizedPPMandOOK}(d), in this scenario the PIE exhibits a qualitatively different behavior compared to the PPM case, as it tends to a non-zero constant value when $n_a \rightarrow 0$. Fig.~\ref{Fig:OptimizedPPMandOOK}(e) shows that in this limit the pulses are optimally sent less and less frequently. This is related to the fact that the optimal detected optical energy of the pulse stays at the level of the order of one photon even for an arbitrarily low average signal power as seen in Fig.~\ref{Fig:OptimizedPPMandOOK}(f). Consequently, a bin containing a pulse generates a photocount with a much higher probability than an empty one. This observation provides intuition behind the qualitatively different behavior of PIE for generalized OOK compared to the PPM scheme considered before. The advantage offered by generalized OOK without the constraints of simple-decoded PPM has a dramatic effect on the transmission rates that could be attained in deep-space optical communication. This is illustrated with Fig.~\ref{Fig:TransmissionRate}(a) which depicts the maximum transmission rate as a function of the distance assuming numerical parameters of an optical communication link specified in Tab.~\ref{tab:Regimes}. For large distances generalized OOK can offer rates scaling $R^{-2}$ with the distance $R$ in contrast to conventional PPM which exhibits inferior $R^{-4}$ dependence. This is a consequence of different behaviour of the PIE, tending to a constant for $n_a \rightarrow 0$ in the former case, and proportional to $n_a$ in the latter case. As a simple illustration, for the noise power equal to $2.56~\textrm{pW}$, corresponding to $n_b=10^{-2}$, generalized OOK can deliver in principle almost a tenfold gain in the transmission rate compared to PPM at the distance $R=10~\textrm{AU}$. Of course, Shannon mutual information is only the upper bound on the transmission rate. Rates that can be reached in practice depend essentially on forward error correction, which may be much more challenging to implement efficiently in the case of generalized OOK.\cite{HemmatiBiswasProcIEEE2011} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{PanelUnitLetters} \caption{The maximum attainable transmission rate (a) and the required transmitter peak power (b) as a function of distance expressed in astronomical units, $1~\textrm{AU}=149\cdot10^6~\textrm{km}$, for the parameters of an optical link specified in Tab.~\ref{tab:Regimes}. Results for simple-decoded PPM (dashed lines) are compared with generalized OOK (solid lines). The four values of the background noise parameter $n_{b} = 10^{-1}, 10^{-2}, 10^{-3}, 10^{-4}$ correspond to the detected noise power of $26.5~\mathrm{pW}$, $2.65~\mathrm{pW}$, $0.265~\mathrm{pW}$, and $0.0265~\mathrm{pW}$ respectively.} \label{Fig:TransmissionRate} \end{figure} In the case of the Gaussian model for the background noise, the asymptotic values of the PIE for $n_a \rightarrow 0$ seen in Fig.~\ref{Fig:OptimizedPPMandOOK}(d) can be directly compared with the the PIEs resulting from the Holevo capacity which can be read out from Fig.~\ref{Fig:TimeFrequencyDiagram}(b). It is seen that the latter figures are consistently higher. It has been proven using a quantum information theoretic approach\cite{Jarzyna2017,DingPavlichinXXX2017} that under the constraint of a fixed average signal power the constellation composed of an empty time bin and a coherent pulse saturates the Holevo capacity in the limit $n_a \rightarrow 0$. As the Holevo capacity incorporates optimization over all physically permissible detection strategies, the gap between the asymptotic values seen in Fig.~\ref{Fig:TimeFrequencyDiagram}(b) and Fig.~\ref{Fig:OptimizedPPMandOOK}(d) implies that the efficiency of generalized OOK can be further enhanced using more sophisticated receivers.\cite{GuhaHabifJMO2011,ChenHabifNPH2012,BecerraFanNatPhot2013,FerdinandDiMarionpjQI2017} It is worth noting that for direct detection generalized OOK achieves the highest possible information rate in the asymptotic limit of the diminishing average signal power.\cite{Verdu1990} \begin{figure} \begin{center} \includegraphics[width=0.8\textwidth]{loopy} \vspace{3mm} \caption{(a) An exemplary structured optical receiver which concentrates optical energy carried by a phase-polarization pattern into a single time bin of duration $\Delta t$. The choice between the horizontal and the vertical polarizations as well as $0$ and $\pi$ phases is represented by the orientation of pulses in individual bins. The receiver is composed of a sequence of modules. Each module contains a polarization-selective delay line constructed using two polarizing beam splitters PBS to overlap the earlier half of the pattern with the later half. For a suitable choice of the relative phase, the resulting superpositions are polarized at $\pm 45^\circ$, which are brought to the rectilinear basis using a half-wave plate HWP. After the last module the entire optical energy is concentrated in one time bin and detected using a single photon detector SPD. (b) The temporal location of the produced pulses is synchronized with the arrival of phase-polarization patters. In order to ensure rotational invariance between the transmitter and the receiver the patterns should be prepared using the circular rather than the rectilinear polarization basis and converted into the latter one at the receiver entrance using a quarter-wave plate.} \label{Fig:LoopyPolarization} \end{center} \end{figure} \section{POWER CONSIDERATIONS} \label{Sec:PowerConsiderations} The advantage of generalized OOK for deep-space optical communication discussed in the preceding section relies on the hardware ability to send infrequently light pulses with high optical energy. Fig.~\ref{Fig:TransmissionRate}(b) illustrates the requirements for the transmitter peak power as a function of distance assuming a simple rectangular pulse shape completely filling the time bin. Standard solutions for high-order PPM laser transmitters are based on a master oscillator power amplifier (MOPA) architecture or diode pumped solid-state lasers employing Q-switching technique. Such systems are able to provide peak powers respectively of several and tens of kilowatts while maintaining the optical pulse duration below $1~\mathrm{ns}$. However, in both cases electrical power consumption becomes problematic. Additionally Q-switched laser systems suffer from a limited repetition rate.\cite{Hemmati,Caplan} Owing to spacecraft power limitations and heat dissipation issues, the peak power achievable by the transmitter laser system is usually expected to remain in the range of few kilowatts. In the numerical example shown in Fig.~\ref{Fig:TransmissionRate}(b) this would imply suboptimal performance for ranges exceeding several astronomical units. The requirement for high peak power stems from the need to confine the signal-generated photocounts to short time intervals. One can envisage a technique to send the signal in a temporally extended form that would undergo optical compression before photodetection. The advantage of this approach may be more efficient generation of the optical signal in the transmitter assembly utilizing e.g.\ the MOPA architecture. One possibility to implement this approach would be to generate chirped pulses and subject them to compression in a dispersive medium in the first stage of the receiver setup. An alternative approach proposed recently\cite{GuhaPRL2011,RosatiMariPRA2016,BanaszekJachuraICSOS2017} is based on sequences of phase- and (optionally) polarization-modulated pulses whose optical energy can be concentrated in a single time bin using an interferometric setup. This idea is illustrated with an exemplary design for a structured optical receiver shown in Fig.~\ref{Fig:LoopyPolarization}(a). The transmitter emits phase-polarization pulse patterns spanning over multiple time bins whose number is an integer power of $2$. The receiver consists of a series of modules. Each module introduces a relative delay between the two input polarizations equal to half of the duration of the pattern entering that module and rotates the output polarization by $45^\circ$ using a half-wave plate. Phases and polarizations of individual pulses in the input pattern are chosen such that after each module the length of the pattern is reduced by a factor of $2$. After the last module the entire optical energy of the pattern is concentrated in a single time bin whose temporal location is synchronized with the arrival time of the pattern as shown schematically in Fig.~\ref{Fig:LoopyPolarization}(b). Hence direct detection can be used to read out timing information with the resolution of an individual time bin. Note that the use of phase-polarization patters requires a minimum separation between consecutive pulses at least equal to the pattern length. This however should have a minor effect on the efficiency. The reduction of the required peak-to-average power ratio for the signal emitted by the transmitter may improve its overall electrical-to-optical conversion efficiency. The disadvantage of this solution is a more complicated construction of the receiver, which in the example discussed above requires maintaining interferometric stability between multiple optical paths. The interferometric setup would also need to tolerate spatial distortions of the signal introduced e.g.\ by atmospheric turbulence.\cite{JinAgneXXX2015} It remains to be investigated whether inevitable imperfections of structured receivers would realistically cancel the advantages of improved trasmitter power management. Results obtained so far indicate robustness to certain types of imperfections.\cite{JarzynaLipinskaOPEX2016} Alternative designs for structured optical receivers may become viable with the development of fast, low-loss optical switches\cite{BanaszekJachuraICSOS2017} as well as quantum memories.\cite{KlimekJachuraJMO2016} \section{CONCLUSIONS} \label{Sec:Conclusions} The overall efficiency of an optical communication link depends on a number of hardware and software factors. The purpose of the present paper was to discuss the potential of the physical layer for deep-space optical communication in the presence of background noise. The theoretical reference in the analysis was the quantum mechanical Holevo channel capacity which takes into account both wave and particle aspects of electromagnetic radation as the carrier of information. With the diminishing average signal power generalized OOK was found to deliver in principle much better performance than the standard simple-decoded PPM, provided that the two OOK symbols are used with highly imbalanced a priori probabilities. Optimal implementation of generalized OOK requires concentration of the optical energy in very few time bins, which leads to demanding requirements for the peak-to-average power ratio of the transmitter laser source. This problem can be in principle alleviated by the use of structured receivers which exploit optical interference to concentrate temporally optical power. More complicated architectures of such receivers may not be a critical issue for downlink transmission as the size, weight, and power consumption are secondary considerations in the case of ground terminals. Exploiting the full potential of the physical layer may also require further advancements in the area of error correction to approach with practical codes Shannon mutual information for transmission schemes more general than PPM. \acknowledgments We acknowledge insightful discussions with F. E. Becerra, S. Guha, C. Heese, Ch. Marquardt, and J. Nunn. This work is part of the project ``Quantum Optical Communication Systems'' carried out within the TEAM programme of the Foundation for Polish Science co-financed by the European Union under the European Regional Development Fund.
\section{Introduction} \IEEEPARstart{S}{ource} separation in a digital signal processing aims to recover original signals of interest from given signal mixtures. It has been attracted considerable attention as a research topic in the past few decades and applied to many research fields \cite{adali2014source}. The applications of source separation include music and audio analysis such as instrument-wise equalizing, stereo-to-surround up-mixing, karaoke systems, and crosstalk cancellation, biomedical signal analysis such as electroencephalographic (EEG) and electromyographic (EMG) \cite{delorme2004eeglab, hesse2006semi, vazquez2012blind}, and chemical signal analysis \cite{duarte2014source}. Nevertheless, the mainstream of the recent source separation research focuses on the audio signal due to the easily overlapping nature of sound and its diverse applications. In almost every situation we hear a variety of sounds that occur simultaneously, and humans are able to find meaningful information in the sounds. ``Cocktail party problem'' demonstrates an interesting phenomenon concerning the human's capability of listening. Even in a noisy environment like the cocktail party, people are able to concentrate on a sound that they want to attend such as the voice of a person they are in conversation. This selective attention enables humans to catch crucial auditory information, with being insensitive to the magnitude of the sound. As this process happens in a human brain unconsciously, machines are not capable of imitating their magnitude-robust operation. Hence, in order to make the machines work correctly, pre-processing to amplify, or separate, the sounds of interest is necessary. This leads to the necessity of audio source separation, and this is why the source separation algorithms have an enormous impact on the audio signal processing and machine learning research. In particular, the source separation has been extensively used in the field of music signal analysis. As a pre-processing method, music source separation has contributed to the improvement of the various music information retrieval (MIR) algorithms enabling the extraction of musical information to work with high accuracy. Such algorithms include low-level music analyses such as pitch detection, tempo estimation, and instrument identification, and high-level analyses such as genre classification, music identification, and copyright monitoring \cite{ewert2014score}. Besides, it has also assisted music generation algorithms such as automatic music composition as well as music enhancement algorithms such as up-mixing, time-stretching, instrument-wise equalization, and noise reduction \cite{bryan2014interactive, driedger2016review}. In addition, the spectral and temporal characteristics of music signals are often considered stationary. Hence the algorithms to analyze the music signals can be extended to other applications to investigate noisier signals such as EEG signal. \subsection{Number of channels} The source separation research can be categorized according to the number channels of the input sound. When the mixture signal is composed of multiple channels, the estimation of original sources is achievable via spatial filtering. Conventional studies that use spatial filtering assume that the mixture signal is the linear combination \cite{li2006underdetermined} or convolutional mixing \cite{pedersen2008convolutive, ozerov2010multichannel} of the original sounds. In this case, the separation process is identical to obtaining the inverse of the actual mixing matrix. When the number of channels is equal to the number of original sources, the task is categorized as {\it determined} case since the perfect reconstruction of the original sounds is theoretically available. This is also applied to the {\it overdetermined} case where the number of channels exceeds the number of sources. However, when the number of channels is smaller than the number of sources, which is referred to as {\it underdetermined} case, the perfect reconstruction is not possible via spatial filtering; hence, the assistance of spectro-temporal characteristics is necessary. Since most of the music signals are comprised of a single channel ({\it mono}) or two channels ({\it stereo}), the music source separation task is often presumed as underdetermined. Accordingly, intensive study about the single channel-based music source separation methods is essential, and it is commonly utilized as an essential background of the multi-channel music source separation \cite{aichner2007multi}. \subsection{Utilization of side-information} Meanwhile, the amount of information we use is considered as an important criterion to categorize source separation studies. In the early stage of the music source separation, the blind approach was intensively investigated \cite{virtanen2007monaural}, where no additional information about the target source exists. These blind source separation (BSS) studies often assume that the target sound has certain statistical features such as non-Gaussianity and independence \cite{davies2007source} or sparsity \cite{virtanen2007monaural}. BSS techniques are useful in some cases; however, such statistical assumptions cannot be guaranteed in many practical situations, which eventually causes performance degradation. To overcome this low performance, informed source separation (ISS) was widely studied \cite{vincent2014blind}. These studies assume situations where side-information about the target sources is available. Such information includes spectro-temporal characteristics such as music score \cite{ewert2014score, ewert2012using, fritsch2013score}, partial information such as onset \cite{park2014separation}, and direct information such as manually provided annotations \cite{durrieu2012musical, lefevre2012semi, bryan2014isse} and user-guided audio signal \cite{smaragdis2009separation}. Especially, recent approaches have examined the effect of artificial neural network-based methods on the source separation tasks. While some of the research efforts directly applied the deep learning-based techniques like autoencoder as Lim and Lee's work \cite{limharmonic}, Osako {\it et al.}'s work \cite{osako2017supervised}, and Grais and Plumbley's work \cite{grais2017single}, others attempted to enhance conventional approaches like matrix decomposition \cite{kang2015nmf} and time-frequency mask \cite{huang2015joint}. However, it is still a big issue to reduce the amount of information needed for successful separation of the target sound, as the situation where side-information can be provided is highly limited. Especially in deep learning-based approaches, a significant amount of training data is required for each sound source. Hence, we focus on reducing the amount of required information. \subsection{Instrument sound separation} Musical instruments are known to show static spectro-temporal characteristics and timbre. These characteristics can also be used for the source separation. Especially in cases where harmonic instruments and drums coexist, their attributes that appear in the time-frequency representation are easily distinguishable. Our previous work focused on the spectral features of harmonic and percussive sounds \cite{park2015harmonic}, and it was also extended to simultaneously consider the time and frequency domain aspects of the instruments \cite{park2017exploiting}. The separation of harmonic instrument sounds is a more challenging problem as the differences in the spectral and temporal characteristics are less obvious compared to the harmonic-percussive source separation. Spiertz and Gnann presented the basis clustering algorithm as a post-processing of non-negative matrix factorization (NMF) \cite{spiertz2009source}. Fitzgerald {\it et al.} used shift-invariant non-negative tensor factorization \cite{fitzgerald2008extended}. Ozerov and Fevotte focused on the mixing procedure \cite{ozerov2010multichannel}. Other studies on harmonic instrument sound separation adopt {\it source-filter model}. Heittola {\it et al.} trained bases for instruments and used them for separation \cite{heittola2009musical}. Rodriguez-Serrano {\it et al.} also made instrument-dependent models and used them for separation \cite{rodriguez2012multiple}. Klapuri {\it et al.}'s work extended Heittola {\it et al.}'s method to separately estimate approximated spectral envelopes and their corresponding excitations without the pre-training process \cite{klapuri2010sound}. But their work fails to precisely assess spectral envelopes since it roughly approximates the envelopes using band-pass filter banks. Ozerov {\it et al.} developed flexible audio source separation toolbox (FASST), in which spectra are also split into excitations and filter parts \cite{ozerov2012general, salaun2014flexible}. In this paper, we present a novel approach to the single-channel instrument sound separation problem. In the first part of this paper, we assume that the instruments are known in advance and that their spectral envelopes can be obtained. For instance, when audio segments of the instruments are given, we can extract the spectral envelopes from them. The spectral bases of the NMF to approximate the mixture spectrogram are partitioned ahead of the iteration and then constrained to resemble the extracted envelopes. The constraint imposition is achieved with the use of generalized Dirichlet prior which has been used in the source separation tasks. In the second part of this paper, we extend the informed approach to the case where no additional information is available. In the blind approach, the spectral envelopes of each basis are calculated through LPC, and all envelopes belong to the same group are averaged. This is because the spectral envelope is determined for each instrument whereas the excitations can differ from other bases that belong to the same group. As the iteration proceeds, the average spectral envelopes of each group converge to the true spectral envelopes of the instruments. These two methods are based on the source-filter model with linear predictive coding (LPC), but they obtain the envelopes of the spectra (or spectral bases of the NMF) without converting them to the time-domain signal. The comparative evaluation reveals that the proposed method outperforms the other conventional methods. The rest of the paper is organized as follows. Section 2 describes our informed approach method. In Section 3, we extend the informed approach to blind approach. Section 4 shows the experimental results with real recordings. Conclusions are presented in Section 5. \section{Proposed informed approach} In this section, we present a detailed description of the proposed informed source separation method. This section is composed of three subsections that present excitation-filter model, linear predictive coding, and the proposed NMF-based spectrogram decomposition procedure. \subsection{Excitation-filter model} The time domain mixture signal is generated by summing individual sources as \begin{equation} \label{Eq1} x = \sum\limits_{i = 1}^I {{x_i}} \end{equation} where $x$ denotes the mixture sound, $x_i$ denotes the sound of the $i$-th instrument, and $I$ denotes the number of instruments. When this time domain signal is converted into a spectrogram, it can be similarly represented as \begin{equation} \label{Eq2} \begin{aligned} {\bf{X}} &= \sum\limits_{i = 1}^I {{{\bf{X}}_i}} \\ &\approx \sum\limits_{i = 1}^I {\sum\limits_{k \in {\Phi _i}} {{{\bf{w}}_k}{{\bf{h}}_k}} } \end{aligned} \end{equation} where ${\bf{X}}_i$ denotes the magnitude spectrogram of instrument $i$, $\Phi _i$ denotes the index set of bases that explain ${\bf X} _i$, and ${{{\bf{w}}_k}}$ and ${{{\bf{h}}_k}}$ denote the $k$-th spectral basis and its time activation, respectively. The spectrogram conversion error is assumed to be small and negligible. For the convenience of description, we assume that ${|| {{{\bf{w}}_k}} ||_1} = 1$ for all $k$. ${\bf w}$ and ${\bf h}$ can be estimated with the matrix decomposition algorithms such as probabilistic latent semantic analysis (PLSA), probabilistic latent component analysis (PLCA) \cite{shashanka2008probabilistic}, and NMF \cite{lee1999learning}. We also assume that the instrument sounds can be represented using the source-filter model, which we alternatively address as {\it excitation-filter model} to avoid term collision. The excitation-filter model has been widely used to analyze the speech production mechanism \cite{quatieri2006discrete}. According to the excitation-filter model, the timbre of an instrument is determined by its {\it filter}, whereas the pitch is determined by the excitation signal. Figure \ref{Fig1} (a) and (b) illustrate the spectrum and the corresponding LPC spectral envelope of violin and clarinet, respectively, plotted on a log-scale. Even though the excitation-filter model is to describe the generation of the harmonic instrument sound, we similarly extend it to the percussive instruments since they also present difference in the energy distribution of the spectra as shown in Figure \ref{Fig1} (c), (d), and (e). As the excitation signal is filtered by the instrument's resonant structure, a spectral basis (or a spectrum of an instrument, equivalently) ${{\bf w}_k}$ has to be represented as \begin{equation} \label{Eq3} {{\bf{w}}_k} = {{\bf{v}}_i} \odot {{\bf{e}}_k} \end{equation} where ${{\bf v}_i}$ is the filter's frequency response of instrument $i$ that can be alternatively referred to as {\it spectral envelope}, ${{\bf e}_k}$ is the spectrum of the $k$-th excitation signal, the operator $\odot$ denotes the element-wise multiplication, and $k \in {\Phi _i}$. \begin{figure} \centering \begin{subfigure}[]{0.48\textwidth} \centering \includegraphics[width=2.1in]{Fig1a.eps} \subcaption{} \end{subfigure} \begin{subfigure}[]{0.48\textwidth} \centering \includegraphics[width=2.1in]{Fig1b.eps} \subcaption{} \end{subfigure} \begin{subfigure}[]{0.32\textwidth} \centering \includegraphics[width=2.1in]{Fig1c_hihat_spectrum.eps} \subcaption{} \end{subfigure} \begin{subfigure}[]{0.32\textwidth} \centering \includegraphics[width=2.1in]{Fig1d_snare_spectrum.eps} \subcaption{} \end{subfigure} \begin{subfigure}[]{0.32\textwidth} \centering \includegraphics[width=2.1in]{Fig1e_bassdrum_spectrum.eps} \subcaption{} \end{subfigure} \caption{Spectrum and corresponding spectral envelope computed via linear prediction of (a) violin, (b) clarinet (c) hi-hat drum, (d) snare drum, and (e) bass drum.} \label{Fig1} \end{figure} Note that the above Eq. \ref{Eq3} can be satisfied only if a proper source separation is applied. During the ongoing matrix decomposition iteration, the spectral envelopes vary for each $k$. However, the proposed method focuses on the reverse direction of this theory: {\it Can a group of bases successfully reconstruct the sound of an instrument, if we can make the basis envelopes equal to the true envelope of the instrument?} Since the proposed method requires the estimation of the true spectral envelopes of the instruments and the basis envelopes, the representative spectral envelope extraction method is presented in the next subsection. \subsection{Linear predictive coding} The spectral envelope can be obtained using LPC, which assumes that the filter can be approximated by a finite number of poles. In this subsection, we describe how we can obtain LPC coefficients and how they can be extensively applied to the spectral bases of the NMF algorithm. \subsubsection{Calculation of LPC coefficients} LPC aims to calculate the all-pole infinite impulse response (IIR) filter coefficients ${\bf a} = {\left( {{a_1},{a_2},\,...\,,{a_M}} \right)^T}$ that best predict the signal value minimizing the energy of the error signal, represented as \begin{equation} \label{Eq4} \begin{aligned} {\bf a} &= \arg \mathop {\min }\limits_{\bf{a}} E\left\{ {{{\left\Vert {err\left( n \right)} \right\Vert}^2}} \right\} \\ &= \arg \mathop {\min }\limits_{\bf{a}} E\left\{ {{{\left\Vert {y\left( n \right) - \sum\limits_{m = 1}^M {{a_m}y\left( {n - m} \right)} } \right\Vert^2}}} \right\}, \end{aligned} \end{equation} where $y$ is a real, time domain signal, $err$ is the error signal, and $M$ is the number of filter coefficients. The accurate estimation of LPC coefficients is important, since the filter's frequency response, namely spectral envelope, is represented as \begin{equation} \label{Eq5} H\left( z \right) = \frac{1}{{1 - \sum\limits_{m = 1}^M {{a_m}{z^{ - m}}} }}. \end{equation} The problem of computing LPC coefficients can be converted into an alternative form, which is referred to as {\it autocorrelation method}. It can be mathematically represented as \begin{equation} \label{Eq6} {{\bf R}}{\bf a} = {{\bf r}} \end{equation} where ${\bf r}$ is a vector of autocorrelations of $y$ defined as ${\bf r} = {\left( {{r_{yy}}\left( 1 \right),\,{r_{yy}}\left( 2 \right)\,,\,\,...\,\,,\,{r_{yy}}\left( M \right)} \right)^T}$, and ${\bf R}$ is an autocorrelation matrix defined as \begin{equation} \label{Eq7} {\bf{R}} = \left( {\begin{array}{*{20}{c}} {{r_{yy}}\left( 0 \right)}&{{r_{yy}}\left( 1 \right)}& \cdots &{{r_{yy}}\left( {M - 1} \right)}\\ {{r_{yy}}\left( 1 \right)}&{{r_{yy}}\left( 0 \right)}&{}&{{r_{yy}}\left( {M - 2} \right)}\\ \vdots &{}& \ddots & \vdots \\ {{r_{yy}}\left( {M - 1} \right)}&{{r_{yy}}\left( {M - 2} \right)}& \cdots &{{r_{yy}}\left( 0 \right)} \end{array}} \right) \end{equation} where ${r_{yy}}\left( m \right) = E\left\{ {y\left( n \right) y \left( {n - m} \right)} \right\}$. From the above formula, we can observe that the calculation of LPC coefficients does not necessarily require the original time domain signal $y$ and that it can also be calculated by the autocorrelations. As ${\bf R}$ is a Toeplitz matrix, ${\bf a}$ can be easily obtained using Levinson-Durbin recursion \cite{vaseghi2008advanced}. \subsubsection{Envelope of spectral bases} Consider the spectrum ${\bf Y}$ of a time domain signal ${y\left( n \right)}$, and its magnitude ${\left| {\bf{Y}} \right|}$. The spectral envelope of the magnitude spectrum can be directly obtained without the spectrum-to-time domain signal conversion process. According to the Wiener-Khinchin theorem, the computation of autocorrelation is simplified as \begin{equation} \label{Eq8} \begin{aligned} {{{\rho}}} &= IFFT\left[ {{{\bf{S}}_{yy}}} \right] \\ &= IFFT\left[ {{\bf{Y}}{{\bf{Y}}^*}} \right] \\ &= IFFT\left[ {{{\left| {\bf{Y}} \right|}^2}} \right] \end{aligned} \end{equation} where ${{{\bf{S}}_{yy}}}$ is the power spectral density of ${y\left( n \right)}$, ${{\bf{r}}_{yy}}$ is defined as ${{{\rho}}} = {\left( {{r_{yy}}\left( 0 \right),\,{r_{yy}}\left( 1 \right),\,...\,,\,{r_{yy}}\left( M \right)} \right)^T}$, $IFFT\left[ \bullet \right]$ denotes the inverse fast Fourier transform, and ${\left( \bullet \right)^*}$ denotes the complex conjugate. Here, we can see that the magnitude spectrum ${\left| {\bf{Y}} \right|}$ has sufficient information to attain the autocorrelations, which in turn can be used to estimate LPC coefficients. These LPC coefficients are finally used to estimate the spectral envelope. \subsection{Spectrogram decomposition procedure} On the basis of the equivalence of PLCA and NMF \cite{ding2008equivalence}, the application of Dirichlet to the NMF framework has been presented in some conventional works \cite{park2014separation, park2015harmonic, park2017exploiting}. According to those research, the Dirichlet prior is a way to shape bases in the probabilistic framework and can be easily generalized to the NMF framework. In this paper, we do not present how we can implement it on the PLCA framework. Instead, we directly describe our method on the NMF framework. Figure \ref{Fig2_overview} illustrates the overall procedure of how the proposed method works. The input mixture audio is transformed into a magnitude spectrogram and is decomposed using the proposed modified NMF. In so doing, the bases are randomly initialized first, and the spectral bases and their corresponding time activations are estimated iteratively afterwards. After the estimation, ${\bf w}$ is divided into two parts, envelope ${\bf v}$ and excitation ${\bf e}$ using linear prediction. The envelopes of the bases that belong to an instrument's index set are replaced by the true envelope of the instrument. The spectral bases are then reconstructed by multiplying the new envelope and the excitation followed by the next iteration. After the iteration is finished, the spectrograms are reconstructed for each instrument. Finally, the audio signals are reconstructed. \begin{figure}[t] \centering \centerline{\includegraphics[width=3.25in]{Fig2.png}} \caption{Overview of the proposed informed approach.} \label{Fig2_overview} \end{figure} The proposed method modifies the NMF update equations that minimize the KL divergence. It can be mathematically represented as \begin{equation} \label{Eq9} {\hat {\bf{H}}_{k,t}} \leftarrow \frac{{{\bf{H}}_{k,t}^{\left( l \right)}\sum\limits_f {\left\{ {{\bf{W}}_{f,k}^{\left( l \right)}{{{{\bf{X}}_{f,t}}} \mathord{\left/ {\vphantom {{{{\bf{X}}_{f,t}}} {{{\tilde {\bf{X}}}_{f,t}}}}} \right. \kern-\nulldelimiterspace} {{{\tilde {\bf{X}}}_{f,t}}}}} \right\}} }}{{\sum\limits_{f'} {{\bf{W}}_{f',k}^{\left( l \right)}} }} \end{equation} \begin{equation} \label{Eq10} {\tilde {\bf{W}}_{f,k}} \leftarrow \frac{{{\bf{W}}_{f,k}^{\left( l \right)}\sum\limits_t {\left\{ {{\bf{H}}_{k,t}^{\left( {l + 1} \right)}{{{{\bf{X}}_{f,t}}} \mathord{\left/ {\vphantom {{{{\bf{X}}_{f,t}}} {{{\tilde {\bf{X}}}_{f,t}}}}} \right. \kern-\nulldelimiterspace} {{{\tilde {\bf{X}}}_{f,t}}}}} \right\}} }}{{\sum\limits_{t'} {{\bf{H}}_{k,t'}^{\left( {l + 1} \right)}} }} \end{equation} \begin{equation} \label{Eq11} {\bf{H}}_{k,t}^{\left( {l + 1} \right)} \leftarrow {\hat {\bf{H}}_{k,t}}\sum\limits_f {{{\tilde {\bf{W}}}_{f,k}}} \end{equation} \begin{equation} \label{Eq12} {\hat {\bf{W}}_{f,k}} \leftarrow \frac{{{{\tilde {\bf{W}}}_{f,k}}}}{{\sum\limits_f {{{\tilde {\bf{W}}}_{f,k}}} }} \end{equation} \begin{equation} \label{Eq13} {\bf{w}}_k^{\left( {l + 1} \right)} \leftarrow \alpha {{\hat {\bf w}}_k} + \left( 1-\alpha \right) {{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over v} }}}^{\left( i \right)}} \odot {{\bf{e}}^{\left( k \right)}}, k \in \Phi_{i} \end{equation} where ${\bf H}$ is the $K \times N$ matrix of time activations, of which $k$-th row is ${{\bf h}_k}$, ${\bf W}$ is the $M \times K$ matrix of spectral bases, of which $k$-th column is ${{\bf w}_k}$, ${{\hat {\bf W}}}$ and $\tilde {\bf{W}}$ denote the temporarily adopted variables, which have the same size as ${\bf{W}}$, ${{\hat {\bf H}}}$ denotes the temporarily adopted variable that has the same size as $\bf{H}$, ${\tilde {\bf{X}}}$ is the estimated spectrogram reconstructed with up-to-date ${\bf W}$ and ${\bf H}$, ${{{\bf{v}}^{\left( k \right)}}} = {\left( {v_1^{\left( k \right)},\,...\,,\,v_F^{\left( k \right)}} \right)^T}$ and ${{\bf{e}}^{\left( k \right)}} = {\left( {e_1^{\left( k \right)},\,...\,,\,e_F^{\left( k \right)}} \right)^T}$ denote the spectral envelope and excitation spectrum of the $k$-th column of ${{\hat {\bf W}}}$ represented as ${{\hat {\bf w}}_k}$, respectively, ${{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over v} }}}^{\left( i \right)}}$ is the true spectral envelope of instrument $i$, $\alpha$ denotes the mixing weight to control the strength of the constraint imposition, $f$ and $t$ denote the index of frequency bin and time frame, respectively, and $l$ denotes the iteration index. Note that Eq. \ref{Eq11} and \ref{Eq12} are the normalization stages for the spectral bases and Eq. \ref{Eq13} is based on the generalized Dirichlet prior \cite{park2017exploiting}. \subsubsection{Spectral envelope of bases} The spectral envelope of ${\hat {\bf{w}}_k}$ can be obtained as \begin{equation} \label{Eq14} {{\bf{r}}^{\left( k \right)}} \leftarrow IFFT\left[ {{{\left\{ {{{\hat {\bf{w}}}_k}} \right\}}^2}} \right] \end{equation} \begin{equation} \label{Eq15} \begin{aligned} {{\bf{a}}^{\left( k \right)}} &= {\left( {a_0^{\left( k \right)},\,a_1^{\left( k \right)},\,...\,,\,a_M^{\left( k \right)}} \right)^T} \\ &\leftarrow LevinsonDurbin\left( {{{\bf{r}}^{\left( k \right)}}} \right) \end{aligned} \end{equation} \begin{equation} \label{Eq16} v_f^{\left( k \right)} \leftarrow \left| {\frac{{{{\eta ^{\left( k \right)}}}}}{{1 - \sum\limits_{m = 1}^M {\left\{ {{a_m}\exp \left( { - {\bf{i}}2\pi \frac{f}{F}} \right)} \right\}} }}} \right| \end{equation} \begin{equation} \label{Eq17} e_f^{\left( k \right)} \leftarrow \frac{{\hat {\bf{W}}_{f,k}}}{{v_f^{\left( k \right)}}} \end{equation} where ${{\bf{r}}^{\left( k \right)}}$ contains the autocorrelations of $IFFT\left[ {{{\hat {\bf{w}}}_k}} \right]$, ${{\eta ^{\left( k \right)}}}$ is the normalization constant to make ${|| {{{\bf{v}}^{\left( k \right)}}} ||_1} = 1$, and $LevinsonDurbin\left( { \bullet } \right)$ is the function that calculates the $M+1$ dimensional vector ${{\bf{a}}^{\left( k \right)}}$ of LPC coefficients by means of Levinson-Durbin recursion. Note that the imaginary number ${\bf{i}}$ is differentiated from the instrument index $i$, and ${a_0^{\left( k \right)}}=1$ by the definition of LPC. \subsubsection{True spectral envelope of an instrument} The true spectral envelope ${{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over v} }}}^{\left( i \right)}}$ is computed through the similar step. We assume that an audio segment ${{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over x} }_i}$ is given for all $i$. First, it is converted to a magnitude spectrogram ${\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over X} }}$ and then the spectral envelopes ${{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over v} }}}_t}$ of each frame ${{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over x} }}}_t}$ is calculated. Then they are averaged as \begin{equation} \label{Eq18} {{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over v} }}}^{\left( i \right)}} = \frac{{\sum\limits_t {{{ \left\Vert {{{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over x} }}}_t}} \right\Vert }_1}{{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over v} }}}_t}} }}{{{{ \left\Vert {\sum\limits_t {{{ \left\Vert {{{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over x} }}}_t}} \right\Vert }_1}{{{\bf{\mathord{\buildrel{\lower3pt\hbox{$\scriptscriptstyle\smile$}} \over v} }}}_t}} } \right\Vert }_1}}}. \end{equation} \subsubsection{Signal reconstruction} After the iteration, the estimated spectrograms of each instrument are reconstructed as \begin{equation} \label{Eq19} {\hat {\bf{X}}_i} = \sum\limits_{k \in {\Phi _i}} {{{\bf{w}}_k}{{\bf{h}}_k}} \end{equation} where ${\hat {\bf{X}}_i}$ denotes the estimated spectrogram of instrument $i$. These spectrograms are converted to time domain signals by means of inverse short-time Fourier transform. \section{Proposed blind approach} In this section, we describe how we extend the informed approach to the blind scenario. As similar to the previous approach, it is mainly based on the NMF with the generalized Dirichlet prior. Figure \ref{Fig3_overview} shows the structural overview of the proposed method. Similar to the informed approach, the input signal is converted into a spectrogram and decomposed using the NMF to minimize the KL divergence between $\bf{X}$ and $\tilde{\bf{X}}$. During the iteration, the spectral envelopes of the bases belong to the same group are averaged. Then the mean envelope is applied to the bases in the next step. This process can be represented in the mathematical formula as \begin{equation} \label{Eq20} {\hat {\bf{H}}_{k,t}} \leftarrow \frac{{{\bf{H}}_{k,t}^{\left( l \right)}\sum\limits_f {\left\{ {{\bf{W}}_{f,k}^{\left( l \right)}{{{{\bf{X}}_{f,t}}} \mathord{\left/ {\vphantom {{{{\bf{X}}_{f,t}}} {{{\tilde {\bf{X}}}_{f,t}}}}} \right. \kern-\nulldelimiterspace} {{{\tilde {\bf{X}}}_{f,t}}}}} \right\}} }}{{\sum\limits_{f'} {{\bf{W}}_{f',k}^{\left( l \right)}} }} \end{equation} \begin{equation} \label{Eq21} {\tilde {\bf{W}}_{f,k}} \leftarrow \frac{{{\bf{W}}_{f,k}^{\left( l \right)}\sum\limits_t {\left\{ {{\bf{H}}_{k,t}^{\left( {l + 1} \right)}{{{{\bf{X}}_{f,t}}} \mathord{\left/ {\vphantom {{{{\bf{X}}_{f,t}}} {{{\tilde {\bf{X}}}_{f,t}}}}} \right. \kern-\nulldelimiterspace} {{{\tilde {\bf{X}}}_{f,t}}}}} \right\}} }}{{\sum\limits_{t'} {{\bf{H}}_{k,t'}^{\left( {l + 1} \right)}} }} \end{equation} \begin{equation} \label{Eq22} {\bf{H}}_{k,t}^{\left( {l + 1} \right)} \leftarrow {\hat {\bf{H}}_{k,t}}\sum\limits_f {{{\tilde {\bf{W}}}_{f,k}}} \end{equation} \begin{equation} \label{Eq23} {\hat {\bf{W}}_{f,k}} \leftarrow \frac{{{{\tilde {\bf{W}}}_{f,k}}}}{{\sum\limits_f {{{\tilde {\bf{W}}}_{f,k}}} }} \end{equation} \begin{equation} \label{Eq24} {\overline {\bf{v}} ^{{\Phi _i}}} \leftarrow \frac{{\sum\limits_{k \in {\Phi _i}} {{\nu _k}{{\bf{v}}^{\left( k \right)}}} }}{{\sum\limits_{k \in {\Phi _i}} {\sum\limits_{m = 1}^M {{\nu _k}v_m^{\left( k \right)}} } }} \end{equation} \begin{equation} \label{Eq25} {\bf{w}}_k^{\left( {l + 1} \right)} \leftarrow \beta {{\hat {\bf w}}_k} + \left( 1-\beta \right) {\overline {\bf{v}} ^{{\Phi _i}}} \odot {{\bf{e}}^{\left( k \right)}} \end{equation} where ${\overline {\bf{v}} ^{{\Phi _i}}}$ is the average spectral envelope for instrument $i$, ${{\nu _k}}$ is the weight of ${{{\bf{v}}^{\left( k\right)}}}$ for the weighted mean, and $\beta$ denotes the mixing weight to control the strength of the constraint imposition. ${{\nu _k}}$ is to be heuristically determined via optimization process presented in the next section. \begin{figure}[t] \centering \centerline{\includegraphics[width=3.25in]{Fig3}} \caption{Overview of the proposed blind approach.} \label{Fig3_overview} \end{figure} Note that the Eq. \ref{Eq20}, \ref{Eq21}, \ref{Eq22}, \ref{Eq23} are identical to Eq. \ref{Eq9}, \ref{Eq10}, \ref{Eq11}, \ref{Eq12}, respectively. The true spectral envelope extracted from the given instrument sound is replaced by the group-wise average envelope ${\overline {\bf{v}} ^{{\Phi _i}}}$. Because the proposed blind source separation method is an unsupervised separation method, the ground truth spectral envelopes are not assumed to be given in advance. We have made the bases in a group have a unified envelope, and the envelope converges to the ground truth envelope. Technically, there has been no technique that only estimates the envelopes of the mixed instruments, hence, we have utilized the NMF algorithm that simultaneously learns the envelope and the excitation. Finally, the spectrograms of each instrument are reconstructed in the same way we did in the previous informed approach, followed by the inverse short-time Fourier transform. \subsection{Sparse initialization} It has been observed in our previous research \cite{park2017exploiting} that the initialization of the spectral bases can result in the difference of the separation performance. Most of the matrix decomposition-based source separation methods use a Gaussian random noise \cite{spiertz2009source} or uniform random sequence \cite{park2015harmonic}. When we visualize the distribution of their directions as in Figure \ref{Fig4_direction} (a), it can be confirmed that few of them have sparse characteristics. However, the spectral bases often show sparse characteristic, and it can be helpful to initialize them with sparse vectors for the fast convergence as well as performance improvement. Our strategy to generate sparse vectors is to perform elementwise square operation with the uniform random sequence. It makes the sparsity of the bases amplified as we can see in Figure \ref{Fig4_direction} (b). We only utilize the square operation; however, the effect of higher order power operation needs to be further investigated in the future. Using this novel initialization method, we can obtain additional performance gain. \begin{figure}[t] \centering \begin{subfigure}[]{0.48\textwidth} \centering \includegraphics[width=2.6in]{Fig4_directiona.eps} \subcaption{} \end{subfigure} \begin{subfigure}[]{0.48\textwidth} \centering \includegraphics[width=2.6in]{Fig4_directionb.eps} \subcaption{} \end{subfigure} \caption{Distribution of directions of randomly generated three-dimensional vectors. The vectors are $l_2$ normalized for the visualization.} \label{Fig4_direction} \end{figure} \section{Performance evaluation} In this section, the performance of the proposed method is evaluated and compared with the baseline algorithms of FASST of Ozerov {\it et al.} and Spiertz and Gnann's methods. For the objective comparison of the performances, we use an audio dataset of real recordings and the representative performance indicators. Before we compare the performances of the methods, we first optimize ${{\nu _k}}$ using an external dataset. \subsection{RWC dataset} For the performance evaluation, we have used real-world computing (RWC) music database (musical instrument sound database) \cite{goto2003rwc}. It consists of audio clips of 50 musical instruments, each of which contains variations of playing styles, pitch, and dynamics. The name and the playing styles of the instruments we have used for the experiment are listed in Table \ref{Table1_RWC}. The last two columns represent the hi-hat and snare drum sounds. Note that the RWC database provides three variations in the instrument manufacturer and the performer, and that we have used different variation from the test data with the same playing style for the spectral envelope training. As the second variation of recorder contains the sounds of alto recorder whereas the first variation contains the sounds of soprano recorder, it can occur mismatch in the spectral envelope. Similarly, the first and the second variations of harmonica contain blues harp harmonica and chromatic harmonica, respectively. However, because they show similarity in timbre, we have used the second variations for the envelope training. \begin{table*}[] \renewcommand{\arraystretch}{1.2} \caption{Experimental parameters} \label{Table1_RWC} \centering \begin{tabular}{|K{0.7in}|K{2.0in}|K{0.99in}|K{1.1in}|K{0.6in}|} \hline Instrument No. &Instrument name &Variation No. (Test) &Variation No. (Training) &Style\\ \hline 1 &Pianoforte &1 &2 &NOF\\ \hline 2 &Electric Piano (Hard Tone) &1 &2 &NOF\\ \hline 7 &Accordion (Keyboard) &1 &2 &NOF\\ \hline 8 &Harmonica &1 &2 &NOF\\ \hline 9 &Classic Guitar (Nylon String) &1 &2 &AFF\\ \hline 13 &Electric Guitar &1 &2 &LFF\\ \hline 14 &Electric Bass &1 &2 &PNF\\ \hline 18 &Contrabass (Wood Bass) &1 &2 &NOF\\ \hline 21 &Trumpet &1 &2 &M9F\\ \hline 22 &Trombone &1 &2 &C1F\\ \hline 23 &Tuba &1 &2 &NOF\\ \hline 24 &Horn &1 &2 &GNM\\ \hline 27 &Tenor Sax &1 &2 &NOF\\ \hline 29 &Oboe &1 &2 &NOF\\ \hline 30 &Bassoon (Fagotto) &1 &2 &NOF\\ \hline 31 &Clarinet &1 &2 &NOF\\ \hline 32 &Piccolo &1 &2 &NOF\\ \hline 33 &Flute &1 &2 &NOF\\ \hline 34 &Recorder &1 &2 &NOF\\ \hline 41 &Concert Drums 2 &2 &3 &Y3NO3\\ \hline 41 &Concert Drums 2 &2 &3 &SD1F3\\ \hline \end{tabular} \end{table*} To generate mixtures, we have cut an audio clip to multiple segments, each of which contains the sound of a single note. Then we have mixed the sounds of two instruments to have 10-second duration with 20 notes (10 notes per an instrument) placed at random positions. As drum sounds do not contain pitch information, a sound excerpt is selected and repeated ten times when they are mixed. \subsection{Evaluation metrics} We have used the signal-to-distortion ratio (SDR), signal-to-interference ratio (SIR), and signal-to-artifact ratio (SAR) to measure the quantitative performance of the separation methods. They are calculated using the BSS\_EVAL toolbox (http://bass-db.gforce.inria.fr /bss\_eval/) supported by \cite{vincent2006performance}. They are mathematically defined as \begin{equation} \label{Eq26} SDR = 20{\log _{10}}\left( {\frac{{|| {{s_{target}}} ||}}{{|| {{s_{interf}} + {s_{artif}}} ||}}} \right) \end{equation} \begin{equation} \label{Eq27} SIR = 20{\log _{10}}\left( {\frac{{|| {{s_{target}}} ||}}{{|| {{s_{interf}}} ||}}} \right) \end{equation} \begin{equation} \label{Eq28} SAR = 20{\log _{10}}\left( {\frac{{|| {{s_{target}} + {s_{interf}}} ||}}{{|| {{s_{artif}}} ||}}} \right) \end{equation} where ${s_{target}}$, ${s_{interf}}$, and ${s_{artif}}$ denote the target sound, interference, and artifact, respectively. As SIR and SAR have a trade-off relationship in the performance, we consider SDR as the representative performance value. \subsection{Experimental settings} FASST 2.0 provides many options to perform the source separation. Among the options, we assumed instantaneous mixing scenario with the fixed adaptability, while the rest options are set adaptive. Two types of time-frequency representations, {\it erb} (equivalent rectangular bandwidth) and {\it stft} (short-time Fourier transform), are tested as its options. Also, we evaluate Spiertz and Gnnan's mel-frequency cepstrum coefficient (MFCC) clustering-based method, NMF clustering-based method, and hierarchical clustering-based method. Table \ref{Table2_parameters} shows the evaluation parameters used for the experiment of the proposed method. The optimal number of bases may be dependent on the number of notes of an instrument. In our experiment, the number of notes in a mixture is 20 in total; however, it is impossible to recognize it in advance. In addition, a single note often requires multiple bases to be thoroughly reconstructed. For this reason, we use 40 bases in the first experiment, and later we observe and compare the performance transitions when the different number of bases is used. The LPC order is empirically determined to 4, but once it was above 2 and below 10, the separation quality did not vary dramatically. Since both our methods and the Spiertz and Gnann's methods require the iteration, the number of iterations is fixed to 100 for all methods for the fair comparison. The mixing weight $\alpha$ linearly increases from 0 to 1 with a step size of 0.01, whereas $\beta$ is fixed to zero in all cases. \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Experimental parameters} \label{Table2_parameters} \centering \begin{tabular}{|K{1.8in}|K{1.2in}|} \hline Parameter & Value \\ \hhline{|=|=|} Sampling rate (Hz) & 44,100 \\ \hline Frame size / Hop size & 4096 / 1024\\ \hline Number of iterations & 100 \\ \hline Number of bases (per instrument) & 20, 40, 100 \\ \hline LPC order ($M$) & 4 \\ \hline \end{tabular} \end{table} \subsection{Weight optimization} In this subsection, the weight ${{\nu _k}}$ in Eq. \ref{Eq24} is optimized using the ten pieces in the Bach 10 dataset \cite{duan2011soundprism}. The dataset contains real recordings of four instruments; violin, clarinet, saxophone, and bassoon. We have generated a total of sixty cases (six for each piece) where two out of four instrument sounds are linearly mixed. Note that the sounds are amplified or suppressed to have same energies in the mixture. We have analyzed the case where the weight is a function of mean activation ${{{\left\Vert {{{\bf{h}}_k}} \right\Vert}_1}}$. The assumption is that the bases of which spectral envelopes are close to the actual ones will have larger time activity in average. Figure \ref{Fig5_exponent} shows the performance transitions with the increase of the exponent $p$. Here, it is assumed that ${{\nu _k}} = {\left\{ {{{\left\Vert {{{\bf{h}}_k}} \right\Vert}_1}} \right\}^p}$. The envelopes are averaged with equal weights when $p=0$. It can be observed that the average SDR does not fluctuate severely when $p>2$ and is maximized when $p=5$. We use this value as the weight in the rest of the experiments. \begin{figure}[t] \centering \centerline{\includegraphics[width=3.3in]{Fig5.eps}} \caption{Average SDR value with the increase of exponent $p$.} \label{Fig5_exponent} \end{figure} \subsection{Performance comparison} Table \ref{Table3_performance} shows the performance of the conventional methods and the proposed methods. In this experiment, a total of 80 bases (40 for each instrument) are used for our methods and the Spiertz and Gnann's methods. The baseline algorithms of the FASST show the lowest performance in both SIR and SAR, resulting in the lowest SDR. On the contrary, the proposed informed approach shows the highest SIR, SAR, and SDR. This may be due to the aid of side-information which other methods do not use. Except for the informed approach, the proposed blind approach shows the highest SDR performance by showing the highest SIR preserving high SAR. Spiertz and Gnann's method also shows high SIR and SAR values, but their overall performance is severely degraded. For the further investigations on the performance comparison, we perform additional experiments by which we can examine the effect of the number of bases and the sparse initialization. \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Performances measured with the RWC database (dB)} \label{Table3_performance} \centering \begin{tabular}{|K{1.2in}||K{0.5in}|K{0.5in}|K{0.5in}|} \hline & SDR & SIR & SAR \\ \hhline{|=#=|=|=|} FASST (stft) & -0.22& 3.14& 7.65 \\ \hline FASST (erb) & -0.28& 2.93& 7.80\\ \hline Spiertz (hierarchical)& 2.71& 6.44& 10.15\\ \hline Spiertz (MFCC) & 2.72& 6.91& 9.89\\ \hline Spiertz (NMF) & 2.88& 6.51& 10.18\\ \hline Proposed (Informed)& 5.55& 9.84& 11.20 \\ \hline Proposed (Blind)& 3.16& 7.95& 8.88 \\ \hline \end{tabular} \end{table} Table \ref{Table4} shows how the SDRs change according to the variations in the initialization methods and the number of bases. Here, we refer to the initialization method using the uniform random sequence as {\it normal initialization} while the proposed initialization method presented in the section 3.1 is referred to as {\it sparse initialization}. Starting from 20 bases, which is the minimum because it is identical to the number of notes, to 100 bases, which is sufficient, we have tested our algorithms and the Spiertz and Gnann's algorithms. From the results of the proposed informed approach, we can confirm that its performance is not affected by the number of bases. Other blind approaches reveal that their performances tend to increase when we use more bases. In particular, the performance of the proposed blind approach with 20 normal initialized bases is highly enhanced when we increase the number of bases to 40. The sparse initialization partly covers the short of bases by reforming the bases into more meaningful shapes. Regardless of the number of bases, the use of sparse initialization improves the SDR performance. Overall, the proposed blind approaches tend to outperform the Spiertz and Gnann's methods. \begin{table}[] \centering \renewcommand{\arraystretch}{1.2} \caption{Effect of the number of bases and the initialization methods} \label{Table4} \begin{tabular}{|K{0.8in}|K{0.6in}||K{0.4in}|K{0.4in}|K{0.4in}|} \hline \multicolumn{2}{|K{1.4in}||}{\multirow{2}{*}{}} & \multicolumn{3}{K{1.5in}|}{Number of bases} \\ \cline{3-5} \multicolumn{2}{|K{1.4in}||}{} & 20 & 40 & 100 \\ \hhline{|==#=|=|=| \multicolumn{2}{|K{1.4in}||}{Spiertz (hierarchical)} & 2.52 & 2.71 & 2.96 \\ \hline \multicolumn{2}{|K{1.4in}||}{Spiertz (MFCC)} & 2.66 & 2.72 & 2.84 \\ \hline \multicolumn{2}{|K{1.4in}||}{Spiertz (NMF)} & 2.46 & 2.88 & 3.03 \\ \hline \multicolumn{2}{|K{1.4in}||}{Proposed (Informed)} & 5.56 & 5.55 & 5.59 \\ \hline \multirow{2}{*}{Proposed (Blind)} & Normal init. & 2.50 & 3.05 & 3.14 \\ \cline{2-5} & Sparse init. & 3.02 & 3.16 & 3.34 \\ \hline \end{tabular} \end{table} \section{Conclusion} In this paper, we presented novel source separation methods that exploit spectral envelope information in the spectrogram decomposition framework. To this end, the proposed method divided basis vectors into the spectral envelopes and the corresponding excitations using linear prediction. By enforcing constraints to the envelope part of the bases in every iteration, we could shape the bases to represent the desired instruments. Our first research assumed that we could obtain the instrument-specific envelopes through the provided audio clips. In the second part of our study, we extended the informed approach to the situations where the acquisition of the true instrument envelopes is impossible. We evaluated the performance of the proposed methods and verified that our methods outperform other conventional methods. \vspace{6pt}
\section{Introduction}\label{SECT:intro} The desingularization problem has been primarily studied in the context of differential operators, and more specifically, for linear differential operators with polynomial coefficients. The solutions of such an operator are called \emph{D-finite}~\cite{Stanley1980} or \emph{holonomic} functions. It is well known~\cite{Ince1926} that a singularity (e.g., a pole) at a certain point~$x_0$ of one of the solutions must be reflected by the vanishing (at~$x_0$) of the leading coefficient of the operator. The converse however is not necessarily true: not every zero of the leading coefficient polynomial induces a singularity of at least one function in the solution space. The goal of desingularization is to construct another operator, whose solution space contains that of the original operator, and whose leading coefficient vanishes only at the singularities of the previous solutions. Typically, such a desingularized operator will have a higher order, but a lower degree for its leading coefficient. In summary, desingularization provides some information about the solutions of a given differential equation. For linear ordinary differential and recurrence equations, desingularization has been extensively studied in~\cite{Abramov1999, Abramov2006, Chen2013, Chen2016, Barkatou2015}. Moreover, the authors of~\cite{Yi2017} develop algorithms for the multivariate case. As applications, the techniques of desingularization can be used to extend P-recursive sequences~\cite{Abramov1999}, certify the integrality of a sequence~\cite{Abramov2006}, check special cases of a conjecture of Krattenthaler~\cite{Zhang2016} and explain order-degree curves~\cite{Chen2013} for Ore operators. The authors of~\cite{Chen2016, Zhang2016} also give general algorithms for the Ore case. However, from a theoretical point of view, the story is not yet finished, in the sense that there is no order bound for desingularized operators in the Ore case. In this paper, we consider the desingularization problem in the first $q$-Weyl algebra. Our main contribution is to give an order bound (Theorem~\ref{THM:orderbound}) for desingularized operators, and thus derive an algorithm (Algorithm~\ref{ALGO:desinop}) for computing desingularized operators in the first $q$-Weyl algebra. In addition, an algorithm (Algorithm~\ref{ALGO:qWeylclosure}) is presented for computing a generating set of the first $q$-Weyl closure of a given $q$-difference operator. As an example, consider the $q$-holonomic sequence \[ f(n) = [n]_q := \frac{q^n-1}{q-1} \] that is a $q$-analog of the natural numbers. The minimal-order homogeneous $q$-recurrence satisfied by $f(n)$ is \[ (q^n-1)f(n+1) - (q^{n+1}-1)f(n) = 0, \] in operator notation: \begin{equation}\label{EQ:op1} \bigl((x-1) {\partial} - q x + 1\bigr) \cdot f(n) = 0, \end{equation} where $x = q^n$ and $ {\partial} \cdot f(n) = f(n + 1)$. When we multiply this operator by a suitable left factor, we obtain a monic (and hence: desingularized) operator of order~$2$: \begin{equation}\label{EQ:op2} \frac{1}{q x-1}\bigl( {\partial} - q\bigr)\bigl((x-1) {\partial} - q x + 1\bigr) = {\partial}^2 - (q+1) {\partial} + q. \end{equation} As it is typically done in the shift case~\cite{Abramov1999}, we view a $q$-difference operator as a tool to define a $q$-holonomic sequence. Alternatively, one could take the viewpoint of~\cite{Abramov2006} and study solutions of $q$-recurrences that are meromorphic functions in the complex plane (for this, let $q\in {\mathbb C}$ be transcendental), and whose poles are somehow related to the zeros of the leading coefficient. In that sense, the factor $x-1$ in~\eqref{EQ:op1} indicates that there may be a pole at $x=q$, but in fact, the solution $f(x)=\frac{x-1}{q-1}$ is an entire function and does not have any pole, which is in agreement with the fact that there exists a desingularized operator~\eqref{EQ:op2}. However, in contrast to the differential case, in the shift case one also has to take into account poles that are \emph{congruent}~\cite{Abramov2006} to a zero of the leading coefficient. We expect that the same phenomenon occurs in the $q$-case, but since our main interest is in sequences, we do not investigate it in more detail here. As an application, we study several instances of the colored Jones polynomial~\cite{GaroufalidisLe05,GaroufalidisSun,GaroufalidisKoutschan12a}, which is a $q$-holonomic sequence arising in knot theory and which is a powerful knot invariant. By inspecting this sequence for a particular given knot, one finds that all its entries seem to be Laurent polynomials, and not, as one would expect, more general rational functions in~$q$. By computing the corresponding desingularized operator, we can certify that the sequence under consideration actually is constituted of Laurent polynomials, and that no other denominators than powers of~$q$ can appear. \section{Rings of \texorpdfstring{$q$}{q}-difference operators} \label{SECT:ringqd} Throughout the paper, we assume that $ {\mathbb K}$ is a field of characteristic zero, and $q$ is transcendental over $ {\mathbb K}$. For instance, $ {\mathbb K}$ can be the field of complex numbers and $q$ a transcendental indeterminate. Let $ {\mathbb K}(q)[x]$ be the ring of usual commutative polynomials over~$ {\mathbb K}(q)$. The quotient field of $ {\mathbb K}(q)[x]$ is denoted by $ {\mathbb K}(q, x)$. Then we have the \emph{ring of $q$-difference operators with rational function coefficients} or \emph{$q$-rational algebra}~$ {\bK(q, x)[\pa]}$, in which addition is done coefficient-wise and multiplication is defined by associativity via the commutation rule \[ {\partial} f(x) = f(qx) {\partial} \ \ \text{ for each } f(x) \in {\mathbb K}(q, x). \] The variable $x$ acts on a function $g(x)$ by the usual multiplication, and the $q$-difference operator $ {\partial}$ acts on it by the \emph{$q$-dilation} with respect to $x$: $$ {\partial}(g(x)) = g(qx).$$ This ring is an Ore algebra~\cite{Robertz2014, Salvy1998}. Another ring is $ {\bK(q)[x][\pa]}$, which is a subring of~$ {\bK(q, x)[\pa]}$. We call it the \emph{ring of $q$-difference operators with polynomial coefficients} or the \emph{q-Weyl algebra}~\cite[Section 2.1]{Stavros2012}. Given $P \in {\bK(q)[x][\pa]} \setminus \{ 0 \}$, we can uniquely write it as \[ P = \ell_r {\partial}^r + \ell_{r-1} {\partial}^{r-1} + \cdots + \ell_0 \] with $\ell_0, \ldots, \ell_r \in {\mathbb K}(q)[x]$ and $\ell_r \neq 0$. We call~$r$ the \emph{order}, and~$\ell_r$ ~the \emph{leading coefficient} of $P$. They are denoted by~$\deg_{ {\partial}}(P)$ and~$ \operatorname{lc}_{ {\partial}}(P)$, respectively. We call~$\ell_0$ the \emph{trailing coefficient} of $P$. Without loss of generality, we assume that $\ell_0 \neq 0$ throughout the paper. Otherwise, let $t$ be the minimal index such that $\ell_t \neq 0$. Set $\tilde{P} = {\partial}^{-t} P$. Then the trailing coefficient of $\tilde{P}$ is $ {\partial}^{-t}(\ell_t)$, which is a nonzero polynomial in $ {\mathbb K}(q)[x]$. As a matter of convention, we say that the zero operator in $ {\bK(q)[x][\pa]}$ has order $-1$. Let $\sigma\colon {\mathbb K}(q)[x] \rightarrow {\mathbb K}(q)[x]$ be a ring automorphism that leaves the elements of~$ {\mathbb K}(q)$ fixed and $\sigma(x) = q x$. Assume that~$Q \in {\bK(q)[x][\pa]}$ is of order~$k$. A repeated use of the commutation rule yields \begin{equation} \label{EQ:productlc} \operatorname{lc}_{ {\partial}}(QP) = \operatorname{lc}_{ {\partial}}(Q) \si^{k}( \operatorname{lc}_{ {\partial}}(P)). \end{equation} Assume that $S$ is a subset of $ {\bK(q, x)[\pa]}$, then the left ideal generated by~$S$ is denoted by $ {\bK(q, x)[\pa]} S$. For an operator $P \in {\bK(q)[x][\pa]}$, we define the \emph{contraction ideal} or \emph{$q$-Weyl closure} of $P$: \[ \operatorname{Cont}(P) := {\bK(q, x)[\pa]} P \;\cap\; {\bK(q)[x][\pa]}. \] \section{Dispersion in the \texorpdfstring{$q$}{q}-case} \label{SECT:qdispersion} In this section, we define the dispersion of two polynomials in $ {\mathbb K}(q)[x]$ and present an algorithm for computing it, based on irreducible factorizations over the ring~$ {\mathbb K}[q][x]$. The dispersion in the $q$-case will be used in the next section for giving an order bound of a desingularized operator (Definition~\ref{DEF:desingularization}). \begin{lemma} \label{LEM:finite} The following claims hold: \begin{itemize} \item [(i)] If $p(x)$ is an irreducible polynomial in $ {\mathbb K}(q)[x]$ of positive degree with $p(0) \neq 0$, so is $p(q^\alpha x)$ for each $\alpha \in \bZ$. \item [(ii)] Let $p(x)$ be an irreducible polynomial in $ {\mathbb K}(q)[x]$ of positive degree with $p(0) \neq 0$. Then \[ \gcd(p(q^\alpha x), p(x)) = 1 \quad\text{for each } \alpha \in \bZ \backslash \{ 0 \}. \] \item [(iii)] Let $f(x), g(x)$ be two polynomials in $ {\mathbb K}(q)[x]$ with $f(0) \neq 0$. Then the set \begin{equation} \label{EQ:dispersionset} \{ \alpha \in {\mathbb N} \mid \deg_x(\gcd(f(q^\alpha x) , g(x))) > 0 \} \end{equation} is a finite set. \end{itemize} \begin{proof} (i) It follows from~\cite[Proposition 3]{Man1994}. (ii) Suppose that there exists $\alpha_0 \in \bZ \backslash \{ 0 \}$ such that $$\gcd(p(q^{\alpha_0} x), p(x)) \neq 1.$$ Since $p(x)$ is an irreducible polynomial in $ {\mathbb K}(q)[x]$, we have that $p(x) \mid p(q^{\alpha_0} x)$. We may write \begin{equation} \label{EQ:poly} p(x) = c_d x^d + c_{d - 1} x^{d -1} + \cdots + c_0, \end{equation} where $c_i \in {\mathbb K}(q)$, $0 \le i \le d$ with $d > 0$, and $c_0, c_d \neq 0$. Then \begin{equation} \label{EQ:shiftedpoly} p(q^{\alpha_0} x) = (c_d q^{d \alpha_0 }) x^d + (c_{d - 1} q^{(d -1) \alpha_0 }) x^{d - 1} + \cdots + c_0. \end{equation} Since $p(x) \mid p(q^{\alpha_0} x)$, we conclude from~\eqref{EQ:poly} and~\eqref{EQ:shiftedpoly} that \[ p(q^{\alpha_0} x) = q^{d \alpha_0} p(x). \] Comparing the constant coefficients of both sides in the above equation, it follows that \[ c_0 q^{d \alpha_0} = c_0. \] Since $c_0 \neq 0$, we have that $q^{d \alpha_0} = 1$, a contradiction to the fact that $q$ is not a root of unity of $ {\mathbb K}$. (iii) Suppose that~\eqref{EQ:dispersionset} is an infinite set. Then there exists an irreducible factor $p(x)$ of $f(x)$ such that \[ \gcd(p(q^\alpha x), g(x)) \neq 1 \quad\text{for infinitely many $\alpha \in {\mathbb N}$}. \] Since $g(x)$ only has finitely many distinct irreducible factors, it follows from (i) that \[ \gcd(p(q^{\alpha_1} x), p(q^{\alpha_2} x)) \neq 1 \quad\text{for some } \alpha_1 \neq \alpha_2 \in {\mathbb N}. \] Therefore, we have \[ \gcd(p(q^{\alpha_1 - \alpha_2} x), p(x)) \neq 1, \] a contradiction to (ii). \end{proof} \end{lemma} Based on the above lemma and~\cite[Definition 1]{Man1994}, we give the following definition. \begin{defn} \label{DEF:qdispersion} Let $f(x), g(x)$ be two polynomials in $ {\mathbb K}(q)[x]$ with $f(0) \neq 0$. The dispersion of $f(x)$ and $g(x)$ is given by \[ \operatorname{dis}(f(x), g(x)) := \max\; \{ \alpha \mid \alpha \in {\mathbb N}, \deg_x(\gcd(f(q^\alpha x) , g(x))) > 0 \} \cup \{0\}. \] \end{defn} We include $0$ in the above definition in order to guarantee that the dispersion is always defined, even for constant polynomials. The dispersion in the $q$-case is the largest integer $q$-shift such that the greatest common divisor of the shifted polynomial and the unshifted one is nontrivial. Specifically, assume that $f(x)$ has the following factorization: \[ f(x) = p_1^{e_1} \cdots p_m^{e_m}, \] where $p_1,$ \ldots, $p_m \in {\mathbb K}(q)[x] \setminus {\mathbb K}(q)$ are irreducible and pairwise coprime. It is straightforward to see from Definition~\ref{DEF:qdispersion} that \[ \operatorname{dis}(f(x), g(x)) = \max \{ \operatorname{dis}(p_i, g) \mid 1 \le i \le m \}. \] For example, the dispersion $$ \operatorname{dis}((x + 1) (4 x + q), (q^2 x +1) (q^3 x + q + 1)) = 2,$$ because $ \operatorname{dis}(x + 1, q^2 x + 1) = 2$. Similar to the shift case, the dispersion in the $q$-case can be computed by a resultant-based algorithm~\cite[Example 1]{Paule1999}. We have implemented it in Mathematica, but experiments suggest that it is inefficient in practice. For instance, consider \begin{align*} f(x) & = 5 (q x + 1) (x - 3 q) (x + 2) (x^3 - q x + 1) (2 q x^3 + 5), \\ g(x) & = f(q^4 x). \end{align*} The polynomial $f$ has coefficients in $\bZ[q]$, and has degree $9$ in $x$. The dispersion of $f$ and $g$ is $4$. Below is a table for the timings (in seconds) for the computation of dispersion of $f$ and $g$ by the resultant-based (\textbf{res}) algorithm and the factorization-based (\textbf{fac}) algorithm, respectively. For this purpose, the two polynomials were given in fully expanded form. \begin{center} \begin{tabular}{ c | c } \hline System & Mathematica \\ \hline res & 43.6006 \\ fac & 0.011015 \\ \hline \end{tabular} \end{center} Like~\cite{Man1994}, we also give an algorithm based on irreducible factorization over~$ {\mathbb K}[q][x]$. \begin{prop} \label{PROP:primitivedispersion} Let $f(x)$ be a primitive polynomial in $ {\mathbb K}[q][x]$ of positive degree with respect to $x$, and $f(0) \neq 0$. Then for each $\alpha \in \bZ$, we have \begin{itemize} \item [(i)] $f(q^\alpha x) = q^e g(x)$, where $g(x)$ is a primitive polynomial in $ {\mathbb K}[q][x]$ with the same degree as $f(x)$, $g(0) \neq 0$ and $e \in {\mathbb N}$. \item [(ii)] Let $f(x) = \sum_{i = 0}^d a_i x^i$ and $g(x) = \sum_{i = 0}^d b_i x^i$ be two polynomials such that $f(q^\alpha x) = q^e g(x)$ for some $e \in {\mathbb N}$. Then \[ q^{d \alpha} = \frac{a_0 b_d}{b_0 a_d}. \] \end{itemize} \end{prop} \begin{proof} (i) Assume that $f(x) = \sum_{i = 0}^d a_i x^i$ with $a_d, a_0 \neq 0$, $\gcd(a_d, \ldots, a_0) = 1$ in $ {\mathbb K}[q]$. Then \begin{equation} \label{EQ:qshift} f(q^\alpha x) = ( a_d q^{d \alpha}) x^d + (a_{d - 1} q^{(d - 1) \alpha}) x^{d - 1} + \cdots + a_0. \end{equation} Since $\gcd(a_d, \ldots, a_0) = 1$ in $ {\mathbb K}[q]$, we have that \[ \gcd(a_d q^{d \alpha}, a_{d - 1} q^{(d - 1) \alpha}, \ldots, a_0) = q^e \ \ \text{ for some } e \in {\mathbb N}. \] Thus, we can write $f(q^\alpha x) = q^e g(x)$, where $g(x)$ is a primitive polynomial in~$ {\mathbb K}[q][x]$ with the same degree as $f(x)$ and $g(0) \neq 0$. (ii) Since $f(q^\alpha x) = q^e g(x)$, it follows from~\eqref{EQ:qshift} that \begin{align*} \frac{a_0}{a_d q^{d \alpha}} & = \frac{q^e b_0}{q^e b_d} \\ & = \frac{b_0}{b_d}. \end{align*} Thus, we conclude that \[ q^{d \alpha} = \frac{a_0 b_d}{b_0 a_d}. \] \end{proof} Given $f(x), g(x) \in {\mathbb K}(q)[x]$, we may further assume that $f(x), g(x)$ are two polynomials in $ {\mathbb K}[q][x]$ by clearing their denominators. The above proposition gives a method to compute the dispersion of two primitive irreducible polynomials in $ {\mathbb K}[q][x]$. Below is the corresponding algorithm. \begin{algo} \label{ALGO:irrdispersion} Given two primitive irreducible polynomials $f, g \in {\mathbb K}[q][x]$ of positive degrees with respect to $x$ and $f(0) \neq 0$. Compute $ \operatorname{dis}(f, g)$. \begin{enumerate} \item Compute $d_1 = \deg_x(f)$, $d_2 = \deg_x(g)$. If $d_1 \neq d_2$, then return $0$. Otherwise, set $d = d_1$. \item Let $f = \sum_{i = 0}^d a_i x^i$ and $g = \sum_{i = 0}^d b_i x^i$. If $\frac{a_0 b_d}{b_0 a_d}$ is not a nonnegative power of $q^d$, then return $0$. Otherwise, set $\alpha$ to be the natural number such that $q^{d \alpha} = \frac{a_0 b_d}{b_0 a_d}$. \item Compute $h = \frac{f(q^{\alpha} x)}{a_d q^{d \alpha}} - \frac{g(x)}{b_d}$. If $h$ is not the zero polynomial, return $0$. Otherwise, return $\alpha$. \end{enumerate} \end{algo} The termination of the above algorithm is obvious. The correctness follows from Proposition~\ref{PROP:primitivedispersion}. \begin{ex} \label{EX: irrdispersion} Consider the following two primitive polynomials in $ {\mathbb K}[q][x]$: \begin{align*} f(x) &= q x^2 - 1, \\ g(x) &= q^5 x^2 - 1. \end{align*} Using the above algorithm, we find that $ \operatorname{dis}(f(x), g(x)) = 2$. \end{ex} Using the irreducible factorization over $ {\mathbb K}[q][x]$, we derive the following algorithm to compute the dispersion of two arbitrary polynomials in $ {\mathbb K}[q][x]$: \begin{algo} \label{ALGO:dispersion} Given $f(x), g(x) \in {\mathbb K}[q][x]$ with $f(0) \neq 0$, compute $ \operatorname{dis}(f, g)$. \begin{enumerate} \item{} [Initialize] If $\deg_x(f) < 1$ or $\deg_x(g) < 1$ then return $0$. Otherwise, set {\tt dispersion} $= 0$. \item{} [Factorization] Compute the set $\{f_i(x) \}$ and $\{g_j(x)\}$ of distinct primitive irreducible factors over $ {\mathbb K}[q]$ of positive degree in $x$ for $f(x)$ and $g(x)$, respectively. \item For each pair $(f_i(x), g_j(x))$ of these factors, use Proposition~\ref{PROP:primitivedispersion} to compute $\alpha = \operatorname{dis}(f_i(x), g_j(x))$. If $\alpha >$ {\tt dispersion}, then set {\tt dispersion}~$= \alpha$. \item Return {\tt dispersion}. \end{enumerate} \end{algo} The termination of the above algorithm is obvious. The correctness follows from Definition~\ref{DEF:qdispersion} and Proposition~\ref{PROP:primitivedispersion}. It is implemented in Mathematica. \begin{ex} \label{EX:dispersion} Consider the following two polynomials in $ {\mathbb K}[q][x]$: \begin{align*} f(x) &= (q x-1 ) (q x+1)(q x^2-1), \\ g(x) &= q^9 x^7 (q^2 x-1) (q^2 x+1)(q^5 x^2-1). \end{align*} They are already in factored form. Using the above algorithm, we find that $$ \operatorname{dis}(f(x), g(x)) = 2.$$ \end{ex} \section{Desingularization in the \texorpdfstring{$q$}{q}-Weyl algebra} \label{SECT:qdesing} We are now going to present algorithms for the $q$-Weyl closure (Algorithm~\ref{ALGO:qWeylclosure}) and for the desingularization of a $q$-difference operator (Algorithm~\ref{ALGO:desinop}). These algorithms are analogs of those in~\cite{Zhang2016} and use Gr\"obner basis computations. Hence, in practice, they are slower than algorithms based on linear algebra~\cite{Chen2013,Chen2016} (see also Section~\ref{SECT:application}), but their advantage is that also the degree with respect to~$q$ can be taken into account---a feature that will be essential for the examples presented in the next section. In this section, we consider the desingularization for the leading coefficient of a given $q$-difference operator. The trailing coefficient can be handled in a similar way. We summarize some terminologies given in~\cite{Chen2013, Chen2016, Zhang2016} by specializing the general Ore ring setting to the $q$-Weyl algebra. \begin{defn}\label{DEF:premovable} Let $P \in {\bK(q)[x][\pa]}$ with positive order, and~$p$ be a divisor of~$ \operatorname{lc}_{ {\partial}}(P)$ in~$ {\mathbb K}(q)[x]$. \begin{itemize} \item[(i)] We say that $p$ is \emph{removable} from $P$ at order $k$ if there exist~$Q \in {\bK(q, x)[\pa]}$ with order~$k$, and~$w, v \in {\mathbb K}(q)[x]$ with $\gcd(p, w) = 1$ in~$ {\mathbb K}(q)[x]$ such that $$QP \in {\bK(q)[x][\pa]} \quad \text{and} \quad \sigma^{-k}( \operatorname{lc}_{ {\partial}}(QP)) = \frac{w}{vp} \operatorname{lc}_{ {\partial}}(P).$$ We call $Q$ a \emph{$p$-removing operator for $P$ over $ {\mathbb K}(q)[x]$}, and $QP$ the corresponding \emph{$p$-removed operator}. \item[(ii)] A polynomial $p \in {\mathbb K}(q)[x]$ is simply called \emph{removable} from $P$ if it is removable at order $k$ for some $k \in {\mathbb N}$. Otherwise, $p$ is called \emph{non-removable} from $P$. \end{itemize} \end{defn} Note that every $p$-removed operator lies in $\operatorname{Cont}(P)$. \begin{ex} \label{EX:chyzak2010} Consider the following $q$-difference operator~\cite[Example 4.9]{Chyzak2010} of order $1$ in $ {\bK(q)[x][\pa]}$: \[ P = q^2 x (q^2 - x) {\partial} - (1 - x) (1 - q x). \] Set \[ Q = \frac{q^6}{x-1} {\partial}^2 + \frac{q^6+q^5-q^3-q^2}{x-1} {\partial} + \frac{q^5-q^3-q^2+1}{x-1}. \] Let $L = QP$. Then \[ \begin{array}{l@{\;}l@{\;}l} L & = & q^{12} x {\partial}^3 + q^6(q^5 x + q^4 x + q^3 x - q x - x - 1) {\partial}^2 +{}\\[4pt] & & (q-1) q^2 (q+1) (q^2+q+1) (q^3 x + q x - x-1) {\partial} +{} \\[4pt] & & (q-1)^2 (q+1) (q^2+q+1) (qx-1), \end{array} \] is a $(q^2 - x)$-removed operator for $P$ of order $3$. \end{ex} The following proposition provides a convenient form of $p$-removing operators over $ {\mathbb K}(q)[x]$. It is a special case of~\cite[Lemma 2.4]{Zhang2016} and also included in~\cite{Chen2013}. In Corollary~\ref{COR:xnonremovable}, we will use it to prove that $x$-removing operators do not exist. \begin{prop}\label{PROP:premovable} Let~$P \in {\bK(q)[x][\pa]}$ be a $q$-difference operator with positive order. Assume that~$p \in {\mathbb K}(q)[x]$ is removable from~$P$ at order~$k$. Then there exists a~$p$-removing operator for~$P$ over~$ {\mathbb K}(q)[x]$ of the form \[ \frac{p_0}{\sigma^{k}(p)^{d_0}} + \frac{p_1}{\sigma^{k}(p)^{d_1}} {\partial} + \cdots + \frac{p_{k}}{\sigma^{k}(p)^{d_{k}}} {\partial}^{k}, \] where $p_i$ belongs to $ {\mathbb K}(q)[x]$, $\gcd(p_i, \sigma^{k}(p)) = 1$ in $ {\mathbb K}(q)[x]$ or $p_i = 0$ for each $i = 0,$ $1,$ \ldots, $k$, and $d_k \geq 1$. \end{prop} In~\cite[Lemma 4]{Chen2013}, the authors give an order bound for a $p$-removing operator in the shift case. We find that the proof also applies to the $q$-difference case provided that $p$ is an irreducible polynomial in $ {\mathbb K}(q)[x]$ and $p(0) \neq 0$. We summarize it in the following lemma. \begin{lemma} \label{LEM:orderbound} Let $P$ be a nonzero operator in $ {\bK(q)[x][\pa]}$ of positive order with trailing coefficient~$\ell_0$. Assume that $p$ is an irreducible factor of $ \operatorname{lc}_{ {\partial}}(P)$ such that $p(0) \neq 0$ and $p^k$ is removable from $P$ for some $k \ge 1$. Then $p^k$ is removable from $P$ at order $ \operatorname{dis}(p, \ell_0)$. \end{lemma} \begin{proof} It is literally the same as~\cite[Lemma 4]{Chen2013}. \end{proof} Let $P = \sum_{i = 0}^r \ell_i {\partial}^i$ be a nonzero operator in $ {\bK(q)[x][\pa]}$ of positive order. We say that $P$ is $x$-primitive if $x \nmid \gcd(\ell_0, \ldots, \ell_r)$ in $ {\mathbb K}(q)[x]$. Gau\ss{'} lemma in the commutative case also holds for $x$-primitive operators. The proof is similar to that of~\cite[Lemma 3.4.8]{Zhang2017}. Here, we give an independent proof. \begin{lemma} \label{LEM:Gauss} Let $P$ and $Q$ be two operators in $ {\bK(q)[x][\pa]}$. If $P$ and $Q$ are $x$-primitive, so is $QP$. \end{lemma} \begin{proof} Suppose that $QP$ is not $x$-primitive. We may write \[ P = \sum_{i = 0}^r a_i {\partial}^i, \ \ Q = \sum_{i = 0}^s b_i {\partial}^i \ \ \text{ and } \ \ QP = \sum_{i = 0}^{r + s} c_i {\partial}^i, \] where all coefficients $a_i,b_i,c_i$ are polynomials in $ {\mathbb K}(q)[x]$. By assumption, we have $x \mid \gcd(c_0, \ldots, c_{r + s})$. Since $P$ and $Q$ are $x$-primitive, there exists $0 \le i_0 \le r$ and $0 \le j_0 \le s$ such that~$x \nmid a_{i_0}$ and $x \nmid b_{j_0}$. We may further assume that $i_0$ and $j_0$ are maximal with this property. Consider \begin{equation} \label{EQ:product} c_{i_0 + j_0} = \sum_{i + j = i_0 + j_0} a_i \si^{i}(b_j), \end{equation} By the maximality of $i_0$ and $j_0$, we have that $x \mid a_i$ and $x \mid b_j$ for $i > i_0$ and~$j > j_0$. Note that $x$ also divides $\si^{i}(b_j)$ for $j > j_0$ and $i = i_0 + j_0 - j$ because $\si^{i}(x) = q^i x$. Therefore, in the right side of equation~\eqref{EQ:product}, each summand is divisible by $x$ except $a_{i_0} \si^{i}(b_{j_0})$. By assumption, $x$ divides $c_{i_0 + j_0}$. Thus, $x$ divides $a_{i_0} \si^{i_0}(b_{j_0})$. It implies that $x \mid a_{i_0}$ or $x \mid \si^{i_0}(b_{j_0})$. Since $x \nmid a_{i_0}$, we have that~$x \mid \si^{i_0}(b_{j_0})$. If follows that $x \mid \si^{-i_0} (\si^{i_0}(b_{j_0})) = b_{j_0}$, a contradiction. \end{proof} \begin{cor} \label{COR:xnonremovable} Let $P$ be a nonzero operator in $ {\bK(q)[x][\pa]}$ of positive order. If~$x$ divides $ \operatorname{lc}_{ {\partial}}(P)$, then $x$ is non-removable from $P$. \end{cor} \begin{proof} Suppose that~$x$ is removable from $P$. By Definition~\ref{DEF:premovable}, there exists an $x$-removing operator~$Q$ such that $QP \in {\bK(q)[x][\pa]}$. By Proposition~\ref{PROP:premovable}, we can write \[ Q = \frac{p_0}{x^{d_0}} + \frac{p_1}{x^{d_1}} {\partial} + \cdots + \frac{p_{k}}{x^{d_{k}}} {\partial}^{k}, \] where~$p_i \in {\mathbb K}(q)[x]$, $\gcd(p_i, x) = 1$ in $ {\mathbb K}(q)[x]$, $i = 0, \ldots, k$ and $d_k \geq 1$. Let $$d = \max_{0 \leq i \leq k} d_i \quad \text{ and } \quad Q_1 = x^d Q.$$ Then the content $w$ of $Q_1$ with respect to $ {\partial}$ is $\gcd(p_0, \ldots, p_k)$ because $$\gcd(p_i, x) = 1 \ \ \text{ for each } \ \ i = 0, \ldots, k.$$ Let~$Q_1 = w Q_2.$ Then~$Q_2$ is the primitive part of~$Q_1$. In particular,~$Q_2$ is $x$-primitive. Then $$ w Q_2 P = x^d QP.$$ Since $\gcd(w, x) = 1$ and $QP \in {\bK(q)[x][\pa]}$, we have that $x$ divides the content of~$Q_2P$ with respect to $ {\partial}$. It follows that $Q_2P$ is not $x$-primitive, a contradiction to Lemma~\ref{LEM:Gauss}. \end{proof} Next, we give the definition of desingularized operators in the $q$-case, which is a special case of~\cite[Definition 3.1]{Zhang2016}. \begin{defn}\label{DEF:desingularization} Let $P \in {\bK(q)[x][\pa]}$ with order $r > 0$, and \begin{equation} \label{EQ:factor} \operatorname{lc}_{ {\partial}}(P) = p_1^{e_1} \cdots p_m^{e_m}, \end{equation} where $p_1,$ \ldots, $p_m \in {\mathbb K}(q)[x] \setminus {\mathbb K}(q)$ are irreducible and pairwise coprime. An operator $L \in {\bK(q)[x][\pa]} \setminus \{ 0 \} $ of order $k$ is called a {\em desingularized operator for~$P$} if $L \in \operatorname{Cont}(P)$ and \begin{equation} \label{EQ:dop} \si^{r - k}( \operatorname{lc}_{ {\partial}}(L)) = \frac{a}{b p_1^{k_1} \cdots p_m^{k_m}} \operatorname{lc}_{ {\partial}}(P) , \end{equation} where $a, b \in {\mathbb K}(q)$ with $b \neq 0$, and $p_i^{d_i}$ is non-removable from $P$ for each $d_i > k_i$, $i = 1,\ldots,m$. \end{defn} \begin{thm} \label{THM:orderbound} Let $P$ be a nonzero operator in $ {\bK(q)[x][\pa]}$ of order $r > 0$. Assume that $\ell_r$ and $\ell_0$ are the leading and trailing coefficient of $P$, respectively. Set $\ell_r = x^e \tilde{\ell_r}$ for some $e \in {\mathbb N}$ and $\tilde{\ell_r}(0) \neq 0$. Then there exists a desingularized operator of $P$ of order $r + \operatorname{dis}(\tilde{\ell_r}, \ell_0)$. \end{thm} \begin{proof} Assume that $\tilde{\ell_r} = p_1^{e_1} \cdots p_m^{e_m}$, where $p_1,$ \ldots, $p_m \in {\mathbb K}(q)[x] \setminus {\mathbb K}(q)$ are irreducible, pairwise coprime. For each $i \in \{1, \ldots, m \}$, let $k_i$ be the natural number such that $p_i^{k_i}$ is removable from $P$, but $p_i^{d_i}$ is non-removable from $P$ for each $d_i > k_i$. It follows from Lemma~\ref{LEM:orderbound} that $p_i^{k_i}$ is removable from $P$ at order $ \operatorname{dis}(p_i, \ell_0)$. On the other hand, if $e \ge 1$, then it follows from Corollary~\ref{COR:xnonremovable} that~$x^d$ is non-removable from $P$ for each $1 \le d \le e$. Above all, we conclude from~\cite[Lemma 4]{Chen2016} that there exists a desingularized operator of $P$ of order \[ r + \max \{ \operatorname{dis}(p_i, \ell_0) \mid 1 \le i \le m \}, \] which is equal to $r + \operatorname{dis}(\tilde{\ell_r}, \ell_0)$. \end{proof} \begin{ex} \label{EX:orderbound} Consider the $q$-difference operator from Example~\ref{EX:chyzak2010}: \[ P = q^2 x (q^2 - x) {\partial} - (1 - x) (1 - q x). \] By the above theorem, we find that $P$ has a desingularized operator of order \[ 1 + \operatorname{dis}(q^2 (q^2 - x), (1 - x) (1 - q x)) = 4. \] Actually, a desingularized operator of $P$ with minimal order is $L$ as specified in Example~\ref{EX:chyzak2010}, which is of order 3. \end{ex} In the above example, the order bound given by Theorem~\ref{THM:orderbound} is overshooting. However, we will see in the next section that it is tight in all examples from knot theory that we looked at. The first application of Theorem~\ref{THM:orderbound} is to derive an algorithm for computing the first $q$-Weyl closure of a $q$-difference operator. Let $P$ be a nonzero operator in $ {\bK(q)[x][\pa]}$ of order $r > 0$. For each $k \ge r$, we set \[ M_k(P) = \{T \in \operatorname{Cont}(P) \mid \deg_{ {\partial}}(T) \le k \}. \] It is straightforward to see that $M_k(P)$ is a finitely generated left $ {\mathbb K}(q)[x]$-submodule of $\operatorname{Cont}(P)$. We call it the \emph{$k$-th submodule} of $\operatorname{Cont}(P)$. If the operator $P$ is clear from the context, then we denote $M_k(P)$ simply by $M_k$. A generating set of $M_k$ can be derived by a syzygy computation over $ {\mathbb K}(q)[x]$~\cite[Section 3.3.2]{Zhang2017}. \begin{algo} \label{ALGO:qWeylclosure} Given a $q$-difference operator $P \in {\bK(q)[x][\pa]}$ of positive order. Compute a generating set of the $q$-Weyl closure of $P$. \begin{enumerate} \item Derive an order bound $k$ for a desingularized operator of $P$ by using Theorem~\ref{THM:orderbound}. \item Compute a generating set $S$ of $M_k$ by using Gr\"obner bases~\cite[Section 3.3.2]{Zhang2017}. \item Return $S$. \end{enumerate} \end{algo} The termination of the above algorithm is obvious. The correctness follows from~\cite[Theorem 3.2.3, Corollary 3.2.4]{Zhang2017}. \begin{ex} \label{EX:qWeylclosure} Consider the $q$-difference operator in Example~\ref{EX:chyzak2010}: \[ P = q^2 x (q^2 - x) {\partial} - (1 - x) (1 - q x). \] From Example~\ref{EX:orderbound}, we know that an order bound for a desingularized operator of $P$ is $4$. Using Gr\"obner bases, we can find a generating set of $M_4$. Since the size for the generating set of $M_4$ is large, we do not display it here. Instead, it follows from Example~\ref{EX:orderbound} that $P$ has a desingularized operator with order~3. By~\cite[Theorem 3.2.3, Corollary 3.2.4]{Zhang2017}, the $q$-Weyl closure of $P$ is also generated by~$M_3$. Through computation, we find that $M_3$ is generated by $\{P, L\}$, where~$L$ is specified in Example~\ref{EX:chyzak2010}. \end{ex} The second application of Theorem~\ref{THM:orderbound} is to give an algorithm for computing a desingularized operator of a given $q$-difference operator. Let $P$ be a nonzero operator in $ {\bK(q)[x][\pa]}$ of order $r > 0$. For each $k \ge r$, let \[ I_k = \left\{ [ {\partial}^k] T \mid T \in M_k(P) \right\} , \] where~$[ {\partial}^k] T$ denotes the coefficient of $ {\partial}^k$ in $T$. It is straightforward to see that~$I_k$ is an ideal of $ {\mathbb K}(q)[x]$. We call $I_k$ the \emph{$k$-th coefficient ideal} of $\operatorname{Cont}(P)$. By~\cite[Lemma 3.3.3]{Zhang2017}, we can compute a generating set of $I_k$ if a generating set of $M_k$ is given. Assume that $k$ is an order bound for desingularized operators of $P$. From~\cite[Theorem 3.3.6]{Zhang2017}, an element in $ I_k \setminus \{ 0 \}$ with minimal degree in $x$ will give rise to a desingularized operator of $P$. In~\cite[Remark 3.3.7]{Zhang2017}, the author describes how to use the Euclidean algorithm over $ {\mathbb K}(q)[x]$ to find an element $s$ in $ I_k \setminus \{ 0 \}$ with minimal degree in $x$. However, this will in general introduce a polynomial in~$ {\mathbb K}[q]$ when we clear the denominators in $s$. In the next section, we will need to find desingularized operators of some $q$-difference operators from knot theory, whose leading coefficient is of the form $q^a x^b$, where $a, b \in {\mathbb N}$. Thus, we shall also minimize the degree of $q$ among leading coefficients of desingularized operators of a given $q$-difference operator. Assume that $B \subset {\mathbb K}[q][x]$ is a generating set of $I_k$. Next, we give a method that finds an element in $ {\mathbb K}[q][x]$ of $I_k \setminus \{ 0 \}$ with minimal degree in $x$, which also has minimal degree in $q$ among nonzero elements of $\langle B \rangle$ in~$ {\mathbb K}[q][x]$ with minimal degree in $x$. \begin{prop} \label{PROP:gbmin} Let $B \subset {\mathbb K}[q][x]$ be a generating set of $I_k$. Assume that $G$ is a reduced Gr\"{o}bner basis of the ideal generated by $B$ over $ {\mathbb K}[q][x]$ with respect to the lexicographic order~$q \prec x$. Set $g$ to be the element in $G$ with minimal degree in $x$. Then $g$ is also an element in $I_k$ with minimal degree in $x$. \end{prop} \begin{proof} Assume that $f \in {\mathbb K}(q)[x]$ is an element in $I_k$ with minimal degree in $x$. Since $B = \{b_1, \ldots, b_\ell \}$ is a generating set of $I_k$, we have \[ f = c_1 b_1 + \ldots + c_\ell b_\ell, \] where $c_1, \ldots, c_\ell \in {\mathbb K}(q)[x]$. By clearing denominators in the above equation, it follows that \[ \tilde{f} = \tilde{c}_1 b_1 + \ldots + \tilde{c}_\ell b_\ell, \] where $\tilde{f} = c f$ and $c, \tilde{c}_i \in {\mathbb K}[q]$, $i = 1, \ldots, \ell$. Since $G$ is Gr\"{o}bner basis of the ideal generated by $B$ over $ {\mathbb K}[q][x]$, the head term of $\tilde{f}$ is divisible by~$g_i$ for some $g_i \in G$. By the choice of the term order, it is straightforward to see that $\deg_x(g_i) \le \deg_x(\tilde{f})$. On the other hand, the degree of $f$ in $x$ is equal to that of~$\tilde{f}$. Thus, $\deg_x(g_i) \le \deg_x(f)$. Since $g$ is the element in $G$ with minimal degree in $x$, we have \[ \deg_x(g) \le \deg_x(g_i) \le \deg_x(f). \] \end{proof} \begin{algo} \label{ALGO:desinop} Given a $q$-difference operator $P \in {\bK(q)[x][\pa]}$ of positive order. Compute a desingularized operator of $P$. \begin{enumerate} \item Derive an order bound $k$ for a desingularized operator of $P$ by using Theorem~\ref{THM:orderbound}. \item Compute a generating set $S$ of $M_k$ by using Gr\"obner bases~\cite[Section 3.3.2]{Zhang2017}. \item Compute a generating set in $ {\mathbb K}[q][x]$ of $I_k$ by using~\cite[Lemma 3.3.3]{Zhang2017}. \item Compute an element $g \in {\mathbb K}[q][x]$ of $I_k$ with minimal degree in $x$ by using Proposition~\ref{PROP:gbmin}. \item Tracing back to the computation of steps (3) and (4), one can find a~$q$-difference operator $L \in {\mathbb K}[q][x, {\partial}]$ of $\operatorname{Cont}(P)$ such that $ \operatorname{lc}_{ {\partial}}(L) = g$. Output~$L$. \end{enumerate} \end{algo} The termination of the above algorithm is evident. The correctness follows from~\cite[Theorem 3.3.6]{Zhang2017}. \begin{ex} \label{EX:desinop} Consider the $q$-difference operator in Example~\ref{EX:chyzak2010}: \[ P = q^2 x (q^2 - x) {\partial} - (1 - x) (1 - q x). \] \begin{enumerate} \item By Example~\ref{EX:orderbound}, we know that the minimal order for a desingularized operator of $P$ is~ $3$. \item Using Gr\"obner bases, we can find a generating set of~$M_3$. Since the size for the generating set of $M_3$ is large, we do not display it here. \item By~\cite[Lemma 3.3.3]{Zhang2017}, we find that $I_3$ \footnote{ By computation, we also find that $I_4 = \langle q^{18} x \rangle$. This is not a contradiction because $I_4 = \sigma(I_3)$ in $ {\mathbb K}(q)[x]$. } is generated by~$q^{12}x$. \item It is straightforward to see that $q^{12} x$ is the element in $I_3$ with minimal degree in $x$. \item Tracing back to the computation of steps (3) and (4), we find a $q$-difference operator $L \in {\mathbb K}[q][x, {\partial}]$ of $\operatorname{Cont}(P)$, which is exactly the operator in Example~\ref{EX:chyzak2010}. \end{enumerate} \end{ex} \section{Application to knot theory} \label{SECT:application} In the past years, $q$-difference equations arose naturally in quantum topology and knot theory. During the quest for better and better knot invariants---the ideal invariant would allow to distinguish all knots---the so-called \emph{colored Jones polynomial} was discovered. The name \emph{polynomial} is somewhat misleading, as this invariant consists actually of an infinite sequence of rational functions in $ {\mathbb Q}(q)$ or Laurent polynomials in $ {\mathbb Q}[q,q^{-1}]$. For the precise definition of the colored Jones polynomial we refer to~\cite{GaroufalidisLe05}, where it is proven that for each knot this infinite sequence satisfies a linear $q$-difference equation with polynomial coefficients, i.e., that the colored Jones polynomial is always a $q$-holonomic sequence. The same author formulated the following conjecture. \begin{conj}[\cite{Garoufalidis18}]\label{conj.Stavros} Let $J_{K}(n)\in {\mathbb Q}(q)$ denote the Jones polynomial of a knot~$K$, colored by the $n$-dimensional irreducible representation of $\mathfrak{sl}_2$ and normalized by $J_{\mathrm{Unknot}}(n)=1$. Then for the colored Jones polynomial, i.e., for the sequence $\bigl(J_K(n)\bigr)_{n\in {\mathbb N}}$ the following holds: \begin{enumerate} \item $(1-q^n)J_{K}(n)$ satisfies a bimonic recurrence relation, \item $J_{K}(n)$ does not satisfy a monic recurrence relation. \end{enumerate} \end{conj} Here, the notion \emph{bimonic} refers to the property that both the leading and the trailing coefficient are monic (in the sense of Corollary~\ref{COR:xnonremovable}, i.e., of the form $q^{an+b}$). Using desingularization, we can construct such bimonic recurrences, thereby confirming part (1) of the conjecture in some particular instances. This shows that the colored Jones polynomial is actually a sequence of Laurent polynomials, even when the sequence is extended to the negative integers, by applying the recurrence into the other direction. The knot-theoretic interpretation of this phenomenon is that the substitution $q\to q^{-1}$ corresponds to reversing the orientation of the knot. \begin{figure} \begin{center} \includegraphics[height=120pt]{TwistKnot.pdf} \qquad\qquad \includegraphics[height=120pt]{Crossings.pdf} \end{center} \caption{Knot diagram of the twist knot $K^{\mathrm{twist}}_p$ (left), where the box represents repeated half-twists, according to the legend on the right.} \label{FIG:twist} \end{figure} \begin{figure} \begin{center} \includegraphics[height=120pt]{PretzelKnot.pdf} \end{center} \caption{Knot diagram of the $(-2,3,2p+3)$-pretzel knot $K^{\mathrm{pretz}}_p$; again the boxes represent repeated half-twists as described in Fig.~\ref{FIG:twist}.} \label{FIG:pretz} \end{figure} We investigate the colored Jones polynomials of two families of knots that appeared previously in the literature: twist knots~\cite{GaroufalidisSun} and pretzel knots~\cite{GaroufalidisKoutschan12a}, see Figures~\ref{FIG:twist} and~\ref{FIG:pretz}. While it is very difficult to compute the colored Jones polynomial for an arbitrary given knot, one can give simpler formulas for these two families. For example, the $n$-th entry $J^{\mathrm{twist}}_p(n)$ of the colored Jones polynomial for the $p$-th twist knot $K^{\mathrm{twist}}_p$ is given by the double sum \[ \sum_{k=0}^n \sum_{j=0}^k (-1)^{j+1} q^{k+pj(j+1)+j(j-1)/2} \bigl(q^{2 j+1}-1\bigr) \frac{\bigl(q^{1-n};q\bigr)_{\!k} \, \bigl(q^{1+n};q\bigr)_{\!k} \, \bigl(q^{k-j+1};q\bigr)_{\!j}}{\bigl(q;q\bigr)_{\!k+j+1}}. \] From this representation it is a routine task (but possibly computationally expensive) to compute a $q$-holonomic recurrence equation for $J^{\mathrm{twist}}_p(n)$ when $p$ is a fixed integer. This can be done either by $q$-holonomic summation methods (as implemented in the \texttt{qMultiSum} package~\cite{Riese03} or \texttt{HolonomicFunctions} package~\cite{Christoph2010}) or by guessing (as implemented in the \texttt{Guess} package~\cite{Kauers2009a}). For example, for $p=-1$ we obtain the inhomogeneous $q$-recurrence \begin{align*} & q^{2 n+2} \left(q^{n+2}-1\right) \left(q^{2 n+1}-1\right) J^{\mathrm{twist}}_{-1}(n+2) \;+\; \left(q^{n+1}-1\right)^2 \left(q^{n+1}+1\right) \bigl(q^{n+1}+{} \\ & +q^{2 n+1}+q^{2 n+3}+q^{3 n+3}-q^{4 n+4}-1\bigr) J^{\mathrm{twist}}_{-1}(n+1) \;+\; q^{2n+2} \left(q^n-1\right) \\ & \times\left(q^{2 n+3}-1\right) J^{\mathrm{twist}}_{-1}(n) \;=\; q^{n+1} \left(q^{n+1}+1\right) \left(q^{2 n+1}-1\right) \left(q^{2 n+3}-1\right). \end{align*} Garoufalidis and Sun have computed such an inhomogeneous $q$-recurrence equation for each twist knot $K^{\mathrm{twist}}_p$ with $-15\leq p\leq15$; the recurrences are available in electronic form from~\cite{GaroufalidisSun}. Similarly, the $q$-recurrences satisfied by $J^{\mathrm{pretz}}_p(n)$ for $-5\leq p\leq5$ are available from~\cite{GaroufalidisKoutschan12a}. By observing that in each recurrence the term $f(n+d)$ has (among others) a factor $(q^{n+d}-1)$, it is reasonable to perform the substitution $f(n)\to f(n)/(q^n-1)$, according to Conjecture~\ref{conj.Stavros}. In the rest of this section, we only use operators that were normalized in this way. We have implemented Algorithms~\ref{ALGO:qWeylclosure} and~\ref{ALGO:desinop} in Mathematica by using the packages \texttt{HolonomicFunctions}~\cite{Christoph2010} and \texttt{Singular}~\cite{Kauers2007}; the source code and a demo notebook are freely available as part of the supplementary electronic material~\cite{ElectronicYZ}. Note that we also modify Algorithm~\ref{ALGO:desinop} for desingularization of the trailing coefficient of a given $q$-difference operator in the corresponding package and notebook. We give an example about finding desingularized operators in the context of knot theory. \begin{ex} \label{EX:knots} We consider the $q$-difference operators that correspond to the homogeneous parts of the recurrences for the colored Jones polynomials of the knots $K^{\mathrm{twist}}_{-1}$, $K^{\mathrm{twist}}_{2}$, $K^{\mathrm{pretz}}_{-2}$, and $K^{\mathrm{pretz}}_{2}$. For example, the operator $P^{\mathrm{twist}}_{-1}$ corresponds, after normalization, to the left-hand side of the above $q$-recurrence for $J^{\mathrm{twist}}_{-1}(n)$: \begin{align*} P^{\mathrm{twist}}_{-1} ={}& q^2 x^2 \bigl(q x^2-1\bigr) {\partial}^2 - {} \\ & (q x-1) (q x+1) \bigl(q^4 x^4-q^3 x^3-q^3 x^2-q x^2-q x+1\bigr) {\partial} +{} \\ & q^2 x^2 \bigl(q^3 x^2-1\bigr) \end{align*} For space reasons, the other three operators are displayed in abbreviated form only: \begin{align*} P^{\mathrm{twist}}_{2} &= (qx-1) (qx+1) (qx^2-1) {\partial}^3 + \ell_{1,2} {\partial}^2 + \ell_{1,1} {\partial} + \ell_{1,0}, \\ P^{\mathrm{pretz}}_{-2} &= (qx-1)(qx+1)(qx^2-1) {\partial}^3 + \ell_{2,2} {\partial}^2 + \ell_{2,1} {\partial} + \ell_{2,0}, \\ P^{\mathrm{pretz}}_{2} &= q^{59} (qx-1) (q^2x+1) {\partial}^6 + \ell_{3,5} {\partial}^5 + \ell_{3,4} {\partial}^4 + \cdots + \ell_{3,0}, \end{align*} where $\ell_{i,j} \in {\mathbb K}[q][x]$. We now apply our desingularization algorithm to each of the four operators. \begin{enumerate} \item By using Theorem~\ref{THM:orderbound}, we obtain an order bound~$b$ for a desingularized operator (see Table~\ref{TAB:exknots}). \item Using Gr\"obner bases, we can find a generating set of~$M_b$. Since the size of this generating set is large, we do not display it here. \item By~\cite[Lemma 3.3.3]{Zhang2017}, we find the generator of~$I_b$ (see Table~\ref{TAB:exknots}). \item It is straightforward to see that in each of the four cases, this single generator is the element in $I_b$ with minimal degree in~$x$. \item Tracing back to the computation of steps (3) and (4), we find a $q$-difference operator $L \in {\mathbb K}[q][x, {\partial}]$ of $\operatorname{Cont}(P)$, which is of the following form: \begin{align*} L^{\mathrm{twist}}_{-1} & = q^4 x^2 {\partial}^3 - \left(q^9 x^4 - q^7 x^3 - q^5 x^3 - q^5 x^2 - q^4 x^2 - q^2 x + 1\right) {\partial}^2 -{} \\ & \qquad q^4 x \left(q^4 x^4 - q^3 x^3 - q^3 x^2 - q^2 x^2 - q^2 x - x + q\right) {\partial} + q^7 x^3, \\ L^{\mathrm{twist}}_{2} &= {\partial}^5 + p_{1,4} {\partial}^4 + p_{1,3} {\partial}^3 + \cdots + p_{1,0}, \\ L^{\mathrm{pretz}}_{-2} &= {\partial}^5 + p_{2,4} {\partial}^4 + p_{2,3} {\partial}^3 + \cdots + p_{2,0}, \\ L^{\mathrm{pretz}}_{2} &= {\partial}^{10} + p_{3,9} {\partial}^9 + p_{3,8} {\partial}^8 + \cdots + p_{3,0}, \end{align*} where $p_{i,j} \in {\mathbb K}[q][x]$. \end{enumerate} We observe that in all four examples the minimal order for desingularized operators matches with the predicted order bound, i.e., the bound is tight in these cases. This can be seen by inspecting the $(b-1)$-st coefficient ideal~$I_{b-1}$ (see Table~\ref{TAB:exknots}). We conclude that the sequences that are annihilated by the four operators, respectively, consist indeed of (Laurent) polynomials, provided that the initial values have this property as well. \end{ex} \begin{table} \setlength{\tabcolsep}{10pt} \begin{center} \begin{tabular}{l|cccc} & $P^{\mathrm{twist}}_{-1}$ & $P^{\mathrm{twist}}_{2}$ & $P^{\mathrm{pretz}}_{-2}$ & $P^{\mathrm{pretz}}_{2}$ \\[0.5ex] \hline \rule{0pt}{12pt}order bound $b$ & 3 & 5 & 5 & 10 \\[1ex] generator of $I_b$ & $I_3=\langle x^2\rangle$ & $I_5=\langle 1\rangle$ & $I_5=\langle 1\rangle$ & $I_{10}=\langle 1\rangle$ \\[1ex] generator of $I_{b-1}$ & & $\langle q^3x^2-1 \rangle$ & $\langle q^3x^2-1 \rangle$ & $\langle q^4x-1 \rangle$ \end{tabular} \end{center} \caption{Computations for Example~\ref{EX:knots}} \label{TAB:exknots} \end{table} \begin{ex} \label{EX:knots2} By applying our desingularization algorithm to the unnormalized $q$-recurrences of $J^{\mathrm{twist}}_{p}(n)$ for the same values of~$p$ as in the previous example, we can prove that in these instances the operators are not completely desingularizable, therefore confirming part (2) of Conjecture~\ref{conj.Stavros}. \end{ex} Since Algorithms~\ref{ALGO:qWeylclosure} and~\ref{ALGO:desinop} involve Gr\"obner bases computations, it is rather inefficient to find desingularized operators when the size of the given $q$-difference operator is large. Alternatively, we may apply guessing~\cite{Kauers2009a} to compute a desingularized operator of a given $q$-difference operator, once we derive an order bound by Theorem~\ref{THM:orderbound}. In order to illustrate the guessing approach, we focus on a slightly modified problem, namely that of finding \emph{bimonic recurrence equations}: we want to completely desingularize both the leading and the trailing coefficient, i.e., after desingularization these two coefficients should have the form $q^{an+b}$ for some integers $a,b\in {\mathbb N}$. The existence of such a recurrence equation certifies that the bi-infinite sequence $\bigl(f(n)\bigr){}_{n\in\bZ}$ has only Laurent polynomial entries. Note that this approach is also suited for inhomogeneous recurrences. It works as follows: assume we are given a (possibly inhomogeneous) recurrence \[ \underbrace{p_{-1}(q,q^n) + \sum_{i=0}^r p_i(q,q^n) f(n+i)}_{\textstyle =: R(n)} = 0, \] with $r\geq0$ and $p_i\in {\mathbb K}[q,q^n]$ for $-1\leq i\leq r$. Define the polynomial $c(q,q^n)\in {\mathbb K}[q,q^n]$ by \[ c(q,q^n) = \frac{ \operatorname{lcm}\bigl(p_0(q,q^n),p_r(q,q^n)\bigr)}{q^{an+b}} \] with integers $a,b\in {\mathbb N}$ chosen such that $c(q,q^n)$ is neither divisible by~$q$ nor by~$q^n$. The goal is to determine polynomials $u_i(q,q^n)\in {\mathbb K}[q,q^n]$ such that the coefficients $\ell_i(q,q^n)$, $-1\leq i\leq r+s$, in the linear combination \[ \sum_{i=0}^s u_i(q,q^n) R(n+i) = \ell_{-1}(q,q^n) + \sum_{i=0}^{r+s} \ell_i(q,q^n)f(n+i) \] are all divisible by $c(q,q^n)$. Hence, we make an ansatz for the coefficients of the linear combination, instead of trying to guess the desingularized operator directly. The latter would be much more costly to compute (compare the number of green dots with the number of blue dots in Figure~\ref{FIG:support}). The procedure is sketched in Algorithm~\ref{ALGO:guess}. We have implemented it in Mathematica; the source code and a demo notebook are freely available as part of the supplementary electronic material~\cite{ElectronicCK}. \newpage \begin{algo} \label{ALGO:guess} Given a recurrence $R(n)=p_{-1}(q,q^n) + \sum_{i=0}^r p_i(q,q^n) f(n+i)$ and a factor $c(q,q^n)$ that is to be removed. Compute $u_i\in {\mathbb K}[q,q^n]$ such that $\sum_{i=0}^s u_i(q,q^n)R(n+i) = c(q,q^n)\bigl(\ell_{-1}(q,q^n)+\sum_{i=0}^{r+s} \ell_i(q,q^n)f(n+i)\bigr)$ for some polynomials $\ell_i\in {\mathbb K}[q,q^n]$. \begin{enumerate} \item Make an ansatz of the form $A=\sum_{i=0}^s \sum_{j=e_i}^{d_i} c_{i,j}(q) q^{jn} R(n+i)$ (one may note that the coefficients $c_{0,j}$ and $c_{s,j}$ are already prescribed (up to a constant multiple in $ {\mathbb K}(q)$) by the choice of $c(q,q^n)$. \item Write $A$ in the form $A=a_{-1}(q,q^n)+\sum_{i=0}^{r+s} a_i(q,q^n) f(n+i)$. \item For $-1\leq i\leq r+s$ compute the remainder of the polynomial division of $a_i(q,q^n)$ by $c(q,q^n)$, regarded as polynomials in~$q^n$. \item Perform coefficient comparison in these remainders with respect to~$q^n$. \item Solve the resulting linear system over $ {\mathbb K}(q)$ for the unknowns $c_{i,j}\in {\mathbb K}[q]$ (we may clear denominators since the system is homogeneous). \item Return $u_i(q,q^n)=\sum_{j=e_i}^{d_i} c_{i,j}(q) q^{jn}$. \end{enumerate} \end{algo} \begin{figure} \begin{center} \includegraphics[width=0.9\textwidth]{support_pretz_3.pdf} \end{center} \caption{$q^n$-support of the coefficients $p_{-1},\dots,p_9\in {\mathbb Q}[q,q^n]$ of the inhomogeneous $q$-recurrence for $K^{\mathrm{pretz}}_3$ (red), $q^n$-support of the coefficients $u_0,\dots,u_7$ (green), and $q^n$-support of the resulting bimonic recurrence (blue), represented by the coefficients $\ell_{-1},\dots,\ell_{16}$; the horizontal axis gives the index of the coefficient, the vertical axis the exponent of~$q^n$.} \label{FIG:support} \end{figure} It is interesting to note that our computed bimonic recurrences reveal certain symmetries in their coefficients, more precisely, they are kind of palindromic. For example, the bimonic $q$-recurrence that we found for $J^{\mathrm{pretz}}_{-2}(n)$, written in the form \[ \sum_{j=0}^9 \ell_{-1,j}(q) q^{jn} + \sum_{i=0}^5 \sum_{j=0}^9 \ell_{i,j}(q) q^{jn} f(n+i) \] has the following palindromicity properties ($0\leq i\leq 5$, $0\leq j\leq 9$). \[ \ell_{i,j} = q^{5j-i-20} \ell_{5-i,9-j} \quad\text{and}\quad \ell_{-1,j} = -q^{5j-25} \ell_{-1,10-j}. \] This phenomenon is illustrated in Table~\ref{TAB:pretz-2}. It is also visible in Figure~\ref{FIG:support} but on a different example. The occurrence of palindromic operators in the context of knot theory has been studied in more detail in~\cite{GaroufalidisKoutschan13}. Indeed, if we use the bimonic recurrence to define the sequence $f(n)=(q^n-1)J^{\mathrm{pretz}}_{-2}(n)$ for $n\leq0$ then we see that this sequence is palindromic: \[ f(n) = -q^n \, f(-n) \quad\text{for all }n\in {\mathbb N}. \] \begin{table} \[ \begin{array}{@{}l|r@{\,\cdot\,}lr@{\,\cdot\,}lr@{\,\cdot\,}lr@{\,\cdot\,}lr@{\,\cdot\,}lr@{\,\cdot\,}lr@{\,\cdot\,}l@{}} & \multicolumn{2}{c}{1} & \multicolumn{2}{c}{f(n)} & \multicolumn{2}{c}{f(n+1)} & \multicolumn{2}{c}{f(n+2)} & \multicolumn{2}{c}{f(n+3)} & \multicolumn{2}{c}{f(n+4)} & \multicolumn{2}{c}{f(n+5)} \\[0.5ex] \hline \rule{0pt}{12pt} q^{0n} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & -1 & 2^4 & 1 & 2^3 & \multicolumn{2}{c}{} \\ q^{1n} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & -1 & 2^{12} & 18 & 2^7 & -1 & 2^1 & \;1 & 2^0 \\ q^{2n} & 1 & 2^9 & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & 33 & 2^{10} & 13 & 2^7 & 24 & 2^5 & \multicolumn{2}{c}{} \\ q^{3n} & 153 & 2^8 & \multicolumn{2}{c}{} & 1 & 2^{16} & 5 & 2^{12} & 177 & 2^9 & 3 & 2^9 & \multicolumn{2}{c}{} \\ q^{4n} & 93 & 2^{11} & \multicolumn{2}{c}{} & -1 & 2^{17} & 89 & 2^{13} & 3 & 2^{14} & 3 & 2^{13} & \multicolumn{2}{c}{} \\ q^{5n} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & 3 & 2^{17} & 3 & 2^{17} & 89 & 2^{15} & -1 & 2^{18} & \multicolumn{2}{c}{} \\ q^{6n} & -93 & 2^{16} & \multicolumn{2}{c}{} & 3 & 2^{18} & 177 & 2^{17} & 5 & 2^{19} & 1 & 2^{22} & \multicolumn{2}{c}{} \\ q^{7n} & -153 & 2^{18} & \multicolumn{2}{c}{} & 24 & 2^{19} & 13 & 2^{20} & 33 & 2^{22} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} \\ q^{8n} & -1 & 2^{24} & 1 & 2^{20} & -1 & 2^{20} & 18 & 2^{25} & -1 & 2^{29} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} \\ q^{9n} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & 1 & 2^{27} & -1 & 2^{27} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} & \multicolumn{2}{c}{} \\ \end{array} \] \caption{Coefficients of the bimonic $q$-recurrence for $J^{\mathrm{pretz}}_{-2}(n)$; for space reasons only the evaluations for $q=2$ are given. In order to reveal the underlying symmetry, common powers of~$q$ are kept as powers of~$2$; for example, the entry $24\cdot2^5$ in the last-but-one column comes from the coefficient of $q^{2n}f(n+4)$ which is $q^5(q^4+q^3-q+2)$. The first column corresponds to the inhomogeneous part.} \label{TAB:pretz-2} \end{table} We have applied Algorithm~\ref{ALGO:guess} to all recurrences associated to the twist knots $K^{\mathrm{twist}}_p$ for $-14\leq p\leq15$ and to some of the pretzel knots $K^{\mathrm{pretz}}_p$. All these results can be found in the supplementary electronic material~\cite{ElectronicCK}. \section{Conclusion} \label{SECT:conclusion} In this paper, we determine a generating set of the $q$-Weyl closure of a given univariate $q$-difference operator, and compute a desingularized operator whose leading coefficient has minimal degree in~$q$. Moreover, we use our algorithms to certify that several instances of the colored Jones polynomial are Laurent polynomial sequences. A challenging topic for future research would be to consider the corresponding problems in the multivariate case. Another direction of research we want to consider in the future is the desingularization problem for linear Mahler equations~\cite{Mahler1929}, which attracted quite some interest in the computer algebra community recently, see for example~\cite{Chyzak2016}. Mahler equations arise in the study of automatic sequences, in the complexity analysis of divide-and-conquer algorithms, and in some number-theoretic questions. \paragraph{Acknowledgment} The authors would like to thank Stavros Garoufalidis for providing the examples of Section~\ref{SECT:application} and for enlightening discussions on the knot theory part. We are also grateful to the anonymous referee for the detailed report and for numerous valuable comments. \bibliographystyle{abbrv}
\section{Introduction} \label{sec:Introduction} Supersymmetric field theories have attracted great attention because they provide a deep insight about the non-perturbative physics~\cite{Seiberg:1994rs, Seiberg:1994aj, Seiberg:1994pq} and have a close relation with the gravitational theory~\cite{Maldacena:1997re}. The lattice simulations are promising approaches to obtain a further understanding of them. However, it is generally difficult to use the standard Monte Carlo techniques for the lattice supersymmetric theories on account of the sign problem, and the theories with the supersymmetry breaking may be the most difficult cases as suggested from the vanishing Witten index~\cite{Witten:1982df}. In this paper, we apply the tensor network approach, which is free of the sign problem, to the two-dimensional lattice $\mathcal{N}=1$ Wess--Zumino model in order to make a breakthrough on the issue. The two-dimensional $\mathcal{N}=1$ Wess--Zumino model is a supersymmetric theory in which a real scalar interacts with a Majorana fermion via the Yukawa term originate from the superpotential~\cite{Wess:1974tw}. The supersymmetry is spontaneously broken for the supersymmetric $\phi^4$ theory in a finite volume~\cite{Witten:1982df}, and the Witten index becomes zero because the fermion Pfaffian has both the positive and negative signs. For the infinite volume case, the absence of the non-renormalization theorem suggests that the breaking may occur even at the perturbative level~\cite{Bartels:1983wm, Synatschke:2009nm}, and the theory has a rich phase structure which should be clarified by numerical methods free from the sign problem. Although the lattice regularization generally breaks the $\mathcal{N}=1$ supersymmetry for the interacting theories in contrast to the case of $\mathcal{N}=2$ model~\cite{ Cecotti:1982ad, Sakai:1983dg, Kikukawa:2002as, Giedt:2004qs, Kadoh:2010ca},\footnote{ Non-local formulations of the Wess--Zumino model have been studied in refs.~\cite{ Dondi:1976tx, Kadoh:2009sp, Asaka:2016cxm, DAdda:2017bzo} } it is known that the breaking term caused by the lattice cut-off disappears in the continuum limit for an appropriate lattice action at least in the perturbation theory~\cite{Golterman:1988ta}. In the action, the Wilson terms are included in both the fermion and the boson sectors, so that the supersymmetry is exactly realized in the free-theory limit. Some numerical studies have been already done in the low-dimensional Wess--Zumino model~\cite{ Beccaria:1998vi, Catterall:2001fr, Beccaria:2004pa, Giedt:2005ae, Bergner:2007pu, Kastner:2008zc, Kawai:2010yj, Wozar:2011gu, Steinhauer:2014yaa}. In our study we use the tensor network approach to investigate the $\mathcal{N}=1$ supersymmetric model much deeper. The tensor renormalization group (TRG) is a coarse-graining algorithm for tensor networks, which is based on the singular value decomposition (SVD). The TRG was originally introduced in a two-dimensional classical spin model~\cite{Levin:2006jai}. Since the TRG was extended to the Grassmann TRG for models including Grassmann variables~\cite{Gu:2010yh,Gu:2013gba}, some studies of fermionic systems have been reported so far. In two-dimensional quantum field theories, it was already applied to the lattice $\phi^{4}$ theory~\cite{Shimizu:2012wfa} and to the lattice Schwinger model~\cite{Shimizu:2014uva,Shimizu:2014fsa} and the lattice $N_{\mathrm{f}}=1$ Gross--Neveu model~\cite{Takeda:2014vwa}, which are Dirac fermion systems. For the lattice $\mathcal{N}=1$ Wess--Zumino model, we have to clarify a method to construct a tensor network representation for the Majorana fermions with the Yukawa-type interaction and for the case of next-nearest-neighbor interacting bosons which originate from the Wilson term. In this paper, we show that the partition function of the lattice $\mathcal{N}=1$ Wess--Zumino model can be expressed as a tensor network for any superpotential and any value of the Wilson parameter $r$. Refining the known method for the Dirac fermions~\cite{Takeda:2014vwa}, we present a way of making a tensor network representation for Majorana fermions. For the boson action, we can change it to one with up to nearest-neighbor interactions by introducing two auxiliary fields. Then we also show a tensor network representation for bosons with a new discretization scheme. In order to test our formulation, we compute the Witten index by using the Grassmann TRG. Although we give a method of constructing tensors for any interacting case, in numerical test we devote ourselves to the free Wess--Zumino model, which is the most suitable test bed for a tensor network representation. This is because non-trivial structures of tensor arise from the hopping terms in the lattice action. This point will be discussed along with the details of the tensor network representation in the main part of this paper. The computation is done with $r=1/\sqrt{2}$, so that one of the two auxiliary fields is decoupled to reduce the computational cost. This paper is organized as follows. We first recall the two-dimensional $\mathcal{N}=1$ Wess--Zumino model and its lattice version with the detailed notations in section~\ref{sec:Model}. In section~\ref{sec:TensorNetwork}, tensor network representation for the fermion part and the boson part are individually constructed. By combining those two results, the tensor network representation for the total partition function is also given. Section~\ref{sec:Results} shows the numerical results for the free case, and we compare them with the exact ones. A summary and a future outlook are given in section~\ref{sec:Summary}. \section{Two-dimensional $\mathcal{N}=1$ Wess--Zumino model} \label{sec:Model} \subsection{Continuum theory} Two-dimensional $\mathcal{N}=1$ Wess--Zumino model is a supersymmetric theory that consists of a real scalar field $\phi\left(x\right)$ and a Majorana fermion field $\psi\left(x\right)$. In the Euclidean space-time, the corresponding action is given by \begin{align} \label{eq:2} S_{\mathrm{cont.}} = \int \mathrm{d}^{2}x \left\{ \frac{1}{2}\left(\partial_{\mu}\phi\right)^{2} + \frac{1}{2} W^\prime \left(\phi\right)^{2} + \frac{1}{2}\bar{\psi} \left(\gamma_\mu \partial_\mu + W^{\prime\prime}\left(\phi\right)\right)\psi \right\}, \end{align} where $\gamma_\mu$ is the gamma matrix which satisfies \begin{align} \label{eq:25} \left\{ \gamma_{\mu}, \gamma_{\nu} \right\} =2\delta_{\mu \nu}, \qquad \gamma_\mu=\gamma_\mu^\dag. \end{align} The Lorentz index $\mu$ takes two values $1$ or $2$, and the Einstein summation convention is used throughout this paper. Showing the indices in the spinor space explicitly, $\gamma_\mu$ and $\psi\left(x\right)$ are written as $\left(\gamma_\mu\right)_{\alpha\beta}$ and $\psi_\alpha\left(x\right)$ for $\alpha, \beta=1,2$. The spinor index $\alpha$ and the space-time coordinate $x$ are often suppressed without notice. $W\left(\phi\right)$ is an arbitrary real function of $\phi$, which is referred to as the superpotential in the superfield formalism, and gives the Yukawa- and $\phi^n$-type interactions with common coupling constants. $W^{\prime}\left(\phi\right)$ is the first differential of $W\left(\phi\right)$ with respect to $\phi$, that is, $W^{\prime}\left(\phi\right) \equiv \left(\mathrm{d}/\mathrm{d}\phi\right) W\left(\phi\right)$. The Majorana fermion $\psi$ satisfies \begin{align} \label{eq:majorana} \bar{\psi} =-\psi^{\mathrm{T}} C^{-1}, \end{align} where $C$ is the charge conjugation matrix which obeys \begin{align} \label{eq:24} C^{\mathrm{T}}=-C, \quad C^{\dagger}=C^{-1}, \quad C^{-1}\gamma_{\mu}C=-\gamma_{\mu}^{\mathrm{T}}. \end{align} For any $W\left(\phi\right)$, the action in eq.~\eqref{eq:2} is invariant under the supersymmetry transformation \begin{align} \label{eq:susy} &\delta \phi\left(x\right) = \bar{\epsilon} \psi\left(x\right), \\ &\delta \psi\left(x\right) = \left(\gamma_\mu \partial_\mu \phi\left(x\right) - W^{\prime}\left(\phi\left(x\right)\right)\right) \epsilon, \end{align} where $\epsilon$ is a global Grassmann parameter with two components and $\bar \epsilon$ satisfies eq.~\eqref{eq:majorana}. \subsection{Lattice theory} \label{sec:lattice_theory} Let us consider a two-dimensional square lattice with the lattice spacing $a$ and the volume $V=aN_1\times aN_2$, where $N_1, N_2 \in \mathbb{N}$. In this paper, $a$ is set to unity, and the lattice sites are simply expressed by integers: \begin{align} \Gamma = \Set{(n_1,n_2)| n_\mu=1,2,\ldots,N_\mu \ \ \text{for } \mu=1,2}. \end{align} All of the fields live on the lattice sites $n \in \Gamma$ and satisfy the periodic boundary conditions in both directions. The forward and the backward difference operators, $\partial_{\mu}$ and $\partial^{*}_{\mu}$, are given by \begin{align} \label{eq:6} &\partial_{\mu} \phi_{n} = \phi_{n+\hat{\mu}} - \phi_{n},\\ &\partial_{\mu}^{*}\phi_{n} = \phi_{n} - \phi_{n-\hat{\mu}}, \end{align} where $\hat \mu$ is the unit vector along the $\mu$-direction, and the symmetric difference operator is given by $ \partial_{\mu}^{\mathrm{S}} = \left( \partial_\mu + \partial_\mu^* \right)/2$. We define the lattice Wess--Zumino model according to ref.~\cite{Golterman:1988ta}: \begin{align} \label{eq:3} S = \sum_{n\in\Gamma}\left\{ \frac{1}{2}\left(\partial_{\mu}^{\mathrm{S}}\phi_n\right)^{2} + \frac{1}{2}\left( W^\prime \left(\phi_{n}\right) -\frac{r}{2} \partial_{\mu}^{\mathrm{}} \partial_{\mu}^{*} \phi_{n} \right)^{2} + \frac{1}{2}\bar{\psi}_{n} D\psi_{n} \right\}, \end{align} where the lattice Dirac operator $D$ which acts as $D\psi_m=D_{mn}\psi_n$ is given by \begin{align} \label{eq:4} D_{mn} = \left( \gamma_\mu \partial_\mu^{\mathrm{S}} - \frac{r}{2}\partial_{\mu}\partial_{\mu}^{*}\right)_{mn} + W^{\prime\prime} \left(\phi_n\right)\delta_{mn} \end{align} with the nonzero real Wilson parameter $r$. In the following, $S_{\rm B}$ denotes the pure boson part of the action: \begin{align} \label{eq:aa} S_{\rm B} = \sum_{n\in\Gamma}\left\{ \frac{1}{2}\left(\partial_{\mu}^{\mathrm{S}}\phi_n\right)^{2} + \frac{1}{2}\left( W^\prime \left(\phi_{n}\right) -\frac{r}{2} \partial_{\mu}^{\mathrm{}} \partial_{\mu}^{*} \phi_{n} \right)^{2} \right\}. \end{align} Note that the kinetic term of $\phi$ is given by the symmetric difference operator instead of the forward one in the naive boson action \begin{align} \label{eq:SBnaive} S_{\rm B, naive} = \sum_{n\in\Gamma}\left\{ \frac{1}{2}\left(\partial_{\mu}\phi_n\right)^{2} + \frac{1}{2}\left( W^\prime \left(\phi_{n}\right) \right)^{2} \right\}, \end{align} and an extra Wilson term is included in the boson sector. In this paper we refer to the bosons with the Wilson term as the Wilson bosons in the same sense as the Wilson fermions. While $S_{\mathrm{B, naive}}$ has only the nearest-neighbor interactions, $S_{\rm B}$ has the next-nearest-neighbor ones that cause difficulties in constructing the tensor network representation of the partition function. This point will be discussed later. In the free theory with \begin{align} W\left(\phi\right) = \frac{1}{2}m\phi^2, \label{eq:free_P} \end{align} the action in eq.~\eqref{eq:3} is invariant under a lattice version of the supersymmetry transformation \begin{align} \label{eq:5} &\delta \phi_{n} = \bar{\epsilon}\psi_{n}, \\ &\delta \psi_{n} = \left\{ \gamma_{\mu} \partial^{\mathrm{S}}_{\mu}\phi_{n} + \frac{r}{2}\left(\partial_{\mu} \partial_{\mu}^* \phi\right)_{n} - W^\prime \left(\phi_{n}\right)\right\} \epsilon \end{align} even at a finite lattice spacing because $S_{\rm B}$ has the similar structure with the Wilson--Dirac operator $D$ in eq.~\eqref{eq:4} in contrast to the naive one. For the interacting cases, however, the invariance is explicitly broken owing to the lack of the Leibniz rule for the lattice difference operators. The broken supersymmetry is shown to be restored in the continuum limit, at least, at all orders of the perturbation~\cite{Golterman:1988ta}. The associated partition function is defined in the usual manner: \begin{align} \label{eq:Z} Z=\int \mathcal{D}\phi \mathcal{D}\psi e^{-S} \end{align} with the path integral measures \begin{align} \label{eq:phi_int} & \int \mathcal{D}\phi \equiv \prod_{n\in \Gamma} \int_{-\infty}^{\infty} \frac{\mathrm{d}\phi_n}{\sqrt{2\pi}}, \\ & \int \mathcal{D}\psi \equiv \prod_{n\in \Gamma} \int \mathrm{d}\psi_{n,1} \mathrm{d}\psi_{n,2}. \end{align} Here $\mathrm{d}\psi_{n,\alpha}$ is a measure of the Grassmann integral defined in the following. The Grassmann variable $\xi_i$ and its measure $\mathrm{d}\xi_i$ ($i=1,\ldots, I$) satisfy \begin{align} \label{eq:grassman_number} \left\{ \xi_i,\xi_j \right\}=\left\{ \xi_i,\mathrm{d}\xi_j \right\}=\left\{ \mathrm{d}\xi_i,\mathrm{d}\xi_j \right\}=0 && \text{for all } i,j. \end{align} The Grassmann integral is then defined by \begin{align} \label{eq:grassman_integral} \int \mathrm{d}\xi_i 1=0, \qquad \int \mathrm{d}\xi_i \xi_i=1 &&\text{for }i=1,2,\ldots,I, \end{align} which suggests that $\int \mathrm{d}\xi_i$ is equivalent to $\partial/\partial \xi_i$. In the free theory, the boson and the fermion are decoupled from each other, and the respective partition functions are given by \begin{align} \label{eq:Z_B_exact} & Z_{\rm B, exact} =\prod_{p_1,p_2} \frac{1}{ \sqrt{ \sum_{\mu=1}^2 \sin^2 p_\mu + \left(m+2r\sum_{\mu=1}^2 \sin^2\left(p_\mu/2\right) \right)^2}}, \\ \label{eq:Z_F_exact} & Z_{\rm F, exact} =\frac{{\rm sign}\left\{m\left(m+4r\right)\right\}}{Z_{\mathrm{B, exact}}}, \end{align} where $p_\mu=2\pi n/N_\mu$ ($n=0,1,2,\ldots,N_\mu-1$) and the product in eq.~\eqref{eq:Z_B_exact} is taken for all possible momenta~\cite{Wolff:2007ip}. Note that $Z_{\rm B}=\infty$ ($Z_{\rm F}=0$) for $m=0,-2r,-4r$ when $N_\mu$ is an even integer because the first term and the second term in the square root in eq.~\eqref{eq:Z_B_exact} simultaneously vanish for certain combinations of $p_{1}$ and $p_{2}$. Thus we find that the Witten index, which is defined as the partition function with periodic boundary conditions in a finite volume, \begin{align} \label{eq:W_exact} Z_{\mathrm{exact}}={\rm sign}\left\{m\left(m+4r\right)\right\} \end{align} reproduces the continuum one, ${\rm sign}\left\{m\right\} $, for $\left|m\right| \ll 1$. After integrating the fermion field, the partition function can also be written as \begin{align} \label{eq:9} Z=\int \mathcal{D}\phi e^{-S_{\rm B}} \mathrm{Pf}\left(C^*D\right), \end{align} where the Pfaffian of a $2I\times 2I$ anti-symmetric matrix $A$ is defined by \begin{align} \mathrm{Pf} (A) = \int \mathrm{d}\xi_1 \mathrm{d}\xi_2\cdots \mathrm{d}\xi_{2I} e^{-\frac{1}{2} \xi_{i} A_{ij}\xi_j} \end{align} for Grassmann variables $\left\{\xi_i\right\}$ and corresponding measures $\left\{\mathrm{d}\xi_i\right\}$. The fermion Pfaffian $\mathrm{Pf}\left(C^*D\right)$ flips its sign depending on the scalar field in the interacting cases. To overcome this sign problem we employ the TRG method, whose first step is to represent eq.~\eqref{eq:Z} as a network of uniform tensors, which is explained in the next section. \section{Tensor network representation of partition function} \label{sec:TensorNetwork} \subsection{Fermion Pfaffian} \label{fermion_sector} We construct a tensor network representation for the fermion part of eq.~\eqref{eq:Z} \begin{align} \label{eq:ZF} Z_{\rm F} = \int\mathcal{D}\psi e^{-\frac{1}{2}\sum_{n\in \Gamma}\bar \psi_n D\psi_{n}}, \end{align} which yields the Pfaffian after integrating the fermion field as found in eq.~\eqref{eq:9}. The basic idea follows from refs.~\cite{Shimizu:2014uva,Takeda:2014vwa} which deal with the Dirac fermions. We describe the procedure for the Majorana fermions with any value of the Wilson parameter $r$. Now we use the following representations for $\gamma_\mu$ and $C$ that satisfy eqs.~\eqref{eq:25} and~\eqref{eq:24}: \begin{align} \label{eq:1} \gamma_{1}= \sigma_1, \qquad \gamma_{2}=\sigma_3, \qquad C=-i\sigma_2, \end{align} where $\sigma_i$ is the standard Pauli matrix. The method presented in this section is applicable to any possible choice of $\gamma_\mu$ and $C$, and they just lead to different tensors. Then the Majorana spinor takes the form \begin{align} \label{eq:majorana_spinor} \psi_{n}= \begin{pmatrix} \psi_{n,1} \\ \psi_{n,2} \end{pmatrix} ,\qquad \bar\psi_n= \begin{pmatrix} \psi_{n,2}, & -\psi_{n,1} \end{pmatrix} , \end{align} and we obtain \begin{align} \label{eq:10} - \frac{1}{2}\sum_{n\in \Gamma } \bar \psi_{n} D\psi_{n} =&\sum_{n\in \Gamma } \bigg\{ \left(\frac{1+r}{2}\right) \left( \tilde \psi_{n+\hat 1,2} \tilde \psi_{n,1} +\psi_{n+\hat 2,2} \psi_{n,1} \right) \nonumber\\ &+ \left(\frac{1-r}{2}\right) \left( \tilde \psi_{n+\hat 1,1} \tilde \psi_{n,2} +\psi_{n+\hat 2,1} \psi_{n,2} \right) + \left(W^{\prime\prime}\left(\phi_n\right)+2r\right) \psi_{n,1} \psi_{n,2} \bigg\}, \end{align} where \begin{align} & \tilde \psi_{n,1}=\frac{1}{\sqrt{2}}\left( \psi_{n,2}+ \psi_{n,1} \right), \\ & \tilde \psi_{n,2}=\frac{1}{\sqrt{2}}\left(\psi_{n,2} - \psi_{n,1} \right), \end{align} which are local transformations of the field variable $\psi_n$. $\tilde \psi_{n,\alpha}$ is introduced only to write eq.~\eqref{eq:10} as simple as possible. Note that the second term in eq.~\eqref{eq:10} disappears for $r=1$ because the hopping terms in eq.~\eqref{eq:4} are proportional to the projection operators, $\left(1\pm\gamma_\mu\right)/2$. Let us expand the four types of hopping factors in eq.~\eqref{eq:ZF}: \begin{align} \label{eq:11} &\hspace{-3.2em}e^{-\frac{1}{2}\sum_{n\in \Gamma}\bar \psi_{n} D \psi_{n}} \nonumber\\ =\prod_{n\in \Gamma} \Bigg\{ &\sum_{u_n=0}^1 \left( \frac{1+r}{2} \tilde \psi_{n+\hat 1,2} \tilde \psi_{n,1} \right)^{u_n} \sum_{v_n=0}^1 \left( \frac{1-r}{2} \tilde \psi_{n+\hat 1,1} \tilde \psi_{n,2} \right)^{v_n} \nonumber\\ &\cdot \sum_{p_n=0}^1 \left( \frac{1+r}{2} \psi_{n+\hat 2,2} \psi_{n,1} \right)^{p_n} \sum_{q_n=0}^1 \left( \frac{1-r}{2} \psi_{n+\hat 2,1} \psi_{n,2} \right)^{q_n} e^{(W^{\prime\prime}\left(\phi_n)+2r\right) \psi_{n,1} \psi_{n,2}} \Bigg\}. \end{align} We will see that $u_n,v_n,p_n,q_n$, which take 0 or 1 because of the nilpotency of $\psi_{n,\alpha}$ (and $\tilde \psi_{n,\alpha}$), are regarded as the indices of tensors. The four types of hopping factors have the same structure as $\Psi_{n+\hat\mu} \Phi_{n}$, where $\Psi_{n+\hat\mu}$ and $\Phi_{n}$ are single-component Grassmann numbers. It is straightforward to show \begin{align} \label{eq:key_identity} \Psi_{n+\hat\mu} \Phi_{n} = \int \left(\Psi_{n+\hat\mu}\mathrm{d}\bar\theta_{n+\hat \mu}\right)\left(\Phi_{n}\mathrm{d}\theta_n\right)\left(\bar\theta_{n+\hat\mu}\theta_n\right), \end{align} where new independent Grassmann numbers $\theta_n$, $\bar\theta_{n+\hat\mu}$ and the corresponding measures $\mathrm{d}\theta_n$, $\mathrm{d}\bar\theta_{n+\hat\mu}$ satisfy eqs.~\eqref{eq:grassman_number} and~\eqref{eq:grassman_integral} with the periodic boundary conditions. By applying this identity to each hopping factor in eq.~\eqref{eq:11} individually, one can make a tensor network representation. Then the fermion part of the partition function is represented as a product of tensors \begin{align} \label{eq:TNR_F} Z_{\rm F}=\sum_{\left\{u,v,p,q\right\}} &\prod_{n \in \Gamma} {T_{\rm F}}\left(\phi_n\right)_{u_n v_n p_n q_n u_{n-\hat 1} v_{n-\hat 1} p_{n-\hat 2} q_{n-\hat 2}} \nonumber \\ & \cdot \int {\cal D} \Xi_{uvpq} \prod_{n \in \Gamma} \left(\bar \xi_{n+\hat 1}\xi_n\right)^{u_n} \left(\bar \chi_{n+\hat 1}\chi_n\right)^{v_n} \left(\bar \eta_{n+\hat 2}\eta_n\right)^{p_n} \left(\bar \zeta_{n+\hat 2}\zeta_n\right)^{q_n} \end{align} with \begin{align} \label{eq:measures} {\cal D} \Xi_{uvpq} =\prod_{n \in \Gamma} \mathrm{d}\xi^{u_n}_n \mathrm{d}\chi^{v_n}_n \mathrm{d}\eta^{p_n}_n \mathrm{d}\zeta^{q_n}_n \mathrm{d} \bar \xi^{u_{n-\hat 1}}_n \mathrm{d}\bar \chi^{v_{n-\hat 1}}_n \mathrm{d} \bar \eta^{p_{n-\hat 2}}_{n} \mathrm{d} \bar \zeta^{q_{n-\hat 2}}_{n}, \end{align} where $\xi_n, {\bar \xi}_n, \chi_n, {\bar \chi}_n, \eta_n, {\bar \eta}_n, \zeta_n, {\bar \zeta}_n$, and those with bars are single-component Grassmann numbers introduced in the manner of eq.~\eqref{eq:key_identity}, and $\sum_{\{u,v,\cdots\}}$ means the summation of all possible configurations of the indices: $\prod_{n \in \Gamma} \left(\sum_{u_n=0}^1 \sum_{v_n=0}^1 \cdots \right)$. The new Grassmann numbers and their corresponding measures satisfy the same anti-commutation relations and boundary conditions as those of the original ones. The tensor $T_{\rm F}$ is defined as \begin{align} \label{eq:fermion_tensor} {T_{\rm F}}\left(\phi\right)_{u v p q a b c d} = \int\mathrm{d} \Psi \mathrm{d} \Phi &e^{(W^{\prime\prime}\left(\phi\right)+2r) \Psi \Phi} \left\{ \Psi^{d} \Phi^{c} \tilde\Psi^{b} \tilde\Phi^{a} \Phi^{q} \Psi^{p} \tilde\Phi^{v} \tilde\Psi^{u} \right\} \nonumber \\ &\cdot \left(\sqrt{\frac{1+r}{2}}\right)^{u+p+a+c} \left(\sqrt{\frac{1-r}{2}}\right)^{v+q+b+d} \end{align} for all possible indices with single-component Grassmann numbers $\Psi$, $\Phi$, $\tilde\Psi = \left(\Phi+\Psi\right)/\sqrt{2}$, $\tilde\Phi = \left(\Phi-\Psi\right)/\sqrt{2}$. By integrating $\Psi$ and $\Phi$ by hand, we can obtain the tensor elements. In the case of $r=1$, note that the indices $v_n$ and $q_n$ vanish and that the Grassmann fields $\chi_n$ and $\zeta_n$ are decoupled because the second term in the RHS of eq.~\eqref{eq:10} is absent. In that case, the tensor network representation becomes much simpler: \begin{align} \left. Z_{\rm F} \right|_{r=1}=\sum_{\left\{u,p\right\}} \prod_{n \in \Gamma} {T_{\rm F}\left(\phi_n\right)}_{u_n p_n u_{n-\hat 1} p_{n-\hat 2}} \int \mathrm{d}\xi^{u_n}_n \mathrm{d}\eta^{p_n}_n \mathrm{d} \bar \xi^{u_{n-\hat 1}}_n \mathrm{d} \bar \eta^{p_{n-\hat 2}}_{n} \prod_{n \in \Gamma} \left(\bar \xi_{n+\hat 1}\xi_n\right)^{u_n} \left(\bar \eta_{n+\hat 2}\eta_n\right)^{p_n}, \end{align} where \begin{align} {T_{\rm F}}\left(\phi\right)_{ijkl} = \int\mathrm{d} \Psi \mathrm{d} \Phi e^{\left(W''\left(\phi\right)+2\right) \Psi \Phi} \Phi^l \tilde\Phi^k \Psi^j \tilde\Psi^i . \end{align} It is rather straightforward to show that eq.~\eqref{eq:11} is reproduced from eq.~\eqref{eq:TNR_F} with eqs.~\eqref{eq:measures} and~\eqref{eq:fermion_tensor} and from the identity in eq.~\eqref{eq:key_identity}. We now note that the eight Grassmann measures in the RHS of eq.~({\ref{eq:measures}}) should be in this order and that the set of measures at the site $n$ commutes with ones at different lattice sites because they are Grassmann-even as a set for non-zero elements of the tensor given in eq.~\eqref{eq:fermion_tensor}. The indices $x_n \equiv (u_n, v_n)$ and the Grassmann fields $\xi_n, \chi_n$ carry the information of the hopping factors with $\mu=1$ as indicated by the last factors in eq.~\eqref{eq:TNR_F} while $t_n \equiv (p_n, q_n)$ and $\eta_n, \zeta_n$ are related to the hopping with $\mu=2$. In this sense, $x_n$, $t_n$, $x_{n-\hat 1}$, $t_{n-\hat 2}$, which are the indices of the tensor in eq.~\eqref{eq:TNR_F}, can be interpreted as being defined on the four links which stem from the site $n$. Since each index is shared by two tensors which are placed on the nearest-neighbor lattice sites (see eq.~\eqref{eq:TNR_F}), we can find that the partition function $Z_{\rm F}$ is expressed as a network of the tensor ${T_{\rm F}}_{x_n t_n x_{n-\hat 1} t_{n-\hat 2}}$ on the two-dimensional square lattice $\Gamma$. If one uses another representation of $\gamma_\mu$ and $C$, then the same partition function is given by a different tensor. This means that the tensor network representation is not uniquely determined. \subsection{Boson partition function} \label{sec:Boson_Z} The tensor network representation is also constructed for the pure boson part of eq.~\eqref{eq:Z} \begin{align} \label{eq:ZB} Z_{\rm B}=\int \mathcal{D}\phi e^{-S_{\rm B}} \end{align} with $S_{\rm B}$ in eq.~\eqref{eq:aa}. It is, however, not straightforward to construct a simple representation because $S_{\rm B}$ has the next-nearest-neighbor interactions and $\phi$ is a non-compact field. A popular way to avoid the former issue is to rewrite $S_{\rm B}$ in a nearest-neighbor form with the aid of auxiliary fields. For the latter, we employ a new method using a discretization for the integrals of $\phi$.\footnote{ A method for treating the non-compact field using a discretization is already proposed in the pioneering work by Y. Shimizu~\cite{Shimizu:2012wfa}. We thank him for pointing out a new idea~\cite{Shimizu:private} presented in this paper. } After these procedures, we find that a discretized version of eq.~\eqref{eq:ZB} can be expressed as a tensor network for arbitrary discretization schemes. Since the formulation is actually irrelevant to the details of the scalar theory, we will derive a tensor network for a general theory: \begin{align} \label{eq:ZB_varphi} Z_{\rm B}=\int \mathcal{D}\varphi e^{- \tilde S_{\rm B}\left(\varphi\right)}, \end{align} where $\int \mathcal{D} \varphi= \int_{-\infty}^\infty\prod_{n \in \Gamma } \mathrm{d}\varphi_{n, 1} \mathrm{d}\varphi_{n, 2}\cdots \mathrm{d}\varphi_{n, N}$. We assume that $\tilde S_{\rm B}(\varphi)$ is invariant under the PT-transformation on a two-dimensional square lattice and has the interactions up to the nearest-neighbor, and that $\varphi_n$ is a non-compact real field with $N$ components. As seen in section~\ref{sec:remarks}, it is very easy to extend it to the non PT-symmetric case. We will show that eq.~\eqref{eq:ZB} can be expressed in the form of eq.~\eqref{eq:ZB_varphi} with $N=3$ in section~\ref{sec:auxiliary_field}. After decomposing the hopping terms of $\tilde S_{\rm B}$ in section~\ref{sec:symmetric} and introducing a formal discretization for the integrals of $\varphi$ in section~\ref{sec:discretization}, we give the tensor network representation for a discretized version of eq.~\eqref{eq:ZB_varphi} in section~\ref{sec:decomposition}. \subsubsection{Introduction of auxiliary fields} \label{sec:auxiliary_field} The boson action $S_{\rm B}$ in eq.~\eqref{eq:aa} is transformed into a nearest-neighbor form using two real auxiliary fields $G$ and $H$: \begin{align} \label{eq:ZB_newS} Z_{\rm B}=\int \mathcal{D}\phi \mathcal{D}G \mathcal{D}H e^{- \tilde S_{\rm B}}, \end{align} where \begin{align} \label{eq:7} \tilde S_{\mathrm{B}} = S_{\mathrm{B, naive}} + \frac{1}{2}\sum_{n \in \Gamma} \big\{ &G_{n}^{2} + H_{n}^{2} -\left( r W' \left(\phi_{n}\right)+\alpha G_n+\beta H_n\right) \left(\phi_{n+\hat 1} +\phi_{n-\hat 1}- 2\phi_n\right) \nonumber\\ &-\left( r W' \left(\phi_{n}\right)+\alpha G_n-\beta H_n\right) \left(\phi_{n+\hat 2} +\phi_{n-\hat 2}- 2\phi_n\right) \big\} \end{align} with $S_{\mathrm{B,naive}}$ given in eq.~\eqref{eq:SBnaive}, $\alpha=\sqrt{(1-2r^2)/2}$, and $\beta=1/\sqrt{{2}}$. Note that $\alpha$ is real for $\left|r\right| \le 1/\sqrt{2}$ but becomes a pure imaginary for $\left|r\right|>1/\sqrt{2}$. The integral measures for $G_n$ and $H_n$ are defined in exactly the same way as $\phi_n$ in eq.~\eqref{eq:phi_int}. Although, in general, two auxiliary fields are necessary for the next-nearest-neighbor interactions in two directions, it is somewhat surprising to find that $G$ is decoupled from the other fields for particular values $r=\pm 1/\sqrt{2}$, and the required auxiliary field turns out to be only $H$. It is clear that $\tilde S_{\rm B}$ has only the on-site and the nearest-neighbor interactions which are invariant under the PT-transformation \begin{align} \phi_n,\ H_n,\ G_n \quad \rightarrow \quad \phi_{-n},\ H_{-n},\ G_{-n}. \end{align} Defining a three-component field variable \begin{align} \label{eq:simple_variables} \varphi_n = \left(\varphi_{n1},\varphi_{n2},\varphi_{n3}\right) = \left(\frac{\phi_n}{\sqrt{2\pi}}, \frac{H_n}{\sqrt{2\pi}},\frac{G_n}{\sqrt{2\pi}}\right), \end{align} we find that eq.~\eqref{eq:ZB_newS} is just eq.~\eqref{eq:ZB_varphi} with $N=3$. \subsubsection{Symmetric property of local Boltzmann weight} \label{sec:symmetric} In the previous section~\ref{sec:auxiliary_field}, we found that eq.~\eqref{eq:ZB} is a special case of eq.~\eqref{eq:ZB_varphi}. Hereafter we will try to derive a tensor network representation of general one~\eqref{eq:ZB_varphi}. Before that, let us see the hopping structure of the local Boltzmann weight, which is an important building block of the tensor as shown in following sections~\ref{sec:discretization} and~\ref{sec:decomposition}. It can be easily shown that $\tilde S_{\rm B}$ is expressed as \begin{align} \label{eq:S_twoL} \tilde S_{\rm B}=\sum_{n \in \Gamma} L_1\left(\varphi_n,\varphi_{n+\hat 1}\right) + \sum_{n \in \Gamma} L_2\left(\varphi_n,\varphi_{n+\hat 2}\right), \end{align} where $L_\mu$ is symmetric in the sense that $L_\mu\left(\varphi,\varphi^{\prime}\right)=L_\mu\left(\varphi^{\prime},\varphi\right)$ which is a consequence of the PT-invariance of the action.\footnote{ We can express the action as $\tilde{S}_{\mathrm{B}} = \sum_{n \in \Gamma} \sum_{\mu = 1}^{2} K_{\mu}\left(\varphi_{n}, \varphi_{n+\hat{\mu}}\right)$ using a trial choice of $K_{\mu}$. Actually, $K_{\mu}\left(\varphi_{n}, \varphi_{n+\hat{\mu}}\right)$ transforms to $K_{\mu}\left(\varphi_{-n}, \varphi_{-n-\hat{\mu}}\right)$ by the PT-transformation, and the PT-invariance of the action tells us that $\tilde{S}_{\mathrm{B}} = \sum_{n \in \Gamma} \sum_{\mu = 1}^{2} K_{\mu}\left(\varphi_{n+\hat{\mu}}, \varphi_{n}\right)$. Thus the symmetric $L_{\mu}$ is always defined as $L_{\mu}\left(\varphi, \varphi^{\prime}\right) = \left(K_{\mu}\left(\varphi, \varphi^{\prime}\right) + K_{\mu}\left(\varphi^{\prime}, \varphi\right)\right)/2$. } All of the hopping terms with respect to the $\mu$-direction are in $L_\mu\left(\varphi_n,\varphi_{n+\hat\mu}\right)$. This decomposition is actually not unique because the positions of the on-site interactions and some constants are free to choose. For our case in eq.~\eqref{eq:7}, we find \begin{align} \label{eq:Lmuourcase} L_\mu\left(\varphi_n,\varphi_{m}\right) = &\frac{1}{2} \left(\phi_m-\phi_n\right)^2 + \frac{1}{8} \left( W^\prime\left(\phi_n\right)^2 + G_{n}^{2} + H_{n}^{2} + W^{\prime}\left(\phi_{m}\right)^{2} + G_{m}^{2} + H_{m}^{2} \right) \nonumber\\ &\begin{aligned}[t] -\frac{1}{2} \Bigl( &r W^\prime \left(\phi_{n}\right) + \alpha G_n + \left(-1\right)^{\delta_{\mu2}}\beta H_{n} \\ &- r W^\prime \left(\phi_{m}\right) - \alpha G_m - \left(-1\right)^{\delta_{\mu2}}\beta H_{m} \Bigr) \left(\phi_m -\phi_n\right). \end{aligned}\nonumber\\[-4.8ex] \end{align} Note that $\beta H_n$ and $\beta H_{m}$ have the different signs for $\mu=2$. The Boltzmann factor $e^{- \tilde S_{\rm B}}$ can be written as \begin{align} \label{eq:16} e^{-\tilde S_{\mathrm{B}}} = \prod_{n \in \Gamma} \prod_{\mu = 1}^{2} f_{\mu}\left(\varphi_{n}, \varphi_{n+\hat{\mu}}\right) \end{align} with \begin{align} \label{eq:f} f_{\mu}\left(\varphi,\varphi' \right)=e^{-L_\mu\left(\varphi,\varphi' \right)}, \end{align} which is symmetric in the same sense as that of $L_\mu$. This symmetric property plays an important role in the subsequent discussion. \subsubsection{Discretization of non-compact field} \label{sec:discretization} The non-compactness of the variable $\varphi$ is cumbersome in extracting the tensor structure from $f_\mu\left(\varphi_{n},\varphi_{n+\hat{\mu}} \right)$ in practice. There are several possible ways to make the indices of the tensor. In our method, we first carry out a discretization of the variable $\varphi$ itself, which automatically makes the partition function in eq.~\eqref{eq:ZB_varphi} into a discretized form. To make the discussion of the discretization clearly understood, let us begin with a one-dimensional integral \begin{align} \label{eq:one_dim_int} I= \int_{-\infty}^{\infty} {\mathrm{d}x} f\left(x\right), \end{align} which converges for a given function $f\left(x\right)$. We can formally approximate this integral with a discretized form \begin{align} \label{eq:one_dim_sum} I\left(K\right)= {\sum_{x \in S_{K}}}^{\!\!\left(\mathrm{disc.}\right)} f\left(x\right), \end{align} for which $I=\lim_{K \rightarrow \infty} I\left(K\right)$ is simply assumed. $K$ is a parameter to control the approximation of the integral by the sum. Now we suppose that $S_K$ is a set containing $K$ numbers, $x_1, x_2, \ldots, x_K$, which are given by a discretization scheme $\left(\mathrm{disc.}\right)$, and that $\sum_{x \in S_{K}}^{\left(\mathrm{disc.}\right)}$ is a summation of $x \in S_K$ with some factors, for instance, $\left(\mathrm{disc.}\right)$-dependent weights. A multi-dimensional extension ($S_K\rightarrow S_K^N$) is straightforward by defining $S_K^N$ as a set of the multi-dimensional discrete points. The Gauss--Hermite quadrature gives a concrete example of this abstract definition. The RHS of eq.~\eqref{eq:one_dim_sum} is then defined as follows: \begin{align} \label{eq:GH-quardrature} {\sum_{x \in S_{K}}}^{\!\!\left(\mathrm{GH}\right)} f\left(x\right) \equiv \sum_{i=1}^{K} w_i e^{x_{i}^{2}} f\left(x_{i}\right). \end{align} Here $x_i$ $(i=1,\ldots,K)$ is the $i$-th root of the $K$-th Hermite polynomial, and $w_i$ are the weights given by the Hermite polynomial and $x_i$. The RHS of eq.~\eqref{eq:GH-quardrature} has an extra exponential function because this quadrature is designed so that $f(x)$ which has a damping factor $e^{-x^2}$ is well approximated. In this case, we find that $S_K$ is a set of the roots and the weight $w_i e^{x_i^2}$ is the ingredient of $\sum^{\left(\mathrm{GH}\right)}$. For a well-behaved $f\left(x\right)$, one can expect that $I=\lim_{K \rightarrow \infty} I\left(K\right)$. With the prescriptions above, eq.~\eqref{eq:ZB_varphi} can be discretized as \begin{align} \label{eq:26} Z_{\mathrm{B}}\left(K\right) = \prod_{n \in \Gamma} \left(\frac{1}{\sqrt{2\pi}}\right)^{N} {\sum_{\varphi_n \in S_{K}^N}}^{\!\!\!\!\left(\mathrm{disc.}\right)} \prod_{\mu=1}^{2} f_{\mu}\left(\varphi_{n}, \varphi_{n+\hat{\mu}}\right) \end{align} by replacing the measures for $\varphi_n$ by $\sum_{\varphi_n \in S_{K}^N}^{\left(\mathrm{disc.}\right)}$.\footnote{ Here a one-dimensional discretization is applied to each component of $\varphi_{n}$. We may also use a more general scheme that cannot be written as the superposition of one-dimensional discretization. }~\footnote{ In general one can set different discrete points for each direction: $K_{i} \neq K_{j}$ for $i \neq j$, although in the following we assume a common $K$ just for the simplicity. } Note that we use the same discretization scheme for all components of $\varphi_n$. Here eq.~\eqref{eq:16} is also used, and $K$ is the number of discrete points. It is found that $f_{\mu}\left(\varphi_{n}, \varphi_{n+\hat{\mu}}\right) $ is a matrix whose indices are $\varphi_{n}$ and $\varphi_{n+\hat{\mu}}$ which take the $K^N$ discrete numbers in $S_K^N$. In this way, we now consider $f_\mu$ as a matrix, and this fact provides a benefit for a numerical treatment; that is, one can use linear-algebra techniques instead of the functional analysis. The indices of the tensor will be naturally derived from this matrix structure of $f_\mu$ as will be seen in section~\ref{sec:decomposition}. \subsubsection{Construction of tensor} \label{sec:decomposition} In order to derive the tensor network structure from eq.~\eqref{eq:26}, one needs to separate $\varphi_n$ and $\varphi_{n+\hat{\mu}}$ in $f_\mu$. If this separation works, the original field $\varphi_n$ can be traced out at each $n$. Since $f_\mu$ is a symmetric matrix with complex entries in general, which is found in the previous sections~\ref{sec:symmetric} and~\ref{sec:discretization}, we carry out the Takagi factorization: for $\varphi,\varphi' \in S_K^N$, \begin{align} \label{eq:18} &f_{1}\left(\varphi, \varphi' \right) =\sum_{w=1}^{K^N} U_{\varphi w} \sigma_{w} U^{\mathrm{T}}_{w \varphi'}, \\ \label{eq:18_2} & f_{2}\left(\varphi, \varphi' \right) =\sum_{s=1}^{K^N} V_{\varphi s} \rho_{s} V^{\mathrm{T}}_{s \varphi'}, \end{align} where $U$ and $V$ are unitary matrices, $U^{\mathrm{T}}$ and $V^{\mathrm{T}}$ are the transposes of $U$ and $V$, respectively, and $\sigma_{w}$ and $\rho_{s}$ are non-negative. Note that this factorization depends on the discretization scheme, which determines the set $S_{K}$. Instead of the Takagi factorization, we can also use the SVD as seen in the next section. We thus find that eq.~\eqref{eq:26} is written as \begin{align} \label{eq:TNR_B_D} Z_{\rm B}\left(K\right) = \sum_{\left\{ w, s\right\}} \prod_{n \in \Gamma} {T_{\rm B}}\left(K\right)_{w_n s_n w_{n-\hat 1} s_{n-\hat 2}}, \end{align} where \begin{align} \label{eq:boson_tensor} {T_{\rm B}}\left(K\right)_{ijkl} = \left(\frac{1}{\sqrt{2\pi}}\right)^{N} \sqrt{ \sigma_i \rho_j \sigma_k \rho_l } {\sum_{\varphi \in S_{K}^N}}^{\!\!\left(\mathrm{disc.}\right)} U_{\varphi i} V_{\varphi j} U_{ \varphi k } V_{\varphi l } \end{align} for all indices. One can verify eq.~\eqref{eq:TNR_B_D} from eq.~\eqref{eq:26} by applying the factorization in eqs.~\eqref{eq:18} and~\eqref{eq:18_2} to $f_\mu\left(\varphi_{n}, \varphi_{n+\hat{\mu}}\right)$ for $\mu=1,2$ with the local indices $w_n,s_n$. Then the index $w_n$ ($s_{n}$) can be interpreted as a variable defined on the link which connects $n$ and $n+\hat 1$ ($n+\hat 2$), so eq.~\eqref{eq:TNR_B_D} forms a tensor network on the two-dimensional lattice $\Gamma$ as with the case of the fermion partition function in eq.~\eqref{eq:TNR_F}. Here one finds the correspondence between the tensor indices and the hopping structure of the lattice action as in the fermion part. From this one can see that the tensor network structure is originated from the kinetic terms for both fermions and bosons. We expect that, in the large $K$ limit, $Z_{\rm B}\left(K\right)$ converges to $Z_{\rm B}$ with an exact tensor network representation \begin{align} \label{eq:TNR_B} Z_{\rm B} = \sum_{\left\{w,s\right\}} \prod_{n \in \Gamma} {T_{\rm B}}_{w_n s_n w_{n-\hat 1} s_{n-\hat 2}} \end{align} if we can find a proper discretization scheme so that $T_{\rm B}\left(K\right)$ converges to $T_{\rm B}$ in $K \rightarrow \infty$. In practice one has to confirm that $Z_{\mathrm{B}}\left(K\right)$ converges to $Z_{\mathrm{B}}$ with increasing $K$ in the choice of a discretization scheme. We will see this point in section~\ref{sec:Results_Wilsonboson}. \subsubsection{Miscellaneous remarks} \label{sec:remarks} We give some miscellaneous remarks which may be important for future applications and deeper understanding of the symmetry of the tensor network. The tensor network representation in the form of eq.~\eqref{eq:TNR_B}, which gives the boson partition function in eq.~\eqref{eq:ZB}, is not uniquely determined. Let $F$ and $G$ be regular $K \times K$ matrices. We then find that eq.~\eqref{eq:TNR_B} also holds for another uniform tensor $\tilde T_{\rm B}$ given by \begin{align} \tilde {T_{{\rm B}}}_{w s w' s'}= {T_{\rm B}}_{i j k l} F_{iw} G_{js} F^{-1}_{k w'} G^{-1}_{l s'} \end{align} for all indices. Furthermore, by using $F_n$ and $G_n$ that are regular matrices satisfying the periodic boundary conditions on the two-dimensional lattice $\Gamma$ and transforming ${T_{\rm B}}_{w_n s_n w_{n-\hat 1} s_{n-\hat 2}}$ by $F_n$, $G_n$, $F^{-1}_{n-\hat 1}$, and $G^{-1}_{n-\hat 2}$, $Z_{\rm B}$ can also be written in terms of the non-uniform tensors. This means that the tensor network representation of the partition function is invariant under the gauge transformations for tensors. The expression of eq.~\eqref{eq:TNR_B_D} is rather general in the sense that we can always find it for two-dimensional PT-invariant theories with the real scalars. It is very easy to generalize this result to more complicated cases, non PT-invariant actions which, for example, have only one of $\phi^2_{n+\hat \mu} \phi_n$ or $\phi^2_{n-\hat \mu} \phi_n$ terms or the theories with the complex scalars. For those theories, although $f_\mu$ is not symmetric in general, we can use the SVD instead of the Takagi factorization. Then, $U^{\mathrm{T}}$ and $V^{\mathrm{T}}$ in eqs.~\eqref{eq:18} and~\eqref{eq:18_2} are replaced by other unitary matrices, and we can express the partition function by a similar construction of the tensor to eq.~\eqref{eq:boson_tensor}, where the second $U$ and the second $V$ are replaced with the other ones. An extension to the higher-dimensional theories is also straightforward. We have much simpler expressions for the cases of $S_{\rm B,naive}$ given in eq.~\eqref{eq:SBnaive} because the auxiliary fields are not needed ($N=1$) and $L_\mu$ is isotropic and given by a single $L$: \begin{align} L\left(\phi,\phi'\right) = \frac{1}{2} \left(\phi'-\phi\right)^2 + \frac{1}{8} W^\prime\left(\phi\right)^2 + \frac{1}{8} W^\prime\left(\phi'\right)^2. \end{align} Equation~\eqref{eq:boson_tensor} then becomes \begin{align} \label{eq:boson_tensor2} {T_{\rm B, naive}}\left(K\right)_{ijkl} = \frac{1}{\sqrt{2\pi}} \sqrt{ \sigma_i \sigma_j \sigma_k \sigma_l } {\sum_{\phi \in S_{K}}}^{\!\!\left(\mathrm{disc.}\right)} U_{\phi i} U_{\phi j} U_{ \phi k } U_{\phi l } \end{align} because $f_\mu \equiv f =e^{-L}$ for $\mu=1,2$ and because $V=U$ and $\rho_i=\sigma_i$ in eqs.~\eqref{eq:18} and~\eqref{eq:18_2}. In this case, instead of the Takagi factorization, we can use the SVD: \begin{align} \label{eq:svd_for_naiveSB} f\left(\phi, \phi' \right) =\sum_{w=1}^K O_{\phi w} \sigma_{w} P^{\mathrm{T}}_{w \phi'}, \end{align} where $O$ and $P$ are real symmetric matrices. Then we have \begin{align} {T_{\rm B, naive}}\left(K\right)_{ijkl} = \frac{1}{\sqrt{2\pi}} \sqrt{ \sigma_{i} \sigma_{j} \sigma_{k} \sigma_{l}} {\sum_{\phi \in S_{K}}}^{\!\!\left(\mathrm{disc.}\right)} O_{\phi i} P_{\phi j} O_{ \phi k} P_{\phi l}. \end{align} \subsection{Total tensor network} We have seen that the fermion and the boson partition functions can be expressed as the tensor networks in the previous two sections. By combining these results, we can also express the total partition function as a tensor network. Before presenting the total tensor, let us introduce combined indices $X_n, T_n$. $X_{n}$ is defined as $X_n = \left(u_n,v_n,w_n\right)$, where ($u_n,v_n$) and $w_n$ are indices of the fermion and the boson tensors, respectively. $T_n$ is also defined as $T_{n} = \left(p_n,q_n,s_n\right)$, and the dimension of $X_n$ and $T_n$ is $2\times2\times K^N$. The total tensor is made by replacing $e^{-S_{\rm B}\left(\phi\right)}$ in eq.~\eqref{eq:ZB} with $e^{-S_{\rm B}\left(\phi\right)}Z_{\rm F}\left(\phi\right)$ and repeating the same procedure for making the tensor network representation of the boson partition function. Additional contributions by $Z_{\rm F}$ do not give any complexity. We find that the total tensor network representation is given by the boson one in eq.~\eqref{eq:TNR_B_D} multiplied by $Z_{\rm F}\left(\phi\right)$ from the right: \begin{align} \label{eq:19} Z\left(K\right) = \sum_{\left\{X,T\right\}} &\prod_{n \in \Gamma} {\mathcal{T}\left(K\right)}_{X_{n} T_{n} X_{n-\hat{1}} T_{n-\hat{2}}} \nonumber \\ & \cdot \int {\cal D} \Xi_{uvpq} \prod_{n \in \Gamma} \left(\bar \xi_{n+\hat 1}\xi_n\right)^{u_n} \left(\bar \chi_{n+\hat 1}\chi_n\right)^{v_n} \left(\bar \eta_{n+\hat 2}\eta_n\right)^{p_n} \left(\bar \zeta_{n+\hat 2}\zeta_n\right)^{q_n} \end{align} with \begin{align} {\mathcal{T}\left(K\right)}_{X T X' T'} = \left(\frac{1}{\sqrt{2\pi}}\right)^{N} \sqrt{\sigma_{w} \rho_{s} \sigma_{w'} \rho_{s'}} {\sum_{\varphi \in S_{K}^N}}^{\!\!\left(\mathrm{disc.}\right)} U_{\varphi w} V_{\varphi s} U_{ \varphi w'} V_{\varphi s'} {T_{\rm F}\left(\phi\right)}_{u v p q u' v' p' q' }, \label{eq:total_T} \end{align} where $U$, $V$, $\sigma_w$, and $\rho_s$ are given by eqs.~\eqref{eq:18} and~\eqref{eq:18_2}. The measure ${\cal D} \Xi_{uvpq} $ is given in eq.~\eqref{eq:measures}, $\xi, {\bar \xi}, \chi, {\bar \chi}, \eta, {\bar \eta}, \zeta, {\bar \zeta}$ are one-component Grassmann numbers, and $T_{\rm F}$ is the tensor for the fermion part defined in eq.~\eqref{eq:fermion_tensor}. Note that $T_{\rm F}\left(\phi_n\right)$ includes only $\phi_n$ which is a component of $\varphi_n$. The total tensor ${\mathcal{T}\left(K\right)}_{X T X' T'}$ is uniformly defined on the lattice. Now the original partition function $Z$ is expressed as a tensor network $Z\left(K\right)$. We have built it for a general superpotential by focusing on the hopping structure of the lattice action. Introduction of local interaction terms does not change our formulation but rather elements of tensor. Moreover, the same structure of the tensor network leads to the same order of computational complexity.\footnote{ If the superpotential contains hopping terms, the hopping structure of the lattice action changes and one has to slightly modify the derivation of the tensor network representation. } We will numerically verify that $Z\left(K\right)$ indeed converges to $Z$ by using the TRG as a coarse-graining scheme for the tensor network in the next section. \section{Numerical test in free theory} \label{sec:Results} The partition function of the lattice $\mathcal{N}=1$ Wess--Zumino model has been expressed as a tensor network in eq.~\eqref{eq:19}. In this section, we test the expressions in the free theory given by eq.~\eqref{eq:free_P} varying the mass for three lattice sizes $V=2 \times 2$, $8 \times8$, $32\times 32$ with the periodic boundary conditions. Numerical tests in the free theory are effective to study whether the tensor is correctly given by our new formulation because the tensor network structure is derived from the hopping terms in the action, i.e. the kinetic terms. The computation is performed with the value of the Wilson parameter $r=1/\sqrt{2}$ to reduce the computational cost because the auxiliary field $G$ is decoupled as seen in section~\ref{sec:auxiliary_field}. \subsection{Some details} \label{sec:Some_details} In sections~\ref{sec:Results_Majorana} and~\ref{sec:Results_Wilsonboson}, we compute $Z_{\rm F}$ and $Z_{\rm B}$ individually using the (Grassmann) TRG since they are independent with each other in the free theory. In section~\ref{sec:Results_Wilsonboson}, the Witten index given by the total partition function $Z$ is computed by the Grassmann TRG. Since the free theory is exactly solvable, we can compare an obtained result $X_{\mathrm{TRG}}$ with the exact solution $X_{\mathrm{exact}}$ by computing \begin{align} \label{eq:delta} \delta(X) = \left| \frac{X_{\mathrm{exact}} - X_{\mathrm{TRG}}}{X_{\mathrm{exact}}}\right|. \end{align} In what follows, we briefly describe the TRG while introducing $D_{\mathrm{cut}}$ which defines the truncated dimension of tensors. The SVD allows us to express a tensor $T_{ijkl}$ ($i,j,k,l=1,2,\cdots,N$) of which the tensor network representation of a partition function $\mathcal{Z}$ is made as $T_{ijkl}= \sum_{I=1}^{N^2} S_{ijI} \sigma_{I} (V^\dag)_{Ikl}$, where $S$ and $V$ are unitary matrices and $\sigma_I$ is the singular value of $T_{ijkl}$. We assume that the singular values are sorted in descending order: $\sigma_1 \ge \sigma_2 \ge \sigma_3 \ge \cdots \sigma_{N^2} \ge 0$.\footnote{ Strictly speaking, $S$ and $V$ are matrices with respect to the row specified by $i,j$ and the column $I$, and $\sigma_I$ is the singular values of the matrix $T_{ijkl}$ with the row $i,j$ and the column $k,l$. In addition, $S$ and $V$ are taken to be real symmetric ones when $T_{ijkl}\in \mathbb{R}$ for all $i,j,k,l$. } In the TRG, $T_{ijkl}$ is approximately decomposed: \begin{align} T_{ijkl} \approx \sum_{I=1}^{D_{\rm cut}} S_{ijI} \sigma_{I} (V^\dag)_{Ikl} , \label{eq:cg_tensor} \end{align} where $D_{\rm cut}$, which is fixed throughout a computation, is used to truncate the dimension of the tensor indices if it is smaller than $N^2$. If not so, the summation in eq.~\eqref{eq:cg_tensor} is done up to $N^2$ without the truncation. A similar decomposition can be done with a different combination of the indices: \begin{align} T_{ijkl} \approx \sum_{I=1}^{D_{\rm cut}} S_{liI}^\prime \sigma_{I}^\prime (V^{\prime\dag})_{Ijk} . \label{eq:cg_tensor_2} \end{align} The coarse-grained tensor $T^{\rm new}_{IJKL}$ with $I,J,K,L=1,\ldots,{\rm min}\{D_{\rm cut},N^2\}$ is then given by contracting the rank-three tensors $\sqrt{\sigma} S, \sqrt{\sigma^\prime} S^\prime, \sqrt{\sigma} V, \sqrt{\sigma^\prime} V^\prime$ and forms a network again as with $T_{ijkl}$. We can compute the partition function $\mathcal{Z}$ by repeating this procedure. Since the number of tensors decreases through the coarse-graining, $\mathcal{Z}$ is finally given by a single tensor for which the indices are contracted: $\mathcal{Z}=\sum_{I,J=1}^{D_{\rm cut}} T^{\rm new}_{IJIJ}$. More details are shown in ref.~\cite{Gu:2009dr}, and appendix~\ref{sec:Coarse-graining_GTRG} is given for the Grassmann cases. We employ the Gauss--Hermite quadrature~\eqref{eq:GH-quardrature} to discretize the integrals of $\phi$ and $H$ in~\eqref{eq:16}: \begin{align} \label{ZB_used} Z_{\mathrm{B}}\left(K\right) = \prod_{n \in \Gamma} \left(\frac{1}{\sqrt{2\pi}}\right)^{2} {\sum_{\phi_{n} \in S_{K}}}^{\!\!\!\!\left(\mathrm{GH}\right)} {\sum_{H_{n} \in S_{K}}}^{\!\!\!\!\left(\mathrm{GH}\right)} \prod_{\mu=1}^{2} f_{\mu}\left(\phi_n, H_n, \phi_{n+\hat{\mu}}, H_{n+\hat{\mu}}\right), \end{align} where \begin{align} \label{fmu_used} f_\mu\left(\varphi_n, \varphi_{m}\right) = \exp \biggl\{&-\frac{1}{2}\left(1+\frac{m}{\sqrt{2}}\right) \left(\phi_n-\phi_m\right)^2 - \frac{m^{2}}{8} \left(\phi_n^2 + \phi_m^2\right) \nonumber \\ &- \frac{1}{8} \left(H_{n}^{2} + H_{m}^{2} \right) -\frac{\left(-1\right)^{\delta_{\mu2}}}{2\sqrt{2}} \left(H_{n}-H_m\right) \left(\phi_n -\phi_m\right)\biggr\} \end{align} for eq.~\eqref{eq:free_P} and $r = 1/\sqrt{2}$. The two-dimensional variable $\varphi_n= \left(\varphi_{n,1},\varphi_{n,2}\right) = \left(\phi_n/\sqrt{2\pi}, H_n/\sqrt{2\pi}\right)$ is again used for the notational simplicity. $S_K$ is a set of the roots of the $K$-th Hermite polynomial. We use the SVD to decompose $f_\mu$, which are $K^2 \times K^2$ real symmetric matrices, as \begin{align} \label{f1_svd_used} &f_1(\varphi,\varphi') = \sum_{w=1}^{K^2} O_{\varphi w} \sigma_{w} P_{\varphi' w}, \\ \label{f2_svd_used} &f_2(\varphi,\varphi') = \sum_{s=1}^{K^2} S_{\varphi s} \rho_{s} T_{\varphi' s}, \end{align} where $\sigma_1 \ge\sigma_2 \ge \ldots \ge \sigma_{K^2}$ and $\rho_1 \ge \rho_2 \ge \ldots \ge \rho_{K^2}$. For reducing the memory usage and the computational cost, we initially approximate the tensor network representation of eq.~\eqref{ZB_used} by $D_{\mathrm{init}} \le K^{2}$: \begin{align} \label{ZB_K_used} Z_{\rm B}\left(K\right) \approx \prod_{n \in \Gamma} \sum_{w_n=1}^{D_{\mathrm{init}}} \sum_{s_n=1}^{D_{\mathrm{init}}} {T_{\rm B}}\left(K\right)_{w_n s_n w_{n-\hat 1} s_{n-\hat 2}}, \end{align} where \begin{align} \label{boson_tensor_used} {T_{\rm B}}\left(K\right)_{ijkl} = \frac{1}{2\pi} \sqrt{\sigma_i \rho_j \sigma_k \rho_l} {\sum_{\phi_{n} \in S_{K}}}^{\!\!\!\!\left(\mathrm{GH}\right)} {\sum_{H_{n} \in S_{K}}}^{\!\!\!\!\left(\mathrm{GH}\right)} O_{\varphi i} S_{\varphi j} P_{ \varphi k } T_{\varphi l}. \end{align} Note that $D_{\mathrm{init}}$ defines the bond dimension of the initial tensor. We will simply take $D_{\mathrm{init}}=D_{\rm cut}$ for evaluating $Z_{\rm B}$ in section~\ref{sec:Results_Wilsonboson} and $D_{\mathrm{init}}=D_{\rm cut}/2$ for the Witten index in section~\ref{sec:Results_freeWZ} because the bond dimension does not change after the coarse-graining steps under these choices. Here we mention the computational costs for the coarse-graining of tensor networks and for the construction of tensors. Both of them are mainly consists of the SVD and the contraction of tensor indices. Since the cost of the numerical SVD for square matrices is proportional to the third power of the matrix dimension, the computational effort required for the numerical decomposition described in eq.~\eqref{eq:cg_tensor} and in eqs.~\eqref{f1_svd_used} and~\eqref{f2_svd_used} are in proportion to $N^{6}$ and $K^{6}$, respectively. A contraction of tensor indices is expressed as a summation of them, so the cost of the contraction depends on the number of the tensor indices. Then it is proportional to ${D_{\mathrm{cut}}}^{6}$ when contracting the rank-three tensors described around eqs.~\eqref{eq:cg_tensor} and~\eqref{eq:cg_tensor_2}, and is proportional to $K^{2} \times {D_{\mathrm{init}}}^{4}$ when building the tensor in eq.~\eqref{boson_tensor_used}. For the coarse-graining step, one can find that the volume-dependence of the cost is milder than $D_{\mathrm{cut}}$-dependence as follows. Since the TRG is a coarse-graining of space-time, one can reach a large space-time volume by simply iterating the same local blocking procedures. More directly, the computational cost of the TRG is proportional to the logarithm of the space-time volume, i.e. the number of iterations. Summarizing the above, the computational cost for the coarse-graining of tensor networks is proportional to ${D_{\mathrm{cut}}}^{6} \times \ln V$, and that for the construction of tensors is proportional to $\max\left\{K^{6}, K^{2}\times {D_{\mathrm{cut}}}^{4}\right\}$, where $N = D_{\mathrm{init}} = D_{\mathrm{cut}}$ is simply assumed. \subsection{Free Majorana--Wilson fermion} \label{sec:Results_Majorana} Figure~\ref{fig:ZF} shows the logarithm of the fermion Pfaffian computed by the Grassmann TRG with varying $m$ for $V=2\times 2$~(top), $8\times 8$~(center), $32\times 32$~(bottom). The green, blue, and yellow symbols denote the results for three different bond dimensions: $D_{\rm cut}=8$, $12$, $16$, and the solid and open ones indicate the positive and negative sign of the Pfaffian, respectively. The purple curves represent the exact solutions given by eq.~\eqref{eq:Z_F_exact}. Three negative peaks at $m=0$, $-\sqrt{2}$, $-2\sqrt{2}$ correspond to the fermion zero modes, and the exact Pfaffian has the negative sign for $-2\sqrt{2}<m<0$ as can be seen in eq.~\eqref{eq:Z_F_exact}. In the top plot of figure~\ref{fig:ZF}, the green symbols ($D_{\rm cut}=8$) around the peak at the center are rather deviated from the exact solution, and they even have the opposite sign. The deviation becomes smaller as $D_{\rm cut}$ increases, and the yellow symbols ($D_{\rm cut}=16$) have the correct sign and agree well with the exact one even near the peak. The situation is further improved by taking larger volumes even for the smallest $D_{\rm cut}$, and the numerical results fit well with the analytical curve in the center and the bottom figures. These observation can also be clearly understood in figure~\ref{fig:ZF_error}, which shows the relative errors $\delta\left(\ln \left|Z_{\rm F}\right|\right)$ given by eq.~\eqref{eq:delta}. Note that the case for $D_{\rm cut}=16$ on $V=2\times 2$ have extremely small errors. This is because the maximal bond dimension of the coarse-grained tensors on $V=2 \times 2$ lattice is less than or equal to $D_{\rm cut}$. In other words, no truncation occurs in the TRG steps. This striking feature is only found in the pure fermion case. In contrast, the discretization error and the truncation error are inevitable in the boson case since the approximation already enters in deriving the tensor network representation of the boson partition function, and furthermore the tensor indices are truncated to carry out the numerical evaluation as seen in previous section. For all volumes used in the computation, the relative errors almost monotonically decreases as $D_{\rm cut}$ increases. Thus we can conclude that the Pfaffian with the correct sign is reproduced from the tensor network representation in eq.~\eqref{eq:TNR_F} with eq.~\eqref{eq:fermion_tensor} using the Grassmann TRG within tiny errors $\mathcal{O}\left(10^{-3}\right)$ for physically important parameters, $|m| \ll 1$, and larger volumes. \begin{figure}[htbp] \centering \includegraphics[width=0.8\hsize]{Fermion_V2x2.eps} \includegraphics[width=0.8\hsize]{Fermion_V8x8.eps} \includegraphics[width=0.8\hsize]{Fermion_V32x32.eps} \caption{$\ln \left(\left|Z_{\rm F}\right|\right)$ of free Majorana-Wilson fermions with $r=1/\sqrt{2}$ is plotted against $m$ for $V=2\times 2$~(top), $8\times 8$~(center), $32\times 32$~(bottom). The solid (open) symbols represent the positive (negative) sign of $Z_{\rm F}$. \label{fig:ZF}} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.7\hsize]{Fermion_V2x2_error.eps} \includegraphics[width=0.7\hsize]{Fermion_V8x8_error.eps} \includegraphics[width=0.7\hsize]{Fermion_V32x32_error.eps} \caption{Relative errors of $\ln\left(\left|Z_{\rm F}\right|\right)$ against $m$. The results are shown for $V=2\times 2$~(top), $8\times 8$~(center), $32\times 32$~(bottom). The solid (open) symbols represent the positive (negative) signs of $Z_{\rm F}$, respectively. \label{fig:ZF_error}} \end{figure} \subsection{Free Wilson boson} \label{sec:Results_Wilsonboson} The boson partition function is given as a discretized form $Z_{\rm B}\left(K\right)$ in eq.~\eqref{ZB_used} by applying the Gauss--Hermite quadrature to the integrals of $\phi$ and $H$. Then $K$ is the number of the discrete points. We prepare the initial tensor network approximately as eq.~\eqref{ZB_K_used} and compute it using the TRG for $m > 0$ because the adopted quadrature does not effectively work for $m<0$ (we will see this point later.). It is, however, sufficient to study the case of $m>0$ because the boson action does not depend on the sign of $m$, but on $m^2$, in the continuum theory. Figure~\ref{fig:ZB} shows the logarithm of $Z_{\rm B}\left(K\right)$ with fixed $K=64$, and figure~\ref{fig:ZB_error} shows the corresponding relative errors defined by eq.~\eqref{eq:delta}. One can see that the TRG results are consistent with the exact ones for large $m$ in all of the lattice sizes and $D_{\rm cut}=16$, $24$, $32$. Figure~\ref{fig:ZB_Dcut_dependence} shows that the results are systematically improved by increasing $D_{\rm cut}$ as one expects. The exponential improvement may be explained as follows. Usually the singular values of the tensor are exponentially decaying; thus from a local point of view the truncation error gets exponentially smaller by increasing $D_{\mathrm{cut}}$. Since the free energy consists of the local tensors, it is likely that its error shows such a behavior as well. The growth of the errors is observed near $m=0$. Roughly speaking, this is because the massless theory has no damping factors in $f_\mu$ of eq.~\eqref{fmu_used}. We can show that $f_\mu$ is expressed as \begin{align} f_\mu\left(\varphi,\varphi'\right) = \exp \Biggl\{&- \frac{1}{8}\left(H + \left(-1\right)^{\delta_{\mu 2}}\sqrt{2}\left(\phi - \phi^{\prime}\right)\right)^{2} - \frac{1}{8}\left(H^{\prime} - \left(-1\right)^{\delta_{\mu 2}}\sqrt{2}\left(\phi - \phi^{\prime}\right)\right)^{2} \nonumber \\ &- \frac{m^{2}}{16}\left(\phi + \phi^{\prime}\right)^{2} - \frac{m^{2}}{16}\left(1 + \frac{4\sqrt{2}}{m}\right)\left(\phi - \phi^{\prime}\right)^{2} \Biggr\}. \end{align} One can see that the damping factors are actually provided for $m>0$ with the damping rate $m^2$ but is not for $-4\sqrt{2} < m < 0$ on the line $\phi=-\phi'$, so the quadrature does not work for $m<0$. For $m>0$, we have to take $K$ larger as $m$ decreases so that the quadrature retains effective. That structure is encoded in the initial tensor in eq.~\eqref{boson_tensor_used} via the matrices $O,P,S,T$ and the singular values $\sigma_w,\rho_s$ in eqs.~\eqref{f1_svd_used} and~\eqref{f2_svd_used}. The singular values of the initial tensor have unclear hierarchies for small masses as seen in figure~\ref{fig:singular_values_of_initial_tensor}. Thus we find that, if $m$ approaches zero from the right, we have to take $K$ and $D_{\rm cut}$ as large as possible to obtain the precise result.\footnote{ Such a bad behavior could go away once the $\phi^{4}$ interaction term is introduced into the action because it provides the fast damping factor in $f_\mu$. } The $K$-dependence of the relative errors is investigated in figure~\ref{fig:K-dependence_ZB}. In order to purely see the discretization effect due to finite $K$, we set the maximum bond dimension of the tensor $K^2$ and choose the lattice size $V=2\times2$ that allows us to carry out a full contraction for the computation of the partition function. Although there are no other systematic errors except for finite $K$, the value of $K$ is practically restricted up to $10$. Figure~\ref{fig:K-dependence_ZB} shows that the errors decrease by increasing $K$. From this we can say that a simple discretization scheme such as the Gauss–Hermite quadrature well approximates the original integrals if $K$ is sufficiently large, and that the tensor network representation reproduces the correct values of the boson partition function. \begin{figure}[htbp] \centering \includegraphics[width=0.6\hsize]{Boson_V2x2.eps} \includegraphics[width=0.6\hsize]{Boson_V8x8.eps} \includegraphics[width=0.6\hsize]{Boson_V32x32.eps} \caption{$\ln \left(Z_{\rm B}\left(K\right)\right)$ of free Wilson bosons with $r=1/\sqrt{2}$ against $m$ for $V=2\times 2$~(top), $8\times 8$~(center), $32\times 32$~(bottom). The degree of the Hermite polynomial is fixed as $K=64$. \label{fig:ZB}} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.6\hsize]{Boson_V2x2_error.eps} \includegraphics[width=0.6\hsize]{Boson_V8x8_error.eps} \includegraphics[width=0.6\hsize]{Boson_V32x32_error.eps} \caption{Relative errors of $\ln \left(Z_{\rm B}\left(K\right)\right)$ against $m$ with fixed $K=64$. Top, center, and bottom figures show the results for $V=2 \times 2$, $8\times 8$ and $32 \times 32$, respectively. \label{fig:ZB_error}} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.9\hsize]{Boson_error_vsD.eps} \caption{$D_{\rm cut}$-dependence of relative errors of $\ln \left(Z_{\rm B}\left(K\right)\right)$ with $K=64$. } \label{fig:ZB_Dcut_dependence} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.6\hsize]{Boson_sigma_K64_D64.eps} \caption{Hierarchy of the singular values of the initial boson tensor for several masses with $K=64$.} \label{fig:singular_values_of_initial_tensor} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.6\hsize]{Boson_error_vsK.eps} \caption{$K$-dependence of the relative errors of $\ln \left(Z_{\rm B}\left(K\right)\right)$ on $V=2 \times 2$ lattice.} \label{fig:K-dependence_ZB} \end{figure} \subsection{Witten index of the free $\mathcal{N}=1$ Wess--Zumino model} \label{sec:Results_freeWZ} The Witten index computed by the Grassmann TRG is shown in figure~\ref{fig:Witten_index}. Figure~\ref{fig:Witten_index_error} shows the relative error of the Witten index. As discussed in section~\ref{sec:lattice_theory}, the fermion and the boson are decoupled from each other in the free case. In this section, however, we treat the free Wess--Zumino model as a combined system of fermions and bosons; thus we perform the Grassmann TRG for a single tensor network. One can see that the results tend to converge to the exact values by increasing $D_{\rm cut}$. The obtained indices with $D_{\rm cut}=64$ (yellow symbols) take the values near one compared with those of $D_{\rm cut}=32$ (green symbols). Thus we can conclude that eq.~\eqref{eq:19} gives a correct tensor network representation of the two-dimensional lattice $\mathcal{N}=1$ Wess--Zumino model. $Z_{\rm F}$ and $Z_{\rm B}$ become extremely large and extremely small, respectively, for large space-time volume. For instance, $Z_{\rm F}$ are of the order of $\mathcal{O}\left(10^{400}\right)$ at $m=1$ on $V=32 \times 32$ lattice as seen in figure~\ref{fig:ZF}. Surprisingly, $\mathcal{O}\left(1\right)$ values are obtained as the Witten index as seen in figure~\ref{fig:Witten_index}. Namely, the boson effect balancing huge $Z_{\rm F}$ is correctly reproduced using the Grassmann TRG for the total tensor. So we can say that the TRG is a very promising approach to study the supersymmetric field theories. \begin{figure}[htbp] \centering \includegraphics[width=0.6\hsize]{Wittenindex_V2x2.eps} \includegraphics[width=0.6\hsize]{Wittenindex_V8x8.eps} \includegraphics[width=0.6\hsize]{Wittenindex_V32x32.eps} \caption{The Witten index of the free Wess--Zumino model against $m$ on $V=2 \times 2$~(top), $8\times 8$~(center), $32 \times 32$~(bottom). \label{fig:Witten_index}} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.6\hsize]{Wittenindex_V2x2_error.eps} \includegraphics[width=0.6\hsize]{Wittenindex_V8x8_error.eps} \includegraphics[width=0.6\hsize]{Wittenindex_V32x32_error.eps} \caption{Relative errors of the Witten index as a function of $m$ on $V=2 \times 2$~(top), $8\times 8$~(center), $32 \times 32$ lattices~(bottom). \label{fig:Witten_index_error}} \end{figure} \section{Summary and outlook} \label{sec:Summary} We have shown that the two-dimensional lattice $\mathcal{N}=1$ Wess--Zumino model is expressed as a tensor network. The known techniques of making a tensor were refined in the fermion sector and generalized in the boson sector in the sense that it is possible to define a tensor for any way of discretizing the integrals for scalar fields. We have also tested our formulation in the free theory by estimating the Witten index and comparing it with the exact solution. The resulting indices reproduce the exact one as $D_{\rm cut}$, the dimension of the truncated tensor indices in the TRG, increases. Now we are tackling the issue on the supersymmetry breaking by estimating correlation functions from the tensor network. Before investigating the physical breaking effects, we have to show that the artificial ones by the lattice cut-off disappears in the continuum limit beyond the arguments of the perturbation theory. We will estimate the expectation value of the action, the supersymmetric Ward--Takahashi identity, and the mass spectra of fermions and bosons to show it. We will then see the supersymmetry breaking in the model with the double-well potential by estimating several physical quantities and study the phase structure in detail. Although we have only dealt with the Wilson type discretization of derivatives, one may use another way such as the domain wall discretization. In that case, partition functions or Green's functions will be represented as three dimensional tensor networks. For such higher dimensional tensor networks, the higher order TRG was introduced in Ref.~\cite{2012PhRvB..86d5139X}, and the Grassmann version was also proposed in Ref.~\cite{Sakai:2017jwp}. In this way one can in principle go this direction; however, the computational cost could be severe. Therefore further improvements of the algorithm might be needed for the actual computation in higher dimensions. We emphasize that the methodology of constructing the tensor is given for any superpotential, that is, any interacting case, in this paper. Since the Wess--Zumino model consists of various building blocks: the scalar field, the Majorana fermion, and their interactions such as the Yukawa- and the $\phi^4$-interactions, we expect that our method could be very useful in TRG studies of other theories.
\section{Introduction} The class of self-similar stochastic processes plays a key role in probability theory as they appear in some of the most fundamental limit theorems, see \cite{lamperti1962semi}, and in modeling they are used in geophysics, hydrology, turbulence and economics, see \cite{willinger1996bibliographical} for numerous references. This class of stochastic processes are invariant in distribution under suitable time and space scaling, that is, a stochastic process $(X_t)_{t\in\R}$ is called self-similar with index $H\in\R$ if for all $c>0$ the two processes $(X_{ct})_{t\in \R}$ and $(c^H X_t)_{t\in \R}$ equals in finite dimensional distributions. The only self-similar centered Gaussian process with stationary increments is the fractional Brownian motion (up to scaling), which is a centered Gaussian process $(X_t)_{t\in \R}$ with $X_0=0$ a.s.\ and covariance function \begin{equation}\label{sfdsfswfh} \mathrm{Cov}(X_t,X_s) = \frac{1}{2}(|t|^{2H}+|s|^{2H}-|s-t|^{2H}) \qquad \text{for all } s,t\in \R, \end{equation} where $H\in (0,1)$. The fractional Brownian motion has a \emph{moving average representation} and a \emph{harmonizable representation}, and both lead to the same process (defined by \eqref{sfdsfswfh}), for further details see Subsection~\ref{sdlfjhhs}. However for non-Gaussian processes their moving average and harmonizable representations are very different, see e.g.\ \cite{Camb1989} and \cite{SamoTaqqu1994} for the case of $\alpha$-stable processes. Only a very specific class of processes are exact self-similar, but a much larger class of processes behaves locally as a self-similar processes - this is already seen within the class of L\'evy processes. A stochastic process $(X_t)_{t\in\R}$ is said to be \emph{locally asymptotically self-similar} if there exists a number $H\in \R$ and a non-degenerate process $(T_t)_{t\in \R}$ such that \begin{align}\label{slkjdfljsd} \PBase*{\frac{X_{\epsilon t}}{\epsilon^H}}_{t\in\R} \xrightarrow[\epsilon \to 0_+]{d} (T_t)_{t\in\R}, \end{align} where $\xrightarrow{d}$ denotes converege in finite dimensional distributions. The process $T=(T_t)_{t\in\R}$ is called the tangent process of $X$, and by \eqref{slkjdfljsd}, $T$ is necessarily self-similar. Local self-similarity means that at small time-scales the stohastic process $(X_t)_{t\in\R}$ is approximately self-similar and may be approximated by its tangent process. This property was introduced to provide a more flexible modeling framework compared to global self-similarity. For applications, it has been used to study the behaviour of flows, see \cite{Crovella1996} and \cite{stoev2006lass}, and for showing high frequency asymptotic results, see \cite{Bardet-Surgailis} or \cite{BLP}. \medskip \noindent \textbf{Moving average fractional L\'evy motions:} Starting from the moving average representation of the fractional Brownian motion, \citep{Marquardt2006} has, among many others, studied fractional L\'evy processes defined as \begin{equation}\label{slfj} X_t = \int_{-\infty}^t \Big((t-s)_+^{\beta} - (-s)_+^\beta\Big)\,dL_s,\qquad t\in \R, \end{equation} where $\beta\in (0,1/2)$ and $(L_t)_{t\in \R}$ is a centered L\'evy process with finite second moment. Throughout this paper $x_+:=\max\{x,0\}$ and $x_-:=-\min\{x,0\}$ denote the positive and negative parts of any number $x\in\R$. In the following, we will call such processes for \emph{moving averages fractional L\'evy motions} to distinct them from their harmonizable counterpart. Under a regular variation assumption on the L\'evy measure of $L$ near zero, \cite{Marquardt2006} shows that a moving average fractional L\'evy motion is never self-similar, but it is locally asymptotically self-similar with tangent process the linear fractional stable motion, which is a process of the form \eqref{slfj} with $L$ being an $\alpha$-stable L\'evy process, cf.\ \cite{Camb1989} and Theorems~4.4 and 4.5 of \cite{Marquardt2006}. \medskip \noindent \textbf{Harmonizable fractional L\'evy motions:} Next we define the class of harmonizable fractional Lévy motions which includes the harmonizable fractional stable motion introduced in \cite{Camb1989}. \begin{definition} \label{def:hflm} A stochastic process $(X_t)_{t\in\R}$ is called a harmonizable fractional Lévy motion with parameters $(\alpha,H)\in \R^2$ if \begin{align}\label{def-hflm} X_t=\int_\R \frac{e^{its}-1}{is} \PBase*{a(s_+)^{-H-1/\alpha+1} + b(s_-)^{-H-1/\alpha+1}} \dif L_s, \quad t\in\R \end{align} where $L$ is a rotationally invariant complex-valued Lévy process, and $a,b\in \R$. \end{definition} The (over) parametrization in Definition~\ref{def:hflm} is chosen due to our forthcoming Assumption~(A). In fact under Assumption~(A) below, the $H$ parameter in Definition~\ref{def:hflm} turns out to be exactly the number $H$ in the definition of local asymptotic self-similarity. From Theorem~\ref{thm:hflm}, below, it follows that the harmonizable fractional Lévy motions have stationary increments and rotational invariant distributions. Furthermore, we give concrete conditions for existence of the harmonizable fractional L\'evy motion on $(\alpha, H)$ and the L\'evy measure of $L$. In \cite{Benassi2002}, local asymptotic self-similarity is studied for a slightly different class of harmonizable fractional motions under the assumption that all moments are finite, e.g.\ the Lévy measure $\nu$ of the Lévy process $L$ satisfies that \begin{equation}\label{dsfkhbhs} \int_{|x|>1} |x|^p\,\nu(dx)<\infty\qquad \text{ for all } p>0. \end{equation} Their result is the following: \begin{theorem}[Benassi, Cohen and Istas] \label{thmBCI} Let $(X_t)_{t\in \R}$ denote a harmonizable fractional L\'evy motion as in Definition~2.3 of \cite{Benassi2002} satisfying the moment condition (\ref{dsfkhbhs}). Then the process $X$ is locally asymptotically self-similar with index $H$ and tangent process the fractional Brownian motion, that is, \begin{align} \label{BCI} \PBase*{\frac{X_{\epsilon t}}{\epsilon^H}}_{t\in\R} \xrightarrow[\epsilon \to 0_+]{d} (c_0 B^H_t)_{t\in\R}. \end{align} where $(B^H_t)_{t\in \R}$ is a fractional Brownian motion with Hurst index $H$ and $c_0$ is a suitable constant. \end{theorem} The main aim of this work is to characterize the local asymptotic self-similarity of the harmonizable fractional L\'evy motion when $L$ has heavy tails, violating the moment condition \eqref{dsfkhbhs}. The methods of \cite{Benassi2002} rely heavily on power series expansion of the characteristic function which is only available under the assumption~(\ref{dsfkhbhs}). Instead of this assumption, we consider the case where the L\'evy measure $\nu$ is regular varying in the following sense. \medskip\noindent \textbf{Assumption (A):} \emph{Suppose that $L$ is a rotationally invariant complex-valued L\'evy process without Gaussian component and let $\nu$ denote its L\'evy measure. We assume that $\nu$ is absolutely continuous with respect to the two dimensional Lebesgue measure with a density $f:\R^2\to \R_+$ satisfying \begin{align*} {}& f(x)\sim c_0\Vert x \Vert^{-2-\alpha}\quad \; \,\text{ as } \Vert x \Vert \to \infty \qquad \text{ and} \\ {}& f(x) \leq C\Vert x \Vert^{-2-\alpha} \quad \text{for all }x\in\R^2, \end{align*} where $c_0, C>0$. } \medskip The following theorem, which is the main result of this paper, characterizes the local asymptotic self-similarity of harmonizable fractional L\'evy motions in the heavy-tailed case, and additional provides an existence result for them. \begin{theorem} \label{thm:lass} Let $(\alpha,H)\in \interval[open]{0}{2}\times\interval[open]{0}{1}$ and suppose that Assumption~(A) is satisfied. Then the harmonizable fractional L\'evy motion $(X_t)_{t\in\R}$, defined in \eqref{def-hflm}, is well-defined and it is locally asymptotically self-similar with index $H$ and tangent process the harmonizable fractional stable motion, that is, \begin{align} \label{align:LASSpropertyofHFLM} \PBase*{\frac{X_{\epsilon t}}{\epsilon^H}}_{t\in\R} \xrightarrow[\epsilon \to 0_+]{d} (C_t)_{t\in\R}, \end{align} where the convergence is in finite dimensional distributions and $(C_t)_{t\in\R}$ denotes a harmonizable fractional stable motion with parameters $(\alpha,H)$, which is defined in \eqref{def-hflm} with $L$ being a complex-valued rotationally invariant $\alpha$-stable L\'evy process. \end{theorem} The choice of constants for $(C_t)_{t\in\R}$ can be found by examining the proof. We note that the tangent process in Theorem~\ref{thm:lass} differs from the tangent processes appearing in Theorem~\ref{thmBCI} and Theorem~4.5 of \cite{Marquardt2006}. From this we infer that it is the behaviour of the L\'evy measure of $L$ close to zero which dominates in the moving average setting, whereas it is the behaviour of the L\'evy measure of $L$ far away from zero which dominates in the harmonizable setting. The structure of the paper is as follows: Section~\ref{sdlfjhhs} explains the role played by harmonizable processes within the class of stationary processes. Section \ref{sect:harmproc} introduces complex random measures, their integration and provide existence criterias for harmonizable processes. Finally, at the end of the last section, we present the proof of Theorem~\ref{thm:lass}. \section{Background on harmonizable processes}\label{sdlfjhhs} Stationary processes are one of the main classes of stochastic processes. For stationary, centered Gaussian processes, it is well-known that every $L^2$-continuous process $(X_t)_{t\in \R}$ has a \emph{harmonizable representation} of the form \begin{align}\label{dslfjsdf} X_t = \int_\R e^{its} \, M(ds), \quad t\in \R, \end{align} for some complex-valued Gaussian random measure $M$ defined on $\R$. Furthermore, a rather large class of these processes have, in addition, a \emph{moving average representation}, that is, a representation of the form \begin{align}\label{sflsf} X_t = \int_{\R} g(t-s)\, dB_s, \quad t\in\R, \end{align} where $g$ is a deterministic function and $(B_t)_{t\in \R}$ is a two-sided real-valued Brownian motion. (Note that, the Brownian motion may be viewed as a shift-invariant Gaussian random measure.) Indeed, the class of Gaussian processes having a moving average representation corresponds exactly to those processes with absolute continuous spectral measure $\mu$. Recall that the spectral measure $\mu$ is given by $\mu(A)=\mathbb E[ | M(A)|^2]$ for $A\in \mathcal B(\R)$, where $M$ is given in \eqref{dslfjsdf}. These classical results can be found in e.g.\ \cite{doob1953stochastic} or \cite{yaglom2004introduction}. The only centered Gaussian self-similar process with stationary increments is the fractional Brownian motion $(B^H_t)_{t\in \R}$ with Hurst index $H\in (0,1)$, and as already mentioned in the introduction, this process has the following two representations \begin{align*} B^H_t={}& \int_{\R} \PBase*{(t-s)_+^{H-1/2} - (-s)_+^{H-1/2}}\dif B_s, \ \ \text{(``moving average representation'')} \\ B^H_t={}& \int_{\R} \frac{e^{its}-1}{is} \abs{s}^{-H-1/2+1} \,M(ds), \qquad \quad \text{(``harmonizable representation'')}, \end{align*} which yields the same process in distribution, see Chapter~7.2 of \cite{SamoTaqqu1994} for further details. Hence, the fractional Gaussian noise $(B^H_n-B^H_{n-1})_{n\in \Z}$ has both a harmonizable, \eqref{dslfjsdf}, and a moving average, \eqref{sflsf}, representation. For comparison we will discuss the structure of stationary $\alpha$-stable processes with $\alpha\in (0,2)$ in the following. In sharp contrast to the Gaussian situation the class of $\alpha$-stable stationary increments self-similar processes, $\alpha\in (0,2)$, is huge, and is far from being understood by now. However, two natural generalizations of the fractional Brownian motion to the $\alpha$-stable setting are proposed in \cite{Camb1989} generalizing the fractional Brownian motion to $\alpha$-stabe processes by replacing the driving Gaussian random measure with an $\alpha$-stable random measure in its moving average and harmonizable representations. This leads to the \emph{harmonizable fractional stable motion} $(X_t)_{t\in \R}$, which is defined as \begin{align*} X_t=\int_\R \frac{e^{its}-1}{is}\PBase*{a(s_+)^{-H-1/\alpha +1} + b (s_-)^{-H-1/\alpha+1}}\, dL_s, \quad t\in\R, \end{align*} where $(L_t)_{t\in \R}$ is a two-sided, complex-valued, $\alpha$-stable, rotationally invariant L\'evy process, and to the \emph{linear fractional stable motion} $(X_t)_{t\in \R}$, which is defined as \begin{align*} X_t=\int_\R a\big((t-s)_+^{H-1/\alpha} - (-s)_+^{H-1/\alpha}\big) + b \big( (t-s)_-^{H-1/\alpha} - (-s)_-^{H-1/\alpha}\big) \dif L_s, \end{align*} where $(L_t)_{t\in\R}$ is a two-sided, real-valued, $\alpha$-stable, symmetric Lévy process. Notice that corresponding noise processes $(X_n-X_{n-1})_{n\in \Z}$ for the linear and harmonizable fractional stable motions are moving averages and harmonizable processes, respectively. Indeed, the Gaussian assumption is crucial for the above equality between the harmonizable and moving average representations to hold, as it turns out that harmonizable fractional stable motion and linear fractional stable motion as quite different processes, cf.\ \cite{Camb1989} and \cite{SamoTaqqu1994}. The seminal paper \cite{Rosinski1995} shows that every stationary $\alpha$-stable process has a \emph{unique} decomposition into a (mixed) moving average component, a harmonizable component and a process of the ``third kind'', which does not admit moving average nor harmonizable components. The class of mixed moving averages may be viewed as the class of processes having the least memory, whereas class of harmonizable processes is the class having the largest degree of memory, and the processes of the third kind are in between. These facts come from ergodic consideration, see the introduction of \cite{Ros-Sam} for more details, and are also illustrated by the fact that moving averages are always mixing and harmonizable processes are never ergodic nor mixing. Hence by studying moving averages and harmonizable processes, we are examining the two extremes of stationary $\alpha$-stable processes. Thus the comparison of results on local asymptotical self-similarity in the introduction between linear fractional stable motions and harmonizable fractional stable motions are, in fact, a comparison between $\alpha$-stable self-similar stationary increments processes with the least memory and with the most memory. This encircles the local asymptotical behaviour of general $\alpha$-stable self-similar processes with stationary increments. \section{Preliminaries on complex stochastic integration theory} \label{sect:harmproc} All random variables and processes will be defined on a probability space~$(\Omega, \mathcal{F}, \mathbb{P})$. A real-valued stochastic variable $X$ is symmetric $\alpha$-stable ($S\alpha S$) if for some $\alpha\in\interval[open left]{0}{2}$, the characteristic function of $X$ satisfies \begin{align*} \mathbb{E}\BBase*{\exp\Set*{i t X}} = \exp\PBase*{-\sigma^{\alpha} \abs{t}^{\alpha}},\qquad \text{for all } t \in \R, \end{align*} for some parameter $\sigma> 0$ called the scale parameter. If $\alpha=2$, then $X$ has a centered Gaussian distribution and $\sigma^2$ is the variance of $X$. Rotationally invariant random variables and processes are defined as follows: \begin{definition} A complex-valued random variable $X$ is \emph{rotationally invariant} if \begin{align} \label{align:rotinv} e^{i\theta}X\stackrel{d}{=}X, \quad \textrm{for all } \; \theta \in \interval[open right]{0}{2\pi}, \end{align} where $\stackrel{d}{=}$ denotes equality in distribution. Similarly, a complex-valued stochastic process $(X_t)_{t\in T}$ is \emph{rotationally invariant} if every complex linear combination is rotationally invariant, e.g.\ $\sum_{n=1}^N z_n X_{t_n}$ is rotationally invariant. \end{definition} Rotational invariance is called isotropy in some references but due to the ambiguity of isotropy we chose to use rotational invariance, cf.\ the discussion in Example 1.1.6 of \cite{SamorodnitskyBook}. A complex-valued process can equivalently be regarded as a $\R^2$-valued random variable, in which case rotational invariance is invariance in distribution wrt.\ rotation matrices. We will with some ambiguity switch between the $\C$ and $\R^2$. From the definition it is immediate that a rotationally invariant random variable $X=X_1+iX_2$ is symmetric and furthermore if it is infinitely divisible, then $X_1$ and $X_2$ share the same Lévy measure $\nu$. Let $\mathcal{B}(\R)$ denote the Borel sets on $\R$, $\mathcal{B}_b(\R)$ the bounded Borel sets on $\R$ and $L^0_{\C}(\Omega)$ the complex-valued random variables. For completeness, we define complex-valued infinitely divisible random measures and state well known stochastic integration results, cf.\ \cite{urbanik1968random} and \cite{RajputRosinski1989}. \begin{definition}[Complex-valued random measure] \label{definition:crm} A complex-valued random measure is by definition a complex-valued set function \begin{align*} M: \mathcal{B}_b(\R) \to L^0_{\C}(\Omega), \end{align*} such that for disjoints sets $A_1,A_2,\ldots \in \mathcal{B}_b(\R)$, the complex-valued random variables \begin{align*} M(A_1), M(A_2), \ldots \end{align*} are independent and infinitely divisible, and if $\bigcup_{n\in\N} A_n \in \mathcal{B}_b(\R)$ then \begin{align*} M\PBase*{\bigcup_{n=1}^\infty A_n}=\sum_{n=1}^{\infty} M(A_n) \quad a.s., \end{align*} where the series converges almost surely. \end{definition} Given a complex-valued random measure $M$ we can find a $\sigma$-finite deterministic measure $\lambda$ on $\R$ such that $\lambda (A_n)\to 0$ implies $M(A_n)\to 0$ in probability. We call $\lambda$ a control measure for the random measure $M$. Letting $\nu_A(\cdot)$ denote the Lévy measure of $M(A)$, we can then apply Proposition~2.4 of \cite{RajputRosinski1989} to obtain a decomposition such that \begin{align*} F(A\times B) \coloneqq \nu_A(B) = \int_\R \int_{\R^2} \mathds{1}_{A\times B}(s,x) \, \rho(s,dx) \lambda(ds), \end{align*} where $\{ \rho(s,dx)\}_{s\in\R}$ denotes a family of Lévy measures on $\R^2$. For the rest of the paper, we shall use the notation \begin{align} \label{align:Kfunc} K(\theta,s)\coloneqq \int_{\R^2} \BBase*{e^{i\langle \theta,x\rangle} -1 -\mathds{1}_{\Set{\Vert x \Vert \leq 1}}\langle \theta,x\rangle} \rho(s,dx), \quad (\theta,s) \in \R^2\times\R. \end{align} A simple complex-valued function $f:\R \to \C$ is a function of the (canonical) form \begin{align} \label{align:simplefunction} f(s)=\sum_{j=1}^n z_j \mathds{1}_{A_j}, \end{align} where $n\in\N$, $z_1,\ldots, z_n$ are complex numbers and $A_1,\ldots, A_n$ are disjoint sets from $\mathcal{B}_b(\R)$. For a simple function $f$, of the form \eqref{align:simplefunction}, and $A \in \mathcal{B}(\R)$ we define \begin{align*} \int_A f \dif M = \sum_{j=1}^n z_j M(A\cap A_j). \end{align*} A (general) measurable function $f:\R \to \C$ is said to be $M$-integrable, if there exists a sequence of simple function $\Set{f_n}_{n\in\N}$ such that \begin{enumerate}[label=(\roman*)] \item $f_n \to f$, $\lambda$-almost surely. \item for every $A\in\mathcal{B}(\R)$, the sequence $\Set{\int_A f_n \dif M}_{n\in\N}$ converges in probability, as $n\to\infty$. \end{enumerate} In the affirmative case, we define \begin{align*} \int_A f \dif M \coloneqq \mathbb{P}-\lim_{n\to\infty} \int_A f_n \dif M, \end{align*} where $\Set{f_n}$ satisfies (i) and (ii) and $\mathbb{P}-\lim$ denotes limit in probability. It can be shown that this definition does not depend on the approximating sequence $\Set{f_n}$. For further details on stochastic integration theory we refer to \cite{RajputRosinski1989}, \cite{SamorodnitskyBook}, \cite{SamoTaqqu1994} and \cite{urbanik1968random}. In the following $\Re(z), \Im(z)$ denotes real, respectively imaginary, part of a complex number $z$. \begin{theorem} \label{thm:CFforcomplexint} \ \\ (a): Let $f:\R\to\C$ be a measurable function.\ Write $f=f_1+if_2$. Then $f$ is $M$-integrable if the following condition hold true \begin{align*} \int_\R \int_{\R^2} \min \bigg( 1,\bigg[\Vert \Big( f_1(s)+f_2(s), \; f_1(s)-f_2(s) \Big) \Vert^2\bigg] \Vert x \Vert^2 \bigg) \rho(s,dx) \lambda (ds) < \infty, \end{align*} and, in the affirmative case, the characteristic function of $\int_{\R} f \dif M$ is given by \begin{align*} & \mathbb{E} \BBase*{ \exp\PBase*{i\Set*{\theta_1 \Re(\int_\R f \dif M) + \theta_2 \Im(\int_\R f \dif M)}}} \\ &\qquad = \exp\PBase*{\int_\R K\bigg( \theta_1f_1(s)+\theta_2 f_2(s),\; \theta_2 f_1(s)-\theta_1 f_2(s)\big) ,s\bigg) \, \lambda(ds)}. \end{align*} (b): Suppose $f_1,\ldots,f_n$ are $M$-integrable. The joint characteristic function is given by \begin{align*} &\mathbb{E}\BBase*{\exp\Set*{i \sum_{j=1}^n \Big(\theta_j^{(1)} \Re(\int f_j \dif M) + \theta_j^{(2)} \Im(\int f_j \dif M)\Big)}} \\ & \qquad = \exp\Big(\int_\R K\bigg(\sum_{j=1} \theta_j^{(1)} f_{j,1} + \theta_j^{(2)}f_{j,2}, \sum_{j=1}^n \theta_j^{(2)} f_{j,1} - \theta_j^{(1)} f_{j,2},s\bigg) \, \lambda(ds)\Big). \end{align*} (c): Let $M=M^{(1)}+iM^{(2)}$ be a rotationally invariant complex-valued random measure and let $f:\R\to\C$ be a measurable function. Then the following integrals exists simultaneously and are equal in distribution: \begin{align}\label{sdfljsldjf} \int_\R f \dif M \stackrel{d}{=} \int_\R \Vert {f}\Vert \dif M = \int_\R \Vert{f} \Vert \dif M^{(1)} + i \int_\R \Vert{f} \Vert \dif M^{(2)}. \end{align} \end{theorem} \begin{proof} (a) follows from the same steps as Theorem 2.7 in \cite{RajputRosinski1989} using complex-valued functions instead. (b) follows by the same steps as in the proof for Proposition 6.2.1(iii) of \cite{SamoTaqqu1994}. (c) follows by closely examining the results and arguments in \cite{urbanik1968random}. \end{proof} Often it is easier to think of the complex-valued stochastic integral as \begin{align*} \int_\R f \dif M_s =& \int_\R (f_1+if_2) \dif (M^{(1)}+iM^{(2)}) \\ =& \int_\R f_1 \dif M^{(1)} - \int_\R f_2 \dif M^{(2)} + i\PBase*{\int_\R f_1 \dif M^{(2)} + \int_\R f_2 \dif M^{(1)}} \end{align*} and show existence for each of the above four integrals separately (this is a more strict existence criterion). As a consequence of $(c)$, it is also necessary to prove existence of all of these four integrals, when $M$ is a rotationally invariant random measure. \section{Existence and properties of harmonizable fractional L\'evy motions} Recall that a harmonizable fractional Lévy motion $(X_t)_{t\in \R}$ is defined by \begin{align*} X_t=\int_\R \frac{e^{its}-1}{is} \PBase*{a(s_+)^{-H-1/\alpha+1} + b(s_-)^{-H-1/\alpha+1}} \dif L_s, \quad t\in\R, \end{align*} where $L$ is a rotational invariant complex-valued Lévy process. Our next result gives a general existence criterion for harmonizable fractional L\'evy motions together with some properties. \begin{theorem} \label{thm:hflm} Let $(L_t)_{t\in \R}$ be a complex-valued rotational invariant L\'evy process without Gaussian component. The harmonizable fractional Lévy motion $(X_t)_{t\in \R}$, defined in Definition~\ref{def:hflm}, with parameters $(\alpha, H)\in (0,2)\times (0,1)$ exists if both of the following (a)--(b) are satisfied: \begin{enumerate} \item $\int_{\abs{x} >1}\, \abs{x}^{\frac{1}{H+1/\alpha}} \, \nu_R (dx)<\infty$, \item $ \int_{\abs{x} \leq 1}\, \abs{x}^{\frac{1}{H+1/\alpha-1}} \, \nu_R (dx)<\infty$, \end{enumerate} where $\nu_R$ denotes the L\'evy measure of the real-part of $(L_t)_{t\in \R}$. Furthermore, if $X$ exists, then it has stationary increments, rotational invariant distribution and the characteristic function is given by \begin{align*} {}&\mathbb{E}\BBase*{\exp\Set*{i\left\langle \theta, \Big(\Re(X_t),\Im(X_t)\Big)\right\rangle}} \\ {}&\qquad = \exp\PBase*{\int_\R K\bigg( \theta_1f_1(s)+\theta_2 f_2(s),\; \theta_2 f_1(s)-\theta_1 f_2(s) ,s\bigg) \, \lambda(ds)}, \end{align*} for all $\theta=(\theta_1,\theta_2)\in \R^2$, where $K$ is given by (\ref{align:Kfunc}). \end{theorem} To prove Theorem~\ref{thm:hflm} we will first show the following lemma. In this result, and in the following, we will write $f(t)\sim g(t)$ as $t \to a$ for real-valued functions $f$ and $g$, if $\lim_{t\to a} (f(t)/g(t))=c$ for some constant $c\neq 0$. \begin{lemma} \label{lemma:asymptexistence} Let $L$ be a real-valued symmetric Lévy process without Gaussian component and L\'evy measure $\nu$. Let $f:\R\to\R$ be a measurable function, bounded on $[-1,1]^c$, and satisfying \begin{equation} \abs{f(s)}\sim \abs{s}^{\beta} \text{ as } s \to 0 \qquad \text{and}\qquad \abs{f(s)}\sim \abs{s}^{-\gamma} \text{ as } |s|\to \infty, \end{equation} for some $\beta\leq 0$ and $\gamma>0$. Then the stochastic integral $\int f \dif L$ exists if and only if the following two conditions (a) and (b) are satisfied: \begin{enumerate} \item \label{item:ii:lemma:asymptexistence} $\gamma > 1/2$ and the following condition hold true \begin{align*} \int_{\abs{x}>1}\abs{x}^{\frac{1}{\gamma}} \, \nu (dx) < \infty. \end{align*} \item \label{item:i:lemma:asymptexistence} We have that \begin{align*} \int_{\abs{x}\leq 1} \abs{x}^{\frac{1}{-\beta}} \, \nu (dx) < \infty. \end{align*} \end{enumerate} \end{lemma} If $\sim$ in Lemma~\ref{lemma:asymptexistence} is replaced by $f(s) = O(|s|^\beta)$ as $s\to 0$, or $f(s)=O(|s|^{-\gamma})$ as $|s|\to \infty$, the criteria for existence of the integral $\int f\,dL$ remain sufficient. Note that if $\beta > -1/2$, the second criterion holds for any Lévy measure. \begin{proof}[Proof of Lemma \ref{lemma:asymptexistence}] Writing out the conditions in Theorem 2.7 of \cite{RajputRosinski1989} and observing that these are increasing in the function $f$, it suffices to study these conditions for a function $g(s)\coloneqq \mathds{1}_{\interval{-1}{1}}(s)\abs{s}^{\beta} + \mathds{1}_{\interval{-1}{1}^c}(s) \abs{s}^{-\gamma}$. Recall that the general condition for existence of $\int g \dif L$ is given by \begin{align} \label{align:levyintegralexist} \int_{\R} \int_{\R} \min (1, \abs{xg(s)}^2) \, \nu(dx) \, \lambda (ds)<\infty, \end{align} where $\nu$ denotes the Lévy measure of $L$ and $\lambda$ denotes the Lebesgue measure. Divide this condition into the following four areas, \begin{align*} A_{11}&=\Set{(s,x)\in \R\times \R: \abs{s}\leq 1,\ \abs{x}\leq 1}, \\ A_{12}&=\Set{(s,x)\in \R\times \R: \abs{s}\leq 1,\ \abs{x}> 1}, \\ A_{21}&=\Set{(s,x)\in \R\times \R: \abs{s}> 1,\ \abs{x}\leq 1}, \\ A_{22}&=\Set{(s,x)\in \R\times \R: \abs{s}> 1,\ \abs{x}> 1}. \end{align*} The monotonicity of $g$ on these sets can then be used to simplify the condition in (\ref{align:levyintegralexist}) into \ref{item:ii:lemma:asymptexistence} and \ref{item:i:lemma:asymptexistence}. We first consider $A_{22}$ and let $x\in \interval{-1}{1}^c$ be given. Divide the inner integral into \begin{align*} &\int_{\Set*{\abs{s} > 1} \cap \Set{ \abs{s} > \abs{x}^{1/\gamma}}} \abs{x}^2 \abs{s}^{-2\gamma} \, \lambda(ds) +\int_{\Set{\abs{s}>1} \cap \Set{\abs{s} \leq \abs{x}^{1/\gamma}}} 1 \, \lambda(ds) \\ & \qquad = \abs{x}^2 \int_{\abs{x}^{1/\gamma}}^{\infty} \abs{s}^{-2\gamma} \, \lambda(ds) +2\lambda \PBase{\interval[open left]{1}{\abs{x}^{1/\gamma}}}, \\ & \qquad = \abs{x}^2 \BBase*{\frac{2}{-2\gamma +1}s^{-2\gamma+1}}_{\abs{x}^{1/\gamma}}^{\infty} + 2(\abs{x}^{1/\gamma}-1) \\ & \qquad = \abs{x}^2 \abs{x}^{-2 + 1/\gamma} \frac{-2}{-2\gamma +1} + 2(\abs{x}^{1/\gamma}-1)= 3 \abs{x}^{1/\gamma} -2, \end{align*} where we have used that $\gamma > 1/2$ to ensure the finiteness of the integral and afterwards that $\frac{2}{-2\gamma+1}<0$. Inserting the derived into the original criterion on the set $A_{22}$, we get that \begin{align*} \int_{\abs{x}>1} \BBase*{3\abs{x}^{1/\gamma} - 2} \, \nu (dx) < \infty. \shortintertext{Since the area $\abs{x}>1$ is of finite $\nu$-measure, this reduces to} \int_{\abs{x}> 1} \abs{x}^{1/\gamma} \, \nu (dx) < \infty, \end{align*} which is one of the stated criterions. For $A_{11}$, let $x\in \interval{-1}{1}$ be given and assume that $\beta < 0$. The inner integral can in this case be written as \begin{align*} & \int_{\Set{\abs{s} \leq 1 }\cap \Set{\abs{s}^{\beta}\leq \abs{x}^{-1}}} \abs{xg(s)}^2 \, \lambda (ds) + \int_{\Set{\abs{s} \leq 1}\cap \Set{\abs{s}^{\beta} > \abs{x}^{-1}}}\lambda (ds) \\ ={}& \abs{x}^2 \int_{1 \geq \abs{s} \geq \abs{x}^{-1/\beta}} \abs{s}^{2\beta} \, \lambda(ds) + \int_{\Set{\abs{s}\leq 1}\cap \Set{\abs{s} \leq \abs{x}^{-1/\beta}}} \lambda (ds) \\ ={}& \abs{x}^2 \frac{2}{2\beta+1}\BBase*{s^{2\beta +1}}_{\abs{x}^{-1/\beta}}^{1} + 2 \lambda(\interval{0}{\abs{x}^{-1/\beta}}). \end{align*} Inserting this into the outer integral we obtain \begin{align*} \int_{\abs{x} \leq 1}\PBase*{\abs{x}^2 \frac{2}{2\beta+1}\BBase*{s^{2\beta +1}}_{\abs{x}^{-1/\beta}}^{1} + 2 \lambda(\interval{0}{\abs{x}^{-1/\beta}})} \, \nu (dx) \end{align*} which reduces to the second condition by applying the definition of a Lévy measure. For $\beta = 0$, the proof is trivial. For $A_{12}$, let $x \in \interval{-1}{1}^c$ be given. We can again rewrite the inner integral into \begin{align*} &\int_{\Set{\abs{s} \leq 1}\cap \Set{\abs{s}^{-\gamma}\leq \abs{x}^{-1}}} \abs{x}^2 \abs{s}^{-2\gamma}\lambda(ds)+ \int_{\Set{\abs{s} \leq 1}\cap \Set{\abs{s}^{-\gamma} > \abs{x}^{-1}}} \lambda (ds) \\ ={}& \int_{\Set{\abs{s} \leq 1} \cap \Set{\abs{s} \geq \abs{x}^{1/\gamma}}} \abs{x}^2 \abs{s}^{-2\gamma} \, \lambda(ds) + \int_{\Set{\abs{s} \leq 1} \cap \Set{\abs{s} < \abs{x}^{1/\gamma}}} \lambda (ds) \\ ={}& 0 + \lambda(\interval{0}{1}) , \end{align*} where we used that $\abs{x} > 1$. Inserting this into the outer integral reduces to a trivial condition for Lévy measures. For the last area, $A_{21}$, let $x\in \interval{-1}{1}$ be given. In this case the condition similarly reduces to \begin{align*} \int_{\abs{x} \leq 1} \abs{x}^{2} \, \nu (dx) < \infty, \end{align*} which is trivial. This concludes the proof. \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:hflm}] Let $f$ denote the integrand of the harmonizable fractional L\'evy motion. Observe that $f$ is bounded on $[-1,1]^c$, and \begin{align*} f(s)=O(\abs{s}^{-H-1/\alpha}) \text{ as }|s|\to \infty, \quad \text{and} \quad f(s)=O(\abs{s}^{1-H-1/\alpha}) \text{ as }s\to 0. \end{align*} The existence criteria now follows by Lemma~\ref{lemma:asymptexistence}. The stationary increments follows by a straightforward extension of Theorem 4.1 in \cite{urbanik1968random} to continuous time, see also Theorem 6.5.1 in \cite{SamoTaqqu1994} for the stable case. The isotropic distribution follows immediately from $(c)$ in Theorem \ref{thm:CFforcomplexint}. \end{proof} We are now ready to complete the proof of our main result. \begin{proof}[Proof of Theorem \ref{thm:lass}] We study the characteristic function of the finite dimensional distributions for the left-hand side of (\ref{align:LASSpropertyofHFLM}) and show convergence towards the characteristic function of harmonizable fractional stable motion. The characteristic function for the finite dimensional distribution of (\ref{align:LASSpropertyofHFLM}) is given by Theorem~\ref{thm:CFforcomplexint}. For $(\theta^{(1)}_j,\theta^{(2)}_j)\in \R^2$ for $j=1,\dots,n$, we have that \begin{align} \label{align:lassCF} A_\epsilon:={}& \log \Aver*{\exp\PBase*{i\sum_{j=1}^n \BBase*{\theta_j^{(1)} \frac{\Re(X(\epsilon t_j))}{\epsilon^H}+\theta_j^{(2)} \frac{\Im(X(\epsilon t_j))}{\epsilon^H}}}} \nonumber \\ ={}& \int_\R \psi \Bigg( \epsilon^{-H} \sum_{j=1}^n \theta_j^{(1)} f_{\epsilon t_j,1}(s) + \epsilon^{-H}\sum_{j=1}^n \theta_j^{(2)} f_{\epsilon t_j,2}(s), \nonumber \\ &\quad \quad \quad \epsilon^{-H} \sum_{j=1}^n \theta_j^{(2)} f_{\epsilon t_j,1}(s) - \epsilon^{-H} \sum_{j=1}^n \theta_j^{(1)} f_{\epsilon t_j,2}(s)\Bigg) \dif s, \end{align} where $f_{\epsilon t_j,1}, f_{\epsilon t_j,2}$ denotes the real, respectively imaginary, part of integrand $f_{\epsilon t_j}$ for $X_{\epsilon t_j}$ and with $z=(z_1,z_2)$ \begin{align*} \psi (z_1,z_2) \coloneqq \int_{\R^2} \BBase*{e^{i\langle z,x\rangle} -1 -\mathds{1}_{\Set{\Vert x \Vert \leq 1}}(x)\langle z , x \rangle}\, \nu (dx) \end{align*} Writing $u=\epsilon s$, we substitute the $\epsilon$ out of the time index of $f$ and obtain \begin{align*} f_{\epsilon t}(s) = \frac{e^{i\epsilon ts}-1}{is} \PBase*{a(s_+)^{-H-1/\alpha + 1}+b(s_-)^{-H-1/\alpha + 1}}= f_t(u) \epsilon^{H+1/\alpha}. \end{align*} Making the substitution $u=\epsilon s$ in equation (\ref{align:lassCF}) thus yields that \begin{align*} A_\epsilon =&\int_{\R} \psi \left( \epsilon^{H+1/\alpha - H} \PBase*{ \sum_{j=1}^n \theta_j^{(1)} f_{t_j,1}(u) + \sum_{j=1}^n \theta_j^{(2)} f_{t_j,2}(u)}, \right. \\ &\phantom{\int_{\R} \psi \Big(\ }\left. \epsilon^{H+1/\alpha - H} \PBase*{\sum_{j=1}^n \theta_j^{(2)} f_{t_j,1}(u) - \sum_{j=1}^n \theta_j^{(1)} f_{t_j,2}(u)} \right) \epsilon^{-1}\dif u. \end{align*} To simplify notation, define $g_{\theta,t}(u)\in \R^2$ by \begin{align} \label{align:gfunc} \bigg( \Big( \sum_{j=1}^n \theta_j^{(1)} f_{t_j,1}(u) + \sum_{j=1}^n \theta_j^{(2)} f_{t_j,2}(u)\Big), \Big( \sum_{j=1}^n \theta_j^{(2)} f_{t_j,1}(u) - \sum_{j=1}^n \theta_j^{(1)} f_{t_j,2}(u) \bigg), \end{align} and let $k(z,x)\coloneqq e^{i\langle z,x\rangle} -1 -i\mathds{1}_{D^c}(x) \langle z,x \rangle$. Inserting the defined notation, this implies that we may rewrite the characteristic function to \begin{align} \label{align:defofh} A_{\epsilon} = &\int_\R \int_{\R^2} k(\epsilon^{1/\alpha}g_{\theta,t}(u),x)\, \nu (dx) \epsilon^{-1}\dif u \nonumber \\ =&\int_\R \int_{\R^2} k(\epsilon^{1/\alpha}g_{\theta,t}(u),x) \, f(x) \dif x \, \epsilon^{-1} \dif u \nonumber \\ =& \int_\R \int_{\R^2} k(g_{\theta,t}(u),x) f(\epsilon^{-1/\alpha}x) \epsilon^{2(-1/\alpha)} \dif x \dif \epsilon^{-1} \dif u, \end{align} where we used $\nu (dx)=f(x) \dif x$ and a simple scaling of parameters in $\R^2$. The next step is to show pointwise convergence of the integrand as $\epsilon \to 0_+$. After this we apply the dominated convergence theorem to insert the found limit under the integral. We postpone the argument for dominated convergence theorem until the end of this proof. Assumption~(A) on the Lévy measure $\nu$ gives us that for every $\delta>0$ we can find $R_{\delta} > 0$ such that \begin{align*} 1-\delta \leq \frac{f(x)}{\Vert x \Vert^{-2-\alpha}}\leq 1+\delta, \quad \text{for }\Vert x \Vert \geq R_{\delta}. \end{align*} Fix $x\in \R^2\setminus \Set{0}$ and $u\in\R$. For every $\delta > 0$ we can choose $\epsilon$ sufficiently small such that $\Vert \epsilon^{-1/\alpha} x \Vert > R_{\delta}$, which implies that \begin{align*} 1-\delta \leq\frac{f(\epsilon^{-1/\alpha}x)e^{-2/\alpha-1}}{\Vert x \Vert^{-2-\alpha}}=\frac{f(\epsilon^{-1/\alpha}x)}{\Vert \epsilon^{-1/\alpha}x\Vert^{-2-\alpha} }\leq 1+\delta. \end{align*} Thus in the limit we find that \begin{align*} &\lim_{\epsilon \downarrow 0} f(\epsilon^{-1/\alpha}x)\epsilon^{-2/\alpha -1} = \Vert x \Vert^{-2-\alpha}, \shortintertext{and hence } &\lim_{\epsilon \downarrow 0} k(g_{\theta,t}(u),x)f(\epsilon^{-1/\alpha}x)\epsilon^{-2/\alpha -1} = \Vert x \Vert^{-2-\alpha}k(g_{\theta,t}(u),x). \end{align*} This finishes the proof of pointwise convergence for $f_\epsilon$ as $\epsilon \to 0$. Applying the dominated convergence theorem we find that \begin{align} \label{align:CFofLASSlimit} &\lim_{\epsilon \downarrow 0} \log \Aver*{\exp\PBase*{i\sum_{j=1}^n \BBase*{\theta_j^{(1)} \frac{\Re(Y(\epsilon t_j))}{\epsilon^K}+\theta_j^{(2)} \frac{\Im(Y(\epsilon t_j))}{\epsilon^K}}}} \nonumber \\ &\qquad =\lim_{\epsilon \downarrow 0}\int_\R \int_{\R^2} k\PBase*{g_{\theta,t}(u),x} f(e^{-1/\alpha}x) \epsilon^{-2/\alpha-1} \dif x \dif u \nonumber \\ &\qquad = \int_\R \int_{\R^2} k\PBase*{g_{\theta,t}(u),x} \Vert x \Vert^{-2-\alpha} \dif x \dif u. \end{align} The book \cite{applebaum2009levy}, p.~37, identifies $\Vert x \Vert^{-2-\alpha}$ in (\ref{align:CFofLASSlimit}) as the Lévy measure of a rotationally invariant two-dimensional $\alpha$-stable Lévy process. We can continue our derivations in polar coordinates and observe that the inner integral may be rewritten as \begin{align*} {}&\int_{\R^2} k\PBase*{g_{\theta,t}(u),x} \Vert x \Vert^{-2-\alpha} \dif x \\ ={}& \int_0^{2\pi} \int_0^\infty k\PBase*{g_{\theta,t}(u),r(\cos(s),\sin(s))} \, r^{-1-\alpha} \dif r \dif s \\ ={}& \int_{0}^{2\pi} -c_0 \abs{\langle g_{\theta,t}(u), \big( \cos(s),\sin(s)\big) \rangle}^{\alpha} \dif s. \end{align*} Here we used the following result, which follows by substituting $z=yr$, \begin{align*} - c_0 \abs{y}^{\alpha} = \int_0^\infty \BBase*{\exp(iyr)-1 -i \mathds{1}_{\Set{\Vert r \Vert \leq 1}}(x) yr} r^{-1-\alpha} \dif r, \end{align*} where $c_0\coloneqq \int_0^\infty \BBase{\cos(r)-1}\, r^{-1-\alpha} \dif r$. Write $g_{\theta,t}(u)=\Vert g_{\theta,t}(u)\Vert(\cos(\kappa_u),\sin(\kappa_u))$ in polar form for some $\kappa_u$. Inserting this notation and applying a standard trigonometric rule, we obtain \begin{align*} {}& \int_{0}^{2\pi} -c_0 \abs{\langle g_{\theta,t}(u), \big( \cos(s),\sin(s)\big) \rangle}^{\alpha} \dif s. \\ ={} & - c_0 \Vert g_{\theta,t}(u)\Vert^{\alpha} \int_0^{2\pi} \abs{\langle(\cos(\kappa_u),\sin(\kappa_u)), (\cos(s),\sin(s))\rangle}^{\alpha} \dif s \\ ={} & - c_0 \Vert g_{\theta,t}(u)\Vert^{\alpha} \int_0^{2\pi} \abs{\cos(\kappa_u) \cos(s) + \sin(\kappa_u)\sin(s)}^{\alpha} \dif s \\ ={} & - c_0 \Vert g_{\theta,t}(u)\Vert^{\alpha} \int_0^{2\pi} \abs{\cos(s-\kappa_u)}^{\alpha} \dif s = - c_0 \Vert g_{\theta,t}(u)\Vert^{\alpha} c_1, \end{align*} where $c_1 = \int_0^{2\pi} \abs{\cos(s)}^{\alpha} \dif s$. Inserting this into~(\ref{align:CFofLASSlimit}), we identify the characteristic function as \begin{align*} \exp \PBase*{ - c_0c_1 \int_{\R} \Vert g_{\theta,t}(u)\Vert^{\alpha} \dif s} \end{align*} which is the characteristic function of harmonizable fractional stable motion stated in Theorem 6.3.4 of \cite{SamoTaqqu1994} and on p.\ 359 of the same book when we insert $g_{\theta,t}$ (up to a scaling factor). Thus all that remains is the argument for dominated convergence theorem in equation~(\ref{align:CFofLASSlimit}). By assumption there exists a $C > 0$ such that $f(x) \leq C\Vert x \Vert^{-2-\alpha}$ for all $x\in\R$. This implies that \begin{align*} f(\epsilon^{-1/\alpha}x)e^{-2/\alpha-1} \leq C \Vert \epsilon^{-1/\alpha} x \Vert^{-2-\alpha} \epsilon^{-2/\alpha -1}=C\Vert x\Vert^{-2-\alpha}. \end{align*} Thus a good candidate for a dominating (integrable) function would be \begin{align*} F(x,u)=\Vert\PBase{g_{\theta,t}(u),x} \Vert C \Vert x \Vert^{-2-\alpha}. \end{align*} From classical theory of Lévy measures, we know that \begin{align*} &\abs{k\PBase{g_{\theta,t}(u),x}} \leq 1\wedge \BBase*{\Vert g_{\theta,t}(u) \Vert^2 \Vert x \Vert^2}, \intertext{which implies that} &F(x,u) \leq C \PBase*{\Vert x \Vert^{-2-\alpha} \wedge \BBase*{\Vert g_{\theta,t}(u) \Vert^2 \Vert x \Vert^{-\alpha} }}. \end{align*} By changing to polar coordinates we obtain that (the constant changes from line to line) \begin{align*} &\int_\R \int_{\R^2} C \PBase*{\Vert x \Vert^{-2-\alpha} \wedge \BBase*{\Vert g_{\theta,H,t}(u) \Vert^2 \Vert x \Vert^{-\alpha} }} \dif x \dif u \\ & \qquad = \int_\R \int_0^{2\pi} \int_0^\infty C \PBase*{r^{-2-\alpha} \wedge \BBase*{\Vert g_{\theta,H,t}(u) \Vert^2 r^{-\alpha} }} r \dif r \dif \psi \dif u \\ & \qquad \leq \sum_{j=1}^n C\int_\R \int_0^\infty \PBase*{r^{-1-\alpha} \wedge \BBase*{\Vert f_{t_j}(u) \Vert^2 r^{-\alpha+1} }} \dif r \dif u, \end{align*} where $f_t$ denotes the integrand of the harmonizable fractional Lévy motion at time $t$. This is exactly the criterion for the existence of the stochastic integral $\int \abs{f_t} \dif \tilde{L}_s$ wrt. an $\alpha$-stable real-valued Lévy process $\tilde{L}$. By the choice of $(\alpha,H)\in \interval[open]{0}{2}\times \interval[open]{0}{1}$ such an integral exists by the existence of the harmonizable fractional stable motion for these parameters. This concludes the argument for dominated convergence and hence the proof. \end{proof} \bibliographystyle{plainnat}
\section{Introduction} Information Retrieval Systems (IRS) are computer assistants that help to retrieve digital documents, in which user is supposed to found relevant information for his task. Hence an IRS \emph{is} about semantics, because user information needs is topically related and serve to help to accomplish user's task. \vspace{0.3em} Curiously, most commercial and experimental search engine do not handle any sort of semantics nor knowledge to solve queries. This is because matching computations are mostly based on statistical word distributions, and intersection between query and documents. Also, most IR models see query and document as simple bag of word. Though, these systems provide satisfaction to their user, as long as statistics are possible, i.e. documents are long enough and queries are expressed using the same vocabulary as documents. \vspace{0.3em} When we are not in this situation, that is, if documents to be retrieved are very short and/or there is a strong discrepancy between document vocabulary and user's one, IRS are facing the problem of \emph{term mismatch}. For example, the collection Europeanna\footnote{http://www.europeana.eu} gives access to millions of digital objects from cultural heritage, by a very small textual meta-data description. Even, descriptions are made by specialists that are prone to use technical terms. \vspace{0.3em} Hence, in this paper we propose to study the effect of exploiting semantic resources to reduce term mismatch negative effect on collection with specialized vocabularies. We focus on automatically constructed resources, namely word Embedding resources, first because they cover a very large vocabulary, and second, because they seem to capture interesting word semantics \citep{article6}. \vspace{0.3em} A very simple way to exploit a resource to solve term mismatch, is to expand queries or documents with words that are semantically similar according to the resource. This approach has been heavily studied \citep{Carpineto:2012:SAQ:2071389.2071390} and suffers from a definitive problem: how to control query meaning shift when a-priory the query is statically modified, i.e. for all documents ? \vspace{0.3em} In this paper, we propose not to change the query nor the document but to adapt the matching function. This adaptation requires to change the formula that computes the Relevant Status Value (RSV). This formula depends on the Information Retrieval (IR) model. \vspace{0.3em} There are several large categories of IR model: Vector Space, Logical Based, Probabilist, Graph Based, and Language Models (LM). Among these models, only the Probabilist models like the famous BM25 formula of Robertson \citep{robertson1995okapi}, or Language Models provide state of the art results. Some recent proposals of IR Graph Modeling \citep{DBLP:conf/f-ic/BannourZN16} have the advantage to fuse one single model document index and knowledge base, and exploit only one matching function: activation propagation from query term to document through indexing terms and knowledge concept nodes. Beside the nice property of this model to exploit a Knowledge Base at query time, without query or document expansion, experiments of this model are still bellow the state of the art of Probabilistic or Language models. For this reason, we have decided to work on the transformation of a Language Model formula. We did not chose a Probabilistic model because formulas of the LM model are much simpler for similar results \citep{introIR}, hence they are easier to transform. \vspace{0.3em} A simple way to include a Knowledge Resource in a LM matching function, is Translation Language Models \citep{Stat_trans} where the translation probability between query and document terms is taken into account, in addition to the exact term matching. Probability are estimated using the mutual information between the two terms and is the highest if the considered terms have the same distribution over the collection. This computation can be considered as an automatic basic knowledge resource extracted from the corpus itself. Recently, it has been proposed to estimate the translation probability using Neural Word Embedding \citep{article2}. \vspace{0.3em} Word Embedding denotes a set of methods to produce Knowledge resources with vector representation of words\footnote{Most of the time the vectors are real-valued.} that express some semantics learned from word usage in very large text collection. Usually these methods are based on the distributional hypothesis \citep{harris54}: \emph{words that occur in the same contexts tend to have similar meaning}. The vector representation of words are computed using their context so that words with similar meaning will have similar vector representation. Word Embedding includes dimension reduction techniques on the word co-occurrence matrix (Latent Semantic Analysis \citep{LSA}), probabilistic models (Latent Dirichlet Allocation \citep{LDA}) and more recently shallow neural network-based methods such as the skip-gram model that can also learn phrases vector representations and is very effective on word similarity and word analogy tasks \citep{article7}. As we said before, these vector representations can be used to capture semantic relationships between words by measuring the similarity between the vectors, with the cosine similarity measure for example. \vspace{0.3em} Such vector representation could help us with the vocabulary mismatch problem since they provide us a new way to estimate the translation probability between query and document terms by considering their semantic similarity. The empirical results show that improving Dirichlet Language Model using Word Embedding is possible. \vspace{0.3em} In the rest of this paper, we first recall LM formulas in section \ref{LM}, present the extension with the translation model in section \ref{TLM}, then the usage of Word Embedding within this model in section \ref{WE}. We present the implementation of this model in section \ref{data} and results on the Cultural Heritage in CLEF (CHiC) Dataset\footnote{http://ims.dei.unipd.it/data/chic/}, a sub part of the Europeanna, in section \ref{Results}. \section{Language models} \label{LM} In this part, we recall basics on the Language Model in order to detail our modifications of the formula in the next section. The query likelihood Language Model aims to rank documents $d$ by computing the probability of a document interpreted as the likelihood that it is relevant to the query $q$. Hence, the Relevance Status Value (RSV) of a Language Model based IR is expressed by: \begin{equation} RSV(q,d) = p(d|q) \end{equation} Using Bayes rule, we have: \begin{equation} RSV(q,d) = \frac{p(q|d) p(d)}{p(q)} \end{equation} We can ignore the constant $p(q)$ to rank documents and we also consider that $p(d)$ is uniform over all the documents of the collection and can also be ignored. Therefore, to rank documents with respect to a given query, we only have to compute the probability of having $q$, knowing $d$. In LM model, document $d$ is replaced by its language model, i.e. the probability distribution of terms of the vocabulary in $d$ denoted $\theta_d$. So the RSV is: \begin{equation} RSV(q,d) \simeq_{rank} p(q|\theta_d) \end{equation} In this work, we chose the multinomial event model for $\theta_d$, and the unigram language model\footnote{Usually in IR the unigram language model give the best results with the lowest computational cost \citep{introIR}}, so the probability of a given word does not depend on its context: \begin{equation} RSV(q,d) \simeq_{rank} log \left( p(q|\theta_d) \right) = \sum\limits_{i = 1 }^{|q|} log\left( p(q_i|\theta_d) \right) \label{eq1} \end{equation} With $q_i$ the $i^{th}$ term of the query and $|q|$ the query size. To estimate $p(q_i|\theta_d)$, Dirichlet Language Model is used since it has been shown to work better with Translation Language Models \citep{article4} : \begin{equation} p(q_i|\theta_d) = \frac{|d|}{\mu + |d|} p_{ml}(q_i | \theta_d) + \frac{\mu}{\mu + |d|}p(q_i|C) \label{eq2} \end{equation} $\mu \in \mathds{R}^+$ is the smoothing parameter and $p_{ml}(q_i | \theta_d)$ is estimated using the maximum likelihood \footnote{We consider that terms in a document follow a multinomial distribution} and is equal to: \begin{equation} p_{ml}(q_i | \theta_d) = \frac{c(q_i , d)}{|d|} \end{equation} With $c(q_i , d)$ the frequency of $q_i$ in $d$ and $|d|$ the document size. The same goes for $p(q_i|C)$ the smoothing term which is also estimated with the maximum likelihood : $p(q_i|C) = c(q_i , C)/|C|$. This estimation of $p(q_i|\theta_d)$ leads to the following ranking formula (see \hyperref[demo1]{\textit{the appendix}} for more details) : \begin{equation} RSV(q,d) \simeq_{rank} \sum\limits_{i : c(q_i , d) > 0} \left[ log\left( 1 + \frac{c(q_i , d)}{\mu p(q_i | C)} \right) \right] + |q|log \left(\frac{\mu}{\mu + |d|} \right) \label{eq3} \end{equation} We decided to present equations (\ref{eq2}) and (\ref{eq3}) even though they are equivalent for ranking documents because both of them can be found to describe Dirichlet Language Model. In the frame of our work, and for reasons that are developed in \hyperref[para]{\textit{the appendix}}, we will introduce the next models by giving the expression of $p(q_i|\theta_d)$ as in equation (\ref{eq2}). \vspace{0.3em} As we said previously, one issue of these models is the term mismatch problem: as we can see on equation (\ref{eq3}) ranking takes into account only the terms that appear in both the considered document and query. Consequently, relevant documents that do not contain the exact query terms will not be considered. One approach to solve this problem is to adapt the language model to take into account the semantic similarities between terms. \section{Translation Language Models} \label{TLM} Translation Language Models (TLM) try to estimate the semantic similarity between two terms by using tools from statistical translation. The main idea is to estimate the likelihood of translating a document to a query using the translation probability between terms \citep{article4}. To do so, the maximum likelihood estimator in the Dirichlet language model $p_{ml}(q_i | \theta_d)$ is replaced with the likelihood that the query has been produced by a translation of the document $ p_t(q_i|\theta_d)$: \begin{equation} p(q_i|\theta_d) = \frac{|d|}{\mu + |d|} p_t(q_i|\theta_d) + \frac{\mu}{\mu + |d|}p(q_i|C) \end{equation} \noindent $p_t(q_i|\theta_d)$ is calculated the following way : \begin{equation} p_t(q_i|\theta_d) = \sum_{u \in d} p_t(q_i|u)p_{ml}(u|\theta_d) \end{equation} With $p_t(w|u)$ the probability to translate term $u$ into term $w$ which is estimated using mutual information between $u$ and $w$ \citep{article4} : \begin{equation} p_t(w|u) = \frac{I(w , u)}{ \sum\limits_{w' \in V}I(w' , u) } \end{equation} $I(w,u)$ is the mutual information score between word $u$ and $w$, defined as follow : \begin{equation} I(w,u) = \sum\limits_{X_w = 0,1} \sum\limits_{X_u = 0,1} p(X_w , X_u) log \left( \frac{p(X_w , X_u)}{p(X_w) p( X_u)} \right) \end{equation} With $X_w$ and $X_u$ binary random variables indicating if a word is absent or present (refer to \citep{article4} for more details). \section{Word Embedding-based Translation Language Model } \label{WE} Within the frame of this work, word Embedding are used instead of mutual information in order to estimate the translation probability $p_t(q_i|u)$. The model is named Word Embedding-based Translation Language Model (WETLM). We consider the new estimation of the translation probability, denoted $p_{cos}(q_i|u)$, to be proportional to the similarity between $q_i$ and $u$ that is measured with the cosine between the vectors of the two terms : \begin{equation} p_{cos}(q_i|u) = \frac{cos(q_i , u)}{\sum\limits_{u' \in V} cos(u' , u) } \label{trans_proba} \end{equation} Consequently the ranking formula becomes : \begin{equation} p(q_i|\theta_d) = \frac{|d|}{\mu + |d|} p_{cos}(q_i|\theta_d) + \frac{\mu}{\mu + |d|}p(q_i|C) \label{rank_formula} \end{equation} With $p_{cos}(q_i|\theta_d) = \sum_{u \in d} p_{cos}(q_i|u) p_{ml}(u|\theta_d)$. Both the estimation of the translation probability $p_t$ and $p_{cos}$ underestimate the self-translation probability: we can have $p_{cos}(u|w) > p_{cos}(u|u)$ for $u \neq w$ which is not desirable for a translation language model \citep{axiom}. One way to make sure that the self-translation probability is the highest for a given term is to redefine it by introducing a hyper-parameter $\alpha \in [0,1]$ that "controls" the self-translation probability \citep{article4}: \begin{equation} p_{cos-\alpha}(w|u) = \begin{cases} \alpha + (1 - \alpha)p_{cos}(w|u) & \mbox{if } u=w \\ (1 - \alpha)p_{cos}(w|u) & \mbox{if } u \neq w \end{cases} \end{equation} This formula ensures the fact that we have $p_{cos-\alpha}(u|u) > p_{cos-\alpha}(u|w) \forall u , w \in V$ for $\alpha > 0.5$. The model that uses $p_{cos-\alpha}$ to estimate the translation probability will be referred as WETLM-$\alpha$. We set the value of $\alpha$ to 0.45 since it is the one that produced the best results for the Threshold T = 0.7. This approach was not developed in the paper \textit{Integrating and Evaluating Neural Word Embedding in Information Retrieval} by \cite{article2} since they reported that the word Embedding they used did not underestimate the self-translation probability. \section{Implementation and data} \label{data} For this work, instead of using an already existing Information Retrieval System (IRS) such as \href{http://terrier.org/}{\textit{Terrier}}, we developed our own IRS in C++ to easily add word Embedding to the classical models and also because having a low retrieval time\footnote{Which is the case with Terrier} is not an objective: before trying to compute a fast IRS, we should make sure that the Word Embedding-based language models outperforms state of the art Language models. In order for our results to be comparable with other work that used Terrier, we made sure that with the same pre-processing on the corpus, we obtain the same results as Terrier ( see \hyperref[para3]{\textit{the appendix}} for more details about our IRS ). When doing so, we noticed that Terrier does not implement Dirichlet language model using equation (\ref{eq3}) (more details in \hyperref[para2]{\textit{the appendix}}). \vspace{0.3em} During pre-processing, we used a Stop List and replaced capital letters with lower case letters on both the collection and the queries. In order to have the same results as Terrier with our IRS, we also removed characters that were not digits or letters and deleted words that contained more that 4 digits or more than 3 consecutive identical characters. We did not use any stemmer on our collection since the best results were obtained without any stemming. \vspace{0.3em} We used the Cultural Heritage in CLEF (CHiC) 2012 English collection for ad hoc retrieval. This collection is composed of 1 107 176 documents containing "metadata records describing digital representations of cultural heritage objects" \citep{article5} and 50 queries for \textit{ad hoc} retrieval tasks. Below is a table summing up some statistics of the collection: \begin{table}[ht!] \centering \begin{tabular}{|c|c|c|c|c|} \hline \#d & Avdl & Vocabulary Size & \#q & Avql \\ \hline 1 107 176 & 30.92 & 290 265 & 50 & 1.84\\ \hline \end{tabular} \caption{CHiC 2012 statistics } \end{table} With $\#d$ and $\#q$ being respectively the number of documents in the collection and the number of queries. Avdl is the average document length and Avql is the average query length. To evaluate the models, the top 1000 documents were returned for each query, the MAP and P@10 were computed using the standard tool for evaluating an \textit{ad hoc} retrieval: \href{http://trec.nist.gov/trec_eval/}{\textit{trec\_eval}}. \vspace{0.3em} We used the word2vec-GoogleNews-vectors word Embedding of dimension 300, pre-trained on the google news Corpus (3 billion words) that are available \textit{here} \footnote{\url{https://github.com/mmihaltz/word2vec-GoogleNews-vectors}}. As we said earlier, the CHiC collection we used have a very specific vocabulary and even if the word Embedding we used were trained on a 3 billion words corpus, a lot of word of the vocabulary were missing : \begin{itemize} \item only 42.68\% of the words of the vocabulary have an Embedding; \item but 91.92\% of word occurrences in the collection have an Embedding. \end{itemize} On the other hand, most of the queries's terms had an Embedding : \begin{itemize} \item 94.95\% of the queries terms have an Embedding; \item 2\% of the queries have none of their term that posses an Embedding. \end{itemize} \vspace{0.3em} Finally, the translation probability described in equation (\ref{trans_proba}) is not the one that was implemented: we computed the cosine similarity between two words if it was above a given threshold \textbf{T}. This allowed us to reduce the number of cosine similarities to compute and also it acts like a noise reducer since we did not take into account the similarity between non similar terms. We found that \textbf{T} = 0.7 produces the highest MAP on the CHiC collection using word2vec-GoogleNews-vectors. \section{Results} \label{Results} Instead of giving the value of the parameter $\mu$ that produces the optimal results, we decided to display the MAP for a range of values of $\mu$ to see if the WETLM outperforms (or not) the Dirichlet LM consistently or if for some values of $\mu$ one model performs better than the other. \vspace{0.3em} At first we evaluated the Dirichlet LM, the optimal value we found for $\mu$ was 44. Retrieved documents are evaluated using the Mean Average Precision and P@10: \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline $\mu$ & 12 & 16 & 20 & 24 & 28 & 32 & 36 & 40 & 44 & 48\\ \hline MAP (\%) & 35.61 & 36.09 & 36.16 & 36.24 & 36.30 & 36.36 & 36.39 & 36.23 & 36.43 & 36.09\\ \hline \hline $\mu$ & 52 & 56 & 60 & 64 & 68 & 72 & 76 & 80 & 84 & 88\\ \hline MAP (\%) & 36.05 & 36.06 & 35.82 & 35.86 & 35.92 & 35.92 & 36.04 & 35.77 & 35.68 & 35.68\\ \hline \end{tabular} \caption{Values of the MAP on the CHIC2012 collection using the Dirichlet Language Model} \label{dirichlettable} \end{table} \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline $\mu$ & 12 & 16 & 20 & 24 & 28 & 32 & 36 & 40 & 44 & 48\\ \hline P@10 (\%) & 33.54 & 33.75 & 33.75 & 33.96 & 34.17 & 34.38 & 34.17 & 34.17 & 34.38 & 34.38\\ \hline \hline $\mu$ & 52 & 56 & 60 & 64 & 68 & 72 & 76 & 80 & 84 & 88\\ \hline P@10 (\%) & 34.38 & 34.17 & 34.38 & 34.38 & 34.38 & 34.38 & 34.38 & 34.38 & 34.38 & 34.58\\ \hline \end{tabular} \caption{Values of the P@10 on the CHIC2012 collection using the Dirichlet Language Model} \label{dirichlettableP10} \end{table} We checked that the results obtained are identical to the ones produced by Terrier with the same pre-processing on the collection. Also we decided to explore values of $\mu$ that are close to the Average Document Length (Avdl) since the optimal value of $\mu$ in the Dirichlet Language Model is usually around the Avdl. Table \ref{Embeddingtable} below represents the results obtained with the WE-based Translation Language Model : \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline $\mu$ & 12 & 16 & 20 & 24 & 28 & 32 & 36 & 40 & 44 & 48\\ \hline MAP (\%) & 36.89 & 37.71 & 37.76 & 37.86 & 37.78 & 37.79 & 37.81 & 37.65 & 37.67 & 37.29\\ \hline \hline $\mu$ & 52 & 56 & 60 & 64 & 68 & 72 & 76 & 80 & 84 & 88\\ \hline MAP (\%) & 37.17 & 36.87 & 36.66 & 36.69 & 36.57 & 36.56 & 36.55 & 36.50 & 36.37 & 36.35\\ \hline \end{tabular} \caption{Values of the MAP on the CHIC2012 collection using WETLM} \label{Embeddingtable} \end{table} \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline $\mu$ & 12 & 16 & 20 & 24 & 28 & 32 & 36 & 40 & 44 & 48\\ \hline P@10 (\%) & 34.38 & 34.38 & 35.21 & 35.42 & 35.63 & 35.63 & 35.42 & 35.42 & 35.42 & 35.63\\ \hline \hline $\mu$ & 52 & 56 & 60 & 64 & 68 & 72 & 76 & 80 & 84 & 88\\ \hline P@10 (\%) & 35.42 & 35.21 & 35.21 & 35.21 & 35.21 & 35.21 & 35.21 & 35.21 & 35.21 & 35.21\\ \hline \end{tabular} \caption{Values of the P@10 on the CHIC2012 collection using WETLM} \label{EmbeddingtableP10} \end{table} As we can see the WE-based Translation Language Model seems to sightly outperform the Dirichlet Language model for every $\mu$. The optimal value of $\mu$ we found is different for the two models : $\mu_{opt} = 44$ for the Dirichlet LM and $\mu_{opt} = 24$ for the WETLM. We performed a paired t-test over the average precision of each query for $\mu$ = 36 for both models, the measured p-value with R is $0.1733$ > 0.01. Unfortunately the improvement is not statistically significant. \vspace{0.3em} In the table below we show some of the results collections presented in the work of \citep{article2} over the 3 collections AP88-89 , WSJ87-92 and DOTGOV : \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{Method} & \multicolumn{2}{c|}{AP88-89 } & \multicolumn{2}{c|}{WSJ87-92} & \multicolumn{2}{c|}{DOTGOV} \\ \cline{2-7} & MAP & P@10 & MAP & P@10 & MAP & P@10 \\ \hline Dirichlet LM & 22.69 & 39.60 & 21.71 & 40.80 & 18.73 & 24.60 \\ \hline WETLM & 24.27\textbf{*} & 41.00 & 22.66\textbf{*} & 42.40\textbf{*} & 19.32 & 25.00 \\ \hline \end{tabular} \caption{Values of the MAP and P@10 reported by \citep{article2} on the collections AP88-89 , WSJ87-92 and DOTGOV using Dirichlet LM and WETLM. The statistically significant differences are indicated by \textbf{*}. } \label{Zucconres} \end{table} As we can see, according to \citep{article2}, depending on the collection, the WETLM can produce results that exhibit a statistically significant improvement of the MAP compared to Dirichlet LM. \vspace{0.3em} Table \ref{Embeddingalphatable} below represents the results obtained with the WE-based Translation Language Model that "controls" the self translation probability with the parameter $\alpha$: \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline $\mu$ & 12 & 16 & 20 & 24 & 28 & 32 & 36 & 40 & 44 & 48\\ \hline MAP (\%) & 37.35 & 37.92 & 38.07 & 38.15 & 38.28 & 38.31 & 38.35 & 38.19 & 38.17 & 37.81\\ \hline \hline $\mu$ & 52 & 56 & 60 & 64 & 68 & 72 & 76 & 80 & 84 & 88\\ \hline MAP (\%) & 37.72 & 37.73 & 37.53 & 37.58 & 37.59 & 37.47 & 37.40 & 37.10 & 37.06 & 37.05\\ \hline \end{tabular} \caption{Values of the MAP on the CHIC2012 collection using WETLM-$\alpha$} \label{Embeddingalphatable} \end{table} \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|} \hline $\mu$ & 12 & 16 & 20 & 24 & 28 & 32 & 36 & 40 & 44 & 48\\ \hline P@10 (\%) & 34.79 & 34.79 & 35.21 & 36.04 & 36.25 & 36.46 & 36.46 & 36.46 & 36.25 & 36.67\\ \hline \hline $\mu$ & 52 & 56 & 60 & 64 & 68 & 72 & 76 & 80 & 84 & 88\\ \hline P@10 (\%) & 36.25 & 36.25 & 36.25 & 36.25 & 36.25 & 36.25 & 36.25 & 36.25 & 36.25 & 36.25\\ \hline \end{tabular} \caption{Values of the P@10 on the CHIC2012 collection using WETLM-$\alpha$} \label{EmbeddingalphatableP10} \end{table} We performed a paired t-test over the average precision of each query for $\mu$ = 36 to compare LM and WETLM-$\alpha$ models : the measured p-value with R is $0.01219$ > 0.01 : the improvement is still not statistically significant. \section{Conclusion and future work} The results we obtained are consistent with the ones in \citep{article2} since they observed the same improvement as we did in the MAP. They also checked that their improvements were independent of the corpus and the training set for the Word Embedding: they do not need to be trained on the same corpus used in retrieval. For now our results are limited to one corpus and one set of word embedding, one of our objective in the near future is to perform the experiments on different corpora and also to improve our model by considering the context of the terms of the query by using phrase vectors \citep{article7} to replace the query or to perform query expansion and by modifying the translation probability so that it satisfies a set of constraints \citep{axiom}.
\section{Introduction} Tableau methods (see for instance \cite{journals/jolli/Rijke01} or \cite{Haehnle:HandbookAR:tableaux:2001}) always played a crucial role in the development of new techniques for automated theorem proving. They are easy to comprehend and implement, well-adapted to interactive theorem proving, and, therefore, normally form the basis of the first proof procedure for any newly defined logic \cite{fit90}. Nonetheless, they cannot compete with resolution-based calculi both in terms of efficiency and deductive power (i.e.\ proof length, see for instance \cite{Eder92}). This is partly due to the ability of resolution-based methods to generate lemmas and to simulate atomic cuts\footnote{We recall that the cut rule consists in expanding a tableau by adding two branches with $\neg \phi$ and $\phi$ respectively, where $\phi$ is any formula (intuitively $\phi$ can be viewed as a lemma). A cut is atomic if $\phi$ is atomic.} in a feasible way. There have been attempts to integrate some restricted forms of cut into tableau methods, improving both efficiency and proof size (see for instance \cite{letz94controlled,Haehnle:HandbookAR:tableaux:2001}). But, for more general forms of cuts, it is difficult to decide whether an application of the cut rule is useful or not, thus the rule is not really applicable during proof search. Instead, cuts may be introduced after the proof is generated, to make it more compact by introducing lemmas and fusing recurring patterns \cite{DBLP:journals/tcs/HetzlLRW14,DBLP:journals/tcs/LeitschL18}. In this paper, rather than trying to integrate cuts into the tableau calculus, we devise a new tableau procedure in which a proof compression, that is similar to the compressive power of a $\Pi_2$-cut, is achieved by employing a shared representation of literals. Formal definitions will be given later, but we now provide a simple example to illustrate our ideas. Consider the schema of clause sets: $\{ \bigvee_{i=1}^n p_0(a_i), \forall y.\neg p_n(y) \} \cup \{ \forall x.\neg p_{i-1}(x) \vee p_{i}(x) \mid i \in [1,n] \}$. A closed tableau can be constructed by adding $n$ copies of the clauses $\neg p_n(y^j)$ and $\neg p(x_{i-1}^j) \vee p(x_{i}^j)$ (for $i,j \in [1,n]$) and unifying all variables $x_i^j$ and $y^j$ with $a_j$. One gets a tableau of size $O(n^2)$. To make the proof more compact, we may merge the inferences applied for each $a_j$, since each of these constants are handled in the same way. This can be done by first applying the cut rule on the formula $\exists x.p(x)$. The branch corresponding the $\neg \exists x.p(x)$ can be closed by using the first clause. In the branch corresponding to $\exists x.p(x)$ a constant $c$ is generated by skolemization and the branch can be closed by unifying $x_i$ and $y$ with $c$. This yields a tableau of size $O(n)$. Since it is hard to guess in advance whether such an application of the cut rule will be useful or not, we investigate another solution allowing the same proof compression. We represent the disjunction $\bigvee_{i=1}^n p_0(a_i)$ by a single literal $p(\alpha)$, together with a set of substitutions $\{ [\alpha\backslash a_i] \mid i \in [1,n]\}$. Intuitively, this literal states that $p(\alpha)$ holds for some term $\alpha$, and the given set of substitutions specifies the possible values of $\alpha$. In the following, we call such variables $\alpha$ {\em {abstraction variable\xspace}s}. The clauses are kept as compact as possible by grouping all literals with the same heads and in some cases inferences may be performed uniformly regardless of the value of $\alpha$. In our example we get a tableau of size $O(n)$ by unifying $x_i^j$ and $y^j$ with $\alpha$, this tableau may be viewed as a compact representation of an ordinary tableau, obtained by making $n$ copies of the tree, with $\alpha = a_1,\dots,a_n$. If we find out that an inference is applicable only for some specific value(s) of $\alpha$ (e.g., if one wants to close a branch by unifying $p_0(\alpha)$ with a clause $\neg p_0(a_1)$), then one may ``separate'' the literal by isolating some substitution (or sets of substitutions) before proceeding with the inference. In this paper, we formalize these ideas into a tableau calculus called {\em $M$-tableau\xspace}. Basic inference rules are devised to construct {$M$-tableau\xspace}x and a strategy is provided to apply these rules efficiently, keeping the tableau as compact as possible. We prove that the procedure is sound and refutationally complete and that it may reduce the size of the proofs by an exponential factor. Our approach may be combined with all the usual refinements of the tableau procedure. \section{Notations} We briefly review usual definitions (we refer to, e.g., \cite{DBLP:books/el/RobinsonV01} for details). Terms, atoms and clauses are built as usual over a (finite) set of function symbols $\Sigma$ (including constants, i.e.\ nullary function symbols), an (infinite and countable) set of variables $\Vars$ and a (finite) set of predicate symbols $\Omega$. The set of variables occurring in an expression (term, atom or clause) $e$ is denoted by $\VarsIn{e}$. For readability, a term $f(t)$ is sometimes written $f t$. Ordinary (clausal) tableaux are trees labelled by literals and built by applying Expansion and Closure rules, the Expansion rule expands a leaf by $n$ children labelled by literals $l_1,\dots,l_n$, where a copy of $l_1 \vee \dots \vee l_n$ occurs in the clause set at hand, and the Closure rule closes a branch by unifying the atoms of two complementary literals. A substitution is a function (with finite domain) mapping variables to terms. A substitution mapping $x_i$ to $t_i$ (for $i \in [1,n]$) is written $[ (x_1,\dots,x_n)\backslash (t_1,\dots,t_n)]$. The identity substitution (for $n=0$) is denoted by $\mathrm{\it id}$. The image of an expression $e$ by a substitution $\sigma$ is defined inductively as usual and written $e\sigma$. \section{A Shared Representation of Literals} We introduce the notion of an \mliteral, that is a compact representation of a disjunction of ordinary literals with the same shape. The interest of this representation is that it will allow us to perform similar inferences in parallel on all these literals. We assume that $\vars$ is partitioned into two (infinite) sets $\uVars$ and $\eVars$. The variables in $\uVars$ are ordinary variables. They may be either universally quantified variables in clauses, or rigid variables in tableaux. The variables in $\eVars$ are called {\em {abstraction variable\xspace}s}. These are not variables in the standard sense, but can been seen rather as placeholders for a term that may take different values in different literals or branches. These variables will permit to share inferences applied on different literals. The set of ordinary variables (resp.\ {abstraction variable\xspace}s) that occur in a term $Q$ is denoted by $\UV{Q}$ (resp.\ $\EV{Q}$). A {\em renaming} is an injective substitution $\sigma$ such that $x \in \uVars \Rightarrow x\sigma \in \uVars$ and $\alpha \in \eVars \Rightarrow \alpha\sigma \in \eVars$. \begin{definition}[Syntax of $M$-Clauses] An \emph{\mliteral} is either $\mathrm{\bf true}$ or a triple $\Literal{\pred}{\tuples{t}}{\S}$, where: \begin{itemize} \item{$\pred$ is either a predicate symbol $\predA $ or the negation of a predicate symbol $\neg \predA $,} \item{$\tuples{t}$ is an $n$-tuple of terms, where $n$ is the arity of $\predA $,} \item{and $\S$ is a set of substitutions $\sigma$ with the same domain $D \subseteq \EV{\tuples{t}}$ (by convention $D$ is empty if $\S = \emptyset$) and such that $\VarsIn{\tuples{t}\sigma}\cap D=\emptyset$.} \end{itemize} An \emph{$M$-clause\xspace} is a set of {\mliteral}s, often written as a disjunction. \end{definition} With a slight abuse of words, we will call the set $D$ in the above definition the {\em domain of $\S$} (denoted by $\mathrm{dom}(\S)$). The semantics of {$M$-clause\xspace}s is defined by associating each \mliteral with an ordinary clause (or $\mathrm{\bf true}$): \begin{definition}[Semantics of $M$-Clauses] For every \mliteral $\lit$, we denote by $\Formula{\lit}$ the formula defined as follows (with the convention that empty disjunctions are equivalent to $\mathrm{\bf false}$): \[ \begin{array}{lll} \Formula{\Literal{\pred}{\tuples{t}}{\S}} & \isdef & \bigvee_{\theta\in \S} \pred(\tuples{t}\theta) \\ \Formula{\mathrm{\bf true}} & \isdef & \mathrm{\bf true} \\ \end{array} \] For every $M$-clause\xspace $\cl$, we denote by $\Formula{\cl}$ the clause $\bigvee_{\lit \in \cl}\Formula{\lit}$. For every set of {$M$-clause\xspace}s $\clset$, we denote by $\Formula{\clset}$ the formula (in conjunctive normal form) $\bigwedge_{\cl\in \clset}\Formula{\cl}$. We write $E \ident E'$ iff $\Formula{E} = \Formula{E'}$ (up to the usual properties of $\vee$ and $\wedge$: associativity, commutativity and idempotence). \end{definition} \begin{example} Let $\predA $ be a unary predicate, $Q $ be a binary predicate, $c$ be a constant, $f,g$ be unary functions, $x$ be an ordinary variable, and $\alpha,\beta,\gamma$ be {abstraction variable\xspace}s. The triples $\lit_1 = \Literal{\predA }{\alpha}{\{ [\alpha\backslash f(c)]\}}$ and \[\lit_2= \Literal{Q }{(\beta ,f(\gamma))}{\{ [(\beta ,\gamma )\backslash (f(c),c)],[(\beta ,\gamma )\backslash (c,f(c))]\}}\] are {\mliteral}s, and \[ \begin{array}{lll} \Formula{\lit_1} & = & \predA (f(c)) \\ \Formula{\lit_2} & = & Q (f(c),f(c))\lor Q (c,f(f(c))) \end{array} \] The common shape $Q (\cdot,f(\cdot))$ is shared between the two literals in the second clause. \end{example} \begin{remark} Observe that if $\S = \emptyset$ then $\Formula{\Literal{\pred}{\tuples{t}}{\S}} = \mathrm{\bf false}$, i.e.\ $\Literal{\pred}{\tuples{t}}{\S}$ denotes an empty clause. Moreover, any ordinary literal may be encoded as an \mliteral where the set of substitutions is a singleton, e.g., $\Literal{\predA }{(\evar,x)}{\{ [\evar\backslash a] \}} \simeq \predA (a,x)$. Also, an \mliteral $\Literal{\pred}{\tuples{t}}{\{ \sigma \}}$ is always equivalent to $\Literal{\pred}{\tuples{t}\sigma}{\{ \mathrm{\it id} \}}$. \end{remark} The application of a substitution $\sigma$ to an \mliteral is defined as follows: \[ \begin{array}{lll} (\mathrm{\bf true})\sigma & \isdef & \mathrm{\bf true} \\ \Literal{\pred}{\tuples{t}}{\S}\sigma & \isdef & \Literal{\pred}{\tuples{t}\sigma'}{\{ \theta\sigma \mid \theta \in \S \}} \end{array} \] where $\sigma'$ denotes the restriction of $\sigma$ to the variables not occurring in $\mathrm{dom}(\S)$. \begin{example} Let $\lit = \Literal{\predA}{(\alpha,x)}{ \{ [\alpha\backslash x], [\alpha\backslash y] \}}$ and $\sigma = [x\backslash a]$. Then: \[\lit\sigma = \Literal{\predA}{(\alpha,a)}{ \{ [\alpha\backslash a], [\alpha\backslash y] \}}\] Let $\lit' = \Literal{Q}{(\alpha)}{ \{ [\alpha\backslash a], [\alpha\backslash y] \}}$ and $\theta = [\alpha\backslash a]$. Then $\lit\theta = \lit'$. \end{example} \begin{proposition} Let $\lit = \Literal{\pred}{\tuples{t}}{\S}$ be an \mliteral. If $\mathrm{dom}(\S) = \emptyset$, then one of the following conditions hold: \begin{itemize} \item{$\S = \emptyset$ and $\Formula{\lit} = \mathrm{\bf false}$;} \item{$\S = \{ \mathrm{\it id} \}$ and $\Formula{\lit} = \pred(\tuples{t})$.} \end{itemize} \end{proposition} \begin{proof} The identity is the only substitution with empty domain, whence the result. \end{proof} A given ordinary clause may be represented by many different {$M$-clause\xspace}s, for instance $\predA (a) \vee \predA (b)$ may be represented as $(\predA ,(a),\{ \mathrm{\it id} \}) \vee (\predA ,(b),\{ \mathrm{\it id} \})$ or $(\predA ,(\evar),\{ [\evar\backslash a], [\evar\backslash b] \})$, or even $(\predA ,(\evar),\{ [\evar\backslash a], [\evar\backslash b] \}) \vee (Q ,(\beta),\emptyset)$. In practice it is preferable to start with a representation in which useless literals are deleted and in which the remaining literals are grouped when possible. This motivates the following: \begin{definition} An $M$-clause\xspace $\cl$ is in \emph{bundled normal form\xspace} (short: \ensuremath{\mathsf{BNF}}\xspace) if it satisfies the following conditions. \begin{itemize} \item{For every \mliteral $\Literal{\pred}{\tuples{t}}{\S}\in \cl$, $\S \not = \emptyset$.} \item{If $\mathrm{\bf true} \in \cl$ then $\cl= \{ \mathrm{\bf true} \}$.} \item{For all distinct literals $\Literal{\pred_1}{\tuples{t}_1}{\S_1},\Literal{\pred_2}{\tuples{t}_2}{\S_2}\in C$, $\pred_1$ is distinct from $\pred_2$. } \end{itemize} A $M$-clause\xspace set $\mathcal{C}$ is in \ensuremath{\mathsf{BNF}}\xspace if all {$M$-clause\xspace}s of $\mathcal{C}$ are in \ensuremath{\mathsf{BNF}}\xspace. \end{definition} \begin{example} \label{example:M-clauses in compressed normal form} Let \[ \lit_1\isdef \Literal{\predA }{\alpha}{\{ [\alpha\backslash f(c)]\}}, \] \[ \lit_2\isdef \Literal{\predA }{\beta}{\{ [\beta\backslash f(c)]\}}, \] \[ \lit_3\isdef\Literal{Q }{(\beta ,f\gamma)}{\{ [(\beta ,\gamma )\backslash (f(c),c)],[(\beta ,\gamma )\backslash (c,f(c))]\}}, \] and \[ \lit_4\isdef \Literal{Q }{(\beta ,\gamma)}{\{ [(\beta ,\gamma )\backslash (f(c),c)],[(\beta ,\gamma )\backslash (c,f(c))]\}} \] be {\mliteral}s. The $M$-clause\xspace $\{ \lit_3,\lit_4\}$ is not in \ensuremath{\mathsf{BNF}}\xspace while the {$M$-clause\xspace}s $\{ \lit_1,\lit_4\}$ and $\{\lit_2,\lit_4\}$ are in \ensuremath{\mathsf{BNF}}\xspace. \end{example} \begin{definition} An $M$-clause\xspace $\cl$ is {\em \wfrm} if for all distinct literals $\lit =\Literal{\pred_1}{\tuples{t}_1}{\S_1}$ and $m =\Literal{\pred_2}{\tuples{t}_2}{\S_2}$ in $C$, $\mathrm{dom}(\S_1) \cap \mathrm{dom}(\S_2) = \emptyset$. \end{definition} \begin{example} Consider the two {$M$-clause\xspace}s $\cl_1:=\{ \lit_1,\lit_4\}$ and $\cl_2:=\{\lit_2,\lit_4\}$ of Example \ref{example:M-clauses in compressed normal form}. $\cl_1$ is \wfrm, $\cl_2$ is not \wfrm. By renaming, $\cl_2$ can be transformed into $\cl_1$. \end{example} It is clear that every $M$-clause\xspace can be transformed into an equivalent \wfrm $M$-clause\xspace by renaming. In the following, we shall implicitly assume that all the considered {$M$-clause\xspace}s are \wfrm. \begin{lemma} Let $\form$ be a formula in conjunctive normal form. Then there is an $M$-clause\xspace set $\clset$ in \ensuremath{\mathsf{BNF}}\xspace such that $\Formula{\clset}\ident \form$. \end{lemma} \begin{proof} Let $\ocl$ be a clause of $\form$ and let $\pred_1,\ldots ,\pred_m$ the pairwise different predicate symbols or negated predicate symbols occurring in $\ocl$. For each symbol $\pred_i$, we collect all term tuples $\tuples{t}_{1,i},\ldots ,\tuples{t}_{k_i,i}$ such that $\pred_i(\tuples{t}_{j,i}) \in \ocl$ (for $j = 1,\dots,k_i$). It is clear that all the tuples $\tuples{t}_{j,i}$ for $j=1,\dots,k_i$ have the same length $n_i$, where $n_i$ is the arity of the predicate symbol of $\pred_i$. We define the \mliteral $\lit_i \isdef \Literal{\pred_i}{\tuples{\evar_i}}{\S_i}$ where $\tuples{\evar_i}$ is a tuple of $n_i$ fresh {abstraction variable\xspace}s and $\S_i$ is the set of substitutions $\{ [\tuples{\evar_i}\backslash\tuples{t}_{1,i}],\ldots ,[\tuples{\evar_i}\backslash\tuples{t}_{k_i,i}]\} $. Then we can define the $M$-clause\xspace $\cl\isdef \{ \lit_1,\ldots, \lit_m\}$. It is easy to check that $\Formula{\cl} = \ocl$ and that $\cl$ is in \ensuremath{\mathsf{BNF}}\xspace. By applying this method to every clause of $\form$, we eventually get a set of {$M$-clause\xspace}s in \ensuremath{\mathsf{BNF}}\xspace $\clset$ such that $\Formula{\clset}\ident \form$. \end{proof} \begin{example} Consider the clause $\{ \lit_3,\lit_4\}$ of Example \ref{example:M-clauses in compressed normal form}. It can be written in \ensuremath{\mathsf{BNF}}\xspace as $\Literal{Q }{(\beta ,\gamma)}{\S}$, where $\S$ denotes the following set of substitutions: \[ \{ [(\beta ,\gamma )\backslash (f(c),f(c))],[(\beta ,\gamma )\backslash (c,f(f(c)))], [(\beta ,\gamma )\backslash (f(c),c)],[(\beta ,\gamma )\backslash (c,f(c))]\} \] \end{example} \section{A Tableaux Calculus for $M$-Clauses} \label{sect:rules} In this section, we devise a tableaux calculus for refuting sets of {$M$-clause\xspace}s. This calculus is defined by a set of inference rules, that, given an existing tableau $\tab$, allow one to: \begin{enumerate} \item{Expand a branch with new children, by introducing a new copy of an $M$-clause\xspace of the set at hand.} \item{Instantiate some of the (rigid) variables occurring in the tableau.} \item{Separate shared literals inside an $M$-clause\xspace, so that different inferences can be applied on each of the corresponding branches. The rule can be applied on nodes that are not leaves.} \end{enumerate} Steps $1$ and $2$ are standard, but Step $3$ is original. \begin{definition}[Pre-Tableau] \label{def:pre-tab} A {\em pre-tableau} is a tree $\tab$ where vertices are labelled by {\mliteral}s or by $\mathrm{\bf false}$. We call the direct successors of a node its \emph{children}. The {\em root} is the (unique) node that is not a child of any node in $\tab$ and a {\em leaf} is a node with no child. A \emph{path} $\pathA$ is a sequence of nodes $(\node_1,\ldots ,\node_n)$ such that $\node_{i+1}$ is a child of $\node_i$ for $i\in[1,n-1]$. Furthermore, we call $\node_1$ the \emph{initial node} of $\predA $ and $\node_n$ the \emph{last node} of $\pathA$. A \emph{branch} is a path such that the initial node is the root and the last node is a leaf. With a slight abuse of words we say that a branch contains an \mliteral $\lit$ if it contains a node labelled by $\lit$. The {\em descendants} of a node $\node$ are inductively defined as $\node$ and the descendants of the children of $\node$. The \emph{subtree of root $\node$ in $\tab$} is the subtree consisting of all the descendants of $\node$, as they appear in $\tab$. If $\node$ is a non-leaf node with exactly $n > 0$ children $\node_1,\dots,\node_n$ labelled by {\mliteral}s $\lit_1,\dots,\lit_n$ respectively, then the {\em formula associated with $\node$} is defined as: $\bigvee_{i=1}^n \Formula{\lit_i}$. We say that an \mliteral $\Literal{\pred}{\tuples{t}}{\S}$ (resp.\ a node $\node$ labelled by $\Literal{\pred}{\tuples{t}}{\S}$) \emph{introduces an abstraction variable\xspace $x$} if $x \in \mathrm{dom}(\S)$. \end{definition} \begin{definition} Let $\tab$ be a pre-tableau and $\sigma$ be a substitution. Then $\tab\sigma$ denotes the result of applying $\sigma$ to all {\mliteral}s labelling the nodes of $\tab$. \end{definition} \begin{definition}[Tableau for a Set of $M$-Clauses] An {\em $M$-tableau\xspace} $\tab$ for a set of {$M$-clause\xspace}s $\clset$ is a pre-tableau build inductively by applying the rules Expansion, Instantiation and Separation to an initial tableau containing only one node, labelled by $\mathrm{\bf true}$ (also called the \emph{initial \mliteral}). \end{definition} In the following, the word ``tableau'' always refers to an {$M$-tableau\xspace}, unless specified otherwise (we use the expression ``ordinary tableau" for standard ones). The rules are defined as follows (in each case, $\tab$ denotes a previously constructed tableau for a set of {$M$-clause\xspace}s $\clset$. \paragraph*{Expansion Rule.} Let $\leafA$ be a leaf of $\tab$, and $\cl$ be an element of $\clset$ not containing $\mathrm{\bf true}$. Let $\cl'$ be a copy of $\cl$ where all variables that occur also in $\tab$ are renamed such that $\cl'$ share no variable\footnote{Note that both ordinary and {abstraction variable\xspace}s are renamed.} with $\tab$. The pre-tableau $\tab'$ constructed by adding a new child labelled by $\lit$ to $\leafA$ for each $\lit\in \cl'$ is a tableau for $\clset$. \paragraph*{Instantiation Rule.} Let $t$ be a term and $x\in\uVars$ such that for all nodes $\node, \node'$, if $\node$ is labelled by an \mliteral containing $x$ and $\node'$ introduces an abstraction variable\xspace $\evar\in \EV{t}$, then $\node$ is a proper descendant of $\node'$. Then $\tab [x\backslash t]$ is a tableau for $\clset$. \begin{remark} Observe that if $t$ contains no {abstraction variable\xspace}s then the condition always holds, since no node $\node'$ satisfying the above property exists. In practice, the Instantiation rule should of course not be applied with arbitrary variable and term. Unification will be used instead to find the most general instantiations closing a branch. A formal definition will be given later (see Definition \ref{def:compact}). \end{remark} \begin{example} Let \begin{center} \begin{minipage}{.08\textwidth} \[ \tab_1\isdef \] \end{minipage} \begin{minipage}{.26\textwidth} \begin{center} \begin{small} \begin{forest} [{$\mathbf{true}$} [{$\Literal{\neg \predA }{x}{\{\mathrm{\it id}\}}$} [{$\Literal{\predA}{\alpha}{\{ [\alpha\backslash a], [\alpha \backslash b] \}}$} ] ] ] \end{forest} \end{small} \end{center} \end{minipage} \hspace{.1\textwidth} \begin{minipage}{.08\textwidth} \[ \tab_2\isdef \] \end{minipage} \begin{minipage}{.26\textwidth} \begin{center} \begin{small} \begin{forest} [{$\mathbf{true}$} [{$\Literal{\predA}{\alpha}{\{ [\alpha\backslash a], [\alpha \backslash b] \}}$} [{$\Literal{\neg \predA }{x}{\{\mathrm{\it id}\}}$} ] ] ] \end{forest} \end{small} \end{center} \end{minipage} \end{center} be two tableaux for some set of {$M$-clause\xspace}s $\clset$. The pre-tableau $\tab_1[x\backslash \alpha]$ is not a tableau, because $x$ is substituted by a term containing an abstraction variable\xspace $\alpha$, and $x$ occurs above the literal introducing $\alpha$. On the other hand, $\tab_2[x\backslash\alpha]$ is a tableau. \end{example} \paragraph*{Separation Rule.} The rule is illustrated in Figure \ref{fig.initial tree Rule 3} towards Figure \ref{fig.S_2 empty tree Rule 3 .2}. Let $\node$ be a non-leaf node of $\tab$. Let $\mu$ be a child of $\node$, labelled by $\lit =\Literal{\pred}{\tuples{t}}{\S}$. Let $\tuples{r} = \tuples{t}\theta$ be an instance of $\tuples{t}$, with $\mathrm{dom}(\theta) = \mathrm{dom}(\S)$ and $\EV{\tuples{t}\theta} \cap \mathrm{dom}(\S) = \emptyset$. Let $\S_1$ be the set of substitutions $\sigma \in \S$ such that there exists a substitution $\sigma'$ with $\tuples{t}\sigma = \tuples{r}\sigma'$ and every variable in $\mathrm{dom}(\sigma')$ is an abstraction variable\xspace not occurring in $\tab$, and let $\S_2 \isdef \S\setminus \S_1$. Assume that $\S_1 \not = \emptyset$. We define the new literal $\lit'\isdef \Literal{\pred}{\tuples{r}}{\{ \sigma' \mid \sigma \in \S_1 \}}$. The Separation rule is defined as follows: \begin{enumerate} \item We apply the substitution $\theta$ to $\tab$\footnote{Actually, due to the above conditions, the variables in $\mathrm{dom}(\theta)$ only occur in the subtree of root $\mu$, hence $\theta$ only affects this subtree.} . \item We replace the label $\lit$ of $\mu$ by $\lit'$. \item We add a new child to the node $\node$, labelled by a literal $\Literal{\pred}{\tuples{t}}{\S_2}$. \end{enumerate} Observe that if $\S_2 = \emptyset$ then $\Formula{\Literal{\pred}{\tuples{t}}{\S_2}} = \mathrm{\bf false}$ hence the third step may be omitted, since the added branch is unsatisfiable anyway. The rule does not apply if $\S_1$ is empty. \begin{figure} \begin{minipage}[t]{.3\textwidth} \centering \caption{The initial tree in the Separation rule.} \label{fig.initial tree Rule 3} \begin{center} \begin{small} \begin{forest} [{$\cdot$} [{$\cdot$}, edge=dotted [{$m$} [{$\lit$} [{$\mathcal{T}_3$} ] ] [{$\mathcal{T}_2$} ] ] [{$\mathcal{T}_1$} ] ] ] \end{forest} \end{small} \end{center} where $m$ is the label of node $\node$ and $\mathcal{T}_1,\mathcal{T}_2$, and $\mathcal{T}_3$ are possibly empty subtrees. \end{minipage} \hspace{.03\textwidth} \begin{minipage}[t]{.3\textwidth} \centering \caption{The tree after an application of the Separation rule.} \label{fig.S_2 empty tree Rule 3} \begin{center} \begin{small} \begin{forest} [{$\cdot$} [{$\cdot$}, edge=dotted [{$m\theta$} [{$\lit'$} [{$\mathcal{T}_3\theta$} ] ] [{$\Literal{\pred}{\tuples{t}}{\S_2}$} ] [{$\mathcal{T}_2\theta$} ] ] [{$\mathcal{T}_1\theta$} ] ] ] \end{forest} \end{small} \end{center} where $m$ is the label of node $\node$ and $\mathcal{T}_1,\mathcal{T}_2$, and $\mathcal{T}_3$ are possibly empty subtrees. \end{minipage} \hspace{.03\textwidth} \begin{minipage}[t]{.3\textwidth} \centering \caption{The tree without redundant substitutions after an application of the Separation rule.} \label{fig.S_2 empty tree Rule 3 .2} \begin{center} \begin{small} \begin{forest} [{$\cdot$} [{$\cdot$}, edge=dotted [{$m$} [{$\lit'$} [{$\mathcal{T}_3\theta$} ] ] [{$\Literal{\pred}{\tuples{t}}{\S_2}$} ] [{$\mathcal{T}_2$} ] ] [{$\mathcal{T}_1$} ] ] ] \end{forest} \end{small} \end{center} where $m$ is the label of node $\node$ and $\mathcal{T}_1,\mathcal{T}_2$, and $\mathcal{T}_3$ are possibly empty subtrees. \end{minipage} \end{figure} \begin{example} \label{exa.rules tableau} Let \begin{align*} \lit_1:= &\; \Literal{\predA }{\alpha}{\{ [\alpha\backslash fc]\}}, \\ \lit_2:= &\; \Literal{\neg \predA }{\alpha'}{\{ [\alpha'\backslash fc]\}}, \\ \lit_3:= &\; \Literal{\neg Q }{(\beta' ,\gamma')}{\{ [(\beta' ,\gamma' )\backslash (fx,y)]\}},\text{ and} \\ \lit_4:= &\; \Literal{Q }{(\beta ,\gamma)}{\{ [(\beta ,\gamma )\backslash (fc,c)],[(\beta ,\gamma )\backslash (z,fc)],[(\beta ,\gamma )\backslash (fz,fc)]\}} \end{align*} be {\mliteral}s and $\mathcal{C}=\{\{ \lit_1,\lit_4\} ,\{ \lit_2\} ,\{\lit_3\}\}$ be an $M$-clause\xspace set in \ensuremath{\mathsf{BNF}}\xspace. Applying three times the Expansion rule, we can derive the tableau \begin{center} \begin{small} \begin{forest} [{$\mathbf{true}$} [{$\Literal{\neg \predA }{\alpha'}{\{ [\alpha'\backslash fc]\}}$} [{$\Literal{Q }{(\beta ,\gamma)}{\{ [(\beta ,\gamma )\backslash (fc,c)],[(\beta ,\gamma )\backslash (z,fc)],[(\beta ,\gamma )\backslash (fz,fc)]\}}$} [{$\Literal{\neg Q }{(\beta' ,\gamma')}{\{ [(\beta' ,\gamma' )\backslash (fx,y)]\}}$} ] ] [{$\Literal{\predA }{\alpha}{\{ [\alpha\backslash fc]\}}$} ] ] ] \end{forest} \end{small} \end{center} Now, we apply two times the Separation rule. First we choose $m$ of Figure \ref{fig.initial tree Rule 3} to be $\mathbf{true}$ and $\lit$ to be $\Literal{\neg \predA }{\alpha'}{\{ [\alpha'\backslash fc]\}}$, where the substitution $\theta$ is $[\alpha'\backslash fc]$ (hence we get $\S_1 = \{ \mathrm{\it id} \}$). Afterwards, we choose analogously $\Literal{\neg \predA }{fc}{\{ \mathrm{\it id} \}}$ (which is the result of the first application) and $\Literal{\predA }{\alpha}{\{ [\alpha\backslash fc]\}}$, with the substitution $[\alpha\backslash fc]$. Both times, the tuple $\tuples{r}$ of the Separation rule is $fc$ (with $\S_2 = \emptyset$ in both cases). This leads to the tableau: \begin{center} \begin{small} \begin{forest} [{$\mathbf{true}$} [{$\Literal{\neg \predA }{fc}{\{ \mathrm{\it id} \}}$} [{$\Literal{Q }{(\beta ,\gamma)}{\{ [(\beta ,\gamma )\backslash (fc,c)],[(\beta ,\gamma )\backslash (z,fc)],[(\beta ,\gamma )\backslash (fc,fz)]\}}$} [{$\Literal{\neg Q }{(\beta' ,\gamma')}{\{ [(\beta' ,\gamma' )\backslash (fx,y)]\}}$} ] ] [{$\Literal{\predA }{fc}{\{ \mathrm{\it id} \}}$} ] ] ] \end{forest} \end{small} \end{center} Afterwards, we again apply the Separation rule, to modify the node labelled with $\lit_4$ where $\tuples{r} =(f\delta ,\gamma^*)$ and $\S_2=\{ [(\beta ,\gamma )\backslash (z,fc)]\}$. We abbreviate $\Literal{\predA }{fc}{\{ \mathrm{\it id} \}}$ by $m$. \begin{center} \begin{small} \begin{forest} [{$\mathbf{true}$} [{$\Literal{\neg \predA }{fc}{\{ \mathrm{\it id} \}}$} [{$\Literal{Q }{(f\delta ,\gamma^*)}{\{ [(\delta ,\gamma^* )\backslash (c,c)],[(\delta ,\gamma^* )\backslash (c,fz)]\}}$} [{$\Literal{\neg Q }{(\beta' ,\gamma')}{\{ [(\beta' ,\gamma' )\backslash (fx,y)]\}}$} ] ] [{$\Literal{Q }{(\beta ,\gamma)}{\{ [(\beta ,\gamma )\backslash (z,fc)]\}}$} ] [{$m$} ] ] ] \end{forest} \end{small} \end{center} After some further applications of the Separation and Expansion rules, we are able to construct the following tableau by applying the Instantiation rule with the substitutions $[z\backslash fx'],[y\backslash fc],[x\backslash\delta],[y\backslash\gamma^*]$. \begin{center} \begin{small} \begin{forest} [{$\mathbf{true}$} [{$\Literal{\neg \predA }{fc}{\{ \mathrm{\it id} \}}$} [{$\Literal{Q }{(f\delta ,\gamma^*)}{\{ [(\delta ,\gamma^* )\backslash (c,c)],[(\delta ,\gamma^* )\backslash (c,ffx')]\}}$} [{$\Literal{\neg Q }{(f\delta ,\gamma^*)}{\{ \mathrm{\it id} \}}$} ] ] [{$\Literal{Q }{(fx',fc)}{\{ \mathrm{\it id} \}}$} [{$\Literal{\neg Q }{(fx',fc)}{\{ \mathrm{\it id} \}}$} ] ] [{$\Literal{\predA }{fc}{\{ \mathrm{\it id} \}}$} ] ] ] \end{forest} \end{small} \end{center} \end{example} \section{Soundness} \begin{definition} Let $\tab$ be a pre-tableau or a tableau. A branch $B$ of $\tab$ is \emph{closed} if it contains $\mathrm{\bf false}$ or two nodes labelled by literals $\Literal{\pred_1}{\tuples{t}_1}{\S_1},\Literal{\pred_2}{\tuples{t}_2}{\S_2}$ such that $\tuples{t}_1=\tuples{t}_2$, $\pred_1=\predA $, $\pred_2=\neg \predA $ for some predicate symbol $\predA $. The (pre)-tableau $\tab$ is {\em closed} iff all branches of $\tab$ are closed. \end{definition} \begin{example} The final tableau of Example \ref{exa.rules tableau} contains three branches, i.e.\ \begin{align*} & \{\Literal{\neg \predA }{fc}{\emptyset},\Literal{Q }{(f\delta ,\gamma^*)}{\{ [(\delta ,\gamma^* )\backslash (c,c)],[(\beta ,\gamma )\backslash (c,ffx')]\}},\Literal{\neg Q }{(f\delta ,\gamma^*)}{\emptyset}\}, \\ & \{\Literal{\neg \predA }{fc}{\emptyset},\Literal{Q }{(fx',fc)}{\emptyset},\Literal{\neg Q }{(fx',fc)}{\emptyset}\}\text{, and} \\ & \{\Literal{\neg \predA }{fc}{\emptyset},\Literal{\predA }{fc}{\emptyset}\} . \end{align*} All of them are closed and so the tableau is closed. Observe that the inferences closing the branches corresponding to the literals $Q(f(c),c)$ and $Q(f(z),f(c))$ in $(\lit_1,\lit_4)$ are shared in the constructed tableau (both branches are closed by introduced suitable instances of $\lit_3$), whereas the literal $Q(z,f(c))$ is handled separately (by instantiating $z$ by $f(x')$ and using yet another instance of $\lit_3$). \end{example} \begin{proposition} \label{prop:disjointdom} Let $\tab$ be a tableau. If $\node_1$ and $\node_2$ are distinct nodes in $\tab$, labelled by the {\mliteral}s $\Literal{\pred_1}{\tuples{t}_1}{\S_1}$ and $\Literal{\pred_2}{\tuples{t}_2}{\S_2}$ respectively, then $\S_1$ and $\S_2$ have disjoint domains. \end{proposition} \begin{proof} This is immediate since the {$M$-clause\xspace}s are \wfrm and since variables are renamed before all applications of the Expansion rule, so that the considered $M$-clause\xspace share no variable with the tableau. Afterwards, none of the construction rules can affect the domain of the substitutions. For the Separation rule, the condition on $\mathrm{dom}(\sigma')$ in the definition of the rule guarantees that the new \mliteral $\lit'$ introduces variables that are distinct from those in $\tab$. The detailed proof is by an easy induction on tableaux. \end{proof} \begin{proposition} \label{prop:cl_preserved} Let $\tab$ be a tableau for a set of {$M$-clause\xspace}s $\clset$. For every non-leaf node $\node$ in $\tab$, the formula associated with $\node$ (as defined in Definition \ref{def:pre-tab}) is an instance of a formula $\Formula{\cl}$, where $\cl$ is a renaming of an $M$-clause\xspace in $\clset$. \end{proposition} \begin{proof} It suffices to show that all the construction rules preserve the desired property. \begin{itemize} \item{{\bf Expansion.} The property immediately holds for the nodes on which the rule is applied, by definition of the rule. The other nodes are not affected.} \item{{\bf Instantiation.} By definition, the formula associated with a node $\node$ in the final tableau is an instance of the formula associated with $\node$ in the initial one. Thus the property holds.} \item{{\bf Separation.} The nodes occurring outside of the subtree of root $\mu$ are not affected. By definition, the formula associated with the descendants of $\mu$ in the new tableau are instances of formulas associated with nodes of the initial tableau. Thus it only remains to consider the node $\node$. The formula associated with $\node$ in the final tableau is obtained from that of the initial one by removing the formula corresponding to an \mliteral $\lit =\Literal{\pred}{\tuples{t}}{\S}$ and replacing it by $\Formula{\lit'} \vee \Formula{\Literal{\pred}{\tuples{t}}{\S_2}}$. Since $\lit' = \Literal{\pred}{\tuples{r}}{\{ \sigma' \mid \sigma \in \S_1 \}}$, we have $\Formula{\lit'} = \bigvee_{\sigma \in \S_1} \pred(\tuples{r}\sigma') = \bigvee_{\sigma \in \S_1} \pred(\tuples{t}\sigma)$ (since $\tuples{t}\sigma = \tuples{r}\sigma'$ by definition of the Separation rule). Thus $\Formula{\lit'} \vee \Literal{\pred}{\tuples{t}}{\S_2} = \Literal{\pred}{\tuples{t}}{\S}$ and the proof is completed.} \end{itemize} \end{proof} \begin{proposition} \label{prop:vardependency} Let $\tab$ be a tableau for $\clset$. Let $\evar \in \eVars$ be a variable introduced in a node $\node$ and assume that $\evar$ occurs in an \mliteral labelling a node $\mu$. Then $\mu$ is a descendant of $\node$. \end{proposition} \begin{proof} By an easy induction on tableau. The property is preserved by any application of the Expansion rule because the variables in the considered $M$-clause\xspace are renamed by fresh variables, it is preserved by the Instantiation rule due to the conditions associated with the rule, and the Separation rule only instantiates {abstraction variable\xspace}s. \end{proof} \begin{lemma} \label{lem.lemma Soundness} Let $\tab$ be a closed tableau for $\clset$ and let $\tab'$ be the tableau after applying once the Separation rule to a node $\node$ of $\tab$ with a child $\mu$ labelled with $\lit$. Then there is at most one branch $B$ in $\tab'$ that is not closed. Moreover, this branch necessarily contains the node labelled by $\Literal{L}{\tuples{t}}{\S_2}$ (see Figure \ref{fig.S_2 empty tree Rule 3 .2}). In particular, if $\S_2$ is empty then $\Literal{L}{\tuples{t}}{\S_2}$ is $\mathrm{\bf false}$ and $\tab'$ is closed. \end{lemma} \begin{proof} Let $B'$ be a branch in $\tab'$ and let $\theta$ be the substitution that we apply to $\tab$ in the Separation rule (see Figure \ref{fig.S_2 empty tree Rule 3 .2}). Assume that $B'$ does not contain $\Literal{L}{\tuples{t}}{\S_2}$. Then there is a branch $B$ in $\tab$ where for every literal $\lit_i \in B$ (with $i \in [1,n]$), either $\lit_i = \lit$ and $\lit'\in B'$, where $\lit'$ replaced $\lit$ during the application of the Separation rule, or $\lit_i\theta \in B'$. Since $\tab$ is closed, $B$ is closed, i.e.\ there are two {\mliteral}s $m,k\inB$ such that $m =\Literal{\predA }{\tuples{t}}{\S}$ and $k =\Literal{\neg \predA }{\tuples{t}}{\S'}$. If $m\theta, k\theta \in B'$, then (by Proposition \ref{prop:disjointdom}) $\theta \cap \mathrm{dom}(\S) = \theta \cap \mathrm{dom}(\S') = \emptyset$, thus $m\theta = \Literal{\predA}{\tuples{t}\theta}{\{ \sigma\theta \mid \sigma \in \S \}}$ and $k\theta = \Literal{\neg \predA}{\tuples{t}\theta}{\{ \sigma\theta \mid \sigma \in \S' \}}$. Consequently $B'$ is closed. Otherwise, one of the literals $m$ or $k$ is $\lit$, say $m = \lit$, and $k\theta \in B'$. Then, by definition of the Separation rule, we have $\lit' = \Literal{\predA}{\tuples{r}}{\{ \sigma' \mid \sigma \in \S_1\}} = \Literal{\predA}{\tuples{t}\theta}{\{ \sigma' \mid \sigma \in \S_1\}}$. By Proposition \ref{prop:disjointdom}, $\theta \cap \mathrm{dom}(\S') = \emptyset$, thus $k\theta = \Literal{\neg \predA}{\tuples{t}\theta}{\{ \sigma\theta \mid \sigma \in \S' \}}$, hence $B'$ is closed. \end{proof} \begin{theorem}[Soundness] \label{theo:sound} If a set of {$M$-clause\xspace}s $\clset$ admits a closed tableau $\tab$ then $\clset$ is unsatisfiable. \end{theorem} \begin{proof} We prove soundness by transforming $\tab$ into a closed tableau that contains only {\mliteral}s where the substitution set is $\{\mathrm{\it id}\}$. Due to Proposition \ref{prop:cl_preserved}, the resulting tableau then corresponds to an ordinary tableau, i.e.\ a tableau constructed only by the Expansion rule and the Instantiation rule. The {\mliteral}s could be replaced by usual literals. The soundness of ordinary tableau then implies the statement. We transform the tableau $\tab$ by an iterative procedure. We always take the topmost node $\node$ labelled with an \mliteral $\lit =\Literal{\pred}{\tuples{t}}{\S}$ where $\S\neq\{\mathrm{\it id}\}$ (if there is more than one topmost literal we can arbitrarily choose one). Then we consider a substitution $\theta\in \S$ and we apply the Separation rule with the tuple $\tuples{t}\theta$. We have $\tuples{t}\theta=\tuples{t}\theta\mathrm{\it id}$ and if $\sigma\in \S \setminus \{ \theta \}$, then $\tuples{t}\sigma\not = \tuples{t}\theta$, hence there is no substitution $\sigma'$ with $\tuples{t}\sigma\sigma' = \tuples{t}\theta$, such that $\mathrm{dom}(\sigma')$ only contains fresh variables. Consequently, the rule splits $\S$ into a singleton $\S_1 = \{\theta\}$ and $\S_2=\S_1\setminus \{\theta\}$. The literal $\lit$ gets replaced by $\lit' =\Literal{\pred}{\tuples{t}\theta}{\{\mathrm{\it id}\}}$ and we add the node $\mu$ labelled with $\Literal{\pred}{\tuples{t}}{\S_2}$ (note that $\node$ cannot be the root of the tableau, because the root is always labelled by $\mathrm{\bf true}$). By Lemma \ref{lem.lemma Soundness}, there is at most one non-closed branch, i.e.\ the branch ending with the node $\mu$ is the only open branch. We consider a copy $\tab_{\node}$ of the subtree of root $\node$ in $\tab$, renaming all variables introduced in $\tab_{\node}$ by fresh variables. We replace the root node of $\tab_{\node}$ by $\Literal{\pred}{\tuples{t}}{\S_2}$ and replace the subtree of root $\mu$ in the tableau by $\tab_{\node}$. It is easy to check that the obtained tableau is a closed tableau for $\clset$. Furthermore, the length of the branches does not increase, the number of non-empty substitutions occurring in the {\mliteral}s does not increase, and it decreases strictly in $\lit'$ and $\Literal{\pred}{\tuples{t}}{\S_2}$. This implies that the multiset of multisets $\{ |\{ \sigma \in \S_1' \mid \sigma \not = \mathrm{\it id} \}|,\dots,|\{ \sigma\in \S_n' \mid \sigma\not=\mathrm{\it id} \}| \}$ of natural numbers, where $\{ \Literal{\pred_i}{\tuples{t}_i}{\S_i'} \mid i \in [1,n] \}$ is a branch in $\tab$ is strictly decreasing according to the multiset extension of the usual ordering. Since this ordering is well-founded, the process eventually terminates, and after a finite number of applications of this procedure we get a tableau only containing nodes labelled with {\mliteral}s whose substitution set is equal to $\{\mathrm{\it id}\}$. This finishes the proof. \end{proof} \begin{remark} \label{rem:bound} As a by-product of the proof, we get that the size of the minimal ordinary tableau for a clause set $\Formula{\clset}$ is bounded exponentially by the size of any closed tableau for $\clset$. Indeed, we constructed an ordinary tableau from an $M$-tableau\xspace $\tab$ in which every branch $(\lit_1,\dots,\lit_n)$ in $\tab$ is replaced by (at most) $k^n$ branches, where $k$ is the maximal number of substitutions in $\lit_i$. In Section \ref{sect:exp}, we shall prove that this bound is precise, i.e.\ that our tableau calculus allows exponential reduction of proof size w.r.t.\ ordinary (cut-free) tableaux. \end{remark} \section{Completeness} Proving completeness of $M$-tableau\xspace is actually a trivial task, since one could always apply the Separation rule in a systematic way on all {\mliteral}s to transform them into ordinary literals (as it is done in the proof of Theorem \ref{theo:sound}), and then get the desired result by completeness of ordinary tableau. However, this strategy would not be of practical use. Instead, we shall devise a strategy that keeps the {$M$-tableau\xspace} as compact as possible and at the same time allows one to ``simulate'' any application of the ordinary expansion rules. In this strategy, the Separation rule is applied on demand, i.e.\ only when it is necessary to close a branch. No hypothesis is assumed on the application of the ordinary expansion rules, therefore the proposed strategy is ``orthogonal'' to the usual refinements of ordinary tableaux, for instance connection tableaux\footnote{Connection tableaux can be seen as ordinary tableaux in which any application of the Expansion rule must be followed by the closure of a branch, using one of the newly added literals and the previous literal in the branch.} \cite{778537} or hyper-tableaux\footnote{Hyper-tableaux may be viewed in our framework as ordinary tableaux in which the Expansion rule must be followed by the closure of all the newly added branches containing negative literals.} \cite{Baumgartner:HyperNextGeneration:Tableaux:98}. Thus our approach can be combined with any refutationally complete tableau procedure \cite{Haehnle:HandbookAR:tableaux:2001}. The main idea denoted by \emph{simulate a strategy} is to do the same steps as in ordinary tableau, while keeping {$M$-clause\xspace}s as compressed as possible. If ordinary tableau expands the tableau by a clause, we expand the tableau with the corresponding $M$-clause\xspace, and if a branch is closed in the ordinary tableau, then the corresponding branch is closed in the $M$-tableau\xspace. This last step is not trivial: Given two ordinary literals $\predA(\tuples{t})$ and $\neg \predA(\tuples{r})$ the ordinary tableau might compute the most general unifier (mgu) of $\tuples{t}$ and $\tuples{r}$. But in the presented formalism, the two literals might not appear as such, i.e.\ there are no literals $m=\Literal{\predA}{\tuples{t}}{\{\mathrm{\it id}\}}$ and $k=\Literal{\neg\predA}{\tuples{r}}{\{\mathrm{\it id}\}}$ . In general, there are only {\mliteral}s $m' =\Literal{\predA}{\tuples{t}'}{\S_1}$ and $k' =\Literal{\neg\predA}{\tuples{r}'}{\S_2}$ such that $\tuples{t}'\theta = \tuples{t}$ and $\tuples{r}'\vartheta = \tuples{r}$, where $\theta$ and $\vartheta$ denote the compositions of the substitutions occurring in the {\mliteral}s in the considered branch. Note also that, although $\tuples{t}'$ and $\tuples{r}'$ are unifiable, the Instantiation rule cannot always be applied to unify them and close the branch. Indeed, the domain of the mgu may contain {abstraction variable\xspace}s, whereas the Instantiation rule only handles universal variables. For showing completeness, it would suffice to apply the Separation rule on each ancestor of $k'$ and $m'$ involved in the definition of $\theta$ or $\vartheta$, to create a branch where the literals $m$ and $k$ appear explicitly. Thereby, we would loose a lot of the formalisms benefit. Instead, we shall introduce a strategy that uses the Separation rule only if this is necessary for making the unification of $\tuples{t}'$ and $\tuples{r}'$ feasible (by mean of the Instantiation rule). Such applications of the Separation rule may be seen as preliminary steps for the Instantiation rule. This follows the maxim to stay as general as possible because a more general proof might be more compact. In the formalisation of the Instantiation rule we ensured soundness by allowing {abstraction variable\xspace}s only to occur in descendants of the literal that introduced the variable. This has a drawback to our strategy: The unification process that we try to simulate can ask for an application of the Instantiation rule which would cause a violation of this condition for {abstraction variable\xspace}s if we follow the procedure in the former paragraph. We thus have to add further applications of the Separation rule to ensure that this condition is fulfilled. \begin{definition} \label{def:conflict} Let $B = (\node_0,\node_1,\dots,\node_n)$ be a path in a tableau $\tab$ where $\node_0$ is the initial node of $\tab$ and each node $\node_i$ (with $i > 0)$ is labelled by $\Literal{\pred_i}{\tuples{t}_i}{\S_i}$. An {\em abstraction substitution\xspace} for $B$ is a substitution $\eta_n\dots\eta_1$ with $\eta_i \in \S_i$, for $i=1,\dots,n$. A {\em conflict\xspace} in a branch $B$ is a pair $(\tuples{t}_i,\tuples{t}_j)$ with $i,j \in [1,n]$, $\pred_i$ and $\pred_j$ are dual and $\tuples{t}_i$ and $\tuples{t}_j$ are unifiable. A conflict\xspace is {\em $\eta$-realizable\xspace} if $\eta$ is an abstraction substitution\xspace for $B$ such that $\tuples{t}_i\eta$ and $\tuples{t}_j\eta$ are unifiable. \end{definition} In practice, we do not have to check that a conflict\xspace is realizable\xspace (this would be costly since we have to consider exponentially many substitutions). If $(\tuples{t},\tuples{t}')$ is a conflict\xspace then $\tuples{t}$ and $\tuples{t}'$ are necessarily unifiable, with some mgu $\theta$. As mentioned before, this does not mean that a branch with conflict\xspace can be closed. Moreover, according to the restriction on the Instantiation rule, a variable $x$ cannot be instantiated by a term containing an abstraction variable\xspace $\evar$, if $x$ occurs in some ancestor of the literal introducing $\evar$ in the tableau. This motivates the following: \begin{definition} A variable $\evar\in\eVars$ is {\em blocking\xspace} for a conflict\xspace $(\tuples{t},\tuples{t}')$, where $\theta=\text{mgu}(\tuples{t},\tuples{t}')$ if $\evar\in \mathrm{dom}(\theta)$ or $\evar$ occurs in a term $x\theta$, where $x \in \uVars$ and $x$ occurs in a literal labelling an ancestor of the node introducing $\evar$. \end{definition} Finally, we introduce a specific application of the Separation rule which allows one either to ``isolate'' some literals in order to ensure that they have a specific ``shape'' (as specified by a substitution), or to eliminate {abstraction variable\xspace}s completely if needed. \begin{definition} \label{def:compact} If $\sigma$ is a substitution, we denote by $\dom_{a}(\sigma)$ the set of variables $\evar\in \eVars$ such that $\evar\sigma\not \in \eVars$. A tableau is {\em compact\xspace} if it is constructed by a sequence of applications of the tableau rule in which: \begin{itemize} \item{The Instantiation rule is applied only if the tableau contains a branch with a conflict\xspace $(\tuples{t},\tuples{t}')$, with no blocking\xspace variable. Each variable $x\in \mathrm{dom}(\sigma)$ is replaced by a term $t\sigma$, where $\sigma=\text{mgu}(\tuples{t},\tuples{t}')$ (since there is no blocking\xspace variable it is easy to check that the conditions on the Instantiation rule are satisfied). Afterwards, it is clear that the branch is closed.} \item{The Separation rule is applied on a node labelled by $\Literal{\pred}{\tuples{t}}{\S}$, using a substitution $\theta$ only if there exists a conflict\xspace $(\tuples{t},\tuples{t}')$ with $\sigma = \text{mgu}(\tuples{t},\tuples{t}')$ such that one of the following conditions holds: \begin{enumerate} \item{$\mathrm{dom}(\S)$ contains a blocking\xspace variable in $\dom_{a}(\sigma)$ and $\theta$ is defined as follows: $\mathrm{dom}(\theta) = \mathrm{dom}(\S) \cap \dom_{a}(\sigma)$, $x\theta=x\sigma$ if $x\sigma$ is a variable, otherwise $x\theta$ is obtained from $x\sigma$ by replacing all variables by pairwise distinct fresh {abstraction variable\xspace}s. \label{sep:inst}} \item{Or $\mathrm{dom}(\S)$ contains a blocking\xspace variable not occurring in $\dom_{a}(\sigma)$, and $\theta \in \S$. \label{sep:elim}} \end{enumerate}} \end{itemize} \end{definition} The applications of the Separation rule in Definition \ref{def:compact} are targeted at making the closure of the branch possible by getting rid of blocking\xspace variables, while keeping the tableau as compact as possible (thus useless separations are avoided). \begin{example} For instance, assume that we want to close a branch containing two literals $\lit = \Literal{\pred}{(\evar)}{\{[\evar\backslash f(a)],[\evar\backslash f(b)],[\evar\backslash a]\}}$ and $\lit' = \Literal{\neg \pred}{f(x)}{\{ \mathrm{\it id} \}}$. To this aim, we need to ensure that $\evar$ is unifiable with $f(x)$. This is done by applying the separation rule (Case \ref{sep:inst} of Definition \ref{def:compact}) with the substitution $[\evar\backslash f(\beta)]$, so that $\evar$ has the desired shape. This yields: $\Literal{\pred}{(f(\beta))}{\{[\beta\backslash a],[\beta\backslash b]\}}$ Afterwards, if $x$ does not occur before $\lit$ in the branch then the branch is closed by unifying $x$ with $\beta$. If $x$ occurs before $\lit$, then this is not feasible since this would contradict the condition on the Instantiation rule, and we have to apply the Separation rule again (Case \ref{sep:elim}) to eliminate $\beta$, yielding (for instance) $\Literal{\pred}{(f(a))}{\{ \mathrm{\it id} \}}$. The direct application of the Separation rule with, e.g., $\theta = [\evar\backslash f(a)]$ is forbidden in the strategy. \end{example} \begin{theorem}[Completeness] Let $\oclset$ be a clause set and $\clset$ be an $M$-clause\xspace set with $\Formula{\clset}\ident\oclset$. If $\oclset$ is unsatisfiable, then there is a closed compact\xspace tableau for $\clset$. \end{theorem} \begin{proof} For an $M$-clause\xspace $\cl_i\in\clset$, we denote by $\ordinary{\cl}_i$ the ordinary clause in $\oclset$ with $\Formula{\ordinary{\cl}_i}\simeq\Formula{\cl_i}$. W.l.o.g.\ we can assume that clauses do not appear twice, neither in $\clset$ nor in $\oclset$. Now, we can perform a proof search based on ordinary tableau starting with $\oclset$ (using any complete strategy) yielding a closed tableau, built by applying the usual Expansion and Closure rules. In the following, $\ordinary{T}$ will denote an already constructed ordinary tableau for $\oclset$ and $\tab$ will represent the corresponding $M$-tableau\xspace for $\clset$. More precisely, the tableau $\tab$ is constructed in such a way that there exists an injective mapping $h$ from the nodes in $\tab$ to those in $\ordinary{T}$, a function $\node \mapsto \eta_\node$ mapping each node $\node$ in $\tab$ labelled by some literal $\Literal{\pred}{\tuples{t}}{\S}$ to an abstraction substitution\xspace $\eta$ and a substitution $\vartheta$ (with $\mathrm{dom}(\vartheta) \subseteq \uVars$) such that the following property holds (denoted by ($\star$)\xspace): \begin{enumerate} \item{The root of $\tab$ is mapped to the root of $\ordinary{T}$.} \item{If $\node$ is a child of $\node'$ then $h(\node)$ is a child of $h(\node')$.} \item{For any path $(\node_0,\dots,\node_n)$, if $\node_n$ is labelled by an \mliteral $\Literal{\pred}{\tuples{t}}{\S}$, then $h(\node_n)$ is labelled by a literal $\pred(\tuples{t})\subS{\node_n}\dots\subS{\node_1}\vartheta$.} \item{If a branch of the form $(h(\node_0),\dots,h(\node_n))$ is closed in $\ordinary{T}$, then $(\node_0,\dots,\node_n)$ is closed in $\tab$.} \end{enumerate} Note that the mapping is not surjective in general ($\ordinary{T}$ may be bigger than $\tab$). By ($\star$)\xspace, if $\ordinary{T}$ is closed then $\tab$ is also closed, which gives us the desired result. It is easy to check that applying the Separation rule on a node $\node_i$ in a branch $(\node_0,\dots,\node_n)$ in $\tab$ preserves ($\star$)\xspace, provided it is applied using a substitution $\theta$ (as defined in the Separation rule) that is more general than $\subS{\node_n}\circ\dots\circ\subS{\node_1}$. The tableau $\tab$ is constructed inductively as follows. For the base case, we may take $\tab = \ordinary{T} = \mathrm{\bf true}$ and ($\star$)\xspace trivially holds. \textbf{Expansion:} The Expansion rule of ordinary tableaux allows one to expand the tableau by an arbitrary clause $\ordinary{\cl}_i$ of $\oclset$. We define the corresponding tableau for $\clset$ as the tableau expanded by $\cl_i$. The mappings $h$ and $\subS{\node}$ may be extended in a straightforward way so that ($\star$)\xspace is preserved (the unique new node $\node$ in $\tab$ may be mapped to an arbitrary chosen new node in $\ordinary{T}$). \textbf{Closure:} Assume that a branch in $\ordinary{T}$ is closed by applying some substitution $\sigma$, using two literals $\pred(\tuples{t})$ and $\neg \pred(\tuples{r})$, where $\sigma = \text{mgu}(\tuples{t},\tuples{r})$. If one of these literals do not occur in the image of a branch of $\tab$ then it is clear that the operation preserves ($\star$)\xspace (except that the substitution $\vartheta$ is replaced by $\vartheta\sigma$), hence no further transformation is required on $\tab$. Otherwise, by ($\star$)\xspace, there is a branch $B = (\node_0,\dots,\node_n)$ in $\tab$ where for every $i\in [0,n]$, $\node_i$ is labelled by $\lit_i =\Literal{\pred_i}{\tuples{t}_i'}{\S_i}$, two numbers $j,k \in \mathbb{N}$ such that $\pred_j=\pred$, $\pred_k = \neg \pred$, $\tuples{t}_j'\eta = \tuples{t}$ and $\tuples{t}_k'\eta=\tuples{r}$, with $\eta = \subS{\node_n}\dots\subS{\node_1}$. By definition, $(\tuples{t}_j',\tuples{t}_k')$ is an $\eta$-realizable\xspace conflict\xspace. Let $\sigma'$ be the mgu of $\tuples{t}_j'$ and $\tuples{t}_k'$. If there is no blocking\xspace variables for $(\tuples{t}_j',\tuples{t}_k')$, then the Instantiation rule applies, replacing every variable $x\in \mathrm{dom}(\sigma')$ by $x\sigma'$, and the branch may be closed. By definition $\eta\vartheta\sigma$ is a unifier of $\tuples{t}$ and $\tuples{r}$, hence $\eta\vartheta\sigma = \sigma'\theta'$, for some substitution $\theta'$. By definition, the co-domain of $\eta$ contains no {abstraction variable\xspace}s, thus $\theta' = \eta\vartheta'$, with $\mathrm{dom}(\vartheta') \subseteq \uVars$, and $\vartheta\sigma = \sigma'\vartheta'$. The application of the rule preserves ($\star$)\xspace, where $\vartheta$ is replaced by the substitution $\vartheta'$. Indeed, consider a node $\node$ in $\tab$, initially labelled by a literal $\Literal{\pred}{\tuples{t}}{\S}$, where $h(\node)$ is labelled by $\pred(\tuples{t})\subS{\node_n}\dots\subS{\node_1}\vartheta$. After the rule application, $\node$ is labelled by $\Literal{\pred}{\tuples{t}\sigma'}{\S\sigma'}$, $h(\node)$ is labelled by $\pred(\tuples{t})\subS{\node_n}\dots\subS{\node_1}\vartheta\sigma$, and the substitutions $\subS{\node_i}$ are replaced by $\subS{\node_i}\sigma'$. Since $\mathrm{dom}(\sigma') \cap \eVars = \emptyset$, it is clear that $\sigma'\subS{\node_n}\dots\subS{\node_1}\sigma'\vartheta '=\subS{\node_n}\dots\subS{\node_1}\sigma'\vartheta '=\subS{\node_n}\dots\subS{\node_1}\vartheta\sigma$. Otherwise, the set of blocking\xspace variables is not empty, and since all {abstraction variable\xspace}s occurring in the tableau must be introduced in some node, there exists $l\in [1,n]$ such that $\mathrm{dom}(\S_l)$ contains a blocking\xspace variable. According to Definition \ref{def:compact}, the Separation rule may be applied on $\node_l$ (it is easy to check that all the application conditions of the rule are satisfied). In Case \ref{sep:inst} (of Definition \ref{def:compact}), $\theta$ is more general than $\sigma'$ by definition, and since $\subS{\node_n}\circ\dots\circ\subS{\node_1}\vartheta\sigma$ is a unifier of $\tuples{t}_j'$ and $\tuples{t}_k'$, the mgu $\sigma'$ must be more general than $\subS{\node_n}\circ\dots\circ\subS{\node_1}$. In Case \ref{sep:elim}, we can take $\theta = \subS{\node_l}$, which is more general than $\subS{\node_n}\circ\dots\circ\subS{\node_1}$ (since the substitutions $\subS{\node}$ have disjoint domains). Thus the property ($\star$)\xspace is preserved. This operation is repeated until the set of blocking\xspace variables is empty, which allows us to apply the Instantiation rule as explained before. The process necessarily terminates since each application of the Separation rule either increases the size of the tableau (either by adding new nodes, or by instantiating a variable by a non variable term), or does not increase the size of the tableau but strictly reduces the number of {abstraction variable\xspace}s. Furthermore, by ($\star$)\xspace, the size of $\tab$ is smaller than that of $\ordinary{T}$. \end{proof} \section{An Exponentially Compressed Tableau} \label{sect:exp} In this section, we will show that the presented method is able to compress tableaux by an exponential factor. This corresponds to an introduction of a single $\Pi_2$-cut\footnote{In a $\Pi_2$-cut, the cut formula is of the form $\forall x\exists yA$ where $A$ is a quantifier-free formula.} (see \cite{DBLP:journals/tcs/LeitschL18}). As a simplified measurement of the size of a tableau we consider the number of nodes. Let us consider the schema of $M$-clause\xspace sets $\clset^n\isdef\{\{\lit_1^n\} ,\{\lit_2,\lit_3\} ,\{\lit_4^n\}\}$ with \begin{align*} \lit_1^n= &\; \Literal{\predA}{\tuples{\alpha}}{[\tuples{\alpha}\backslash (x,f_1x)],\ldots ,[\tuples{\alpha}\backslash (x,f_nx)]} \\ \lit_2= &\; \Literal{\neg\predA}{\tuples{\beta}}{[\tuples{\beta}\backslash (x,y)]} \\ \lit_3= &\; \Literal{\predA}{\tuples{\gamma}}{[\tuples{\gamma}\backslash (x,fy)]} \\ \lit_4^n= &\; \Literal{\neg\predA}{\tuples{\delta}}{[\tuples{\delta}\backslash (fx_1,fx_2)],\ldots ,[\tuples{\gamma}\backslash (fx_{n-1},fx_n)]} \end{align*} where $\tuples{\alpha}=(\alpha_1,\alpha_2),\tuples{\beta}=(\beta_1,\beta_2),\tuples{\gamma}=(\gamma_1,\gamma_2)$, and $\tuples{\delta}=(\delta_1,\delta_2)$ for $n\in\mathbb{N}$. Then we can construct a closed tableau for $\clset^ n$ whose size is linear w.r.t.\ $n$: {\small \begin{center} \begin{forest} [{$\Literal{\predA }{(fx_1,\alpha_2^1)}{\{ [\alpha_2^1\backslash f_1fx_1],\ldots ,[\alpha_2^1\backslash f_nfx_1]\}}$} [{$\Literal{\neg \predA }{(fx_1,\alpha_2^1)}{\{ \id \} }$} ] [{$\Literal{\predA }{(fx_1,f\alpha_2^1)}{\{ \id \} }$} [{$\Literal{\predA }{(f\alpha_2^1,\alpha_2^2)}{\{ [\alpha_2^2\backslash f_1f\alpha_2^1],\ldots ,[\alpha_2^2\backslash f_nf\alpha_2^1]\}}$} [{$\Literal{\neg \predA }{(f\alpha_2^1,\alpha_2^2)}{\{ \id \} }$} ] [{$\Literal{\predA }{(f\alpha_2^1,f\alpha_2^2)}{\{ \id \} }$} [{$\tab$}, edge=dotted ] ] ] ] ] \end{forest} \end{center} } where $\tab$ is {\small \begin{center} \begin{forest} [{$\Literal{\predA }{(f\alpha_2^{n-2},\alpha_2^{n-1})}{\{ [\alpha_2^{n-1}\backslash f_1f\alpha_2^{n-2}],\ldots ,[\alpha_2^{n-1}\backslash f_nf\alpha_2^{n-2}]\}}$} [{$\Literal{\neg \predA }{(f\alpha_2^{n-2},\alpha_2^{n-1})}{\{ \id \} }$} ] [{$\Literal{\predA }{(f\alpha_2^{n-2},f\alpha_2^{n-1})}{\{ \id \} }$} [{$\Literal{\neg \predA }{(fx_1,f\alpha_2^1)}{\{ \id \}}$} ] [{$\ldots$}, edge=dotted ] [{$\Literal{\neg \predA }{(f\alpha_2^{n-2},f\alpha_2^{n-1})}{\{ \id \}}$} ] ] ] \end{forest} \end{center} } The clause set schema $\clset^n$ is a simplified variant of the example in \cite[Section 3 and 9]{DBLP:journals/tcs/LeitschL18} and one can easily verify that an ordinary tableau method is of exponential size of $n$. Just consider the term instantiations which are necessary for an ordinary tableau: \begin{align*} &\; x\leftarrow\{ fx_1,ff_{i_1}fx_1,\ldots ,ff_{i_{n-2}}f\ldots f_{i_1}fx_1\vert i_1,\ldots ,i_{n-2}\in [1,n]\}\text{ in }\lit_1^n, \\ &\; (x,y)\leftarrow\{(t,f_it)\vert i\in [1,n]\land t\text{ is a substitution for }x\text{ in }\lit_1^n\}\text{ in }\lit_2\text{ and }\lit_3,\text{ and } \\ &\; (x_1,\ldots ,x_n)\leftarrow\{(x_1,f_{i_1}fx_1,\ldots ,f_{i_{n-1}}f\ldots f_{i_1}fx_1)\vert i_1,\ldots ,i_{n-1}\in [1,n]\}\text{ in }\lit_4^n. \end{align*} Obviously, $x_n$ in $\lit_4^n$ is substituted with $n^{n-1}$ terms. These correspond to the instantiations defined in \cite[Theorem 13]{DBLP:journals/tcs/LeitschL18}. \section{Future Work} From a practical point of view, algorithms and data-structures have to be devised to apply the above rules efficiently, especially to identify {conflict\xspace}s and blocking\xspace substitutions in an incremental way. In the wake of this, experimental evaluations based on an implementation are reasonable. While the procedure is described for first-order logic, we believe that the same ideas could be profitably be applied to other logics, and even to other calculi, including saturation-based procedures. It would also be interesting to combine this approach with other techniques for reducing proof size, for instance variable splitting \cite{DBLP:journals/jsc/HansenAGW12}, or with techniques for the incremental construction of closures \cite{Giese01a}. A current restriction of the calculus is that no {abstraction variable\xspace}s may occur above their introduction (see the condition on the Instantiation rule in Section \ref{sect:rules}). This restriction is essential for soundness: without it, one could for instance construct a closed tableau for the (satisfiable) set of {$M$-clause\xspace}s $\{ \{ \lit \}, \{ \lit' \} \}$, with $\lit = \Literal{\pred}{(x,\alpha)}{\{ [\alpha\backslash a, \alpha \backslash b] \}}$ and $\lit' = \Literal{\pred}{(\beta,y)}{\{ [\beta\backslash a, \beta \backslash b] \}}$, by replacing $x$ by $\alpha$ and $y$ by $\beta$. We think that this condition can be relaxed by defining an order over the {abstraction variable\xspace}s. This would yield a more flexible calculus, thus further reducing proof size. It would be interesting to know whether the exponential bound of Remark \ref{rem:bound} still holds for the relaxed calculus. An ambitious long-term goal is to devise extensions of {$M$-tableau\xspace}x with the same deductive power of cuts, i.e.\ enabling a non-elementary reduction of proof size.
\section{Introduction } In patients with disorders of consciousness, such as coma, locked-in syndrome or vegetative state, levels of consciousness are assessed in the clinic through a battery of behavioral tests and neurophysiological recordings. In particular, these methods are used to assess levels of wakefulness (arousal) and awareness in patients \cite{laureys2004}, \cite{laureys2005}. Such assessments have led to a two dimensional operational definition of consciousness for clinical purposes. Assessments of awareness use behavioral and neurophysiological (fMRI or EEG) protocols in order to gauge how patients perform on various cognitive functions. Assessments of wakefulness are based on metabolic markers (if reporting is not possible) such as glucose uptake in the brain, captured using PET scans \cite{bodart2017measures}. As such a clinically-oriented definition of consciousness enables classification of closely associated states and disorders of consciousness into clusters on a bivariate scale with awareness and wakefulness on orthogonal axes. Under healthy conditions, these two levels are almost linearly correlated, as in conscious wakefulness (high arousal and high awareness) or in deep sleep (low arousal and low awareness). However, in pathological states, wakefulness without awareness can be observed in the vegetative state \cite{laureys2004}, while transiently reduced awareness is observed following seizures \cite{blumenfeld2012impaired}. Patients in the minimally conscious state show intermittent and limited non-reflexive and purposeful behavior \cite{giacino2002minimally}, \cite{giacino2004vegetative}, whereas patients with hemi-spatial neglect display reduced awareness of stimuli contralateral to the side where brain damage has occurred \cite{parton2004hemispatial}. Given the aforementioned scales for labeling states and disorders of consciousness, the crucial question is how should one quantify awareness and wakefulness from neurophysiological data? This is particularly useful for non-communicative patients such as those in coma or states of minimal wakefulness. For this reason, several dynamical complexity measures have been developed. In this article, we first describe theoretically-grounded complexity measures and the challenges one faces when applying these measures to realistic brain data. We then outline alternative empirical approaches to classify states and disorders of consciousness. We end with a discussion on how these two approaches might inform each other. \section{Measures of Integrated Information } Dynamical complexity measures are designed to capture both, network topology as well as causal dynamics. The most prominent among these is integrated information, denoted as $\Phi$. This was first introduced in \cite{tononi1994} and is defined as the quantity of information generated by a network as a whole, over and above that of its parts, taking into account the system's causal dynamical interactions. This reflects the intuition going back to William James that conscious states are integrated, yet diverse. $\Phi$ seeks to operationalize this intuition in terms of complexity, stating that complexity arises from simultaneous integration and differentiation of the network's structure as well as dynamics. Differentiation refers to functional specialization of neural populations, while integration, as a complementary design principle, results in distributed coordination among neural populations. This interplay generates integrated yet diversified information believed to support cognitive and behavioral states. The earliest proposals defining integrated information were made in \cite{tononi1994}, \cite{tononi2003} and \cite{tononi2004}. Since then, considerable progress has been made towards the development of a normative theory as well as applications of integrated information \cite{bt}, \cite{bs}, \cite{tononi2012integrated}, \cite{arsiwalla2013iit}, \cite{oizumi2014}, \cite{arsiwalla2016computing}, \cite{arsiwalla2016high}, \cite{krohn2016computing}, \cite{tegmark2016improved}, \cite{arsiwalla2017spectral}. The core idea of integrated information as a whole versus parts quantity has been formalized in several distinct information measures such as neural complexity \cite{tononi1994}, causal density \cite{seth2005causal}, $\Phi$ from integrated information theory: IIT 1.0, 2.0 \& 3.0 \cite{tononi2004}, \cite{bt}, \cite{oizumi2014}, stochastic interaction \cite{wennekers2005stochastic}, \cite{ay2015information}, stochastic integrated information \cite{bs}, \cite{arsiwalla2013iit}, \cite{xda2016global} and synergistic $\Phi$ \cite{griffith2014quantifying}, \cite{griffith2014principled}. \textbf{Table \ref{T1}} summarizes these measures along with corresponding information metrics upon which they have been based. \begin{table}[h!] \centering \caption{Theoretical complexity measures alongside their corresponding information metrics. } \label{T1} \begin{tabular}{|c|c|} \hline {\bf Integrated Information Measures} & {\bf Information Metrics} \\ \hline \hline Neural Complexity & Mutual Information (MI) \\ \hline Causal Density & Granger Causality (GC) \\ \hline Stochastic Interaction & Kullback-Leibler Divergence (KLD) \\ \hline IIT 1.0 \& 2.0 & KLD \\ \hline Stochastic Integrated Information & MI or KLD \\ \hline IIT 3.0 & Earth Mover's Distance \\ \hline Synergistic $\Phi$ & Synergistic Information \\ \hline \end{tabular} \end{table} However, computing integrated information for large neurophysiological datasets has been challenging due to both, computational difficulties and limits on domains where these measures can be implemented. For instance, many of these measures use the minimum information partition of the network. This involves evaluating a large number of network configurations (more precisely, the Bell number), which makes their computational cost extremely high for large networks. As for domains of applicability, the measure of \cite{bt} has been formulated for discrete-state, deterministic, Markovian systems with the maximum entropy distribution. On the other hand, the measure of \cite{bs} has been devised to continuous-state, stochastic, non-Markovian systems and in principle, admits dynamics with any empirical distribution (although in practice, it is easier to use assuming Gaussian distributions). The formulation in \cite{bs} is based on mutual information, whereas \cite{bt} uses a measure based on the Kullback-Leibler divergence. Note however, that in some cases the measure of \cite{bs} can take negative values and that complicates its interpretation. The Kullback-Leibler based definition computes the information generated during state transitions and remains positive in the regime of stable dynamics. This gives it a natural interpretation as an integrated information measure. Both measures \cite{bt}, \cite{bs} make use of a normalization scheme in their formulations. Normalization inadvertently introduces ambiguities in computations. The normalization is actually used for the purpose of determining the partition of the network that minimizes the integrated information, but a normalization dependent choice of partition ends up influencing the value and interpretation of $\Phi$. An alternate measure based on the Earth Mover's distance was proposed in \cite{oizumi2014}. This does away with the normalization problem (though the current version is not formulated for continuous-state variables). However, the formulation of \cite{oizumi2014} lies outside the scope of standard information theory and is still difficult for performing computations on large networks. More recently, these issues have been addressed in \cite{xda2016global}, using a formulation of stochastic integrated information based on the Kullback-Leibler divergence between the conditional multivariate distribution on the set of network states versus the corresponding factorized distribution over its parts, while implementing the maximum information partition instead of the minimum information partition. Using this formulation, $\Phi$ can be computed for large-scale networks with linear stochastic dynamics, for both, attractor as well as non-stationary states \cite{xda2016global} (for network simulations see \cite{2791}, \cite{arsiwalla2015connectomics}, \cite{arsiwalla2015network}). This work also demonstrated the first computation of $\Phi$ for the resting-state human brain connectome. The connectome network is estimated from cortical white matter tractography data, comprising 998 voxels (nodes) with approximately 28,000 weighted symmetric connections \cite{Hagmann2008}. \cite{xda2016global} show that the dynamics and topology of the healthy resting-state brain generates greater information complexity than a (weight-preserving) random rewiring of the same network. Even though this formulation of stochastic integrated information was successfully implemented for the human cerebral connectome, a network of 998 nodes and about 28,000 edges, it was limited to linearized dynamics. This is well-defined in the vicinity of attractor states such as the resting-state, however, it would be desirable to extend this formulation to include non-linearities existing in brain dynamics. \section{Empirical Measures } Ideally, integrated information was intended as a measure of awareness, one that could account for informational differences between states and also disorders of consciousness. However, as described above, for realistic brain dynamics and physiological data that task has in fact proven difficult. On the other hand, the basic conceptualization of consciousness in terms of integration and differentiation of causal information has motivated several empirical measures that seek to classify consciousness-related disorders from patient data. For example, \cite{barrett2012granger} investigated changes in conscious levels using Granger Causality (GC) as a causal connectivity measure. Given two stationary time-series signals, Granger Causality measures the extent to which the past of one assists in predicting the future of the other, over and above the extent to which the past of the latter already predicts its own future \cite{granger1969investigating}, thus quantifying causal relations between two signaling sources. This was tested using electroencephalographic (EEG) data from subjects undergoing propofol-induced anesthesia, with signals source-localized to the anterior and posterior cingulate cortices. \cite{barrett2012granger} found a significant increases in bidirectional GC in most subjects during loss of consciousness, especially in the beta and gamma frequency ranges. Another useful measure of causal connectivity is transfer entropy, which extends Granger causality to the non-Gaussian case. However, so far this has only been implemented on neuronal cultures by \cite{wibral2014directed} and holds future potential as a clinically relevant measure. Yet another measure that has already proven useful as a clinical classifier of conscious levels is the Perturbational Complexity Index (PCI), which was introduced by \cite{casali2013theoretically} and tested on TMS-evoked potentials measured with EEG. PCI is calculated by perturbing the cortex with transcranial magnetic stimulation (TMS) in order to engage distributed interactions in the brain and then compressing the resulting spatiotemporal EEG responses to measure their algorithmic complexity, based on the Lempel-Ziv compression. For a given segment of EEG data, the Lempel-Ziv algorithm quantifies complexity by counting the number of distinct patterns in the data. For example, this can be proportional to the size of a computer file after applying a data compression algorithm. Computing the Lempel-Ziv compressibility requires binarizing the time-series data, based either on event-related potentials or with respect to a given threshold. Using PCI, \cite{casali2013theoretically} were able to discriminate levels of consciousness during wakefulness, sleep, and anesthesia, as well as in patients who had emerged from coma and recovered a minimal level of consciousness. Later, the Lempel-Ziv complexity was also used by \cite{schartner2015complexity} on spontaneous high-density EEG data recorded from subjects undergoing propofol-induced anesthesia. Once again, a robust decline in complexity was observed during anesthesia. These are complexity measures based on data compression algorithms. A qualitative comparison between a data compression measure inspired by PCI and $\Phi$ was made in \cite{virmani2016compression}. While compression-based measures do seem to capture certain aspects of $\Phi$, the exact relationship between the two is not completely clear. Nonetheless, these empirical measures have been useful for clinical purposes, in terms of broadly discriminating disorders of consciousness. Another relevant complexity measure is the weighted symbolic mutual information (wSMI), introduced by \cite{king2013information}. This is a measure of global information sharing across brain areas. It evaluates the extent to which two EEG channels present nonrandom joint fluctuations, suggesting that they share common sources. This is done by first transforming continuous signals into discrete symbols, and subsequently computing the joint probabilities of symbol pairs between two EEG channels. Before computing the symbolic mutual information between two time-series signals, a weighting is introduced to disregard conjunctions of identical or opposite-sign symbols from the two signal trains as that could potentially arise from common-source artifacts. In \cite{king2013information} wSMI was estimated for 181 EEG recordings from awake but noncommunicating patients diagnosed in various disorders of consciousness (including 143 from patients in vegetative and minimally conscious states). This measure of information sharing was found to systematically increases with consciousness. In particular, it was able to distinguish patients in the vegetative state, minimally conscious state, and fully conscious state. In \textbf{Table \ref{T2}} we summarize the above empirical measures along with their domains of application. \begin{table}[h!] \centering \caption{Empirical complexity measures alongside their tested domains of application. } \label{T2} \begin{tabular}{|c|c|} \hline {\bf Empirical Measures} & {\bf Tested Application Domains} \\ \hline \hline Granger Causality & Wakefulness vs propofol-induced \\ & anesthesia using EEG \\ \hline Perturbational Complexity Index & Wakefulness, sleep, anesthesia, coma \& minimal \\ & consciousness using TMS-evoked EEG \\ \hline Lempel-Ziv Complexity & Wakefulness vs propofol-induced \\ & anesthesia using EEG \\ \hline Weighted Symbolic Mutual Information & Vegetative, minimally conscious \& \\ & fully conscious states using EEG \\ \hline \end{tabular} \end{table} \section{Discussion } The paradigm-shifting proposal that consciousness might be measurable in terms of the information generated by causal dynamics of the brain as a whole, over the sum of its parts, has led to precise quantitative formulations of information-theoretic complexity measures. These measures seek to operationalize the intuition that the complexity associated to consciousness arises from simultaneous integration and differentiation of the brain's structural and dynamical hierarchies. However, progress in this direction has faced practical challenges such as high computational cost upon scaling with network size. This is especially true with regard to realistic neuroimaging or physiological datasets. Even in the approach of \cite{xda2016global}, where both, the scaling and normalization problem have been solved, the formulation is still applicable only to linear dynamical systems. A possible way to extend this formulation to non-linear systems such as the brain might be to first solve the Fokker-Planck equations for these systems (as probability distributions will no longer remain Gaussian) and subsequently estimate entropies and conditional entropies numerically to compute $\Phi$. Another solution to the problem might be to construct statistical estimators for the covariance matrices from data and then compute $\Phi$. In the meanwhile, for clinical purposes, it has been useful to consider empirical complexity measures, which serve as classifiers that very broadly discriminate states of consciousness, such as between wakefulness and anesthesia or broadly between disorders of consciousness. However, these measures do not strictly correspond to integrated information. Some of them are based on signal compression, which does capture differentiation, though not directly integration. So far these methods have been applied on the scale of EEG datasets. One has yet to demonstrate their computational feasibility for larger datasets (which might only be a matter of time though). All in all, bottom-up approaches suggest important features that might help inform or constrain implementations of principle-based approaches. However, the latter are indispensable for ultimately understanding causal aspects of information generation and flow in the brain. This article is intended as a lookup table spanning the landscape of both, theoretically-motivated as well as empirically-based complexity measures used in current consciousness research. Even though, for the purpose of this article, we have treated complexity as a global correlate of consciousness, there are indications that multiple complexity types, based on cognitive and behavioral control, might be important for a more precise classification of various states of consciousness \cite{bayne2016there}, \cite{xda2017morpho}. This latter observation alludes to the need for an integrative systems approach to consciousness research, one that is grounded in cognitive architectures and helps understand control mechanisms underlying systems level neural information processing \cite{conscious12016}. \subsubsection*{Acknowledgments.} This work has been supported by the European Research Council's CDAC project: "The Role of Consciousness in Adaptive Behavior: A Combined Empirical, Computational and Robot based Approach" (ERC-2013- ADG 341196). \bibliographystyle{splncs03}
\section{Introduction and main results} Consider a one-dimensional random walk $$ S_0=0,\ S_n=X_1+\cdots+X_n,\,n\geq1, $$ where $X,X_1,X_2,\ldots$ are i.i.d. random variables. For a real-valued sequence $\{g_n\}$ let \begin{equation} \label{def2} T_g:=\min\{n\geq1:S_n\leq g_n\} \end{equation} be the first crossing of time of the moving boundary $\{g_n\}$ by $\{S_n\}$. The aim of this paper is to study the asymptotics of $\mathbf P(T_g>n)$ as $n$ goes to infinity. An important particular case of this problem is the case of a constant boundary $g_n\equiv-x$ for some $x$. In this case $T_g\equiv\tau_x$, where $$ \tau_x:=\min\{n\geq1:S_n\leq -x\}. $$ For constant boundaries the following result (see Doney \cite{Don95}) is available: if \begin{equation} \label{Spitzer} \Pr(S_n>0)\to\rho\in(0,1) \end{equation} then, for every fixed $x\geq0$, \begin{equation} \label{iid} \mathbf{P}(\tau_x>n)\sim V(x) n^{\rho-1}L(n), \end{equation} where $V(x)$ denotes the renewal function corresponding to the weak descending ladder height process and $L(n)$ is a slowly varying function. (Here and in what follows all unspecified limits are taken with respect to $n\to\infty$.) Greenwood and Novikov \cite[Theorem 1]{GN87} have shown that if the sequence $\{g_n\}$ is decreasing and concave then \begin{equation} \label{GN} \frac{\mathbf P(T_g>n)}{\mathbf P(\tau_0>n)}\to R_g\in(0,\infty]. \end{equation} If, in addition, $\mathbf E |g_{\tau_0}|$ is finite, then $R_g<\infty$. This result has been generalised by Denisov and Wachtel\cite{DW16}: if $\{g_n\}$ decreases and $\{V(-g_n)\}$ is subadditive then \eqref{GN} holds and $R_g$ is finite for random walks satisfying $\mathbf E V(-g_{\tau_0})<\infty$. If $g_n\ge 0$ is increasing, then, according to Proposition 1 in \cite{DW16}, \begin{equation} \label{DW} \frac{\mathbf P(T_g>n)}{\mathbf P(\tau_0>n)}\to L_g\in[0,1]. \end{equation} Moreover, if $\mathbf E X=0$ and $\mathbf E X^2<\infty$ then $L_g>0$ if and only if $\mathbf E g_{\tau_0}<\infty$. An alternative version of this result has been obtained earlier in \cite{GN87}: it was assumed there that $\mathbf E X=0$ and that $\mathbf E e^{-\lambda X}<\infty$ for some $\lambda>0$. In view of \eqref{iid}, the condition $\mathbf E|g_{\tau_0}|<\infty$ is equivalent to $$ \sum_{n=1}^\infty |g_n|L(n)n^{\rho-2}<\infty. $$ In particular, $\mathbf E|g_{\tau_0}|<\infty$ provided that $|g_n|=O(n^\gamma)$ with some $\gamma<1-\rho$. Since the asymptotic behaviour of the renewal function $V$ can not be expressed in terms of $\rho$ only, it is not clear how to use the condition $\mathbf E V(|g_{\tau_0}|)<\infty$. The trivial bound $V(x)\le Cx$ reduces $\mathbf E V(|g_{\tau_0}|)<\infty$ to $\mathbf E|g_{\tau_0}|<\infty$. In order to have a more accurate information on $V$ we need to impose further restrictions on the distribution of $X$. In the present paper we shall consider the class of asymptotically stable random walks. Let \begin{equation*} \mathcal{A}:=\{0<\alpha <1;\,|\beta |<1\}\cup \{1<\alpha <2;|\beta |\leq 1\}\cup \{\alpha =1,\beta =0\}\cup \{\alpha =2,\beta =0\} \end{equation*}% be a subset in $\mathbb{R}^{2}.$ For $(\alpha ,\beta )\in \mathcal{A}$ and a random variable $X$ write $X\in \mathcal{D}\left( \alpha ,\beta \right) $ if the distribution of $X$ belongs to the domain of attraction of a stable law with characteristic function% \begin{equation} G_{\alpha ,\beta }\mathbb{(}t\mathbb{)}:=\exp \left\{ -c|t|^{\,\alpha }\left( 1-i\beta \frac{t}{|t|}\tan \frac{\pi \alpha }{2}\right) \right\}, \ c>0, \label{std} \end{equation}% and, in addition, $\mathbf{E}X=0$ if this moment exists. Let $\{c_n\}$ be a sequence of positive numbers specified by the relation% \begin{equation} c_n:=\inf \left\{ u\geq 0:\mu (u)\leq n^{-1}\right\},\ n\geq1 , \label{Defa} \end{equation}% where \begin{equation*} \mu (u):=\frac{1}{u^{2}}\int_{-u}^{u}x^{2}\mathbf{P}(X\in dx). \end{equation*}% It is known (see, for instance, \cite[Ch. XVII, \S 5]{F71}) that for every $X\in \mathcal{D}(\alpha ,\beta )$ the function $\mu (u)$ is regularly varying with index $(-\alpha )$. This implies that $c_n$ is regularly varying with index $\alpha ^{-1}$, i.e., there exists a function $l_{1}(x)$, slowly varying at infinity, such that \begin{equation} c_n=n^{1/\alpha }l_{1}(n). \label{asyma} \end{equation}% In addition, the scaled sequence $\left\{ \frac{S_{n}}{c_n},\,n\geq 1\right\} $ converges in distribution to the stable law given by (\ref{std}). In this case we say that $S_n$ is an \emph{asymptotically stable random walk}. For every $X\in \mathcal{D}\left( \alpha ,\beta \right)$ there is an explicit formula for $\rho$, \begin{equation} \displaystyle\rho =\left\{ \begin{array}{ll} \frac{1}{2},\ \alpha =1, & \\ \frac{1}{2}+\frac{1}{\pi \alpha }\arctan \left( \beta \tan \frac{\pi \alpha }{2}\right) ,\text{ otherwise}. & \end{array}% \right. \label{ro} \end{equation} If $X\in\mathcal{D}(\alpha,\beta)$ then the function $V(x)$ is regularly varying with index $\alpha(1-\rho)$. Moreover, according to Lemma~13 in \cite{VW09}, \begin{equation} \lim_{n\to\infty} V(c_n)\mathbf P(\tau_0>n)=:A\in(0,\infty). \label{V-tau} \end{equation} By Corollary 1 in \cite{DW16}, if $S_n$ is asymptotically stable then the finiteness of $\mathbf E V(|g_{\tau_0}|)$ is equivalent to $$ \sum_{n=1}^\infty\frac{V(|g_n|)}{nV(c_n)}<\infty. $$ Using the fact that the function $V(x)$ is regularly varying of index $\alpha(1-\rho)$, we see that $\mathbf E V(|g_{\tau_0}|)$ is finite if $|g_n|=O(c_n/\log^a n)$ with some $a>1/\alpha(1-\rho)$. If $\{g_n\}$ is decreasing but $V(-g_n)$ is not subadditive then we can not apply Theorem 1 from \cite{DW16}. But it is shown in Theorem 2 in the same paper that \eqref{GN} with finite $R_g$ remains valid for boundaries satisfying \begin{equation} \label{Int.Test} \sum_{n=1}^\infty\frac{V(|g_n|)}{nV(c_n/\log n)}<\infty. \end{equation} Moreover, it is proven in \cite{DW16} that if $\{g_n\}$ increases and satisfies \eqref{Int.Test} then the constant $L_g$ in \eqref{DW} is strictly positive. We note also that \eqref{Int.Test} is fulfilled if, for example, $g_n=O(c_n/\log^{1+a}n)$ with some $a>1/\alpha(1-\rho)$. A logarithmic version of this result has been shown by Aurzada and Kramm~\cite{AK16}. More precisely, they have proven that $$ \mathbf P(T_g>n)=n^{\rho-1+o(1)} $$ for any boundary satisfying $g_n=O(n^\gamma)$ with some $\gamma<1/\alpha$. In the present paper we are going to derive the asymptotics of $\mathbf P(T_g>n)$ for all boundaries $g_n=o(c_n)$. Since $c_n$ is the scaling sequence for the random walk $S_n$, it is natural to expect that the behaviour of $\mathbf P(T_g>n)$ is quite similar to the behaviour of $\mathbf P(\tau_0>n)$. The following result confirms this conjecture. \begin{theorem} \label{T1} Assume that $X\in \mathcal{D}\left( \alpha ,\beta \right)$. If $g_n=o(c_n)$ and $\mathbf P(T_g>n)>0$ for all $n\geq1$ then \begin{equation} \label{T1.1} \frac{\mathbf P(T_g>n)}{\mathbf P(\tau_0>n)}\sim U_g(n), \end{equation} where $U_g$ is a positive slowly varying function with values $$ 0<U_g(n)=\mathbf E[V(S_n-g_n);T_g>n],\quad n\geq1. $$ \end{theorem} If $\mathbf E X=0$ and $\mathbf E X^2<\infty$ then \eqref{T1.1} is a special case of Theorem 2 from our previous paper \cite{DSW16}, where random walks with independent but not necessarily identical distributed increments have been considered. Theorem~\ref{T1} states that the tail of $T_g$ is regularly varying tail with index $\rho-1$ for any boundary $g_n=o(c_n)$. We now turn to the question, for which boundaries the sequences $\mathbf P(T_g>n)$ and $\mathbf P(\tau_0>n)$ are asymptotically equivalent. In other words, we want to find conditions which guarantee that $U_g(n)$ is bounded away from $0$ and from $\infty$. \begin{theorem} \label{T2} Assume that $X\in \mathcal{D}\left( \alpha ,\beta \right)$ and that, as $x\to\infty$, \begin{equation} \label{lrt} V(x+1)-V(x)=O\left(\frac{V(x)}{x}\right). \end{equation} \begin{itemize} \item [(a)] If \begin{equation} \label{T2.1} \sum_{n=1}^\infty\frac{\max_{k\le n}|g_k|}{nc_n}<\infty \end{equation} then there exist positive constants $U_*$ and $U^*$ such that \begin{equation} \label{T2.2} U_*\le U_g(n)\le U^*\quad\text{for all }n\geq1. \end{equation} \item[(b)] Moreover, if the sequence $\{g_n\}$ is monotone and \eqref{T2.1} holds then \begin{equation} \label{T2.3} \lim_{n\to\infty}U_g(n)=:U_g(\infty)\in(0,\infty). \end{equation} \end{itemize} \end{theorem} Mogulskii and Pecherskii \cite{MP79} have shown that if the boundary sequence satisfies the condition $g_{n+k}\le g_n+g_k$, then there exists a sequence of events $\{E_n\}$ such that \begin{equation} \label{WH0} E_n\subseteq\{S_n>g_n\}\quad\text{for every}\quad n\ge1 \end{equation} and \begin{equation} \label{WH1} \sum_{n=0}^\infty z^n\mathbf{P}(T_g>n)= \exp\left\{\sum_{n=1}^\infty\frac{z^n}{n}\mathbf{P}(E_n)\right\}. \end{equation} This relation is a generalisation of the classical factorisation identity for the stopping time $\tau_0$. Unfortunately, the events $E_n$ have very complicated structure in the case of moving boundaries and there is no hope to derive the tail asymptotics for $T_g$ from \eqref{WH1}. But \eqref{WH0} allows one to obtain upper bounds for $\mathbf P(T_g>n)$. It has been shown in Remark 2 in \cite{DW16} that $$ \mathbf P(T_g>n)\le q_n $$ with $q_n$ defined by \begin{equation} \label{WH2} \sum_{n=0}^\infty z^nq_n=\left(\sum_{n=0}^\infty z^n\mathbf{P}(\tau_0>n)\right) \exp\left\{\sum_{n=1}^\infty\frac{z^n}{n}\Delta_n\right\}, \end{equation} where $\Delta_n:=\mathbf P(S_n>g_n)-\mathbf P(S_n>0)$. Using the standard estimate for the concentration function of $S_n$, one gets $$ |\Delta_n|\le C\frac{|g_n|+1}{c_n} $$ From this bound and \eqref{WH2} we infer that if $\frac{|g_n|}{nc_n}$ is summable then $$ \mathbf P(T_g>n)\le q_n\le C\mathbf P(\tau_0>n). $$ It is worth mentioning that the condition \eqref{T2.1} is quite close to the summability of the sequence $\left\{\frac{|g_n|}{nc_n}\right\}$. If the boundary sequence is strictly positive, $g_n\to\infty$ and $g_n=o(c_n)$, then, by the local limit theorem for $S_n$, $$ \Delta_n\sim -f_{\alpha,\beta}(0)\frac{g_n}{c_n}, $$ where $f_{\alpha,\beta}(x)$ is the density function of the stable distribution given by \eqref{std}. If we additionally assume that $\frac{g_n}{nc_n}$ is not summable, then, by \eqref{WH2}, $$ \mathbf P(T_g>n)=o(\mathbf P(\tau_0>n)). $$ This indicates that the condition \eqref{T2.1} is very close to the optimal one, and it cannot be relaxed in the case of monotone increasing boundaries. We now turn to the conditional limit theorem. Define the rescaled process \begin{equation} \label{s-def} s_n(t)=\frac{S_{[nt]}}{c_n},\quad t\in[0,1]. \end{equation} It has been shown by Doney \cite{Doney85} that if $X\in\mathcal{D}(\alpha,\beta)$ then, for every fixed $x$, $s_n$ conditioned on $\{\tau_x>n\}$ converges weakly on $D[0,1]$ towards a process $M_{\alpha,\beta}$. This limiting process is usually called the {\it stable L\'evy meander}. Our next result shows that this convergence remain valid for all moving boundaries satisfying $g_n=o(c_n)$. \begin{theorem} \label{T3} Assume that the conditions of Theorem~\ref{T1} hold. Then the distribution of $s_n$ conditioned on $\{T_g>n\}$ converges weakly on $D[0,1]$ towards $M_{\alpha,\beta}$. \end{theorem} For random walks with zero mean and finite variance we have convergence towards the Brownian meander. In \cite{DSW16} we have proven that this convergence holds even for random walks with non-identically distributed increments satisfying the classical Lindeberg condition. But for random walks with infinite variance the statement of Theorem~\ref{T3} is new. The conditional limit theorem allows one to complement Theorem~\ref{T2} by the following statement: if $g_n=o(c_n)$ is monotone decreasing and $|g_n|/nc_n$ is not summable, then \begin{equation} \label{U-infinity} \lim_{n\to\infty}U_g(n)=\infty. \end{equation} (We shall prove \eqref{U-infinity} at the end of the paper.) Recall that we have shown after Theorem~\ref{T2} that if $g_n$ is increasing and $g_n/nc_n$ is not summable then $\lim_{n\to\infty}U_g(n)=0$. This implies that the conditions on the boundary in Theorem~\ref{T2}(b) are optimal. As a result we have determined the asymptotic behaviour of $U_g$ for all asymptotically stable walks satisfying \eqref{lrt}, which is a bit weaker than the strong renewal theorem for ladder heights. It is well-known from the renewal theory that the strong renewal theorem and \eqref{lrt} hold for all walks satisfying $\alpha(1-\rho)<1/2$. But if $\alpha(1-\rho)\ge 1/2$ then \eqref{lrt} may fail, see Example 4 in \cite{W12}. We refer to a recent paper by Caravenna and Doney\cite{CD16} for necessary and sufficient conditions for the strong renewal theorem. Our approach to moving boundaries is based on the following universality idea. The condition $g_n=o(c_n)$ means that the boundary reduces to the constant zero boundary after the rescaling of the random walk by $c_n$. Therefore, it is natural to expect that the asymptotic behaviour of $\mathbf P(T_g>n)$ will be simiar to that of $\mathbf P(\tau_0>n)$. This is an adaption of the universality methodology suggested in our recent paper \cite{DSW16}, where the first-passage problems for random walks belonging to the domain of attaraction of the Brownian motion have been considered. It is worth mentioning that in the present paper we use a different type of universality: we fix the distribution of the random walk and look for a possible widest class of boundary functions with the same type of the tail behaviour for the corresponding first-pasage time. \section{Some results from the fluctuation theory} In this section we collect some known facts about first-passage problems with constant boundaries. We start with the following result on exit times. \begin{lemma} \label{lem:const_boundary} Let $S_n$ be an asymptotically stable random walk. Then, for every $\delta_n\downarrow0$ there exists $\varepsilon_n\downarrow 0$ such that \begin{equation}\label{lem1.eq1} \sup_{x\in[0,\delta_nc_n]}\left|\frac{\mathbf P(\tau_x>n)}{V(x)\mathbf P(\tau_0>n)}-1\right|\le \varepsilon_n. \end{equation} In addition, the following estimate is valid for all $x\ge 0$, \begin{equation}\label{lem1.eq2} \mathbf P(\tau_x>n)\le C_0V(\min\{x, c_n\})\mathbf P(\tau_0>n). \end{equation} \end{lemma} The first statement \eqref{lem1.eq1} is Corollary~3 in \cite{D12}, and \eqref{lem1.eq2} is proven in Lemma~2.1 in \cite{AGKV}. Let $\tau^+$ denote the first ascending ladder epoch, that is, $$ \tau^+:=\min\{n\geq1:S_n>0\}. $$ Let $H(x)$ denote the renewal function of strict ascending ladder epochs. Then, similar to \eqref{V-tau}, one has \begin{equation} \label{H-tau} \lim_{n\to\infty} H(c_n)\mathbf P(\tau^+>n)=:A^+\in(0,\infty). \end{equation} Define also $\tau^+_x:=\min\{n\geq1: S_n>x\}$. Then, similar to \eqref{lem1.eq2}, \begin{equation} \label{tau+} \mathbf P(\tau^+_x>n)\le C_0 H(\min\{x,c_n\})\mathbf P(\tau^+>n),\quad x\ge0. \end{equation} Combining \eqref{V-tau} and \eqref{H-tau}, and using the well-known relation $$ \mathbf P(\tau^+>n)\mathbf P(\tau_0>n)\sim n^{-1}, $$ we conclude that \begin{equation} \label{VH} \lim_{n\to\infty}\frac{V(c_n)H(c_n)}{n}\in(0,\infty). \end{equation} \begin{lemma} \label{lem:meander} Let $f$ be a continuous functional on $D[0,1]$. Then, for every $\delta_n\to0$, $$ \sup_{x\le \delta_n c_n}\Big|\mathbf E[f(s_n)|\tau_x>n]-\mathbf E f(M_{\alpha,\beta})\Big|\to0. $$ \end{lemma} \begin{proof} Let $x_n$ be a sequence satisfying $x_n\le \delta_n c_n$. Caravenna and Chaumont have shown in \cite{CC08} that the Doob transform of $s_n$ converges to a stable process conditioned to stay positive at all times. Performing the inverse change of measure one can easily obtain the convergence $$ \mathbf E[f(s_n)|\tau_{x_n}>n]\to\mathbf E f(M_{\alpha,\beta}). $$ The desired uniformity follows from the standard contradiction argument. \end{proof} \section{Proof of Theorem~\ref{T1}} \subsection{Preliminary estimates} Define $$ G_n:=\max_{k\leq n}|g_k|,\quad Z_n:=S_n-g_n $$ and $$ Q_{k,n}(y):=\mathbf P\left(y+\min_{k\le j\le n}(Z_j-Z_k)>0\right). $$ \begin{lemma} \label{lem:Q-bound} Fix some sequence $\delta_n\downarrow0$ such that $\delta_nc_n$ increases. Then, for all $y\ge0,$ \begin{align} \label{Q-bound.1} \nonumber &\max_{k\le n/2}\left|\frac{Q_{k,n}(y)}{\mathbf P(\tau_0>n-k)}-V(y)\right|\\ &\hspace{1cm}\le \overline{\varepsilon}_{n}V(y)+2(1+C_0+\overline{\varepsilon}_1)V(G_n)+ 2C_0V(y)\mathbb{I}\{y>\overline{\delta}_nc_n-2G_n\}, \end{align} where $$ \overline{\varepsilon}_n:=\max_{k\in[n/2,n]}\varepsilon_k,\quad \overline{\delta}_n:=\frac{\min_{k\in[n/2,n]}\delta_k c_k}{c_n} $$ and $\varepsilon_n$ is taken from \eqref{lem1.eq1}. \end{lemma} \begin{proof} It is immediate from the definition of $Q_{k,n}$ that \begin{eqnarray*} \mathbf P\left(y-2G_n+\min_{j\leq n-k}S_k>0\right) \le Q_{k,n}(y)\le \mathbf P\left(y+2G_n+\min_{j\leq n-k}S_k>0\right) \end{eqnarray*} If $y+2G_n\le \overline{\delta}_nc_n$ then $y+2G_n\le \delta_{n-k}c_{n-k}$ for all $k\le n/2$. Therefore, by \eqref{lem1.eq1}, $$ \mathbf P\left(y+2G_n+\min_{j\leq n-k}S_k>0\right) \leq(1+\overline{\varepsilon}_n)V(y+2G_n)\mathbf P(\tau_0>n-k) $$ for every $y\le \overline{\delta}_nc_n-2G_n$. Using now the subadditivity of $V$, we obtain \begin{align*} &\frac{\mathbf P\left(y+2G_n+\min_{j\leq n-k}S_k>0\right)}{\mathbf P(\tau_0>n-k)}\\ &\hspace{1cm}\leq(1+\overline{\varepsilon}_n)V(y)+2(1+\overline{\varepsilon}_n)V(G_n),\quad y\le \overline{\delta}_nc_n-2G_n. \end{align*} If $y> \overline{\delta}_nc_n-2G_n$ then, using \eqref{lem1.eq2} and the subadditivity of $V$, we have $$ \frac{\mathbf P\left(y+2G_n+\min_{j\leq n-k}S_k>0\right)}{\mathbf P(\tau_0>n-k)} \leq C_0V(y)+2C_0V(G_n),\quad y> \overline{\delta}_nc_n-2G_n. $$ As a result we have \begin{align} \label{Q1}\nonumber &\frac{Q_{k,n}(y)}{\mathbf P(\tau_0>n-k)}\\ &\hspace{1cm}\le (1+\overline{\varepsilon}_n)V(y)+2(1+C_0+\overline{\varepsilon}_n)V(G_n) +C_0V(y)\mathbb{I}\{y>\overline{\delta}_nc_n-2G_n\}. \end{align} If $y\le \overline{\delta}_nc_n-2G_n$ then it follows from \eqref{lem1.eq1} that $$ \mathbf P\left(y-2G_n+\min_{j\leq n-k}S_k>0\right) \geq(1-\overline{\varepsilon}_n)V(y-2G_n)\mathbf P(\tau_0>n-k). $$ Therefore, due to the subadditivity of $V$, \begin{align*} \frac{Q_{k,n}(y)}{\mathbf P(\tau_0>n-k)}&\geq \frac{\mathbf P\left(y-2G_n+\min_{j\leq n-k}S_k>0\right)}{\mathbf P(\tau_0>n-k)}\\ &\geq(1-\overline{\varepsilon}_n)V(y)-2V(G_n)-V(y)\mathbb{I}\{y>\overline{\delta}_nc_n-2G_n\}. \end{align*} Combining this with \eqref{Q1}, we obtain \eqref{Q-bound.1}. \end{proof} Define $$ Z_n^*:=V(Z_n)\mathbb{I}\{T_g>n\}. $$ \begin{lemma} \label{lem:Z-bound} For every stopping time $\nu$, $$ \left|\mathbf E Z^*_{\nu\wedge n}-\mathbf E Z^*_n\right|\leq 2V(G_n)\mathbf P(T_g>\nu\wedge n), \quad n\geq1. $$ \end{lemma} \begin{proof} By the Markov property at time $\nu\wedge n$, \begin{align*} \mathbf E Z^*_n&=\mathbf E[V(S_n-g_n);T_g>n]\\ &=\sum_{k=1}^n\int_0^\infty\mathbf P(Z_k\in dz;T_g>k,\nu\wedge n=k) \\ &\hspace{3cm}\times\mathbf E\left[V(z+Z_n-Z_k);z+\min_{k\le j\le n}Z_j-Z_k>0\right]. \end{align*} Then, we have the following estimates from above \begin{align*} \mathbf E Z^*_n&\le\sum_{k=1}^n\int_0^\infty\mathbf P(Z_k\in dz;T_g>k,\nu\wedge n=k)\\ &\hspace{3cm}\times\mathbf E\left[V(z+2G_n+S_{n-k});z+2G_n+\min_{j\le n-k}S_j>0\right] \end{align*} and below \begin{align*} \mathbf E Z^*_n&=\mathbf E[V(S_n-g_n);T_g>n]\\ &\ge\sum_{k=1}^n\int_0^\infty\mathbf P(Z_k\in dz;T_g>k, \nu\wedge n=k)\\ &\hspace{3cm}\times\mathbf E\left[V(z-2G_n+S_{n-k});z-2G_n+\min_{j\le n-k}S_j>0\right]. \end{align*} Then, using the harmonicity and the subadditivity of $V(x)$, we get \begin{align*} \mathbf E Z^*_n&\le \mathbf E[V(Z_{\nu\wedge n}+2G_n);T_g>\nu\wedge n]\\ &\le \mathbf E Z^*_{\nu\wedge n}+2V(G_n)\mathbf P(T_g>\nu\wedge n). \end{align*} and \begin{align*} \mathbf E Z^*_n&\ge \mathbf E[V(Z_{\nu\wedge n}-2G_n);T_g>\nu\wedge n]\\ &\ge \mathbf E Z^*_{\nu\wedge n}-2V(G_n)\mathbf P(T_g>\nu\wedge n). \end{align*} Thus, the proof is complete. \end{proof} Define the stopping times \begin{equation} \label{def:nu} \nu(h):=\min\{k\geq1: Z_k\geq h\} \quad\text{and}\quad \nu_n:=\nu(c_n)\wedge n. \end{equation} \begin{lemma} \label{lem:Ubound} There exist constants $C_1$ and $C_2$ such that \begin{equation} \label{UB1} \frac{\mathbf P(T_g>n)}{\mathbf P(\tau_0>n)}\le C_1\mathbf E Z^*_n \end{equation} and \begin{equation} \label{UB2} \frac{\mathbf P(T_g>\nu_n)}{\mathbf P(\tau_0>n)}\le C_2\mathbf E Z^*_n. \end{equation} for all $n\geq1$. \end{lemma} \begin{proof} According to Lemma 24 in \cite{DSW16}, $$ \mathbf P(S_n\ge x|T_g>n)\ge \mathbf P(S_n\geq x),\quad x\in\mathbb{R}. $$ This implies that \begin{equation} \label{UB3} \frac{\mathbf E Z^*_n}{\mathbf P(T_g>n)}=\mathbf E[V(Z_n)|T_g>n]\ge \mathbf E V(Z_n). \end{equation} Since $S_n$ is asymptotically stable and $V(x)$ is regularly varying of index $\alpha(1-\rho)$, $$ \mathbf E V(Z_n)=\mathbf E V(S_n-g_n)\sim V(c_n)\mathbf E [Y^{\alpha(1-\rho)};Y>0], $$ where $Y$ is distributed according to the stable law from \eqref{std}. Combining this with \eqref{UB3}, we obtain $$ \liminf_{n\to\infty}\frac{\mathbf E Z^*_n}{V(c_n)\mathbf P(T_g>n)}\ge \mathbf E [Y^{\alpha(1-\rho)};Y>0]>0. $$ Using now \eqref{V-tau}, we get \eqref{UB1}. In order to prove \eqref{UB2} we note that \begin{align*} \mathbf P(T_g>\nu_n)&=\mathbf P(T_g>\nu_n, Z_{\nu_n}<c_n)+\mathbf P(T_g>\nu_n, Z_{\nu_n}\ge c_n)\\ &\le \mathbf P(T_g>n)+\mathbf P(Z^*_{\nu_n}\geq V(c_n)). \end{align*} Applying \eqref{UB1} to the first summand and the Markov inequality to the second summand, we obtain \begin{equation} \label{UB4} \mathbf P(T_g>\nu_n)\le C_1\mathbf E Z^*_n\mathbf P(\tau_0>n)+\frac{\mathbf E Z^*_{\nu_n}}{V(c_n)}. \end{equation} By Lemma~\ref{lem:Z-bound}, $$ \frac{\mathbf E Z^*_{\nu_n}}{V(c_n)}\le \frac{\mathbf E Z^*_{n}}{V(c_n)}+\frac{2V(G_n)}{V(c_n)}\mathbf P(T_g>\nu_n). $$ Substituting this into \eqref{UB4}, we have $$ \mathbf P(T_g>\nu_n)\le C_1\mathbf E Z^*_n\mathbf P(\tau_0>n)+\frac{\mathbf E Z^*_{n}}{V(c_n)}+\frac{2V(G_n)}{V(c_n)}\mathbf P(T_g>\nu_n). $$ Since $G_n=o(c_n)$, $2V(G_n)/V(c_n)<1/2$ for all $n$ sufficiently large. For such values of $n$ we have $$ \mathbf P(T_g>\nu_n)\le 2C_1\mathbf E Z^*_n\mathbf P(\tau_0>n)+2\frac{\mathbf E Z^*_{n}}{V(c_n)}, $$ and \eqref{UB2} follows now from \eqref{V-tau}. \end{proof} \begin{lemma} \label{lem:Z-exp} Sequences $\mathbf E Z^*_n$ and $\mathbf E Z^*_{\nu_n}$ are slowly varying and, moreover, $$ \mathbf E Z^*_n\sim\mathbf E Z^*_{\nu_n}. $$ \end{lemma} \begin{proof} Taking $\nu\equiv k<n$ in Lemma~\ref{lem:Z-bound} and using \eqref{UB1}, we obtain \begin{align*} \left|\mathbf E Z^*_k-\mathbf E Z^*_n\right| \le 2V(G_n)\mathbf P(T_g>k)\le 2C_1 V(G_n)\mathbf E Z^*_k\mathbf P(\tau_0>k). \end{align*} Therefore, \begin{align*} \max_{k\in[m,n]}\left|\frac{\mathbf E Z^*_n}{\mathbf E Z^*_k}-1\right|\leq 2C_1V(G_n)\mathbf P(\tau_0>m). \end{align*} It follows from the assumption $G_n=o(c_n)$ and \eqref{V-tau} that $V(G_n)=o(1/\mathbf P(\tau_0>n))$. Recalling that $\mathbf P(\tau_0>n)$ is regularly varying, we infer that $V(G_n)=o(1/\mathbf P(\tau_0>m(n)))$ if $\frac{m(n)}{n}\to0$ sufficiently slow. Thus, \begin{align*} \max_{k\in[m(n),n]}\left|\frac{\mathbf E Z^*_k}{\mathbf E Z^*_n}-1\right|\to 0 \end{align*} provided that $\frac{m(n)}{n}$ is bounded from below or goes to zero sufficiently slow. In particular, the sequence $\mathbf E Z^*_n$ is slowly varying. Taking $\nu=\nu_n$ in Lemma~\ref{lem:Z-bound} and using \eqref{UB2}, we have \begin{align*} \left|\mathbf E Z^*_{\nu_n}-\mathbf E Z^*_n\right| \le 2V(G_n)\mathbf P(T_g>\nu_n)\le 2C_2 V(G_n)\mathbf E Z^*_n\mathbf P(\tau_0>k)=o(\mathbf E Z^*_n). \end{align*} In other words, $\mathbf E Z^*_{\nu_n}\sim\mathbf E Z^*_n$. Thus, the proof is finished. \end{proof} \begin{lemma} \label{lem:tail_exp} For every sequence $A_n$ satisfying $A_n\gg c_n$ we have $$ \mathbf E[Z^*_{\nu_n}; Z_{\nu_n}>A_n]=o\left(\mathbf E Z^*_n\right). $$ \end{lemma} \begin{proof} Since $V$ is increasing and subadditive, for all $n$ sufficiently large, \begin{align*} &\mathbf E[Z^*_{\nu_n}; Z_{\nu_n}>A_n]\\ &\hspace{1cm}=\sum_{j=1}^n\int_{g_{j-1}}^{c_n}\mathbf P(S_{j-1}\in dy,T_g>j-1) \mathbf E[V(y-g_j+X_1);y-g_j+X_1>A_n]\\ &\hspace{1cm}\le\sum_{j=1}^n\mathbf P(T_g>j-1)\mathbf E[V(c_n+2G_n+X_1);c_n+2G_n+X_1>A_n]\\ &\hspace{1cm}\le \sum_{j=1}^n\mathbf P(T_g>j-1) \left(\mathbf E\left[V(X_1);X_1>\frac{A_n}{2}\right]+3V(c_n)\mathbf P\left(X_1>\frac{A_n}{2}\right)\right) \end{align*} Combining \eqref{UB1}, Lemma~\ref{lem:Z-exp} and the fact that $\mathbf P(\tau_0>j)$ is regularly varying of index $\rho-1\in(-1,0)$, we get $$ \sum_{j=1}^n\mathbf P(T_g>j-1)\leq 1+C_1\sum_{j=1}^{n-1} \mathbf E Z^*_j\mathbf P(\tau_0>j)\leq C n\mathbf E Z^*_n\mathbf P(\tau_0>n). $$ Therefore, \begin{align} \label{tail.1} \nonumber &\frac{\mathbf E[Z^*_{\nu_n}; Z_{\nu_n}>A_n]}{\mathbf E Z^*_n}\\ &\hspace{1cm}\le C n\mathbf P(\tau_0>n) \left(\mathbf E\left[V(X_1);X_1>\frac{A_n}{2}\right]+3V(c_n)\mathbf P\left(X_1>\frac{A_n}{2}\right)\right). \end{align} The assumption $A_n\gg c_n$ implies that $\mathbf P(X_1>A_n)=o(n^{-1})$. Consequently, \begin{equation} \label{tail.2} V(c_n)\mathbf P\left(X_1>\frac{A_n}{2}\right)=o\left(\frac{1}{n\mathbf P(\tau_0>n)}\right). \end{equation} Furthermore, \begin{align*} \mathbf E\left[V(X_1);X_1>\frac{A_n}{2}\right] =\int_{A_n/2}^\infty V(x)\mathbf P(X_1\in dx) \le \int_{A_n/2}^\infty \frac{V(x)}{x^2}\theta(dx), \end{align*} where $\theta(dx):=x^2\mathbf P(|X_1|\in dx)$. If $S_n$ is asymptotically stable then $\Theta(x):=\theta((0,x))$ is regularly varying of index $2-\alpha$. Since $V(x)/x^2$ is regularly varying of index $\alpha(1-\rho)-2$, we infer that $$ \mathbf E\left[V(X_1);X_1>\frac{A_n}{2}\right] \le C\frac{V(A_n)}{A_n^2}\Theta(A_n) =o\left(\frac{V(c_n)}{c_n^2}\Theta(c_n)\right), $$ where the last step follows from the fact that $\frac{V(x)}{x^2}\Theta(x)$ is regularly varying of index $-\alpha\rho<0$. By the definition of $c_n$, $c_n^{-2}\Theta(c_n)\sim n^{-1}$. Using \eqref{V-tau} once again, we get \begin{equation} \label{tail.3} \mathbf E\left[V(X_1);X_1>\frac{A_n}{2}\right]=o\left(\frac{1}{n\mathbf P(\tau_0>n)}\right). \end{equation} By combining \eqref{tail.1}--\eqref{tail.3} we complete the proof. \end{proof} \subsection{Proof of Theorem~\ref{T1}} Let $\{m(n)\}$ be a sequence of natural numbers such that $m(n)\to\infty$ and $m(n)=o(n)$. By the Markov property, $$ \mathbf P(T_g>n)=\mathbf E [Q_{\nu_{m(n)},n}(Z_{\nu_{m(n)}});T_g>\nu_{m(n)}]. $$ Applying Lemma~\ref{lem:Q-bound} and noting that $\mathbf P(\tau_0>n-k)\sim\mathbf P(\tau_0>n)$ uniformly in $k\le m(n)$, we get \begin{align} \nonumber \label{T1.2} &\frac{\mathbf P(T_g>n)}{\mathbf P(\tau_0>n)}=(1+o(1))\mathbf E Z^*_{\nu_{m(n)}} +O\left(V(G_n)\mathbf P(T_g>\nu_{m(n)})\right)\\ &\hspace{4cm} +O\left(\mathbf E[Z^*_{\nu_{m(n)}};Z_{\nu_{m(n)}}>\overline{\delta}_nc_n-G_n]\right). \end{align} By \eqref{UB2}, $\mathbf P(T_g>\nu_{m(n)})\le C_2\mathbf E Z^*_{m(n)}\mathbf P(\tau_0>m(n))$. From this estimate and from the fact that $\mathbf P(\tau_0>n)V(G_n)\to0$ we infer that, for every sequence $\{m(n)\}$ such that $m(n)/n\to0$ sufficiently slow, \begin{equation} \label{T1.3} V(G_n)\mathbf P(T_g>\nu_{m(n)})=o(\mathbf E Z^*_{m(n)}). \end{equation} For every sequence $m(n)=o(n)$ we can choose $\{\delta_n\}$ satisfying $\overline{\delta}_nc_n\gg G_n$ and $\overline{\delta}_nc_n\gg c_{m(n)}$. Then by Lemma~\ref{lem:tail_exp}, $$ \mathbf E[Z^*_{\nu_{m(n)}};Z_{\nu_{m(n)}}>\overline{\delta}_nc_n-G_n]=o(\mathbf E Z^*_{m(n)}). $$ Plugging this and \eqref{T1.3} into \eqref{T1.2}, we obtain $$ \frac{\mathbf P(T_g>n)}{\mathbf P(\tau_0>n)}=(1+o(1))\mathbf E Z^*_{\nu_{m(n)}}+o(\mathbf E Z^*_{m(n)}). $$ According to Lemma~\ref{lem:Z-exp}, \begin{equation} \label{m(n)-prop} \mathbf E Z^*_{\nu_{m(n)}}\sim \mathbf E Z^*_{m(n)}\sim \mathbf E Z^*_{n} \end{equation} provided that $m(n)/n\to0$ sufficiently slow. Consequently, $$ \frac{\mathbf P(T_g>n)}{\mathbf P(\tau_0>n)}\sim \mathbf E Z^*_{n}. $$ Thus, the proof is complete. \section{Proof of Theorem~\ref{T2}} \subsection{Technical preparations} \begin{lemma} \label{lem:moments} For any sequence $\{r_n\}$ satisfying $r_n=o(c_n)$ we have \begin{equation*} \mathbf E[V(S_n+r_n);T_g>n]\sim \mathbf E Z_n^*. \end{equation*} \end{lemma} \begin{proof} By the subadditivity of $V(x)$, $$ |V(x+y)-V(x)|\le V(|y|),\quad x,y\in\mathbb{R}. $$ Therefore, \begin{align*} &|\mathbf E[V(S_n+r_n);T_g>n]-\mathbf E Z_n^*|\\ &\hspace{2cm}=|\mathbf E[V(S_n+r_n);T_g>n]-\mathbf E[V(S_n-g_n);T_g>n]|\\ &\hspace{2cm}\le V(|r_n+g_n|)\mathbf P(T_g>n) \end{align*} According to Theorem~\ref{T1}, $\mathbf P(T_g>n)\sim \mathbf E Z_n^*\mathbf P(\tau_0>n)$. Therefore, \begin{align*} \frac{\mathbf E[V(S_n+r_n);T_g>n]}{\mathbf E Z^*_n}-1=O\big(V(|r_n+g_n|)\mathbf P(\tau_0>n)\big). \end{align*} Recalling that $|r_n+g_n|=o(c_n)$ and taking into account \eqref{V-tau}, we conclude that $V(|r_n+g_n|)\mathbf P(\tau_0>n)$ converges to zero. This completes the proof. \end{proof} \begin{lemma} \label{lem:local} Under the conditions of Theorem~\ref{T1} we have $$ \mathbf P(S_n\in(x,x+1],T_g>n)=O\left(\frac{H(\min\{x+G_n,c_n\})}{nc_n}\mathbf E Z^*_n\right) $$ uniformly in $x$. \end{lemma} \begin{proof} Set $m=[n/2]$. By the Markov property at time $m$, \begin{align*} &\mathbf P(S_n\in(x,x+1],T_g>n)\\ &\hspace{1cm}\le \int_{g_m}^\infty\mathbf P(S_m\in dy,T_g>m)\mathbf P(S_{n-m}\in(x-y,x-y+1],\tau_{y+G_n}>n-m). \end{align*} Define $X^*_k=-X_{n-m+1-k}$, $S^*_k=X^*_1+X^*_2+\ldots+X^*_k$ for $k=1,2,\ldots,n-m$. Define also $\tau^*_y:=\min\{k\ge 1: S^*_k<-y\}$. Then \begin{align*} &\mathbf P(S_{n-m}\in(x-y,x-y+1],\tau_{y+G_n}>n-m)\\ &\hspace{1cm}\le \mathbf P(S^*_{n-m}\in[y-x-1,y-x),\tau^*_{x+1+G_n}>n-m). \end{align*} Since $S_k^*$ is also asymptotically stable, one has the following standard bound for the concentration function: $$ \sup_x\mathbf P(S_n^*\in(x,x+1])\le\frac{C}{c_n}. $$ Using this bound, we infer that \begin{align*} &\mathbf P(S^*_n\in(x,x+1],\tau_y^*>n)\\ &\hspace{1cm}\le\int_{-\infty}^\infty\mathbf P(S^*_{n/2}\in(x,x+1],\tau_y^*>n/2)\mathbf P(S_{n/2}^*\in(x-y,x-y+1])\\ &\hspace{1cm}\le\frac{C}{c_{n/2}}\mathbf P(\tau^*_y>n/2). \end{align*} Therefore, \begin{align*} &\mathbf P(S_{n-m}\in(x-y,x-y+1],\tau_{y+G_n}>n-m)\\ &\hspace{1cm}= O\left(\frac{\mathbf P(\tau^*_{x+1+G_n}>(n-m)/2)}{c_{(n-m)/2}}\right) =O\left(\frac{\mathbf P(\tau^*_{x+1+G_n}>n)}{c_{n}}\right). \end{align*} It is obvious that $\mathbf P(\tau^*_{x+1+G_n}>n)=\mathbf P(\tau^+_{x+1+G_n}>n)$. Then, taking into account \eqref{tau+} and \eqref{H-tau}, we conclude that $$ \mathbf P(S_n\in(x,x+1],T_g>n)=O\left(\frac{H(\min\{c_n,x+G_n\})}{c_nH(c_n)}\mathbf P(T_g>n)\right). $$ Recalling that $\mathbf P(T_g>n)=O(\mathbf E Z^*_n/V(c_n))$ and using \eqref{VH}, we obtain the desired bound. \end{proof} \begin{lemma} \label{lem:V-diff} Assume that the conditions of Theorem~\ref{T1} are valid. Assume, in addition, that \eqref{lrt} holds. Then $$ \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);T_g>n]=O\left(\frac{G_{2n}}{c_n}\mathbf E Z^*_n\right) $$ and $$ \mathbf E[V(S_n-G_{n})-V(S_n-G_{2n});T_g>n]=O\left(\frac{G_{2n}}{c_n}\mathbf E Z^*_n\right). $$ \end{lemma} \begin{proof} We first note that the subadditivity of $V$ implies the bound \begin{align*} &\mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n<G_{2n},T_g>n]\\ &\hspace{1cm}\leq V(G_{2n})\mathbf P(S_n<G_{2n},T_g>n). \end{align*} Applying Lemma~\ref{lem:local}, we then get \begin{align*} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n<G_{2n},T_g>n]\\ =O\left(G_{2n}\frac{H(G_{2n})V(G_{2n})}{nc_n}\mathbf E Z^*_n\right). \end{align*} Recalling that $G_n=o(c_n)$ and using \eqref{VH}, we infer that $$ H(G_{2n})V(G_{2n})=o(n). $$ As a result, \begin{equation} \label{V-diff.1} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n<G_{2n},T_g>n]=o\left(\frac{G_{2n}}{c_n}\mathbf E Z^*_n\right). \end{equation} Furthermore, it follows from \eqref{lrt} that, uniformly for $x\in(G_{2n},c_n)$, \begin{align*} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n\in(x,x+1],T_g>n]\\ =O\left(G_{2n}\frac{V(x)}{x}\mathbf P(S_n\in(x,x+1],T_g>n)\right). \end{align*} Applying now Lemma~\ref{lem:local}, we conclude that \begin{align*} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n\in(x,x+1],T_g>n]\\ =O\left(G_{2n}\frac{V(x)H(x)}{xnc_n}\mathbf E Z^*_n\right). \end{align*} Therefore, \begin{align*} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n\in(G_{2n},c_n],T_g>n]\\ =O\left(\frac{G_{2n}}{nc_n}\mathbf E Z^*_n\sum_{k=[G_{2n}]}^{[c_n]+1}\frac{V(k)H(k)}{k}\right). \end{align*} Recalling that $V(x)H(x)$ is regularly varying with index $\alpha$ and taking into account \eqref{VH}, we arrive at \begin{align} \label{V-diff.2} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n\in(G_{2n},c_n],T_g>n] =O\left(\frac{G_{2n}}{c_n}\mathbf E Z^*_n\right). \end{align} Using \eqref{lrt} once again and noting that the function $\frac{V(x)}{x}$ is eventually non-increasing, we get \begin{align*} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n>c_n,T_g>n] =O\left(G_{2n}\frac{V(c_n)}{c_n}\mathbf P(T_g>n)\right). \end{align*} By Theorem~\ref{T1} and \eqref{V-tau}, $V(c_n)\mathbf P(T_g>n)\sim\mathbf E Z^*_n$. Consequently, \begin{align*} \mathbf E[V(S_n+G_{2n})-V(S_n+G_n);S_n>c_n,T_g>n]=O\left(\frac{G_{2n}}{c_n}\mathbf E Z^*_n\right). \end{align*} Combining this with \eqref{V-diff.1} and \eqref{V-diff.2}, we complete the proof of the first estimate. The second one can be derived by using the same arguments. For this reason we omit its proof. \end{proof} \subsection{Proof of Theorem~\ref{T2}(a)} For every $m\in(n,2n]$ we have \begin{align*} &\mathbf E[V(S_m+G_m);T_g>m]\\ &\hspace{0.3cm}=\int_{-G_n}^\infty\mathbf P(S_n\in dx;T_g>n)\mathbf E[V(x+S_{m-n}+G_m);\min_{k\leq n-m}(x+S_k-g_{n+k})>0]\\ &\hspace{0.3cm}\le \int_{-G_n}^\infty\mathbf P(S_n\in dx;T_g>n)\mathbf E[V(x+S_{m-n}+G_{2n});\tau_{x+G_{2n}}>n-m]. \end{align*} Recalling that $V(y+S_k)\mathbb{I}\{\tau_y>k\}$ is martingale, we obtain \begin{align*} &\max_{m\in(n,2n]}\mathbf E[V(S_m+G_m);T_g>m]\\ &\hspace{1cm}\le \mathbf E[V(S_n+G_{2n});T_g>n]\\ &\hspace{1cm}=\mathbf E[V(S_n+G_{n});T_g>n]+\mathbf E[V(S_n+G_{2n})-V(S_n+G_n);T_g>n]. \end{align*} Applying the first estimate from Lemma~\ref{lem:V-diff} and noting that $$ \mathbf E Z^*_n=\mathbf E[V(S_n-g_n);T_g>n]\le \mathbf E[V(S_n+G_n);T_g>n], $$ we infer that, for some constant $B$ and all $n\geq 1$, \begin{align*} \max_{m\in(n,2n]}\mathbf E[V(S_m+G_m);T_g>m] \le \mathbf E[V(S_n+G_{n});T_g>n]\left(1+B\frac{G_{2n}}{c_n}\right). \end{align*} Thus, for every $\ell\ge1$, \begin{align*} \max_{n\le 2^\ell}\mathbf E[V(S_m+G_m);T_g>m] \le \mathbf E[V(S_1+G_1);T_g>1] \prod_{j=0}^{\ell-1}\left(1+B\frac{G_{2^{j+1}}}{c_{2^{j}}}\right). \end{align*} It is obvious that \eqref{T2.1} implies that $$ \sum_{j=1}^\infty\frac{G_{2^{j+1}}}{c_{2^{j}}}<\infty. $$ Therefore, \begin{equation*} \sup_{n\geq1}\mathbf E[V(S_n+G_{n});T_g>n]<\infty. \end{equation*} Recalling that $U_g(n)=\mathbf E Z^*_n$ is bounded from above by $\mathbf E[V(S_n+G_{n});T_g>n]$, we get the upper bound in \eqref{T2.2}. The proof of the lower bound in \eqref{T2.1} is very similar to the proof of the upper bound. We first note that $$ \mathbf E Z^*_n\ge \mathbf E[V(S_n-G_n);T_g>n]. $$ Furthermore, for every $m\in(n,2n]$, \begin{align*} &\mathbf E[V(S_m-G_m);T_g>m]\\ &\hspace{0.3cm}\ge \int_{G_{2n}}^\infty\mathbf P(S_n\in dx;T_g>n)\mathbf E[V(x+S_{m-n}-G_{2n});\tau_{x-G_{2n}}>n-m]\\ &\hspace{0.3cm}=\mathbf E[V(S_n-G_{2n});T_g>n]\\ &\hspace{0.3cm}=\mathbf E[V(S_n-G_{n});T_g>n]-\mathbf E[V(S_n-G_n)-V(S_n-G_{2n});T_g>n]. \end{align*} Using the second estimate from Lemma~\ref{lem:V-diff} and recalling that, by Lemma~\ref{lem:moments}, $\mathbf E Z^*_n\sim\mathbf E[V(S_n-G_n);T_g>n]$, we arrive at the inequality \begin{align*} \min_{m\in(n,2n]}\mathbf E[V(S_m-G_m);T_g>m] \ge \mathbf E[V(S_n-G_{n});T_g>n]\left(1-B\frac{G_{2n}}{c_n}\right). \end{align*} Choosing $n_0$ so that $B\frac{G_{2n}}{c_n}<\frac{1}{2}$ for all $n>n_0$ we then get \begin{align*} &\min_{n\le n_02^\ell}\mathbf E[V(S_n-G_n);T_g>n]\\ &\hspace{0.5cm}\ge \min_{n\le n_0}\mathbf E[V(S_n-G_n);T_g>n] \prod_{j=0}^{\ell-1}\left(1-B\frac{G_{n_02^{j+1}}}{c_{n_02^{j}}}\right). \end{align*} From this bound and \eqref{T2.2} we obtain the desired lower bound. \subsection{Proof of Theorem~\ref{T2}(b)} If $g_n$ increases, then, according to Lemma 4 in \cite{DW16}, the sequence $V(S_n-g_n)\mathbb{I}\{T_g>n\}$ is a supermartingale. In particular, the sequence $\mathbf E Z^*_n$ decreases and has finite limit. The positivity of the limit follows from \eqref{T2.2}. If $g_n$ decreases, then $V(S_n-g_n)\mathbb{I}\{T_g>n\}$ is a submartingale, see Lemma 1 in \cite{DW16}. This implies that the limit of $\mathbf E Z^*_n$ is positive. Its finiteness follows from \eqref{T2.2}. \section{Functional convergence} \subsection{Proof of the conditional limit theorem} Fix some sequence $m(n)=o(n)$ such that \eqref{m(n)-prop} holds. Let $\delta_n$ satisfy the condition $$ G_n\ll \overline{\delta}_n^2c_n\ll c_{m(n)}\ll \overline{\delta}_nc_n. $$ By the Markov property and \eqref{lem1.eq2}, \begin{align*} &\mathbf P(T_g>n, Z_{\nu_{m(n)}}>\overline{\delta}_n c_n)\\ &\hspace{0.5cm}=\int_{\overline{\delta}_n c_n}^\infty \mathbf P(Z_{\nu_{m(n)}}\in dz, T_g>\nu_{m(n)}) \mathbf P\left(z+\min_{\nu_{m(n)}\le j\le n}(Z_j-Z_{\nu_{m(n)}})>0\right)\\ &\hspace{0.5cm}\le\int_{\overline{\delta}_n c_n}^\infty \mathbf P(Z_{\nu_{m(n)}}\in dz, T_g>\nu_{m(n)}) \mathbf P\left(z+2G_n+\min_{j\le n-m(n)}S_j>0\right)\\ &\hspace{0.5cm}\le C_0\mathbf P(\tau_0>n-m(n))\mathbf E[V(Z_{\nu_{m(n)}}+2G_n);T_g>\nu_{m(n)},Z_{\nu_{m(n)}}>\overline{\delta}_n c_n]. \end{align*} Since $G_n\ll \overline{\delta}_nc_n$ and $m(n)=O(n)$, we have $V(Z_{\nu_{m(n)}}+2G_n)=O(V(Z_{\nu_{m(n)}}))$ uniformly on the evernt $\{Z_{\nu_{m(n)}}>\overline{\delta}_n c_n\}$. Consequently, $$ \mathbf P(T_g>n, Z_{\nu_{m(n)}}>\overline{\delta}_n c_n)= O\left(\mathbf P(\tau_0>n)\mathbf E[Z^*_{\nu_{m(n)}};Z_{\nu_{m(n)}}>\overline{\delta}_n c_n]\right). $$ Now, in view of Lemma~\ref{lem:Z-exp} and \eqref{m(n)-prop}, \begin{equation} \label{T1.4} \mathbf P(T_g>n, Z_{\nu_{m(n)}}>\overline{\delta}_n c_n)= o\left(\mathbf P(\tau_0>n)\mathbf E Z^*_n\right). \end{equation} Using the Markov property and \eqref{lem1.eq2} once again, we obtain \begin{align*} &\mathbf P(T_g>n, Z_{\nu_{m(n)}}<\overline{\delta}^2_n c_n)\\ &\hspace{0.5cm}=\int_0^{\overline{\delta}^2_n c_n} \mathbf P(Z_{\nu_{m(n)}}\in dz, T_g>\nu_{m(n)}) \mathbf P\left(z+\min_{\nu_{m(n)}\le j\le n}(Z_j-Z_{\nu_{m(n)}})>0\right)\\ &\hspace{0.5cm}\le\int_0^{\overline{\delta}^2_n c_n} \mathbf P(Z_{\nu_{m(n)}}\in dz, T_g>\nu_{m(n)}) \mathbf P\left(z+2G_n+\min_{j\le n-m(n)}S_j>0\right)\\ &\hspace{0.5cm}\le C_0 V(\overline{\delta}^2_n c_n) \mathbf P(\tau_0>n-m(n))\mathbf P(T_g>\nu_{m(n)}). \end{align*} Then, according to \eqref{UB2} and \eqref{m(n)-prop}, $$ \mathbf P(T_g>n, Z_{\nu_{m(n)}}<\overline{\delta}^2_n c_n)= O\left(V(\overline{\delta}^2_n c_n)\mathbf P(\tau_0>n)\mathbf E Z^*_{n}\mathbf P(\tau_0>m(n))\right). $$ Using the relation $\mathbf P(\tau_0>m(n))\sim C/V(c_{m(n)})$ and the assumption $c_{m(n)}\gg\overline{\delta}^2_n c_n$, we get $$ V(\overline{\delta}^2_n c_n)\mathbf P(\tau_0>m(n))\to0. $$ Therefore, \begin{equation} \label{T1.5} \mathbf P(T_g>n, Z_{\nu_{m(n)}}<\overline{\delta}^2_n c_n)=o\left(\mathbf P(\tau_0>n)\mathbf E Z^*_n\right). \end{equation} Let $f$ be a uniformly continuous and bounded functional on the space $D[0,1]$. Without loss of generality, we may assume that $0\le f\le 1$. It follows then from \eqref{T1.4}, \eqref{T1.5} and Theorem~\ref{T1} that \begin{align} \label{T1.6} \mathbf E\left[f(s_n);T_g>n\right]= \mathbf E\left[f(s_n);Z_{\nu_{m(n)}}\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n],T_g>n\right] +o(\mathbf P(T_g>n)). \end{align} For every $k\geq0$ and every $y\in\mathbb{R}$ define a functional $f(k,y;\cdot)$ by the following relation: $$ f(k,y;h):=f\left(y+\left(h(t)-h\left(\frac{k}{n}\right)\right) \mathbb{I}\left\{t\geq \frac{k}{n}\right\}\right),\quad h\in D[0,1]. $$ It follows from the definition of $\nu_{m(n)}$ that \begin{align*} \frac{\max_{k\leq\nu_{m(n)}}|S_k-S_{\nu_{m(n)}}|}{c_n} &\leq \frac{\max_{k\leq\nu_{m(n)}}|Z_k-Z_{\nu_{m(n)}}|}{c_n}+\frac{2G_n}{c_n}\\ &\leq \frac{Z_{\nu_{m(n)}}}{c_n}+\frac{3G_n}{c_n} \leq \overline{\delta}_n+\frac{3G_n}{c_n} \end{align*} on the event $\{Z_{\nu_{m(n)}}\le \overline{\delta}_nc_n,T_g>\nu_{m(n)}\}$. From this bound and the uniform continuity of the functional $f$ we infer that $$ f(s_n)-f\left(\nu_{m(n)},\frac{S_{\nu_{m(n)}}}{c_n};s_n\right)=o(1) \quad\text{on the event }\{Z_{\nu_{m(n)}}\le \overline{\delta}_nc_n,T_g>\nu_{m(n)}\}. $$ Combining this estimate with \eqref{T1.6}, we obtain \begin{align} \label{T1.7} \nonumber &\mathbf E\left[f(s_n);T_g>n\right]\\ &= \mathbf E\left[f\left(\nu_{m(n)},\frac{S_{\nu_{m(n)}}}{c_n};s_n\right);Z_{\nu_{m(n)}}\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n],T_g>n\right] +o(\mathbf P(T_g>n)). \end{align} By the Markov property at $\nu_{m(n)}$, \begin{align*} &\mathbf{E}\left[f\left(\nu_{m(n)},\frac{S_{\nu_{m(n)}}}{c_n},s_n\right); T_g>n,Z_{\nu_{m(n)}}\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n]\right]\\ &\hspace{1cm}=\sum_{k=1}^{m(n)}\int_{\overline{\delta}^2_n c_n}^{\overline{\delta}_n c_n}\mathbf{P}(Z_{k}\in dy,\nu_{m(n)}=k, T_g>k)\\ &\hspace{3cm}\times\mathbf{E}\left[f\left(k,\frac{y+g_k}{c_n};s_n\right);y+\min_{j\in[k,n]}(Z_j-Z_k)>0\right]. \end{align*} We now note that it suffices to show that, uniformly in $y\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n]$ and $k\leq m(n)$, \begin{align} \label{T1.8} \nonumber &\mathbf{E}\left[f\left(k,\frac{y+g_k}{c_n},s_n\right);y+\min_{j\in[k,n]}(Z_j-Z_k)>0\right]\\ &\hspace{3cm}=(\mathbf{E}f(M_{\alpha,\beta})+o(1))V(y)\mathbf P(\tau_0>n). \end{align} Indeed, this relation implies that \begin{align*} &\mathbf{E}\left[f\left(\nu_{m(n)},\frac{S_{\nu_{m(n)}}}{c_n},s_n\right); T_g>n,Z_{\nu_{m(n)}}\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n]\right]\\ &\hspace{0.2cm}=(\mathbf{E}f(M_{\alpha,\beta})+o(1))\mathbf P(\tau_0>n) \mathbf{E}[V(Z_{\nu_m(n)});T_g>\nu_{m(n)},Z_{\nu_{m(n)}}\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n]]. \end{align*} It follows from the assumption $\overline{\delta}^2_n c_n\ll c_{m(n)}$ and the definition of $\nu_{m(n)}$ that \begin{align*} &\mathbf{E}[V(Z_{\nu_m(n)});T_g>\nu_{m(n)},Z_{\nu_{m(n)}}<\overline{\delta}^2_n c_n]\\ &\hspace{1cm}=\mathbf{E}[V(Z_{\nu_m(n)});T_g>m(n),Z_{m(n)}<\overline{\delta}^2_n c_n]\\ &\hspace{2cm}\le V(\overline{\delta}^2_n c_n)\mathbf P(T_g>m(n)). \end{align*} Applying now Theorem~\ref{T1} and recalling that $\mathbf E Z^*_{m(n)}\sim \mathbf E Z^*_n$, we get \begin{align*} &\mathbf{E}[V(Z_{\nu_m(n)});T_g>\nu_{m(n)},Z_{\nu_{m(n)}}<\overline{\delta}^2_n c_n]\\ &\hspace{1cm}=O(V(\overline{\delta}^2_n c_n)\mathbf E Z^*_n\mathbf P(\tau_0>m(n))). \end{align*} Using now \eqref{V-tau} and the assumption $\overline{\delta}^2_n c_n\ll c_{m(n)}$, we coclude that \begin{align*} \mathbf{E}[V(Z_{\nu_m(n)});T_g>\nu_{m(n)},Z_{\nu_{m(n)}}<\overline{\delta}^2_n c_n]=o(\mathbf E Z^*_n). \end{align*} We know that $c_{m(n)}\ll \overline{\delta}_n c_n$. Then, by Lemma~\ref{lem:tail_exp}, \begin{align*} \mathbf{E}[V(Z_{\nu_m(n)});T_g>\nu_{m(n)},Z_{\nu_{m(n)}}>\overline{\delta}_n c_n]=o(\mathbf E Z^*_n). \end{align*} From the two relations we infer that \begin{align*} \mathbf{E}[V(Z_{\nu_m(n)});T_g>\nu_{m(n)},Z_{\nu_{m(n)}}\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n]] \sim \mathbf E Z^*_n \end{align*} and, consequently, \begin{align*} &\mathbf{E}\left[f\left(\nu_{m(n)},\frac{S_{\nu_{m(n)}}}{B_n},s_n\right); T_g>n,Z_{\nu_{m(n)}}\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n]\right]\\ &\hspace{2cm}\sim \mathbf{E}f(M_{\alpha,\beta})\mathbf E Z^*_n\mathbf P(\tau_0>n) \sim \mathbf{E}f(M_{\alpha,\beta})\mathbf P(T_g>n). \end{align*} Plugging this into \eqref{T1.7}, we have \begin{align*} \mathbf E[f(s_n);T_g>n]\sim \mathbf{E}f(M_{\alpha,\beta})\mathbf P(T_g>n). \end{align*} This implies immediately the desired weak convergence. Thus, it remains to show \eqref{T1.8}. We shall prove \eqref{T1.8} by giving bounds for the expectation on the left hand side in terms of boundary problems wit constant boundaries. More precisely, \begin{align*} &\mathbf{E}\left[f\left(k,\frac{y+g_k}{c_n},s_n\right);y+\min_{j\in[k,n]}(Z_j-Z_k)>0\right]\\ &\hspace{1cm}\le\mathbf E \left[f\left(k,\frac{y+g_k}{c_n},s_n\right);\tau_{y+2G_n}>n\right]\\ &\hspace{1cm}=\mathbf E \left[f\left(k,\frac{y+g_k}{c_n},s_n\right)|\tau_{y+2G_n}>n\right]\mathbf P(\tau_{y+G_n}>n). \end{align*} Note that $|f\left(k,\frac{S_k}{c_n},s_n\right)-f(s_n)|\to0$ uniformly over all trajectories $s_n$ with $S_k\le G_n+\overline{\delta}_nc_n$. This convergene is also uniform in $k\le m(n)$. Then, using Lemma~\ref{lem:meander} and \eqref{lem1.eq1}, we get \begin{align*} &\mathbf{E}\left[f\left(k,\frac{y+g_k}{c_n},s_n\right);y+\min_{j\in[k,n]}(Z_j-Z_k)>0\right]\\ &\hspace{1cm}\le V(y+2G_n)\mathbf P(\tau_0>n)\mathbf E f(M_{\alpha,\beta})(1+o(1)). \end{align*} Noting that $V(y+2G_n)\sim V(y)$ for $y\in[\overline{\delta}^2_n c_n,\overline{\delta}_n c_n]$, we obtain the upper bound \begin{align*} &\mathbf{E}\left[f\left(k,\frac{y+g_k}{c_n},s_n\right);y+\min_{j\in[k,n]}(Z_j-Z_k)>0\right]\\ &\hspace{1cm}\le V(y)\mathbf P(\tau_0>n)\mathbf E f(M_{\alpha,\beta})(1+o(1)). \end{align*} By the same argument, \begin{align*} &\mathbf{E}\left[f\left(k,\frac{y+g_k}{c_n},s_n\right);y+\min_{j\in[k,n]}(Z_j-Z_k)>0\right]\\ &\hspace{1cm}\ge\mathbf E \left[f\left(k,\frac{y+g_k}{c_n},s_n\right);\tau_{y-2G_n}>n\right]\\ &\hspace{1cm}\ge V(y)\mathbf P(\tau_0>n)\mathbf E f(M_{\alpha,\beta})(1+o(1)). \end{align*} These two estimates imply \eqref{T1.8}. Thus, the proof of the functional limit theorem is completed. \subsection{Proof of (\ref{U-infinity})} Since the sequence $\{g_n\}$ is decreasing, the sequence $V(S_n-g_n)\mathbb{I}\{T_g>n\}$ is a submartingale and, in particular, the sequence $\mathbf E[V(S_n-g_n);T_g>n]$ is increasing. Thus, it suffices to show that $\mathbf E[V(S_{2^j}-g_{2^j});T_g>{2^j}]$ converges to $\infty$. We first note that \begin{align*} &\mathbf E[V(S_{2^{j+1}}-g_{2^{j+1}});T_g>{2^{j+1}}]\\ &\ge\int_{g_{2^j}}^\infty \mathbf P(S_{2^j}\in dy;T_g>2^j) \mathbf E[V(y+S_{2^j}-g_{2^{j+1}});\tau_{y-g_{2^j}}>2^j]\\ &=\mathbf E[V(S_{2^j}-g_{2^j});T_g>2^j]\\ &+\int_{g_{2^j}}^\infty \mathbf P(S_{2^j}\in dy;T_g>2^j) \mathbf E[V(y+S_{2^j}-g_{2^{j+1}})-V(y+S_{2^j}-g_{2^{j}});\tau_{y-g_{2^j}}>2^j], \end{align*} where we have used the harmonicity of $V$ in the last step. Furthermore, since all terms in the integral are positive, we have \begin{align*} &\mathbf E[V(S_{2^{j+1}}-g_{2^{j+1}});T_g>{2^{j+1}}]-\mathbf E[V(S_{2^j}-g_{2^j});T_g>2^j]\\ &\hspace{1cm}\geq\int_{c_{2^j}}^{2c_{2^j}} \mathbf P(S_{2^j}\in dy;T_g>2^j)\\ &\hspace{3cm}\times\mathbf E[V(y+S_{2^j}-g_{2^{j+1}})-V(y+S_{2^j}-g_{2^{j}});\tau_{y-g_{2^j}}>2^j]. \end{align*} Since $V$ is a renewal function, there exists a positive constant $C$ such that $$ \liminf_{x\to\infty}\frac{x}{V(x)}(V(x+u)-V(x))\ge Cu $$ for all $u$ large enough. Therefore, \begin{align*} &\mathbf E[V(S_{2^{j+1}}-g_{2^{j+1}});T_g>{2^{j+1}}]-\mathbf E[V(S_{2^j}-g_{2^j});T_g>2^j]\\ &\hspace{1cm}\geq\int_{c_{2^j}}^{2c_{2^j}} \mathbf P(S_{2^j}\in dy;T_g>2^j)\\ &\hspace{3cm}\times C'(g_{2^j}-g_{2^{j+1}})\frac{V(c_{2^j})}{c_{2^j}} \mathbf P(S_{2^j}\in[c_{2^j},2c_{2^j}],\tau_{y-g_{2^j}}>2^j). \end{align*} Applying now the standard (non-conditional) limit theorem for $S_n$ and Theorem~\ref{T3}, we obtain \begin{align*} &\mathbf E[V(S_{2^{j+1}}-g_{2^{j+1}});T_g>{2^{j+1}}]-\mathbf E[V(S_{2^j}-g_{2^j});T_g>2^j]\\ &\hspace{1cm}\geq C''(g_{2^j}-g_{2^{j+1}})\frac{V(c_{2^j})}{c_{2^j}}\mathbf P(T_g>2^j). \end{align*} Combining Theorem~\ref{T1} and \eqref{V-tau}, we have $$ V(c_{2^j})\mathbf P(T_g>2^j)\sim A \mathbf E[V(S_{2^j}-g_{2^j});T_g>2^j]. $$ Consequently, \begin{align*} &\mathbf E[V(S_{2^{j+1}}-g_{2^{j+1}});T_g>{2^{j+1}}]\ge \mathbf E[V(S_{2^j}-g_{2^j});T_g>2^j]\left(1+C'''\frac{g_{2^j}-g_{2^{j+1}}}{c_{2^j}}\right). \end{align*} Iterating this estimate, we obtain \begin{align*} &\mathbf E[V(S_{2^{j+1}}-g_{2^{j+1}});T_g>{2^{j+1}}]\ge \mathbf E[V(S_{1}-g_{1});T_g>1]\prod_{k=0}^j\left(1+c'''\frac{g_{2^k}-g_{2^{k+1}}}{c_{2^k}}\right). \end{align*} It remains to note that the condition $\sum \frac{|g_n|}{nc_n}=\infty$ implies that the rigth hand side in the previous display goes to infinity as $j\to\infty$. \printbibliography \end{document}
\section{Introduction} Cometary magnetospheres is one of the most important topics in planetary science. Because the nucleus of a comet is usually very small in size ranging from a few hundred meters to tens of kilometers (e.g., the radius of the nucleus for comet 1P/Halley is about 10\,km) and the gravity is extremely weak (usually considered negligible when simulating the cometary neutral gas and plasma), the cometary coma is much larger in size compared to the nucleus itself. For example, Giotto observed plasma boundaries of comet 1P/Halley starting at roughly 1\,Mkm away from the nucleus \citep{Reme_1986}. The cometary magnetosphere resulting from the solar wind interaction with the coma has some distinct features from the magnetospheres associated with planets or planetary moons, such as the formation of a diamagnetic cavity. \cite{Gombosi_2015} provided an excellent review of the cometary magnetosphere. A typical cometary magnetosphere for an active comet near perihelion includes a bow shock which slows down the supersonic solar wind to subsonic speed \citep{Galeev_1985, Koenders_2013}, a diamagnetic cavity inside which the magnetic field drops to zero \citep{Neubauer_1986, Cravens_1986, Goetz_2016, Goetz_2016_2}, a recombination layer which separates the inner shock (which slows down the supersonic cometary ion outflow to subsonic) and the contact surface (where the solar wind protons cannot penetrate). One of the primary goals of the Rosetta Plasma Consortium (RPC) was to observe the evolution of the solar wind and comet interactions. However, due to the close proximity of the Rosetta spacecraft to the nucleus, RPC was not able to observe the bow shock. Also the recombination layer and contact surface have not been clearly identified to date. Based on RPC observations, \cite{Mandt_2016} reported plasma boundaries separating an inner region and an outer region and they concluded the observed plasma boundaries are an ion-neutral collisionopause boundary, which has not been predicted by previous numerical simulations \citep{Rubin_2015, Koenders_2015, Huang_2016}. In addition to this unpredicted boundary, the magnetic field observed by RPC is also unexpected: the diamagnetic `cavity' \citep{Goetz_2016, Goetz_2016_2} was observed much farther away than the predicted locations \citep{Rubin_2015, Koenders_2015, Huang_2016}. Lots of effort has been made in numerical simulations to understand the solar wind and comet interactions. There are two major approaches in simulating the cometary environment: the fluid approach \citep{Gombosi_1996, Hansen_2007, Rubin_2014, Rubin_2015, Huang_2016} and the hybrid approach \citep{Bagdonat_2002, Koenders_2015,Wedlund_2017}. In a fluid approach, the plasma is treated as fluids and governed by the magnetohydrodynamic (MHD) equations. The fluid approach is an accurate description of the macroscopic quantities of the plasma when the Knudsen number ($ \text{K}_\text{n} = \frac{\lambda}{l}$, where $\lambda$ is the mean free path and $l$ is the characteristic length scale of the flow) is much smaller than unity. On the other hand, the hybrid approach simulates ions as individual particles and electrons as a fluid. The hybrid approach can capture the kinetic features of the plasma and works well also for large Knudsen numbers. Compared to the fluid approach, the hybrid approach is very computationally expensive and is usually limited to a small simulation domain. Recently, a third approach to simulate the solar wind and comet interactions was developed by \cite{Deca_2017} with a fully kinetic code, which treats both ions and electrons as particles. They simulated comet CG at 3\,au and showed that their simulations agreed well with RPC observations at that heliocentric distance. However, their code does not include any chemical reactions and collisions between particles, which makes it not applicable to comets near perihelion, where chemical reactions are important. Also their model is limited to a small domain that does not include the bow shock. There have been extensive discussions about whether fluid codes can properly simulate cometary environments or those of other planets/moons without an intrinsic magnetic field, in which case the ion gyro radius is larger than the length scale of interaction regions. We argue that fluid codes are not limited exclusively by the requirement that the length scale must be much larger than the ion gyro radius, because collisions among different particles as well as chemical reactions may reduce the ion kinetic effects arising from the gyro motion. It is true that single fluid ideal MHD models cannot capture any ion gyration effects compared to a hybrid simulation \citep{Hansen_2007}. But when fluid simulations take into account different fluids with different velocities as well as collisions among them, multi-fluid MHD models are capable of capturing some important ion kinetic behaviors. For example, \cite{Rubin_2014} showed that their multi-fluid MHD model is capable of resolving the gyration of different ion fluids with reasonably good agreement with what has been predicted by a hybrid model \citep{Muller_2011}. The major discrepancy lies in the very inner coma region with striations/filaments in the cometary ion density \citep{Koenders_2015}. On the other hand, multi-fluid simulations for other planets/moons without an intrinsic magnetic field have demonstrated that the simulation results agree well with in-situ plasma observations \citep{Najib_2011, Bougher_2015, Ma_2011}. Hybrid models certainly provide a better description of the plasma environment near the comet nucleus. However, it is much more expensive or nearly impossible computationally to run hybrid models with a grid resolution comparable to those of fluid models on a large enough domain to properly set up the outer boundary conditions and to resolve the details of a diamagnetic cavity formed close to the nucleus. With a relatively coarse grid typically used in hybrid models, effects of numerical diffusion are expected to be much stronger than in fluid models and in such a case, the evolution of the magnetic field may not be properly described. As described below, the multi-fluid Hall MHD model presented in this paper represents another step in further resolving kinetic effects with fluid simulations. One of the imperfections of previous MHD models applied in cometary studies is that the Hall effect is usually not taken into account. The Hall effect describes the relative speed (current) between ions and electrons and appears in the generalized Ohm's law. This current may affect the magnetic field evolution in the system if the Hall effect is taken into account in the induction equation. The Hall effect is important in magnetic reconnection studies as Hall MHD is the minimal modification of resistive MHD that can reproduce the fast reconnection process \citep{Birn_2001}, partially due to the strong current near the reconnection null point. In the cometary magnetosphere, the diamagnetic cavity is a unique feature that other planets/moons do not have. As the magnetic field drops to zero in a short distance, there must be strong currents along the diamagnetic cavity boundary. How these currents affect the inner coma environment is still unknown. In this paper, we simulate the inner coma environment with Hall MHD equations and show that the Hall effect is important in the inner coma and the classical plasma boundaries obtained by previous models need to be revisited. The detailed model description can be found in the appendix. \section{The Hall MHD model} Our Hall MHD model is an extension of the multifluid model developed by \cite{Huang_2016}. In the following equations, mass density, velocity vector, pressure, the identity matrix and the adiabatic index are denoted by symbols $\rho$, $\mathbf{u}$, $p$, ${I}$ and $\gamma$, respectively. The cometary neutral gas, the ions (cometary and solar wind) and the electrons are denoted by subscripts $n$, $s$ and $e$, respectively. The symbol $Z$ denotes the ion charge state while the symbol $e$ is for the unit charge. There are four fluids in the model. One fluid describes the cometary neutral gas with the Euler equations: \begin{subequations} \begin{gather} \frac{\partial \rho_n}{\partial t} + \nabla \cdot (\rho_n \mathbf{u_n}) = \frac{\delta \rho_n}{\delta t} \\ \frac{\partial \rho_n \mathbf{u_n}}{\partial t} + \nabla \cdot (\rho_n \mathbf{u_n}\mathbf{u_n} + p_n {I} ) = \frac{\delta \rho_n \mathbf{u_n}}{\delta t} \\ \frac{\partial p_n}{\partial t} + \nabla \cdot ( p_n \mathbf{u_n}) + (\gamma_n - 1)p_n (\nabla\cdot\mathbf{u_n}) = \frac{\delta p_n}{\delta t} \end{gather} \label{eqn:hd} \end{subequations} and the other two fluids describe the cometary ions and the solar wind protons with the multifluid MHD equations, which are solved individually for both fluids: \begin{subequations} \begin{gather} \frac{\partial \rho_s}{\partial t} + \nabla \cdot (\rho_s \mathbf{u_s}) = \frac{\delta \rho_s}{\delta t} \\ \begin{split} \frac{\partial \rho_s \mathbf{u_s}}{\partial t} & + \nabla \cdot (\rho_s \mathbf{u_s}\mathbf{u_s} + p_s \text{I} ) \\& - Z_se\frac{\rho_s}{m_s}(\mathbf{E+\mathbf{u_s}\times\mathbf{B}})= \frac{\delta \rho_s \mathbf{u_s}}{\delta t} \end{split} \\ \frac{\partial p_s}{\partial t} + \nabla \cdot ( p_s \mathbf{u_s}) + (\gamma_s - 1)p_s (\nabla\cdot\mathbf{u_s}) = \frac{\delta p_s}{\delta t} \end{gather} \label{eqn:mhd} \end{subequations} For the electrons, we do not specify the continuity and momentum equations. Assuming charge neutrality in the plasma, the electron number density can be obtained as $n_e = \sum_{s=ions} Z_s n_s$. The electron velocity $\bf u_e$ is obtained from $\mathbf{u_e} = \mathbf{u_+} + \mathbf{u_H}$, where $\bf u_+$ is the charge averaged ion velocity ($\mathbf{u_+} = \frac{\sum_{s=ions} Z_s n_s \mathbf{u_s}}{n_e}$) and $\bf u_H$ is the Hall velocity ($ \mathbf{u_H} = - \frac{\mathbf{j}}{n_e e}$, where $\bf j$ is the current density $\mathbf{j =(1/\mu_0) \nabla \times B}$). The electron pressure in the system is described by Equation \ref{eqn:pe}: \begin{equation} \frac{\partial p_e}{\partial t} + \nabla \cdot ( p_e \mathbf{u_e}) + (\gamma_e - 1)p_e (\nabla\cdot\mathbf{u_e}) = \frac{\delta p_e}{\delta t} \label{eqn:pe} \end{equation} We use Equations\,(\ref{eqn:hd})\,-\,(\ref{eqn:pe}) to describe the behavior and interactions of different fluids (the cometary neutral gas, the cometary ions, the solar wind protons, and the electrons) in the system. Ionization (photo-ionization and electron impact ionization) of the cometary neutral gas, charge exchange between neutrals and ions, collisions (elastic and inelastic) between different fluids, and recombination are all taken into account in simulating the cometary environment and they appear as source terms in the right hand side of Equations\,(\ref{eqn:hd})\,-\,(\ref{eqn:pe}). We apply the same source terms as \cite{Huang_2016}. The stiffness of the source terms may limit the time step, so a point-implicit algorithm \citep{Toth_2012} is applied to evaluate these terms. The electric and magnetic fields are also needed to solve the multifluid equations. The electric field is derived from the electron momentum equation if the inertial terms are assumed to be zero (due to the small electron mass): \begin{equation} \mathbf{E} = - \mathbf{u_e} \times \mathbf{B} - \frac{1}{n_e e} \nabla p_e \label{eqn:efield} \end{equation} The magnetic field is obtained from the induction equation: \begin{equation} \frac{\partial \mathbf{B}}{\partial t} = - \nabla \times \mathbf{E} \label{eqn:hall} \end{equation} We solve Equations (\ref{eqn:hd}) to (\ref{eqn:hall}) on a 3D block adaptive grid with the BATS-R-US (Block-Adaptive Tree Solarwind Roe-type Upwind Scheme) code \citep{Powell_1999, Toth_2012}. The beauty of the adaptive grid is that we can resolve different length scales in the system, so that the simulation can resolve the nucleus while modeling the global scales. In the comet CG case, the radius of the nucleus is about 2\,km, the global diamagnetic cavity is reported to be about 100\,km, and the bow shock is expected to be at about 8,000\,km upstream of the nucleus \citep{Rubin_2015, Koenders_2015, Huang_2016}. In our simulation, the smallest cell is located near the nucleus with the size of about $0.12\,\text{km}$ and the largest cell is located near the outer boundary with the size of about 31,250 km, which requires 18 levels of refinements (each refinement level increases the resolution by a factor of two) in the domain. We use the Cometocentric Solar Equatorial\,(CSEQ) frame in the simulation. In this frame, +x points toward the Sun, the z axis contains the solar rotation axis, and the y axis is orthogonal to the x and z axes. The solar wind is considered to move along the -x direction with the interplanetary magnetic field points in the +y direction at the upstream boundary. The simulation box is within $\pm10^6\,\text{km}$ in the x direction and $\pm 0.5\times10^6\,\text{km}$ in both y and z directions. We specify boundary conditions the same way as \cite{Huang_2016} at the edge of the simulation box (outer boundary) as well as at the nucleus surface (inner boundary). In the present study, the cometary neutral gas is limited to water molecules with the specific heat ratio ($\gamma$) of $\frac{4}{3}$ and the corresponding cometary ions are $\text{H}_2\text{O}^+$ with the same $\gamma$. $\gamma = \frac{5}{3}$ is applied for the solar wind protons as well as electrons. An idealized spherical comet with the neutral gas outflow driven by the solar illumination (hereafter illuminated sphere) seems to be the minimum requirement not to lose important asymmetrical features in the inner coma \citep{Huang_2016}, so we apply this nucleus condition at the inner boundary, which is the same as Case 2 in \cite{Huang_2016}. We apply the same input parameters listed in Tables 2 and 3 in \cite{Huang_2016}. We first run the multifluid model in steady state mode without the Hall effect to reach a steady state. We then introduce the Hall effect at $t=0$ and run the model in time-dependent mode to investigate the evolution of the inner coma. \section{Simulation results} \begin{figure*}[ht!] \begin{tabular}{cc} \includegraphics[width=0.5\linewidth]{y=0_hall.pdf} & \includegraphics[width=0.5\linewidth]{z=0_hall.pdf} \\ \end{tabular} \caption{The Hall MHD simulation results. The left columns plot the y=0 plane while the right columns plot the z=0 plane. The upper panels are for the cometary ion density while the lower panels show the magnetic field magnitude.} \label{fig:hallyz} \end{figure*} Figure\,\ref{fig:hallyz} shows the multifluid Hall MHD simulation results in the inner coma region (within 400\,km of the nucleus) with an illuminated sphere at $t=600\,\text{s}$. While the simulation results preserve symmetries about the y axis in the z=0 plane, they show pronounced asymmetries in the y = 0 plane. As a comparison, we reproduce the multifluid simulation results without the Hall effect in the same region with an illuminated sphere for the same input parameters (Case 2 in \cite{Huang_2016}) in Figure\,\ref{fig:case2}. In \cite{Huang_2016}, the size of the diamagnetic cavity and the location of the contact surface agreed well with previous MHD simulations \citep{Rubin_2015} and hybrid simulations \citep{Koenders_2015}. However, when the Hall effect is introduced, the ion pile-up region (with light yellow color) in the upper panel is distorted in the y=0 plane and looks completely different from the upper panel in Figure\,\ref{fig:case2}, where the distribution is symmetric about the z axis. Some surface wave structures, which might be associated with the Kelvin-Helmoltz (hereafter K-H) instabilities reported in \cite{Rubin_2012}, can also be found in the upper panel in Figure\,\ref{fig:hallyz}. \begin{figure*} \begin{tabular}{cc} \includegraphics[width=0.5\linewidth]{y=0.pdf} & \includegraphics[width=0.5\linewidth]{z=0.pdf} \\ \end{tabular} \caption{A reproduction of the simulation results from \protect \cite{Huang_2016}. Multi-fluid MHD results without the Hall effect to be compared with Figure 1.} \label{fig:case2} \end{figure*} The magnetic field topology in the bottom panels in Figure\,\ref{fig:hallyz} is completely different from the bottom panels in Figure\,\ref{fig:case2}. When the model does not include the Hall effect, the diamagnetic cavity (bottom panels in Figure\,\ref{fig:case2}) is an isolated region and the magnetic field pile-up region is just upstream of the diamagnetic cavity. When the Hall effect is introduced, the magnetic field configuration becomes more complex and besides the `global' diamagnetic cavity, regions of very weak magnetic field (less than 10\,nT) can also be found in the lower right corner in the y=0 plane in the bottom left panel in Figure\,\ref{fig:hallyz}. We suggest that it is the $\mathbf{J} \times \mathbf{B}$ force discussed in the next paragraph that changes the magnetic field configuration in the inner coma region. The magnetic field pile-up region in the y=0 plane is shifted and is not located in the same region as in Figure\,\ref{fig:case2}. In the z=0 plane (the bottom right panel in both Figure\,\ref{fig:hallyz} and Figure\,\ref{fig:case2}), the diamagnetic cavity looks more or less the same between the two simulations. The biggest difference lays in the magnetic pile-up region. In Figure\,\ref{fig:hallyz}, only two small magnetic field pile-up regions are found outside the diamagnetic cavity while in Figure \ref{fig:case2}, the magnetic pile-up region is a single region. \begin{figure} \center \includegraphics[width=0.6\linewidth]{h2oprho_y=0_hall.pdf} \caption{The upper panel shows the cometary ion density with their streamlines on the y=0 plane. The bottom panels plots the z component of the $\mathbf{J} \times \mathbf{B}$ force density (in the unite of $\rm 1\times10^{-12}\,N/m^{3}$) on the y=0 plane.} \label{fig:h2oprho_y} \end{figure} It is quite surprising that the simulated magnetic field changes so dramatically when the Hall effect is taken into account in the induction equation. Besides, the Hall MHD simulation does not have a steady state solution despite the fixed upstream solar wind conditions. The online movie (`inner\_coma\_movie.mp4') shows the evolution of the cometary ion density (with velocity streamlines) and the magnetic field between $t = 421$\,s and $t = 600$\,s. In the movie, the cometary ions move in the negative z direction. To illustrate this, we plot a snapshot of the cometary ion density with velocity streamlines at $t = 600$\,s in the upper panel of Figure\,\ref{fig:h2oprho_y}. This motion of the cometary ions can be explained by the $\mathbf{J} \times \mathbf{B}$ force, which is plotted in bottom panel of Figure\,\ref{fig:h2oprho_y}. This figure shows that along the global diamagnetic cavity boundary, the $\mathbf{J} \times \mathbf{B}$ force has a negative z component, which acts to move the cometary ions in the negative z direction. Another important new observation from the Hall MHD simulation is the formation of the weak magnetic field regions in the lower right corner in Figure \ref{fig:hallyz}. These structures appear as quasi-periodic structures in the online movie (`inner\_coma\_movie.mp4'). We provide a best estimate of the periods ranging from 10\,s to 50\,s, which are a combination of different harmonic periods, based on the evolution of the magnetic pile-up regions in the online movie (`inner\_coma\_movie.mp4'). The periods depend on many factors, e.g., the plasma flow speed compared to the Alfv\'en speed, the strength of the currents as well as the direction and magnitude of the $\mathbf{J} \times \mathbf{B}$ force. It is impossible to calculate the exact periods in such a complex case. To investigate how these weak magnetic field regions form, we have examined the evolution of the magnetic field topology in 3D, which is animated in another two online movies (with different view angles, `reconnection\_movie\_view1.avi' and `reconnection\_moive\_view2.avi'). In the plasma, the magnetic field is approximately frozen into the electron fluid. Both the cometary ions in the coma and the electrons move in the negative z direction (with the velocities separated by the currents). As the magnetic field moves with the electrons, the magnetic field is then draped in the negative z direction. A recent hybrid simulation by \cite{Koenders_2016} also showed the draping signatures for comet CG at 2.0\,au. In the Hall MHD simulation, the draping of the magnetic field lines forms a configuration that favors magnetic reconnections. The online movies only animate 15\,s of the evolution (between $t = 425$\,s and 440\,s), but they clearly show how the magnetic field reconnect and forms magnetic flux ropes. The magnetic reconnection reduces the magnetic field magnitude and create the weak magnetic field regions. Figure\,\ref{fig:3d} plots the 3D magnetic field configuration. Magnetic reconnections are expected to occur where the magnetic field lines bend strongly, denoted by an `X' mark on the figure. As magnetic reconnections occur, outflow is expected at the magnetic null point with opposite directions. Figure \ref{fig:uy} confirms that the plasma moves oppositely on the two sides. The outflow speed is close to the Alfv\'en speed near the reconnection regions, which is in the order of 1\,km/s. \begin{figure} \center \includegraphics[width=0.95\linewidth]{3d_view_reconnection_point_t705.pdf} \caption{A 3D views of the magnetic field lines. The contour shows the magnetic field magnitude at the y=0 plane. Magnetic reconnection is expected to occur near the red cross mark.} \label{fig:3d} \end{figure} Why does the Hall effect matter in the inner coma of comet CG? We argue that it is because the scale of the diamagnetic cavity is comparable to the ion inertial length ($d_i = \frac{m_i}{q_i} \sqrt{\frac{1}{\rho_i \mu_0}}$, where $m_i$ is the ion mass, $q_i$ is the ion charge, $\rho_i$ is the ion mass density, $\mu_0$ is the magnetic permeability of vacuum) and the ion gyro radius ($r_i = \frac{v_{th,i} m_i}{q_i B}$, where $v_{th,i}$ is the ion thermal speed, $B$ is the magnetic field magnitutde). In the inner coma, the cometary ions dominate, so the ion inertial length and the gyro radius for the cometary ions are responsible for the physical processes. Figure \ref{fig:di_ri} plots the ion inertial length and the gyro radius for the cometary ions. The ion inertial length is slightly less than 10\,km in the ion pile up region, and it is in the order of 100\,km outside the global diamagnetic cavity and the ion pile-up region. The gyro radius is very large where the magnetic field is small. Except in the weak magnetic field regions, the gyro radius has similar distributions as the ion inertial length. As the size of the global diamagnetic cavity is about 100\,km, the ion inertial length and the ion gyro radius are not much smaller than the global diamagnetic cavity. \cite{Dorelli_2015} showed that Hall currents within the magnetopause and magnetotail current sheets have a significant impact on the global structure of Ganymede's magnetosphere, because the magnetopause standoff distance is not much larger (order of 10) than the ion inertial length. In our case, the ratio of the size of the diamagnetic cavity and the ion inertial length (or gyro radius) is in order of 10 or less. We put forward an argument that if the ion inertial length (or gyro radius) is not much smaller than the characteristic length of the magnetosphere (the diamagnetic cavity in our case, the magnetopause standoff distance in Ganymede's magnetosphere), Hall MHD simulations are necessary to capture the correct global structure of the magnetosphere. \begin{figure} \center \includegraphics[width=0.95\linewidth]{uy.pdf} \caption{The $U_y$ component for the cometary ion velocity at the surface close to the magnetic reconnection surface, which is defined by 3 points: $[480,0,0]$\,km, $[500,20,33.5]$\,km and $[460,0,-33.5]$\,km. The cometary ions move to the +y direction on the right side while they move to the -y direction on the left side, near the magnetic null point denoted by the red cross mark, as indicated by the two black arrows.} \label{fig:uy} \end{figure} \begin{figure} \center \includegraphics[width=0.6\linewidth]{di_ri.pdf} \caption{The ion inertial length and the ion gyro radius for the cometary ion within 400\,km of the nucleus on the y=0 plane.} \label{fig:di_ri} \end{figure} \section{Summary and Discussions} In this work, we performed a multi-fluid Hall MHD simulation to study the cometary plasma environment in the inner coma region of comet 67P/Churyumov-Gerasimenko. With the same model set up as \cite{Huang_2016}, the Hall MHD simulation shows a very different picture: the inner coma is no longer symmetric and low magnetic field regions can form outside the global diamagnetic cavity and the solution is time-dependent. The only difference between the Hall MHD simulation and the classical MHD simulations by \cite{Huang_2016} is that the Hall velocity term is considered in the magnetic induction equation, which means that the current can affect the evolution of the magnetic field. It is well known that the Hall effect is important in magnetic reconnections \citep{Birn_2001}, partially due to relative weak magnetic field and strong currents near the magnetic null point. Hall MHD simulations of the magnetospheres of planets and moons typically do not show significant differences compared to the classical MHD simulations except in the regions where magnetic reconnections occur like the dayside magnetopause or the nightside magnetotail. \cite{Dorelli_2015} reported that Hall effect is important in Ganymede's magnetosphere because the magnetopause standoff distance is in the order of 10 times larger than the ion inertial length. One would not expect the Hall MHD simulations dramatically to change the simulated inner coma environment for a comet because magnetic field reconnections have only been reported on the nightside \citep{Huang_2016}, but our simulations show that in fact the results change dramatically. The diamagnetic cavity is a unique feature in the cometary environment, which is not shared by other planets or moons in the solar system, and it has received lots of attention since the Giotto mission \citep{Neubauer_1986, Cravens_1986, Goetz_2016, Goetz_2016_2, Huang_2016MNRAS, Madanian_2017}. However, it has not been realized that currents along the diamagnetic cavity boundary may change the global structure of the inner coma. In the comet CG case, as the ion inertial length (or gyro radius) is not much smaller than the size of the global diamagnetic cavity, the Hall effect plays an important role in the evolution of the cometary plasma environment in the inner coma region, which is confirmed by our Hall MHD simulation. The situation might be different for a much more active comet. For example, the size of the diamagnetic cavity for comet 1P/Halley is about 4500\,km \citep{Neubauer_1986, Cravens_1986}, which will need to be compared with the ion inertial length (or gyro radius) to see whether the Hall effect is important there. The most important feature from the Hall MHD simulations is that there can be dayside magnetic reconnection, which can create weak magnetic field regions outside the global diamagnetic cavity. One of the most puzzling observations from the Rosetta Plasma Consortium (RPC) is that the magnetometer observed weak magnetic field at a distance much farther away than the predicted diamagnetic cavity. \cite{Goetz_2016, Goetz_2016_2} explained the weak magnetic field observations as K-H instabilities propagating along the cavity boundary and \cite{Huang_2016MNRAS} explained them as short-lived enhanced electron pressure along magnetic field lines. The Hall MHD simulation may provide a third option, magnetic field reconnection on the dayside. Further investigation and data comparison is necessary, but at this point, we refer this to future studies. \section*{Acknowledgements} This work was supported by contracts Jet Propulsion Laboratory no. 1266313 and no. 1266314 from the US Rosetta Project and NASA grant NNX14AG84G from the Planetary Atmospheres Program. The authors would like to thank the ROSINA team for supporting this research. The authors also thank the ESA Rosetta team for providing the opportunities to study this unique comet and their continuous support. The authors would like to acknowledge the following high-performance computing resources: Yellowstone (ark:/85065/d7wd3xhc), provided by NCAR's Computational and Information Systems Laboratory, sponsored by the National Science Foundation; Pleiades, provided by the NASA Supercomputer Division at Ames; and Extreme Science and Engineering Discovery Environment (XSEDE), supported by National Science Foundation grant number ACI-1053575 \bibliographystyle{mnras}
\section{Introduction} \label{sec:intro} Slitless spectroscopy uses a dispersive and transmissive element in a collimated beam to produce a dispersed image of the sky. Since slitless spectroscopy lacks a physical aperture to restrict the spatial extent of the incoming light, the observed two-dimensional spectra can be thought of as a convolution of the spectrum of the source, as processed by the dispersing element, and its spatial profile. Therefore the physical extent of the sources along the dispersion axis will limit the achievable spectral resolution, in analogy to the relationship between slit-width and resolution in traditional, aperture-based spectroscopy. However, the lack of a physical aperture is also the primary strength for slitless spectroscopy, since one can obtain a complete spectroscopic view of all the sources in the field, free from major observational planning or targeting considerations (such as slit masks, fiber placements, \emph{etc.}). The complete multiplexing of slitless spectroscopy leads to a significant data processing challenge: how to handle overlapping dispersions and source contamination \citep[\textit{e.g.}][]{axe}. With an optical model of the detector, it is often straight-forward to identify the pixels in a dispersed image that have contributions from multiple objects or spectral orders, however how to treat such contaminated pixels is far less obvious. One approach for extracting one-dimensional spectra estimates the contamination based on the available broadband colors \citep[\textit{e.g.}][]{pirz09,brammer12}. Alternatively one may opt to model the dispersed images with a parametric \citep[\textit{e.g.}][]{bc03} or non-parametric data \citep[\textit{e.g.}][]{pickles}, which will naturally account for the overlapping spectra. While this approach can directly transform observations into concrete, astrophysical answers, it is deeply dependent on the assumptions of the spectral models. On the other hand, \citet{barger12} present a non-parameteric method for combining data from multiple orients from slitless spectroscopy from the \emph{Galaxy Evolution Explorer} \citep[\emph{GALEX};][]{martin}. Their approach relies on certain assumptions (\textit{e.g.}\ unresolved sources, minimal contamination, and $\sim\!10-100$ orients), which normally only apply to typical observations. With these considerations, we propose an alternative approach for extracting one-dimensional spectra from a set of two-dimensional images with a singular question in mind: \emph{What is the optimal, non-parametric spectrum for each object that is simultaneously consistent with the available slitless spectroscopy?} We develop this as an ``optimal'' strategy, as it minimizes a goodness-of-fit parameter for an overconstrained problem. This work presents our new approach for extracting slitless spectroscopy, particularly tailored to addressing source contamination (or confusion). This paper is structured as follows:~in \Sect{sec:primer} we give a brief primer on slitless spectroscopy, in \Sect{sec:algorithm} we describe our new algorithm, in \Sect{sec:tests} we present several tests of our approach and place constraints on the quality of the calibrations, in \Sect{sec:hudf} we use the G141 data in the Hubble Ultra-Deep Field as a case study, in \Sect{sec:mods} we outline several key improvements we consider for later releases, in \Sect{sec:discuss} we discuss several applications where we foresee a unique role for \texttt{LINEAR}, and in \Sect{sec:summary} we give a brief summary. We include a glossary in the Appendix to clarify any confusion with notation. We quote all magnitudes in the AB system \citep{og}. \section{Grism Primer}\label{sec:primer} We wish the review several key aspects of the observation, reduction, and analysis of slitless spectroscopy, as the concepts and notation are important to frame our methodology. For clarity, all of the variables given in calligraphic font are two-dimensional images. To support slitless spectroscopic observations, many additional forms of data are required and/or concurrently collected. We define these components as: \begin{description} \item[dispersed imaging] the two-dimensional spectroscopic data. We may also refer to these as ``grism'' or slitless data/observations/imaging. \item[pre-imaging] standard imaging taken concurrently with the dispersed imaging. These data are often, but not exclusively \citep[\textit{e.g.}][]{pirzkal_isr}, taken in a broadband whose response closely matches the grism response to astrometrically register the dispersed images. As such, these data generally have much shorter exposure times than the primary grism data. Recently \citet{bohlin15} describe options for using the zeroth-order dispersion for the reference position, which obviates the need for the pre-imaging, but we do not consider any such options. \item[direct imaging] existing imaging, analogous to a ``finding chart.'' The nature of these data differ greatly between programs, but are often used for source identification (discussed more below). These images also often serve as the astrometric reference for the aforementioned pre-imaging. \end{description} The undispersed position of each source (\textit{i.e.}, the detector position the source element would have had in the absence of the dispersive element) is given as $(x_0,y_0)$. For much of this work, we decompose the source into direct image pixels, and trace the flux in each such pixel by transforming the positions of the four corners as a function of wavelength. For some instruments, such as HST/WFC3 with the infrared grisms, the spectral trace at any location in the detector is close to parallel to one pixel axis (often the $x$-axis), the curvature of the trace is very slight, and the wavelength can be represented as a low-order polynomial of the displacement along the trace. Under these conditions, a simple representation of the trace and dispersion solution can be used, as follows. This undispersed position is used to define a polynomial for the spectral trace ($\tilde{x},\tilde{y}$): \begin{equation}\label{eqn:trace} \tilde{y}(\tilde{x})=\sum_{i=0}^{n}\alpha_i(x_0,y_0)\,\tilde{x}^i, \end{equation} where the coefficients $\{\alpha\}$ depend on the source position (see \Eqn{eqn:alpha} below). The spectral trace is transformed to a detector position $(x,y)$ by adding appropriate offsets: \begin{eqnarray}\label{eqn:offset} x &=& x_0 + x_\mathrm{off}(x_0,y_0) + \tilde{x},\\ y &=& y_0 + y_\mathrm{off}(x_0,y_0) + \tilde{y}(\tilde{x}). \end{eqnarray} The coordinate offsets ($x_\mathrm{off},y_\mathrm{off}$) also depend on the source positions (given by \Eqns{eqn:x0}{eqn:y0}). The wavelength is given as a function of path length along the trace, generally assumed to be a polynomial \begin{equation}\label{eqn:disp} \lambda(s)=\sum_{i=0}^{n}\beta_i(x_0,y_0)\,s^i, \end{equation} and of course the path length has the usual form: \begin{equation}\label{eqn:path} s(\tilde{x})=\int\limits_0^{\tilde{x}}\!\sqrt{1+\left(\frac{\mathrm{d}\tilde{y}}{\mathrm{d}\tilde{x}'}\right)^2}\,\mathrm{d}\tilde{x}'. \end{equation} The coefficients $\{\beta\}$ are again given by \Eqn{eqn:beta}. In the special case of WFC3/IR, the spectral trace is linear in detector position, and so this integral can be computed analytically. Currently, \texttt{LINEAR}\ is capable of dealing with first- or second-order spectral traces, which excludes WFC3/UVIS \citep[see][]{kunt09,pirz17}. It is straight-forward to extend to higher-order spectral traces, however this will require solving a Volterra equation of the first kind. The parameterization of the wavelength as a function of the path-length represents a specific choice made in the calibration of the WFC3 grisms and our implementation here. As mentioned above, the field-dependence of the spectral trace, dispersion, and spatial offsets ($x_\mathrm{off},y_\mathrm{off}$) is described as two-dimensional polynomials that are similar in form to the simple-imaging polynomials \citep[SIP;][]{shupe} \begin{eqnarray} \label{eqn:alpha} \alpha_i(x_0,y_0)&=&\sum_{j=0}^{n}\sum_{k=0}^{n}\alpha_{i,j,k}\,{x_0}^j\,{y_0}^k;\,j+k\leq n\\ \label{eqn:beta} \beta_i(x_0,y_0)&=&\sum_{j=0}^{n'}\sum_{k=0}^{n'}\beta_{i,j,k}\,{x_0}^j\,{y_0}^k;\,j+k\leq n'\\ \label{eqn:x0} x_\mathrm{off}(x_0,y_0)&=&\sum_{j=0}^m\sum_{k=0}^{m}\xi_{j,k}\,{x_0}^j\,{y_0}^k;\,j+k\leq m\\ \label{eqn:y0} y_\mathrm{off}(x_0,y_0)&=&\sum_{j=0}^{m'}\sum_{k=0}^{m'}\eta_{j,k}\,{x_0}^j\,{y_0}^k;\,j+k\leq m' \end{eqnarray} The \texttt{aXe}-based reference files store the coefficients $\alpha_{i,j,k}$, $\beta_{i,j,k}$, $\xi_{j,k}$, and $\eta_{j,k}$ with a single index that combines $(j,k)\!\rightarrow\!j$ \citep[\textit{e.g.}][]{pirzkal_isr}. A more general representation of the trace and dispersion solution, suitable for traces that have significant curvature or become more closely aligned with the $y$-axis of the detector and/or the wavelength equation is more complex, may rely on a parametric representation of the trace and wavelength as: \begin{eqnarray}\label{eqn:genrep} \tilde{x}(t) &=& \alpha'(x_0,y_0,t)\\ \tilde{y}(t) &=& \beta'(x_0,y_0,t)\\ \lambda(t) &=& \gamma'(x_0,y_0,t) \end{eqnarray} where $\alpha'$, $\beta'$, and $\gamma'$ are suitable functions, and $t$ is an arbitrary parameter \citep[e.g.][]{pr17}. Determining the position $(\tilde{x},\tilde{y})$ corresponding to a specific source element position $(x_0,y_0)$ and wavelength $\lambda$ would involve inverting the equation for $\lambda(t)$ and using that value in the equations for $(\tilde{x}(t),\tilde{y}(t))$. If the form of the equation permits, then wavelength can in principle be directly used as the parameter. \texttt{LINEAR}\ can handle the general case of \Eqn{eqn:genrep}, but in the current code base the simple polynomial representation (\Eqn{eqn:trace} and \Eqn{eqn:disp}) is used. The detector pixels will have a unique sensitivity as a function of wavelength, which in standard direct imaging is calibrated by flat-field images. However for grism observations, the problem is significantly more complex as the wavelength of incident light depends on the position of the source on the detector. Moreover the blending of light from distinct regions leads to a convolution over wavelength, and so the flat-field correction must be taken to be position and wavelength dependent. Additionally, the average pixel response is given by a transmission curve, that transforms the calibrated counts to physical units (in the case of HST data from e$^-$~s$^{-1}$ to erg~s$^{-1}$~cm$^{-2}$~\AA$^{-1}$). We denote this average response as $S(\lambda)$ and show five detectable orders for the G102 grism on WFC3/IR in \Fig{fig:sens}. The pixel-to-pixel deviations from this average response are included in the form of a \emph{flat-field ``cube''}, which is typically given as a polynomial over wavelength whose coefficients encapsulate the spatial variations: \begin{equation}\label{eqn:flat} {\cal F}(x,y;\lambda)=\sum_{i=0}^{n}{\cal F}_i(x,y)\left(\frac{\lambda-\lambda_0}{\lambda_1-\lambda_0}\right)^i, \end{equation} where $n$ is the order of the flat-field cube, and $(\lambda_0,\lambda_1)$ are defined in the calibration process, but are roughly the wavelength coverage of the grism element. The coefficients $\{{\cal F}_i(x,y)\}$ are images determined by comparing monochromatic flat-field observations \citep{kunt}. We implement three options for the flat-field cube: unity flat (${\cal F}(x,y;\lambda)\!=\!1$), standard cube described by \Eqn{eqn:flat}, and a single direct-image flat-field \citep[\textit{e.g.}][]{brammer12}. These specifications for ${\cal F}_i(x,y)$ are suitable for the reconstruction of WFC3/IR grism data, but \texttt{LINEAR}\ can handle essentially arbitrary forms for the wavelength-dependent flat field, without significant impacts on the processing. There are geometric distortions in the detector due to choices in the optical design and imperfections in the manufacture, which causes the effective area of the pixels to vary across the detector. Indeed, for WFC3 much of the geometric distortion is by design, as a result of the desire to minimize the number of reflections while correcting the spherical aberration and maintaining a flat focal plane. The pixel-area maps ${\cal P}(x,y)$ give the area relative to a nominal pixel. For WFC3/IR, the pixel areas change by $\sim\!8\%$ across the detector \citep[\textit{e.g.}][]{kali10}. \section{Algorithm}\label{sec:algorithm} \subsection{\texttt{LINEAR}} \label{sec:code} Inherent to our working paradigm is that there exists direct imaging that satisfies a few requirements: \begin{enumerate} \item covers $\sim\!2\times$ the area of the instrument to account for sources that disperse onto the detector \citep[see Section~4 of][]{pirzkal_isr}, \item considerably deeper than any individual grism exposure to minimize double-counting photometric noise and ensure all sources are accounted for, and \item is at roughly the same wavelength as sampled by the dispersed data to minimize the effect of any wavelength-dependent morphological effects and changes in the point-spread function (PSF). \end{enumerate} We implement two options to define the extraction apertures for each source, which we define as the collection of pixels that have a common spectral shape. The first method is to use a classic segmentation map \citep[\textit{e.g.}][]{sex} with the same world-coordinate system (WCS) as the aforementioned direct imaging. This approach is easy to implement and familiar to many users, but leads to the discrete assignment of each pixel to a source (or the sky). Therefore, our second method allows for the layering of flux densities, associated with multiple sources that potentially overlap in the direct image. This is facilitated by supplying two multi-extension \texttt{FITS} files (MEF); the first expresses the source brightness and second defines the extraction pixels (as a binary image). Each extension of these files must contain an accurate WCS and represents the information for each source, therefore the two images have the same number of extensions. This layered approach additionally facilitates reconstructing spectra for overlapping regions (such as supernova/host galaxy, bulge/disk separation, or overlapping galaxies). Using the MEF data, we also permit the reconstruction parameters (such as spectral sampling) to be different for each source. Both implementations can handle disconnected or \emph{island} regions and provide the direct image pixel-by-pixel brightness, which is used in the reconstruction process. \input{algorithm} The brightness detected in a dispersed-image pixel is the sum over all sources and wavelengths: \begin{equation}\label{eqn:sum} {\cal G}_{x,y,i} = \sum_\lambda \sum_j^{N_{\rm obj}} W_{x,y,i,\lambda,j}\,f_{\lambda,j}, \end{equation} where ${\cal G}_{x,y,i}$ is the measured brightness in the $i^\mathrm{th}$-grism image at pixel $(x,y)$, $f_{\lambda,j}$ is spectrum for the $j^\mathrm{th}$-object, and $W$ is a collection of transformation factors describing the dispersed image signal for a unit spectrum. The value of $W$ includes the flux distribution of the source, and is explicitly summed over all direct-image pixels in the source. For typical sparse fields, many of the $W$-elements will be zero by construction, since only a few sources can contribute flux to a given pixel at a given wavelength. By grouping the measurement (``the knowns'') and spectral (``the unknowns'') indices respectively: \begin{eqnarray} (x,y,i) &\rightarrow& \vartheta\\ (\lambda,j) &\rightarrow& \varphi, \end{eqnarray} \Eqn{eqn:sum} becomes a simple matrix product: \begin{equation}\label{eqn:mat} {\cal G}_{\vartheta} = \sum_{\varphi} W_{\vartheta,\varphi}\,f_{\varphi}. \end{equation} \texttt{LINEAR}\ populates the elements of the $W$-matrix by iterating through the canon of dispersed images and objects in the extraction apertures. Since the direct image and segmentation map may have an arbitrary pixelation, it often necessary to subsample the wavelength to ensure that each dispersed image locations represents, with sufficient fidelity, the spectral energy distribution (SED) of each source. We implement the subsampling as an integer number of steps smaller than the native spectral resolution: $\delta\lambda\!\approx\!N^{-1}\,\mathrm{d}\lambda/\mathrm{d}s$, where $\mathrm{d}\lambda/\mathrm{d}s$ is the field-averaged dispersion for the detector (for WFC3/G102 it is $\mathrm{d}\lambda/\mathrm{d}s\!\approx\!25$~\AA~pix$^{-1}$) and $N$ is the subsampling factor. We explored various choices for the subsampling factor, but found that $N\!=\!5$ is a good compromise between computational constraints and spectral fidelity for a direct image with pixels $\sim\!16\times$ smaller than the native detector (for WFC3/IR the native pixel scale is $\sim\!0\farcs12$). However we caution that the best value of $N$ likely varies on the properties of the direct imaging in question. In this formalism, $W$ is a linear operator that transforms the spectra $f_\varphi$ into the observed pixel brightnesses ${\cal G}_\vartheta$. The bulk of the processing for \texttt{LINEAR}\ is computing the $W$-matrix elements; we summarize these calculations in Algorithm~(\ref{alg:matrix}). The matrix elements (weights in the linear equations) are given as a product of the instrumental effects described above: \begin{equation}\label{eqn:weight} W = a(\lambda)\,{\cal I}(x_0,y_0)\,{\cal F}(x,y;\lambda)\,{\cal P}(x,y)\,S(\lambda)\,\delta\lambda \end{equation} where $a(\lambda)$ is the relative pixel area from the reprojection at some wavelength, ${\cal I}(x_0,y_0)$ is the \emph{normalized} image brightness from the direct image, ${\cal F}(x,y;\lambda)$ is the flat field, ${\cal P}(x,y)$ is the correction from the pixel-area map, $S(\lambda)$ is the average sensitivity curve, and $\delta\lambda$ is the subsampled bandwidth. The optimal set of object spectra will minimize the goodness-of-fit metric derived from maximizing a Gaussian likelihood: \begin{equation}\label{eqn:chi2} \chi^2 = \sum_{\vartheta}\left(\frac{\sum_{\varphi}W_{\vartheta,\varphi}f_{\varphi}-{\cal G}_{\vartheta}}{{\cal U}_{\vartheta}}\right)^2 \end{equation} where ${\cal U}_{\vartheta}$ is the estimated uncertainty for datum $\vartheta$. These uncertainties can be factored into the $W$-matrix and the pixel-by-pixel flux measurements (${\cal G}_{\vartheta}$) as: \begin{eqnarray} \label{eqn:uncertainty} W_{\vartheta,\varphi}&\rightarrow&W_{\vartheta,\varphi}/{\cal U}_{\vartheta}\\ {\cal G}_{\vartheta}&\rightarrow&{\cal G}_{\vartheta}/{\cal U}_{\vartheta}. \end{eqnarray} \EQN{eqn:chi2} can be extended to a damped-least squares in a simplified-matrix notation of: \begin{equation}\label{eqn:lsq} \hat{f}=\underset{f}{\argmin} \left(||W\,f - {\cal G}||^2+\ell\,||W||_F^2\,||f||^2\right), \end{equation} where $\hat{f}$ is the optimized solution, $||W||_F$ is the Frobenius norm of $W$, and $\ell$ is a damping parameter that imposes smoothness in the final solution. We defer discussion of the damping parameter and its effects to \Sect{sec:damp} and \Sect{sec:hudf}. Unlike most presentations, we include the Frobenius norm in the second term so that the damping parameter is dimensionless. The size of the $W$-matrix will be the number of knowns by the number of unknowns. The number of knowns is the total number of pixels analyzed, which includes all the pixels that contain source flux (that may be as large as the number of images times the number of pixels per image, but is generally less). The number of unknowns is roughly the number of objects times the number of flux elements per object (to be clear, \texttt{LINEAR}\ allows the number of flux elements to be different for each object). For a deep dataset with WFC3/IR \citep[\textit{e.g.}][]{figs}, there may be $\sim\!100$~images with $\sim\!10^6$~pixels each (but only $\sim\!10\%$ of these pixels may have source flux) to extract $\sim\!1000$~objects for $\sim\!100$~spectral elements. Therefore the $W$-matrix will have dimensionality of $10^7\times10^5$, however the vast majority ($\gtrsim\!99.9$\%) of these elements are exactly zero, since any one source will affect only a small fraction of pixels on any one dispersed image at any wavelength. Therefore we employ several sparse-matrix techniques, specifically storing the $W$-matrix in the coordinate-list (COO) format and use the LSQR algorithm \citep{ps82}. The LSQR algorithm estimates the uncertainty on the parameters (\textit{i.e.}\ the reconstructed spectra in this case), however these values will be underestimated for $\ell\!\neq\!0$. Paradoxically, a very large damping parameter implies vanishingly small uncertainty, as the optimization depends only on the variance of the reconstructed spectra; so that \Eqn{eqn:lsq} becomes: \begin{equation}\label{eqn:largeell} \hat{f}=\underset{f}{\argmin} \left(||f||^2\right) \end{equation} when $\ell\!\rightarrow\!\infty$. Therefore, the optimal solution will be when all elements of $f$ are exactly zero. To account for this, we implement a Markov Chain Monte Carlo (MCMC) simulation to sample from the likelihood, which is given by $\ln(L)\!=\!-\chi^2/2$ (see \Eqn{eqn:chi2} for the definition of $\chi^2$). In many cases, this will be of exceedingly high dimensionality, therefore we compute the uncertainties for each source sequentially by holding the spectra of the remaining sources fixed to the values found by solving \Eqn{eqn:lsq} with LSQR. Our sequential uncertainty analysis is formally correct for the limiting case of no overlapping dispersions, but does not include any correlations induced by overlapping spectra. We have verified the uncertainty estimates coming from the MCMC sampler are consistent with the uncertainties reported by other means \citep[\textit{e.g.}][]{figs}. We further discuss additional details of the damping parameter in \Sect{sec:damp}. The majority of the code is written in \texttt{IDL}\footnote{\href{https://www.harrisgeospatial.com/docs/using_idl_home.html}{https://www.harrisgeospatial.com/docs/using\_idl\_home.html}} with the exception of two key steps: (1) the area computations are performed via the Sutherland-Hodgman algorithm with \texttt{C} code provided by J.~D.~Smith \citep[as developed for \texttt{CUBISM}:][]{polyclip}, and (2) we translated the scipy implementation of the LSQR algorithm into \texttt{C}. However, both components can default to \texttt{IDL}-only implementations if the \texttt{C} code is not successfully compiled. We have integrated the multithreading package \texttt{OpenMP} into the components that are written in \texttt{C}, but provide non-threaded versions for simplicity. \subsection{Bad Pixels and Additional Spectral Orders} It is important to note that we remove all pixels from $\{{\cal G}\}$ that are flagged in the bad-pixel masks (BPXs) or having flux coming from additional spectral orders\footnote{We expect users to be primarily focused on the $+1$~order and consider all others to be contaminating, however it is possible to modify this behavior.}. To identify pixels from additional orders, we follow a very similar procedure to that described in Algorithm~\ref{alg:matrix}, however to expedite the calculations we do not consider each pixel belonging to an object, but rather group the pixels into a convex hull. This would amount to a considerable loss in spectral fidelity if this prescription were used for building the $W$-matrix. \subsection{Additional Capabilities} The vast majority of the processing efforts for \texttt{LINEAR}\ deal with populating the $W$-matrix elements. However once $W$ is fully formed, there are many useful calculations that can be readily performed: \begin{itemize} \item predicting contamination estimates --- valuable for planning observations of a select number of high-value science targets; \item providing average wavelength for sources; and \item excising two-dimensional grism images for sources. \end{itemize} As these are not the primary goal of this work, we defer detailed discussion of their usability to the \texttt{LINEAR}\ reference manual provided with the codebase \citep{manual}. \subsection{Preprocessing} \texttt{LINEAR}\ simply represents a new paradigm for reconstructing one-dimensional spectra from a canon of dispersed images, and several pre-processing steps must be performed. \subsubsection{Background Subtraction} \label{sec:backsubtract} The sky background in a grism image is far more complex than standard direct imaging, and is typically estimated by fitting a \emph{master sky} image to the sky pixels in an image \citep[as discussed in][]{grapes}. This inherently assumes the sky flux is dominated by a single spectral component, whereas \citet{brammer14} demonstrate that for WFC3/IR there are at least two distinct spectra contributing to the sky background (\textit{e.g.}~zodical light and \ion{He}{1} emission). Therefore the fitting process becomes quite a bit more complex \citep[see the \S~6.~Appendix:~Iterative Inversion of][]{brammer_isr}. This becomes even more problematic should one of the spectral components vary with time, and the standard ramp-fitting in infrared detectors must be incorporated in sky background modeling \citep[\textit{e.g.}][]{pirzkal17}. Since it is impossible to predict which algorithm (single master sky, multiple sky components, time-variable components) a dataset might require, we instead assume the images have been background subtracted by some means. In \Sect{sec:backsim}, we show how residual levels of flux will adversely affect the quality of the extracted spectra. \subsubsection{Astrometric Registration} As described in \Sect{sec:primer}, HST grism observations typically include obtaining a shallow pre-image to accompany each dispersed image (or set of dispersed images with known dithers) to refine the astrometry of the dispersed data. There are numerous tools available for such processing \citep[such as][]{gonzaga,avila}, and so we do not attempt any astrometric corrections. The possible impact of registration errors is discussed in \Sect{sec:astro_error}. If the direct and dispersed images are not taken at the same time \citep[as may be the case for the WFIRST High-Latitude Survey: HLS;][]{wfirst}, then appropriate preprocessing must be carried out to ensure that the direct and dispersed images are correctly aligned. Some concepts and methods to this end have been discussed or developed by \citet{dixon} and \citet{bohlin15}. \section{Tests of \texttt{LINEAR}} \label{sec:tests} For the following tests of \texttt{LINEAR}, we consider observations from the \emph{Hubble Space Telescope} using the Wide-Field Camera 3 with the G102 grism element with pre-imaging through the F105W filter. For all of the tests described below, we use \texttt{LINEAR}\ to generate simulated grism images through the G102/F105W combination, which includes the best available estimates of the spectral trace, dispersion, field edges, average sensitivity, wavelength-dependent flat field, and the pixel-area map. By accounting for filter-wedge offsets \citep{sabbi}, it is possible to consider other grism/filter combinations \citep{pirzkal_isr}. In \Fig{fig:sens}, we show the field-averaged sensitivity of the G102 element to set the stage. \begin{figure} \includegraphics[width=0.47\textwidth]{sensitivities.pdf} \caption{The sensitivity curves for HST WFC3/G102 in units of e$^-$~s$^{-1}$ per erg~s$^{-1}$~cm$^{-2}$~\AA$^{-1}$. Each line represents a different spectral order, as described in the upper left: $+1^\mathrm{st}$ (solid black), $+2^\mathrm{nd}$ (dashed green), $0^\mathrm{th}$ (dotted red), $+3^\mathrm{rd}$ (dot-dashed purple), and $-1^\mathrm{st}$ (dot-dot-dot-dashed cyan).\label{fig:sens}} \end{figure} \subsection{Uncertainties and Error Propagation} Below we describe a series of Monte Carlo simulations designed to assess the impact of the uncertainties in the calibrations on the final spectroscopy. In each simulation, we consider a single Gaussian point source with a flat spectrum in $f_{\lambda}$. \subsubsection{Astrometric Registration} \label{sec:astro_error} Since we are extracting the spectra on a native pixel scale, the precise registration of the dispersed image to the existing images is crucial. We simulate a Gaussian object for four distinct orients $\{0^\circ,90^\circ,180^\circ,270^\circ\}$ with no photometric noise (as the goal here is to isolate the effects of astrometry, and photometric noise will be considered below). We add a Gaussian random offset to the \texttt{CRVAL} keywords to simulate an error in the astrometric registration, and reconstruct the one-dimensional spectrum with the \texttt{LINEAR}\ algorithm. We repeat this procedure many times and show the average (red dashed) and standard deviation (gray region) as a function of wavelength in \Fig{fig:astro}. The input spectrum is shown in black and the standard deviation of the Gaussian offset in native pixels is given in the lower left corner of each panel. \begin{figure} \includegraphics[width=0.47\textwidth]{astro.pdf} \caption{The relation between astrometric registration and spectrophotometric uncertainty. In the upper left corner of each panel, we give the uncertainty in the \texttt{CRVAL} keywords in units of native pixel scale ($\sim\!0\farcs12$). For this Monte Carlo simulation (described in \Sect{sec:astro_error}), we consider a single Gaussian point source with a flat spectrum in $f_{\lambda}$ (black line) observed at four orients. By simulating this configuration many times with Gaussian noise added to the astrometry, we synthesize the average spectrum (red dashed line) and standard deviation (gray region) as a function of wavelength. For typical HST/WFC3 observations, the astrometry is easily refined to $\sim\!0.1$~pix and therefore \texttt{LINEAR}\ is not expected to introduce any significant ($\lesssim\!0.1\%$) additional spectrophotometric noise. \label{fig:astro}} \end{figure} For most realistic situations, it is fairly straight-forward to astrometrically align images to the $\sim\!0.1$~pix in the case of WFC3/IR. Based on our Monte Carlo simulation, we estimate this astrometric uncertainty introduces an error of $\lesssim\!1$\%. We also find that for the wavelengths with high sensitivity ($0.8\!\lesssim\!\lambda\!\lesssim\!1.1~\mu$m), the typical photometric uncertainty scales like $\sigma_f\!\approx\!0.03\,\sigma_r$, where $\sigma_r$ is the offset in the astrometry in native pixels (\textit{i.e.}\ the values listed in the lower-left corner of each panel in \Fig{fig:astro}) and $\sigma_f$ is uncertainty on the spectrum for a source brightness of $Y\!=\!18$~mag. \subsubsection{Background Subtraction}\label{sec:backsim} \begin{figure} \includegraphics[width=0.47\textwidth]{back.pdf} \caption{The effect of residual background level on spectral uncertainty. In the upper left corner of each panel, we give the uncertainty for the background level in $e^-$~s$^{-1}$. We describe this simulation in \Sect{sec:backsim}. Here the colors, plot symbols, and axes are the same as in \Fig{fig:astro}. Based on a collection of WFC3/IR data, \citet{pirzkal17} estimate a typical residual level of $\sim\!0.01$~$e^-$~s$^{-1}$, therefore the typical induced spectral uncertainty is $\sim\!0.1\%$. \label{fig:back}} \end{figure} We now consider the Gaussian source through the same four orients, but impose a Gaussian random pedestal sky brightness. For each sky background uncertainty, we generate 100 realizations of the four orients. In \Fig{fig:back}, we show the averaged extracted spectrum, and the colors and plot symbols have the same meaning as in \Fig{fig:astro}. In a recent Instrument-Science Report (ISR), \citet{pirzkal17} demonstrate that one can remove the sky background levels to $\sim\!0.01$~e$^-$~s$^{-1}$ using a constant zodical background and time-varying helium emission model \citep{brammer14}. Following that prescription, we estimate the inaccuracies introduced from improper background subtraction to be $\sim\!0.1\%$. We find that the photometric uncertainty scales roughly as the background subtraction uncertainty: $\sigma_f\!\approx\!0.13\,\sigma_B$. It may be possible to further reduce the background subtraction accuracy to $\sim\!0.001$~e$^-$~s$^{-1}$ with a smoothed, column-averaged correction and/or global mean \citep[\textit{e.g.}][]{figs}. Since the typical background accuracy is already a sub-dominant term in the uncertainty budget, we do not carry out further corrections. In \Sect{sec:mods}, we discuss possible modifications to our algorithm that may provide such refinements in the background. \subsubsection{Photometry and Signal-to-Noise}\label{sec:photom} To assess the relationship between total exposure time (or number of images) and inferred signal-to-noise, we consider the same source with flat spectrum in $f_\lambda$ as described above. However here we explicitly include Gaussian random noise consistent with a $1200$~s exposure with G102 on WFC3/IR. We create $N$ images of this scenario and extract the spectrum, then repeat for 100~realizations of these images to estimate the variance for a fixed number of input images. We consider two cases for the orientation of the $N$ images: (1) perfectly coaligned, with no rotation; and (2) rotated by $N$ different angles, uniformly distributed in the range $[0,2\pi]$. We repeat this procedure for different values of the number of images $N$, ranging from 1 to 100. \Fig{fig:photom} shows the resulting spectrophotometric uncertainty, expressed as the root-mean square (RMS), averaged in bins of wavelength, as a function of $N$, scaled to the single-image value. We find that the RMS error scales approximately as $N^{-0.4}$ for both the case with no rotation (red points) and with uniformly distributed rotations (blue points). \begin{figure} \includegraphics[width=0.47\textwidth]{noise2.pdf} \caption{Spectrophotometric uncertainty. As described in \Sect{sec:photom}, we consider a series of $N$ independent exposures, each with noise consistent with a $1200$~s image in WFC3/G102. We then extract the source in various combinations of these images to show the decrease in spectrophotometric uncertainty with exposure time. The red and blue points show the uncertainty for undithered and roll-dithered images, respectively. The solid black line represents the standard scaling of $\propto\!N^{-1/2}$, and each set of points are normalized to unity at $N\!=\!1$. The simulated data scale more shallowly ($\propto\!N^{-0.4}$).}\label{fig:photom} \end{figure} \subsection{The Effect of Damping} \label{sec:damp} The damping coefficient $\ell$ in \Eqn{eqn:lsq} applies a penalty to solutions of $\{f\}$ that have high variance, which has the effect of damping high-frequency oscillations. In the case of \Eqn{eqn:lsq}, the oscillations are damped with respect to $f\!=\!0$ (for all elements of $f$), but this can be extended to an arbitrary damping target ($f_0$) as \begin{equation}\label{eqn:lsq_damp} \hat{f}'=\underset{f'}{\argmin}\left(||W\,f' - {\cal G'}||^2+\ell\,||W||_F^2\,||f'||^2\right), \end{equation} where $f'\!=\!f-f_0$, ${\cal G'}\!=\!{\cal G}+W\,f_0$, and $\hat{f}\!=\!\hat{f}'+f_0$. To visualize the effect of damping, we consider four SEDs that serve to highlight the range of effects typical in many grism surveys: a constant in $f_{\lambda}$, an L5V brown dwarf\footnote{From the SpeX Prism Library maintained by Adam Burgasser at \href{http://www.browndwarfs.org/spexprism}{http://www.browndwarfs.org/spexprism}.}, a step function with break at $\lambda_{\rm obs}\!=\!1~\mu$m, and an emission line source with line at $\lambda_{\rm obs}\!=\!1~\mu$m (the line has a Gaussian profile and an observer-frame equivalent width of $W_{\rm obs}\!\approx\!-50$~\AA). In all cases, we implement a Gaussian source profile normalized to $Y\!=\!18$~mag that is observed in 100~dithered images, each having realistic noise. We extract the spectrum for each SED with various damping parameters $\ell\!\in\!\{0,0.01,0.05,0.1,0.2,0.5,1,2,5,10,20,100\}$, damped to a constant $f_{\lambda}$ of $Y\!=\!18$~mag ($f_{\lambda}\!\approx\!6.1\times10^{-17}$~erg~s$^{-1}$~cm$^{-2}$~\AA$^{-1}$), and iterate this procedure 100 times to estimate the variance around the mean. In \Fig{fig:damp}, we show the extracted spectra, averaged over the 100 iterations, with each value of $\ell$ indicated by a different color; the black line represents the input spectrum. The red lines show the spectrum extracted with $\ell\!=\!0.01$, which clearly reproduce the input (black line) spectra the best. However, they also show the largest variance around the mean, and so we consider these the \emph{hot} extractions. On the other hand, the blue lines ($\ell\!=\!100$) are highly smoothed versions of the input (\textit{i.e.}\ the damping target $f_0$). In fact, these \emph{cold} extractions are so damped, they are often flat spectra close to the average brightness. \begin{figure} \includegraphics[width=0.47\textwidth]{damp2.pdf} \caption{Effect of the damping parameter on the extracted spectrum of a Gaussian source. The four panels are split into a top and bottom sub-panel that show the average and RMS spectrum, respectively, for different input spectra, represented by a black line (top left: step function, top right: constant with emission line, and bottom right: L5V brown dwarf). These sources were extracted with a range of damping parameters ($\ell$, see \Eqn{eqn:lsq}), as indicated with the color bar.}\label{fig:damp} \end{figure} This simulation raises a challenging question: \emph{How to select the ideal value for $\ell$?} After all, spectra reconstructed with little damping (small $\ell$) are close to the input spectrum (\textit{i.e.}\ the damping target) at the cost of increased noise from the inversion process. Moreover, LSQR may bias the extracted toward the damping target for $\ell\!\gg\!0$; see the blue spectra plotted in \Fig{fig:damp}, particularly the top left panel. This effect arises when the damping target is a poor match to the underlying spectrum, which is generally unknown in the reconstruction phase. \citet{hansen} reviews analysis of the {\it L-curve}, a plot of $\log||Wf-{\cal G}||^2$ and $\log||f||^2$ that is parameterized by $\ell$, that offers a compromise between fitting the observations and damping fluctuations. The point where the local curvature is maximum is considered the optimal damping parameter in reconstructing the incident spectra. \citet{cult} present an iterative algorithm for locating this critical point based on the golden-section search method. At this time, we do not implement this approach; instead we sweep through a range of the damping parameter to locate the critical point, as discussed in \Sect{sec:hudf}. Following the preceding discussion in \Sect{sec:code}, the LSQR algorithm formally provides a mechanism for computing the variance of the solution. Now for a non-zero damping target $f_0\!\neq\!0$, the optimal solution is no longer identically zero, but rather approaches $f_0$. The concern that LSQR significantly underestimates the true uncertainty is still present, and so the uncertainty derived from the MCMC sampling is preferred. \subsection{Multiple Sources and Overlapping Traces} \label{sec:multiple} \begin{figure} \includegraphics[width=0.47\textwidth]{confusion.pdf} \caption{Illustrative example of spectral confusion for two sources. Here we consider two Gaussian sources (shown in the insets as red and blue) whose relative position in the sky is fixed, but we view them under two different position angles (top and bottom figures). The $1^\mathrm{st}$ order traces of each source is shown in its corresponding color (the colors here are chosen to highlight the overlap and do not refer to the spectral shape of either source). In the bottom panel, the $1^\mathrm{st}$ order dispersions from the two sources considerably overlap, leading to a region of spectral confusion (as indicated with the green rectangle). However when these objects are observed at a different position angle, then their dispersions do not overlap, yielding two unconfused $1^\mathrm{st}$ order traces. This example provides the main motivation behind the development of this algorithm. }\label{fig:confusion} \end{figure} One of the key goals of \texttt{LINEAR}\ is to better address the issue of contamination when the trace of multiple sources overlap on the detector. To detail the success of \texttt{LINEAR}\ in this regime, we consider a Monte Carlo simulation similar to those described in previous sections. Here we simulate two sources with $Y\!=\!18$~mag that are separated $1\farcs5$ and have a step-like and L5V spectra as described above. In \Fig{fig:confusion}, we show an illustrative example of the two sources observed in two position angles (for simplicity we plot the sources here with constant SEDs: $f_{\lambda}\!=\!f_0$). Based on this intrinsic scene, we create five observational scenarios, each of which consists of four distinct grism images. We dither these four images according to the \texttt{WFC3-IR-DITHER-BOX-MIN} pattern \citep[Table C.3 of][]{handbook}. Each scenario has a different distribution of position angles (PAs; see \Tab{tab:orients}) designed to bracket the primary possibilities: \begin{description} \item[fully degenerate] the sources overlap in all spectroscopic images; such as the case in single orient, but possibly dithered, data \citep[\textit{e.g.}][]{atek10,brammer12}. It is worth noting that, this situation may also arise in the case of data taken in two orients that are offset by $180^\circ$; \item[partially degenerate] the sources overlap in some images, but are uncontaminated in others; such as the case with data taken at multiple orients, but possibly with dithers at a given orient \citep[\textit{e.g.}][]{grapes,figs}; and \item[non-degenerate] sources overlap in no spectroscopic images; such as the case of distinct sources, to be considered as a \emph{null hypothesis}. \end{description} For each simulated grism image, we include background noise consistent with a $1200$~s exposure with G102 on WFC3/IR, complete with the effects described in \Sect{sec:tests}. We simultaneously reconstruct the two spectra from all four images (within a given observational scenario), and iterate this process 100 times. In \Fig{fig:orients}, we show the extracted spectra for the five scenarios, each of which is averaged over the 100 iterations. The colors of the lines are described in \Tab{tab:orients}. \texttt{LINEAR}\ is quite adept at reconstructing the overlapping dispersions, provided at least some of orients are uncontaminated. In fact, the difference between the partially-degenerate scenarios (\#3, 4, 5) and non-degenerate scenario (\#2) are relatively minor. Furthermore, \texttt{LINEAR}\ cannot reconstruct the spectra of the sources in the fully-degenerate scenario (\#1), which is to be expected. In the fully-degenerate scenario, \texttt{LINEAR}\ tends to produce very similar spectra for the two sources, which have features that are indicative of both objects. For example, the step-like and strong molecular absorption of the intrinsic spectra are evident in the fully-degenerate case. This highlights the importance of having multiple orients, however more work is needed to estimate the appropriate number or distribution of orients for an arbitrary (or specified) scene. \input{orients} \begin{figure} \includegraphics[width=0.47\textwidth]{orients2.pdf} \caption{Spectral reconstruction of two overlapping dispersions. As described in \Sect{sec:multiple}, we consider five scenarios that vary the degree of degeneracy between the two sources, as modulated by the distribution of position angles (see \Tab{tab:orients}). In the top, middle, and bottom panels we show the average, residual, and RMS (respectively), which are computed from the 100 iterations (see \Sect{sec:multiple}). In the top panels, we indicate the input spectra used for computing the residuals, otherwise the line colors are given in \Tab{tab:orients}. For the maximally-degenerate scenario (\#1), \texttt{LINEAR}\ is clearly incapable of reconstructing the spectra for the sources with any confidence. In contrast, the partially-degenerate scenarios (\#3, 4, 5) do not perform demonstrably worse than the fully-non-degenerate scenario (\#2), which we consider to be the null hypothesis.}\label{fig:orients} \end{figure} \section{A Case Study: The Hubble Ultra-Deep Field}\label{sec:hudf} To demonstrate the power of \texttt{LINEAR}, we present the WFC3/IR grism spectroscopy of the Hubble Ultra-Deep Field \citep[HUDF;][]{beckwith}. There are two programs that observed the HUDF in the G141 grism; we briefly summarize the key properties of these data in \Tab{tab:hudf}. We process these data using standard algorithms implemented by \texttt{CALWF3}\footnote{\texttt{CALWF3} is a product of the Space Telescope Science Institute, which is operated by AURA for NASA.}, but apply additional time-variable background sky subtraction as described by \citet{figs}. However, the G141 data can have an additional time-variable spectral component coming from earth-glow \citep[e.g.][but also discussed above in \Sect{sec:backsubtract}]{brammer14}. We use the contemporaneously obtained pre-imaging in the F140W band to refine the astrometry of the grism images, and provide the direct image for the pixel weights (${\cal I}(x_0,y_0)$ in \Eqn{eqn:weight}). However, one of the visits for program~12177 required higher than normal background corrections, therefore, to avoid contaminating this case study, we exclude these four exposures ($\sim\!5320$~s) from our analysis. This results in 36 individual images, obtained over three orients, for a total integration time of $\sim\!43.31$~ks. However with the relative positions and field rotations, not every source has this total exposure time. In principle, this results in $\sim\!4\times10^7$ independent measurements, since the WFC3/IR detector is $1014\times1014$~pix$^2$. However the number in practice is $\sim\!1.92\times10^6$, since only a fraction of the useable pixels contain source flux. \input{g141} We extract one-dimensional spectra for sources with F140W$\!\leq\!26$~mag \citep[as defined by an isophotal magnitude described in][]{figs}, which resulted in $1,112$~individual sources. For each source, we extract between $1.0\!\leq\!\lambda\!\leq\!1.7~\mu$m with a sampling of $50$~\AA\ ($120$ elements per source), which results in $\sim\!1.1\times10^5$ unique spectral elements\footnote{Not all wavelengths for every source are sampled by the grism data, so the true number of parameters is not simply the sum of the number of spectral elements over all sources.} to be determined by \texttt{LINEAR}. The $W$-matrix has $\sim\!3.82\times10^8$ non-zero elements for a sparsity of $\sim\!0.017$\% and a Frobenius norm of $||W||_F\!=\!8.2\times10^4$ e$^-$~s$^{-1}$ per $10^{-17}$ erg s$^{-1}$ cm$^{-2}$ \AA$^{-1}$. For comparison, we also extract the sources through the same apertures using standard techniques \citep[e.g.][]{figs}, and then average combine with inverse-variance weights the three orients for each source. \begin{figure} \includegraphics[width=0.47\textwidth]{lcurve2.pdf} \caption{The L-curve for the G141 spectroscopy from the HUDF as described by \citet{hansen}. This analysis provides a mechanism for selecting the optimal damping parameter as a compromise between modeling the data and fluctuations in the resulting spectra, as indicated by the abscissa and the ordinate, respectively. The color of the line indicates the parametric value of the damping, as indicated by the color bar in the upper right corner. In the inset to the lower left, we show the curvature as a function of the damping that is used to select the optimal damping parameter ($\ell_{\rm opt}$), which we indicate with the bullseye. \label{fig:lcurve}} \end{figure} We show the L-curve (as \Sect{sec:damp}) for these G141 data in \Fig{fig:lcurve}, and the color of the line indicates the value of the damping parameter, as shown in the color bar. Although there are algorithms for efficiently locating the point of maximum curvature \citep[e.g.][]{cult}, we simply sweep through a range of damping parameters to compute the point of maximum curvature, as shown in the inset to \Fig{fig:lcurve}. From this we find an optimized damping parameter of $\ell_{\rm opt}\!=\!2.57\times10^{-3}$, which is the value we adopt for all subsequent analyses. In \Fig{fig:comparison}, we show several sources with strong emission lines, whose colors are described in the caption. \begin{figure} \includegraphics[width=0.47\textwidth]{examples.pdf} \caption{Illustrative examples of \texttt{LINEAR}\ from the G141 spectroscopy from the HUDF arranged by spectroscopic redshift. The blue and red lines represent the standard, orient-averaged and \texttt{LINEAR}\ spectra, respectively. Along the right column, we show the F140W image used to establish the pixel weights. We show the redshifted wavelengths of common optical emission lines as colored vertical dashed lines, but the most common species are [\ion{O}{2}] (black), H$\beta$ (green), [\ion{O}{3}] (blue), \ion{He}{1} (red), H$\alpha$ (cyan), and [\ion{S}{2}] (orange). In \Fig{fig:zoom}, we show zoomed versions of panels (b) and (d) for clearer illustrations.\label{fig:comparison}} \end{figure} Based on these data in the HUDF, we identify multiple ways in which \texttt{LINEAR}\ improves upon the orient-averaged extractions. First, the spectral resolution for the \texttt{LINEAR}\ spectra is $\sim\!20-30\%$ higher than the averaged spectra. This improvement is most pronounced in panels (c), (d), and (e) of \Fig{fig:comparison}, where the [\ion{O}{3}] and H$\beta$ complex is very clearly resolved (see right panel of \Fig{fig:zoom} for a better representation). This effect arises for two reasons. First, the achievable spectral resolution is limited by the spatial profile projected along the dispersion axis. But since there are several orients, which generally have different projected spatial extents, the individually extracted spectra will have different effective resolutions. Therefore the weighted averaging increases the overall signal-to-noise at the expense of degrading the high-resolution spectra from the high-resolution orients. Second, \texttt{LINEAR}\ projects and deforms pixels from the direct image to the set of grism images as a function of wavelength to compute the fractional pixel areas. Since each of the grism images have a unique dither position and orientation, they provide a more complete spectral sampling. This is in analogy to drizzling dithered images to improve the spatial resolution \citep[e.g.][]{fruchter,anton}. As a final note, the net improvement in the spectral resolution depends on the geometry of the scene, source(s), and observation(s), therefore we expect these improvements will vary from dataset to dataset. \begin{figure} \includegraphics[width=0.47\textwidth]{zooms.pdf} \caption{Zoomed plots of panels (b) and (d) from \Fig{fig:comparison}. The colors and symbols have the same meaning as in \Fig{fig:comparison}. Here the shape and structure of the \ion{He}{1} (left) and the H$\beta$/[\ion{O}{3}] complex (right) is seen in better detail, which reinforces the advantages discussed in \Sect{sec:hudf}. \label{fig:zoom}} \end{figure} A second advantage of \texttt{LINEAR}\ concerns the signal-to-noise, which improves by $\sim\!20-30\%$. For example, the object shown in \Fig{fig:comparison}(b) or left panel of \Fig{fig:zoom} is a known quasar based on the X-ray flux and spectroscopic redshift \citep[of $z\!=\!1.22$;][]{xu,xue}. So here the improvement to the spectral resolution is less profound, however the increased signal-to-noise makes the \ion{He}{1} emission at $\lambda_{\rm obs}\!=\!1.304~\mu$m easily detectable. \texttt{LINEAR}\ provides these gains since we model each grism image simultaneously, as opposed to stacking grism images of the same orient (but dithered). This improves the statistics by providing more independent measurements of the underlying signal. Finally, the first source in \Fig{fig:comparison}(a) shows both improvements in signal-to-noise and spectral resolution, but importantly this source is member of a very complex grouping of interacting galaxies. Consequently, it has significant contamination from the neighbors, however \texttt{LINEAR}\ is able to faithfully remove these extraneous signals. \section{Subjects for Future Study} \label{sec:mods} As demonstrated, \texttt{LINEAR}\ is already quite powerful, however we foresee several modifications in the near future. \begin{enumerate} \item The current implementation of \texttt{LINEAR}\ is highly geared toward WFC3/IR, however it would be straight-forward to include the other instruments on HST and the planned missions of JWST and WFIRST. At present, \texttt{LINEAR}\ is only capable of working with grism configurations in the \texttt{aXe}-based format. As described in \Sect{sec:primer}, modifications may be implemented to work with the generalized transformations (see \Eqn{eqn:genrep}) for instruments with row/column dispensers \citep[as with the instruments with \emph{The James Webb Space Telescope}, see ][]{pr17} or with multiple detectors, particularly if the trace from a single order extends on multiple detectors (such as with WFIRST). \item It is important to remove the astrophysical background light, and as \citet{brammer_isr} describe, this can be a non-trivial process. However, the flux coming from the background can be considered as an additional source with a distinct spectrum. Therefore it is formally possible to perform background subtraction \emph{within} the \texttt{LINEAR}\ methodology, at the expense of making the $W$-matrix considerably denser in some rows/columns. A first step is to implement a gray background spectrum for each grism exposure, which would add little complexity, but may improve the reconstruction of faint sources that have brightnesses comparable to the background errors. \item We have framed the problem of reconstructing grism spectroscopy as solving a system of sparse, linear equations, and therefore the optimal set of source spectra can be easily obtained by standard computational techniques. These obvious advantages in solving for the ideal non-parametric spectra are offset by the introduction of a damping parameter. However it may be possible to introduce a limited number of non-linear parameters, which would likely modulate global properties of the reconstruction (such as something that governs the sky background). This additional complexity may require subsuming the LSQR-based minimization in a single step of a non-linear optimizer (such as Levenberg-Marquardt), which solves for these additional parameters. \item It may be additionally possible to restrict the scope of the LSQR-based matrix solution by only considering sources that overlap in the dispersed images. This would be analogous to solving a \emph{friends-of-friends}-type problem, where each separate set of friends is solved in parallel. This approach may be implemented by matrix operations on $W$. \item Because WFC3/IR non-destructively samples the reads, any incident cosmic rays can be flagged by linear regression. The current WFC3/IR calibration software implicitly assumes that there are no time-dependent signals (such as the sky background varying with time), which can easily confound the cosmic ray flagging \citep[\textit{e.g.}][]{brammer_isr,bram16,pirzkal17}. Additionally, optical detectors (such as the Advanced Camera for Surveys) will not have the non-destructive sampling and, therefore may require additional processing steps in the reconstruction to remove the cosmic rays. \end{enumerate} \section{Discussion}\label{sec:discuss} The \texttt{LINEAR}\ algorithm leverages all of the spectral information at the reconstruction phase to produce the best one-dimensional spectrum consistent with the data. We foresee several situations where the \texttt{LINEAR}\ paradigm will be a major improvement over standard algorithms for analyzing slitless spectroscopy. \begin{description} \item[crowded fields] Standard extraction tools simply flag regions of a two-dimensional dispersed image that have contributions from multiple sources. In a future work, we present a use-case for spectroscopy of high-redshift sources lensed by foreground galaxy clusters (Ryan et al.~2018, in preparation). \texttt{LINEAR}\ may be equally adept at spectroscopy in dense stellar fields, however further tests may be necessary to establish the number of orients needed for complete spectroscopic coverage. \item[spatially resolved spectroscopy] We have framed the notion of a \emph{source} as a collection of pixels assumed to have a consistent spectral shape. Importantly, these collections may be associated with a single physical object, such as a large, resolved galaxy or nebulosity. Therefore it may be possible to partition a single astrophysical object into many sources, and \texttt{LINEAR}\ will be capable of extracting individual one-dimensional spectra separately for each partition. In this way, \texttt{LINEAR}\ may approximate slitless spectroscopy as an integrated-field unit (IFU). However, it will be important to keep certain statistical issues in mind, such as the relative numbers of knowns and unknowns (as discussed in \Sect{sec:code}). \item[strict sampling requirements] It may be that a survey has very strict requirements on any completeness and/or reliability of the extracted spectroscopy or the derived products (such as redshift). For example, the various cosmology experiments with WFIRST place stringent expectations on the spectroscopic redshift accuracy and completeness \citep[or sample size;][]{wfirst}. Furthermore strong positional biases in the redshift quality, whether they stem from the quality of existing photometry to make a crude estimate of photometric redshift \citep[\textit{e.g.}][]{brammer12} or confusion/contamination from crowded regions, is important to characterize and resolve. Therefore an entirely self-contained framework that does not rely on existing photometry like \texttt{LINEAR}\ will be an important analysis technique. \end{description} \section{Summary}\label{sec:summary} We have presented a new algorithm for extracting slitless spectroscopy, and demonstrated the success with archival HST WFC3/IR data. This algorithm was devised to explicitly correct for overlapping dispersions and circumvent the need for contamination corrections. In forthcoming works, we will show additional use cases, particularly regarding the mitigation of contaminating sources. \acknowledgments We would like to thank W.~Landsman, C.~Markwardt, and J.~D.~Smith for their kind permission to use and redistribute their programs. We are very grateful to J.~MacKenty and E.~Sabbi for advice and support in this endavour. We also appreciate many vibrant discussions with N.~Grogin, V.~Dixon, G.~Brammer, M.~Sosey, J.~Colbert, A.~Koekemoer, S.~Malhotra, J.~Rhoads, K.~Gilbert, L.~Smith, R.~van der Marel, and L.~Armus. We thank G.~Schwarz for his assistance in preparing some components of this \LaTeX\ document. This research has benefitted from the SpeX Prism Library, maintained by Adam Burgasser at \href{http://www.browndwarfs.org/spexprism}{http://www.browndwarfs.org/spexprism}. We thank the anonymous Referee for the excellent suggestions and constructive feedback. Part of this work carried out at Space Telescope Science Institute (STScI) was performed in the context of Science Operations Center contracts for the HST, and WFIRST missions funded by NASA Goddard Space Flight Center. Based on observations made with the NASA/ESA Hubble Space Telescope, obtained from the data archive at the Space Telescope Science Institute. STScI is operated by the Association of Universities for Research in Astronomy, Inc. under NASA contract NAS 5-26555. \vspace{5mm} \facilities{HST(WFC3)} \software{IDL, C}
\section{INTRODUCTION} \label{Intro} A common form of scientific experimentation is the comparison of two groups. Suppose we collected $2n$ samples $\{X_i^A\}_{i=1}^n$, $\{X_i^B\}_{i=1}^n$ under two conditions $A$ and $B$. The conditions may be sick v.s. healthy, pre- v.s. post- treatment, etc. In the traditional homogeneous setting, samples within each group are assumed to be independently and identically distributed (i.i.d.), i.e. \begin{align*} X_i^A \overset{\text{i.i.d.}}{\sim} \mathbb{P}_A,~~X_i^B \overset{\text{i.i.d.}}{\sim} \mathbb{P}_B,~~\forall~i=1,\cdots,n, \end{align*} where the distributions $\mathbb{P}_A$ and $\mathbb{P}_B$ typically come from some common distribution families like Gaussian or Poisson. The goal is to infer whether there is a difference between the mean of the two groups, i.e. if $\mathbb{E}[ X_i^A ]\neq\mathbb{E}[ X_i^B]$. One of the most commonly used test in this case is the two-sample t-test, which assumes the distributions $\mathbb{P}_A$ and $\mathbb{P}_B$ are Gaussian and is based on the t-statistic \cite{cressie1986use}. However, in many real-world applications, the data are \textit{paired} and \textit{heterogeneous}. The paired structure means that for each $i$, the samples $X_i^A$, $X_i^B$ are similar due to some shared properties. The heterogeneity means that the data within the same group, $\{X_i^A\}$ or $\{X_i^B\}$, may be non-identically distributed. As a result, the paired differences $\{X_i^B-X_i^A\}$ may also be non-identically distributed. Such paired heterogeneous data may occur in many scenarios. For example, in pre- v.s. post-treatment studies \cite{qian2013identification}, samples were taken before and after the treatment from the same individuals. Samples from the same person are similar and thus can be paired, while samples from different individuals may be very different due to individual-level heterogeneity. In another study, samples were obtained from the same person over a long period time to study viral infection disease (VID) \cite{chen2012personal}. Samples under different conditions (sick/healthy) can be paired if they are close to each other in time. As the person may change a lot over time, within-pair samples are more similar than within-group samples that are far from one another in time\footnote{One may argue that a time-series analysis is more appropriate \cite{aijo2014methods}. However, when we are not interested in the time-series pattern, the differential expression analysis by two-group comparison is still a valid method and has been used in various studies. Second, many RNA-Seq datasets including VID are noisy and have very few samples. In those cases, the two-group comparison can produce more stable results compared to the time-series analysis. }. See the following example. \begin{figure} \centering \includegraphics[width=0.45\textwidth]{./HistAbsDif.pdf} \caption{Visualization of within-pair difference and within-group different for VID.\label{fig:EviDif}} \end{figure} \begin{example} (Heterogeneity in VID data) We present a visualization on VID to illustrate the presence of the heterogeneity in data. In this dataset, a sample $\mathbf{X}_i\in\mathbb{R}^{23,231}$ is a measurement of the gene expression level of $23,231$ genes, and samples are taken from one person over $1124$ days under two conditions, healthy and sick (see Fig. \ref{fig:VirInf}). We match samples close to each other in time, one from each group (healthy/infected), as pairs. We plot the histogram of the pairwise difference of within-pair samples and of within-group samples (see the details in Supp. Sec. \ref{sec:vis}). As can be seen in Figure~\ref{fig:EviDif}, the within-pair difference is systematically smaller than the within-group difference, indicating that the within-pair samples are more similar than within-group samples. \end{example} A popular treatment to the paired heterogeneous data is to allow each data point to have a different distribution but assume that the paired differences $X_i^B - X_i^A$ are i.i.d. If the paired differences are Gaussian, then the paired t-test is most powerful \cite{van2000asymptotic}. The Gaussian assumption is quite reasonable and used in many applications, e.g. the RNA-Seq data \cite{law2014voom}. However, given the heterogeneity across data pairs, it is hard to justify that the paired differences are actually identically distributed. For example, in the pre- and post- treatment studies, different individuals may have different responses to the treatment, and hence the paired differences may not be i.i.d. In this work we keep the Gaussian assumption but allow the paired differences to be non-identically distributed. To characterize the \textit{systematic} difference between the two group means, we assume the probability of increase/decrease from one group to the other is the same across all pairs. Specifically, we assume: \begin{itemize} \item Independently Gaussian (possibly non-identical): \begin{align*} X_i^A \sim \mathcal{N}(\nu_i^A, (\sigma^A_i)^2),~X_i^B \sim \mathcal{N}(\nu_i^B, (\sigma^B_i)^2),~\forall i. \end{align*} \item The ``tendency of shift'' is the same across all data pairs: $\mathbb{P}(X_i^B \geq X_i^A) = \theta, \forall i$. \end{itemize} The tendency assumption is \textit{weaker} than the previous i.i.d. assumption and allows the paired differences to be non-identically distributed. In the Gaussian case, it implies a natural scaling for the paired differences $X_i^B-X_i^A$; their means being proportional to their standard deviations. Even if the tendency assumption violated, the proposed test in this manuscript will still maintain a good power and be minimax optimal under certain conditions. See Remark \ref{rmk:vio_cond} for details. Then the problem of interest is to test if $\theta=0.5$. We seek robust tests that consistently produce high power under different levels of heterogeneity. A natural approach is to consider the minimax setting, where we fix the level of shift $\theta$ and maximize the worst-case power over all values of nuisance parameters. \textbf{Contributions.} The main contribution of the paper is to identify the optimal test for our minimax setting, which turns out to be the sign test \cite{lehmann2006testing}. The sign test uses the number of times of the paired differences being positive as the summary statistics, i.e. $W = \sum_i \mathbb{\mathbb{I}}_{\{X_i^B-X_i^A>0\}}$. Our result shows that the sign test is maximin in the one-sided case where we want to test $\theta=0.5$ against $\theta > 0.5$. In the two-sided case where the alternative hypothesis becomes $\theta\neq 0.5$, we show that the worst-case power of any test can be upper bounded by that of the sign test plus a negligible additive term, implying the sign test is near optimal. In addition, we verify our theoretical analysis using both synthetic data and a real-world RNA-Seq dataset. Let us explain our contributions within the context of prior art. Let the paired difference be $Y_i=X_i^B-X_i^A$. Prior to this work, it is known that if we restrict our attention to $Y_i$'s only, which is natural given the paired structure, then the sign test is maximin over the class of all distributions where the differences $Y_i$'s are independent and the ``tendency of shift'' $\mathbb{P}(Y_i)$ is the same across all pairs \cite{lehmann2006testing}. In this case, the worst-case distribution is any distribution pair $\mathbb{P}_{H_0}$, $\mathbb{P}_{H_1}$ satisfying $\forall~i,y_+\geq 0,y_- < 0$, \begin{align}\label{eq:worst_dist} \frac{\mathbb{P}_{H_1}(Y_i=y_+ \vert Y_i \geq 0)}{\mathbb{P}_{H_0}(Y_i=y_+ \vert Y_i \geq 0)}= \frac{\mathbb{P}_{H_1}(Y_i=y_- \vert Y_i < 0)}{\mathbb{P}_{H_0}(Y_i=y_- \vert Y_i < 0)}=1. \end{align} The result is a direct consequence of plugging the above worst-case distribution in Theorem 8.1.1 in \citep{lehmann2006testing}. The above argument considers a class of distributions so general that it may yield an overly pessimistic result. Indeed, the worst-case distribution $\mathbb{P}_{H_1}$ is very artificial in that it is continuous everywhere else but at $y=0$. Hence, it is natural to restrict ourselves to a smaller and more natural class. According to empirical studies, the RNA-Seq data can be modeled as Gaussian random variables after variance-stabilization transformation \cite{law2014voom}. In this work, therefore, we restrict ourselves to the family of normal distributions. As a result, the paired differences $Y_i$'s now have normal distributions. Ideally, this distribution information should be properly utilized. The question is that whether it leads to a test more powerful than distribution-free tests. Our result states that even this extra information does not help us to go beyond the sign test, indicating the importance of the sign information for robust testing. We also note that {\it our result is not a straight forward extension of existing results. In fact, it is not even clear that whether the sign test remains optimal after restricting to the Gaussian class because the Gaussian assumption excludes the worst-case distribution \eqref{eq:worst_dist} in the general class}. In terms of the novelty of the proof, the proof techniques here are completely different from the older proof. Theorem 8.1.1 \cite{lehmann2006testing} cannot be applied here because it is extremely difficult to find the worst-case distribution in the Gaussian case (See the discussion after Theorem \ref{thm: opt_signtest}). {\it In fact, our conjecture is that the worst-case distribution does not even exist.} We used a different strategy in our proof: we first show that the sign test is maximin among the family of “simple tests”. Then we show that “simple tests” can approximate the Borel measurable tests arbitrarily well. This is inspired by the widely used techniques in measure theory. However, we made two changes here: first, the notion of “simple tests” is tailored to fit the location-scale invariance property, different from simple functions in measure theory; second, the approximation is in terms of the testing performance (size and power), rather than some function norms. From a theoretical point of view, our result fills in a missing piece in the minimax analysis (of the adaptivity of sign test to the Gaussian family) in the classical statistical literature. {\bf Related works.} This work has a very classical flavor. Some related topics are testing within-group heterogeneity \cite{davison1992treatment}, robust tests for paired data \cite{grambsch1994simple}, and rank-based tests \cite{lehmann2006nonparametrics}. In the literature, paired t-test and the Wilcoxon signed-rank test are compared most often to the sign test \cite{van2000asymptotic}. The paired t-test assumes the paired differences $X_i^B - X_i^A$ are i.i.d. Gaussian and uses the t-statistic \eqref{eq:stats_pairt}. Let $S_i$ be the sign of $X_i^B - X_i^A$ and $R_i$ be the rank of $\vert X_i^B - X_i^A \vert$ among all pairs. The Wilcoxon test uses the sign-rank statistic \eqref{eq:stats_wil}. \begin{align} \label{eq:stats_pairt} &\text{Paired t-test}: T = \sqrt{n} \frac{\text{mean}(X_i^B - X_i^A)}{\text{std}(X_i^B - X_i^A)}, \\ &\text{Wilcoxon test}: U=\sum _{{i=1}}^{n}S_i R_i. \label{eq:stats_wil} \end{align} Most of the existing results for the above tests are based on the i.i.d. (homogeneous) scenario. For example, when the differences $X_i^B - X_i^A$ are i.i.d. Gaussian, the paired t-test is known to be most powerful and the relative efficiency of the sign test v.s. the paired t-test is $2/\pi$ (Table 14.1,\cite{van2000asymptotic}), and $3/\pi$ for Wilcoxon test (an extension of the former). Results are rare on the heterogeneous case, especially under the minimax setting. The motivating application for the present work is RNA-Seq experiments. In RNA-Seq experiments, the gene expression level of people under different conditions are measured and the task is to identify genes differentially expressed under the two conditions. In related works, within-group heterogeneity is usually modeled by assuming some prior distribution on the expression level, e.g. gamma distribution \cite{chung2013differential, hardcastle2013empirical}. The paired structure is modeled by the design matrix in the generalized linear model \cite{law2014voom, love2014moderated}, or by assigning same expression level parameters to samples in the same pair \cite{chung2013differential, hardcastle2013empirical}. All above methods assume some complex models for the data, e.g. Bayesian hierarchical model in \cite{chung2013differential} or some mean-variance function shared across genes in \cite{robinson2010edger, love2014moderated}. This leads to the lack of thorough theoretical understanding and, consequently, difficulty in establishing theoretical guarantees. \textit{``Those methods treat the estimated parameters as if they were known parameters, without allowing for the uncertainty of estimation, and this leads to statistical tests that are overly liberal in some situations'' \cite{soneson2013comparison}}. In fact, no theoretical result is yet available for the RNA-Seq data analysis \cite{law2014voom}. On the contrary, the sign test is theoretically justified in this manuscript. As shown in the experiments, it can be easily applied to the RNA-Seq data after simple normalization. Moreover, despite its simplicity, it yields reasonable results compared to other much more complex methods. The rest of the paper is organized as follows. After the problem formulation in Sec. \ref{sec:PblmFor}, we prove the optimality of the sign test in Sec. \ref{sec:OptSign}, followed by a theoretical comparison of the sign test with the paired t-test in SubSec. \ref{sec:comp}. Finally, we present numerical experiments on both synthetic data and real-world data in Sec. \ref{sec:Exp}. We postpone the proofs to the supplementary materials. \section{PROBLEM FORMULATION} \label{sec:PblmFor} Consider $n$ paired data points $\{X_i^A,X_i^B \}_{i=1}^n$, where $(X_i^A,X_i^B)$ denotes the $i$-th sample pair in groups $A$ and $B$. Our goal is to detect whether there is a systematic difference between samples in two groups. We assume that 1. the samples are independently and normally distributed; 2. the ``tendency of shift'' is the same across all sample pairs. Let $[n]$ denote the set $\{1,2,\cdots,n\}$. Then mathematically the above assumptions can be written as \begin{align*} & X_{i}^{A}\sim {\cal N}(\nu_{i}^{A},(\sigma_{i}^{A})^{2}), ~~ X_{i}^{B}\sim{\cal {\cal N}}(\nu_{i}^{B},(\sigma_{i}^{B})^{2}),~~\forall i \in [n], \\ & \mathbb{P}(X_{i}^{B}\geq X_{i}^{A})= \mathbb{P}(X_{j}^{B}\geq X_{j}^{A}) \triangleq \theta, \;\forall i,j \in [n], \end{align*} The range of parameters are \begin{align*} \{\nu_{i}^{A}, \nu_{i}^{B} \in \mathbb{R},~\sigma_{i}^{A}, \sigma_{i}^{B} \in \mathbb{R}_{\geq 0},~\textrm{s.t.}~\mathbb{P}(X_{i}^{B}\geq X_{i}^{A})=\theta\}, \end{align*} where $\mathbb{R}_{\geq 0}$ denotes the set of non-negative real numbers. Clearly, $\theta = 0.5$ means that there is no systematic shift from group $A$ to group $B$, and $\theta \neq 0.5$ indicates that such systematic difference exists. Hence, our null hypothesis is $\theta = 0.5$. For the alternative hypothesis, if we have some prior knowledge on the shifting direction, we can test a one-sided alternative $\theta>0.5$. Otherwise, a two-sided alternative, $\theta \neq 0.5$, is appropriate. Let us represent our statistical model in a more tractable way. Let $\Phi(\cdot)$ be the cumulative density function of the standard normal distribution. Since $\forall i$, $\mathbb{P}(X_{i}^{B} \geq X_{i}^{A})=\Phi(-\frac{\nu_{i}^{B}-\nu_{i}^{A}}{\sqrt{(\sigma_{i}^{B})^{2}+(\sigma_{i}^{A})^{2}}})=\theta$, we obtain $\forall i,j$, $ \frac{\nu_{i}^{B}-\nu_{i}^{A}}{\sqrt{(\sigma_{i}^{B})^{2}+(\sigma_{i}^{A})^{2}}} = \frac{\nu_{j}^{B}-\nu_{j}^{A}}{\sqrt{(\sigma_{j}^{B})^{2}+(\sigma_{j}^{A})^{2}}}$. Let $\delta \triangleq \frac{\nu_{i}^{B}-\nu_{i}^{A}}{\sqrt{(\sigma_{i}^{B})^{2}+(\sigma_{i}^{A})^{2}}}$. Clearly, $\theta = \Phi(-\delta)$, and by defining $\mu_{i} \triangleq \sqrt{(\sigma_{i}^{A})^{2}+(\sigma_{i}^{B})^{2}}$, $\rho_{i}\triangleq \frac{(\sigma_{i}^{A})^{2}}{(\sigma_{i}^{A})^{2}+(\sigma_{i}^{B})^{2}}$, and $\nu_{i}\triangleq \nu_{i}^{A}$, the above model becomes \begin{equation} \label{eq:SampleModel} \begin{array}{ll} &X_{i}^{A}\sim{\cal {\cal N}}(\nu_{i},\rho_{i}\mu_{i}^{2}), \\ & X_{i}^{B}\sim{\cal {\cal N}}(\nu_{i}+\delta\mu_{i},(1-\rho_{i})\mu_{i}^{2}),~ i \in [n], \end{array} \end{equation} where $\nu_{i} \in \mathbb{R}$, $\mu_{i} \in \mathbb{R}_{>0}$, $\rho_{i} \in [0,1]$. Here $\mathbb{R}_{>0}$ is the set of positive real numbers and the tendency assumption prevents $\mu_i$ to be $0$. It is not hard to see that in this equivalent representation, we test the null hypothesis $\mathcal{H}_0: \delta = 0$ against the alternative hypothesis $\mathcal{H}_1: \delta > 0$ (one-sided) or $\mathcal{H}_1: \delta \neq 0$ (two-sided). To quantify the size and the power, we let $\delta$ have some fixed unknown magnitude. For the two-sided case, it may be either positive or negative with the sign $s_\delta$. Since we have no knowledge about the nuisance parameters $\{\nu_{i},\mu_{i},\rho_{i},s_\delta\}_{i=1}^n$, a natural formulation is to look for the maximin test that maximizes the worst-case power over all possible values of the nuisance parameters. Let the data vectors $ \mathbf{X}^A\triangleq \{X_i^A\}_{i=1}^n$ and $\mathbf{X}^B \triangleq \{X_i^B\}_{i=1}^n$ be data points obtained by model~\eqref{eq:SampleModel}. We use $\phi(\mathbf{X}^{A},\mathbf{X}^{B}):\mathbb{R}^{n}\times\mathbb{R}^{n}\mapsto[0,1]$ to denote a test that rejects the null hypothesis with probability $\phi(\mathbf{X}^A, \mathbf{X}^B)$ when the data are $\mathbf{X}^A, \mathbf{X}^B$. Given the nuisance parameters $\gamma \triangleq\{\nu_{i},\mu_{i},\rho_{i},s_\delta\}_{i=1}^n$, the size is given by $\mathbb{E}_{\mathbb{P}_0(\gamma)} [\phi(\mathbf{X}^A,\mathbf{X}^B)]$, where the expectation is taken with respect to the null distribution $\mathbb{P}_0(\gamma)$ with the given nuisance parameters $\gamma$. Similarly, the power of the test is given by $\mathbb{E}_{\mathbb{P}_1(\gamma)} [\phi(\mathbf{X}^A,\mathbf{X}^B)]$. We call a test $\phi^*(\cdot,\cdot)$, a level-$\alpha$ maximin test if for any other test $\phi$, \begin{align*} &\inf_{\gamma} \mathbb{E}_{\mathbb{P}_1(\gamma)} [\phi^*(\mathbf{X}^A,\mathbf{X}^B)] \geq \inf_{\gamma} \;\mathbb{E}_{\mathbb{P}_1(\gamma)} [\phi(\mathbf{X}^A,\mathbf{X}^B)],\\& \sup_\gamma \mathbb{E}_{\mathbb{P}_0(\gamma)} [\phi^*(\mathbf{X}^A,\mathbf{X}^B)] \leq \alpha. \end{align*} In other words, $\phi^*$ has the best worst-case power among all tests with size smaller than $\alpha$ over all values of the nuisance parameters $\gamma$. Equivalently, the problem can be stated as \begin{align} \label{eq:pblmminimax} &\phi^* \in \arg \max_{\phi} \inf_\gamma \mathbb{E}_{\mathbb{P}_1(\gamma)} [\phi(\mathbf{X}^A,\mathbf{X}^B)], \nonumber\\ & {\rm s.t.}\quad \sup_{\gamma} \mathbb{E}_{\mathbb{P}_0(\gamma)} [\phi(\mathbf{X}^A,\mathbf{X}^B)] \leq \alpha . \end{align} For the sake of notational simplicity, we abbreviate the expressions as follows. Given two vectors $\mathbf{a} $ and $\mathbf{b}$, let $\mathbf{a} \circ \mathbf{b}$ be the vector of the same dimension that contains the element-wise product of $\mathbf{a}$ and $\mathbf{b}$. Also by the inequalities $\mathbf{a}>\mathbf{b}$ we refer to element-wise comparison, i.e $a_i>b_i, \forall i$. For two tests $\phi$ and $\psi$, we use $\phi\doteqdel{\epsilon}\psi$ to denote that the two tests have $\epsilon$-similar performance, \begin{align}\label{eq:test_apprx} & \vert\inf_{\gamma}\mathbb{E}_{\mathbb{P}_1(\gamma)}[\phi(\mathbf{X}^A,\mathbf{X}^B)]-\inf_{\gamma}\mathbb{E}_{\mathbb{P}_1(\gamma)}[\psi(\mathbf{X}^A,\mathbf{X}^B)]\vert\leq\epsilon \nonumber\\ &\vert\sup_{\gamma}\mathbb{E}_{\mathbb{P}_0(\gamma)}[\phi(\mathbf{X}^A,\mathbf{X}^B)]-\sup_{\gamma}\mathbb{E}_{\mathbb{P}_0(\gamma)}[\psi(\mathbf{X}^A,\mathbf{X}^B)]\vert\leq\epsilon. \end{align} As a natural extension, $\phi\doteq\psi$ means that the two tests have the same performance, i.e., $\phi\doteqdel 0\psi$. Similarly, $\phi\overset{\cdot}{\leq}\psi$ means $\phi$ has no better performance as $\psi$; in other words, \begin{align*} &\inf_{\gamma}\mathbb{E}_{\mathbb{P}_1(\gamma)}[\phi(\mathbf{X}^A,\mathbf{X}^B)] \leq \inf_{\gamma}\mathbb{E}_{\mathbb{P}_1(\gamma)}[\psi(\mathbf{X}^A,\mathbf{X}^B)]\\ &\sup_{\gamma}\mathbb{E}_{\mathbb{P}_0(\gamma)}[\phi(\mathbf{X}^A,\mathbf{X}^B)]\geq\sup_{\gamma}\mathbb{E}_{\mathbb{P}_0(\gamma)}[\psi(\mathbf{X}^A,\mathbf{X}^B)]. \end{align*} Finally, we will use $\mathbb{E}_0$ and $\mathbb{E}_1$ as shorthand representations for $\mathbb{E}_{\mathbb{P}_0(\gamma)}$ and $\mathbb{E}_{\mathbb{P}_1(\gamma)}$, respectively. \section{OPTIMALITY OF SIGN TEST\label{sec:OptSign}} Let us start by showing the location-scale invariance of the minimax problem \eqref{eq:pblmminimax}. Generally speaking, the worst-case performance of a test $\phi(\cdot,\cdot)$ does not change under any shifting or scaling of the input: \begin{fact} \label{fact:scl_inv} Let $\phi(\mathbf{X}^{A},\mathbf{X}^{B}):\mathbb{R}^{n}\times\mathbb{R}^{n}\mapsto[0,1]$ be an arbitrary test. For any $\mathbf{a}\in\mathbb{R}^{n}$, $\mathbf{b}\in\mathbb{R}_{>0}^{n}$, let $\psi(\mathbf{X}^{A},\mathbf{X}^{B})=\phi(\mathbf{a}+\mathbf{b}\circ\mathbf{X}^{A},\mathbf{a}+\mathbf{b}\circ\mathbf{X}^{B})$. Then, $\phi\doteq\psi$. \end{fact} See Supp. Sec \ref{sec:pf_fact} for the proof. Fact \ref{fact:scl_inv} leads to two conjectures. First, any data shifting does not affect the performance, suggesting that the absolute offset may be redundant and we should only focus on the relative difference $\mathbf{Y}\triangleq \mathbf{X}^{B}-\mathbf{X}^{A}$. Second, any data scaling does not affect the performance either. This suggests that the magnitude of the data, $\vert\mathbf{Y}\vert$, may also be redundant. Then, intuitively what remains, namely the signs of the difference $S_{i} \triangleq \text{sgn}(Y_{i})$, is the actual informative part for the minimax problem. For the most powerful test using only the sign information, a sufficient statistic is the number of positive signs $W=\sum_{i=1}^{n}\mathbb{\mathbb{I}}_{\{Y_{i}>0\}}$. Clearly, under the null distribution, $W\simBin(n,0.5)$. Then the sign test $\phi^S(\mathbf{X}^A,\mathbf{X}^B)$ can be written as \begin{align} &\text{one-sided:}~\mathbb{\mathbb{I}}_{\{W>c_1\}} + p_1\mathbb{\mathbb{I}}_{\{W=c_1\}}, \label{eq:SgnTst_oneside}\\ & \text{two-sided:}~\mathbb{\mathbb{I}}_{\{\vert W- n/2 \vert >c_2\}} + p_2\mathbb{\mathbb{I}}_{\{\vert W- n/2 \vert = c_2\}}, \label{eq:SgnTst_twoside} \end{align} where $c_1$, $c_2$, $p_1$, $p_2$ are some constants calculated according to $W\simBin(n,0.5)$ and the level $\alpha$. Note that $p_1,p_2\in[0,1]$. In addition, the distribution of $W$ and the power of the sign test does not depend on the values of the nuisance parameters. We next prove the optimality of the sign test in the one-sided case and near optimality in the two-sided case. \subsection{One-sided Case} In the one-sided case, let us assume $\theta\geq 0.5$ ($\delta \geq 0$). Then the nuisance parameters are just $\gamma \triangleq\{\nu_{i},\mu_{i},\rho_{i}\}_{i=1}^n$. Our main result below confirms that the sign test is indeed maximin in the sense of \eqref{eq:pblmminimax}. \begin{thm} \label{thm: opt_signtest} Let $\mathcal{B}_{n\times n}$ be the class of Borel measurable functions that maps $\mathbb{R}^{n}\times\mathbb{R}^{n}$ to $[0,1]$. Then the one-sided sign test, as given in \eqref{eq:SgnTst_oneside}, is maximin among all tests $\phi(\mathbf{X}^{A},\mathbf{X}^{B})\in\mathcal{B}_{n\times n}$. \end{thm} Recall from Section \ref{sec:PblmFor} that our statistical model is \begin{align*} X_i^A \sim \mathcal{N}(\nu_i, \rho_i \mu_i^2),~~~~X_i^B \sim \mathcal{N}(\nu_i+\delta\mu_i, (1-\rho_i) \mu_i^2). \end{align*} Paired tests literatures suggest us to look at only the difference $Y_i=X_i^B - X_i^A \sim \mathcal{N}(\delta \mu_i, \mu_i^2)$ to get rid of the nuisance parameters $\nu_i$'s and $\rho_i$'s, which is not surprising. Here let us take the case $n=1$ as an example to give some high-level intuitions why we can further reduce the sufficient statistics from $Y_i$'s to $S_i$'s. According to Theorem 8.1.1 and the Neyman-Pearson lemma in \citet{lehmann2006testing}, to show the sign test is maximin, it suffices to find a prior on $\mu_1$ where $S_1$ is a sufficient statistic. However, a careful inspection of the proof of Lemma \ref{lem:stepopt}, especially on \eqref{eq:stepopt_pf_4}, reveals that there is no such single prior on $\mu_1$ for which $S_1$ is a sufficient statistic. However, there is in fact a sequence of priors on $\mu_1$ such that fixing the observation $Y_1$, $S_1$ is asymptotically a sufficient statistic. For $k=1,2,\cdots$, consider the sequence of priors $g_k(\mu_1) = c_k/ \mu_1$ for $\mu_1 \in (1/k, k)$ and some normalizing constant $c_k$. Let $f_0(\cdot;\mu)$, $f_1(\cdot;\mu)$ be the densities of $\mathcal{N}(0,\mu^2)$, $\mathcal{N}(\delta \mu,\mu^2)$ respectively and let $f_0$, $f_1$ be that of $\mathcal{N}(0,1)$, $\mathcal{N}(\delta,1)$. A direct calculation (by change of variable $\mu'=\frac{Y_1}{\mu}$) shows that as $k\to \infty$, the likelihood ratio \begin{align*} &\frac{f(Y_1|H_1)}{f(Y_1|H_0)} = \frac{\int_{\frac{1}{k}}^{k} f_1(Y_1;\mu) \frac{1}{\mu} d \mu}{\int_{\frac{1}{k}}^{k} f_0(Y_1;\mu) \frac{1}{\mu} d \mu} = \frac{\int_{\frac{1}{k}}^{k} f_1(\frac{Y_1}{\mu}) \frac{1}{\mu^2} d \mu}{\int_{\frac{1}{k}}^{k} f_0(\frac{Y_1}{\mu}) \frac{1}{\mu^2} d \mu} \overset{\mu'=\frac{Y_1}{\mu}}{=} \\& \frac{\int_{\frac{Y_1}{k}}^{kY_1} f_1(\mu') d \mu'}{\int_{\frac{Y_1}{k}}^{kY_1} f_0(\mu') d \mu'} \overset{k\to \infty}{\to} 2 \left[\theta \mathbb{\mathbb{I}}_{\{S_1=+\}} + (1-\theta) \mathbb{\mathbb{I}}_{\{S_1=-\}}\right]. \end{align*} Then asymptotically, the likelihood ratio of the observation $f(Y_1|H_1)/f(Y_1|H_0)$ depends only on $S_1$, implying that $S_1$ is indeed asymptotically a sufficient statistic. We note the above argument serves \textit{only} as a high-level intuition and is by no means rigorous. More specifically, here we only show that for each $Y_1$, $S_1$ is asymptotically a sufficient statistic for the sequence of priors $g_1, g_2,\cdots$, which is essentially a point-wise convergence result. However, a uniform convergence is needed to actually prove the final result. The rigorous proof is as follows. \begin{proof} (Proof sketch of Theorem \ref{thm: opt_signtest}) The idea is to show any test in $\mathcal{B}_{n\times n}$ performs no better than the sign test. The proof is composed of three main steps. We state the lemmas being used right after the corresponding steps, and relegate their proofs to the supplementary material. We recall that inequalities on vectors are element-wise, e.g. $\mathbf{a} \geq \mathbf{b}$ means $a_i\geq b_i$ for all $i$. \textbf{Step 1:} Define the set of Borel measurable tests: \begin{align*} \mathcal{B}_{n}=\{f:\mathbb{R}^{n}\mapsto[0,1],\;f\;is\;Borel\;measurable\}. \end{align*} Lemma \ref{lem:two_to_one} implies that it suffices to show that the sign test is maximin among all tests $\phi(\mathbf{Y})\in\mathcal{B}_n$. \begin{lem} \label{lem:two_to_one} For any test $\phi(\mathbf{X}^{A},\mathbf{X}^{B})\in{\cal B}_{n\times n}$, there exists a Borel measurable test $\psi(\mathbf{Y}) \in \mathcal{B}_n$, such that $\phi\overset{\cdot}{\leq}\psi$. Moreover, if $\phi$ is symmetric, then $\psi$ is also symmetric\footnote{The symmetry is used for proving Theorem \ref{thrm:opt_two_side}.}. \end{lem} \textbf{Step 2:} We show the sign test is maximin over the set of ``simple test'' $\mathcal{S}\subset \mathcal{B}_n$, which is defined as follows. Let $\mathcal{O} = \{-,+\}^n$ be the set of $2^n$ orthants in $\mathbb{R}^n$ and let $\mathbf{o}=(o_1,\cdots,o_n) \in \mathcal{O}$. Consider any $\omega>0$. For any $b\in\mathbb{Z}$, let the $1$-D intervals be $I_{b}^{+}=((1+\omega)^{b},(1+\omega)^{b+1}]$ and $I_{b}^{-}=[-(1+\omega)^{b+1},-(1+\omega)^{b})$. Define the $n$-D box, specified by the orthant index $\mathbf{o}$ and the interval index $\mathbf{b}=(b_1,\cdots,b_n)$, as $I_{\mathbf{b}}^\mathbf{o}=I^{o_1}_{b_1}\times \cdots \times I^{o_n}_{b_n}$. Then define the set of simple tests, denoted by $\mathcal{S}(\omega)$, to be the test that are piece-wise constant on the boxes $I_{\mathbf{b}}^\mathbf{o}$'s: \begin{equation}\label{eq:defSomega} \begin{split} \mathcal{S}(\omega)=&\{\phi:\phi= \sum_{\mathbf{o}\in\mathcal{O}} \sum_{-\infty<\mathbf{b}<\infty}\phi_{\mathbf{b}}^{\mathbf{o}}\mathbb{\mathbb{I}}_{I_{\mathbf{b}}^{\mathbf{o}}} +\phi_{0}\mathbb{\mathbb{I}}_{\{0\}}, \\&for~some~0\leq\phi_{\mathbf{b}}^{\mathbf{o}}\leq 1,0\leq\phi_0\leq 1 \}, \end{split} \end{equation} and let ${\cal S}=\bigcup_{\omega>0}{\cal S}(\omega)$. By Lemma \ref{lem:stepopt}, the sign test is maximin among all tests in ${\cal S}$. \begin{lem} \label{lem:stepopt} The one-sided sign test \eqref{eq:SgnTst_oneside} is maximin among all $\alpha$-level tests in ${\cal S}$. \end{lem} \textbf{Step 3:} We show that $\mathcal{S}$ approximates $\mathcal{B}_n$ arbitrarily well in terms of testing performance as defined in \eqref{eq:test_apprx}, and hence establish the optimally of the one-sided sign test in $\mathcal{B}_n$. Specifically, by Lemma \ref{lem:sim_apr}, $\forall~\phi\in{\cal B}_n,~\epsilon>0$, $\exists~\psi\in{\cal S}$, s.t. $\phi\doteqdel{\epsilon}\psi$. Letting $\epsilon\downarrow0$ we have that $\phi^S$ is maximin among all tests in ${\cal B}_n$, concluding the proof. \begin{lem} \label{lem:sim_apr} Let ${\cal B}_n$ be the set of Borel measurable functions $f:\mathbb{R}^n\mapsto[0,1]$. For any $\phi(\mathbf{Y})\in{\cal B}_n$ and any $\epsilon>0$, there exists a measurable function $\psi\in{\cal S}$ such that $\phi\doteqdel{\epsilon}\psi$. \end{lem} \end{proof} \begin{remark} \label{rmk:vio_cond} Under the alternative distribution, the testing statistics $W$ will follow a binomial distribution $\text{Bin}(n,\theta)$. If the tendency assumption is violated, i.e. each pair has a different $\theta_i$, it will instead follow a Poisson binomial distribution with parameter $(\theta_1,\cdots,\theta_n)$, which has a tail property similar to that of the binomial distribution. Hence the sign test will still maintain a good power. Moreover, when $\theta_i$'s are different, one can consider a minimax setting over $\theta_i$'s by defining the nuisance parameters to be $\{\mu_i,\rho_i,\nu_i\} \cup \{\theta_i: \theta_i \geq \theta_0\}$ for some $\theta_0>0.5$. It is not hard to see that the one-sided sign test is still maximin in this case. Specifically, the power will increase with the increase of any $\theta_i$, and hence the worst-case is when $\theta_i=\theta_0~ \forall i$, which reduces to the setting where $\theta_i$'s are same. \end{remark} \subsection{ Two-sided Case} Now we extend our result to the two-sided case, where we want to test $\theta=0$ v.s. $\theta\neq 0$. Recall that in this case, we can no longer assume $\delta\geq 0$ for the distribution in (\ref{eq:SampleModel}). So we modify the formulation in Section \ref{sec:PblmFor} by letting $s_\delta\in\{-1,1\}$ to be the sign of $\delta$, and letting the nuisance parameter be $\gamma = \{\nu_{i},\mu_{i},\rho_{i},s_\delta\}_{i=1}^n$. We fix the magnitude $\vert \delta \vert$ and consider the maximin problem \eqref{eq:pblmminimax}. Without loss of generality assume $\alpha < 0.5$. Let $\tilde{\phi}^S$ be the $\frac{\alpha}{2}$-level one-sided sign test. The $\alpha$-level two-sided sign test $\phi^S$ can be written as \begin{equation} \label{def:two_side_sign} \phi^S=\tilde{\phi}^S(\mathbf{Y})+\tilde{\phi}^S(-\mathbf{Y}) \end{equation} The following theorem shows in the two-sided case, the sign test is near optimal. See Supp. Subsec. \ref{pf:opt_two_side} for the proof. \begin{thm} (Two-sided case) \label{thrm:opt_two_side} Let $\mathcal{B}_{n\times n}$ be the class of Borel measurable functions that maps $\mathbb{R}^{n}\times\mathbb{R}^{n}$ to $[0,1]$, and let $\phi^S$ be the two-sided sign test as defined in \eqref{def:two_side_sign}. For any $\alpha$-level test $\phi \in \mathcal{B}_{n\times n}$, the worst-case power satisfies \begin{equation*} \inf_\gamma \mathbb{E}_1[\phi] \leq \inf_\gamma \mathbb{E}_1[\phi^S] + \frac{\alpha}{2} \exp(-\frac{n \delta^2}{2}). \end{equation*} If $\alpha=0.05$ and $\delta=\frac{3}{\sqrt{n}}$, the additive term is $2.7e$-$4$, almost negligible. \end{thm} \begin{remark} The proofs in both cases mainly use two properties of the Gaussian distribution. The first is the location-scale invariance, i.e., if we scale or shift the data points, the distribution still lies within the family of interest. This is used in the proof of Fact \ref{fact:scl_inv}, Lemma \ref{lem:two_to_one}, and Lemma \ref{lem:stepopt}. The second is the sub-Gaussian tail property. This is used in the proof of Lemma \ref{lem:sim_apr} and Theorem \ref{thrm:opt_two_side}. Specifically, if we have a heavy-tailed distribution but the tail probability still vanishes, Lemma \ref{lem:sim_apr} will still hold, while the exponential term on the RHS of Theorem \ref{thrm:opt_two_side} will become a term with a slower vanishing speed that depends on the tail property of the distribution under consideration. To generalize to result, in order for the sign test to be maximin in some family of distribution, the family needs to have location-scale invariance and sub-Gaussian tail property. Our conjecture is that these two are also sufficient for the minimaxity of the sign test. \end{remark} \begin{figure*} \centering \subfigure[Power versus Magnitude. ]{\includegraphics[width=0.3\textwidth]{./SimuInv.pdf}}\quad \subfigure[Power versus~$c_v$.]{\includegraphics[width=0.3\textwidth]{./TwoGroup.pdf}}\quad \subfigure[Power versus~$c_v$.]{\includegraphics[width=0.3\textwidth]{./MultiGroup.pdf}} \caption{Effect of various parameters on the statistical power of the tests. \label{fig:Syn}} \end{figure*} \subsection{Comparison with Paired T-test}\label{sec:comp} Besides the minimaxity of the sign test, it is interesting to identify (realistic) conditions on the nuisance parameters such that the sign test outperforms other popular tests. We demonstrate this by comparing the asymptotic power of the sign test with that of the paired t-test, whose test statistic is given in \eqref{eq:stats_pairt}. Since both the sign test and the paired t-test only use $\mathbf{Y}=\mathbf{X}^B-\mathbf{X}^A$ to compute the test statistics, we can only consider $\mathbf{Y}$ as the input, which is generated by $\mu_i$'s according to $Y_i \sim \mathcal{N}(\delta \mu_i, \mu_i^2)$, $\forall~i$. Let $m_1=\frac{1}{n}\sum_i \mu_i$ and $m_2=\frac{1}{n}\sum_i (\mu_i - m_1)^2$ be the mean and the variance of $\mu_i$'s. In the homogeneous case, $\mu_i$'s are the same and thus $m_2=0$. In the presence of within-group heterogeneity, however, $\mu_i$'s are different and $m_2$ may be large. Hence, intuitively, it is reasonable to look at the \emph{coefficient of variation}~\cite{everitt2006cambridge}, $c_v=m_2 / m_1^2$, as a measure for within group heterogeneity. In fact, as shown below, it is the determining factor for the testing performance. \begin{thm}\label{thm:comp} Let $n \rightarrow \infty$ and scale $\delta$ with $n$ such that $\delta \sqrt{n}$ remains constant\footnote{Such asymptotic scaling makes the power converge to some constant between $0$ and $1$, and thus making the power of the tests comparable \cite{van2000asymptotic}.}. Also assume that by increasing $n$ the values of $m_1$ and $m_2$ remain constant. Then, the asymptotic power of the $\alpha$-level two-sided sign test and the $\alpha$-level two-sided paired t-test are given by \eqref{eq:pw}, respectively. Moreover, the two-sided sign test has a larger asymptotic power if $c_v \geq \pi/2 -1$. \begin{align}\label{eq:pw} &\textrm{Power of sign test: } Q\left( z_{\frac{\alpha}{2}} - \sqrt{\frac{2}{\pi}}\sqrt{n}\delta \right),\\& \textrm{Power of paired t-test: } Q\left( z_{\frac{\alpha}{2}} - \frac{\sqrt{n}\delta }{\sqrt{1+c_v}} \right), \end{align} where $Q(\cdot)$ is the tail function of the standard normal distribution and $z_{\frac{\alpha}{2}}$ is the $(1-\frac{\alpha}{2})$-th quantile of the standard normal distribution. \end{thm} \textbf{Remark.} As shown in Theorem \ref{thm:comp}, $c_v$ is the key quantity that determines the performance of the paired t-test as compared to the signed test. The condition $c_v \geq \pi/2 -1$ is quite general, implying under a variety of the nuisance parameters, the sign test can outperform the paired t-test. \section{NUMERICAL EXPERIMENTS} \label{sec:Exp} In this section, we provide numerical evidence on the theoretical optimality and the practicality of our results. First, we evaluate our results on the synthetic data. Then, the viral infection disease dataset \cite{chen2012personal} is used to further evaluate the practicality of our theoretical findings. \subsection{Synthetic Data} Here, we compare the performance of sign test with two other popular tests for paired data: the paired t-test and the Wilcoxon signed rank test \cite{van2000asymptotic}. All three tests calculate the test statistic using only $\mathbf{Y}$. Hence we only consider different values of $\{\mu_i\}_{i=1}^n$ and generate the samples~$\mathbf{Y}$ according to $Y_i \sim \mathcal{N}(\delta \mu_i, \mu_i^2)$, for $i=1,...,n$. In all experiments, we fix the sample size $n=20$, $\delta= 3 / \sqrt{n}$, and the size of the tests $\alpha=0.05$. We repeat experiments under each parameter setting $10,000$ times, and plot the corresponding $3~std$ confidence intervals Recall that, according to Theorem~\ref{thm:comp}, the coefficient of variation $c_v={m_2}/{m_1^2}$ determines the power of the paired t-test. Our first experiment examines if $c_v$ can quantify the within-group heterogeneity level reasonably for finite values of $n$. In this experiment, we generated $\bm{\mu}$ using the two-group model \cite{efron2008microarrays}, where the $\mu_i$'s are $50/50$ with values $1\times$ and $10\times$ of some given magnitudes. We plot the corresponding powers for different values of the given magnitudes while the corresponding $c_v$'s are kept fixed to the value $0.7$. As shown in Fig. \ref{fig:Syn} (a), for all $3$ tests, the powers are the same for experiments under different magnitudes, implying that same value of $c_v$ always results in the same power regardless of the values of other parameters. Hence, it is reasonable to assume that $c_v$ can well quantify the level of heterogeneity. In the other two experiments, we use $c_v$ to represent heterogeneity level and plot the power of different test versus different values of $c_v$. In Fig. \ref{fig:Syn} (b), the value of $\bm{\mu}$ is also generated by the two-group model as before. As can be seen in this figure, the sign test outperforms the paired t-test when $c_v$ exceeds $0.58$. This phenomenon is consistent with the condition in Theorem~\ref{thm:comp} where the threshold is computed as $c_v\geq \frac{\pi-2}{2}\approx0.57$. In Fig. \ref{fig:Syn} (c), $\bm{\mu}$ is generated according to the multi-group model with $5$ groups of different values. As can be seen in the figure, the sign test has a better power than the Wilcoxon test when $c_v$ exceeds $2.3$. In addition, as $c_v$ increases, the power of both the paired t-test and the Wilcoxon signed test decreases, but the later decreases much slower than the former. This is in line with our intuition since the Wilcoxon signed-rank test statistic uses the sign information and is more robust to the within-group heterogeneity than the paired t-test statistic. \subsection{The Viral Infection Dataset} \begin{table} \centering \begin{tabular}{|c|c|c|c|c|c|} \hline ~ & Sign & Wil& Pair T & DESeq2 & Voom \\ \hline Sign & 225 & 156 & 140 & 66 & 193\\ Wil &~&267&223&95&260\\ Pair T & ~ & ~ & 292 & 97 & 282 \\ DESeq2 & ~ & ~ & ~ & 170 & 163 \\ Voom & ~ & ~ & ~ & ~ & 628 \\ \hline \end{tabular} \caption{Number of common discoveries across various methods: the sign test (Sign), Wilcoxon signed-rank test (Wil), paired t-test (Pair T), paired-mode DESeq2 (DESeq 2), paired-mode Voom (Voom). \label{tab:TestRes}} \end{table} \begin{figure} \centering \includegraphics[width=0.48\textwidth]{./Fig_1X_TimeLine.pdf} \caption{The description of the VID dataset \citep{chen2012personal}. \label{fig:VirInf}} \end{figure} In VID \citep{chen2012personal}, one subject went through 6 viral infection periods in an overall time period of $1124$ days. During this period, $57$ RNA-Seq blood samples were collected under two conditions, healthy and sick; see Fig. \ref{fig:VirInf} for more details. The task is to find differentially-expressed genes under the two conditions. We manually pair the samples under the two conditions that are close to each other in time; and altogether acquire $20$ data pairs. As shown in Fig. \ref{fig:EviDif} in the beginning of this manuscript, within-pair samples are more similar to each other than within-group samples. We compare the performance of the two-sided sign test \eqref{eq:SgnTst_twoside}, the Wilcoxon test \eqref{eq:stats_wil}, the paired t-test \eqref{eq:stats_pairt}. We also report the performance of two popular differential expression analysis packages paired-mode DESeq2 \citep{love2014moderated} and paired-mode Voom \citep{law2014voom}. According to \citep{pimentel2016differential}, they have the most promising performance among differential expression analysis tools. Prior to testing, genes with the total number of counts less than $50$ or having some counts less than or equal to $1$ are removed since we do not have enough observations of them. For the sign test and the paired t-test, we used the size factor normalization method as in DESeq2. For all methods, after the p-value calculation, the BH procedure \citep{benjamini1995controlling} is used to control the false discovery rate (FDR) at the level of $0.1$. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{./SignOnly.pdf} \caption{Count difference of the top four genes discovered only by the sign test. X-axis: sample index; Y-axis: gene expression level. \label{fig:VirInf2}} \end{figure} We present our results in Table~\ref{tab:TestRes}, where the $ij$-th entry of this table is the number of genes discovered by both methods $i$ and $j$. There are $26$ genes discovered {\it only} by the sign test. We plot the the paired differences $\mathbf{Y}=\mathbf{X}^B-\mathbf{X}^A$ for $4$ of these $26$ genes with smallest p-values in Fig. \ref{fig:VirInf2}, where the signals for differential expression are very strong. For genes ANXA7, PITRM1, ST6GLLNAC6, sample $20$ has the opposite direction and a magnitude much larger than others. This prevents other methods that use the magnitude from discovering these genes. But the sign test is robust to the heterogeneity in the magnitude and discovers them. In Table~\ref{tab:TestRes}, the paired t-test has more discoveries than the sign test and the Wilcoxon test. A possible explanation is that the within-group heterogeneity level is not high enough due to the fact that the samples were all drawn from the same person. Voom makes more discoveries because it makes a strong assumption that a mean-variance function is shared across the genes (which also could lead to false discoveries). \clearpage \bibliographystyle{plain
\section{Introduction} The family of the Tamari lattices is extremely rich from the point of view of combinatorial algebra. The Tamari lattices have two interpretations as posets of type $A$. First, it is isomorphic to the poset of tilting modules over a linearly oriented quiver of type $A$ (See \cite{happel_tilting} for more details. It seems that part of this was already observed by Gabriel \cite{gabriel}). On the other hand, Tamari lattices are part of the Cambrian lattices of type $A$ (See \cite{reading} for more details). Finally let $\mathrm{DW}_{n}$ be the distributive lattice of upper ideals in the poset of positive roots of the root system of type $A_{n-1}$. Then, the Tamari lattice of size $n$ is conjecturally deeply related to $\mathrm{DW}_{n}$ (See Conjecture $5.3$ of \cite{chapoton_modules} for more details). As another intriguing feature of this lattice, we have its poset of intervals. It was proved by Chapoton that there is a beautiful formula for the number of intervals in the Tamari lattice. \[ \hbox{ Number of intervals in $\operatorname{Tam}_n = $} \frac{2(4n+1)!}{(n+1)!(3n+2)!}. \] It is remarkable that this formula has such a simple factorized form. More recently, in \cite{chapoton_interval}, Chapoton associated to any finite poset $P$ a polynomial in $4$ variables that enumerate the intervals of $P$ and he proved that the polynomial of the Tamari lattice has a very particular behavior (this particular behavior is not shared with generic posets). In this article, we continue to investigate the set of intervals of the Tamari lattices. We use the theory of interval-posets introduced by Châtel and Pons in \cite{pons_chatel} in order to study two families of intervals in the Tamari lattice. In terms of intervals, these families seem to have a rather complicated description. However, they have a very simple description in terms of interval-posets avoiding specific configurations. In the first part of the article we consider the family appearing as images of noncrossing trees in the dendriform operad. These objects were introduced by Chapoton in \cite{chapoton_mould}, and it was proved in \cite{chapoton_etal_mould} that they are intervals in the Tamari lattice. In Theorem \ref{image_noncrossing}, we complete this result by giving a precise description of these intervals in terms of interval-posets. By construction, they are in bijection with the noncrossing trees. In particular in the Tamari lattice of size $n$, there are $\frac{1}{2n+1} {{3n}\choose{n}}$ such intervals. We call them \emph{exceptional} because they are also in bijection with the set of exceptional sequences (up to an equivalence relation) in the bounded derived category of a linearly oriented quiver of type $A$ (See \cite{araya} and Section $3$ of \cite{chapoton_stokes} for more informations). We would need to introduce too many algebraic objects to really explain what we have in mind here, but we expect this relation with the exceptional sequences to be much more than a bijection. At an elementary level, the exceptional intervals turn out to have another nice description in terms of noncrossing partitions. It is well-known that the Tamari lattice is a refinement of the poset of noncrossing partitions. More precisely, if $\operatorname{Tam}_n$ denotes the Tamari lattice of size $n$ and $\mathrm{NC}_n$ denotes the poset of noncrossing partitions, then there is a bijection $\phi : \mathrm{NC}_n \to \operatorname{Tam}_n$ which is a morphism of posets. In Theorem \ref{theo_nc}, we prove that an interval of $\operatorname{Tam}_n$ is of the form $[\phi(\pi_1),\phi(\pi_2)]$ for an interval $[\pi_1,\pi_2]$ of noncrossing partitions if and only if it is exceptional. In the second part of the article, we consider the family of new intervals of the Tamari lattices. It was shown by the first author that there is a structure of operad on the set of intervals of the Tamari lattice (see \cite{chapoton_interval} for more details). The new intervals are exactly the intervals that cannot be obtained as compositions of smaller intervals. There is also a nice formula for the number of such intervals: \[ \hbox{Number of new intervals in $\operatorname{Tam}_n$ }= 3 \cdot \frac{2^{n-2}(2n-2) !}{(n-1) ! (n+1) !}.\] In Section $4$, we find the description of the interval-poset corresponding to a new interval and we deduce an intrinsic characterization of these intervals. Our main tool is what we call the rise of an interval-poset. This operation increases the size of an interval-poset by $1$, and shifts by $1$ all the increasing relations of the poset. After shifting the increasing relations by $1$, the result is not necessarily a poset since the new increasing relations may contradict the decreasing ones. We introduce the family of modern interval-posets and show that they are exactly the interval-posets for which the rise is also an interval-poset. Then, we prove that an interval is new if and only if its interval-poset is the rise of a modern interval-poset. In terms of interval, the rise sends an interval $[S_1,T_1]$ to the interval $[S,T]$ where $S$ (resp. $T$) is obtained by grafting the root of $S_1$ (resp. $T_1$) on the first (resp. second) leaf of $Y$ the binary tree of size $1$. In the last section, we consider the interval-posets for which all the successive risings are interval-posets. We call them \emph{infinitely modern}. It seems that this family of intervals have not been considered before. Using a double statistic on the set of interval-posets, we recover the triangular decomposition of the Fuss-Catalan number $\frac{1}{2n+1} {{3n}\choose{n}}$ introduced by Aval in \cite{aval}. As corollary, we prove in Theorem \ref{theo_inf} that there are as many infinitely modern interval-posets of size $n$ as there are ternary trees with $n$ inner vertices. \paragraph{Acknowledgement} This work was done when I was a postdoc at the University of Strasbourg and I am grateful to Frédéric Chapton for introducing me to this subject, for his support, his comments and the many things he taught me. I am also grateful to Camille Combe for the many discussions about the last part of this article. \section{Interval-posets, intervals of the Tamari lattices and conventions}\label{section1} In this section we recall the construction of \emph{interval-posets} of Châtel and Pons introduced in \cite{pons_chatel} and recall that they are in bijection with the intervals of the Tamari lattice. One should note that this bijection is not canonical. More precisely, it depends on the various choices that one has to make in order to define the Tamari lattices as partial orders on sets of binary trees. This is why we start by carefully stating our conventions. Let $n\in \mathbb{N}$. A (planar) binary tree of size $n$ is a graph embedded in the plane which is a tree, has $n$ vertices with valence $3$, $n+ 2$ vertices with valence $1$ and a distinguished univalent vertex called the \emph{root}. The other vertices of valence $1$ are called the \emph{leaves} of the tree. For the rest of the paper, when we speak about vertices of the tree, we have in mind the trivalent vertices. The planar binary trees are pictured with their root at the bottom and their leaves at the top. With this fixed convention, we can speak about \emph{left} and \emph{right} sons (or children) of a vertex of a binary tree $T$. For us the son of a vertex is connected to his father by a single edge, if there is more than one edge we speak about a \emph{descendant}. If $v$ is a vertex of $T$, we let $T_1$ (resp. $T_2$) be the subtree with root the left son (resp. right son) of $v$. We say that $T_1$ (resp. $T_2$) is the left subtree (resp. right subtree) of $v$. Let $\operatorname{Tam}_n$ be the set of all binary trees with $n$ vertices. It is well-known that the cardinality of this set is the Catalan number $c_n = \frac{ 1 }{n+1} {{2n}\choose{n}}$. There is a partial order relation on $\operatorname{Tam}_n$ which was introduced by Tamari in \cite{tamari}. It is defined as the transitive closure of the following covering relations. A tree $T$ is covered by a tree $S$ if they only differ in some neighborhood of an edge by replacing the configuration $\begin{tikzpicture}[scale = 0.1] \draw (0,0)--(2,2); \draw (0,0)--(-2,2); \draw (-1,1)--(0,2); \end{tikzpicture}$ in $T$ by the configuration $\begin{tikzpicture}[scale = 0.1] \draw (0,0)--(2,2); \draw (0,0)--(-2,2); \draw (1,1)--(0,2); \end{tikzpicture}$ in $S$. The poset $\operatorname{Tam}_n$ is known to be a lattice. A binary \emph{search tree} is a binary tree labelled by integers such that if a vertex $x$ is labelled by $k$, then the vertices of the left subtree (resp. right subtree) of $x$ are labelled by integers less than or equal (resp. superior) to $k$. if $T$ is a binary tree with $n$ vertices, there is a unique labelling of the vertices by each of the integers $1,2,\cdots, n$ that makes it a binary search tree. This procedure is sometimes called the \emph{in-order traversal} of the tree. The insertion procedure is recursive. Starting at the root of the tree $T$, the algorithm is the following. \begin{verbatim} 1. Traverse the left subtree, i.e., call in-order(left-subtree) 2. Visit the root. 3. Traverse the right subtree, i.e., call in-order(right-subtree) \end{verbatim} The first vertex visited by the algorithm is labeled by $1$, the second by $2$ and so on. See figure \ref{fig_inorder} for an example. Since this labeling is canonical, we will allow ourself to identify vertices with their label. Using this labeling, a binary tree $T$ with $n$ vertices induces a partial ordered relation $\lhd$ on the set $\{1,\cdots, n\}$ by setting $i \lhd j$ if and only if the vertex labelled by $i$ is in the subtree with root $j$. When $(P,\lhd)$ is a partial order on the set $\{1,\cdots, n\}$, one can use the natural total ordering of the integers $1,\cdots, n$ that we denote by $<$ to split the relations $\lhd$ in two families. Let $1 \leqslant a < b \leqslant n$ be two integers. If $a \lhd b$ we say that the relation is \emph{increasing}. On the other hand, if $b\lhd a$, we say that the relation is \emph{decreasing}. We denote by $\mathrm{Dec}(P)$ and $\mathrm{Inc}(P)$ the set of decreasing and increasing relations of $P$. There is a particularly nice way to draw such a poset $(P,\lhd)$. If a relation $i \lhd j$ is increasing, draw a (red) arrow from $i$ to $j$ under the integers $i,i+1,\cdots, j$. If there is a decreasing relation $j \lhd i$ draw a (blue) arrow from $j$ to $i$ over the integers $j,j-1,\cdots, i$. See figure \ref{fig_inorder} for an example. \begin{figure}[h] \centering \begin{tikzpicture}[scale =1] \node (a) at (0,0) {5}; \node (c) at (-1.5,2.5) {3}; \node (b) at (-2,2) {1}; \node (d) at (-2.5,3.5) {2}; \node (e) at (-0.5, 3.5) {4}; \node (f) at (2.5, 2.5) {8}; \node (g) at (2,3) {6} ; \node (h) at (2.5,3.5) {7}; \node (1) at (-4,4) {}; \node (2) at (-3,4) {}; \node (3) at (-2,4) {}; \node (4) at (-1,4) {}; \node (5) at (0,4) {}; \node (6) at (1,4) {}; \node (7) at (2,4) {}; \node (8) at (3,4) {}; \node (9) at (4,4) {}; \draw (a)--(b)--(1) (b)--(c)--(e) -- (5) (e)--(4) (c)--(d)--(2) (d)--(3) (a)--(f)--(9) (f)--(g)--(6) (g)--(h)--(7) (h)--(8); \end{tikzpicture} \begin{tikzpicture} \node (1) at (-4,4) {1}; \node (2) at (-3,4) {2}; \node (3) at (-2,4) {3}; \node (4) at (-1,4) {4}; \node (5) at (0,4) {5}; \node (6) at (1,4) {6}; \node (7) at (2,4) {7}; \node (8) at (3,4) {8}; \draw[red,->,below,thick] (2.south) to [out=-45,in=225] (3.south); \draw[red,->,below,thick] (1.south) to [out=-90,in=-90] (5.south); \draw[red,->,below,thick] (6.south) to [out=-50,in=230] (8.south); \draw[blue,thick,->] (3.north) to [out=140,in=50] (1.north); \draw[blue,thick,->] (4.north) to [out=135,in=30] (3.north); \draw[blue,thick,->] (7.north) to [out=135,in=45] (6.north); \draw[blue,thick,->] (8.north) to [out=100,in=80] (5.north); \end{tikzpicture} \caption{On the left, an example of the labeling of the vertices of a binary tree by calling the `in-order' algorithm. On the right, the poset induced by the tree.}\label{fig_inorder} \end{figure} Using this, we have a useful characterization due to Châtel, Pilaud and Pons \cite{chatel_pilaud_pons} of the partial order of the Tamari lattice in terms of increasing or decreasing relations. \begin{proposition}\label{char_tamari} Let $T_1$ and $T_2$ be two binary trees. Then $T_1 \leqslant T_2$ in the Tamari lattice if and only if $\mathrm{Dec}(T_1) \subseteq \mathrm{Dec}(T_2)$ if and only if $\mathrm{Inc}(T_2) \subseteq \mathrm{Inc}(T_1)$. \end{proposition} \begin{proof} See Proposition $40$ and Remark 52 of \cite{chatel_pilaud_pons}. \end{proof} \begin{definition} An interval-poset $(P, \lhd) $ is a poset over the integers $1,\cdots, n$ such that \begin{enumerate} \item If $a\lhd c$ and $a<c$, then for all integers $b$ such that $a<b<c$, we have $b\lhd c$. \item If $c\lhd a$ and $a<c$, then for all integers $b$ such that $a<b<c$, we have $b\lhd a$. \end{enumerate} \end{definition} The conditions $(1)$ and $(2)$ of this definition will be referred as the \emph{interval-poset condition}. The integer $n$ in the definition is called the \emph{size} of the interval-poset. \begin{remark} Let $(P,\lhd)$ be an interval-poset. If $x\lhd y$ is an increasing relation (resp. a decreasing relation), then by the interval-poset condition there is a relation $y-1\lhd y$ (resp. $x+1\lhd x$). The existence of such `small' relations will be crucial in most of our proofs on modern interval-posets. \end{remark} \begin{theorem}[Châtel, Pons]\label{bij} Let $n \in \mathbb{N}$. There is a bijection between the set of intervals in $\operatorname{Tam}_n$ and the set of interval-posets of size $n$. \end{theorem} \begin{proof} This is Theorem $2.8$ of \cite{pons_chatel}. Since we need to use the explicit version of the theorem, let us recall the bijections. if $[S,T]$ is an interval in $\operatorname{Tam}_n$, we can construct an interval-poset as follows. The trees $S$ and $T$ can be seen as binary search trees and they induce two partial order relations $\lhd_S$ and $\lhd_T$. Let $P = \{1,2,\cdots, n\}$. There is a binary relation $\lhd$ on $P$ given by the disjoint union of the decreasing relations of $S$ and the increasing relations of $T$. Then, it is proved in \cite{pons_chatel} that $(P,\lhd)$ is an interval-poset. Conversely, if $(P,\lhd)$ is an interval-poset of size $n$. Let $D$ be the poset obtained from $P$ by keeping only the decreasing relations of $P$. Similarly let $I$ be the poset obtained by keeping the increasing relations. By Lemma $2.5$ of \cite{pons_chatel}, the Hasse diagrams of these two posets are two forests. If we add a common root to the trees of each of these forests, we obtained two planar trees. Now, we produce binary trees starting from these planar trees. For $I$ we recursively produce a binary tree $T$ by using the rule: right brother becomes right son and son becomes left son. For $D$ we recursively produce a binary tree $S$ by using the rule: left brother becomes left son and son becomes right son. The tree $S$ is smaller than $T$ for the order of the Tamari lattice, so we have an interval $[S,T]$. These two correspondences are sometimes called the \emph{Knuth correspondences} or the \emph{natural correspondences} (see \cite{bruijn_morselt} or \cite{HPGT} for more details). It was proved in Theorem $2.8$ of \cite{pons_chatel} that these two constructions give two bijections inverse of each other. \end{proof} Finally, we need a useful translation in the world of interval-poset of the usual left/right symmetry of trees. \begin{lemma}\label{symmetry} Let $[S,T]$ be an interval in $\operatorname{Tam}_n$ and $P$ be its corresponding interval-poset. The interval-poset corresponding to the interval obtained by taking the left/right symmetry of $S$ and $T$ is the interval-poset $Q$ of size $n$ defined by $a \lhd_Q b \Leftrightarrow n+1 - a \lhd_{P} n+1 - b$. \end{lemma} \section{Exceptional intervals of the Tamari lattice} In \cite{chapoton_mould}, Chapoton introduced an operad $\mathbf{NCP}$ of \emph{noncrossing plants}. A non-crossing plant is a generalization of a noncrossing tree. Since we will not work with them, we refer the reader to the original article for a precise definition. We will only use that noncrossing trees are particular examples of noncrossing plants. It was proved that this operad (in the category of sets) is a sub-operad of $\mathbf{Dend}$, the Dendriform operad. Then, it was proved in \cite{chapoton_etal_mould} that the image of a noncrossing tree in $\mathbf{Dend}$ is of the form $\sum_{t\in I} t$ where $I$ is an interval in the Tamari lattice. An interval that appears as such image of a noncrossing tree is called \emph{exceptional}. In this section, we reprove and precise this result by giving an explicit description of the exceptional intervals of the Tamari lattice in terms of the interval-posets. Since they are in bijection with the noncrossing trees, the number of exceptional intervals in the Tamari lattice of size $n$ is $\frac{1}{2n+1}{{3n}\choose{n}}$. There is another well known family of intervals of the Tamari lattice of this size: it is classical that the Tamari order is a refinement of the usual partial ordering of the noncrossing partitions (see Section $2$ \cite{bernardi_bonichon} for more details). This implies that an interval in the poset of noncrossing partitions gives an interval in the Tamari lattice. By a result of Kreweras (\cite{kreweras}) or a bijection of Edelman (\cite{edelman}), the number of intervals of noncrossing partitions of size $n$ is $\frac{1}{2n+1}{{3n}\choose{n}}$. At the end of this section, we show that this family coincide with the family of exceptional intervals. \subsection{Exceptional intervals and noncrossing trees} A \emph{noncrossing tree} in the regular $n+1$-gon is a set of edges between the vertices of the polygon with the following properties \begin{itemize} \item edges do not cross pairwise, \item any two vertices are connected by a sequence of edges, \item There is no loop made of edges. \end{itemize} The boundary edges are allowed in the set. It is classical that the number of noncrossing trees in the regular $n+1$-gon is $\frac{1}{2n+1}{{3n}\choose{n}}$. Given two noncrossing trees $f$ and $g$ in regular polygons and a side $i$ of the regular gon containing $f$, one can define the composition $f\circ_{i} g$ in the grafting of the polygons containing $f$ and $g$. This is defined as the union of the two trees, with some modifications along the grafting diagonal. If the diagonal is present in both $f$ and $g$, then it is kept in $f\circ_i g$. If it is present in exactly one of the two trees, then it is not kept in $f\circ_i g$. Otherwise, the result is not a noncrossing tree. One `denominator' diagonal is added and the result is a noncrossing plant. See Section $5.2$ of \cite{chapoton_mould} for more details. It was shown in Paragraph $5.1$ of \cite{chapoton_etal_mould} that one can construct a poset from a noncrossing tree. Let us recall this construction. Let $T$ be a noncrossing tree in a \emph{based} regular $n+1$-gon. Here by based we mean that we choose one side of the gon and call it the base. We can label the edges of the $n+1$-gon by assigning the number $0$ to the base, and then assigning the numbers $1$ to $n$ to the edges in a clockwise order. If an edge of $T$ is a boundary edge we assign to it the number of the boundary edge. Otherwise, the label of the edge of the noncrossing tree is the number of the unique open boundary edge that it separates from the base. Then, we set $i \lhd_{T} j$ if the edge $i$ is separated from the base by the edge $j$. An example is given in Figure \ref{fig1}. \begin{figure} \begin{tikzpicture}[scale=1.3] \node [draw, minimum size=5cm,regular polygon,regular polygon sides=12,rotate=180] (a) {}; \foreach {\color{red} n} in {2,3,11,12}{ \pgfmathsetmacro\result{12 - ({\color{red} n} -1)} \node[below] at (a.side {\color{red} n}) {\pgfmathprintnumber{\result}}; } \foreach {\color{red} n} in {5,6,...,9}{ \pgfmathsetmacro\result{12 - ({\color{red} n} -1)} \node[above] at (a.side {\color{red} n}) {\pgfmathprintnumber{\result}}; } \node[left] at (a.side 10) {3}; \node[right] at (a.side 4) {9}; \node[below] at (a.side 1) {0}; \draw[red,very thick] (a.corner 10) -- (a.corner 7); \draw[red,very thick] (a.corner 10) -- (a.corner 9); \draw[red,very thick] (a.corner 10) -- (a.corner 8); \draw[red,very thick] (a.corner 11) -- (a.corner 10); \draw[red,very thick] (a.corner 11) --(a.corner 12); \draw[red,very thick] (a.corner 11) -- (a.corner 3); \draw[red,very thick] (a.corner 3) -- (a.corner 2); \draw[red,very thick] (a.corner 3) -- (a.corner 1); \draw[red,very thick] (a.corner 7) -- (a.corner 4); \draw[red,very thick] (a.corner 4) -- (a.corner 5); \draw[red,very thick] (a.corner 7)-- (a.corner 6); \end{tikzpicture} \begin{tikzpicture}[scale=1.3] \node [draw=none, minimum size=5cm,regular polygon,regular polygon sides=12,rotate=180] (a) {}; \node[left] at (a.side 10) {3}; \node[right] at (a.side 4) {9}; \draw[very thick] (a.corner 10) -- node[below] {6} (a.corner 7); \draw[very thick] (a.corner 10) -- node[left] {4} (a.corner 9); \draw[very thick] (a.corner 10) -- node[above] {5} (a.corner 8); \draw[very thick] (a.corner 11) -- (a.corner 10); \draw[very thick] (a.corner 11) -- node[below] {2} (a.corner 12); \draw[very thick] (a.corner 11) -- node[above] {10} (a.corner 3); \draw[very thick] (a.corner 3) -- node[below] {11} (a.corner 2); \draw[very thick] (a.corner 3) -- node[above] {1} (a.corner 1); \draw[very thick] (a.corner 7) -- node[below] {8} (a.corner 4); \draw[very thick] (a.corner 4) -- (a.corner 5); \draw[very thick] (a.corner 7)-- node[above] {7} (a.corner 6); \end{tikzpicture} \begin{tikzpicture}[scale=1.5] \node (a) at (0,0) {$1$}; \node (b) at (-1,0.75) {$3$}; \node (c) at (0,0.5) {$10$}; \node (d) at (1,0.5) {$2$}; \node (e) at (-0.5,1) {$6$}; \node (f) at (0.5,1) {$8$}; \node (g) at (-0.5,1.5) {$5$}; \node (h) at (0.25,1.5) {$7$}; \node (i) at (0.75,1.5) {$9$}; \node (j) at (-0.5,2) {$4$}; \node (k) at (1.5,0) {$11$}; \draw (c) -- (b) (a) -- (c) -- (e) -- (g) -- (j) (c)--(f)--(h) (f)--(i) (a)--(d); \end{tikzpicture} \caption{On the left, an example of a noncrossing tree in a $12$-gon and on the middle the induced labelling of the noncrossing tree. On the right, the Hasse diagram of the corresponding poset where the maximal elements are $1$ and $11$. }\label{fig1} \end{figure} \begin{lemma}\label{lem1} Let $T$ be a non-crossing tree in a based regular $n+1$-gon. Then, the poset $([1,n],\lhd_{T})$ is an interval-poset. \end{lemma} \begin{proof} We label the boundary edges of a based regular $n+1$-gon as above. We use the notation $[i_1,i_2]$ where $i_1 \leqslant i_2$ for the edge that goes from the left side of the boundary edge $i_1$ to the right side of the boundary edge $i_2$. For example, in Figure \ref{fig1}, the edge with label $6$ corresponds to $[4,6]$ and the edge labelled by $4$ corresponds to $[4,4]$. Note that by construction of our labelling, the edge $[i_1,i_2]$ labelled by the number $i$ separates the boundary edge $i$ of the regular $n+1$-gon from the base. In particular this implies that $1\leqslant i_1 \leqslant i$ and $i\leqslant i_2 \leqslant n$. We want to check that the poset $(P_T,\lhd)$ is an interval poset. Let $0<i < j < k \leqslant n$ such that $i\lhd k$. This means that the edge $[i_1,i_2]$ labelled by $i$ is separated from the base by the edge $[k_1,k_2]$ labelled by $k$. Since, $k$ separates $i$ from the base and $T$ is a noncrossing tree, it is easy to check that the only possibility is to have $$ k_1 \leqslant i_1 \leqslant i \leqslant i_2 \leqslant k \leqslant k_2. $$ Now, the boundary edge $j$ is between $i$ and $k$, so either it is before $i_2$ or after. Since $T$ is a noncrossing tree the edge $j$ cannot cross the edges $i$ and $k$. So it is easy to see that in the first case $k$ and $i$ separate $j$ from the base, and in the second case $k$ separates $j$ from the base. In particular, we have $j \lhd k$. See Figure \ref{fig2} for an illustration where the letter $j$ is used for the first case and the letter $J$ for the second. The case where $k\lhd i$ is similar and is illustrated in the right part of Figure \ref{fig2}. \end{proof} \begin{figure} \centering \begin{tikzpicture}[scale=2] \node [draw, minimum size=5cm,regular polygon,regular polygon sides=18] (a) {}; \node[below] at (a.side 10) {$0$}; \node[below] at (a.side 8) {$k_1$}; \node[left] at (a.side 5) {$i$}; \node[left] at (a.side 6) {$i_1$}; \node[above] at (a.side 18) {$i_2$}; \draw[very thick] (a.corner 7) -- node[above] {i} (a.corner 18); \node[right] at (a.side 14) {$k$}; \node[below] at (a.side 13) {$k_2$}; \draw[very thick] (a.corner 9) -- node[above] {k} (a.corner 13); \node[above] at (a.side 3) {$j$}; \draw[thick, red] (a.corner 1) -- node[above]{j} (a.corner 5); \node[right] at (a.side 16) {$J$}; \draw[thick, dashed, blue] (a.corner 18) -- node[left]{J} (a.corner 14); \end{tikzpicture} \begin{tikzpicture}[scale=2] \node [draw, minimum size=5cm,regular polygon,regular polygon sides=18] (a) {}; \node[below] at (a.side 10) {$0$}; \node[left] at (a.side 5) {$i$}; \node[left] at (a.side 6) {$i_1$}; \node[right] at (a.side 14) {$k$}; \node[below] at (a.side 11) {$i_2$}; \draw[very thick] (a.corner 7) -- node[above] {i} (a.corner 11); \node[right] at (a.side 13) {$k_2$}; \node[above] at (a.side 18) {$k_1$}; \draw[very thick] (a.corner 1) -- node[left] {k} (a.corner 13); \node[right] at (a.side 16) {$J$}; \draw[thick, dashed, blue] (a.corner 18) -- node[left]{J} (a.corner 14); \node[above] at (a.side 3) {$j$}; \draw[thick, red] (a.corner 2) -- node[above]{j} (a.corner 6); \end{tikzpicture} \caption{One the left the case $i<j<k$ and $i\lhd k$. On the right $i<j<k$ and $k \lhd i$.}\label{fig2} \end{figure} \begin{lemma} Let $T$ be a non-crossing tree in a based regular $n+1$-gon. Then the Hasse diagram of the interval-poset $([1,n],\lhd_{T})$ does not contain any configuration of the form $y\to z$ and $y\to x$ where $x<y<z$. \end{lemma} \begin{proof} Let us assume that we have integers $x < y < z$ such that $y\lhd x$ and $y \lhd z$. This means that the edge $x = [x_1,x_2]$ separates $y = [y_1,y_2]$ from the base. As in the proof of Lemma \ref{lem1}, this implies that $$ x_1 \leqslant y_1 \leqslant y_2 \leqslant x_2.$$ Similarly, the edge $z = [z_1,z_2]$ separates $y$ from the base, so we have $$ z_1 \leqslant y_1 \leqslant y_2 \leqslant z_2.$$ Since $T$ is a non-crossing tree, if $x_1 \leqslant z_1$, then necessarily $x_2 \geqslant z_2$. In this case the edge $x$ separates the edge $z$ from the base and we have $z \lhd x$. If $z_1 \leqslant x_1$, then $x_2 \leqslant z_2$ and we have $x\lhd z$. In both cases, we see that one of two relations $y \lhd x$ and $y\lhd z$ is not a cover relation. In particular the configuration $y\to z$ and $y\to x$ does not appear in the Hasse diagram of the poset. \end{proof} \begin{definition}\label{exc} An interval-poset whose Hasse diagram does not contain any configuration of the form $y\to z$ and $y\to x$ where $x<y<z$ is called an \emph{exceptional} interval-poset. \end{definition} If $(P,\lhd)$ is an interval-poset over the integers $[1,n]$ we can construct a graph $G_P$ in a \emph{based} regular $n+1$-gon by using the following procedure which is nothing but a reformulation in terms of interval-posets of the construction explained in Section $5.1$ of \cite{chapoton_etal_mould}. Let us start by labelling the boundary edges of the polygon as above. Then for an integer $v$ consider the poset $\{ x\in [1,n]\ ;\ x\lhd v\}$. This poset has a minimal element (for the usual order relation $<$) $v_1$ and a maximal element $v_2$. We associate to $v$ the edge in the polygon from the left side of $v_1$ to the right side of $v_2$. \begin{lemma}\label{lem2} If $(P,\lhd)$ is an exceptional interval-poset on the integers $[1,n]$, then the graph $G_P$ is a noncrossing tree. \end{lemma} \begin{proof} Let $(P,\lhd)$ be an exceptional interval-poset. If $k$ is a maximal element of $P$ (for the relation $\lhd$), then the set $I_k := \{ i \in P\ ;\ i\lhd k\}$ is an interval because $P$ is an interval-poset. Moreover, if $k$ and $k'$ are two maximal elements of $P$, then the intervals $I_k$ and $I_k'$ are disjoint. Indeed, let $z\in P$ such that $z\lhd k$ and $z\lhd k'$. We can assume that $k\leqslant k'$. If $z \leqslant k \leqslant k'$, then the interval-poset condition implies that $k\lhd k'$ and by maximality $k=k'$. Similarly, if $k\leqslant k' \leqslant z$, the interval-poset condition implies that $k' \lhd k$ and by maximality, we have $k=k'$. Now, if $k < z <k'$, by maximality of $k$ and $k'$, we have a configuration of the form $z \to k$ and $z\to k'$ in the Hasse diagram. This is not possible since the interval poset $P$ is exceptional. In other words, the exceptional interval-posets are nothing but the \emph{non-interleaving forests} introduced in Section $5.1$ of \cite{chapoton_etal_mould}. In particular, the result is a direct consequence of Lemma $5.2$ \cite{chapoton_etal_mould}. We sketch it for the convenience of the reader. It is easy to see that the poset $P$ has a unique maximal element if and only if the base of the polygon is in the graph $G_P$. In this case, we say that $G_P$ is based. The interval-poset $P$ is disjoint union of $s$ interval-posets $I_{k_1},\cdots, I_{k_n}$ where $k_i$ runs through the maximal elements of $P$. If there is more than one maximal element, by induction on the size of the poset we have that the graph $G_{I_{k_i}}$ is a based noncrossing tree. Now, it is easy to see that the graph $G_P$ is obtained by gluing the base of all the noncrossing trees $G_{I_{k_i}}$ on the boundary of a regular $s+1$-gon. More formally, in terms of NCP-operads, we have $G_p = S \circ_{1} G_{I_{k_1}} \circ_{2} \cdots \circ_{s} G_{I_{k_s}}$, where $S$ is the noncrossing tree with $s$ edges consisting of all boundary edges of the regular $s+1$-gon, except for the base. If there is only one maximal element $m$ in $P$, then $G_P$ is based. The case where $P$ has only two elements is elementary and can be checked by listing all the possible cases. If $|P|\geqslant 3$, let $P_{1} = \{ i \in P\ ;\ i < m \}$ and $P_{2} = \{ i \in P\ ;\ m < i\}$. Clearly $P_1$ and $P_2$ are two disjoint interval-posets of size smaller than $|P|$. By induction, the graphs $I_{P_1}$ and $I_{P_2}$ are noncrossing trees. Let $U$ be the noncrossing tree in a based square consisting of all the base and the two adjacent boundary edges. It is now easy to see that $G_P = (U\circ_1 I_{P_1}) \circ_3 I_{P_2}$. In particular, $G_P$ is a noncrossing tree. \end{proof} \begin{proposition} The map sending a noncrossing tree $T$ to the interval-poset $P_T$ and the map sending an exceptional interval-poset $P$ to the noncrossing tree $T_P$ are two bijections inverse from each other between the set of noncrossing trees in a based regular $n+1$-gon and the set of exceptional interval-posets of size $n$. \end{proposition} \begin{proof} The result is proved by induction. The cases $n=0,1$ and $2$ can be easily checked by hand. Let $n\geqslant 3$. If $T$ is a noncrossing tree, we denote by $P_T$ the exceptional interval-poset obtained in Lemma \ref{lem1}. If $P$ is an exceptional interval-poset, we denote by $T_P$, the noncrossing tree obtained in Lemma \ref{lem2}. Let $S$ be the noncrossing tree with $s$ edges consisting of all boundary edges of the regular $s+1$-gon, except for the base. Let $T_1,\cdots, T_s$ be $s$ based noncrossing trees. Let $T = S \circ_1 T_1\circ_2 \cdots \circ_s T_s$. The edges of $T_i$ (viewed as edges in $T$) are separated from the base by the base of $T_i$, and the edges of $T_i$ are not separated from the base by any edge of $T_j$ for $i\neq j$. This implies that $P_T$ is the disjoint union of the posets $P_{T_i}$ and all these posets have a unique maximal element. If the poset $P$ has more than one maximal element, we have $P = P_1 \sqcup \cdots \sqcup P_s$ where $P_i$ is the set of elements smaller than the $i$-th maximal element. By the proof of Lemma \ref{lem2}, the corresponding noncrossing tree $T_P$ is of the form $S\circ_{1} I_{P_1}\circ_{2} \cdots \circ_{s} I_{P_s}$. By the remark above, the poset corresponding to the tree $T_P$ is $P_{I_{P_1}} \sqcup \cdots \sqcup P_{I_{P_s}}$. Now, by induction we have that $P_{T_{P}} = P$. Similarly, if the tree $T$ is not based, it can be written as $S \circ_1 T_1\circ_2 \cdots \circ_s T_s$ where $T_i$ are based noncrossing trees. So, we have $P_{T} = P_{T_1} \sqcup \cdots \sqcup P_{T_s}$, and $T_{P_{T}} = S \circ_1 T_{P_{T_1}} \circ_2 \cdots \circ_s T_{P_{T_s}}$. One more time, an induction gives the result. Let $U$ be the noncrossing tree in a based square consisting of the base and the two adjacent boundary edges. If $T$ is a based noncrossing tree, there are two noncrossing trees $T_1$ and $T_2$ such that $T = U\circ_1 T_1 \circ_3 T_2$. It is easy to see that the poset $P_T$ is of the form $P_1 \sqcup \{m\} \sqcup P_2$, where $m$ is the labelling of the base of $T$, $P_1$ is the subset consisting of the elements smaller (for $<$) than $m$ and $P_2$ is the set of elements bigger than $m$. Since $m$ is the label of the basis it is the unique maximal element of $P_T$. Using this decomposition of based noncrossing trees, and exceptional interval-posets with a unique maximal element, it is easy to prove by induction that $T_{P_T} = T$ and $P_{T_{P}} = P$. \end{proof} By Theorem $5.3$ \cite{chapoton_mould} there is an injective morphism of operads (in the category of sets) $\Theta$ from the operad of noncrossing plants $\mathbf{NCP}$ and the dendriform operad $\mathbf{Dend}$. Using exceptional interval-posets we describe the image of a noncrossing tree by $\Theta$. \begin{theorem}\label{image_noncrossing} Let $T$ be a noncrossing tree. Let the image of $T$ in $\mathbf{Dend}$ be $\sum_{t\in I} t$. Then the set of trees $I$ is the interval of the Tamari lattice corresponding to the exceptional interval-poset $P_T$. \end{theorem} \begin{proof} Since exceptional interval-posets are the same as non-interleaving forests, the result follows from a reformulation of Section $5.1$ of \cite{chapoton_etal_mould} and a description of interval-posets in terms of linear extension due to Châtel and Pons. We sketch the arguments. Let $\phi : \mathbf{NCP} \to \mathbf{Mould}$ be the injection defined in Section $5.2$ \cite{chapoton_mould} or in $5.2$ \cite{chapoton_etal_mould}. Let $\psi : \mathbf{Dend} \to \mathbf{Mould}$ be the injection defined in Theorem $3.1$ of \cite{chapoton_mould}. By Lemma $5.3$ \cite{chapoton_etal_mould}. Since the maps $\Theta$, $\phi$ and $\psi$ are morphisms of operads and since the diagram is commutative on the elements of $\mathbf{NCP}(2)$, the following diagram is commutative. \[ \xymatrix{ \mathbf{NCP}\ar[rd]^{\phi}\ar[rr]^{\Theta} & & \mathbf{Dend} \ar[dl]_{\psi} \\ & \mathbf{Mould} } \] Moreover, all the morphisms are injective. Let $T$ be a noncrossing tree. By lemma $5.3$ of \cite{chapoton_etal_mould}, we have $\phi(T) = \sum_{\sigma \in L(P_T)} f_{\sigma}$ where $P_T$ is the exceptional interval-poset that corresponds to $P$ and $L(P_T)$ is the set of all linear extensions of $P_T$ and if $\sigma \in S_n$, then $f_{\sigma}$ is the fraction defined by \[ f_{\sigma}(u_1,\cdots, u_n) = \frac{1}{u_{\sigma(1)} \cdot (u_{\sigma(1)} + u_{\sigma(2)} ) \cdot \cdots \cdot (u_{\sigma(1)} + \cdots + u_{\sigma(n)})}. \] For $\sigma,\sigma' \in S_n$ the multi-residue $\oint_{\sigma}$ (see Proposition $3.3$ \cite{chapoton_mould}) have the property that $\oint_{\sigma} f_{\sigma'} \neq 0$ if and only if $\sigma = \sigma'$. So for $\sigma \in S_{n}$, we have $\oint_{\sigma} \phi(P_T) \neq 0$ if and only if $\sigma$ is a linear extension of $P_T$. On the other hands, by Proposition $3.3$ of \cite{chapoton_mould}, if $T$ is a binary tree, we have $\oint_{\sigma} \psi(T) \neq 0$ if and only if $\sigma$ is a linear extension of the poset induced by the tree $T$. As consequence, $I$ is the set of trees whose linear extensions are exactly the linear extensions of $P_T$. Now, by Theorem $2.8$ of \cite{pons_chatel}, this implies that $I$ is an interval of the Tamari lattice, and that $P_T$ is the interval-poset corresponding to $I$. \end{proof} \subsection{Noncrossing partitions} A partition $(b_1,\cdots,b_n)$ of $\{1,\cdots, n\}$ is \emph{noncrossing} if there do not exist $1\leqslant i < j < k < l \leqslant n$ such that $i,k \in b_s$ and $j,l \in b_t$ for $s\neq t$. Let $\operatorname{NC}_n$ be the set of all noncrossing partitions of $\{1,\cdots, n\}$. It is well-known that the cardinality of this set is the Catalan number $c_n$. The refinement of partitions induces a structure of partial order on $\operatorname{NC}_n$ which is known to be a lattice (see \cite{kreweras} for more details). It is also classical that the Tamari lattice is a refinement of the poset of noncrossing partitions. In general, it is convenient to realize these posets on the set of Dyck paths via well chosen bijections in order to compare them (see Section $2$ of \cite{bernardi_bonichon} for more details). Here, in order to simplify the proofs, we will realize the poset of noncrossing partions on the Tamari lattice, using a bijection similar to a bijection introduced by Edelman \cite{edelman}. If $T$ is a (planar) binary tree, we can view it as a binary search tree using the in-order algorithm (this is why our bijection is not the same as Edelman's bijection: he labelled the trees with the pre-order traversal). Then, the partition $\pi_T$ associated to the tree $T$ is the finest partition of $\{1,2,\cdots, n\}$ such that if $j$ is right child of $i$, then $i$ and $j$ are in the same block. For example, the partition corresponding to the binary tree of Figure \ref{fig_inorder} is $\{1,3,4\}, \{2\}, \{5,8\}, \{6,7\}$. \begin{lemma} Let $T$ be a binary tree and $\pi_T$ its corresponding partition. Then, $\pi_T$ is a noncrossing partition. \end{lemma} \begin{proof} Let $i< j < k < l$ such that $i,k$ are in a block $b_1$ and $j,l$ are in a block $b_2$. The vertex of $T$ labelled by $k$ is a right descendant of the vertex labelled by $i$. Since the in-order algorithm goes first through left subtree, then it visits the root and finally goes through right subtree the vertex $j$ is in the right subtree of $i$. Since $l$ and $i$ are in the same block, the vertex $l$ is right-descendant of $i$. Since $k<l$, the vertex $k$ is in the right subtree of $j$. The only possibility is that $j,k$ and $l$ are right descendants of $i$. So, they are in the same block. \end{proof} Conversely, if $\pi = (b_1,\cdots, b_n)$ is a noncrossing partition of $\{1,\cdots, n\}$ we will construct a binary search tree associated to this partition. We assume that the blocks of the partition are totally ordered in such a way that $\min(b_1) < \min(b_2) <\cdots < \min(b_n)$ and the elements of the blocks are ordered by the natural order of the integers. The tree $T_\pi$ is constructed in two steps: \begin{enumerate} \item To each block $b_i$ is associated a binary tree $T_i$ with root $\min(b_i)$ and if $y$ is the successor of $x$ in the block $b_i$ then, $y$ is the right son of $x$. \item Then, if $T_i$ is a tree constructed in the first step, let $m_i$ be the vertex with maximal labelling in the tree. We construct inductively a tree $T_\pi$ by grafting the root of $T_i$ as the left son of the vertex labelled by $m_i + 1$. For an example see Figure \ref{bij_ncp}. \end{enumerate} \begin{figure}[h] \centering \begin{tikzpicture}[scale =0.5] \node (1) at (-4,4) {1}; \node (2) at (-3,4) {2}; \node (3) at (-2,4) {3}; \node (4) at (-1,4) {4}; \node (5) at (0,4) {5}; \node (6) at (1,4) {6}; \node (7) at (2,4) {7}; \node (8) at (3,4) {8}; \draw[blue,thick] (2.north) to [out=140,in=50] (1.north); \draw[blue,thick] (4.north) to [out=100,in=80] (3.north); \draw[blue,thick] (7.north) to [out=135,in=45] (2.north); \draw[blue,thick] (6.north) to [out=100,in=80] (5.north); \end{tikzpicture} \begin{tikzpicture} \node (1) at (2,0) {1}; \node (2) at (2.5,0.5) {2} ; \node (7) at (3,1) {7}; \node (3) at (0,1) {3}; \node (4) at (0.5,1.5) {4}; \node (5) at (1,0.5) {5}; \node (6) at (1.5,1) {6}; \node (8) at (3.5,-1) {8}; \draw (1)--(2)--(7) (3)--(4) (5)--(6); \draw[red,->] (1.south) to [out=-45,in=135] (8.west); \draw[red,->] (3.south) to [out = -45, in= 135] (5.west); \draw[red, ->] (5.south) to [out = -45, in = 135] (7.west); \end{tikzpicture} \begin{tikzpicture}[scale =0.8] \node (a) at (0,0) {8}; \node (c) at (-1,3) {3}; \node (b) at (-0.5,0.5) {1}; \node (d) at (0,1) {2}; \node (e) at (-0.5, 3.5) {4}; \node (f) at (0, 2) {5}; \node (g) at (1.5,3.5) {6} ; \node (h) at (0.5,1.5) {7}; \node (1) at (-4,4) {}; \node (2) at (-3,4) {}; \node (3) at (-2,4) {}; \node (4) at (-1,4) {}; \node (5) at (0,4) {}; \node (6) at (1,4) {}; \node (7) at (2,4) {}; \node (8) at (3,4) {}; \node (9) at (4,4) {}; \draw (a)--(b)--(1) (b)--(d)--(h)--(8) (a)--(9) (d)--(2) (h)--(f)--(c)--(3) (f)--(g)--(7) (g)--(6) (c)--(e)--(5) (e)--(4); \end{tikzpicture} \caption{An example of the two steps of the construction of a binary tree associated to a noncrossing partition.}\label{bij_ncp} \end{figure} \begin{lemma} Let $\pi$ be a noncrossing partition of $\{1,\cdots,n\}$ and $T_\pi$ the corresponding binary tree. Then, $T_\pi$ is a binary search tree. \end{lemma} \begin{proof} Let $s$ be the label of a vertex. If $x$ is a right descendant of $s$, then by construction $s$ and $x$ are in the same block and we have $s < x$. If $y$ is the left son of $x$, then the maximal element of the block of $y$ is $x-1$. This implies that the elements $z$ of the block of $y$ are such that $s<z<x$ because, $s$ and $x$ are in the same block of $y$ and $x-1$ are in the same block, and the partitions are noncrossing. Using these remarks, it is easy to check that if $z$ is in the right subtree of $s$, then $s < z$. Similarly, it is easy to check that the elements of the left subtree of $s$ are labeled by integers strictly smaller than $s$. \end{proof} \begin{proposition} The map sending a binary tree $T$ to the noncrossing partition $\pi_T$ and the map sending a partition $\pi$ to the binary tree $T_\pi$ are two bijections inverse from each other. \end{proposition} \begin{proof} By construction of the tree $T$, the minimal elements of the blocks are the vertices that are left son of another vertex (i.e. they have a right father) and their left descendants are the elements of their block. So, the partition $\pi_{T_\pi}$is equal to $\pi$. Since, there is a unique way to turn a binary tree into a binary search tree of size $n$ using exactly once each of the integers $1,2,\cdots, n$, we have $T_{\pi_T} = T$. \end{proof} We can now be more precise about the fact that the Tamari lattice is a refinement of the lattice of noncrossing partitions. \begin{lemma}\label{refinement} Let $\pi_1$ and $\pi_2$ be two noncrossing partitions of $\{1,2,\cdots, n\}$. If $\pi_1 \leqslant \pi_2$ in the poset of noncrossing partitions, then $T_{\pi_{1}} \leqslant T_{\pi_{2}}$ in the Tamari lattice. \end{lemma} \begin{proof} Using Proposition \ref{char_tamari}, it is enough to show that the decreasing relations of $T_{\pi_1}$ are decreasing relations of $T_{\pi_2}$. Let $i < j$ such that $j\lhd _{T_{\pi_1}} i$. That is $j$ is in the subtree with root $i$. Since $i<j$, this implies that $j$ is in the right subtree of $i$. Let $x$ be the right descendant of $i$ such that $j$ is in its left subtree (if $j$ is a right descendant of $i$, we have $x=j$). Since the tree $T_{\pi_1}$ is a binary seach tree, this implies that $i< j < x$. Moreover, by construction of $T_{\pi_1}$, the elements $i$ and $x$ are in the same block. Since, the partial order relation for noncrossing partitions is given by merging blocks, in the partition $\pi_2$ the elements $i$ and $x$ are also in the same block. In other words, the element $x$ is in the right subtree of $i$ in $T_{\pi_2}$. Since $i < j < x$, this implies that $j$ is also in the right subtree of $i$, so we have $j \lhd_{T_{\pi_2}} i$. \end{proof} We can now characterize the intervals of the Tamari lattice that come from intervals in the lattice of noncrossing partitions. \begin{theorem}\label{theo_nc} Let $n \in \mathbb{N}$. Let $I$ be an interval of the Tamari lattice $\operatorname{Tam}_n$. Then, there is an interval of noncrossing partitions $[\pi_1,\pi_2]$ such that $I = [T_{\pi_1},T_{\pi_2}]$ if and only if the interval-poset corresponding to $I$ is exceptional. \end{theorem} \begin{proof} Let $\pi_1 \leqslant \pi_2$ be two noncrossing partitions. Let $I = [T_{\pi_1},T_{\pi_2}]$ be the corresponding interval in $\operatorname{Tam}_n$ and $P$ be the corresponding interval-poset. Let $x < y < z$ such that we have a relation $y \lhd x$ and $y\lhd z$. First assume that $y \lhd x$ is a cover relation. We will show that this imply the existence of a relation $x\lhd z$. This last relation implies that $y\lhd z$ is not a cover relation. We can assume that $y$ is the maximal element such that $y\lhd x$ is a cover relation and $y \lhd z$. Let $t \lhd x$ be a cover relation. If $z \leqslant t$, then by the interval-poset condition we have a relation $z\lhd x$ and the relation $y\lhd x$ becomes the composite of $y \lhd z$ and $z\lhd x$ contradicting the hypothesis. So the maximal element $t$ with a cover relation $t\lhd x$ is an element of $[y,z[$. By the interval-poset condition, we have $t\lhd x$, so by maximality we have $t = y$. In other terms, in the decreasing forest of $P$, the element $y$ is the right most child of $x$. So, using the bijection of Theorem \ref{bij} we see that $y$ is the right son of $x$ in the tree $T_{\pi_1}$. In terms of noncrossing partitions, this means that $y$ is the successor of $x$ in its block. Since the partial order relation for the noncrossing partitions is given by merging of blocks, we see that $y$ is still in the block of $x$ in $\pi_2$. This implies that $y$ is also in the right subtree of $x$ in $T_{\pi_2}$. In the increasing forest of $P$ we have the relation $y \lhd z$ which means that $y$ is in the left subtree of $z$. Since $y$ is a right descendant of $x$, this implies that $x$ is in the right subtree of $z$. Using one more time the bijection of Theorem \ref{bij}, we have an increasing relation $x\lhd z$. We only sketch the proof when $y\lhd z$ is a cover relation. We can assume $y$ to be minimal for this property. This implies that $y$ is the most left child of $z$ in the increasing forest of $P$. So $y$ is the left son of $z$ in $T_{\pi_2}$. By the argument of Lemma \ref{refinement}, an increasing relation of $T_{\pi_2}$ is also an increasing relation of $T_{\pi_1}$. In particular, $y$ is in the left subtree of $z$ in $T_{\pi_1}$. The relation $y \lhd x$ in $P$ implies that $y$ is in the right subtree of $x$. Since it is also in the left subtree of $z$, this implies that $z$ is in the right subtree of $x$. So we have the relation $z \lhd x$ in $P$. We just proved that the interval-posets of the intervals of the Tamari lattice coming from intervals of non-crossing partitions are exceptional. The result follows from the fact that the number of exceptional interval-posets is the number of intervals in the poset of noncrossing partitions. \end{proof} \section{New intervals and modern interval-posets} In this section we introduce the notion of \emph{modern} interval-posets and we show that the modern interval-posets of size $n$ are in bijection with the new intervals of $\operatorname{Tam}_{n+1}$. Note that there is a shifting of the size by $1$. \subsection{New intervals of the Tamari lattice} From now on, we will always assume that the leaves of the binary trees of $\operatorname{Tam}_n$ are labeled from left to right by the integers $1,2,\cdots, n+1$. Let $T \in \operatorname{Tam}_n$ and $S\in \operatorname{Tam}_k$. Let $1\leqslant i \leqslant n+1$. The binary tree $T\circ_i S$ is the tree of size $k+n$ obtained by grafting the root of $S$ on the $i$-th leaf of $T$. If $[S_1,T_1]$ is an interval of $\operatorname{Tam}_n$ and $[S_2,T_2]$ is an interval of $\operatorname{Tam}_k$, and $1\leqslant i \leqslant n+1$, then the tree $S_1\circ_i S_2$ is smaller than $T_1\circ_i T_2$. We say that the interval $[S_1 \circ_i S_2,T_1\circ_i T_2]$ is the $i$-th grafting of $[S_2,T_2]$ on $[S_1,T_1]$, and we denote it by $[S_1,T_1] \circ_i [S_2,T_2]$. \begin{definition} An interval of $\operatorname{Tam}_n$ is called \emph{new} if it cannot be obtained as the grafting of two intervals. \end{definition} The new intervals were introduced by Chapoton in \cite{chapoton_interval}. \begin{lemma}[Chapoton]\label{not_new} An interval $[S,T]$ of $\operatorname{Tam}_n$ is new if and only if there is no pair of subtrees $(A,B)$ of $S$ and $T$ whose leaves are labelled by the same interval $[i,j]\neq [1,n+1]$. \end{lemma} \begin{proof} If there is a subtree $A$ of $S$ whose leaves are labelled by $[i,j]$ and a subtree $B$ of $T$ whose leaves are also labelled by $[i,j]$, then $S$ is of the form $S_1 \circ_i A$ and $T$ is of the form $T_1 \circ_i B$, so the interval is not new. Conversely, if the interval is not new, then $[S,T] = [S_1,T_1] \circ_i [A,B]$. So there is a pair of subtrees $(A,B)$ of $S$ and $T$ whose leaves are labelled by the same interval $[i,i+\mathrm{size}(S)]$. \end{proof} With this criterion, it is easy to see that the new intervals of $\operatorname{Tam}_n$ have a \emph{nice shape}. \begin{lemma}\label{new_shape} Let $n\leqslant 1$. Let $[S,T]$ be a new interval of $\operatorname{Tam}_n$. Then, there are two binary trees $S_1$ and $T_1$ in $\operatorname{Tam}_{n-1}$ such that $S = Y\circ_1 S_1$ and $T = Y\circ_2 T_1$ where $Y$ is the unique binary tree of size $1$. \end{lemma} \begin{proof} The covering relation for the Tamari lattice is the left rotation. So if there is a vertex on the right side of $S$, it will be fixed by any left rotation, so it will also appear at the same place in the tree $T$. Similarly, if there is a vertex on the left side of $T$ it must also be at the same place in $S$. So the subtrees with root $s$ have the same interval of leaves. Using Lemma \ref{not_new}, we see that the interval $[S,T]$ is not new in both cases. \end{proof} However, it is easy to see that there are some intervals with this nice shape but which are not new. We will characterize the new intervals in this family in Theorem \ref{new_chara}. \subsection{Rising and falling interval-posets} \begin{definition}\label{def_modern} Let $n \in \mathbb{N}$. An interval-poset of size $n$ is modern if it does not contain any configuration of the form $x\lhd y$ and $z\lhd y$ with $x < y < z$. \end{definition} Let us remark that unlike Definition \ref{exc}, the forbidden configuration here involves \emph{all the relations} and not only the relations in the Hasse diagram of the poset. Let us introduce the \emph{rise} of a set with a reflexive binary relation\footnote{The rise of an interval-poset needs not to be an interval-poset, so in order to be able to take successive rises we need a more general setting.}. If $P = \{1,2,\cdots, n\}$ is a set with a reflexive binary relation $\lhd$, then $(\operatorname{Ri}(P),\lhd_R)$ is the set $\{1,2,\cdots, n+1\}$ with the binary relation $\lhd_R$ defined by keeping all decreasing relations of $P$ and shifting by $1$ all the increasing relations of $P$. More precisely, the relation $\lhd_R$ is reflexive and for $x<y \leqslant n$, we have $ y \lhd_R x $ if and only if $y\lhd x$. For $1 < x < y \leqslant n+1$ we have $x\lhd_R y$ if and only if $x-1 \lhd y-1$. For an example, see Figure \ref{ex_rise}. \begin{figure}[h] \begin{tabular}{ccc} \begin{tikzpicture} \node (1) at (0,0) {1}; \node (2) at (1,0) {2}; \node (3) at (2,0) {3}; \draw[blue,thick,->] (2.north) to [out=140,in=50] (1.north); \draw[red,->,below, thick] (2.south) to [out=-45,in=225] (3.south); \end{tikzpicture} & \begin{tikzpicture} \node (1) at (-1,1) {} ; \node (2) at (0,1) {}; \node (3) at (1,1) {} ; \node (4) at (2,1) {}; \node (5) at (0.5,-0.5) {$\bullet$}; \node (6) at (0,0) {$\bullet$}; \node (7) at (0.5,0.5) {$\bullet$}; \draw (1)--(6)--(5)--(4) (6)--(7)--(2) (7)--(3); \end{tikzpicture} & \begin{tikzpicture} \node (1) at (-1,1) {} ; \node (2) at (0,1) {}; \node (3) at (1,1) {} ; \node (4) at (2,1) {}; \node (5) at (0.5,-0.5) {$\bullet$}; \node (6) at (1,0) {$\bullet$}; \node (7) at (0.5,0.5) {$\bullet$}; \draw (1)--(5)--(6)--(4) (6)--(7)--(2) (7)--(3); \end{tikzpicture} \\ \begin{tikzpicture} \node (1) at (0,0) {1}; \node (2) at (1,0) {2}; \node (3) at (2,0) {3}; \node (4) at (3,0) {4}; \draw[blue,thick,->] (2.north) to [out=140,in=50] (1.north); \draw[red,->,below, thick] (3.south) to [out=-45,in=225] (4.south); \end{tikzpicture} & \begin{tikzpicture} \node (1) at (-2,1) {} ; \node (2) at (-1,1) {}; \node (3) at (0,1) {} ; \node (4) at (1,1) {}; \node (5) at (2,1) {}; \node (r) at (0,-1) {$\bullet$}; \node (a) at (-0.5,-0.5) {$\bullet$}; \node (b) at (-1,0) {$\bullet$}; \node (c) at (-0.5,0.5) {$\bullet$}; \draw (1)--(b)--(a)--(r)--(5) (b)--(c)--(3) (c)--(2) (a)--(4); \end{tikzpicture} & \begin{tikzpicture} \node (1) at (-2,1) {} ; \node (2) at (-1,1) {}; \node (3) at (0,1) {} ; \node (4) at (1,1) {}; \node (5) at (2,1) {}; \node (r) at (0,-1) {$\bullet$}; \node (a) at (0.5,-0.5) {$\bullet$}; \node (b) at (1,0) {$\bullet$}; \node (c) at (0.5,0.5) {$\bullet$}; \draw (1)--(r)--(a)--(b)--(5) (b)--(c)--(4) (c)--(3) (a)--(2); \end{tikzpicture} \end{tabular} \caption{One the top an interval-poset of size $3$ and its corresponding interval of $\operatorname{Tam}_3$. On the bottow, the rise of this interval-poset and the corresponding interval of $\operatorname{Tam}_4$.}\label{ex_rise} \end{figure} \begin{lemma}\label{montee} Let $(P,\lhd)$ be an interval-poset of size $n$. Then, the rise of $P$ is an interval-poset if and only if $P$ is modern. \end{lemma} \begin{proof} Since the rising operation only shifts the increasing relations of $P$, it is clear that the relation $\lhd_R$ satisfies the two conditions of interval-poset. If the interval-poset $P$ is not modern, there is a configuration of the form $x\lhd y$ and $z\lhd y$ with $x < y < z$. The condition of interval-poset implies the existence of the two relations $y-1 \lhd y$ and $y+1\lhd y$. It is clear that the rise of $P$ is not a poset since we have $y\lhd_R y+1$ and $y+1 \lhd_R y$. If the interval-poset $P$ is modern, we need to see that $\operatorname{Ri}(P)$ is a poset. If we have in $\operatorname{Ri}(P)$ two elements $x<y$ such that $x\lhd_R y$ and $y\lhd_R x$. Then, in $P$ we have $y\lhd x$ and $x-1 \lhd y-1$. Since $x-1 < x \leqslant y-1$, the condition of interval-poset of $P$ implies that we have a relation $x \lhd y-1$. Similarly since $x\leqslant y-1 < y$, the interval-poset condition implies that we have a relation $y-1 \lhd x$. Since $P$ is a poset, we have $x = y-1$, and we see that the relations $x\lhd_R y$ and $y\lhd_R x$ come from the relations $y-2 \lhd y-1$ and $y \lhd y-1$ in $P$. In other words, the interval-poset $P$ is not modern. Let us assume that $\operatorname{Ri}(P)$ contains two relations $x\lhd_R y$ and $y\lhd_R z$ but does not contain the relation $x \lhd_R z$. Since increasing relations and decreasing relations come from $P$, it is clear that such a situation implies that one of the two relations is increasing, and the second one is decreasing. If the relation $x \lhd_R y$ is increasing, there are two possibilities: either $z$ is before $x$, or $z$ is between $x$ and $y$. If $z$ is before $x$ the relation $y\lhd_R z$ and the interval-poset condition imply the existence of a relation $x\lhd_R z$. Otherwise, the interval-poset condition implies the existence of a relation $z \lhd_R y$, which by the argument above implies that $P$ is not modern. The case where $x\lhd_R y$ is decreasing is similar. \end{proof} \begin{definition}\label{new_ip} An interval-poset $P$ of size $n$ is called \emph{new} if it has no increasing relation starting at $1$, no decreasing relation starting at $n$ and no relations of the form $i+1 \lhd_P j+1$ and $j\lhd_P i$ for $i < j$. \end{definition} Let us define the \emph{fall} of an interval poset $(P,\lhd)$ of size $n$ with no increasing relation starting at $1$ and no decreasing relation starting at $n$. This is the poset $(\operatorname{Fa}(P),\lhd_F)$ where $\operatorname{Fa}(P)$ is the set $\{1,2,\cdots, n-1\}$ and the relation $\lhd_F$ is the relation obtained by keeping the decreasing relations and shifting by $-1$ the increasing relations. More precisely, $\lhd_F$ is reflexive and for $x<y$, we have $y\lhd_F x$ if and only if $y\lhd x$ and $x \lhd_F y$ if and only if $x+1 \lhd y+1$. \begin{lemma} Let $P$ be an interval-poset of size $n$ with no increasing relation starting at $1$ and no decreasing relation starting at $n$. Then the fall of $P$ is an interval-poset if and only if $P$ is new. \end{lemma} \begin{proof} This is a straightforward checking. \end{proof} \begin{lemma}\label{r/f} The rising/falling operations induce a bijection between the set of modern interval-posets of size $n$ and the set of new interval-posets of size $n+1$. \end{lemma} \begin{proof} The only way to have two relations $i+1 \lhd_R j+1$ and $j\lhd_R i$ for $i < j$ in $\operatorname{Ri}(P)$ is to have $i \lhd j$ and $j\lhd i$ in $P$, so the rise of a modern interval-poset is new. Similarly, the fall of a new interval-poset $P$ is modern since the forbidden pattern leads to the existence of relations $y-1 \lhd_F y$ and $y+1 \lhd_F y$ that must come from $y+1 \lhd y$ and $y \lhd y+1$ in $P$. Moreover, it is obvious that the rising and falling operations are inverse of each other. \end{proof} \begin{proposition}\label{falling} Let $[S,T]$ be an interval of $\operatorname{Tam}_{n+1}$. Let $P$ be the corresponding interval-poset. Then $P$ is new if and only if there is an interval $[S_1,T_1]$ of $\operatorname{Tam}_{n}$ such that $S = Y\circ_{1} S_1$ and $T=Y \circ_{2} T_1$. \end{proposition} \begin{proof} First we show that there is no increasing relation starting at $1$ in $P$ if and only if there is a tree $T_1$ such that $T=Y \circ_{2} T_1$. Using the left/right symmetry and Lemma \ref{symmetry} we can deduce that there is no decreasing relation starting at $n+1$ in $P$ if and only if there is a tree $S_1$ such that $S = Y\circ_{1} S_1$. If there is an increasing relation starting at $1$, let $x$ the maximal element such that we have $1\lhd x$. Then, in the forest of increasing relations the first tree has root $x$ and $1$ is in this tree. So it is sent by the bijection of Theorem \ref{bij} to the binary tree $T$ which has a root $x$ and $1$ is in its left subtree. This implies that the root of $T$ has a left son and is not of the form $Y \circ_{2} T_1$. Conversely, if the root of $T$ has a left son, then the vertex labelled by $1$ is in the left subtree of $T$. Let $x$ be the label of the root of $T$. Then, we have an increasing relation $1\lhd x$ in $P$. If $P$ is new, then by the previous argument $S = Y\circ_{1} S_1$ and $T=Y \circ_{2} T_1$. Since $P$ is new, the fall of $P$ is defined. We will show that the interval corresponding to $\operatorname{Fa}(P)$ is $[S_1,T_1]$. Using the left/right symmetry and Lemma \ref{symmetry}, it is enough to show that the binary tree corresponding to the decreasing relations of $\operatorname{Fa}(P)$ is $S_1$. If $F$ denotes the forest of decreasing relations of $\operatorname{Fa}(P)$, then the decreasing forest of $P$ is $F\sqcup \{n+1\}$ where $n+1$ is the tree with only one vertex $n+1$. So, the tree corresponding to the decreasing relations of $\operatorname{Fa}(P)$ is the left subtree of the tree of $P$. In other words, it is the tree $S_1$. Since $\operatorname{Fa}(P)$ is an interval-poset, the trees $S_1$ and $T_1$ obtained by considering the decreasing relations and the increasing relations satisfy $S_1\leqslant T_1$ in $\operatorname{Tam}_n$. Conversely, if $[S_1,T_1]$ is an interval of $\operatorname{Tam}_{n}$ such that $[S,T]$ is an interval of $\operatorname{Tam}_{n+1}$ for $S = Y\circ_{1} S_1$ and $T=Y \circ_{2} T_1$. If we turn $T$ into a binary search tree by using the in-order algorithm, it is easy to see that the root of $T$ is labelled by $1$ and if $x$ is the label of a vertex of $T_1$, then this vertex is labelled by $1+x$ in $T$. In other words, the increasing relations of $T$ are the increasing relations of $T_1$ shifted by $1$. By symmetry we have that the interval-poset corresponding to $[S,T]$ is the rise of the interval-poset corresponding to $[S_1,T_1]$. By Lemma \ref{r/f}, the interval-poset corresponding to $[S,T]$ is new. \end{proof} \subsection{Characterization of the new intervals} This section is devoted to the proof of the following Theorem. \begin{theorem}\label{not_new_theo} An interval of the Tamari lattice is new if and only if the corresponding interval poset is new. \end{theorem} We are going to prove that the intervals that are not new are exactly the intervals whose interval-poset is not new. As first easy case, we consider intervals that don't have the nice shape of Lemma \ref{new_shape} \begin{lemma}\label{red1} Let $n\in \mathbb{N}^{*}$. Let $[T,S]$ be an interval of $\operatorname{Tam}_n$ that is not of the form $[Y\circ_1 S_1, Y\circ_2 T_1]$ for $S_1$ and $T_1$ two trees of $\operatorname{Tam}_{n-1}$. The the corresponding interval-poset is not new. \end{lemma} \begin{proof} If the root of the tree $S$ has a right son. Let $x$ be the most right vertex of $S$. This is the last right descendant of the root of $S$. This vertex is the last vertex visited by the in-order algorithm describe in Section \ref{section1}. So it is labeled by $n$. Let $r$ be the label of the root of $S$. Then, in $P$ we have a relation $n\lhd r$. So the poset is not new. Similarly, if the root of $T$ has a left son, there is an increasing relation in $P$ starting at $1$, so the poset is not new. \end{proof} Similarly, we have \begin{lemma}\label{red2} Let $P$ be an interval-poset. If there is an increasing relation starting at $1$ or a decreasing relation starting at $n$, then the corresponding interval is not new. \end{lemma} \begin{proof} If there is a decreasing relation starting by $n$ in $P$, it means that in the decreasing forest of $P$, the integer $n$ is not the root of its tree. Using the bijection of Theorem \ref{bij}, we see that this implies that there is a vertex on the right side of the tree $S$. Similarly, if there is an increasing relation starting by $1$ in $P$, there is a vertex on the left side of the tree $T$. By Lemma \ref{new_shape}, this implies that the interval $[S,T]$ is not new. \end{proof} With the in-order algorithm, there is a simple link between the labelling of the vertices and the labelling of the leaves. \begin{lemma}\label{label_subtree} Let $S$ be a binary search tree. Let $T$ be a subtree of $S$. Then, the vertices of $T$ are labelled by the interval $[i,j-1]$ if and only if the leaves of $T$ are labelled by $[i,j]$. \end{lemma} \begin{proof} The result follows from an easy induction. \end{proof} We can deduce the following Lemma, \begin{lemma}\label{imp1} Let $[S,T]$ be an interval of $\operatorname{Tam}_n$ such that $S = Y\circ_1 S_1$ and $T = Y\circ_2 T_1$ for $S_1$ and $T_1$ two trees of $\operatorname{Tam}_{n-1}$. If $[S,T]$ is not new, the corresponding interval-poset is not new. \end{lemma} \begin{proof} By Lemma \ref{not_new}, there are integers $1<i<j<n+1$, a subtree $A$ of $S$ whose leaves are labeled by $[i,j]$ and a subtree $B$ of $T$ whose leaves are also labeled by $[i,j]$. This implies that the root of $A$ and $B$ are not on the left or right sides of $S$ and $T$. By Lemma \ref{label_subtree}, the vertices of the two subtrees are labelled by $[i,j-1]$. Let $x$ be the label of the root $B$. The most left vertex of $B$ is labelled by $i$. So, in the poset of increasing relations of $T$ we have $i\lhd x$. The vertex labelled by $j$ (there is such a vertex since $j<n+1$) is the vertex visited by the in-order traversal after $j-1$. Since $j-1$ is the most-right vertex of the tree $B$, the vertex $x$ is in the subtree with root $j$. So we have $x\lhd j$ and by transitivity, we have $i\lhd j$. Similarly if $y$ is the label of the root of $A$, then we have a decreasing relation $j-1\lhd y$. The vertex labelled by $i-1$ (there is such a vertex since $1<i$) is the vertex visited by the in-order algorithm before the vertex labelled by $i$ which is nothing but the left most vertex of the tree $S_1$. In particular, $y$ is in the subtree with root $i-1$. So we have $y\lhd i-1$ and by transitivity $j-1\lhd i-1$. In conclusion, the interval-poset corresponding to $[S,T]$ is not new. \end{proof} Conversely, we need to understand how the forbidden configuration of Definition \ref{new_ip} leads to the existence of a grafting decomposition of the corresponding interval. For this we need to carefully follow the bijection of Châtel and Pons. Let $P$ be an interval-poset with no increasing relation starting at $1$ and no decreasing relation starting at $n$. If $P$ is not new, then it has a configuration of the form $i+1 \lhd_R j+1$ and $j\lhd_R i$ for $i < j$. Let $x$ be the maximal element in $[i+1,j]$ such that $i+1 \lhd x$. Note that the interval-poset condition implies that there is a decreasing relation $x\lhd i$. Similarly, let $y$ be the minimal element such that $i< y \leqslant j$ and such that $j \lhd y$. \begin{lemma}\label{croissante} Let $T$ be the upper bound of the interval of $\operatorname{Tam}_n$ corresponding to $P$ by the bijection of Theorem \ref{bij}. Then, the subtree of $T$ with root the vertex labelled by $x$ has leaves labelled by the interval $[i+1,j+1]$. \end{lemma} \begin{proof} Let $h \leqslant i$. If there is a relation $h \lhd x$, by the interval-poset condition we have a relation $i \lhd x$. This contradicts the decreasing relation $x\lhd i$. Moreover, the maximality of $x$ implies that the relation $x\lhd j+1$ is a cover relation in the increasing forest of $P$. Together with the previous argument, this shows that $x$ is the left most child of $j+1$ in the increasing forest of $P$. The relation $i+1 \lhd j+1$ and the interval-poset condition implies the existence of the relation $j \lhd j+1$. Clearly, $j$ is the right most child of $j+1$ in the increasing forest of $P$. So, in the tree $T$, the vertex $j$ is the right most descendant of $x$ and $x$ is the left son of $j+1$. In other words, $j$ is the largest vertex of the subtree with root $x$. Since we have $i+1 \lhd x$, there is a vertex labelled by $i+1$ in the subtree with root $x$. The first argument of the proof implies that this is the smallest vertex of this subtree. So it has its vertices labelled by the interval $[i+1,j]$. Finally, by Lemma \ref{label_subtree} its leaves are labelled by $[i+1,j+1]$. \end{proof} Dually, we have a similar result for the decreasing relations. \begin{lemma}\label{decroissante} Let $S$ be the lower bound of the interval of $\operatorname{Tam}_n$ corresponding to $P$ by the bijection of Theorem \ref{bij}. Then, the subtree of $S$ with root the vertex labelled by $y$ has leaves labelled by the interval $[i+1,j+1]$. \end{lemma} \begin{proof} This is a straightforward application of Lemma \ref{symmetry} to Lemma \ref{croissante}. \end{proof} \begin{proof}[Proof of Theorem \ref{not_new_theo}] By Lemmas \ref{red1} and \ref{imp1} if an interval is not new, then its corresponding interval poset is not new. Conversely, using Lemma \ref{red2}, we can assume that $P$ does not have an increasing relation starting at $1$ nor a decreasing relation starting at $n$. Let $[S,T]$ be the corresponding interval. Then, by Lemmas \ref{croissante} and \ref{decroissante} and the discussion before them, in $S$ and $T$ there are two subtrees whose leaves are labelled by the same interval. Lemma \ref{not_new} implies that $[S,T]$ is not new. \end{proof} As corollary, we also have a characterization in terms of modern-interval posets. \begin{corollary}\label{coro_modern} Let $n$ be an integer. There is a bijection between the set of new-intervals of $\operatorname{Tam}_{n+1}$ and the set of modern interval-posets of size $n$. \end{corollary} \begin{proof} By Theorem \ref{not_new_theo}, an interval of $\operatorname{Tam}_{n+1}$ is new if and only if its corresponding interval-poset is new. By Lemma \ref{r/f}, these interval-posets are in bijection with the modern interval-posets of size $n$. \end{proof} As explain in Lemma \ref{new_shape}, it is easy to see that if an interval $[S,T]$ is new, then $S = Y\circ_{1} S_1$ and $T=Y \circ_{2} T_1$ where $Y$ is the unique binary tree of size $1$. However, this is not a sufficient condition. Using our characterization of new intervals in terms of interval-posets, we can find a characterization of the new intervals of the Tamari lattice. \begin{theorem}\label{new_chara} Let $[S,T]$ be an interval of $\operatorname{Tam}_{n+1}$. Then $[S,T]$ is a new interval if and only if there is an interval $[S_1,T_1]$ in $\operatorname{Tam}_n$ such that $S = Y\circ_{1} S_1$ and $T = T\circ_2 T_1$. \end{theorem} \begin{proof} By Theorem \ref{not_new_theo} the new intervals of $\operatorname{Tam}_{n+1}$ are exactly the intervals such that the corresponding interval-poset is new. The result follows from Proposition \ref{falling}. \end{proof} \section{Infinitely modern interval-posets} For an integer $k$ and an interval-poset $P$ of size $n$, we let $\operatorname{Ri}^{k}(P)$ the $k$-th rise of $P$. That is the set obtained by successively taking $k$-times its rise. \begin{definition} An interval-poset is infinitely modern if $\operatorname{Ri}^{k}(P)$ is an interval-poset for every $k\geqslant 1$. \end{definition} \begin{lemma}\label{inf} An interval-poset $P$ is infinitely modern if and only if it does not contain any configuration of the form $w\lhd x$ and $z\lhd y$ for $w < x < y < z$. \end{lemma} \begin{proof} If we have such a configuration in $P$, then the interval-poset condition implies the existence of relations $x-1\lhd x$ and $y+1\lhd y$. After rising our poset enough times, they will lead to $y\lhd_{R^k} y+1$ and $y+1\lhd_{R^k} y$. Conversely, let $k+1$ the smallest integer such that $\operatorname{Ri}^{k+1}(P)$ is not a poset. Then, $\operatorname{Ri}^{k}(P)$ is not modern, so by Definition \ref{def_modern} there is a configuration of the form $x\lhd_{R^{k}} y$ and $z\lhd_{R^k} y$ for $x < y < z$ in $\operatorname{Ri}^{k}(P)$. This leads to the result. \end{proof} For an interval-poset $P$ of size $n$ we denote by $\mathrm{ir}(P)$ the smallest in integer $k$ such that there is an \underline{i}ncreasing \underline{r}elation $k \lhd k+1$. If there is no increasing relation, we use the convention that $\mathrm{ir}(P)=n$. Similarly, we denote by $\mathrm{dr}(P)$ the largest integer $i$ such that there is a \underline{d}ecreasing \underline{r}elation $i\lhd i-1$. If there is no decreasing relation, we use the convention that $\mathrm{dr}(P)=1$. We can associate to any interval poset $P$ of size $n$ the double statistic $\big(\mathrm{ir}(P),\mathrm{dr}(P)\big)$ which is a pair of elements of $\{1,\cdots,n\}$. Using this statistic, we have another description of the infinitely modern interval-posets. \begin{proposition}\label{stat} Let $P$ be an interval-poset of size $n$. Then $P$ is infinitely modern if and only if $\mathrm{dr}(P) \leqslant \mathrm{ir}(P)$. \end{proposition} \begin{proof} If $\mathrm{ir}(P) < \mathrm{dr}(P)$, then the poset is not infinitely-modern because after some risings, the relation $k\lhd k+1$ will contradict the relation $i\lhd i-1$. Conversely, if the poset is not infinitely modern, by Lemma \ref{inf}, there are integers $w < x < y < z$ such that $w\lhd x$ and $z\lhd y$. By the interval-poset condition, we have relations $x-1\lhd x$ and $y+1\lhd y$. In particular, we see that $\mathrm{ir}(P) < \mathrm{dr}(P)$. \end{proof} We denote by $E(n,i,k)$ the set of infinitely modern interval-posets $P$ of size $n$ such that $\mathrm{ir}(P) = k$ and $\mathrm{dr}(P)=i$. Let $1 \leqslant i \leqslant k \leqslant n+1$ and $P$ be an interval-poset of size $n$. Then, we define a relation $f_{i,k}(P)$ on the set with $n+1$ elements by adding a new point to the set of $P$. For the increasing relations we can think that the new point is inserted at $k$ and we add a new increasing relation from $k$ to $k+1$. The increasing relations of $P$ are shifted by $1$ accordingly to the new point. For the decreasing relations the new point is inserted at the position $i$. A new relation $i\lhd i-1$ is added and the decreasing relations of $P$ are shifted by $-1$ accordingly to the new point. More formally, $f_{i,k}(P)$ is defined as the set $\{1,2,\cdots, n+1\}$ with the relation $\lhd'$: \begin{itemize} \item We have $k \lhd' k+1$ and $i\lhd' i+1$ with the convention that there are no increasing relations when $k=n+1$ and no decreasing relations when $i=1$. \item Let us assume that we have an increasing relation $x\lhd y$ in $P$. If $x<y<k$, then we have the relation $x\lhd'y$ in $f_{i,k}(P)$. If $x < k \leqslant y$, then we have the relation $x\lhd' y+1$ in $f_{i,k}(P)$. If $k \leqslant x < y$, then we have the relation $x+1 \lhd' y+1$. \item Let us assume that we have a decreasing relation $y \lhd x$ in $P$. If $i \leqslant x < y$, then we have the relation $y+1 \lhd'x+1$. If $x< i\leqslant y$, then we have the relation $y+1 \lhd x$. If $x<y <i$, then we have the relation $y\lhd x$. \item Take the transitive closure of the relation $\lhd'$. \end{itemize} \begin{figure} \centering \begin{tikzpicture} \node (1) at (0,0) {1}; \node (2) at (1,0) {2}; \node (3) at (2,0) {3}; \node (4) at (3,0) {4}; \node (5) at (4,0) {5}; \draw[red,->,below,thick] (4.south) to [out=-45,in=225] (5.south); \draw[blue,thick,->] (2.north) to [out=140,in=50] (1.north); \draw[red,->,below, thick] (3.south) to [out=-45,in=225] (5.south); \draw[blue,thick,->] (3.north) to [out =140 ,in =45] (1.north); \end{tikzpicture} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \begin{tikzpicture} \node (1) at (0,0) {1}; \node[fill=red!20, shape=circle] (2) at (1,0) {2}; \node (3) at (2,0) {3}; \node[fill=red!20, shape=circle] (4) at (3,0) {4}; \node (5) at (4,0) {5}; \node (6) at (5,0) {6}; \draw[thick,blue,->] (2.north) to [out=140,in=50] (1.north); \draw[dashed,below, thick] (3.south) to [out=-60,in=-115] (6.south); \draw[red,->,below,thick] (4.south) to [out=-45,in=-115](5.south); \draw[red,->,below,thick] (4.south) to [out=-45,in=-115](6.south); \draw[dashed,below, thick] (5.south) to [out=-60,in=-115] (6.south); \draw[dashed,above,thick] (4.north) to [out=135,in=65](1.north); \draw[dashed,above,thick] (3.north) to [out=135,in=65](1.north); \end{tikzpicture} \caption{On the left, an interval-poset $P$ of size $5$. On the right, the construction $f_{2,4}(P)$. The vertices in red represent the positions of the new arrows which are displayed in thick red and blue. The black dashed corresponds to the relations of $P$. The long red arrow is obtained by transitivity.} \end{figure} \begin{lemma}\label{double} Let $1\leqslant i \leqslant k \leqslant n+1$. Let $i'\leqslant i$ and $k-1\leqslant k'$. Let $P \in E(n,i',k')$. Then, $f_{i,k}(P)$ is an interval-poset of size $n+1$ in $E(n+1,i,k)$. \end{lemma} \begin{proof} If we have a decreasing relation $ y \lhd x$ in $P$, by the interval poset condition, we have also have a relation $x+1 \lhd x$. This implies that, in $P$ all the decreasing relations are of the form $y\lhd x$ where $x < y$ and $x < i'$. Since $i'\leqslant i$, in $f_{i,k}(P)$ all the decreasing relations are of the form $y'\lhd x'$ where $x' < i$. Moreover, we have a decreasing relation $i \lhd i-1$ in $f_{i,k}(P)$. In other terms, we have $\mathrm{dr}(f_{i,k}(P)) = i$. Similarly, in $P$ all the increasing relations are of the form $x \lhd y$ with $x < y$ and $k'+1 \leqslant y$. Since $k\leqslant k'+1$, all increasing relations in $f_{i,k}(P)$ are of the form $x' \lhd y'$ where $k < y'$. By construction in $f_{i,k}(P)$, we have the relation $k\lhd k+1$. So, $\mathrm{ir}(f_{i,k}(P)) = k$. It remains to check that under the hypothesis $f_{i,k}(P)$ is an interval-poset. Let $x< y$ such that $x\lhd y$ and $y \lhd x$ in $f_{i,k}(P)$. Since the increasing relations land after $k$ and the decreasing before $i$, the only possibility is to have $x < i < k < y$. This means that in $P$, we have a relation $x \lhd y-1$ and $y\lhd y-1$. This is not possible since $P$ is a poset. Since the relation $\lhd'$ is transitive by construction, this shows that $f_{i,k}(P)$ is a poset. We need to check the interval-poset condition. It is an easy case by case checking: let $x<y < z$ and $x\lhd z$ in $f_{i,k}(P)$. If $x < k < y$, then in $P$ we have the relation $x \lhd y-1$. If $k\neq z$, since $P$ is an interval-poset, we have the relation $z' \lhd y-1$ for $z'=z$ if $z'<k$ and $z' = z-1$ otherwise. So in $f_{i,k}(P)$, we have $z\lhd y$. If $z=k$, then in $f_{i,k}(P)$ we have the relation $k\lhd k+1$. By the interval-poset condition of $P$ we have $k\lhd y-1$. It becomes $k+1 \lhd y$ in $f_{i,k}(P)$. By transitivity we have $k\lhd y$. Similarly, we can check the case where $k \leqslant x \leqslant y$. The case of decreasing relations is also similar. \end{proof} On the other hand, if $P$ is an interval-poset in $E(n+1,i,k)$ let us construct $\rho(P)$ an interval-poset of size $n$. Informally, for the increasing relations, we remove the vertex $k$ and the relation $k\lhd k+1$. We shift the other relations accordingly to their position. For the decreasing relations, we remove the vertex $i$ and the relation $i\lhd i-1$. And we shift the relations accordingly to their position. More formally, $\rho(P)$ is the relation on the set $\{1,2,\cdots, n\}$ defined by: \begin{itemize} \item Let $x < y$. Then we have a relation $x\lhd y$ in the following two cases: if $x < k < y+1$ and there is a relation $x\lhd y+1$ in $P$, or if $k < x+1 < y+1$ and there is a relation $x+1 \lhd y+1$ in $P$. \item Let $x < y$. Then we have a relation $y\lhd x$ in the following two cases: if $x < y < i$ and there is a relation $y\lhd x$ in $P$ or if $x < i < y+1 $ and there is a relation $ y+1 \lhd x$ in $P$. \end{itemize} \begin{lemma}\label{coupe} Let $P \in E(n+1,i,k)$. Then $\rho(P)$ is an infinitely modern interval-poset such that $\mathrm{dr}(P) \leqslant i$ and $k-1 \leqslant \mathrm{ir}(P)$. \end{lemma} \begin{proof} In $P$ the increasing relations are of the form $y \lhd x$ where $ k < x$. If we have the relation $k-1 \lhd k+1$ in $P$, then we have the relation $k-1 \lhd k$ in $\rho(P)$. Otherwise the second increasing relation $x\lhd x+1$ of length $1$ in $P$ (the one after $k\lhd k+1$) appears for $k+1 \leqslant k$. Here we use one more time the convention that there is an increasing relation starting at $n+1$ if there is no such relation. So in $\rho(P)$ the first increasing relation $x-1\lhd x$. So we have $k-1 \leqslant \mathrm{ir}(P)$, and $\mathrm{ir}(P) = k-1$ if and only if we have the relation $k-1\lhd k+1$ in $P$. Similarly, we have $\mathrm{dr}(P) \leqslant i$ and $\mathrm{dr}(P) = i$ if and only if we have the relation $i-1\lhd i+1$ in $P$. Now, we check that $\rho(P)$ is an interval-poset. By the description of $\mathrm{ir}(\rho(P))$ and $\mathrm{dr}(\rho(P))$, we deduce that if $x\lhd y$ is an increasing relation in $\rho(P)$, we have $k\leqslant y$. Similarly, if $y\lhd x$ is a decreasing relation we have $x < i $. Let $x < y$ such that $x\lhd y$ and $y \lhd x$ in $\rho(P)$. Then, we must have $x < i$ and $k\leqslant y$. So, the relation $x\lhd y$ comes from the relation $x \lhd y+1$ in $P$ and the relation $y\lhd x$ comes from the relation $y+1 \lhd x$ in $P$. Since $P$ is an interval-poset, this is not possible. Since in $P$ there are no increasing relations of the form $x\lhd k$ and no decreasing relations of the form $y\lhd i$, removing the relations $k\lhd k+1$ and $i\lhd i-1$ will not break the transitivity of the relation. Checking the interval-poset condition is straightforward and similar to the case of Lemma \ref{double}. If $i < k$, as direct consequence of Proposition \ref{stat}, the interval-poset $\rho(P)$ is infinitely-modern. If $i = k$, we just have to check that it is not possible to have $\mathrm{ir}(\rho(P)) = k-1$ and $\mathrm{dr}(\rho(P)) = i$. But this is a direct consequence of the above description of these two particular cases. \end{proof} \begin{proposition}\label{prop_calc} Let $n \in \mathbb{N}$. Let $1\leqslant i \leqslant k \leqslant n+1$. Then, we have a bijection \[ f_{i,k} : \bigcup_{\substack{1\leqslant i' \leqslant i \\ k-1\leqslant k' \leqslant n}} E(n,i',k') \to E(n+1,i,k) .\] \end{proposition} \begin{proof} By Lemma \ref{double} $f_{i,k}$ maps the left hand side to the right hand side, and by Lemma \ref{coupe}, the map $\rho$ goes from the right hand side to the left hand side. It is clear that $\rho$ and $f_{i,k}$ are two bijection inverse from each other. \end{proof} \begin{theorem}\label{theo_inf} Let $n\in \mathbb{N}$. Then, the number of infinitely modern interval-posets of size $n$ is $\frac{1}{2n+1} {{3n}\choose{n}}$. \end{theorem} \begin{proof} Let $k,l \in \{0,1,\cdots,n-1\}$. We set $B(n,k,l) = |E(n,k+1,n-l)|$. With the change of variables $x -1 = k$ and $ n-y = l$, this is the number of infinitely modern interval-posets of size $n$ with $\mathrm{ir} = y$ and $\mathrm{dr} = x$. It is easy to check that we have $B(1,0,0) = 1$. By Lemma \ref{stat}, if $P$ is an interval-poset such that $\mathrm{ir}(P) < \mathrm{dr}(P)$, then $P$ is not infinitely-modern. So, if $k+l \geqslant n$, we have $B(n,k,l) = 0$. Finally, if $k+ l < n$, then $1\leqslant x \leqslant y \leqslant n$ and Proposition \ref{prop_calc} implies \[B(n,k,l) = \sum_{0\leqslant i \leqslant k, 0\leqslant j \leqslant k}B(n-1,i,j). \] We recognize the induction formula of Definition $2.1$ of \cite{aval}. The result follows from Proposition $2.1$ \cite{aval}. \end{proof} \bibliographystyle{alpha}
\section{Introduction} The Entropy Power Inequality (EPI), first proposed by Shannon \cite{Sha48}, states that for any two independent $\mathbb R^n$-valued random variables $X$ and $Y$, \begin{equation}\label{eqn: epi} e^{\frac{2h(X)}{n}} + e^{\frac{2h(Y)}{n}} \leq e^{\frac{2h(X+Y)}{n}}, \end{equation} where $h(X)$ and $h(Y)$ are the differential entropies of $X$ and $Y$ respectively. Equality holds in inequality \eqref{eqn: epi} if and only if $X$ and $Y$ are Gaussian random vectors with proportional covariance matrices. An equivalent form of inequality \eqref{eqn: epi} due to Lieb \cite{Lie02} is also commonly used in the literature, and is stated as follows: \begin{equation}\label{eq: lieb} h(\sqrt \lambda X + \sqrt{1-\lambda} Y) \geq \lambda h(X) + (1-\lambda)h(Y), \end{equation} where $\lambda \in [0,1]$. Here, equality holds if and only if $X$ and $Y$ are Gaussians with identical covariance matrices. The EPI may be interpreted as a sharp lower bound on the entropy of sums of independent random variables in terms of their individual entropies. It has been widely used in communication theory to prove converses of coding theorems for different kinds of Gaussian channels, such as broadcast channels, wiretap channels, MIMO, etc. \cite{Ber73, LeuHel78, Oza80, Ooh98, WeiEtAl06}. The EPI was first proved in Stam \cite{Sta59}, and this proof was later simplified in Blachman \cite{Bla65}. A variety of different proofs of the EPI have been discovered since, and we refer the reader to Rioul \cite{Rio11} for an informative and in-depth analysis of different proof strategies. Numerous generalizations of this inequality have been proposed over the years such as Costa's inequality for when one of summands is Gaussian \cite{Cos85, LiuEtAl10, CouEtAl17}, a generalization involving subsets random variables in Madiman and Barron \cite{MadBar07}, and a strengthened EPI using an auxiliary random variable in Courtade \cite{Cou16a}. In addition to communication theory, the EPI has also found applications in probability theory for proving the central limit theorem \cite{Joh04book}. Barron \cite{Bar84} established an entropic version of the central limit theorem and conjectured a certain monotonicity property of entropy, which states that entropy is monotonically increasing with respect to the number of summands in the central limit theorem: \begin{equation} h\left(\frac{\sum_{i=1}^n X_i}{\sqrt n} \right) \leq h\left(\frac{\sum_{i=1}^{n+1} X_i}{\sqrt{n+1}} \right). \end{equation} This conjecture was established in Arstein et al.~\cite{ArtEtAl04}, and simplified proofs were obtained in Madiman and Barron \cite{MadBar07}. More recently, a remarkably short and simple proof was also discovered in Courtade \cite{Cou16a}. Our work in this paper is partly motivated by a series of interesting questions and conjectures made in Ball et al. \cite{BallEtAl16} and Eskenazis et al. \cite{EskEtAl16}, which were in turn motivated by the monotonicity properties of entropy. We briefly describe the work in these papers concerning \emph{directional entropies}. The monotonicity property of entropy may be interpreted as a result comparing \emph{directional entropies}; i.e., entropy of a random vector projected in a certain direction. Indeed, Eskenazis et al. \cite{EskEtAl16} interpreted the monotonicity property of entropy as follows: For i.i.d.\ random variables $X_1, \dots, X_n$, entropy along the direction $(1, 1, \dots, 1)^T \frac{1}{\sqrt n}$ is larger than the entropy along $(1, 1, \dots, 1, 0)^T \frac{1}{\sqrt{n-1}}$. This led them to the natural question (Question 6 in \cite{EskEtAl16}): Along which direction is the entropy maximized, or equivalently, which direction is most Gaussian-like for the joint distribution of $(X_1, \dots, X_n)^T$? A natural guess would be that the optimal direction is $(1, 1, \dots, 1)^T \frac{1}{\sqrt n}$, however, this conjecture is not true and it follows from a counterexample constructed in Ball et al. \cite{BallEtAl16} for the case of $n=2$. Ball et al. \cite{BallEtAl16} conjectured that for log-concave random variables, the entropy maximizing direction for $n=2$ should be $(1,1)^T/\sqrt 2$. In fact, the conjecture in Ball et al. \cite{BallEtAl16} is stronger---$h(\sqrt \lambda X_1 + \sqrt {1-\lambda} X_2)$ is a concave function of $\lambda$. Eskenazis et al. \cite{EskEtAl16} were able to prove (Question 6 in \cite{EskEtAl16}) for a special class of symmetric random variables called Gaussian mixtures. However, in general (Question 6, \cite{EskEtAl16}) and even its special case of log-concave random variables for $n=2$ is as yet open. One of our contributions in this paper is to establish lower bounds on such directional entropies, for \emph{symmetric random vectors}. We call $X$ a symmetric random vector if $f_X(x) = f_X(|x|)$, where by $|x|$ we mean taking the absolute value of each coordinate in the $x$ vector. Stated informally, our result is the following: \begin{reptheorem}{thm: main} For a symmetric random vector $X = (X_1, \dots, X_n)^T$ and the unit vector $a = (1, \dots, 1)^T\sqrt n$, the following bound holds: \begin{align*} h( a \cdot X) = h \left( \frac{\sum_{i=1}^n X_i}{\sqrt n} \right) \geq \frac{h( X)}{n} \end{align*} \end{reptheorem} For an arbitrary unit vector $a = (a_1, \dots, a_n)$, we may use the above result to obtain the bound \begin{align*} h(a \cdot X) \geq \frac{h( X)}{n} + \log \left(n^{n/2}\prod_{i=1}^n a_i\right). \end{align*} Notice that unlike most entropy inequalities, our lower bound is in terms of the joint entropy $h(X)$. To our knowledge, this is the first inequality in which entropies of sums and joint entropies both make an appearance. We note that similarities between entropy inequalities for joint distributions \cite{MadTet10} and for sums \cite{MadBar07} have been observed and explored recently \cite{MadGha17}. Interestingly, our lower bound is maximized in the direction $(1, \dots, 1) \frac{1}{\sqrt n}$, which is the conjectured direction of maximum entropy from \cite{BallEtAl16, EskEtAl16} for log-concave random vectors. Another notable point is that our inequality does not require $X_i$'s to be independent. If $X_i$'s are independent, Theorem \ref{thm: main} may be seen as a consequence of the regular EPI stated in Lieb's form \eqref{eq: lieb}. Another interpretation of our bound follows from the following observation: If $A$ is an orthonormal matrix with rows $a_i^T$, then \begin{align}\label{eq: ai} \frac{\sum_{i=1}^n h(a^i \cdot X)}{n} \geq \frac{h(AX)}{n} = \frac{h(X)}{n}. \end{align} Inequality \eqref{eq: ai} implies that for any choice of an orthonormal basis, and for any random vector $X$, there is at least one direction $a^i$ which satisfies $h(a^i \cdot X) \geq \frac{h(X)}{n}.$ Theorem \ref{thm: main} explicitly identifies $(1, \dots, 1)^T/\sqrt n$ as such a direction. The search for EPI-like inequalities for \emph{dependent} random variables is an active area of research, although there are relatively fewer results here. Takano \cite{Tak95} derived conditions on the joint distribution of $(X,Y)$ such that the classical form of the EPI in \eqref{eqn: epi} continues to hold. Under weaker conditions on the joint distribution compared to those in Takano \cite{Tak95}, Johnson \cite{Joh04} showed that inequality \eqref{eqn: epi} continues to hold with a slight modification: $h(X)$ and $h(Y)$ are replaced by $h(X|Y)$ and $h(Y|X)$ respectively. Rioul \cite{Rio11} showed that under stronger conditions compared to those of Takano \cite{Tak95}, the equivalent form of the EPI in inequality \eqref{eq: lieb} can be made to hold for any choice of $\lambda \in [0,1]$. The conditions from \cite{Tak95} and \cite{Joh04} are in terms of the score functions and Fisher informations of Gaussian perturbed random variables $X_t$ and $Y_t$, where \begin{align*} X_t &= X + \sqrt{f_1(t)} Z_1, \text{ and }\\ Y_t &= Y + \sqrt{f_2(t)}Z_2, \end{align*} where $Z_1, Z_2 \sim {\cal N}(0,1)$ and $f_1(\cdot), f_2(\cdot)$ are positive functions that tend to $+\infty$ as $t \to +\infty$. As such, these conditions are not easily interpretable. The conditions from Rioul \cite{Rio11} are in terms of the mutual information between Gaussian perturbed versions of $X$ and $Y$ and are more interpretable, although they are not easy to verify. In contrast, we impose the easy to interpret and easy to verify (albeit strong) condition of symmetry on the distribution of $X$. Going beyond directional entropies, it is natural to think about entropies of projections in subspaces of arbitrary dimensions; i.e., considering $h(AX)$ where $A$ is a $k \times n$ matrix with orthonormal rows. Analogous to (Question 6 in \cite{EskEtAl16}), one may pose the question of identifying the entropy maximizing $k$-dimensional subspace for a random vector $X$. This appears to be a very interesting and challenging problem even for specific case of Gaussian mixtures considered in Eskenazis et al. \cite{EskEtAl16}. If $X$ has independent components, Zamir and Feder's EPI for linear transformations of $X$ \cite{ZamFed93} yields lower bounds on $h(AX)$ for a matrix $A$. However, if $X$ has dependent components, no such result is known in the literature. \footnote{The second author learnt of this open problem, as well as the conjectures in Ball et al. \cite{BallEtAl16} and Eskenazis et al. \cite{EskEtAl16} through the Entropy Power Inequalities Workshop sponsored by the American Institute of Mathematics (AIM) held in May, 2017, in San Jose, CA. A list of open problems may be found at this link: \url{http://aimpl.org/entropypower/2/}} We take a step towards obtaining such a result by showing that for symmetric random vectors, it is possible to obtain lower bounds on $h(AX)$ similar to those in Theorem \ref{thm: main}. Stated informally, our result is the following: \begin{reptheorem}{thm: kdim} Let $A$ be an orthogonal $k \times n$ matrix with columns $a^1, \dots, a^n$, and suppose that $A$ is ``balanced"; i.e., $\|a^i \|_2= k/n $ for $1 \leq i \leq n$. Then for a symmetric random vector $X$, the following bound holds: \begin{equation} h(AX) \geq \frac{k}{n} h(X). \end{equation} \end{reptheorem} \begin{comment} Unlike Theorem \ref{thm: main}, the above bound does not readily extend to unbalanced matrices by simply incorporating an additive term on the right hand side. However, we will explore in \textcolor{red}{Section something} how one may arrive at lower bounds for unbalanced matrices as well. \end{comment} \paragraph{Equality cases:} Equality holds in the classical EPI if and only if the two random vectors are Gaussian with proportional covariance matrices. We examine conditions for equality in Theorem \ref{thm: main}, and notice an interesting phenomenon where equality conditions change when dimension increases beyond $n=2$. Intuitively, this is because the symmetry assumption becomes stronger in higher dimensions. In Theorem \ref{thm: equality2}, we completely characterize all equality cases for $n=2$ by showing that $X$ has to be a $45^\circ$ rotated version of $Z$, where $Z$ has i.i.d.\ and symmetric components: \begin{reptheorem} {thm: equality2} If $h((X_1+X_2)/\sqrt 2) = h(X_1,X_2)/2$, then there exist i.i.d.\, symmetric random variables $Z_1$ and $Z_2$ such that \begin{align*} \frac{1}{\sqrt 2}\begin{pmatrix} 1 & -1\\ 1 & 1 \end{pmatrix} \begin{pmatrix} Z_1 \\ Z_2 \end{pmatrix} = \begin{pmatrix} X_1\\X_2 \end{pmatrix}. \end{align*} \end{reptheorem} For dimensions $n >2$, we show that the only condition under which equality holds in Theorem \ref{thm: main} is when $X$ has i.i.d.\ Gaussian components. This result is the most technical part of our paper and is given by Theorem \ref{thm: equality}: \begin{reptheorem}{thm: equality} Let $X$ be a symmetric random vector in $\mathbb R^n$, where $n > 2$. Equality holds in Theorem \ref{thm: main} for the direction $(1, \dots, 1)^T/\sqrt n$ if and only if $X_i$ are i.i.d.\ Gaussian random variables. \end{reptheorem} It is interesting to note that the symmetry condition combined with the equality condition forces $X$ to have independent components, even when we allow for dependence. The structure of our paper is as follows: The main inequality and its proof will be given in Section \ref{section: main}. In Section \ref{sec:the_equality_cases}, we completely characterize the equality cases for $n=2$ and $n > 2$ separately. In Section \ref{section: extensions}, we extend the inequality to $k-$dimensional projections. All supporting lemmas used in the proof of the main results will be given in Appendix \ref{appendix: a}. \paragraph{Notation:} We denote a random column vector in $\mathbb R^n$ by $X = (X_1, X_2, \dots, X_n)^T$. We will use the notation $x = (x_1, x_2, \dots, x_n)^T$ and denote the joint density $f_{X_1, \dots, X_n}(x_1, \dots, x_n)$ by $f_X(x)$. For an $\mathbb R^n$-valued random variable $X$ with a continuous and differentiable density $f_X$, the differential entropy of $X$ is given by \begin{align*} h(X) = -\int_{\mathbb R^n} f_X(x) \log f_X(x) dx \end{align*} and its Fisher information matrix is defined as \begin{align*} [I(X)] = \ensuremath{\mathbb{E}} \left[ (\nabla \log f_X(x)) (\nabla \log f_X(x))^T \right]. \end{align*} Note that the $(i,j)$-th term is given by \begin{align*} [I(X)]_{i,j} &= \ensuremath{\mathbb{E}} \left[\frac{\frac{\partial f_X(x)}{\partial x_i}}{f_X(x)} \cdot \frac{\frac{\partial f_X(x)}{\partial x_j}}{f_X(x)}\right]\\ &= \int_{\ensuremath{\mathbb{R}}^n} \frac{\partial f_X(x)}{\partial x_i} \frac{\partial f_X(x)}{\partial x_j} \frac{1}{f_X(x)} dx. \end{align*} The Fisher information of $X$ is defined as \begin{align*} I( X) &= \text{Trace}([I(X)])\\ &= \ensuremath{\mathbb{E}} \left[\sum_{i=1}^n \left(\frac{\frac{\partial f_X(x)}{\partial x_i}}{f_X(x)}\right)^2\right]\\ &= \int_{\mathbb R^n} \frac{\| \nabla f_X(x) \|^2_2}{f_X(x)} dx. \end{align*} The quantity $\rho_X(x) := \nabla \log f_X(x)$ is called the score function of $X$, and the Fisher information is also stated as $\ensuremath{\mathbb{E}}[\|\rho(X)\|_2^2]$. \section{Main results} \label{section: main} \begin{definition} A random vector $X = (X_1, X_2, \dots, X_n)^T$ on $\mathbb R^n$ with a density $f_{ X}$ is called a symmetric random vector if the following holds: \begin{align} f_{ X}(x_1, x_2, \dots, x_i, \dots, x_n) = f_{ X}(x_1, x_2, \dots, -x_i, \dots, x_n), \end{align} for all $1 \leq i \leq n$ and all $x_i \in \mathbb R$. An equivalent way to state this is $f_X(x) = f_X(|x|)$, where $|x| = (|x_1|, \dots, |x_n|).$ \end{definition} \begin{theorem}\label{thm: main} Let $ X = (X_1, X_2, \dots, X_n)^T$ be a symmetric random vector on $\ensuremath{\mathbb{R}}^n$. Then the following inequality holds: \begin{align} h \left(\sum_{i=1}^n \frac{X_i}{\sqrt n} \right) \geq \frac{h(X)}{n} &= \frac{h(X_1, \dots, X_n)}{n}. \label{eqn: main} \end{align} \end{theorem} Following a well-established strategy for proving such inequalities, we first prove a Fisher information inequality and then use an integral representation of differential entropy to arrive at the desired inequality. Lemma \ref{lemma: fisher} gives the Fisher information inequality that we need. \begin{proof}[Proof of Theorem \ref{thm: main}] Let $Y = \frac{\sum_{i=1}^n X_i}{\sqrt n}$. From Lemma \ref{lemma: fisher}, we have $I(Y) \leq I(X)/n$. Consider a random Gaussian vector $Z$ with the identity covariance matrix; i.e., $Z \sim {\cal N}(0, I)$, and $Z$ is independent of $X$. For $t \geq 0$, define $X_t := X + \sqrt t Z$. Note that \begin{align*} \frac{\sum_{i=1}^n X_t(i)}{\sqrt n} &= \frac{ \sum_{i=1}^n X_i}{\sqrt n} + \sum_{i=1}^n \frac{\sqrt t Z_i}{\sqrt n} \stackrel{d} = Y + \sqrt t Z_0 := Y_t, \end{align*} where $\stackrel{d}=$ stands for equality in distribution, and $Z_0 \sim {\cal N}(0,1)$ is independent of $Y$. Note also that if $X$ has a symmetric joint distribution, $X_t$ also has a symmetric distribution. Hence, we may apply Lemma~\ref{lemma: fisher} to $X_t$ and $Y_t$ to conclude \begin{align} I(Y_t) \leq \frac{I(X_t)}{n}. \end{align} We now use the integral form of differential entropy in terms of Fisher information \cite{Rio11}, which implies \begin{align} h(X) &= \frac{n}{2} \log 2\pi e - \frac{1}{2} \int_{0}^\infty \left(I(X_t) - \frac{n}{1+t} \right)dt, \text{ and }\\ h(Y) &= \frac{1}{2} \log 2 \pi e - \frac{1}{2} \int_0^\infty \left(I(Y_t) - \frac{1}{1+t} \right)dt. \end{align} This implies \begin{align*} \frac{h(X)}{n} &= \frac{1}{2} \log 2\pi e - \frac{1}{2} \int_{0}^\infty \left(\frac{I(X_t)}{n} - \frac{1}{1+t} \right)dt\\ &\leq \frac{1}{2} \log 2\pi e - \frac{1}{2} \int_{0}^\infty \left(I(Y_t) - \frac{1}{1+t} \right)dt\\ &= h(Y). \end{align*} This completes the proof. \end{proof} The following corollary is an immediate consequence of Theorem \ref{thm: main} and the scaling properties of the entropy function: \begin{corollary} Let $ a = (a_1, \dots, a_n)^T$ be any unit vector in $\mathbb R^n$; i.e., $\| a \|_2 =1.$ Then the following inequality holds: \begin{align*} h( a \cdot X) = h \left( \sum_{i=1}^n a_i X_i \right) \geq \frac{h( X)}{n} + \log \left(n^{n/2}\prod_{i=1}^n a_i\right). \end{align*} \end{corollary} \section{Equality cases} \label{sec:the_equality_cases} Let $v^1 = \left( \frac{1}{\sqrt{n}}, \cdots, \frac{1}{\sqrt{n}} \right)^T$. Extend $v^1$ to an orthogonal basis $\{v^1,\cdots, v^n\}$. Denote \begin{equation*} A=( v^1, \cdots , v^n) \end{equation*} Let $Z=(Z_1, \cdots, Z_n)^T:= A^TX$, then $X= A Z$. In particular, $Z_1 = \frac{1}{\sqrt{n}} \sum^{n}_{i=1} X_i$. Let $z = A^T x$, we have \[ f_Z(z) = f_X(x) \cdot \Big|\det\left( \frac{dx}{dz}\right)\Big| = f_X(x) \cdot |A| = f_X(x), \] and \begin{equation*} \frac{\partial f_Z(z)}{z_1} = \sum^{n}_{i=1} \frac{1}{\sqrt{n}} \frac{\partial f_X(x)}{\partial x_i} \end{equation*} Denote $ \widehat{Z_i} = (Z_1, \cdots, Z_{i-1}, Z_{i+1}, Z_n)$. We will show $Z_1$ is independent with $\widehat{Z_1}$ using Lemma \ref{lem: general indep}, which is a general result on the independence of random variables. \begin{lemma}\label{lemma: z1} For equality to hold in inequality (\ref{eqn: main}), $Z_1$ must be independent of $\widehat{Z_1}$. \label{lem: Z_1 indep} \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma: z1}] For equality to hold in Theorem \ref{thm: main}, the only condition we need is that inequality \eqref{eqn_var_mean} from Lemma \ref{lemma: fisher} is an equality for all $y$. The only way this can happen is if $$\frac{ \sum_{i=1}^n \frac{\partial f_X(x)}{\partial x_i}}{f_X(x)}$$ is constant for all $x$ on the hyperplane $x \cdot (1, \dots, 1)^T/\sqrt n = y$. An equivalent way to express this is $ \frac{\partial f_Z(z)}{\partial z_1}/f_Z(z)$ is a function of $z_1$. This is equivalent to \begin{equation*} \frac{\partial^2 }{\partial z_k \partial z_1} \log f_Z(z) = 0, \: \forall k \neq 1. \end{equation*} Applying Lemma \ref{lem: general indep}, we conclude that $Z_1$ is independent of $\widehat{Z_1}$. \end{proof} The symmetry assumption may be combined with Lemma \ref{lemma: z1} to yield a stronger independence result: \begin{lemma}\label{lemma: A} Let $X$ be a symmetric random variable that achieves equality in Theorem \ref{thm: main}. Let ${\cal A} = \{x \in \mathbb R^n \text{ such that } |x| = (1, \dots, 1)^T/\sqrt n\}$. Let $ B= (b^1, \dots, b^n)$ be any orthogonal basis such that $b^1 \in {\cal A}$. If $Y = B^T X$, then $Y_1$ is independent of $(Y_2, \dots, Y_n)$. \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma: A}] Define $$S = \{1 \leq i \leq n | b^1(i) = -1/\sqrt n\}.$$ where $b^1(i )$ is the $i^{th}$ coordinate of $b^i$. For $i \in S$, define $\widetilde X_i = -X_i$, and otherwise $\widetilde X_i = X_i$. Define $\widetilde B$ to be equal to the $B$ matrix, except the $i$-th row is flipped in sign if $i \in S$. Note that $\widetilde B$ is now an orthogonal matrix with its first column being $(1, \dots, 1)^T/\sqrt n$. Clearly, $Y = \widetilde B^T \widetilde X$. Using symmetry, it is clear that if $X$ satisfies Theorem \ref{thm: main} with equality, then so does $\widetilde X$. Applying Lemma \ref{lemma: z1}, we conclude $Y_1$ is independent of $(Y_2, \dots, Y_n)$. \end{proof} \subsection{Equality conditions for $n=2$} \label{sub:when_n_2_} When $n=2$, the only orthonormal basis with one vector being $(1,1)^T/\sqrt 2$ is $$A = \frac{1}{\sqrt 2} \begin{pmatrix} 1 &-1\\ 1 & 1 \end{pmatrix}. $$ Define $Z = A^T X$. We first show that $Z_1$ and $Z_2$ are independent and identically distributed: \begin{lemma}\label{lemma: z1z2} If $X$ is a symmetric random vector in $\mathbb R^2$ such that inequality \eqref{eqn: main} from Theorem \ref{thm: main} is satisfied with equality, then $Z_1$ and $Z_2$ are independent, identically distributed, symmetric random variables. \label{lem: n=2 i.i.d.} \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma: z1z2}] By Lemma \ref{lemma: z1}, we obtain the independence of $Z_1$ and $Z_2$. Since $X$ is symmetric, we see that $X_1+X_2$, $X_1-X_2$, $-X_1+X_2$, and $-X_1-X_2$ have the same distributions. This means that $Z_1, Z_2, -Z_1$ and $-Z_2$ have identical distributions, and this concludes the proof. \end{proof} \begin{theorem}\label{thm: equality2} For a symmetric random vector $X$ in $\mathbb R^2$, equality holds in inequality (\ref{eqn: main}) for Theorem \ref{thm: main} if and only if $Z_1 = \frac{X_1 + X_2}{\sqrt{2}}$ and $ Z_2 = \frac{X_1 - X_2}{\sqrt{2}}$ are independent, identically distributed symmetric random variables. \end{theorem} \begin{proof} The ``only if" part was established in Lemma \ref{lemma: z1z2}, so we need to check the ``if" part. If $Z_1 = \frac{X_1 + X_2}{\sqrt{2}}$ and $Z_2 = \frac{X_1 - X_2}{\sqrt{2}}$ are i.i.d. according to a symmetric distribution $f_Z(\cdot)$, then \begin{equation*} f_X(x_1, x_2) = f_{Z}\left( \frac{x_1 + x_2}{\sqrt{2}}\right) f_{Z}\left( \frac{x_1- x_2}{\sqrt{2}}\right). \end{equation*} It is easy to check that $X$ is indeed a symmetric random variable. Furthermore, we may also check that inequality \eqref{eqn: main} from Theorem \ref{thm: main} holds with equality: \begin{align*} \frac{h(X_1,X_2)}{2} = \frac{h(Z_1, Z_2)}{2} = \frac{h(Z_1) + h(Z_2)}{2} = h(Z_1) = h\left( \frac{X_1 + X_2}{\sqrt{2}}\right). \end{align*} This completes the proof. \end{proof} \subsection{Equality conditions for $n \geq 3$} \begin{theorem}\label{thm: equality} Let $X = (X_1, \dots, X_n)^T$ be a symmetric $\mathbb R^n$-valued random vector. Then equality holds in Theorem \ref{thm: main} if and only if $X_i$'s are i.i.d.\ 0-mean Gaussian random variables. \end{theorem} \begin{proof} Let ${\cal A}$ be the set of all unit vectors where each coordinate is $\frac{\pm 1}{\sqrt n}$, that is \begin{align*} {\cal A} = \{x \in \mathbb R^n \text{ such that } |x| = (1, \dots, 1)^T/\sqrt n\}. \end{align*} From ${\cal A}$, choose any $n$ vectors $v^1, v^2, \dots, v^n$ such that $\text{span}(v_{1:n}) = \mathbb R^n$. Here, the notation $v_{1:n}$ is shorthand for the set $\{v^1, \dots, v^n\}$. Furthermore, choose $v^1$ and $v^2$ such that $v^1 \not \perp v^2$. Note that it is always possible to make such a choice for $n>2$, but not for $n=2$. For example, we can let \[ v^i(j)= \begin{cases} 1/\sqrt{n} & \text{if } i \neq j \\ -1/\sqrt{n} & \text{if } i = j \end{cases} \] where $v^i(j)$ is the $j^{th}$ coordinate of $v^i$. Let $M$ be the matrix with the $i^{th}$ column as $v^i$, then $M = (N - 2I)/\sqrt{n}$ where $N$ is the $n$ by $n$ matrix with all entries equal to $1$. Clearly, $N$ satisfy \[ N^2 = n N \] and \[ M (N + (2-n)I) = \frac{1}{\sqrt{n}} (N - 2I)(N + (2-n)I) = \frac{-4+2n}{\sqrt{n}}I \] Since $n \neq 2$, $M$ is invertible, and so $v_1, \cdots, v_n$ are linearly independent. $v_1 \cdot v_2 = \frac{n-4}{n}$, therefore $v_1 \not\perp v_2$ when $n\neq4$. For $n=4$, change $v^1$ to $\frac{1}{\sqrt{n}}[1,1,1,1]$, explicit computations can show they satisfy our conditions. By Lemma \ref{lemma: A} we know that $X \cdot v^i$ is independent of $\text{Proj}(X, (v^i)^\perp)$. Here, $\text{Proj}(X, (v^i)^\perp)$ stands for the projection of $X$ on to the $(n-1)$-dimensional subspace that is orthogonal to $v^i$. We first construct an orthonormal basis by applying the Gram-Schmidt procedure to $v^1, \dots, v^n$ in that order. Denote this basis by $A_1 = (a_{11}, a_{12}, \dots, a_{1n}$), where each $a_{1j}$ is a vector in $\mathbb R^n$. Observe that since we used the Gram-Schmidt procedure, we must have $\text{span}(a_{11:1j}) = \text{span}(v_{1:j})$ for all $j$. In particular, we have $a_{11} = v^1$. In a similar manner, for each $i \ge 2 $ denote by $A_i = (a_{i1}, a_{i2}, \dots, a_{in})$ the orthogonal basis obtained by using the Gram-Schmidt procedure on the permutation with $v^i$ used first; i.e., on $v^i, v^1, \dots, v^n$. Note that as for $i=1$, we have that $a_{i1} = v^i$. We also have that the last $n-i$ columns of $A_1$ and $A_i$ are identical, because $$\text{span}(a_{11:1i}) = \text{span}(a_{i1:ii}) = \text{span}(v_{1:i}).$$ This is illustrated in the below diagram: \begin{comment} Visually, the tensor $A$ obtained by stacking all the $A_i$'s looks as follows: \begin{align*} A = \begin{pmatrix} a_{11} &a_{12} &a_{13} &a_{14}&\dots & a_{1,n-2} &a_{1,n-1} &a_{1n}\\ a_{21} &a_{22} &a_{13} &a_{14}&\dots & a_{1,n-2} &a_{1,n-1} &a_{1n}\\ a_{31} &a_{32} &a_{33} &a_{14}&\dots & a_{1,n-2} &a_{1,n-1} &a_{1n}\\ \vdots &\vdots &\vdots &\vdots &\dots &\vdots &\vdots &\vdots\\ a_{n-2,1} &a_{n-2,2} &a_{n-2,3} &a_{n-2, 4} &\dots &a_{n-2, n-2} &a_{1, n-1} &a_{1n}\\ a_{n-1,1} &a_{n-1,2} &a_{n-1,3} &a_{n-1, 4} &\dots &a_{n-1, n-2} &a_{n-1, n-1} &a_{1n}\\ a_{n,1} &a_{n,2} &a_{n,3} &a_{n, 4} &\dots &a_{n, n-2} &a_{n, n-1} &a_{n,n}\\ \end{pmatrix} \end{align*} \end{comment} \[ \begin{tikzcd} {[v_1,v_2,\cdots,v_n]} \rar{G-S} & A_1 := [a_{11}=v_1, a_{12}, \cdots,a_{1n}] \ar{d}{\text{carry over last }n-2 }\\ {[v_2, v_1, v_3, \cdots,v_n]} \rar{G-S} & A_2:=[a_{21}=v_2, a_{22},a_{23} = a_{13}, \cdots, a_{2n}=a_{1n}] \ar{d}{\text{carry over last }n-3 }\\ {[v_3, v_1,v_2 ,v_4, \cdots,v_n]} \rar{G-S} & A_3:=[a_{31}=v_3, a_{32},a_{33},a_{34} = a_{24}, \cdots, a_{3n}=a_{2n}] \\ \vdots & \vdots \\ {[v_n, v_1, \cdots,v_{n-1}]} \rar{G-S} & A_n:=[a_{n1}=v_n, a_{n2}, \cdots, a_{nn}] \end{tikzcd} \] We now define new random variables which are the projections of $X$ on to the basis given by the bases $A_i$'s. For $1 \leq i \leq n$, define $$Z^i = A_i^T X.$$ Denote $Z^i(j)$ as the $j^{th}$ components of $Z^i$. Our strategy is to show that the components of $Z^1$ are independent and Gaussian with the same variance. Note that this implies that $X$ is a spherically symmetric Gaussian, and concludes the proof of Theorem \ref{thm: equality}. Let $R_i$ be a rotation matrix such that $A_i = A_1 R_i$, for $1 \leq i \leq n$. Since the last $n-i$ columns of $A_i$ and $A_1$ are identical, we have that \begin{align*} R_i = \begin{pmatrix} &\widehat R_i &0_{i \times n-i}\\ &0_{n-i \times i} & I_{n-i \times n-i} \end{pmatrix} \end{align*} for some $i \times i$ rotation matrix $\widehat R_i$. We can express $Z^i$ in terms of $Z^1$ via the relation \begin{align*} Z^i &= A_i^T X\\ & = R_i^T A_1^T X\\ &= R_i^T Z^1. \end{align*} For $i=2$ in particular, let $$\widehat R_2^T = \begin{pmatrix} \alpha_{11} &\alpha_{12}\\ \alpha_{21} & \alpha_{22}. \end{pmatrix}.$$ Since we chose $v^1$ and $v^2$ to be non-orthogonal, all entries of $\widehat R_2^T$ are non-zero. Furthermore, we have \begin{align*} \begin{pmatrix}Z^2(1)\\ Z^2(2) \end{pmatrix} = \widehat R_2^T \begin{pmatrix} Z^1(1)\\ Z^1(2) \end{pmatrix}. \end{align*} Additionally, we may apply Lemma \ref{lemma: A} to write the following independence relations: \begin{align*} Z^1(1) &\perp \!\!\! \perp Z^1(2), \quad \text{ and }\\ Z^2(1) &\perp \!\!\! \perp Z^2(2). \end{align*} This shows that $(Z^1(1), Z^1(2))$ has independent components even after rotating by a matrix $\widehat R_2$. Since $\widehat R_2^T$ has all non-zero entries, we may use the characterization theorem of Gaussian distributions \cite{GhuOlk62} to conclude that $Z^1(1)$ and $Z^1(2)$ are normally distributed with 0 mean and identical variances. We will continue the proof using induction. Assume $Z^1(1), \cdots, Z^1(k-1)$ are i.i.d. Gaussian and independent of $Z^1(k), \cdots,Z^1(n)$. This certainly is true for $k=1$. We are going to show that $Z^1(1), \cdots, Z^{1}(k)$ are i.i.d. Gaussian as well, and independent of $Z^1(k+1), \dots, Z^1(n)$. Express $Z^k(1)$ as a linear combination of $Z^1(1), \cdots, Z^{1}(k)$, \[ Z^k(1) = \alpha_{11}Z^1(1) + \cdots + \alpha_{1,k}Z^1(k), \] for some $\alpha_{11}$ through $\alpha_{1k}$. By Lemma \ref{lemma: A} and our induction assumption, we have the following independence relations: \begin{align*} \alpha_{11} Z^1(1) + \cdots + \alpha_{1,k-1} Z^{1}(k-1) &\perp \!\!\! \perp (Z^1(k+1), \dots, Z^1(n)), \quad \text{ and }\\ \alpha_{11} Z^1(1) + \cdots + \alpha_{1,k-1} Z^{1}(k-1) + \alpha_{1,k}Z^{1}(k) &\perp \!\!\! \perp (Z^1(k+1), \dots, Z^1(n)) \end{align*} Note that $\alpha_{1,k} \neq 0$ because $\alpha_{1,k}$ corresponds to the projection of $X$ onto $v_k$ which does not live in the span of $v_1, \cdots, v_{k-1}$. We may therefore apply Lemma \ref{lemma: independence} to conclude that \begin{align*} Z^1(k) &\perp \!\!\! \perp (Z^1(k+1), \dots, Z^1(n)). \end{align*} Furthermore, we also know that $Z^k(1) \sim Z^1(1) = {\cal N}(0, \sigma^2)$ because of the symmetry assumption. We also have $$\alpha_{11} Z^1(1) + \cdots + \alpha_{1,k-1} Z^1(k-1) \sim {\cal N}(0, \alpha_{11}^2 \sigma^2 +\cdots + \alpha_{1,k-1}^2 \sigma^2),$$ Note that $ \sum_{i=1}^k \alpha_{1,i}^2 =1$. Applying Lemma \ref{lemma: gaussian}, we conclude that $Z^1(k) \sim {\cal N}(0, \sigma^2)$. By induction, all the $Z^1(i)$'s are independent and identically distributed as Gaussian random variables and completes the proof. \end{proof} \begin{remark} Note that we use the Lemma \ref{lemma: independence} only for the case when $X$ is a Gaussian random variable, in which case $\phi_X$ has no roots. \end{remark} \section{Extensions} \label{section: extensions} The proof of Theorem \ref{thm: main} may be adapted to obtain a version of the same with $k$-dimensional projections: \begin{theorem}\label{thm: kdim} Let $X$ be a symmetric $\mathbb R^n$-valued random vector. Let $A$ be a $k \times n$ matrix with orthonormal rows. The matrix $A$ is assumed to be balanced; i.e. all columns of $A$ have the same $\ell_2$-norm: \begin{align*} \sum_{i=1}^k a_{ij}^2 = \frac{k}{n} \quad \text{ for all } 1 \leq j \leq n. \end{align*} Then the following bound holds for $h(AX)$: \begin{equation}\label{eq: kdim} h(AX) \geq \frac{k}{n}h(X). \end{equation} \end{theorem} \begin{proof} Lemma \ref{lemma: matrix fisher} from Appendix \ref{appendix: a} gives \begin{align} \frac{\nabla f_Y(y)}{f_Y(y)} = \mathbb E \left[ A \left(\frac{\nabla f_X(X)}{f_X(X)}\right)\Big | Y = y\right]. \end{align} Taking the squared norm on both sides and using Cauchy-Schwartz inequality, we see that \begin{align} \| \rho(y) \|_2^2 \leq \mathbb E \left[ \left \|A \left(\frac{\nabla f_X(X)}{f_X(X)}\right) \right \|_2^2\Big | Y = y\right]. \end{align} Taking an expectation with respect to $Y$, we conclude \begin{align} I(Y) \leq \mathbb E \left[ \left \|A \left(\frac{\nabla f_X(X)}{f_X(X)}\right) \right \|_2^2\right]. \end{align} Notice that upon expanding, the right hand side contains cross terms of the form $$\ensuremath{\mathbb{E}} \left[\frac{\frac{\partial f_X(X)}{\partial x_i}\cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \right],$$ which are all equal to 0 due to Lemma \ref{lemma: cross terms} in Appendix \ref{appendix: a}. Furthermore, the coefficient of each term of the form $$\ensuremath{\mathbb{E}} \left[\frac{\left(\frac{\partial f_X(X)}{\partial x_j}\right)^2}{f_X(X)^2} \right] $$ is given by $\sum_{i=1}^k a_{ij}^2$, which is $k/n$ since $A$ is assumed to be a balanced matrix. Thus, we arrive at the bound \begin{align} I(Y) \leq \frac{k}{n} I(X). \end{align} As in Theorem \ref{thm: main}, we now use the integral form of differential entropy in terms of Fisher information \cite{Rio11}, which implies \begin{align} h(X) &= \frac{n}{2} \log 2\pi e - \frac{1}{2} \int_{0}^\infty \left(I(X_t) - \frac{n}{1+t} \right)dt, \text{ and }\\ h(Y) &= \frac{k}{2} \log 2 \pi e - \frac{1}{2} \int_0^\infty \left(I(Y_t) - \frac{k}{1+t} \right)dt. \end{align} This implies \begin{align*} \frac{kh(X)}{n} &= \frac{k}{2} \log 2\pi e - \frac{1}{2} \int_{0}^\infty \left(\frac{kI(X_t)}{n} - \frac{k}{1+t} \right)dt\\ &\leq \frac{k}{2} \log 2\pi e - \frac{1}{2} \int_{0}^\infty \left(I(Y_t) - \frac{k}{1+t} \right)dt\\ &= h(Y). \end{align*} This completes the proof. \end{proof} \section{Conclusion} In this paper, we discovered a new lower bound for directional entropies of symmetric random variables. Our bounds are different from similar bounds in the literature in two key aspects. Firstly, the lower bound is in terms of the joint entropy $h(X)$ instead of being in terms of a linear combination of $h(X_i)$'s. And secondly, the lower bound holds for dependent random variables as well, as long as the joint distribution is symmetric. Our proof strategy involves proving a Fisher information inequality and then deriving a corresponding entropy inequality. Our main technical contribution is the analysis of the equality cases. For $n=2$, we completely characterized all possible equality cases, and showed that unlike the regular EPI, equality may hold even for non-Gaussian random variables. For dimensions great than 2, we showed that equality holds if and only if the random variables are i.i.d. Gaussian. Although this is the same equality condition for the regular EPI, our proof techniques are novel and rely on certain independence properties of the joint distribution combined with the symmetry assumption. Lastly, we also proved a generalization that yields entropy bounds for certain projections into $k$-dimensional subspaces. There are a number of open problems that we would like to consider in future work. For $k$-dimensional projections, our lower bound only holds for certain ``balanced" projection matrices. It would be interesting to see if these bounds can yield bounds for projections in arbitrary $k$-dimensional subspaces as well. Analyzing equality cases for such $k$-dimensional projections also appears to be a challenging problem. It would be quite surprising if there are equality cases other that i.i.d.\ Gaussian random variables in these problems. Yet another direction to pursue would be to examine joint distributions corresponding to i.i.d.\ Gaussian mixture random variables as in Eskenazis et al. \cite{EskEtAl16}, and identify which $k$-dimensional projections have the largest entropy. The current results in \cite{EskEtAl16} hold only for 1-dimensional projections. Our analysis in this paper heavily relies on the symmetry assumption. It is easy to construct examples of non-symmetric random variables that do not satisfy the bounds in this paper. It would be interesting to see we can establish similar bounds for other classes of joint distributions, such as those corresponding to certain symmetric graphical models. \begin{appendix} \section{Proofs of lemmas}\label{appendix: a} \begin{lemma}\label{lemma: matrix fisher} Let $X$ be an $\mathbb R^n$-valued random variable. Let $A$ be any $k \times n$ orthogonal matrix, and let $Y = AX$. Then we have the equality \begin{equation} \frac{\nabla f_Y(y)}{f_Y(y)} = \mathbb E \left[ A \left(\frac{\nabla f_X(X)}{f_X(X)}\right)\Big | Y = y\right]. \end{equation} \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma: matrix fisher}] Let the rows of $A$ be $A_1^T, \dots, A_k^T$. By finding orthogonal rows $A_{k+1}^T, \dots, A_n^T$, we extend the set of rows of $A$ to a complete orthogonal basis. For a point $y = (y_1, \dots, y_k)^T$, we have that $y_0 = A_1y_1+ \dots + A_k y_k$ is vector satisfying $Ay_0 = y$. Thus, we may write $f_Y(y)$ as \begin{align}\label{eq: fy} f_Y(y) = \int_{t} f_X(y_0+A_{k+1}t_1 + \dots + A_n t_{n-k})dt, \end{align} where $t = (t_1, \dots, t_{n-k})^T$. Define $y_t = y_0+A_{k+1}t_1 + \dots + A_n t_{n-k}$. Taking the gradient with respect to $y$ on both sides of equation \eqref{eq: fy}, it is easy to check that \begin{align}\label{eq: fy2} \nabla f_Y(y) &= \int_t A \nabla f_X(y_t) dt. \end{align} Dividing both sides of equation \eqref{eq: fy2} by $f_Y(y)$, \begin{align} \frac{\nabla f_Y(y)}{f_Y(y)} = \int_t A \frac{\nabla f_X(y_t)}{f_X(y_t)} \cdot \frac{f_X(y_t)}{f_Y(y_t)} dt. \end{align} Noting that $f_{X|Y}(y_t | y) = \frac{f_X(y_t)}{f_Y(y_t)}$, we conclude that \begin{align} \frac{\nabla f_Y(y)}{f_Y(y)} &= \int_t A \frac{\nabla f_X(y_t)}{f_X(y_t)}f_{X|Y}(y_t | y) dt\\ &= \mathbb E \left[ A \left(\frac{\nabla f_X(X)}{f_X(X)}\right)\Big | Y = y\right]. \end{align} \end{proof} \begin{lemma}\label{lemma: fisher} Let $X = (X_1, X_2, \dots, X_n)$ be a symmetric $\mathbb R^n$-valued random vector, and let $Y = \frac{\sum_{i=1}^n X_i}{\sqrt n}$. Then we have \begin{align} I(Y) &\leq \frac{I(X)}{n}. \end{align} \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma: fisher}] % Lemma \ref{lemma: matrix fisher} from Appendix \ref{appendix: a} gives that \begin{align} \frac{\nabla f_Y(y)}{f_Y(y)} = \mathbb E \left[ \frac{1}{\sqrt n} \frac{\sum_{i=1}^n\frac{\partial f_X(X)}{\partial x_i}}{f_X(x)} \Bigg | Y = y\right]. \end{align} Using Cauchy-Schwartz inequality, we have \begin{equation} \rho(y)^2 \le \ensuremath{\mathbb{E}} \left[ \left(\frac{1}{\sqrt n} \frac{ \sum_{i=1}^n \frac{\partial f_X(X)}{\partial x_i}}{f_X(X)} \right)^2\Bigg | Y = y \right]. \label{eqn_var_mean} \end{equation} Averaging with respect to $y$, \begin{align} I(Y) &= \ensuremath{\mathbb{E}}[\rho(y)^2] \\ &\le \ensuremath{\mathbb{E}} \left[ \left(\frac{1}{\sqrt n} \frac{ \sum_{i=1}^n \frac{\partial f_X(X)}{\partial x_i}}{f_X(X)} \right)^2 \right] \\ &= \ensuremath{\mathbb{E}}\left[ \sum^{n}_{i=1} \frac{1}{n} \left(\frac{\frac{\partial f_X(X)}{\partial x_i}}{f_X(X)} \right)^2 + 2 \sum_{ 1 \le i < j \le n} \frac{1}{n} \frac{\frac{\partial f_X(X)}{\partial x_i}\cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \right]\\ &= \ensuremath{\mathbb{E}}\left[ \sum^{n}_{i=1} \frac{1}{n} \left(\frac{\frac{\partial f_X(X)}{\partial x_i}}{f_X(X)} \right)^2\right] + \frac{2}{n} \ensuremath{\mathbb{E}} \left[\sum_{ 1 \le i < j \le n}\frac{\frac{\partial f_X(X)}{\partial x_i}\cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \right]\\ &= \frac{I(X)}{n} + \frac{2}{n} \ensuremath{\mathbb{E}} \left[\sum_{ 1 \le i < j \le n}\frac{\frac{\partial f_X(X)}{\partial x_i}\cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \right]. \label{eqn_sec_term} \end{align} Lemma \ref{lemma: cross terms} from Appendix \ref{appendix: a} shows that since $X$ is symmetric, each term of the form $$\ensuremath{\mathbb{E}} \left[\frac{\frac{\partial f_X(X)}{\partial x_i}\cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \right] = 0,$$ and thus the second term in expression \eqref{eqn_sec_term} vanishes, and this concludes the proof. \end{proof} \begin{lemma} Let $X=(X_1, \cdots, X_n)$ be a random vector and $f_X$ is its density function. Define \begin{equation*} \widehat{X_i} := (X_1, \cdots, X_{i-1}, X_{i+1}, \cdots, X_n). \end{equation*} Then $X_i$ is independent of $\widehat{X_i}$ if and only if \begin{equation*} \frac{\partial ^2}{\partial x_k \partial x_i} \log f_X(x) = 0, \: \forall k \neq i \end{equation*} \label{lem: general indep} \end{lemma} \begin{proof} If $X_i$ is independent of $\widehat{X_i}$, then \begin{equation*} f_X(x) = f_{X_i}(x_i) f_{\widehat{X_i}}(\widehat{x_i}). \end{equation*} Taking the logarithm and differentiating with respect to $x_i$, we obtain \begin{align*} \frac{\partial }{\partial x_i} \log f_X(x) &= \frac{f'_{X_i}(x_i)}{f_{X_i}(x_i)}. \end{align*} Differentiating again with respect $x_k$ for $k \neq i$ gives \begin{equation} \frac{\partial^2 }{\partial x_k \partial x_i} \log f_X(x) = 0, \: \forall k \neq i. \label{eqn: 2nd partial vanish} \end{equation} On the other hand, if condition (\ref{eqn: 2nd partial vanish}) is true, then $ \frac{\partial }{\partial X_i} \log f_X(x)$ is a function of $x_i$, and we can write $\log f_X(x)$ as the sum of a function on $x_i$ and a function on $\widehat{x_i}$, i.e. \begin{equation*} \log f_X(x) = g(x_i)+ h(\widehat{x_i}) \end{equation*} for some function $g$ and $h$. Then \begin{equation*} f_X(x) = e^{g(x_i)} e^{h(\widehat{x_i})} \end{equation*} Since $g$ and $h$ are unique up to a constant, we can normalize $g$, s.t. $\int e^{g(x_i)}dx_i = 1$. Notice that also forces $\int e^{h(\widehat{x_i})} d\widehat x_i = 1$. Therefore $e^{g(x_i)}$ and $e^{h(\widehat{x_i})}$ are the density functions of $X_i$ and $\widehat{x_i}$ respectively, and so \begin{equation*} f_X(x) = f_{X_i}(x_i) f_{\widehat{X_i}}(\widehat{x_i}). \end{equation*} From this we conclude that $X_i$ is independent of $\widehat{X_i}$. \end{proof} \begin{lemma}\label{lemma: cross terms} If $X$ is symmetric $\mathbb R^n$-valued random vector, then for any $1 \leq i, j \leq n$, $i \neq j$, the following holds: \begin{align} \mathbb E \left[ \frac{\frac{\partial f_X(X)}{\partial x_i}}{f_X(X)} \cdot \frac{\frac{\partial f_X(X)}{\partial x_j}}{f_X(X)} \right] = 0. \end{align} \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma: cross terms}] Since $f_X(x_1, \dots, x_i, \dots, x_n) = f_X(x_1, \dots, -x_i, \dots, x_n)$, we have \begin{align} \frac{\partial f_X}{\partial x_i}(x_1, \dots, -x_i, \dots, x_n) &= - \frac{\partial f_X}{\partial x_i}(x_1, \dots, x_i, \dots, x_n), \text{ and } \label{eqn_sym11}\\ \frac{\partial f_X}{\partial x_j}(x_1, \dots, -x_i, \dots, x_n) &= \frac{\partial f_X}{\partial x_j}(x_1, \dots, x_i, \dots, x_n). \label{eqn_sym21} \end{align} Therefore \begin{align*} \frac{\frac{\partial f_X}{\partial x_i}(x_1, \dots, -x_i, \dots, x_n)\cdot \frac{\partial f_X}{\partial x_j}(x_1, \dots, -x_i, \dots, x_n)}{f_X^2(x_1, \dots, -x_i, \dots, x_n)}\\ =-\frac{\frac{\partial f_X}{\partial x_i}(x_1, \dots, x_i, \dots, x_n)\cdot \frac{\partial f_X}{\partial x_j}(x_1, \dots, x_i, \dots, x_n)}{f_X^2(x_1, \dots, x_i, \dots, x_n)}. \end{align*} Since the joint density is symmetric, we have \begin{equation} \ensuremath{\mathbb{E}} \left[ \frac{ \frac{\partial f_X (X)}{\partial x_i} \cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \Bigg | X_1, \cdots, X_{i-1}, X_{i+1}, \cdots, X_n \right] = 0 \end{equation} Taking an expectation again, we conclude \begin{align} \ensuremath{\mathbb{E}} \left [ \frac{ \frac{\partial f_X(X)}{\partial x_i}\cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \right] &= \ensuremath{\mathbb{E}} \left[ \ensuremath{\mathbb{E}} \left[ \frac{ \frac{\partial f_X(X)}{\partial x_i}\cdot \frac{\partial f_X(X)}{\partial x_j}}{f_X(X)^2} \Bigg | X_1, \dots, X_{i+1},X_{i+1}, \cdots, X_n\right]\right], \\ &=0. \label{eqn_cond_exp1} \end{align} This concludes the proof. \end{proof} \begin{lemma}\label{lemma: independence} Let $X$ and $Y$ be real-valued random variables, and let $Z$ be an $\mathbb R^n$-valued random variable. We have the independence relations $X \perp \!\!\! \perp (Y,Z)$, and $X+Y \perp \!\!\! \perp Z$. Furthermore, the characteristic function of $X$, denoted by $\phi_X$, is assumed to have no zeros. Then $X,Y,Z$ are mutually independent. \end{lemma} \begin{proof} Note that it is enough to show that $Y \perp \!\!\! \perp Z$. In terms of characteristic functions, we need to show that $\phi_{Y,Z}(t_1, t_2) = \phi_Y(t_1) \phi_Z(t_2)$ for all $t_1 \in \mathbb R$ and $t_2 \in \mathbb R^n$. Using the fact that $X$ is independent of $(Y,Z)$, we have \begin{align*} \mathbb E (e^{t_1X+t_1Y+t_2^T Z}) &= \phi_X(t_1) \phi_{Y,Z}(t_1, t_2). \end{align*} Using the independence of $(X+Y)$ and $Z$, we have \begin{align*} \mathbb E (e^{t_1X+t_1Y+t2^T Z}) &= \phi_{X+Y}(t_1) \phi_{Z}(t_2)\\ &\stackrel{(a)}= \phi_X(t_1) \phi_Y(t_1) \phi_Z(t_2), \end{align*} where $(a)$ follows because $X \perp \!\!\! \perp (Y,Z)$. Since $\phi_X$ has no zeros, we may divide it out and conclude \begin{align*} \phi_{Y,Z}(t_1, t_2) = \phi_Y(t_1) \phi_Z(t_2). \end{align*} This shows that $Y \perp \!\!\! \perp Z$ and concludes the proof. \end{proof} \begin{lemma}\label{lemma: gaussian} If $X$ and $Y$ are real-valued random variables such that: \begin{enumerate} \item $X \sim {\cal N}(0, \sigma_1^2)$ \item $X \perp \!\!\! \perp Y$ \item$X+Y \sim {\cal N}(0 , \sigma_1^2 + \sigma_2^2)$ \end{enumerate} Then $Y \sim {\cal N}(0, \sigma_2^2)$. \end{lemma} \begin{proof} Since $X$ and $Y$ are independent, we have \begin{align*} \mathbb E(e^{tX + tY}) &= \phi_X(t) \phi_Y(t), \end{align*} and using the definition of $\phi_{X+Y}$, we have \begin{align*} \mathbb E(e^{tX + tY}) &= \phi_{X+Y}(t). \end{align*} Since $\phi_X$ has no zeros owing to $X$ being Gaussian, we have \begin{align*} \phi_Y(t) = \frac{\phi_{X+Y}(t)}{\phi_X(t)}. \end{align*} The right hand side is precisely the characteristic function of a ${\cal N}(0, \sigma_2^2)$ random variable. This implies $Y \sim {\cal N}(0, \sigma_2^2)$ and concludes the proof. \end{proof} \end{appendix} \bibstyle{ieeetr}
\section{Introduction} \label{section:introduction} \vspace{-0.15cm} A key challenge for 5G and beyond-5G deployments will be, without doubt, a seamless integration of Internet of Things (IoT) services, as these are expected to span a very broad range of application scenarios and technical requirements. The envisioned high IoT device diversity and density make the problem even more challenging. It is also expected that large antenna arrays, massive MIMO, and the centralized radio access network (C-RAN) architecture will be an integral part of future deployments and can be exploited to enable efficient network access to IoT devices. While future networks may need to accommodate humongous numbers of IoT devices, the communication requirements of most IoT devices are expected to be intermittent and sporadic. As a result, random access (RA) protocols are ideally suited for serving IoT devices. Most existing RA works consider cellular RA, i.e., access to a single-site \cite{codedAlohavsCS2017, 7-Larsson}. RA protocols for C-RAN architectures, however, are also gaining attention \cite{xu-cran-icc2015,qihe-cran-2017}. Recent advances in cellular RA include coded and slotted versions of ALOHA, and compressed sensing (CS) techniques aiming to exploit the inherent sparsity in user activity (see e.g., \cite{codedAlohavsCS2017}). Some of the benefits offered by massive MIMO have already been exploited in cellular RA, and include spatial collision resolution (see e.g., \cite{7-Larsson}). Several C-RAN RA methods have emerged recently. \cite{xu-cran-icc2015} leverages CS for sparse user detection, and clustering of nearby base stations (BS) to reduce computational complexity. \cite{qihe-cran-2017} also exploits CS techniques for user detection, but, unlike \cite{xu-cran-icc2015}, it performs user detection and channel estimation jointly by modeling a two-dimensional sparsity, i.e., sparsity in both device activity and device-site connectivity. While the two-dimensional sparsity model is well-suited to C-RAN architectures with IoT devices, the computational complexity in \cite{qihe-cran-2017} scales up with the number of antennas at both BSs and users. Contention-based cellular RA is preferred in LTE as a means for accommodating IoT devices with sparse and intermittent activity \cite{good_lte-explantion}. Uplink (UL) pilot collisions, detected by a BS, are resolved using additional message exchanges between BS and users \cite{good_lte-explantion}. The inherent delays in resolving collisions reduce the appeal of these schemes, especially in the presence of networks with small cells and high IoT densities. In this work, we consider C-RAN RA protocols that enable high detection rates of active devices in the network and study the problem of learning the large-scale channel gains of the links between detected devices and C-RAN sites. Such link information can be leveraged for scheduling, load-balancing, and interference suppression to greatly improve performance in dense massive MIMO deployments \cite{bethanabhotla2016optimal}, \cite{qiaoyang}. We focus on a user-centric architecture of the type introduced in \cite{bursalioglu2016novel} that leverages dense deployments of large-array remote radio heads (RRHs) and virtual sectorization. This architecture is ideal for IoT RA, as it allows on-the-fly low-latency detection of active devices across the C-RAN coverage area. It also greatly outperforms conventional cellular RA in terms of density of simultaneously detected devices \cite{bursalioglu2016novel,icc2016-ozgun}. In the context of these RA protocols, we present techniques for learning the strengths of links between detected devices and RRH sectors in the network. By jointly processing the individual RRH sector device-detection reports via a framework borrowed from recommendation systems \cite{netflix-winner-2009}, the proposed methods are able to effectively classify the strengths of links between detected devices and RRH sectors not directly available in the detection reports. Our proposed schemes only exploit prior knowledge of the distances between RRH sites, but no knowledge of active-device locations. The paper is organized as follows. Sec.~\ref{sec:RA} describes the C-RAN RA schemes of interest. The problem of learning the strengths of as many links as possible is considered in detail in Sec. \ref{link-detection}. Sec. \ref{Numerical-Results} presents a brief simulation-based evaluation of the link classification schemes proposed in Sec. \ref{link-detection}. Finally Sec.~\ref{sec:conclusion} provides concluding remarks and directions for future investigations. \vspace{-0.3cm} \section{C-RAN Random Access} \label{sec:RA} In this section we present the RA schemes of interest in this work. We consider a C-RAN of $B$ large antenna-array BSs spanning a wide geographical area and serving a very large number of IoT devices, each with a single antenna. Similar to \cite{Li2016, bursalioglu2016novel}, spatial processing is applied at each BS to create $S$ virtual sectors, for a total of $V = SB$ sectors in the network. The set of all BS sectors is indexed via the index $v=Sb+s \in {\cal V} = \{0,\,1,\,\cdots,\,V-1\}$, where $b \in \{0,\,1,\,\cdots,\,B-1\}$ is the BS index, and $s\in \{0,\,1,\,\cdots,\,S-1\}$. We consider a slotted RA scheme, according to which blocks of time-frequency resources, referred to as RA blocks, are reserved for RA \cite{good_lte-explantion}. For convenience, we consider a timeline where RA blocks are periodically reserved. A single frame is formed by one RA block and the following block of resources dedicated to serving the active devices detected during the RA block in the frame. The RA block within the $f$-th frame is referred to as the $f$-th RA block. See Fig. \ref{fig:frame}. We model the device access-request arrival process as a Poisson process with a rate of $\lambda_{\rm in}$ device requests between consecutive RA blocks (over the geographical area spanned by the network). Any device with an ``arriving'' access request waits for the next RA block to access the network and remains ``active'' until it is detected. It is served in the serving block following the RA-block it is detected. We also let ${\cal R}_{f}$ denote the active users in the $f$-th frame. During the $f$-th RA block, active devices in ${\cal R}_{f}$ broadcast uniquely distinguishable uplink pilots and a subset of them, ${\cal D}_f$, is detected by the network. In the C-RAN RA scheme we consider, an active user is considered to be detected by the network as long as at least one sector detects its unique ID during RA. Much like any RA protocol, not all active devices in an RA block are detected. The subset of active devices, ${\cal R}_{f}-{\cal D}_f$ that are not detected are ``queued", i.e., continue to be active in later RA-blocks. Thus, the active devices in frame $f$, either arrived in frame $f-1$, or in an earlier frame but have not yet been detected. An important property of a good RA protocol is keeping stable queue sizes. By letting $\lambda_{\rm out}\stackrel{\Delta}{=} \lim_{N \rightarrow\infty}\frac{1}{N}\sum_{f=1}^N|{{\cal D}}_f|$ denote the device detection rate, it is important that the RA scheme is stable with respect to $\lambda_{\rm in}$, that is, $\lambda_{\rm out}=\lambda_{\rm in} $. This implies that the active user rate per frame, $\lambda_{\rm ra}\stackrel{\Delta}{=} \lim_{N \rightarrow\infty}\frac{1}{N}\sum_{f=1}^N|{{\cal R}}_f|$ does not diverge. For a stable RA protocol, the ratio $\lambda_{\rm in}/\lambda_{\rm ra}$ is inversely proportional to the expected delay (in RA frames) that a device waits before it is detected. A desired average delay of $1/\rho$ can be achieved if, $\lambda_{\rm in}$ (and $\lambda_{\rm out}=\lambda_{\rm in}$) is greater than $\rho\lambda_{\rm ra}$. Stable RA protocols that yield short expected detection delays while keeping RA-block overheads low are highly desirable.\footnote{In this work, the RA-block overheads are proportional to the number of random-access slots, or ``pilot dimensions'', reserved in an RA-block.} At this stage it is worth contrasting the slotted RA scheme in consideration against LTE-PRACH. LTE employs a form of slotted RA that can be modeled at an abstract level via the schematic in Fig.~\ref{fig:frame}. However, each device in LTE is associated with a single BS, and therefore, PRACH is designed for RA between devices and a single BS. To enable such cellular RA, resource reuse is employed within the RA block in LTE, so that the RA-block pilot dimensions used within a cell are not available in nearby cells. That loss in overhead efficiency in LTE is well known. In practice, it is alleviated by using partially overlapped pilot resources in nearby cells, which inherently results in intercell RA-block interference. An additional difference arises from the fact that, in LTE, collisions are resolved via a sequence of message exchanges between a BS and its colliding devices. In contrast, the C-RAN RA schemes we consider rely on instantaneous user identification and collision detection, thereby resulting in lower detection delays and lower protocol complexity. The proposed C-RAN slotted RA enables very flexible operation in the serving block as it enables instantaneous association of the detected devices to one or multiple BS sectors in the network. Efficient network operation, whether cellular, CoMP (coordinated multipoint), or cell-free, can be enabled if channel conditions between detected devices and nearby sectors are available to the network. As an example, in massive MIMO deployments, network performance can be greatly improved via optimized scheduling, load-balancing, and interference suppression, if the large-scale channel gains (link gains) between devices and BS sectors are available \cite{qiaoyang, bethanabhotla2016optimal}. In Sec. \ref{specific-RA}, we describe the specific C-RAN RA protocol we consider for detecting devices. It is based on an adaptation of coded pilot designs of \cite{icc2016-ozgun} for RA.\footnote{The collision detection capability of these codes for RA is also advocated in \cite{7-Larsson}.} Assuming the RA protocol of Sec. \ref{specific-RA}, in Sec. \ref{link-detection} we consider the problem of effectively classifying the strengths of links between detected devices and BS sectors in an effort to enable efficient C-RAN operation during the serving blocks in each frame. \begin{figure \centering \includegraphics[width=8.2cm, height = 3.3cm]{frame.pdf} \vspace*{-0.2cm} \caption{Slotted RA: RA frames and blocks} \label{fig:frame} \end{figure} \subsection{RA protocol based on coded pilot designs of \cite{icc2016-ozgun} } \label{specific-RA} In this section, we describe the protocol according to which active devices engage in RA along with the mechanisms used at the network side to detect active devices. We focus on a fixed but arbitrary RA frame, $f$, and, for convenience, omit the dependence of all parameters and variables on the RA frame index, $f$. We assume that the link gain between any sector $v$ and any device $u$, $g_{vu}$, stays constant for the duration of the frame. We classify the link between sector $v$ and device $u$, as strong when the link strength exceeds a predetermined (operator chosen) $\Gamma$, and as weak otherwise. In the protocol we consider, each RA block comprises $T$ RA pilot slots during which each active device in ${\cal R}$ can access the medium. In any pilot slot, each active device accesses the medium with probability $p$. In particular, the pilot activity of device $j \in {\cal R}$ in pilot slot $t$ is captured by a Bernoulli($p$) random variable, $\chi_{j}(t)$. The $\chi_{j}(t)$'s are statistically independent in $j$ and $t$. The RA overhead parameter $T$ and the access probability $p$ are chosen by the network operator, and are assumed fixed and known to all the devices in the network. The RA protocol we consider leverages the UL pilot designs considered in \cite{icc2016-ozgun} together with large-antenna arrays at each BS. Each device is a priori statically assigned a unique pilot codeword that the device uses in any slot that it sends a pilot. By appropriately processing its pilot-slot observations through its large array, each BS is able to obtain the IDs of any active device that is the only one with a strong link to one of its sectors among all the active devices broadcasting a pilot in a given pilot slot \cite{icc2016-ozgun}. In particular, the combination of the codes in \cite{icc2016-ozgun} and the BS processing enable a BS sector to gather the following information during a fixed but arbitrary pilot slot: \begin{itemize} \item[(i)] when multiple active devices with strong links to the BS sector transmit pilots in the slot, the BS sector detects a {\em collision}; \item[(ii)] when no active devices with strong links to the BS sector transmit pilots in the slot, the BS sector detects {\em silence}; \item[(iii)] when a single active device with a strong link to the BS sector transmits a pilot in the slot, the sector detects the user ID and obtains an accurate estimate of the link gain. \end{itemize} Each BS sector provides the information it has gathered through its $T$ pilot slots to the central unit. By merging this information the central unit is able to obtain ${\cal D}$, the set of detected active devices across the whole network. It is also able to obtain additional valuable information, including: (i) ${\cal V}_{t}^{\emptyset}$: the set of sectors that detected silence on pilot dimension $t$; (ii) ${\cal V}^{j}$: the set of sectors that detected the $j$-th active device (assuming all active devices in ${\cal D}$ are re-indexed from 1 to $|{\cal D}|$); (iii) ${\cal V}_{t}^{-, j}$: the set of sectors that on pilot dimension $t$ detected a device {\em different} from $j$; (iv) link gains between BS sectors and the active devices they detected. \section{Classifying the active device links} \label{link-detection} In this section we focus on classifying the strengths of as many links between active devices and BS sectors as possible based on the information provided in the RA reports of all the BS sectors. In particular, focusing on a fixed but arbitrary RA frame, the goal is to classify at the central unit the links between the BS sectors and the detected devices into two classes: strong and weak. Each BS sector's RA report contains $T$ entries, one per pilot dimension. In accordance to the RA protocol in Sec.~\ref{sec:RA}, for each $t \in \{1,\,2, \,\cdots,\,T\}$, each sector reports one of the following: (i) a pilot collision; (ii) pilot silence; (iii) device detection, along with the identity of the detected device and the associated link gain. In Sec. \ref{problem-formulation} we formulate the strong link detection problem of interest. In Sec. \ref{baseline} we present a baseline scheme that classifies link strengths by processing the RA report information per detected device (i.e., individually). Specifically, the central unit processes the sector RA reports separately per device, and, in the process, infers all the information it can regarding links between the given device and BS-sectors. In Sec. \ref{matrix-completion}, we develop a class of methods motivated by what are referred to as recommendation systems. These online methods jointly classify the links of all detected devices across the network, exploiting in the process the inherent spatial correlation in the link strengths of nearby detected devices without making use of device location information. \subsection{Problem Formulation} \label{problem-formulation} We focus on the problem of classifying the strengths of all links in the network (i.e., between all detected devices and all BS sectors) as strong and weak, during a fixed but arbitrary RA frame $f$ and omit the dependence of all parameters and variables on the RA frame index, $f$. The link gains between the $V$ BS sectors and the set of ${\cal D}$ detected devices in the frame are compactly represented via a $V \times |{\cal D}|$ matrix ${\bf G}$. By letting $o_j\in {\cal D}$ denote the ID of the $j$-th detected device in the frame, the $(i,j)$-th entry of ${\bf G}$ contains the link gain between the $i$-th BS sector and the $j$-th detected device, i.e., ${\bf G}_{i,j}= g_{i,o_j}$. Links are classified as weak or strong based on the comparison against a predefined classification threshold $\Gamma$. To this end, we refer to the $V \times |{\cal D}|$ matrix ${\bf C}$, with $(i,j)$-th entry \begin{equation} \label{Cmdef} {\bf C}_{i,j} =\begin{cases} 1 & \text{if ${\bf G}_{i,j}\geq \Gamma$}, \\ 0 & \text{otherwise} \end{cases} \ \end{equation} as the hypothesis matrix. The task of interest amounts to forming a classifier $\widehat{{\bf C}}$ at the central control unit using the BS sector RA reports, so that $\widehat{{\bf C}}$ is as close to ${\bf C}$ as possible. The classification performance is measured in terms of probability of detection and probability of false alarm, {\em viz.}, \begin{subequations} \label{PDPFdef} \begin{eqnarray} \label{PDdef} P_{\rm D} & =& {\rm Pr}\left(\widehat{{\bf C}}_{i,j} = 1|{{\bf C}}_{i,j} = 1\right),\\ \label{PFdef} P_{\rm F} & =& {\rm Pr}\left(\widehat{{\bf C}}_{i,j} = 1|{{\bf C}}_{i,j} = 0\right)\ . \end{eqnarray} \end{subequations} Our performance evaluations rely on estimates of the quantities in (\ref{PDPFdef}) obtained over $N$ RA frame realizations with large $N$: \begin{subequations} \begin{eqnarray} \widehat{P}_{\rm D} &=& \frac{1}{N}\sum_{f=1}^N \frac{\sum_{i,j} 1_{\{\widehat{{\bf C}}(f)_{i,j} = 1,{{\bf C}}(f)_{i,j} = 1 \}}}{\sum_{i,j} 1_{{\{{\bf C}}(f)_{i,j} = 1 \}}}, \\ \widehat{P}_{\rm F} &=& \frac{1}{N}\sum_{f=1}^N \frac{\sum_{i,j} 1_{\{\widehat{{\bf C}}(f)_{i,j} = 1,{{\bf C}}(f)_{i,j} = 0 \}}}{\sum_{i,j} 1_{{\{{\bf C}}(f)_{i,j} = 0 \}}}\ , \end{eqnarray} \end{subequations} and where we made the dependence of $\widehat{{\bf C}}$ and ${{\bf C}}$ on the RA frame index, $f$, explicit. \subsection{Baseline Scheme} \label{baseline} In this section, we present a baseline scheme, which obtains an estimate $\widehat{{\bf C}}$ by processing the RA reports {\em separately} per detected device. The baseline classifier exploits the fact that some entries of ${\bf C}$ are directly available or can be indirectly inferred from the BS-sector RA reports. Let $\Omega$ denote the subset of $(i,\,j)$ entries of the matrix ${\bf C}$ (i.e., subset of links) where the value ${\bf C}_{i,j}$ is known to the central controller. Also, let $\widebar\Omega$ denote the complement of $\Omega$, i.e., the set comprising of all $(i,\,j)$ entries for which ${\bf C}_{i,j}$ is not known to the controller. Naturally, the baseline scheme sets $\widehat{{\bf C}}_{i,j}={\bf C}_{i,j}$ for all $(i,\,j)\in \Omega$. Furthermore, the baseline scheme applies a randomized decision to determine the value of $\widehat{{\bf C}}_{i,j}$ for each $(i,\,j)\in \widebar\Omega$. In particular, for each $(i,j)\in \widebar\Omega$ the baseline scheme flips a biased coin whose probability of heads equals $\alpha$. The scheme sets $\widehat{\bf C}_{i,j}=1$ if the coin-flip outcome is heads, and sets $\widehat{\bf C}_{i,j}=0$, otherwise. In summary, \begin{equation} \widehat{\bf C}_{i,j}=\begin{cases} {\bf C}_{i,j}& \text{if}\;(i,j)\in\Omega, \\ 1 & \text{if $(i,j)\in\widebar\Omega$, and $c_{i,j}$ = ``heads''} \\ 0 & \text{if $(i,j)\in\widebar\Omega$, and $c_{i,j}$ = ``tails''} \end{cases}, \end{equation} and where $c_{i,j}$ denotes the $\alpha$-biased coin-flip outcome associated with entry $(i,j)$. Due to the randomization in the baseline scheme, its Receiver Operating Characteristic (ROC) curve is piecewise linear. With $\alpha = 1$, all links in $\widebar\Omega$ are classified as strong, yielding the point in the ROC with the maximum false alarm and detection rates $(P_{\rm F,max},P_{\rm D,max}=1)$. For the scheme with $\alpha = 0$, all links in $\widebar\Omega$ are classified as weak, yielding the point in the ROC with the minimum false alarm and detection rates $(P_{\rm F,min}=0,P_{\rm D,min})$. Varying the value of $\alpha$ in the range $[0,1]$ yields all the $(P_{\rm F},P_{\rm D})$ points on the line segment connecting $(P_{\rm F,min},P_{\rm D,min})$ and $(P_{\rm F,max},P_{\rm D,max})$. We next focus on determining the set $\Omega$, or equivalently the set of links that can be obtained from the BS-sector RA reports. It is convenient to express $\Omega$ as $\Omega = \Omega^1 \cup \Omega^0 $, with $\Omega^1$ ($\Omega^0$) denoting the sets of locations of the 1's (0's) in ${\bf C}$ that can be obtained from these reports. {\bf Obtaining the known strong links from the RA reports:} Some entries of ${\bf C}$ are directly available from the RA reports. Focusing, in particular, on the $j$-th detected device, for an arbitrary but fixed index $j$, we note that ${\bf C}_{i,j}$ is available to the controller for all sectors $i$ that detected device $j$. By letting \[ \Omega^1_j=\{ (i,j): \; \text {$i\in {\cal V}^j$}\}, \] with ${\cal V}^{j}$ denoting the BS sectors that have detected the $j$-th device, all the 1 entries in ${\bf C}$ with coordinates in $\Omega^1= \bigcup_{j=1}^{|{\cal D}|} \Omega^1_j$ are directly available at (known to) the central controller. {\bf Inferring zeros:} By preprocessing the RA report per device, $j$, the baseline scheme is also able to infer {\em additional} entries of ${\bf C}$, and, in particular, zero entries (i.e, weak links). First, consider any pilot dimension during which the $j$-th detected device has been detected by a sector in the network: Any sectors that detected silence or a different device (from $j$) in the same pilot dimension {\em must} have a weak link to the $j$-th device. This implies that the following set of entries (all along the $j$-th column) of ${\bf C}$ are known to be zero: \begin{equation} \widetilde \Omega_j^0 = \bigcup_{t\in{\cal T}_j } \left\{(i,j): \ \ i\in{\cal V}_{t}^{\emptyset}\cup{\cal V}_{t}^{-, j} \right\}\ \end{equation} where ${\cal T}_j$ is the set of pilot slots on which the $j$-th (detected) device has been detected by at least one sector in the network. Secondly, the knowledge of the BS geographical locations can be exploited to determine some additional weak links across the network. For two BSs which are {\em sufficiently} far apart, no device can have strong links {\em simultaneously} to {\em both} BSs. Let $d_{\rm thr}$ denote the distance beyond which two BSs are sufficiently far from one another so that no device can simultaneously have strong links to both BSs.\footnote{The distance $d_{\rm thr}$ can be experimentally obtained. Note that with this approach a tiny fraction of the ``known'' entries of ${\bf C}$ are misclassified, that is, $\widehat{\bf C}_{i,j}=0$, while ${\bf C}_{i,j}=1$. Hence, although, in principle, we should have $P_{\rm D, max}=1$, in our experiments $P_{\rm D, max}$ is slightly less than 1.} Using knowledge of the distances between any pair of BSs in the network, the following set of entries (all along the $j$-th column) of ${\bf C}$ are also known to be zero: \begin{equation} \widecheck \Omega_j^0 = \bigcup_{i \in {\cal V}^j } \left\{(i',j): \ \ i'\in{\cal U}^{i}\right\},\ \end{equation} where ${\cal V}^{j}$ denotes the BS sectors that have detected the $j$-th device, and where ${\cal U}^i$ denotes the set of all BS sectors whose distance from BS sector $i$ exceeds $d_{\rm thr}$. In summary, the set of all known zero entries of ${\bf C}$ is given by $\Omega^0= \bigcup_{j=1}^{|{\cal D}|}\Omega^0_j$ , where $\Omega^0_j = \widetilde \Omega^0_j \cup \widecheck \Omega^0_j$. \subsection{Matrix Completion Method} \label{matrix-completion} In this section we consider an online method for improving upon the strong-link prediction performance provided by the baseline scheme. The online method makes use of the intuitive spatial-consistency assumption that there is an underlying low-dimensional subspace describing the links between BS sectors and devices in the network. Consequently, it uses the set of strong and weak links over the set $\Omega$ of (BS-sector, device) pairs (that are available to the central controller via the RA reports) as data to determine the ``best'' low-dimensional model and uses this model to predict and classify links in the complement set $\widebar\Omega$ of (BS-sector, device) pairs. The online methods we consider fall within the class of matrix completion problems, which have recently gained attention in a broad range of applications. One important application is found in recommendation systems, and includes the ``Netflix Challenge'', according to which, movie recommendations are made to customers, based on their previous ratings and other-user ratings \cite{netflix-winner-2009}. At its core, this problem amounts to estimating the missing entries of a rating matrix where the matrix dimensions are the number of movies and the number of customers. While some entries of the matrix are already known, as some customers have rated some of the movies, rating estimates are required for some movie-customer pairs. Since the Netflix Challenge, various solutions have been devised, which take into account various practical aspects of the problem \cite{amazon-ieee2017}. Recommendation systems research is very active, with many state-of-the-art works exploiting deep learning algorithms. As a proof of concept, in this paper we exploit a vanilla solution based on matrix factorization (collaborative filtering with latent factor models) \cite{netflix-winner-2009}. However, more advanced techniques can be also used and can, in principle, yield additional performance~benefits. In adapting the matrix completion problem to our setting, we rely on the following analogy: BS sectors are analogous to movies, devices are analogous to customers, and link gains between devices and sectors are analogous to movie ratings. The problem of interest can be readily mapped into an intermediate matrix completion problem by noting that: (i) the central unit has available ${\bf G}_{i,j} $ for $(i,j)\in\Omega^1$; (ii) the fact that ${\bf G}_{i,j}< \Gamma$ for $(i,j)\in\Omega^0$. As a result, we can formulate the following matrix completion problem: \begin{eqnarray} \label{matrix-completion-problem} \min_{\displaystyle {\bf X}, \hbox{\boldmath$\Theta$}}&\!\!& \sum_{(i,j)\in\Omega^1}\!\!\!|{\bf G}_{i,j}-\widecheck{\bf G}_{i,j}|^2 \,+\!\! \!\! \sum_{(i,j)\in\Omega^0}\!\!\!|\Gamma^- -\widecheck{\bf G}_{i,j}|^2 \\ {\rm s.t.}&\!\!& \widecheck{\bf G} = \hbox{\boldmath$\Theta$}{\bf X}^T,\nonumber \end{eqnarray} for some $\Gamma^-$ appropriately chosen to optimize performance.\footnote{Practical aspects of the optimization problem, regarding rank selection, regularization etc. are discussed in detail in Appendix \ref{app-opt}.} The solution $({\bf X}^*, \hbox{\boldmath$\Theta$}^*)$ to (\ref{matrix-completion-problem}) can be used to classify links {\em not} in $\Omega$. Indeed, by letting $\widehat{\bf G}^* = \hbox{\boldmath$\Theta$}^*{\bf X}^{*T}$, a hypothesis test can be employed for all $(i,j) \notin\Omega$, of the form \begin{equation} \widehat{\bf C}_{i,j}=\begin{cases} 1& \text{if}\; \widehat{\bf G}^*_{i,j}\geq\beta\\\ 0& \text{otherwise} \end{cases}, \end{equation} whereby $\beta$ is chosen so that the false-alarm probability does not exceed a pre-assigned value $P_F$. \begin{figure \centering \includegraphics[width=6.5cm, height = 2.5cm]{block.pdf} \caption{Block diagram for matrix completion approach for online method} \label{lambda1} \vspace{-0.4cm} \end{figure} Varying $\beta$ between $\min(\widehat{\bf G})$ and $\max(\widehat{\bf G})$ can control the detection and false alarm rates, similar to the way the value of $\alpha$ controls these rates in the randomized baseline decision scheme. A block diagram for the proposed online-method is shown in Fig. \ref{lambda1}. \section{Numerical Results} \label{Numerical-Results} In this section, we compare the performance of the matrix completion based sector-device link classification against that of the baseline scheme in terms of detection and false alarm rates as defined in Sec. \ref{link-detection}. We consider a network layout involving $B = 100$ BSs and large numbers of devices, both uniformly distributed over a square geographical area of size $316 \,{\rm m} \times 316\, {\rm m}$. Each BS has $S = 4$ sectors. The four sector orientation is chosen randomly and independently per BS. Fig. \ref{fig:BS-connectivity} shows such a sample layout: BSs are shown with squares and devices are shown with dots (only $500$ devices are shown for representational clarity). \begin{figure \centering \includegraphics[width=7cm, height = 5cm]{BS-connectivity2} \vspace{-0.2cm} \caption{Sample layout including BSs, scatterers, blockers and users.} \label{fig:BS-connectivity} \end{figure} The link strengths between BS-sectors and devices are determined via a generalization of the one-reflection pathloss model in \cite{bursalioglu2016novel} (described in detail Appendix \ref{app-cha}. Fig. \ref{fig:Gain-distance profile} provides a plot of the strengths of all the links between the $400$ BS-sectors and the $500$ devices in Fig. \ref{fig:BS-connectivity} as a function of link distance. The horizontal line in the figure, set at $\Gamma = -18$ dB, reflects the a priori network-defined threshold, separating strong links from weak ones. As the figure reveals, links at similar distances can yield a broad range of link strengths. At the same time, the probability that a given link is strong decreases as a function of the distance. \begin{figure \centering \includegraphics[width=6.2cm, height = 4.5cm]{Gain-distance-profile.pdf} \caption{Pathloss between RRH sectors and devices as a function of distance.} \label{fig:Gain-distance profile} \vspace{-0.4cm} \end{figure} Our comparisons are based on the use of the RA protocol in Sec. \ref{specific-RA}, and are tuned such that an arrival rate of $\lambda_{\rm in} = 500$ devices can be accommodated with an expected delay requirement of $1/\rho$, where $\rho = 0.99$. The RA-block within each frame is assumed to have an overhead of $T = \theta \lambda_{\rm in}$ pilot dimensions, where $\theta=T/\lambda_{\rm in}$ denotes the {\em relative} overheads of the RA scheme. Given $\lambda_{\rm in} = 500$ and $\rho = 0.99$, the target operating point is $\lambda_{\rm out}^{\rm tar.} = 500$ and $\lambda_{\rm ra}^{\rm tar.} = 506$. With this configuration 99\% of the active devices are detected on average during the RA block of a single frame. Implicit in this operating-point specification, however, is the choice of the $p$ parameter, which, given a particular $T$ overhead, guarantees $\lambda_{\rm out} = \lambda_{\rm out}^{\rm tar.} = \lambda_{\rm in}$, with delay requirements $1/\rho$. In principle the value of the $p$ parameter can be determined and tuned via simulations. In particular, as discussed in Sec. \ref{sec:RA}, in order to stabilize the queues and, in addition, meet the delay requirements, the scheme should guarantee the following: \begin{equation} \label{lambda_constraints} \lambda_{\rm out} = \lambda_{\rm in}\;\; \text {and }\;\; \lambda_{\rm out}\geq \rho\lambda_{\rm ra}. \end{equation} \vspace{-0.05cm} Hence, given $\lambda_{\rm in}$ and $T$, we can estimate $\lambda_{\rm out}$ and $\lambda_{\rm ra}$ as a function of $p$ via simulations, and subsequently use the $p$ value that satisfies the constraints in (\ref{lambda_constraints}). As an alternative to extensive simulations, we develop a simple method for predicting the value of $p$ yielding (\ref{lambda_constraints}) and investigate its match in the parameter range of interest based on simulations. The method is based on modeling the device detection process at each sector. This model assumes that, at any given slot $t$ out of the $T$ slots in the RA training block, each active user not yet detected has a probability equal to some value $q$ to be detected in that slot (independent of all other users). Based on this rudimentary model, we can derive the following rule-of-thumb formula between $\lambda_{\rm out}^{\rm model}$ and $ \lambda_{\rm ra}$: \begin{equation} \label{model} \lambda_{\rm out}^{\rm model}(q,T) = \lambda_{\rm ra}\left[1-(1-q)^{T}\right]. \end{equation} For the network in Fig.~\ref{fig:BS-connectivity}, Fig. \ref{lambda2} shows a simulation-based evaluation of the efficacy of the formula in (\ref{model}) using $q=p$ and $\lambda_{\rm ra} = \lambda_{\rm ra}^{\rm tar.} = 506$, as a function of $\theta=T/\lambda_{\rm in}$ and $p$. As the figure reveals, the $\lambda_{\rm out}$ value predicted by the model matches simulations especially well for the values of $p$ that maximize $\lambda_{\rm out}$ and the values of $\theta$ that can reach $\lambda_{\rm out}$. As a result, for any given operating point of interest given by a triplet of ($\rho$, $\lambda_{\rm in}$, $\theta$) values, we set $p = p^*(\theta)=1-(1-\rho)^{\frac{1}{\theta\lambda_{\rm in}}}$. \begin{figure \centering \includegraphics[width=6cm, height = 4.8cm]{lambdaOut_p_various_t_hight.pdf} \caption{$\lambda_{\rm out}$ vs. $p$ curves for various RA overheads} \label{lambda2} \vspace{-0.4cm} \end{figure} Fig. \ref{FA_PD} shows the probability of detection vs. false alarm of strong links for various $\theta$ values. For each $\theta$ value, the dotted line depicts the performance of the baseline scheme, while the associated dashed curve corresponds to the matrix-completion online method. The red solid curve in the figure shows the performance of the matrix-completion method at $\theta=0.2$, operating over a window of the two last frames (current and most recent past frame) in predicting the links of current-frame active devices. As the figure reveals, the online methods yield sizable advantages in predicting strong links. Furthermore, the performance improves when the online method is applied over a window of the two most recent frames. \begin{figure \centering \includegraphics[width=6.5cm, height = 5.5cm]{FA_PD_plots_pp.pdf} \vspace*{-0.4cm} \caption{Detection probability vs. False Alarm for various RA overheads} \label{FA_PD} \end{figure} \vspace{-0.2cm} \section {Conclusion} \label{sec:conclusion} We have studied the efficacy of matrix-completion algorithms in classifying the strengths of links between detected devices and RRH sectors, based on C-RAN RA observations collected across a wide-area network. Our analysis and simulations reveal that such purely data-driven schemes can significantly improve link classification. More important, link classification becomes more accurate when the proposed methods are applied over windows of consecutive RA frames, allowing the algorithm to work on larger numbers of devices. Our work indicates the existence of an efficient representation for the collection of link-strength device vectors in terms of a low-dimensional ``feature'' subspace. One can foresee that, with lots of IoT devices, these feature vectors can be accurately learned and subsequently used to make link predictions per device. Such techniques are left for future work. \vspace{-0.1cm}
\section{Introduction} Recent years have seen a sharply increasing number of studies of molecular clouds in external galaxies \citep{Wilson90, Engargiola03, Rosolowsky03, Kawamura09, Gratier10b, Gratier12, Donovan-Meyer13, Schinnerer2013, Druard14, Corbelli17, Freeman17}. All of these authors wanted to know whether we could apply knowledge of molecular clouds in the Milky Way to other galaxies and other environments. Of particular interest was the metallicity but also the morphology of the host galaxy. M~33 is a small spiral galaxy in the Local Group with a thin disk and a metallicity about half that of the solar neighborhood. It is at about 840~kpc \citep{Galleti04} and rather ideally inclined with an inclination of $56^\circ$, such that cloud velocities are straightforwardly separated and the structure of the disk is plainly visible. The full disk of M~33 was observed in the CO(2--1) line with the IRAM 30meter radiotelescope \citep[see details in][]{Gardan07,Gratier10,Druard14}, yielding a resolution of 12$"$ or 49~pc. The CPROPS software \citet{Rosolowsky06} was used to extract a 566 cloud sample from the CO data cube \citep[see][for details]{Gratier12,Druardthesis} and published in \citet{Corbelli17}. The 566 clouds identified in M33 were classified in terms of their star formation by \citet{Corbelli17} \citep[following ][]{Gratier12} and here we use this classification to compare star-forming clouds from those with no observed star formation. Figure 1 (left) shows the CO(2--1) integrated intensity map with the cloud contours superposed. We use the cloud sample to investigate trends in linewidths in M~33 and in the broader context of Local Group galaxies and M51. We specifically look for a connection between galaxy metallicity and the cloud size-linewidth relation. Some of the work based on a partial cloud sample and presented in \citet{Gratier12} is redone with the full cloud sample. The link between cloud mass spectra and star formation is examined and Herschel SPIRE photometry data are used to estimate dust temperatures for the star-forming and non-star-forming clouds. In this work we study not only the general properties of the clouds but also look for velocity gradients across the clouds as signs of possible cloud rotation. Assuming that the medium out of which clouds form is larger than the molecular cloud, angular momentum conservation should result in detectable rotation velocities \citep[see e.g.][]{Rosolowsky03}. The first to measure cloud velocity gradients, in order to trace cloud rotation, were \citet{Kutner77} who estimated a large-scale velocity gradient of $0.135\kms {\rm pc}^{-1}$ opposite to galactic rotation (retrograde). These authors argue that the velocity gradient is due to rotation. In the review by \citet{Blitz93}, it is concluded that velocity gradients are probably the result of rotation but that individual clouds (they identify W3) could be exceptions. A more detailed discussion of Milky Way cloud velocity gradients can be found in \citet{Phillips99}. Our observations are GMC-scale, as opposed to much smaller scales where rotating disks are apparent, so influences other than rotation may be present in our measures (see Section 3). \citet{Rosolowsky03} were the first to look at velocity gradients in an external galaxy. Extragalactic work is quite complementary to the Galactic observations as the biases are not at all the same although the spatial resolution is much poorer. They identified 45 molecular clouds in M~33 and found velocity gradients to be very low, with nearly half in the retrograde direction. \citet{Imara11b} looked at the sample and suggested that in fact the clouds may not be rotating. We use our sample of 566 clouds to re-evaluate the question of cloud rotation. \begin{figure*} \centering \includegraphics[width=\hsize{}]{rot_fig1.eps} \caption{(left) CO(2--1) integrated intensity map of M33 with the cloud contours superposed in red and a zoom on cloud \#4 showing (top right) the velocities as measured using Eq (1) , (middle right) the fit to the velocities using Eq (2), and to the bottom right the velocity residual, all in $\kms$. } \label{rot_fig1} \end{figure*} \section{Cloud properties} In addition to estimating 3D cloud boundaries, CPROPS generates information such as deconvolved sizes and cloud luminosities. Outside the CPROPS calculations, we estimate cloud linewidths as in \citet{Gratier12} by fitting a gaussian line profile to the average cloud profile. Cloud masses are estimated by assuming a constant $\ratio$ factor of $4 \times 10^{20} \Xunit$ and a CO($\frac{2-1}{1-0}$) line ratio of 0.8. These values have been validated by \citet{Druard14}, \citet{Gratier17}, and \citet{Braine10b}. CPROPS was able to estimate deconvolved radii for 449 out of 566 clouds. In order to provide radii for the remaining 20\%, we use the link between non-deconvolved and deconvolved radii for the 449 clouds to extrapolate to determine deconvolved radii for the remaining clouds. This enables the use of the whole sample but does not change the results. Figure~\ref{decon} shows the relation we fit with the 449 clouds (black) and the values calculated for the others (red symbols). From now on, we use the whole set of deconvolved cloud radii when radii are used. Over the whole disk, about half the CO emission comes from identified clouds. The fraction decreases with galactocentric distance: 2/3 of the CO emission is in clouds in the inner disk and 1/3 in the outer disk \citep{Druardthesis}. \begin{figure} \centering \includegraphics[width=\hsize{}]{decon.eps} \caption{ Link between CPROPS undeconvolved cloud radii (x-axis) and deconvolved radii for the 80\% of the clouds with well-defined deconvolved radii (black symbols). The red triangles show the radii attributed to the clouds for which CPROPS could not estimate radii -- the radii follow the envelope defined by the CPROPS values down to a constant value below which we have no confidence. The goal here is to avoid generating clouds which are inappropriately small while still attributing reasonable radii. } \label{decon} \end{figure} \subsection{Size-linewidth relation} Figure~\ref{size-linewid} shows the size-linewidth relation for the M33 clouds (red symbols) as compared to other nearby galaxies for which similar data are available, including our own Galaxy. The \citet{Solomon87} relation for the Milky Way is shown as a line. M~51 data come from \citet{Colombo14}, the LMC region from \citet{Hughes10}, and the NGC~6822 data from \citet{Gratier10b}. Two things are apparent from Figure~\ref{size-linewid}. First, the size-linewidth relation is very weak in M~33, NGC~6822, and M~51, but apparently strong in the Galaxy and the LMC, although Fig. 4a of \citet{Hughes10} shows that there is a very high dispersion in the relation in the LMC. Second, the smaller (and lower metallicity) galaxies have clouds with narrower lines at a given size. {\it To our knowledge, this is the first time this has been noticed.} Given the link between metallicity and galaxy size or mass, it is not clear whether the narrower lines are due to the change in metallicity or the change in stellar surface density. Nonetheless, this shows that molecular clouds have distinctly different properties in different types of galaxies. A number of studies have shown that, even after correcting for a varying $\ratio$ conversion factor, the molecular gas consumption time is lower in low-metallicity galaxies \citep{Gardan07, Gratier10, Braine10b, Dib11, Druard14}. This is likely partially due to the weaker stellar winds, slowing cloud dispersal, in subsolar metallicity stars, but also because molecular gas is likely to form at slightly higher densities due to the reduced dust content. Both factors could result in lower cloud line widths for a given size. Clearly, a change in the stellar Initial Mass Function could greatly affect the elements of the above calculation. \begin{figure} \centering \includegraphics[width=\hsize{}]{size-linewid1.eps} \includegraphics[width=\hsize{}]{size-linewid2.eps} \caption{Size-linewidth relation for M33 clouds and other galaxies observed with similar or better angular resolution. In the top panel, the clouds with extrapolated radii are shown as magenta symbols and the remaining 80\% of the M~33 clouds are shown in red. The non-M~33 clouds are shown as black symbols. The region populated by LMC clouds is hatched and the M51 data (squares) are binned averages. The lower panel has logarithmic axes and has all M~33 clouds in red. The line labelled SRBY is the \citet{Solomon87} relation for the Galaxy. } \label{size-linewid} \end{figure} Another way of looking at the size-linewidth relation and its variation is shown in Fig.~\ref{erik3}. Here we plot the linewidth normalized by the square root of the cloud radius, in order to eliminate the standard size-linewidth relation. The \citet{Solomon87} relation would be a horizontal line at 1.7 $\kms$ pc$^{-1/2}$ in this plot. The M33 clouds are seen as small black triangles and they are binned by radial intervals (large black triangles) to show how this quantity, which can be thought of as the turbulent line width on a 1 pc scale, varies with galactocentric distance. A clear decrease can be seen with distance from the center. The large error bars indicate the dispersion and the small red error bars indicate the uncertainty in the mean value. The radial distances in M~33 cover a range of about 7kpc, with few clouds beyond 6.5 kpc. All of the M~33 averages fall below the \citet{Solomon87} relation. For comparison, we took the large sample of \citet{Heyer01} for the outer disk of the Milky Way. Taking the clouds larger than 1~pc, we calculated the linewidth normalized by the square root of the cloud radius and binned by as a function of the distance from the Galactic center. These points are shown as red pentagons and the distance is given on the red upper scale, covering nearly 12kpc from the solar circle to 20 kpc. As for the black triangles, the large error bars give the dispersion and the small error bars give the uncertainty in the mean value. The decrease in the turbulent line width on a 1 pc scale is very similar to that in M33, confirming that indeed cloud linewidths decrease with increasing galactocentric distance. \begin{figure} \centering \includegraphics[width=\hsize{}]{erik3.eps} \caption{ Turbulent line width on a 1 pc scale as a function of galactocentric distance in M33 (black) and the outer Milky Way (red). Individual M~33 clouds are shown as small black triangles and the large symbols are the binned averages for the M33 clouds (large black triangles) and for the \citet{Heyer01} outer Galaxy clouds (red pentagons and red upper distance scale). The large and small error bars on both symbols indicate respectively the dispersion and the uncertainty in the mean on the average values. Both galaxies show a modest decrease with galactocentric radius.} \label{erik3} \end{figure} \subsection{Linewidth variation with galactocentric distance} It is known that the HI line widths in galaxies decrease with galactocentric distance \citep{Tamburro09} but few measures are available for molecular lines of individual clouds. \citet{Braine10a} reported a decrease in their sample of a few clouds in M33 and \citet{Gratier12} reported a weak decline in linewidth. Figure~\ref{dist-dvco} shows the results for the whole sample of 566 clouds. The decline in linewidth is only slight but is significant at the $8\sigma$ level, similar to what was found by \citet{Gratier12}. The uncertainty is obtained by bootstrapping, using 5000 iterations each choosing 566 clouds randomly out of the sample (allowing clouds to be chosen more than once or not at all) and examining the dispersion in the correlation coefficient of the fit between galactocentric distance and linewidth \citep[see details in ][]{Gratier12}. It can be seen that the dispersion in line widths is generally lower for the gaussian fits so these were used in Figure~\ref{size-linewid}. \begin{figure} \centering \includegraphics[width=\hsize{}]{dist-dvco.eps} \caption{ Variation of the cloud linewidth versus galactocentric distance. Black symbols are the line widths from CPROPS and red symbols are from fitting gaussians to the cloud spectra. Errorbars indicate the dispersion within each bin, showing that generally the gaussian fits yield fewer extreme results \citep[as found by ][]{Gratier12}.} \label{dist-dvco} \end{figure} \subsection{ Cloud brightness as a function of galactocentric distance} It is well-known that the large-scale CO brightness of galaxies decreases with distance from the center in most galaxies \citep[see][for survey and M33 results respectively]{Young95, Druard14}. Notable counter-examples are M~31 and M81. \citet{Gratier12} showed that for the then available cloud sample in M~33 the clouds became considerably less CO-bright with increasing distance to the center. Here we use the entire cloud sample and two different measures of brightness: Fig.~\ref{dist-tco} shows the peak line temperature reached within the cloud and the peak of the gaussian fit to the cloud-averaged line profile. The decrease in both quantities is approximately a factor two over 4 kpc, corresponding to a scale length of about 6 kpc. The average CO surface brightness per kpc$^2$ decreases much more quickly, with a scale length of approximately 2 kpc \citep{Druard14}. \begin{figure} \centering \includegraphics[width=\hsize{}]{dist-tco.eps} \caption{Galactocentric radius (x-axis) versus peak line temperature reached within the cloud (black, left y-scale) and the peak of the gaussian fit to the line profile (red symbols, right scale). The factor two difference between the left and right scales is because the peak line temperature is from a single position and is about twice as strong as the gaussian fit to the cloud-averaged line profile. Both temperatures decrease in a similar way.} \label{dist-tco} \end{figure} \subsection{Mass spectrum of M~33 clouds} The sample of molecular clouds analyzed here, whose individual cloud properties have been given in the on-line table of \citet{Corbelli17} is one of the largest of any galaxy and the largest for which a classification in terms of star formation has been established. We fit a truncated power law to the distribution of cloud masses above the completeness limit, following the procedure described by \citet{Maschberger09} and the methods described in \citet{Gratier12}, to determine mass spectra for the sample and subcategories, making the assumption as elsewhere that the CO luminosity reflects the mass of clouds \citep[cf.][]{Corbelli17}. For the entire sample of 566 clouds, we obtain an exposant $\alpha=1.65$ defining the slope of the mass spectrum $n(m)dm \propto m^{-\alpha} dm$ (Fig~\ref{mass_spec}). The upper panel shows, as seen previously by \citet{Gratier12} and \citet{Rosolowsky05} that the mass spectrum steepens in the outer disk. With the larger sample, we are able to divide the sample into 3 radial bins with close to 200 clouds per bin, far more than earlier samples. The slope of the mass function steepens from $\alpha=1.4$ to $\alpha=1.9$ with radius and would probably continue to steepen but the number of clouds available (above the completeness limit) decreases sharply, such that the slope becomes poorly defined. The cause of such a steepening remains unclear so we also compared the mass spectra of the clouds at different stages in the star formation process. The lower panel of Fig~\ref{mass_spec} compares the sub-sample of non-star-forming clouds (A) with clouds showing embedded and exposed star formation \citep[respectively B and C clouds, ][]{Corbelli17}. The spectra are remarkably different: the C clouds are more massive and have a distinctly flatter spectrum than, particularly, the clouds without star formation. The B clouds, less numerous, are intermediate. This behavior mimics the radial variation and indeed there is some degeneracy as the star-forming clouds are on average closer to the center than those without star formation. While the cloud classification system is not the same, \citet{Kawamura09} also found that the more evolved clouds were more massive. We \citep{Corbelli17} attribute this to continued gas accretion. Since we measure CO emission, and not mass directly, a systematic variation in the $\ratioo$ conversion factor could generate a similar result. There are two reasons for thinking that this is unlikely. A sophisticated bayesian analysis of the $\ratioo$ factor (and "dark gas") by \citet{Gratier17} found no identifiable variation in the $\ratioo$ conversion as a function of radius in M~33. Secondly, the dust-based cloud masses from the Herschel data show the same trends with star formation class. The sample is large enough to be divided further in order to determine whether the steepening is primarily due to lack of star formation or position in disk. We thus selected A and C clouds beyond 2 kpc from the center of M33, obtaining 98 A clouds above the completeness limit with an average galactocentric distance of 3.5 kpc and respectively 174 clouds and a distance of 3.9 kpc for the C clouds. These are plotted as solid lines in Fig~\ref{mass_spec2}. Despite the higher average galactocentric distance, the outer disk C clouds have significantly higher masses and a shallower mass spectrum than the A clouds. In the figure, the number of clouds given is the total sample population, not the number above the completeness limit (given above). Although A clouds are not common in the inner disk, we selected A and C clouds within respectively 2.5 and 2.8 kpc from the center, yielding 47 and 135 clouds above the completeness limit with an average galactocentric distance of 1.6 kpc for both samples. Again, the mass spectra are very different, with the non-star-forming clouds being very similar to the outer disk population even when they belong to the inner disk. {\it Clouds, and their mass spectra, change as star formation develops and progresses.} This change is more important than their position in the disk although the change in CO luminosity is greater as a function of galactocentric distance than star-formation class. \begin{figure} \centering \includegraphics[width=\hsize{}]{mass_spec_rad.eps} \includegraphics[width=\hsize{}]{mass_spec_abc.eps} \caption{ Mass spectra of M~33 molecular clouds. The y-axis gives the cumulative number of clouds with mass above the corresponding x-axis mass. The vertical line shows the completeness limit as in \citet{Corbelli17}. The black line shows the whole sample in both panels. The color-coded $\alpha$ values give the slopes of the mass spectra. In the top panel, clouds are segregated by galactocentric radius as indicated -- the sample has been divided into 3 roughly equally populated radial bins. In the lower panel, the types indicate clouds with exposed star formation ({\it e.g.} H$\alpha$ emission), embedded star formation, and no star formation, denoted respectively C, B, and A types. The division into types is discussed in \citet{Corbelli17} and \citet{Gratier12}. The solid lines are the results of the fits, with the color corresponding to the (sub)sample. } \label{mass_spec} \end{figure} \begin{figure} \centering \includegraphics[width=\hsize{}]{mass_spec_rad_ac.eps} \caption{ Similar to Fig.~\ref{mass_spec} but separating inner and outer disk A and C clouds. It is immediately apparent that galactocentric distance is less important than star formation. The number of clouds and the slope of the mass function are given for each group. See text for further details.} \label{mass_spec2} \end{figure} \subsection{Dust temperatures with and without star formation} Herschel SPIRE data are available for M33 and, following \citet{Braine10b}, we use the 250$\mu$m to 350$\mu$m flux ratio (after convolving the 250$\mu$m maps to the 350$\mu$m resolution) to estimate dust temperatures for the clouds. We use a dust emissivity $\beta = 1.8$ for M33, following \citet{Tabatabaei14} for inner disk clouds, in order to calculate the temperatures. While the absolute temperatures determined will vary, the fact that star-forming clouds have demonstrably higher dust temperatures (see Figure~\ref{herschel_fluxes}) than non-star-forming clouds does not change with the value of $\beta$ or wavelengths used. The non-star-forming ('A') clouds have significantly lower dust temperatures and FIR fluxes than the star-forming clouds, although the fluxes have a very broad distribution for all cloud types. The 'B' clouds, with embedded star formation but little or no H$\alpha$ emission, are presumably on average younger than those ('C') with exposed star formation. The dust temperatures in the Herschel bands are not distinguishable between 'B' and 'C' clouds but the 250$\mu$m fluxes are slightly lower for the 'B' clouds. \begin{figure} \centering \includegraphics[width=\hsize{}]{herschel_fluxes2.eps} \caption{Representative dust temperatures for the big grain component in M33. The decomposition into subsamples in terms of their star-forming properties shows that non-star-forming clouds have lower dust temperatures, although the bands used to estimate dust temperatures are completely independent of those used to classify the star formation in the clouds. } \label{herschel_fluxes} \end{figure} \section{Rotation of molecular clouds} As in all previous work on the subject (see references in introduction), we assume that velocity gradients reflect cloud rotation. Rotation clearly results in velocity gradients. However, other processes such as turbulence may be able to create velocity gradients \citep[see e.g.][for small scales]{Burkert2000}. The velocity gradient is our only measurable and the systematic aspect of the gradients (Sect. 3.2) argues against other processes. As in earlier work \citep[e.g.][]{Rosolowsky05}, the first moment of each spatial pixel in the cloud was calculated. In our implementation, we used 5 velocity channels (13 $\kms$), centered on the central velocity of the cloud, to measure the first moment \begin{equation} v_{(x,y)} = \sum_{i=cen-2}^{i=cen+2} v_i T_i dv / \sum_{i=cen-2}^{i=cen+2} T_i dv . \end{equation} This was found to avoid bringing in too much noise (i.e. as when more channels are used) while still covering the velocities occupied by the cloud. This yields a velocity for each position in the cloud. A plane is then fit to these velocities \begin{equation} v_{(x,y)} = ax + by + c \end{equation} where $a=\frac{\partial v}{\partial x}=\frac{\partial v}{\partial RA}$ and $b=\frac{\partial v}{\partial y}=\frac{\partial v}{\partial Dec}$ because $x$ and $y$ are the pixel numbers following the RA and Dec directions. The process is illustrated in Figure 1, which shows the CO(2--1) map of M33 with the cloud contours superposed and a zoom on a cloud showing the velocities as measured using Eq (1) in the top right panel, the fit to the velocities using Eq (2), and to the bottom right the residual ($v - v_{\rm fit}$). This cloud (\#4 in the catalog) was chosen to illustrate the process for its rather clear gradient despite its elongated form. It is worth noting that there is emission which CPROPS was not able to decompose into clouds and that the fraction of the CO emission not decomposed into clouds increases with radius. \begin{figure} \centering \includegraphics[width=\hsize{}]{rot_fig2b.eps} \caption{Histogram of cloud velocity gradients -- for the entire sample in black and for only the stronger clouds in red, where the line temperature averaged over the whole cloud is over 100mK T$_a^*$. Prograde rotation is given a negative sign here because the galaxy rotation velocity increases with decreasing declination. } \label{rot_fig2} \end{figure} M33 is an inclined spiral whose North(-east)ern side is approaching, i.e. a higher negative velocity. The near side of the disk is the western side. The geometry is most easily visualized if one initially thinks of M33 as oriented N-S. Thus, prograde follows the rotation of the disk, in which velocities become more negative to the North. Rotating M33 counter-clockwise by 22.5$^\circ$ to its true orientation on the sky, things change little in that northern parts of a cloud have increasingly negative velocities when cloud rotation is prograde. The gradients are measured as $\| \bigtriangledown V \| = \sqrt{(\frac{\partial v}{\partial RA})^2 + (\frac{\partial v}{\partial Dec})^2 }$ where $\frac{\partial v}{\partial RA}$ and $\frac{\partial v}{\partial Dec}$ come from the fits of a plane to the cloud velocities. The sign of the gradient (negative for prograde, positive for retrograde in order to fit the true orientation of M~33) follows the sign of $\frac{\partial v}{\partial RA} sin(22.5)+\frac{\partial v}{\partial Dec} cos(22.5)$. Figure \ref{rot_fig2} shows the cloud velocity gradients -- for the entire sample in black and for only the high signal-to-noise (S/N) clouds in red. The fact that the distribution of velocity gradients extends to higher (absolute) values for the lower luminosity clouds is an immediate suggestion that noise is contributing to the observed gradients. Moving to the more luminous clouds (red), not only is the distribution of velocity gradients narrower but it is more skewed towards negative (prograde) values. It may be worth noting that no difference in linewidth or in velocity gradient between star-forming (C clouds, cf. Sections 2.4 and 2.5) and non-star-forming clouds is found in our sample. \subsection{Beam smearing} Molecular clouds are comparable in size to the angular resolution of our observations. A typical (deconvolved) cloud radius is about 45 pc (Fig.~\ref{size-linewid}), to be compared with the 24pc beam half-power radius. The goal of this section is to create mock clouds and compare the gradients derived before and after convolving with the telescope beam. Intuitively, one expects gradients to weaken as the angular resolution is degraded. We create mock clouds with exactly the same gradients and sizes as those we have measured. The gradients are injected as being linear and along the direction of the observed gradient. The peak line temperature decreases linearly with distance to the cloud center until it reaches the noise level. The lines are assumed gaussian. This process is described in more detail in Section 4. No noise is added in this step as we wish to measure the effect of resolution and not noise (done later). After creating 566 mock clouds, we convolve them with a gaussian beam of half-power width $12\arcsec$. We then follow exactly the same procedure to measure the gradients. Fig.~\ref{conv} shows the comparison of the injected and recovered gradients (after convolution). As could be expected, the post-convolution gradients are smaller, with an average ratio of 0.59. We use this to correct the observed gradients in order to estimate rotation periods, angular momenta, and rotational energies. None of the gradients after convolution are higher. \begin{figure} \centering \includegraphics[width=\hsize{}]{conv_fig.eps} \caption{Comparison of the gradients measured pre- and post-convolution with the telescope beam. On average, a correction factor of 1/0.59 should be applied to the observed gradients.} \label{conv} \end{figure} \subsection{Comparison with simulations} Simulations appear to favor prograde rotation but the comparison with our measures is not always straightforward. \citet{Dobbs08} and \citet{Li17} use the specific angular momentum, defined as the angular momentum per unit mass averaged over the cloud, instead of the gradient. The units are km s$^{-1}$ pc. The angular momentum of a rotating disk with a surface density declining as $\Sigma(r) = \Sigma(r_0) (r/r_0)^{-1}$ is $L=\int_0^R r^2 \, \Omega \, \Sigma(r) \, 2\, \pi\, dr$. Dividing by the mass of the disk ($2 \pi \Sigma_0 r_0 R$) yields a specific angular momentum of $j=\Omega R^2 / 3$ where $\Omega$ is the angular velocity and R the outer radius of the disk. A finite sphere with a density decreasing as $r^{-2}$ yields a similar result. If the disk has a constant surface density, then the specific angular momentum is $j=\Omega R^2 / 2$ \citep{Blitz93} but this is less likely. We thus consider the specific angular momentum of our clouds to be $j=(\Omega / 0.59) \, R^2 \, / 3$ where the 0.59 corrects for the underestimate in the velocity gradient due to beam smearing. \begin{figure} \centering \includegraphics[width=\hsize{}]{ang_moma.eps} \includegraphics[width=\hsize{}]{ang_momb.eps} \caption{ Specific angular momenta of the M33 clouds. Red lines or symbols indicate data for the CO-strong clouds. The top panel shows clearly that the asymmetry favoring prograde gradients (Fig.~\ref{rot_fig2}) is also present for the angular momenta. The lower panel shows that the variation of angular momentum with cloud mass is very weak and was designed for comparison with simulations. } \label{ang_mom} \end{figure} Fig.~\ref{ang_mom} shows the distribution of the angular momenta of our clouds. The top panel is a histogram similar to the velocity gradients. The bottom panel is intended to be useful for comparison with Figure 8 of \citet{Dobbs08}, giving the angular momenta as a function of cloud mass. In both panels, the strong clouds are in red and retro/prograde rotation are separated either by sign (top) or by symbol (bottom). Prograde rotation clearly dominates, as in the simulations where the self-gravity plays a role in the \citet{Dobbs08} simulations. Comparing with \citet{Li17} Run VI, the distribution of the angular momenta in the M33 clouds appears narrower. The \citet{Li17} simulations have lower cloud masses and angular momenta for the high resolution Run VI, although the resolution of our observations is worse (suggesting that the difference would be greater if the spatial resolutions were closer). Without more measurements of angular momenta of clouds, including in higher surface density galaxies than M33, it is difficult to be conclusive about the comparison with simulations. \section{Tests of velocity gradients} We first need to convince ourselves that we measure real gradients. The fact that the pro/retrograde differences are more pronounced for the high S/N sample is certainly a sign that this is the case. In the following subsections, we examine the effect of beam smearing due to the resolution of our observations and create mock clouds with properties very similar to the real clouds in order to test our ability to retrieve cloud rotation in the presence of noise. The mock clouds are created using the masks of the real clouds, such that the sizes and shapes are perfectly represented. The noise level of the cube is about 20 mK per channel \citep{Druard14} and we generate mock clouds with peak CO line temperatures T$_{max} = 100, 200, 400, 800$ mK in order to obtain varying S/N levels. The pixels are then given a temperature \begin{equation} T_{xyj} = [20+(T_{max}-20) \times (1-\frac{R}{R_{max}})] \, exp(-\frac{(v_j-v_{xy})^2}{2\Delta V^2}) \end{equation} where x, y, and j represent respectively the pixel numbers along the RA, Dec, and velocity axes, and $R$ the distance from the center of the cloud (the position of the center of the cloud is returned by CPROPS). The gradient is injected through the function relating $v_{xy}$ and the position through Eq. (2). Thus, the line is centered on the velocity $v_{xy}$ and follows a gaussian with dispersion $\Delta V$. As can be seen in Fig.~\ref{dist-dvco}, the linewidth at half power is roughly 7 $\kms$. We therefore inject a velocity dispersion $\Delta V = 3$ $\kms$, corresponding to a half-power linewidth of 7.05 $\kms$. The central temperature decreases linearly with from T$_{max}$ to the noise level. The sampling in space and velocity is the same as for the real cube (3\arcsec, 2.6$\kms$). The next step is to add noise. We add random gaussian noise using the well-tested $noise$ random number generator within {\sc gildas}. However, the data cube has undergone many transformations and the true noise may not be precisely gaussian. Thus, we extract contiguous channels from signal-free regions of the cube which we use as noise. In fact, as any transformations were designed to preserve particularly the region where signal is present, this is a sort of worst-case noise. \subsection{No velocity gradient with noise} We first examine what we obtain from mock clouds with no velocity gradient, {\it i.e.} with $v_{xy}$ constant. Fig.~\ref{zerograd} shows the results for T$_{max}=200$ mK using both purely random noise and noise taken from signal-free but unoptimized regions of the cube. The gradients, for equivalent clouds and noise levels, are clearly more dispersed with the "real" cube noise. The dispersions, as measured by the full width at half power of the distrbution (divided by 2.35 to give the equivalent for a gaussian), are approximately 0.008 and 0.015 $\kms {\rm pc}^{-1}$for the random and cube noise injection. T$_{max}=200$ mK corresponds roughly to the median signal in the cloud sample. We have also tested with higher and lower S/N levels. For T$_{max}=100$ mK, the dispersion increases to 0.014 and 0.029 $\kms {\rm pc}^{-1}$for respectively random and cube noise. For T$_{max}=400$ mK, the dispersion decreases to 0.005 and 0.0085 $\kms {\rm pc}^{-1}$for respectively random and cube noise. \begin{figure} \centering \includegraphics[width=\hsize{}]{zerograd.eps} \caption{Histogram of gradients from noise. The black line shows the distribution of the gradients for purely random noise. The red line shows the distribution when noise is from signal-free regions of the cube. No velocity gradient has been injected here.} \label{zerograd} \end{figure} \section{Evaluating uncertainties on cloud rotation} The same operations were done with the observed gradients, creating the same clouds but injecting the velocity gradient deduced from the observations for each cloud. Should there be a link between size or shape and the velocity gradient deduced from calculating the first moment, the link would be preserved in these tests. Fig.~\ref{grad200} shows the distribution of the retrieved gradients. The clouds were created with the observed gradients and shapes and then noise was added and the gradients remeasured. This can be directly compared with Fig.~\ref{rot_fig2}. The distribution in Fig.~\ref{grad200} is of course wider because the gradients from Fig.~\ref{rot_fig2} have been injected and then noise added. The process was repeated with T$_{max}=100$ mK and the distribution is significantly wider but the prograde-retrograde asymmetry is nonetheless preserved. We are thus confident that the gradients retrieved reflect the true distribution of velocity gradients, although the distribution is likely broadened by the presence of the noise in the datacube. \begin{figure} \centering \includegraphics[width=\hsize{}]{grad200.eps} \caption{ Like Fig.~\ref{zerograd} except that the observed gradients (see Fig.~\ref{rot_fig2}) have been injected, noise added, and the gradients recovered. Black line shows the distribution of the gradients for purely random noise. The red line shows the distribution when noise from signal-free regions of the cube. As in Fig.~\ref{zerograd}, T$_{max}=200$ mK.} \label{grad200} \end{figure} \subsection{Galactic gradient} M~33 itself has a velocity gradient due to rotation. Since the position angle of M33 is close to vertical, there is little gradient expected along the RA ($x$) axis but there is a negative gradient along the Dec ($y$) axis because at higher Declinations the velocity is more negative. We calculate this for axisymmetric rotation assuming the rotation curve given in Eq. 18 of \citet{Lopez17}: $$ V(r) = V_0 \frac{(r/r_0) +d}{(r/r_0)+1} $$ where $V_0 = 139.2$ $\kms$, $r_0=1.3$ kpc, and $d=0.12$. Figure \ref{rot_fig3} shows the local velocity gradients $a=\frac{\partial v}{\partial RA}$ and $b=\frac{\partial v}{\partial Dec}$ derived from the axisymmetric rotation curve. The plot of $\frac{\partial v}{\partial Dec}$ is negative everywhere with fairly high (absolute) values but $\frac{\partial v}{\partial RA}$ has both negative and positive regions with a positive average. These values come exclusively from the rotation curve and thus include differential rotation and thus shear. Figure \ref{rot_fig3} is not very intuitive. In order to qualitatively understand the negative and positive zones, let us think of isovelocity curves of a differentially rotating spiral disk with a monotonically increasing rotation curve (the so-called spider diagram). When the major axis is vertical (N--S), then the only horizontal iso-velocity curve (i.e. $\frac{\partial v}{\partial RA}=0$) is along the minor axis. There are no vertical (i.e. $\frac{\partial v}{\partial Dec}=0$) iso-velocity curves, such that for velocities decreasing towards the North, $\frac{\partial v}{\partial Dec} < 0$ everywhere. Now let us rotate the diagram counterclockwise slightly. In the northern half, we will have a locus of $\frac{\partial v}{\partial Dec}=0$ points just to the left of the major axis, where the iso-velocity curves are briefly horizontal. Slightly above the minor axis and to the left, the isovelocity curve which went slowly upwards pre-rotation now is approximately flat, leading to another series of $\frac{\partial v}{\partial Dec}=0$ points. The same is true by symmetry to the South. No such region where $\frac{\partial v}{\partial Dec}=0$ is present to the upper right or lower left. The magnitude can be understood by imagining how closely spaced (along RA or along Dec) the isovelocity curves are (for equal velocity spacing). This is why the highly negative regions of $\frac{\partial v}{\partial Dec}$ are close to the minor axis. Similarly, $\frac{\partial v}{\partial RA}$ is high where isovelocity curves are closely spaced and close to vertical. In all cases, the velocity gradients due to galactic rotation are larger near the center where the rotation rises sharply. \begin{figure*} \centering \includegraphics[width=\hsize{}]{rot_fig_dvdxy3_edvige.eps} \caption{Coefficients $\frac{\partial v}{\partial RA}$ (left) and $\frac{\partial v}{\partial Dec}$ (right) calculated for adjacent pixels using the rotation curve above. Units are meter~s$^{-1}$~pc$^{-1}$ and the color wedges are shown at the top of each panel. In the left panel, contours are drawn at 0, 10, and 20 m~s$^{-1}$~pc$^{-1}$ and in the right panel at -10, -20, and -30 m~s$^{-1}$~pc$^{-1}$. } \label{rot_fig3} \end{figure*} \subsection{Comparison of cloud and galactic gradients} Having fit a plane to the velocities of the pixels making up each cloud, we have the gradients along the RA and Dec axes and we can look for patterns. Given Fig.~\ref{rot_fig2} which shows that we can have more confidence in the high-luminosity clouds, we plot the gradients for the stronger clouds in Fig. \ref{rot_fig4} in a way that can be compared directly with Fig.~\ref{rot_fig3}. Let us consider the "null" hypothesis to be that clouds {\it on average} are not rotating with respect to their surroundings, {\it i.e.} they rotate with the galaxy. Our results are close to this "null" hypothesis (cf. Figures ~\ref{rot_fig3} and \ref{rot_fig4}). If correct, an implication is that the cloud formation mechanism has little influence on the velocity gradient. From Fig.~\ref{rot_fig2}, a typical prograde rotation velocity is $\la 0.03$ $\kms$~pc$^{-1}$. Fig. \ref{rot_fig4} shows that this is a good representative value for the CO-strong clouds. Including a factor $1/0.59$ to compensate for the beam smearing discussed earlier, this yields $\Omega \la 0.05$ $\kms$~pc$^{-1}$. The rotation period is thus about $T=\frac{2 \pi}{\Omega} \approx 120$ Myr, which is similar to the rotation period of the inner disk of M33. Thus, not only are real gradients measured in these clouds but we are able to show that they are dominated by prograde rotation despite the extremely low values. The rotation periods are longer than cloud lifetimes and comparable to the Galactic rotation period. The link between Fig.~\ref{rot_fig3} and Fig.~\ref{rot_fig4} is real: the average observed $\frac{\partial v}{\partial RA} = 2.7\pm1.2$ m~s$^{-1}$~pc$^{-1}$ where $\frac{\partial v}{\partial RA} > 0$ in Fig.~\ref{rot_fig3} but the average observed $\frac{\partial v}{\partial RA} = -2.0\pm1.5$ m~s$^{-1}$~pc$^{-1}$ where $\frac{\partial v}{\partial RA} < 0$ in Fig.~\ref{rot_fig3} and all averages are negative for $\frac{\partial v}{\partial Dec}$. \subsection{Magnitude of velocity gradients} Is rotation a significant hindrance to cloud collapse? Adopting $\Omega \approx 0.05$ $\kms {\rm pc}^{-1}$as typical of a "rotating" cloud, we can compare the rotational kinetic energy with the gravitational potential energy or the edge velocities with escape velocities. Adopting $M=2 \times 10^5$ \msun and $R=30$ pc as representative values, the rotational kinetic energy is $E_{rot} \approx 10^{48}$ ergs whereas the gravitational potential energy is nearly $E_{grav} \approx 10^{50}$ ergs. Similarly, the rotation velocity at the cloud edge could be expected to be $v \approx 1.5\kms$ but the escape velocity is much higher, $v_{esc} \approx 7.5$ $\kms$. This large difference shows also that rotation contributes little to the overall support and line width of the cloud. \begin{figure*} \centering \includegraphics[width=\hsize{}]{rot_fig_b34b.eps} \caption{Coefficients $a=\frac{\partial v}{\partial RA}$ and $b=\frac{\partial v}{\partial Dec}$ for the 222 stronger clouds ($T_{CO} > 0.11$K), shown only when above 8 m~s$^{-1}$~pc$^{-1}$ in absolute value in order to reduce the influence of noise and make the numbers legible. Negative values are shown in red and positive in black. The numbers of negative and positive values are given in the panels. Because the panels only show the higher (absolute) values, the disproportion in the right panel is actually greater: 31 values $>8$ and 116 values $< -8$. } \label{rot_fig4} \end{figure*} \section{Conclusions} In this work, we have shown, for the first time to our knowledge, that molecular clouds rotate and that their rotation is very slow but measurable from our high-quality data. This relies on the assumption, as in previous work, that rotation can be deduced from velocity gradients. The rotation tends to be prograde. The majority of molecular clouds have an angular velocity below .03 $\kms {\rm pc}^{-1}$(.05 $\kms {\rm pc}^{-1}$after correcting for beam-smearing), yielding a rotation period greatly superior to the cloud lifetimes of about 15 Myr in M~33 \citep{Corbelli17}. The rotation contributes (very) little to the support of the cloud against gravity. Simulations as well as classical calculations \citep[e.g.][]{Rosolowsky03} tend to find higher angular velocities. At (much) smaller scales rotation is clearly present: stars and proto-stars have disks (which rotate) and rotation was also observed in the massive proto-stellar core W43-mm1 \citep{Jacq16}. Not only do molecular cloud mass spectra steepen with galactocentric distance, but the mass spectrum appears to depend even more strongly on whether the clouds host active star formation. At equivalent galactocentric distance, molecular clouds which form stars have considerably flatter mass spectra than those without star formation. Comparing the molecular clouds in M~33 with those in other nearby galaxies, a displacement in the size-linewidth relation appears in that lower metallicity systems have narrower CO lines for comparable cloud size. There is also a trend for cloud linewidths to become narrower with increasing galactocentric distance. Some degeneracy is present in these measurements as both metallicity and stellar surface density decrease with galactocentric distance and subsolar metallicity galaxies tend to have lower stellar surface densities. \begin{acknowledgements} The authors would like to gratefully acknowledge several students from the University of Bordeaux who did projects on various aspects of the data: Jimmy Mata, Marc-Robert Antoine, Thomas Goncalves, and Cyril Lenain. \end{acknowledgements} \bibliographystyle{aa}
\section{Introduction} \label{sec:intro} Distributed data processing techniques have been increasingly employed to solve problems pertaining to optimization and statistical inference. With massive computing resources that are available at scale, and ever growing sizes of data sets, it becomes highly desirable, if not necessary, to distribute the task among multiple machines or multiple cores. The benefits of splitting the task into smaller subtasks are multi-pronged, namely, it makes the problem at hand, scalable, parallelized and fast. In the context of distributed stochastic optimization, several methods~(see, for example \citet{zhang2013divide,zhang2013information,heinze2016dual,ma2015adding,recht2011hogwild}) have been proposed which exhibit impressive performance in platforms such as Mapreduce and Spark. The aforementioned methods, though highly scalable, are designed for master-worker or similar types of architectures. That is, they require the presence of a master node, i.e., a central coordinator which is tasked with splitting the dataset by data points~(batches) or by features among worker nodes and enabling the read/write operations of the iterates of the worker nodes so as to ensure information fusion across the worker nodes. However, with several emerging applications, master-worker type architectures may not be feasible or desirable due to physical constraints. Specifically, we are interested in systems and applications where the entire data is not available at a central/master node, is sensed in a streaming fashion and is intrinsically distributed across the worker nodes. Such scenarios arise, e.g., in systems which involve Internet of Things~(IoT). For example, a smart campus with sensors of various kinds, a smart building or monitoring a large scale industrial plant. Therein, a network of large number of heterogeneous entities~(usually, geographically spread) connected in a arbitrary network structure individually perform sensing for data arriving in a streaming fashion. The sensing devices have limited communication capabilities owing to on board power constraints and harsh environments. A typical IoT framework is characterized by a heterogeneous network of entities without a central coordinator, where entities have localized knowledge and can exchange information among each other through an arbitrary pre-specified communication graph. Furthermore, the data samples arrive in a streaming fashion. The ad-hoc nature of the IoT framework necessitates the information exchange in a crafted manner, rather than just a single or few rounds of communication at the end as in \citet{zhang2013divide,zhang2013information,heinze2016dual,ma2015adding}. Distributed algorithms for statistical inference and optimization in the aforementioned frameworks are characterized by central coordinator-less recursive procedures, where each entity in the network maintains its own estimate or optimizer for the problem at hand. Also, due to heterogeneity of the entities and lack of global model information, the information exchange is limited to the iterates and not the raw data. This additionally enhances privacy as far as individual worker raw data is concerned. In particular, the diffusion and consensus+innovations schemes have been extensively used for various distributed inference problems in the aforementioned frameworks, which include distributed parameter estimation, distributed detection and multi-task learning, to name a few~(see, for example, \citet{kar2008distributed,Sayed-LMS,cattivelli2010diffusion,kar2011convergence,bajovic2015distributed,sahu2015distributed,jakoveticxaviermoura-11,chen2014multitask}). Other variants of distributed recursive algorithms of such kinds have generated a lot of interest of late~(see, for example \citet{nedic2014nonasymptotic,ram2010distributed,braca2008enforcing,Nedic-parameter,Ram-Nedich-Siam,Nedic-opt,jadbabaie2012non}).\\ An entity or node in an IoT setup is usually equipped with on board communication and computation units. However, finite battery power calls for frugal communication protocols as the power used in communication tends to beat the power required for on board computation. Thus, \emph{communication efficiency} is highly relevant and sought for in such scenarios. As far as distributed parameter estimation is concerned, the previously studied distributed algorithms mentioned above, have the mean square error (MSE) of estimation decay as $\Theta(\mathcal{C}_{t}^{-1})$, in terms of the communication cost $\mathcal{C}_{t}$, measured as the total number of communications between neighboring worker nodes over $t$ (discrete) time-steps and assuming each worker node obtains an independent measurement sample at each time. In this paper, we present a distributed recursive algorithm, {\bf C}ommunication Efficient {\bf RE}cursive {\bf D}istributed Estimati{\bf O}n~($\mathcal{CREDO}$) characterized by a frugal communication protocol while guaranteeing provably reasonable performance, which improves the dependence between MSE decay and communication rate to $\Theta\left(\mathcal{C}_{t}^{-2+\zeta}\right)$, for arbitrarily small $\zeta>0$. Specifically, this paper focuses on the above described class of \emph{distributed, recursive} algorithms for estimation of an unknown vector parameter $\boldsymbol{\theta}$, where each worker sequentially, in time, observes noisy measurements of low-dimensional linear transformations of $\boldsymbol{\theta}$. For this problem,we improve the communication efficiency of existing distributed recursive estimation methods primarily in the \emph{consensus}+\emph{innovations} and the diffusion frameworks ~\citet{kar2011convergence,cattivelli2010diffusion,bajovic2015distributed,Sayed-LMS,sahu2015distributed,jakoveticxaviermoura-11,chen2014multitask}, which in turn may be adapted to improve the communication efficiency of variants such as~ \citet{nedic2014nonasymptotic,ram2010distributed,braca2008enforcing,Nedic-parameter,Ram-Nedich-Siam,Nedic-opt}. Our contributions are as follows:\\ \noindent We propose a scheme, namely $\mathcal{CREDO}$, where each node at time~$t$ communicates only with a certain probability that decays sub linearly to zero in~$t$. That is, communications are increasingly sparse, so that communication cost scales as $\Theta(t^{\delta})$, where the rate $\delta\in (1/2, 1)$ is a tunable parameter. \par \noindent We show that, despite significantly lower communication cost, the proposed method achieves the best possible $\Theta(1/t)$ rate of MSE decay over~$t$ time-steps ($t$ also equals to per-worker number of data samples obtained over the $t$ time-steps). Importantly, this result translates into significant improvements in the rate at which MSE decays with communication cost~$\mathcal{C}_t$ -- namely from~$\Theta(1/\mathcal{C}_t)$ with existing methods to $\Theta(1/\mathcal{C}_t^{2-\zeta})$ with the proposed method, where $\zeta>0$ is arbitrarily small. \par \noindent We further study asymptotic normality and the corresponding asymptotic variance of the proposed method (that in a sense relates to the constant in the $\Theta(1/t)$ MSE decay rate). We characterize and quantify interesting trade-offs between the communication cost and the asymptotic variance of the method. In particular, we explicitly quantify the regime (the range of the communication rate parameter~$\delta$) where the asymptotic variance is independent of the network topology and, at the same time, communication cost is strictly sub linear~($\delta<1$). Numerical examples both on synthetic and real data sets confirm the significantly improved communication efficiency of the proposed method.\par \noindent A key insight behind $\mathcal{CREDO}$ is that it recognizes that inter-node communications can be made (probabilistically) increasingly sparse without sacrificing estimation performance. It can be shown using ideas from stochastic approximation that the weights that each node assigns to its neighboring nodes can be made to decrease with time while keeping the estimator strongly consistent. $\mathcal{CREDO}$ replaces such a deterministic weight $w(t)$ ($t$ being time) with a Bernoulli random variable that equals one with probability $w(t)<1$. Thus, $\mathcal{CREDO}$ is much cheaper to implement as communication takes place only with probability $w(t)$, with $w(t)$ decaying to zero. Despite the adaptive weighting being very different, existence of broad regimes of algorithm parameters are shown where $\mathcal{CREDO}$'s estimation performance matches closely the benchmarks iteration-wise. However, as $\mathcal{CREDO}$ has much fewer communications per iteration, it becomes more communication efficient.\par \noindent Several new technical tools are developed in this paper to achieve the above results that could be of independent interest. Specifically, the studied setup requires analysis of \emph{mixed time-scale stochastic approximation} algorithms with \emph{three different time scales}. This setup stands in contrast with the classical single time-scale stochastic approximation, the properties of which are well known. It is also very different from the more commonly studied two time-scale stochastic approximation (see, for instance \citet{Borkar-stochapp}) in which a fast process is coupled with a slower dynamical system. We develop here new technical tools that allow us to handle the case of number of operating time-scales to be three instead of two as in \citet{kar2013distributed} for mixed time-scale stochastic approximation~(described in details later). The rest of the paper is organized as follows. Section~2 describes the problem that we consider, gives the needed preliminaries on conventional (centralized) and distributed recursive estimation, and reviews related work. Section~3 presents the novel $\mathcal{CREDO}$ algorithm that we propose, while Section~4 states our main results on the algorithm's performance. Finally, we conclude in Section~5. Proofs of the main and auxiliary results are relegated to the Appendix. \section{Problem Setup: Motivation and Preliminaries} \label{sec:prel} There are $N$ workers deployed in the network. Every worker $n$ at (discrete) time index $t$ makes a noisy observation $\mathbf{y}_{n}(t)$, a noisy linear function of the parameter $\boldsymbol{\theta}$, where $\boldsymbol{\theta}\in\mathbb{R}^{M}$. Formally the observation model for the $n$-th worker is given by, \begin{align} \label{eq:sens_ob} \mathbf{y}_{n}(t)=\mathbf{H}_{n}\boldsymbol{\theta}+\mathbf{\gamma}_{n}(t), \end{align} \noindent where $\mathbf{H}_{n}\in\mathbb{R}^{M_{n}\times M}$ is the sensing matrix, where $M_{n}<M$, $\{\mathbf{y}_{n}(t)\} \in \mathbb{R}^{M_{n}}$ is the observation sequence for the $n$-th worker and $\{\mathbf{\gamma}_{n}(t)\}$ is a zero mean temporally independent and identically distributed~(i.i.d.) noise sequence at the $n$-th worker with nonsingular covariance $\mathbf{\Sigma}_{n}$, where $\mathbf{\Sigma}_{n}\in\mathbb{R}^{M_{n}\times M_{n}}$. The noise processes are independent across different workers. We state an assumption on the noise processes before proceeding further. \begin{myassump}{M1} \label{m:1} \emph{There exists $\epsilon_{1}>0$, such that, for all $n$, $\mathbb{E}_{\boldsymbol{\theta}}\left[\left\|\gamma_{n}(t)\right\|^{2+\epsilon_{1}}\right]<\infty$.} \end{myassump} The above assumption encompasses a general class of noise distributions in the setup. The heterogeneity of the setup is exhibited in terms of the sensing matrix and the noise covariances at the worker nodes. Each worker node is interested in reconstructing the true underlying parameter $\boldsymbol{\theta}$. We assume a worker node is aware only of its local observation model and hence does not know about the observation matrix and noise processes of other worker nodes. In this paper, we are interested in \emph{recursive distributed estimators}. By recursive, we mean estimators that, at each node $n$, continuously produce (update) estimates of $\boldsymbol{\theta}$ at each time $t$, i.e., after each new sample $\mathbf{y}_{n}(t)$ is acquired. By distributed, we restrict attention to those estimators in which each node $n$ in the network, at each time $t$, exchanges its current local estimate of $\boldsymbol{\theta}$ with its immediate neighbors conforming with a pre-specified communication graph, and assimilates its newly acquired observation $\mathbf{y}_n(t)$. \subsection{Motivation and Related Work} \label{subsec:motivation} \noindent We now briefly review the literature on distributed inference and motivate our algorithm $\mathcal{CREDO}$. Distributed inference algorithms can be broadly divided into two classes. The first class of distributed inference algorithms proposed in \citet{liu2014distributed,ma2015adding,ma2015partitioning,heinze2016dual,zhang2013divide} require a central master node so as to coordinate as far as assigning sub-tasks to the worker nodes is concerned. There are two reasons as to why such methods do not apply in our setting. Firstly, these setups, in order for the central node to be able to assign sub-tasks, require the central node to have access to the entire dataset. However, in the setup considered in this paper, where the data samples are intrinsically distributed among the worker nodes and rather ad-hoc, the presence of a central master node is highly impractical. Even in the case when the data is distributed among nodes to start with, the local data samples collected via \eqref{eq:sens_ob} are not sufficient to uniquely reconstruct the global parameter of interest. In particular, the sensing matrix $\mathbf{H}_{n}$ at an agent $n$ is rank deficient, i.e., $rank(\mathbf{H}_{n}) = M_{n}< M$, in general. We refer to this phenomenon as \emph{local unobservability}. With communication being the most power hungry aspect for an ad-hoc sensing entity, communicating raw data back to a central node so as to re-assign the data among worker nodes is prohibitive. Thus in such an ad-hoc and distributed setup, a communication protocol should involve information fusion via exchange of the latest estimates among worker nodes thus enabling each worker node to aggregate information about all the entries of the parameter. Secondly, in general, they are not applicable to the heterogeneous sensing model \eqref{eq:sens_ob} being considered here. For example, if $\mathbf{H}_{n} = h\mathbf{I}$, it reduces to the case, where each worker can work independently to obtain a reasonably good estimate of $\boldsymbol{\theta}$ and algorithms such as $CoCoA^{+}$~(\citet{ma2015adding}) and $Dual-LOCO$~(\citet{heinze2016dual}) may then address the problem efficiently through data splitting across samples and features respectively. However, if $\mathbf{H}_{n} = \mathbf{e}_{n}^{\top}$, where $ \mathbf{e}_{n}$ is the $n$-th canonical basis vector of $\mathbb{R}^{M}$, a random splitting across samples would lead to estimates with a high mean square error, while a feature wise splitting is still possible. But, in the case when, $\mathbf{H}_{n} = \left(\mathbf{e}_{n}+\mathbf{e}_{n-1}\right)^{\top}$, neither sample splitting nor feature splitting is possible and such a setup necessitates more rounds of communication as opposed to just one round of communication at the end as in the case of $CoCoA^{+}$~(\citet{ma2015adding}) and $Dual-LOCO$~(\citet{heinze2016dual}). \\ \noindent The second class of distributed inference algorithms involve setups, which are characterized by the absence of a master node. Communication efficient distributed recursive algorithms in the context of distributed optimization with no central node, where data is available apriori and is not collected in a streaming fashion has been addressed in \citet{tsianos2012communication,tsianos2013networked,jakovetic2016distributed} through increasingly sparse communication, adaptive communication scheme and selective activation of nodes respectively. However, the explicit characterization of the performance metric, for instance MSE, in terms of the communication cost has not been addressed in the aforementioned references.\\ \noindent The well studied class of distributed estimation algorithms in the \emph{consensus}+\emph{innovations} framework~\citet{kar2011convergence,kar2013distributed} characterize the algorithm parameters, under which estimate sequences optimal in the sense of asymptotic covariance can be obtained. However, the inter-agent message passing and the associated communication cost is not taken into account in the aforementioned algorithms. The lack of exploration into the dimension of communication cost in the context of distributed estimation algorithms in the \emph{consensus}+\emph{innovations} framework motivated us to develop a stochastic communication protocol in this paper, that exploits the redundancy in inter-agent message passing while not compromising on the optimality aspect of the estimate sequence. Hence, in order to test the efficacy of our stochastic message-passing protocol, we take the distributed estimation algorithm proposed in ~\citet{kar2011convergence,kar2013distributed} as the primary benchmark. \noindent \subsection{Preliminaries: Oracle and Distributed Estimation} \label{subsec:prel} In this section we go over the preliminaries of oracle and distributed estimation.\\ \textbf{Oracle Estimation:}\\ In the setup described above in \eqref{eq:sens_ob}, if a hypothetical oracle node having access to the data samples at all the nodes at all times were to conduct the parameter estimation in an iterative manner, it would do so in the following way: \begin{align*} &\mathbf{x}_{c}(t+1)=\mathbf{x}_{c}(t)\nonumber\\&+\underbrace{\frac{a}{t+1}\sum_{n=1}^{N}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\left(\mathbf{y}_{n}(t)-\mathbf{H}_{n}\mathbf{x}_{c}(t)\right)}_{\text{Global Innovation}}, \end{align*} where $a$ is a positive constant. It is well known from standard stochastic approximation results (see, for example,~\citet{Nevelson}) that the sequence $\{\mathbf{x}_{c}(t)\}$ generated from the update above converges almost surely to the true parameter $\boldsymbol{\theta}$. Moreover, the sequence $\{\mathbf{x}_{c}(t)\}$ is asymptotically normal, i.e, \begin{align*} \sqrt{t+1}\left(\mathbf{x}_{c}(t)-\boldsymbol{\theta}\right)\overset{\mathcal{D}}{\Longrightarrow}\mathcal{N}\left(0,\left(N\mathbf{\Gamma}\right)^{-1}\right), \end{align*} where $\mathbf{\Gamma}=\frac{1}{N}\sum_{n=1}^{N}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\mathbf{H}_{n}$. The above established asymptotic normality also points to the conclusion that the mean square error~(MSE) decays as $\Theta(1/t)$.\\ However, such an oracle based scheme may not be implementable in our distributed multi-worker setting with time-varying sparse inter-worker interaction primarily due to the fact that the desired global innovation computation requires instantaneous access to the entire set of network sensed data at all times at the oracle.\\ \textbf{Distributed Estimation:}\\ Distributed estimation scenarios where the global model information is not available at each worker, makes it necessary to communicate at a properly crafted rate. An aptly chosen communication rate would then ensure information flow among the worker nodes so that every worker is able to estimate the parameter of interest. If in the case of a distributed setup, a worker $n$ in the network were to replicate the centralized update by replacing the global innovation in accordance with its local innovation (i.e., based on its local sensed data only), the updates for the parameter estimate becomes \begin{align*} &\widehat{\mathbf{x}}_{n}(t+1)=\widehat{\mathbf{x}}_{n}(t)\nonumber\\&+\underbrace{\frac{a}{t+1}\mathbf{H}_{n}^{\top}\left(\widehat{\mathbf{x}}_{n}(t)\right)\mathbf{\Sigma}_{n}^{-1}\left(\mathbf{y}_{n}(t)-\mathbf{H}_{n}\widehat{\mathbf{x}}_{n}(t)\right)}_{\text{Local Innovation}}, \end{align*} where $\left\{\widehat{\mathbf{x}}_{n}(t)\right\}$ represents the estimate sequence at worker $n$. The above update involves purely decentralized and independent local processing with no collaboration among the workers whatsoever. However, note that in the case when the data samples obtained at each worker lacks information about all the features, the parameter estimates would be erroneous and sub-optimal. Hence, as a surrogate to the global innovation in the centralized recursions, the local estimators compute a local innovation based on the locally sensed data as a worker has access to the information in its neighborhood. The information loss at a node is compensated by incorporating an agreement or consensus potential into their updates which is then incorporated~(see, for example \citet{kar2008distributed,kar2011convergence,nedic2014nonasymptotic,ram2010distributed,braca2008enforcing,cattivelli2010diffusion,Sayed-LMS,Nedic-parameter,jakoveticxaviermoura-11,Ram-Nedich-Siam,Nedic-opt}) as follows: \begin{align} \label{eq:benchmark_ci} &\mathbf{x}_{n}(t+1) = \mathbf{x}_{n}(t)-\underbrace{\frac{b}{(t+1)^{\delta_{1}}}\sum_{l\in\Omega_{n}(t)}\left(\mathbf{x}_{n}(t)-\mathbf{x}_{l}(t)\right)}_{\text{Neighborhood Consensus}}\nonumber\\&+\underbrace{\frac{a}{t+1}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\left(\mathbf{y}_{n}(t)-\mathbf{H}_{n}\mathbf{x}_{n}(t)\right)}_{\text{Local Innovation}}, \end{align} where $0 <\delta_{1}<1$, $\Omega_{n}(t)$ represents the neighborhood of worker $n$ at time $t$ and $a,b$ are appropriately chosen positive constants. In the above scheme, the information exchange among worker nodes is limited to the parameter estimates. It has been shown in previous work that under appropriate conditions~(see, for example \citet{kar2013distributed}), the estimate sequence $\{\mathbf{x}_{n}(t)\}$ converges to $\boldsymbol{\theta}$ and is asymptotically normal, i.e., \begin{align*} \sqrt{t+1}\left(\mathbf{x}_{n}(t)-\boldsymbol{\theta}\right)\overset{\mathcal{D}}{\Longrightarrow}\mathcal{N}\left(0,\left(N\mathbf{\Gamma}\right)^{-1}\right), \end{align*} where $\mathbf{\Gamma}=\frac{1}{N}\sum_{n=1}^{N}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\mathbf{H}_{n}$. The above established asymptotic normality also points to the conclusion that the MSE decays as $\Theta(1/t)$.\\ \textbf{Communication Efficiency}\\ Define the communication cost $\mathcal{C}_{t}$ to be the expected per-node number of transmissions up to iteration $t$, i.e., \begin{align} \label{eq:comm_cost_1} \mathcal{C}_{t}= \mathbb{E}\left[\sum_{s=0}^{t-1}\mathbb{I}_{\{\textit{node}~C~\textit{transmits~at}~s\}}\right], \end{align} where $\mathbb{I}_{A}$ represents the indicator of event $A$. The communication cost $\mathcal{C}_{t}$ for both the oracle estimator and the distributed estimators in \citet{kar2011convergence,cattivelli2010diffusion,Sayed-LMS,chen2014multitask} comes out to be $\mathcal{C}_{t} = \Theta\left(t\right)$, where we note that the time index $t$ also matches the number of per node samples collected till time $t$. Other close variants of the above mentioned recursive distributed estimation schemes such as the ones in \citet{nedic2014nonasymptotic,ram2010distributed,braca2008enforcing,Nedic-parameter,jakoveticxaviermoura-11,Ram-Nedich-Siam,Nedic-opt} have a $\mathcal{C}_{t} = \Theta\left(t\right)$ communication cost as well. In other words, we have MSE decaying as $\Theta\left(\frac{1}{\mathcal{C}_{t}}\right)$. Both the paradigms achieve an order-optimal MSE decay rate~$\Theta(1/t)$ in terms of the number of observations~$t$. Hence, in the setting that we consider, the $\Theta(1/t)$ MSE decay rate with respect to the number of observations cannot be improved upon.\\ In this paper, we ask the highly nontrivial question whether the rate $\Theta(1/\mathcal{C}_t)$ can be improved within the class of recursive distributed estimators. To be particular, we consider recursive distributed estimators with randomized communication protocols, in general. For such estimators, we denote $\mathcal{C}_t$ to be the expected per-node communication cost up to time~$t$. Define the \emph{MSE sensing rate} as the rate at which the MSE decays with the number of per-node samples~$t$. (For example, for estimator~\eqref{eq:benchmark_ci}, we have that $\mathrm{MSE}=\Theta(1/t)$.) Similarly, define the \emph{MSE communication rate} as the rate at which the MSE decays with the expected number of per-node communications~$C_t$. (For example, with estimator~\eqref{eq:benchmark_ci}, we have that $\mathrm{MSE}=\Theta(1/\mathcal{C}_t)$). We are then interested in the achievable pairs (sensing rate, communication rate) with distributed recursive estimators. A specific question is the following: Given that the $\Theta(1/t)$ sensing rate cannot be improved in the setting we consider (in fact, limited by the law of large numbers assuming non-degenerate noise covariances), can we improve the communication rate without compromising the sensing rate? If the answer to the above question is affirmative, what specific communication rates are achievable? Subsequent sections provide a detailed study to respond to these questions.\\ \section{$\mathcal{CREDO}$: A communication efficient distributed recursive estimator} \noindent We now present the proposed $\mathcal{CREDO}$ estimator. $\mathcal{CREDO}$ is based on a specifically handcrafted time decaying communication rate protocol. Intuitively, we basically exploit the idea that, once the information flow starts in the graph and a worker node is able to accumulate sufficient information about the parameter of interest, the need to communicate with its neighboring nodes goes down. Technically speaking, for each node $n$, at every time $t$, we introduce a binary random variable $\psi_{n,t}$, where \begin{align} \label{eq:dec_rule_lin_1} \psi_{n,t}= \begin{cases} \rho_{t} &~~\textit{with~probability}~\zeta_{t}\\ 0 & ~~\textit{else}, \end{cases} \end{align} where $\psi_{i,t}$'s are independent both across time and the nodes, i.e., across $t$ and $n$ respectively. The random variable $\psi_{n,t}$ abstracts out the decision of the node $n$ at time $t$ whether to participate in the neighborhood information exchange or not. We specifically take $\rho_{t}$ and $\zeta_{t}$ of the form \begin{align} \label{eq:time_decay} \rho_{t} = \frac{\rho_{0}}{(t+1)^{\epsilon/2}},~~ \zeta_{t} = \frac{\zeta_{0}}{(t+1)^{(\tau_{1}/2-\epsilon/2)}}, \end{align} where $0<\epsilon<\tau_{1}$ and $0<\tau_{1}\leq 1$. Furthermore, define $\beta_{t}$ to be \begin{align} \label{eq:beta} \beta_{t}=\left(\rho_{t}\zeta_{t}\right)^{2} = \frac{\beta_{0}}{(t+1)^{\tau_{1}}}. \end{align} The pres-specified (possibly sparse) inter-node communication network to which the information exchange between nodes conforms to is modeled as an \emph{undirected} simple connected graph $G=(V,E)$, with $V=\left[1\cdots N\right]$ and~$E$ denoting the set of nodes and communication links. The neighborhood of node~$n$ is given by $\Omega_{n}=\left\{l\in V\,|\,(n,l)\in E\right\}$. The node~$n$ has degree $d_{n}=|\Omega_{n}|$. The structure of the graph is described by the $N\times N$ adjacency matrix, $\mathbf{A}=\mathbf{A}^\top=\left[\mathbf{A}_{nl}\right]$, $\mathbf{A}_{nl}=1$, if $(n,l)\in E$, $\mathbf{A}_{nl}=0$, otherwise. The graph Laplacian $\mathbf{L}=\mathbf{D}-\mathbf{A}$ is positive definite, with eigenvalues ordered as $0=\lambda_{1}(\mathbf{L}) \leq\lambda_{2}(\mathbf{L}) \leq\cdots \leq \lambda_{N}(\mathbf{L})$, where $\mathbf{D}$ is given by $\mathbf{D}=\mbox{diag}\left(d_{1}\cdots d_{N}\right)$. Moreover, for a connected graph, $\lambda_{2}(\mathbf{L})>0$. \noindent With the above development in place, we define the random time-varying Laplacian $\mathbf{L}(t)$, where $\mathbf{L}(t)\in\mathbb{R}^{N\times N}$ which abstracts the inter-node information exchange as follows: \begin{align} \label{eq:laplacian} \mathbf{L}_{i,j}(t)= \begin{cases} -\psi_{i,t}\psi_{j,t} & \{i,j\}\in E, i\neq j\\ 0 & i\neq j, \{i,j\}\notin E\\ -\sum_{l\neq i}\psi_{i,t}\psi_{l,t}& i=j. \end{cases} \end{align} The above communication protocol allows two nodes to communicate only when the link is established in a bi-directional fashion and hence avoids directed graphs. The design of the communication protocol as depicted in \eqref{eq:dec_rule_lin_1}-\eqref{eq:laplacian} not only decays the weight assigned to the links over time but also decays the probability of the existence of a link. Such a design is consistent with frameworks where the working nodes have finite power and hence not only the number of communications, but also, the quality of the communication decays over time. \noindent We have, for $\{i,j\}\in E$: \begin{align} \label{eq:expectation} &\mathbb{E}\left[\mathbf{L}_{i,j}(t)\right]= -\left(\rho_{t}\zeta_{t}\right)^{2} = -\beta_{t} = -\frac{c_{3}}{(t+1)^{\tau_{1}}}\nonumber\\ &\mathbb{E}\left[\mathbf{L}_{i,j}^{2}(t)\right] = \left(\rho_{t}^{2}\zeta_{t}\right)^{2} = \frac{c_{4}}{(t+1)^{\tau_{1}+\epsilon}}. \end{align} \noindent Thus, we have that, the variance of $\mathbf{L}_{i,j}(t)$ is given by, \begin{align} \label{eq:variance} \textit{Var}\left(\mathbf{L}_{i,j}(t)\right) = \frac{\beta_{0}\rho_{0}^{2}}{(t+1)^{\tau_{1}+\epsilon}} - \frac{a^{2}}{(t+1)^{2\tau_{1}}}. \end{align} \noindent Define, the mean of the random time-varying Laplacian sequence $\{\mathbf{L}(t)\}$ as $\overline{\mathbf{L}}(t) = \mathbb{E}\left[\mathbf{L}(t)\right]$ and $\widetilde{\mathbf{L}}(t) = \mathbf{L}(t)-\overline{\mathbf{L}}(t)$. \noindent Note that, $\mathbb{E}\left[\widetilde{\mathbf{L}}(t)\right] = \mathbf{0}$, and \begin{align} \label{eq:laplace_res} \mathbb{E}\left[\left\|\widetilde{\mathbf{L}}(t)\right\|^{2}\right] \leq N^{2}\mathbb{E}\left[\widetilde{\mathbf{L}}_{i,j}^{2}(t)\right] = \frac{N^{2}\beta_{0}\rho_{0}^{2}}{(t+1)^{\tau_{1}+\epsilon}} - \frac{N^{2}a^{2}}{(t+1)^{2\tau_{1}}}, \end{align} where $\left\|\cdot\right\|$ denotes the $L_{2}$ norm. The above equation follows from the relationship between the $L_{2}$ and Frobenius norms.\\ \noindent We also have that, $\overline{\mathbf{L}}(t)=\beta_{t}\overline{\mathbf{L}}$, where \begin{align} \label{eq:laplacian1} \overline{\mathbf{L}}_{i,j}= \begin{cases} -1 & \{i,j\}\in E, i\neq j\\ 0 & i\neq j, \{i,j\}\notin E\\ -\sum_{l\neq i}L_{i,l}& i=j. \end{cases} \end{align} \noindent We formalize the assumptions on the inter-worker communication graph and global observability. \begin{myassump}{M2} \label{m:2} \emph{We require the following global observability condition. The matrix $\mathbf{G}=\sum_{n=1}^{N}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\mathbf{H}_{n}$ is full rank}. \end{myassump} Assumption \ref{m:2} is crucial for our distributed setup. This notion of rendering the parameter locally unobservable while it being globally observable in the context of distributed inference was introduced in \citet{kar2011convergence}, and has been subsequently used in \citet{lalitha2014social,sahu2017recursive}. It is to be noted that such an assumption is needed for even a setup with a centralized node which has access to all the data samples at each of the worker nodes at each time. Assumption \ref{m:2} ensures that if a node could stack all the data samples together at any time $t$, it would have sufficient information about the parameter of interest so as to be able to estimate the parameter of interest without any communication. Hence, the requirement for this assumption naturally extends to our distributed setup. \begin{myassump}{M3} \label{m:3} \emph{The inter-worker communication graph is connected on average, i.e., $\lambda_{2}(\overline{\mathbf{L}}) > 0$, which implies $\lambda_{2}(\overline{\mathbf{L}}(t))>0$, where $\overline{\mathbf{L}}(t)$ denotes the mean of the Laplacian matrix $\mathbf{L}(t)$ and $\lambda_{2}\left(\cdot\right)$ denotes the second smallest eigenvalue}. \end{myassump} Assumption \ref{m:3} ensures consistent information flow among the worker nodes. Technically speaking, the communication graph modeled here as a random undirected graph need not be connected at all times. Hence, at any given time, only a few of the possible links could be active. The connectedness in average basically ensures that over time, the information from each worker node in the graph reaches other worker nodes over time in a symmetric fashion and thus ensuring information flow. It is to be noted that assumption \ref{m:3} ensures that $\overline{\mathbf{L}}(t)$ is connected at all times as $\overline{\mathbf{L}}(t)=\beta_{t}\overline{\mathbf{L}}$. With the communication protocol established, we propose an update, where every node $n$ generates an estimate sequence $\{\mathbf{x}_{n}(t)\}$, with $\mathbf{x}_{n}(t)\in\mathbb{R}^{M}$, in the following way: \begin{align} \label{eq:ci_update_worker} &\mathbf{x}_{n}(t+1) = \mathbf{x}_{n}(t)-\underbrace{\sum_{l\in\Omega_{n}}\psi_{n,t}\psi_{l,t}\left(\mathbf{x}_{n}(t)-\mathbf{x}_{l}(t)\right)}_{\text{Neighborhood Consensus}}\nonumber\\&+\underbrace{\alpha_{t}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\left(\mathbf{y}_{n}(t)-\mathbf{H}_{n}\mathbf{x}_{n}(t)\right)}_{\text{Local Innovation}}, \end{align} where $\Omega_{n}$ denotes the neighborhood of node $n$ with respect to the network induced by $\overline{\mathbf{L}}$ and $\alpha_{t}$ is the innovation gain sequence which is given by $\alpha_t = a/(t+1)$. It is to be noted that a node $n$ can send and receive information in its neighborhood at time $t$, when $\psi_{n,t}\neq 0$. At the same time, when $\psi_{n,t}= 0$, node $n$ neither transmits nor receives information. The link between node $n$ and node $l$ gets assigned a weight of $\rho_{t}^{2}$ if and only if $\psi_{n,t}\neq 0$ and $\psi_{l,t}\neq 0$. \begin{Remark} \label{rm:1} The stochastic update procedure~\eqref{eq:ci_update_worker}, employed here may be viewed as a mixed time-scale stochastic approximation procedure as opposed to the classical single time-scale stochastic approximation, the properties of which are well known. Note, the above notion of mixed time-scale is very different from the more commonly studied two time-scale stochastic approximation (see, for instance \citet{Borkar-stochapp}) in which a fast process is coupled with a slower dynamical system. More relevant to our study are the mixed time-scale dynamics encountered in \citet{Gelfand-Mitter} and \citet{kar2013distributed} in which a single update procedure is influenced by multiple potentials with different time-decaying weights. However, as opposed to the innovations term being a martingale difference sequence in the context of mixed time-scale stochastic approximation as proposed in \citet{Gelfand-Mitter}, the mixed time-scale stochastic approximation employed in this paper does not have an innovation term which is a martingale difference sequence and hence is of sufficient technical interest. The addition of the residual Laplacian $\widetilde{L}(t)$ sequence in the update further complicates the update in the context of this paper, by making the number of operating time-scales to be three instead of two as in \citet{kar2013distributed} for which we had to develop new technical machinery. \end{Remark} The above update can be written in a compact form as follows: \begin{align} \label{eq:ci_update} &\mathbf{x}(t+1)=\left(\mathbf{I}_{NM}-\mathbf{L}(t)\otimes\mathbf{I}_{M}\right)\mathbf{x}(t)\nonumber\\&+\alpha_{t}\mathbf{G}_{H}\mathbf{\Sigma}^{-1}\left(\mathbf{y}(t)-\mathbf{G}_{H}^{\top}\mathbf{x}(t)\right), \end{align} where $\alpha_{t}=\frac{a}{t+1}$, $\mathbf{x}(t)=[\mathbf{x}_{1}^{\top}(t) ~\mathbf{x}_{2}^{\top}(t) \cdots \mathbf{x}_{N}^{\top}(t)]^{\top}$, $\mathbf{G}_{H}=diag[\mathbf{H}_{1}^{\top}, \mathbf{H}_{2}^{\top},\cdots, \mathbf{H}_{N}^{\top}]$, $\mathbf{y}(t)=[\mathbf{y}_{1}^{\top}(t) ~\mathbf{y}_{2}^{\top}(t) \cdots \mathbf{y}_{N}^{\top}(t)]^{\top}$ and $\mathbf{\Sigma}=diag\left[\mathbf{\Sigma}_{1},\cdots,\mathbf{\Sigma}_{N}\right]$. \begin{Remark} \label{rm:2} The Laplacian sequence that plays a role in the analysis in this paper, takes the form $L(t)=\beta_{t}\overline{L}+\widetilde{L}(t)$, where $\widetilde{L}(t)$, the residual Laplacian sequence, does not scale with $\beta_{t}$ owing to the fact that the communication rate is chosen adaptively making the analysis significantly different from \citet{kar2013distributed}. Thus, unlike \citet{kar2013distributed}, the Laplacian matrix sequence is not identically distributed; the sequence of effective Laplacians have a decaying mean, thus adding another time-scale in the already mixed time-scale dynamics which necessitates the development of new technical tools to establish the order optimal convergence of the estimate sequence. \end{Remark} We formalize an assumption on the innovation gain sequence $\{\alpha_{t}\}$ before proceeding further. \begin{myassump}{M4} \label{m:4} \emph{Let $\lambda_{min}\left(\cdot\right)$ denote the smallest eigenvalue. We require that $a$ satisfies\footnote{Note that, as will be shown later, $\mathbf{\Gamma}$ and $\overline{\mathbf{L}}\otimes\mathbf{I}_{M}+\mathbf{G}_{H}\mathbf{\Sigma}^{-1}\mathbf{G}_{H}^{\top}$ are positive definite matrices under the stated assumptions.}, $a\min\{\lambda_{min}\left(\mathbf{\Gamma}\right),\lambda_{min}\left(\overline{\mathbf{L}}\otimes\mathbf{I}_{M}+\mathbf{G}_{H}\mathbf{\Sigma}^{-1}\mathbf{G}_{H}^{\top}\right),\beta_{0}^{-1}\}\ge 1$, where $\otimes$ denotes the Kronecker product.} \end{myassump} The communication cost per node for the proposed algorithm is given by $\mathcal{C}_{t} = \sum_{s=0}^{t-1}\zeta_{s} = \Theta\left(t^{1+(\epsilon-\tau_{1})/2}\right)$, which in turn is strictly sub-linear as $\epsilon < \tau_{1}$. \section{Main Results} \label{sec:main_res} In this section, we present the main results of the proposed algorithm $\mathcal{CREDO}$, while the proof of the main results are relegated to the Appendix. The first result concerns with the consistency of the estimate sequence $\{\mathbf{x}_{n}(t)\}$. \begin{Theorem} \label{th:cons} Let assumptions~\ref{m:1}-\ref{m:4} hold and let $\tau_{1}$ in the consensus potential in \eqref{eq:beta} be such that $0<\tau_{1}\leq 1$. Consider the sequence $\{\mathbf{x}_{n}(t)\}$ generated by \eqref{eq:ci_update_worker} at each worker $n$. Then, for each $n$, we have \begin{equation} \label{eq:th_cons1} \mathbb{P}_{\boldsymbol{\theta}}\left(\lim_{t\rightarrow\infty}\mathbf{x}_{n}(t)=\boldsymbol{\theta}\right)=1. \end{equation} In particular, if $\tau_{1}$ satisfies $0<\tau_{1}\leq 0.5-(2+\epsilon_{1})^{-1}$, we have that for all $\tau\in [0, 1/2)$, $\mathbb{P}_{\boldsymbol{\theta}}\left(\lim_{t\rightarrow\infty}(t+1)^{\tau}\|\mathbf{x}_{n}(t)-\boldsymbol{\theta}\|=0\right)=1$. % \end{Theorem} \noindent At this point, the estimate sequence generated by $\mathcal{CREDO}$ at any worker $n$ is strongly consistent, i.e., $\mathbf{x}_{n}(t)\rightarrow\boldsymbol{\theta}$ almost surely~(a.s.) as $t\rightarrow\infty$. Furthermore, the above characterization for $0<\tau_{1}\leq 0.5-(2+\epsilon_{1})^{-1}$ yields order-optimal convergence, i.e., from results in classical estimation theory, it is known that there exists no $\tau\geq 1/2$ such that a estimator $\{\boldsymbol{\theta}_{c}(t)\}$ satisfies $(t+1)^{\tau}\|\boldsymbol{\theta}_{c}(t)-\boldsymbol{\theta}\|\rightarrow 0$ a.s. as $t\rightarrow\infty$. We now state a main result of this paper which establishes the MSE communication rate for the proposed algorithm $\mathcal{CREDO}$. \begin{Theorem} \label{th:credo} Let the hypothesis of Theorem \ref{th:cons} hold. Then, we have, \begin{align} \label{eq:credo_1} \mathbb{E}_{\boldsymbol{\theta}}\left[\left\|\mathbf{x}_{n}(t)-\boldsymbol{\theta}\right\|^{2}\right] = \Theta\left(\mathcal{C}_{t}^{-\frac{2}{\epsilon-\tau_{1}+2}}\right), \end{align} where $\epsilon < \tau_{1}$ and is as defined in \eqref{eq:time_decay}. \end{Theorem} The version of the $\mathcal{CREDO}$ algorithm, with $\beta_{t} = a(t+1)^{-1}$, achieves a communication cost of $\mathcal{C}_{t} = \Theta\left(t^{0.5(1+\epsilon)}\right)$. Hence, the MSE as a function of $\mathcal{C}_{t}$ in the case of $\tau_{1}=1$ is given by $\mbox{MSE} = \Theta(\mathcal{C}_{t}^{-2/(1+\epsilon)})$. However, it can be shown from standard arguments in stochastic approximation that updates with $\beta_{t} = a(t+1)^{-1-\delta}$ with $\delta>0$, though results in a communication cost of $\mathcal{C}_{t} = \Theta(t^{0.5(1+\epsilon-\delta)})$, it does not generate estimate sequences which converge to $\boldsymbol{\theta}$.\\ \noindent With the above development in place, we state a result which allows us to benchmark the asymptotic efficiency of the proposed algorithm and the instantiations of it in terms of $\tau_{1}$. To be specific, the next result establishes the asymptotic normality of the parameter estimate sequence $\{\mathbf{x}_{n}(t)\}$ and characterizes the asymptotic covariance of the estimate sequence. \begin{Theorem} \label{th:2} Let the hypotheses of Theorem \ref{th:cons} hold and in addition let $0<\tau_{1}\leq 0.5-(2+\epsilon_{1})^{-1}$. Then, we have, \begin{align} \label{eq:l3_1} \sqrt{t+1}\left(\mathbf{x}_{n}(t)-\boldsymbol{\theta}\right)\overset{\mathcal{D}}{\Longrightarrow}\mathcal{N}\left(0,\frac{a\mathbf{I}}{2N}+\frac{\left(\mathbf{\Gamma}-\frac{\mathbf{I}}{2a}\right)^{-1}}{4N}\right), \end{align} where $\mathbf{\Gamma}=\frac{1}{N}\sum_{n=1}^{N}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\mathbf{H}_{n}$. \end{Theorem} \noindent The asymptotic covariance as established in \eqref{eq:l3_1} is independent of the network. Technically speaking, as long as the averaged Laplacian $\overline{\mathbf{L}}$ is connected, and the consensus and the innovation potentials, i.e., $\beta_{t}$ and $\alpha_{t}$ respectively are chosen appropriately, the asymptotic covariance is independent of the network connectivity, i.e., it is independent of the network instantiations across all times and is just a function of the sensing model parameters and the noise covariance. It is to be noted that the optimal asymptotic covariance achieved by the oracle estimator is given by $N\mathbf{\Gamma}$. Such an asymptotic covariance can be achieved by a distributed setup where every worker node is aware of every other worker node's sensing model. To be particular, if a gain matrix $G = \sum_{n=1}^{N}N^{-1}\mathbf{H}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\mathbf{H}_{n}$ is multiplied to the innovation term of the update in \eqref{eq:ci_update_worker}, the optimal asymptotic covariance is achievable~(see, for example \citet{kar2013distributed}). However, such an update would need global model information available at each worker node.\\ \noindent We now discuss the interesting trade-offs between the communication cost and the asymptotic covariance that follow from Theorem \ref{th:2} and some existing results \citet{kar2012distributed,kar2013distributed}~(see Table \ref{tab:1}). At this juncture, we consider the setup, where the $\tau_{1}$ in the consensus potential $\beta_{t}$ in \eqref{eq:beta} is taken to be $1/2-(2+\epsilon_{1})^{-1}\le \tau_{1} \leq 1$. We specifically consider the case where $\tau_{1}=1$. It has been established in prior work~(see, for example \citet{kar2012distributed}) that in this case the asymptotic covariance depends on the network instantiation. To be specific, the averaged Laplacian $\overline{\mathbf{L}}$ which abstracts out the time-averaged information flow among the worker nodes has a key role in the asymptotic covariance in such a case. However, such a scheme, i.e., a single time scale variant\footnote{Single time-scale in the sense that the weights sequences $\beta_{t}$ and $\alpha_{t}$ have the same asymptotic decay rate.} of the proposed algorithm~(in general for $1/2-(2+\epsilon_{1})^{-1}\le \tau_{1} \leq 1$) enjoys a lower communication rate. Technically speaking, for the case when $\tau_{1}=1$, the communication rate is given by $\mathcal{C}_{t}=\Theta\left(t^{0.5(1+\epsilon)}\right)$. Hence, there is an intrinsic trade-off between the communication rate and the achievable asymptotic variance.\\ Intuitively, the algorithm exhibits a threshold behavior in terms of the consensus potential $\tau_{1}$. The threshold behavior is summarized in table \ref{tab:1}. \begin{table}[h] \centering \caption{Trade-off between Communication cost and Asymptotic Covariance}\label{tab:1} \begin{tabular}{ l l l l } {\small\textbf{Trade-Off}} & {\small\textbf{Convergence}}&{\small\textbf{Asymptotic Covariance}}&{\small\textbf{Comm. Cost.}}\\ \hline \\ ${\bf0<\tau_{1}<\frac{1}{2}-\frac{1}{2+\epsilon_{1}}}$ & \textbf{Consistent}& \textbf{Network Independent} & $\Theta\left(t^{\frac{3}{4}+\frac{\epsilon}{2}}\right)$ \\ ${\bf\frac{1}{2}-\frac{1}{2+\epsilon_{1}}\leq \tau_{1}\leq 1}$ & \textbf{Consistent} & Network Dependent & $\Theta\left(t^{\frac{1+\epsilon}{2}}\right)$ \\ ${\bf\tau_{1}>1}$ & Does not converge & Diverges & ${\bf\Theta\left(1\right)}$ \\ \hline \end{tabular} \end{table}In the case when, $\tau_{1} < 1/2-\frac{1}{2+\epsilon_{1}}$, the algorithm achieves a network independent asymptotic covariance while ensuring the communication rate to be strictly sub linear. However, in the case when $1/2-\frac{1}{2+\epsilon_{1}}\le \tau_{1} \leq 1$, the algorithm has a communication rate which is lower than the previous regime, but then achieves asymptotic covariance which depends on the network explicitly. Finally, in the case when $\tau_{1}>1$, the algorithm does not even converge to the true underlying parameter. \section{Simulation Experiments} This section corroborates our theoretical findings through simulation examples and demonstrates on both synthetic and real data sets communication efficiency of $\mathcal{CREDO}$. Subsection~{5.1} considers synthetic data, while Subsection~{5.2} presents simulation results on real data sets. \subsection{Synthetic Data} Specifically, we compare the proposed communication-efficient distributed estimator, $\mathcal{CREDO}$, with the benchmark distributed recursive estimator in \eqref{eq:benchmark_ci} which utilizes all inter-neighbor communications at all times, i.e., has a linear communication cost. The example demonstrates that the proposed communication-efficient estimator matches the MSE rate of the benchmark estimator. The simulation also shows that the proposed estimator improves the MSE \emph{communication rate} with respect to the benchmark. The simulation setup is as follows. We consider three instances of undirected graphs with $N=20$ nodes, with relative degrees\footnote{Relative degree is the ratio of the number of links in the graph to the number of possible links in the graph.} of nodes slated at $0.3736$, $0.5157$ and $0.6578$. The graphs were generated as connected graph instances of the random geometric graph model with radius $r=\sqrt{\mathrm{ln}(N)/N}$. We set $M=10$ and $M_n=1$, for all $n=1,...,N$; i.e., the unknown parameter $\boldsymbol{\theta}\in\mathbb{R}^{10}$, while each node makes a scalar observation at each time~$t$. The noises $\gamma_n(t)$ are Gaussian and are i.i.d. both in time and across nodes and have the covariance matrix equal to~$0.25 \times I$. The sampling matrices $\mathbf{H}_n$'s are chosen to be $2$-sparse, i.e., every nodes observes a linear combination of two arbitrary entries of the vector parameter. The non-zero entries of the $\mathbf{H}_{n}$'s are sampled from a standard normal distribution. The sampling matrices $\mathbf{H}_n$'s at the same time satisfy Assumption \ref{m:2}. The parameters of the benchmark and the proposed estimator are as follows. The benchmark estimator's consensus weight is set to $0.1(t+1)^{-0.49}$. With the proposed estimator, we study the first two regimes as illustrated in Table \ref{tab:1}, i.e., $0<\tau_{1}<\frac{1}{2}$ and $\frac{1}{2}\leq \tau_{1}\leq 1$. For the second regime, we study two different cases. We set $\rho_t = 0.1(t+1)^{-0.01}$ for both the regimes. We set $\zeta_t = (t+1)^{-0.235}$, $\zeta_t = (t+1)^{-0.315}$ and $\zeta_t = (t+1)^{-0.49}$ for the above mentioned first and two cases of the second regime respectively; that is, with the proposed estimator, we set $\epsilon=0.01$, $\tau_1 = 0.49$, $\epsilon=0.01$, $\tau_1 = 0.65$ and $\epsilon=0.01$, $\tau_1 = 1$ for the first and two cases of the second regime respectively. Note that the Laplacian matrix associated with the benchmark estimator and the expected Laplacian matrix associated with the proposed estimator, $\mathcal{CREDO}$ are equal in each of the three generated networks, i.e., $\mathbf{\overline{L}} =\mathbf{L}$. With all the three estimators, the innovation weight is set to $\alpha_t = (3.68(t+20))^{-1}$. Note that all the theoretical results in the paper hold unchanged for the ``time-shifted'' $\alpha_t$ used here. The purpose of the shift in the innovation weight is to avoid large innovation weights in the initial iterations. As a performance metric, we use the relative MSE estimate averaged across nodes: \begin{align*} \frac{1}{N}\sum_{n=1}^N \frac{ \|\mathbf{x}_n(t)-\boldsymbol{\theta} \|^2}{ \|\mathbf{x}_n(0)-\boldsymbol{\theta}\|^2}, \end{align*} further averaged across $50$ independent runs of the three estimators. Here, $\mathbf{x}_n(0)$ is node $n$'s initial estimate. With both estimators, at each run, at all nodes, we set $\mathbf{x}_n(0)=0$. Figure~\ref{Figure_1} plots the estimated relative MSE versus time~$t$ in log-log scale for the three networks. From figure \ref{Figure_1}, we can see that the MSE decay of the proposed estimator coincides with that of the benchmark estimator, especially in the $\tau_{1}=0.49$ regime across all the three networks, inspite of having lower communication costs. $\mathcal{CREDO}$ with $\tau_{1}=0.65$ and $\tau_{1}=1$, has higher convergence constants\footnote{It basically points to the fact that, though the MSE in all the cases have a $t^{-1}$ scaling, the variance decays of the $\tau_{1}=0.65$ and $\tau_{1}=1$ cases involve bigger constants and thus larger variances.} with respect to the MSE decay rates as compared to the benchmark estimator, though with far lower communication costs. We can also see that, for network $1$ and network $2$, with relative degree slated at $0.3136$ and $0.5157$ respectively, the MSE in the case of $\tau_{1}=0.65$ and $\tau_{1}=1$ shifts further away from the MSE curve of network $3$ and thus illustrating the network dependent convergence constant in the regime $1/2\le\tau_{1}\leq 1$. At the same time, from Figure \ref{Figure_1} it can be seen that with $\tau_{1}=0.49$, the convergence is practically independent of the network similar to the convergence of the benchmark estimator, as predicted by Theorem \ref{th:2}. Figure \ref{Figure_2} plots the estimated relative MSE versus average per-node communication cost~$C_t$. We can see that the proposed scheme has an improved communication rate with respect to the benchmark, as predicted by the theory. In spite of higher convergence constants with respect to the MSE decay rates, in the case of $\tau_{1}=0.65$ and $\tau_{1}=1$, the MSE decay rate in terms of the communication cost is still faster than the benchmark estimator. Also, in the case of $\tau_{1}=0.49$, there is a close to $10\times$ reduction in the communication cost for the same achievable relative MSE of $0.005$ as compared to the benchmark estimator. Figure \ref{Figure_2}, illustrates the trade-off between the MSE decay rate and the communication cost, there in, the lowest communication cost enjoyed by $\mathcal{CREDO}$ results in higher convergence constant with respect to the MSE decay, while the lowest convergence constant with respect to the MSE decay rate enjoyed by the benchmark estimator results in the highest communication cost. \begin{figure}[H] \centering \includegraphics[angle=-90,origin=c,height=4.0 in,width=4.0 in]{relative_mse_2.pdf} \caption{\emph{Comparison of the proposed and benchmark estimators in terms of relative MSE: Number of Iterations}. The solid lines represent the benchmark, the three different colors indicate the three different networks, while the three regimes are represented by the dotted lines.} \label{Figure_1} \end{figure} \begin{figure}[H] \centering \includegraphics[angle=-90,origin=c,height=4.0 in,width=4.0 in]{comm_cost_2.pdf} \caption{\emph{Comparison of the proposed and benchmark estimators in terms of relative MSE: Communication cost per node}. The solid lines represent the benchmark, the three different colors indicate the three different networks, while the three regimes are represented by the dotted lines.} \label{Figure_2} \end{figure} \subsection{Real Datasets} In order to evaluate the performance of $\mathcal{CREDO}$, we ran experiments on three real-world datasets, namely cadata~(\citet{LibSVM}), Abalone~(\citet{Lichman:2013}) and bank~(\citet{Delve}).\\ For the cadata dataset~(20640 data points, 8 features), we divided the samples into $20$ equal parts of $900$ data points each, after keeping $2640$ data points as the test set. For the 20 node network, we constructed a random geometric graph. For the Abalone dataset~(4177 data points, 8 features), we divided the samples into $10$ equal parts of $360$ points each, after keeping $577$ data points as the test set. For the 10 node network, we constructed a random geometric graph. For the bank dataset~(8192 data points, 9 features), we divided the samples into $20$ equal parts equal parts of $350$ points each, after keeping $1192$ data points as the test set. For the 20 node network, we constructed a random geometric graph. We added Gaussian noise to the dependent variables, i.e., housing price, the age of Abalone and fraction of rejecting customers respectively. The training datasets, with respect to the sensing model~\eqref{eq:sens_ob}, have dynamic regressors (a regressor here corresponds to a feature vector of one data point), i.e, time-varying $\mathbf{H}_{n}$'s for each agent $n$. Thus, we perform a pre-processing step where we average the training data points' regressors at each node to obtain an averaged $\overline{\mathbf{H}}_{n}$, which is then subsequently used at every iteration~$t$ in the update~\eqref{eq:ci_update_worker}. For each experiment (each dataset), a consistency check is done by ensuring that $\sum_{n=1}\overline{\mathbf{H}}_{n}^{\top}\mathbf{\Sigma}_{n}^{-1}\overline{\mathbf{H}}_{n}$ is invertible and thus global observability holds. As the number of data points at each node are the same, we sample along iterations~$t$ data points at each node without replacement, and thus the total number of iterations~$t$ we run the algorithms equals the number of data points at each node. In other words, the algorithm passes through each data point exactly once. We summarize the comparison of the number of communications needed by $\mathcal{CREDO}$ and the benchmark algorithm at the test error obtained after the total number of iterations in Table \ref{tab:2}. In particular, the test errors obtained in the cadata, abalone and the bank dataset are $0.015$, $0.03$ and $0.007$ of the initial test error, respectively. In figures \ref{fig:cahousing}, \ref{fig:abalone} and \ref{fig:bank}, we plot the evolution of the test error for each of the datasets as a function of the number of iterations and the communication cost. It can be seen that while $\mathcal{CREDO}$ matches the final test error of that of the benchmark algorithm, it requires on average thrice as less number of communications. Note that the theoretical setup in this paper rigorously establishes results pertaining to observation models with static regressors, i.e., static sensing matrices. However, the simulations on the real world datasets show that in spite of the time-varying regressors, the algorithm continues to demonstrate its improved communication efficiency over the benchmark. Moreover, as the sampling at each node is without replacement, the transients as far the performance is concerned can be improved by making the weight sequences decay after a few iterations instead of every iteration. Such a decay, while ensuring that the algorithm requirements are satisfied, would ensure faster assimilation of new data points in the transient phase.\\ \begin{figure} \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{cahousing_mse.pdf} \caption{Comparison of Test Error: Number of Iterations} \label{fig:cahousing_mse} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{cahousing_comm_cost.pdf} \caption{Comparison of Test Error: Communication cost per node} \label{fig:cahousing_comm_cost} \end{subfigure} \caption{CADATA Dataset: Comparison of the $\mathcal{CREDO}$ and benchmark estimators} \label{fig:cahousing} \end{figure} \begin{figure} \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{abalone_mse.pdf} \caption{Comparison of Test Error: Number of Iterations} \label{fig:abalone_mse} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{abalone_test_error_cc_pdf.pdf} \caption{Comparison of Test Error: Communication cost per node} \label{fig:abalone_comm_cost} \end{subfigure} \caption{Abalone Dataset: Comparison of the $\mathcal{CREDO}$ and benchmark estimators} \label{fig:abalone} \end{figure} \begin{figure} \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{bankrej_mse.pdf} \caption{Comparison of Test Error: Number of Iterations} \label{fig:bank_mse} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{bank_rej_comm_cost.pdf} \caption{Comparison of Test Error: Communication cost per node} \label{fig:bank_comm_cost} \end{subfigure} \caption{Bank Dataset: Comparison of the $\mathcal{CREDO}$ and benchmark estimators} \label{fig:bank} \end{figure} \begin{table}[h] \centering \caption{$\mathcal{CREDO}$: Communication cost across three datasets}\label{tab:2} \begin{tabular}{ l l l l l l} {\small\textbf{Dataset}} & {\small\textbf{Test Error}} & {\small\textbf{Network size}}&{\small\textbf{Avg. degree}}&{\small \textbf{$\mathcal{CREDO}$}}&{\small \textbf{Benchmark}}\\ \hline \\ $\textit{CADATA}$ & $2.15$&$20$&$4.8$&$\textbf{894}$ & $1810$ \\ $\textit{ABALONE}$& $0.95$ &$10$&$5.2$&$\textbf{564}$ & $1558$ \\ $\textit{BANK}$ & $0.015$ &$20$&$7.9$&$\textbf{1994}$ & $6962$ \\ \hline \end{tabular} \end{table} \section{Conclusion} \label{sec:conc} In this paper, we have proposed a communication efficient distributed recursive estimation scheme~$\mathcal{CREDO}$, for which we have established strong consistency of the estimation sequence and characterized the asymptotic covariance of the estimate sequence in terms of the sensing model and the noise covariance. The communication efficiency of the proposed estimator has been characterized in terms of the dependence of the MSE decay on the communication cost. Specifically, we have established that the MSE decay rate of $\mathcal{CREDO}$ with respect to the number of communications can be as good as $\Theta\left(\mathcal{C}_{t}^{-2+\zeta}\right)$, where $\zeta>0$ and $\zeta$ is arbitrarily small. Future research directions include the development of communication schemes, that are adaptive in terms of the connectivity of a node, and local decision making in terms of whether to communicate or not based on neighborhood information. The algorithm presented in this paper can be thought of as a distributed method to solve a stochastic optimization problem with a stochastic least squares-type cost function. A natural direction is to extend the proposed ideas to general stochastic distributed optimization. \vspace{10pt} \acks{The work of AKS and SK was supported in part by the National Science Foundation under grant CCF-1513936. The work of DJ was supported by the Ministry of Education, Science and Technological Development, Republic of Serbia, grant no. 174030.} \newpage
\section{Introduction} Intra-cellular signaling networks are paradigmatic examples of complex adaptive systems that exhibit a rich repertoire of responses to stimuli~\cite{IyengarEm1999}. Such networks mediate the response of a cell to a wide variety of extra- and intra-cellular signals primarily through a sequence of enzyme-substrate biochemical reactions~\cite{Lahav2013,Kholodenko2006}. While the complexity of the entire signaling system is daunting~\cite{Iyengar1999}, it is possible to gain an insight into how it functions by focusing on a key set of frequently occurring motifs. These often take the form of linear signaling cascades, referred to as pathways. One of the best known of these pathways is the mitogen-activated protein kinase (MAPK) cascade that is present in all eukaryotic cells~\cite{Johnson1999,Seger1995}. It is involved in regulating a range of vital cellular functions, including proliferation and apoptosis~\cite{Seger1995}, stress response~\cite{Cooper1995} and gene expression~\cite{Karin1996}. This signaling module comprises a sequential arrangement of three protein kinases, viz., MAPK, MAPK kinase (MAP2K) and MAPK kinase kinase (MAP3K). Modular function is initiated when extracellular signals stimulate membrane-bound receptors upstream of the cascade, with the information being relayed to MAP3K by a series of intermediaries. Activated kinases in each layer of the module function as enzymes for phosphorylating (and thereby activating) the kinase in the level immediately downstream, with the subsequent deactivation being mediated by corresponding dephosphorylating enzymes known as phosphatases (P'ase). The terminal kinase in this cascade, i.e., MAPK, transmits the signal further downstream by phosphorylating various proteins including transcription regulators~\cite{Alberts6thed}. Extensive investigations into the steady-state behavior of the cascade have contributed towards an in-depth understanding of several emergent features including ultrasensitivity~\cite{Ferrell1996}, and oscillations~\cite{Shankaran2009,Qiao2007} that arise through retrograde propagation of activity~\cite{Sitabhra2013,Ventura2008}. One of the striking features of the cascade is the occurrence of bistability which allows the system to switch between two possible states corresponding to low and high activity~\cite{Kholodenko2004,Herzel2007,KholodenkoBS2006,Qiao2007,Ferrell2002}. This provides a post-transcriptional mechanism for obtaining a sustained response from transient signals, i.e., cellular memory~\cite{Inniss2013,Xiong2003}. Memory can be understood as long-term alterations in the state of a system in response to environmental changes, which allow the system to retain information about transient signals long after being exposed to them~\cite{Inniss2013}. This can arise in the cell through mechanisms such as auto-regulatory transcriptional positive feedback~\cite{Silver2007} and nucleosomal modifications~\cite{Burrill2010}. In the context of cell-fate determination, it has been shown that an irreversible biochemical response can be generated from a short-lived stimulus through feedback-based bistability~\cite{Xiong2003}. This corresponds to a permanent alteration of the state of the system, thereby actively maintaining `memory' of the signal. As bistability has also been observed to arise through multi-site phosphorylation in signaling modules, protein phosphorylation has been suggested as a plausible post-transcriptional mechanism for cellular memory~\cite{Gunawardena2005,Hadac2013,Inniss2013}. In particular, there have been extensive investigations of the MAPK cascade as it integrates a large range of signals received by the cell in order to control numerous cellular decisions~\cite{Carew2013,Tsien2001,Sweatt2001,Schaller2004,Bonnet2005,Flavell2002}. While these investigations have considered the steady state behavior of the system, one may also observe transitory modulations in the response of the cascade in a changing environment. The latter could encode information about prior stimuli to which the system was exposed, and can be a potential mechanism for imparting a form of ``short-term'' memory to the signaling cascade. In this paper we show that a linear MAPK cascade can indeed exhibit short-term memory through transient modulations in its response to an environmental change. Crucially, this can arise even in the absence of explicit feedback between different layers or cross-talk with other pathways. These modulations can persist long after the initial trigger, lasting for durations that are several orders of magnitude longer than the time-scales associated with phosphorylation-dephosphorylation processes. We demonstrate that this occurs both when a signal begins activating the MAPK cascade, as well as when it is withdrawn. On application of the stimulus, the module exhibits long-lived frequency and amplitude modulations in the activation profile of the constituent kinases. Following the withdrawal of stimulus, activity in the cascade decays over an extremely long time-scale, during which reverberatory dynamics, characterized by large-amplitude spiking in MAP Kinase activity, can be observed. We explain the emergence of such long-lived memory of the withdrawn stimulus in terms of the imbalance of fluxes between different layers of the cascade, which results from the diversity of relaxation time-scales of the cascade components, and the reuse of activated kinases as enzymes when they are released from sequestration. This phenomenon is seen to be robust with respect to variations in the molecular concentrations of the constituent kinases and phosphatases. Our results reveal that a biochemical signaling module as simple as the MAPK cascade is capable of exhibiting short-term memory that is manifested as persistent modulations in the adaptive response of the system to changes in stimuli. \section{Methods} The dynamics of the three layer MAPK signaling cascade has been simulated using the Huang-Ferrell model~\cite{Ferrell1996}. Each of the constituent kinase and phosphatase-mediated enzyme-substrate reactions comprise (i) a reversible step corresponding to the formation of the enzyme-substrate complex and (ii) an irreversible product formation step corresponding to the activation/deactivation of a kinase, as described in the Supplementary Information. The time-evolution of the molecular concentrations of the different components of the cascade are modeled using a set of coupled ordinary differential equations (see Supplementary Information) that are integrated using the stiff solver \texttt{ode15s} implemented in {\em MATLAB Release 2010b}. Note that the quasi-steady-state hypothesis has not been invoked~\cite{Wolkenhauer2007}. To ensure that initially all kinases are non-phosphorylated we prepare the initial resting state of the system by simulating it for a long duration ($\sim 10^6$ mins) in the absence of any signal. Subsequently MAP3K is exposed to a stimulus of amplitude $S$ and duration $5000$ minutes. Following the removal of the stimulus, we continue to simulate the system until it returns to the resting state or the simulation duration exceeds $10^4$ minutes. We have analyzed the long-lived reverberatory activity of the cascade after the removal of the stimulus by using the following measures: \noindent (i) {\em The primary recovery time} ($\tau_{\rm PR}$). Following the activation of the cascade by introducing a stimulus, the maximum concentration $R_{\rm max}$ of MAPK$^{**}$ is recorded (Note that $^{**}$ represents a doubly phosphorylated kinase while $^*$ indicates that it is singly phosphorylated). On removing the stimulus, MAPK activity starts to decay. The time taken for MAPK$^{**}$ to monotonically decrease to half of $R_{\rm max}$ is defined as the primary recovery time ($\tau_{\rm PR}$). \noindent (ii) {\em Number of spikes during relaxation} ($N_r$). Following primary recovery, MAPK activity may exhibit a series of spikes, which are defined to be occurring whenever MAPK$^{**}$ concentration exceeds $70\%$ of $R_{\rm max}$. The number of such spikes that are observed before the cascade reaches its resting state is designated as $N_r$. \noindent (iii) {\em The total duration of reverberatory activity} ($\tau_r$). When spiking is observed in MAPK activity following the removal of the applied stimulus, the reverberatory activity duration is defined as the interval between the termination of primary recovery and the final spike event, i.e., $\tau_{r} = t_{final} - \tau_{PR}$. The time of the $i$th spike $t_i$ is defined as the instant when MAPK activity reaches maximum during that particular event. For $\tau_{PR} > 6000$ mins, the total duration of the reverberatory activity may not be measured accurately as the total simulation duration does not exceed $10^4$ minutes. \noindent (iv) {\em The total memory time} ($\tau_m$). The total duration of memory activity following removal of the applied stimulus is defined as the sum of the primary recovery time and the total duration of reverberatory activity, i.e., $\tau_{m} = \tau_{PR} + \tau_{r}$. Note that when the steady-state behavior of the cascade in presence of the signal is oscillatory, on withdrawing the signal the activity may decay extremely rapidly resulting in $\tau_{m} \approx 0$. \noindent (v) {\em Relaxation time} ($\tau_{\rm x}$). For the situations where the steady state corresponds to a fixed-point attractor we define a relaxation time $\tau_{\rm x}$ for each constituent of the cascade. This is the time required by its concentration to evolve to the half-way point between the resting state and steady state values. \begin{figure} \begin{center} \includegraphics[width=0.95\linewidth]{Fig_1.pdf} \end{center} \caption{Adaptive response of MAPK cascade to a changing stimulus. (a) Schematic representation of a linear MAPK cascade comprising three layers. Signaling is initiated by a stimulus S activating MAPK kinase kinase (MAP3K). Activation/deactivation of kinases is achieved by adding/removing phosphate groups, which is referred to as phosphorylation/dephosphorylation respectively. The activated MAP3K regulates the phosphorylation of MAPK kinase (MAP2K). Doubly phosphorylated MAP2K, in its turn, controls the activation of MAPK. The response of the cascade to the signal is measured in terms of MAPK activity, viz., the concentration of doubly phosphorylated MAPK. Deactivation of a phosphorylated kinase is regulated by the corresponding phosphatase (indicated by P'ase) in the corresponding layer of the cascade. The numbers $1 - 4$ represent the sequence of events that lead to the emergence of a large amplitude spiking response following the withdrawal of the stimulus. The enzyme-substrate protein complex formed during activation of MAPK by doubly phosphorylated MAP2K is indicated by ``c''. Broken lines have been used to highlight the principal processes that drive the reverberatory dynamics, which functions as a memory of the signal (see text for details). (b) Schematic illustrating the emergence of long-lived transient modulations of MAPK activity in response to initiation of a signal of optimal strength $S$. Withdrawing the stimulus can result in persistent large-amplitude spiking in the response of MAPK, suggestive of a form of ``short-term'' memory. The maximum response of MAPK to the stimulus is denoted by $R_{\rm max}$. The primary recovery time ($\tau_{PR}$) is characterized as the duration following withdrawal of stimulus after which MAPK activity decreases to its half-maximum value ($R_{\rm max}/2$) for the first time. The duration over which reverberatory dynamics occurs is indicated by $\tau_{r}$, while the total duration for which memory of the withdrawn stimulus persists is $\tau_{m} = \tau_{PR} + \tau_{r}$. } \label{fig:fig1} \end{figure} \section{Results} {\em Emergence of persistent modulations in kinase activity.} For the results reported in this paper we consider the Huang-Ferrell model of the MAPK signaling cascade~\cite{Ferrell1996}, schematically shown in Fig.~\ref{fig:fig1}~(a). Typically, investigations into the dynamics of this model focus on the steady-state response to sustained stimulation. In contrast, here we report on the transient activity of the system following a change in the stimulus. Specifically, we describe the response immediately following the introduction of a signal of amplitude $S$ and that following its removal. Our results reveal that such transients can be unexpectedly long-lived, lasting for durations that are much longer compared to the time-scales associated with the phosphorylation and dephosphorylation processes in the cascade (Fig.~\ref{fig:fig1},~b). We first report the behavior of a cascade that is initially in the resting state (characterized by the absence of any phosphorylated components) when it is exposed to a signal. The transient activity that immediately follows exhibits several non-trivial features such as regular spiking in the activity of MAP2K and MAPK depending on the total concentrations of the kinases (Fig.~\ref{fig:fig2}, b-e) and the signal strength. For a fixed initial state and signal strength, the spikes can further show modulation in their frequency (Fig.~\ref{fig:fig2}, c-e) as well as amplitude (Fig.~\ref{fig:fig2}, b and d). In certain cases, both types of modulation can be observed (Fig.~\ref{fig:fig2},~d). In the representative time series of MAPK activity shown in Fig.~\ref{fig:fig2}(a-e), the system dynamics eventually converges to a stable fixed point (Fig.~\ref{fig:fig2}, a-d) or a stable limit cycle (Fig.~\ref{fig:fig2}, e), with the attractors being independent of initial conditions (corresponding phase space projections are shown in Fig.~\ref{fig:fig2}, f-i). Note that when phosphorylated components are initially present, the system reaches the asymptotic state faster. \begin{figure} [hbt!] \begin{center} \includegraphics[ ]{Fig_2.pdf} \end{center} \caption{Transient activity in MAPK cascade immediately following the application of a stimulus having amplitude $S = 1.2 \times 10^{-6} \mu M$ at $t=0$. (a-e) Characteristic time series for the normalized concentration of doubly phosphorylated MAPK ($n_{K^{**}}$) shown for different total concentrations of kinases. The concentration of active MAPK is insignificant prior to the time periods shown in panels (a-e). (f-j) Trajectories representing the evolution of the systems in panels (a-e) in the projection of the phase-space on the planes comprising normalized concentrations of active MAP3K ($n_{3K^{*}}$), singly phosphorylated MAP2K ($n_{2K^{*}}$) and active MAPK ($n_{K^{**}}$). The concentrations have been normalized by the total concentration of MAP3K ($[3K]_{tot}$), MAP2K ($[2K]_{tot}$) and MAPK ($[K]_{tot}$), respectively. The light blue and dark blue markers in each of the panels (f-j) demarcate the portion of the trajectories that correspond to the time series shown in panels (a-e). The steady state of the system is represented by a red marker in panels (f-i). In panels (e) and (j), the system converges to a stable limit cycle. For details of parameter values for the systems shown in each of the panels see Supplementary Information. } \label{fig:fig2} \end{figure} \begin{figure} [hbt!] \begin{center} \includegraphics[]{Fig_3.pdf} \end{center} \caption{Transient activity in MAPK cascade immediately following the withdrawal (at $t=0$) of an applied stimulus having amplitude $S = 1.2 \times 10^{-6} \mu M$. (a-e) Characteristic time series for the normalized concentration of doubly phosphorylated MAPK ($n_{K^{**}}$) shown for different total concentrations of kinases. (f-j) Trajectories representing the evolution of the systems in panels (a-e) in the projection of the phase-space on the planes comprising normalized concentrations of active MAP3K ($n_{3K^{*}}$), singly phosphorylated MAPK ($n_{2K^{*}}$) and active MAPK ($n_{K^{**}}$). The concentrations have been normalized by the total concentration of MAP3K ($[3K]_{tot}$), MAP2K ($[2K]_{tot}$) and MAPK ($[K]_{tot}$), respectively. The steady state of the system prior to the withdrawal of the stimulus is represented by a red marker (panels f-i). The system in panels (e) and (j) is seen to relax from a state characterized by stable limit cycle oscillations (represented by the blue marker). In each trajectory shown in (f-j) the grey marker denotes the state of the system corresponding to the final time point in panels (a-e). The concentration of active MAPK is close to its resting state value following the time period shown in (a-e). The parameter values for each panel are same as those for the corresponding panels in Fig.~\ref{fig:fig2}. } \label{fig:fig3} \end{figure} When the signal is withdrawn, the signaling cascade can respond with large-amplitude spiking behavior in the MAPK activity before eventually relaxing to the resting state (Fig.~\ref{fig:fig3}). These phenomena are seen for a range of stimuli strengths and are indicative of a form of memory that can be achieved without explicit feedback or inter-pathway crosstalk. An essential condition for observing the reverberatory activity is that prior to withdrawing the applied stimulus, the system state has been driven above the low-amplitude response regime. The complex modulations seen in these figures may arise as a result of coexisting attractors. For example, in Fig.~\ref{fig:fig2}~(d) the system state spends considerable time in the basin of attraction of a limit cycle before approaching a stable fixed point (see Supplementary Information for details). \begin{figure} [hbt!] \begin{center} \includegraphics[width=0.99\linewidth]{Fig_4.pdf} \end{center} \caption{Processes underlying emergent memory and reverberatory dynamics in the MAPK cascade. (a) A characteristic time-series for the normalized concentrations of singly and doubly phosphorylated MAPK ($n_{K^{*}}$ and $n_{K^{**}}$, respectively) following the removal of an applied stimulus of amplitude $S = 2.0 \times 10^{-6} \mu M$ at $t = 0$. The numbers ($1 - 4$) represent the sequence of events that lead to the emergence of the post-stimulus large-amplitude spiking activity shown schematically in Fig.~\ref{fig:fig1}~(b). (b) Normalized chemical flux $N_{\rm Flux}$ of MAPK and MAP2K$^{**}$ shown for the segment of the time-series where the spiking behavior in $n_{K^{**}}$ is observed following the withdrawal of the stimulus to MAP3K [demarcated by broken vertical lines in (a)]. (c) Normalized chemical flux $N_{\rm Flux}$ of MAPK$^{**}$ shown along with the difference between the normalized fluxes of MAP2K$^{**}$ and MAPK for the duration indicated by broken vertical lines in (b) corresponding to the peak in the spiking activity of MAPK$^{**}$. For both panels (b) and (c), normalization of flux is with respect to the maximum of the flux for MAPK$^{**}$. (d) Characteristic time-series for the reverberatory activity of MAPK following the withdrawal of a stimulus of amplitude $S = 1.2 \times 10^{-6} \mu M$ at $t = 0$, showing the normalized concentration of MAPK$^{**}$ ($n_{K^{**}}$) along with that of the protein complex MAP2K$^{**}$.MAPK ($n_{2K^{**}.K}$ = [MAP2K$^{**}$.MAPK]/$[2K]_{tot}$). The reference line shows that the peak normalized concentration of the protein complex eventually decreases over time. For details of parameter values for (a-c) see Supplementary Information. The parameter values for panel (d) are same as those in Fig.~\ref{fig:fig3}(d). The steady state of the system prior to the withdrawal of the stimulus is represented by a red marker [panels (a) and (d)] while the grey marker in (d) corresponds the final time point in Fig.~\ref{fig:fig3}(d). } \label{fig:fig4} \end{figure} \begin{figure} [hbt!] \begin{center} \includegraphics[ ]{Fig_5.pdf} \end{center} \caption{Components of the MAPK cascade exhibit relaxation behavior occurring over a broad range of time-scales. Decay of activity is shown after withdrawing an applied stimulus of amplitude $S = 1.2 \times 10^{-6} \mu M$. (a) The relaxation times $\tau_{\rm x}$ of the different molecular species (non- , singly- and doubly phosphorylated kinase proteins) in each of the layers of the cascade vary with the total concentration of MAP2K. The nature of this dependence is distinct for lower and higher values of $[2K]_{tot}$, which is most prominently observed in the lower layers of the cascade. (b) The occurrence of distinct regimes in the relaxation behavior of MAPK$^{**}$ for different $[2K]_{tot}$ is related to the corresponding increase in the steady state value attained by MAPK$^{**}$ concentration under sustained stimulation of the cascade. At a specific value of the steady-state normalized MAPK activity $n_{K^{**}}$, we observe a crossover from the regime characterized by slowly increasing $\tau_{\rm x}$ seen at lower total concentrations of MAP2K to a regime where $\tau_{\rm x}$ increases relatively rapidly for higher $[2K]_{tot}$. (c) The crossover behavior is also observed in the dependence of the closely related measure $\tau_{\rm PR}$, the primary recovery time (see Methods), on $[2K]_{tot}$. The difference between the two regimes become more prominent upon increasing the total concentration of MAP3K ($[3K]_{tot}$). For both panels (a) and (b) $[K]_{tot} = 0.8 \mu M$ and $[3K]_{tot} = 2.0 nM$, while for panel (c), $[K]_{tot} = 0.8 \mu M$. For details of all other parameter values see Supplementary Information. } \label{fig:fig5} \end{figure} \begin{figure} [hbt!] \begin{center} \includegraphics[]{Fig_6.pdf} \end{center} \caption{Dependence of reverberatory activity on the total kinase concentrations, viz., $[K]_{tot}$, $[2K]_{tot}$ and $[3K]_{tot}$. (a-b) The number of spikes $N_{r}$, (c-d) the total memory time $\tau_{m}$ (in minutes) and (e-f) isosurfaces for $N_r$ observed on withdrawing an applied stimulus of amplitude $S$ [$=0.8 \times 10^{-6} \mu M$ for (a,c,e) and $1.2 \times 10^{-6} \mu M$ for (b,d,f)] are shown as functions of total concentrations of the three kinases. (g) The primary recovery time $\tau_{\rm PR}$ (stars) and the total duration of reverberatory activity $\tau_{r}$ (filled circles) are shown for different values of $N_r$ (indicated by the color bar). While $\tau_{\rm PR}$ increases monotonically with increasing total MAPK concentration, $\tau_{r}$ shows a more complex dependence ($[2K]_{tot} = 3 \mu M$ and $[3K]_{tot} = 4 nM$). (h) The dependence of $\tau_{r}$ on $[K]_{tot}$ for different values of $N_{r}$ has a similar nature for different choices of $[3K]_{tot}$ (indicated by the color bar, $[2K]_{tot} = 3 \mu M$). Note that for panel (h), we consider only situations where the system attains a steady state on maintaining stimulation. For details of all other parameter values see Supplementary Information. } \label{fig:fig6} \end{figure} {\em Processes underlying long-lived memory and reverberatory dynamics.} When the stimulus is withdrawn from the MAPK cascade, the decline in MAP Kinase activity comes about through MAPK$^{**}$ binding to MAPK P'ase which dephosphorylates it, resulting in an increased concentration of MAPK$^*$ [Step $1$, Figs.~\ref{fig:fig1}(a) and \ref{fig:fig4}(a)]. In turn, the phosphatase binds to MAPK$^*$ thereby deactivating it to MAPK which results in an extremely rapid decline in the concentration of MAPK$^*$ (Step $2$). Concurrently, the deactivation of MAP2K$^{**}$ is delayed, as most of it is bound in the complex MAP2K$^{**}$.MAPK that has a long time-scale of disassociation. To proceed further we can analyze the constituent processes in terms of the normalized chemical flux $N_{\rm Flux}$ of a molecular species, i.e., its rate of growth expressed relative to the maximum rate of growth of MAPK$^{**}$. We observe that the suppression of MAP2K$^{**}$ deactivation mentioned above results in its normalized chemical flux exceeding that of MAPK [Fig.~\ref{fig:fig4}(b)]. Thus, there is a net growth in activity in the MAP Kinase layer as whenever MAP2K$^{**}$ is released from the complex, it is available to phosphorylate MAPK which results in an increase in the concentration of MAPK$^{*}$ (Step $3$). The resulting rise in MAPK$^{*}$ manifests as a spike in its concentration [Fig.~\ref{fig:fig4}(a)], and it subsequently gets phosphorylated again to increase MAPK$^{**}$ concentration even in the absence of any stimulation (Step $4$). When the net difference between the normalized flux of MAP2K$^{**}$ and MAPK reaches a maximum, the normalized chemical flux of MAPK$^{**}$ attains its highest value and consequently peak activity of MAP Kinase is observed [Fig.~\ref{fig:fig4}(c)]. Thus, steps 1-4 represent one complete cycle of MAP Kinase reverberatory activity characterized by an initial decline and a subsequent rise in MAPK$^{**}$ concentration. These steps are subsequently repeated a number of times resulting in a series of spikes in MAPK activity [Fig.~\ref{fig:fig4}(d)]. The abrupt nature of the rise and fall of MAP Kinase activity that manifests as spikes is a consequence of the bistable nature of the dynamics in the MAPK layer of the cascade~\cite{Kholodenko2004,KholodenkoBS2006}. We note that similar spiking behavior is also observed in the activity of MAP2K, with the phase of the MAP2K$^{**}$ spikes shifted slightly forward with respect to the corresponding ones in MAPK$^{**}$, which suggests that they result from retrograde propagation of activity from the MAPK to the MAP2K layer~\cite{Ventura2008}. On the other hand, MAP3K shows a monotonic decline in its activity following the removal of the stimulus. In order to characterize in detail the memory of prior activity retained by the cascade which is manifested as long-lived transient reverberations following the withdrawal of stimulus, we use the following measures (see Methods): (i) the primary recovery time ($\tau_{\rm PR}$), (ii) the number of spikes ($N_{r}$) that occur during the relaxation process, (iii) the temporal intervals between successive spikes ($t_{i}-t_{i-1}$, where $t_i$ is the time of occurrence of the $i$th spike event) and (iv) the total duration of reverberatory activity ($\tau_{r}$) following primary recovery. The total memory time ($\tau_{m}$) is the sum of $\tau_{\rm PR}$ and $\tau_{r}$ as indicated in Fig.~\ref{fig:fig1}~(b). In the following we use these measures to present a detailed characterization of the behavior of the cascade components over a range of parameter values (Figs.~\ref{fig:fig5}-\ref{fig:fig7}). {\em MAP Kinase cascade components have different recovery timescales.} As mentioned earlier, the emergence of long-lived reverberatory activity of MAPK following the withdrawal of an applied stimulus can be linked to the flux imbalance of different cascade components which suggests significant differences in their rates of relaxation. As shown in Fig.~\ref{fig:fig5}~(a), this is indeed the case, even for parameter regimes where no spiking activity of MAPK is observed (i.e., $N_{r} = 0$). As can be seen, the nature of increase of the relaxation time with increasing total concentrations of kinase protein MAP2K is distinct for the different molecular species and also depends on the state of their phosphorylation. In the lower layers of the cascade, we also find a crossover between two regimes seen at lower and higher values of $[2K]_{tot}$ respectively. These regimes are characterized by relatively slow and rapid increases (respectively) in the recovery times with increasing $[2K]_{tot}$, and appear to be related to the steady-state value attained by MAPK activity upon sustained stimulation of the cascade for the corresponding value of $[2K]_{tot}$ [Fig.~\ref{fig:fig5}~(b)]. The crossover between the two regimes is seen to occur for a value of $[2K]_{tot}$ for which $\sim 17\%$ of MAPK is activated for the parameter values used in Fig.~\ref{fig:fig5}~(b). The distinct regimes are also observed in the dependence of the primary recovery time $\tau_{\rm PR}$ on $[2K]_{tot}$ [Fig.~\ref{fig:fig5}(c)]. As can be observed, the difference between the regimes becomes more pronounced with an increase in the total concentration of MAP3K. An important point to note is that for lower values of $[2K]_{tot}$, the recovery time decreases with increasing $[3K]_{tot}$ while the reverse trend is seen for higher values of $[2K]_{tot}$. We have verified that increasing the stimulus amplitude $S$ while keeping the total MAP3K concentration fixed has a similar effect on the relaxation behavior of activated MAPK (see Supplementary Information). As increasing total concentration of MAP2K results in increased steady-state activity of MAPK, we conclude that, in general, higher activity states of MAPK are associated with increasing relaxation time when either the signal or the substrate (MAP3K) is increased. Conversely, for states characterized by much lower MAPK activity, larger values of $S$ or $[3K]_{tot}$ results in reduced relaxation periods. {\em Dependence of reverberatory activity on total kinase concentrations.} Diverse cellular environments are characterized by different total concentrations of the various molecular components of the MAPK cascade. Thus, in order to determine the robustness of spiking and reverberatory activity following the removal of an applied stimulus, it is important to see how they are affected by varying total kinase concentrations. Such a study will also indicate the ease with which these phenomena can be experimentally observed. Fig.~\ref{fig:fig6} shows the variation of different measures of reverberatory activity on the total concentrations of MAPK, MAP2K and MAP3K. While there is a complex dependence on these parameters for the exact number of spikes $N_r$ and the duration of the total memory time $\tau_m$, the phenomenon of reverberatory activity following withdrawal of stimulation can be observed over a large range of the parameter space, underlining its robustness. We also observe that on increasing $[3K]_{tot}$, the response of $N_{r}$ to variation in $[K]_{tot}$ and $[2K]_{tot}$ becomes relatively homogeneous. Increasing the stimulus amplitude $S$ [compare panels (a,c,e) with (b,d,f) of Fig.~\ref{fig:fig6}] does not seem to alter the qualitative nature of the variation in $N_r$ and $\tau_m$ over the parameter space in general, although we do observe that the domains corresponding to different values of $N_r$ occupy different regions [Fig.~\ref{fig:fig6}(e and f)]. Note that for low $[3K]_{tot}$, high values of $N_{r}$ are observed to coexist with low values of $\tau_{m}$ [Fig.~\ref{fig:fig6}(a,c and b,d)]. While it may appear surprising that these two measures of memory are not in consonance in this region of parameter space, it can be explained by noting that the stimulated system is in an oscillatory state, and following the removal of the signal these relatively high-frequency oscillations cease after a short duration. Fig.~\ref{fig:fig6}~(g) suggests that the variation seen in $\tau_m$ as a function of the total MAPK concentration for a specific $N_r$ is mostly governed by $\tau_r$, the total duration of reverberatory activity, with the corresponding dependence of $\tau_{PR}$ on $[K]_{tot}$ being weak. As the total MAPK concentration is increased, we observe that while the primary recovery time increases almost linearly, the nature of the reverberatory dynamics as reflected in $\tau_r$ shows a more complex dependence on $[K]_{tot}$ [Fig.~\ref{fig:fig6}~(g)]. If for a given value of $[K]_{tot}$ the MAPK activity following withdrawal of the stimulus shows $N_r$ spikes over a duration of $\tau_r$, then on increasing $[K]_{tot}$ the time-interval between the spikes increases (thereby resulting in an increase of $\tau_r$) until a critical value beyond which the last of the $N_r$ spike no longer appears. Thus, at this point $N_r$ reduces by unity with a concomitant drop in $\tau_r$. This series of events is repeated for steadily decreasing values of $N_r$ as the total MAPK concentration is increased further. Each value of $N_r$ is associated with a characteristic rate of increase in $\tau_r$ with $[K]_{tot}$. With a reduction in $N_r$ (as a result of increasing $[K]_{tot}$), this rate is found to decrease as well, which suggests a saturation of the system response. These results are robust with respect to different choices of total MAP3K concentration as can be seen from Fig.~\ref{fig:fig6}(h), suggesting that similar behavior will be seen for a range of strengths for the applied signal (see Supplementary Information). \begin{figure} [hbt!] \begin{center} \includegraphics[]{Fig_7.pdf} \end{center} \caption{Dependence of reverberatory activity on the total concentrations of the phosphatases MAPK P'ase ($[P_{K}]$), MAP2K P'ase, ($[P_{2K}]$) and MAP3K P'ase ($[P_{3K}]$). (a) The number of spikes $N_{r}$ and (b) the total memory time $\tau_m$ (in minutes) observed on withdrawing an applied stimulus of amplitude $S$ $=0.8 \times 10^{-6} \mu M$. Situations where the primary recovery time is longer than a maximum or cut-off value (see Methods), such that the duration of the reverberatory dynamics cannot be properly measured, are indicated by the color corresponding to ``U''. (c) The interval between successive spikes $i-1$ and $i$ increases with time ($t_{i}$ being the time of occurrence of the $i$th spike). As the MAPK P'ase concentration is increased, the durations of these intervals are seen to increase. The total concentrations of the other two phosphatases are maintained at $[P_{2K}] = 680 pM$ and $[P_{3K}] = 10 pM$. (d) The variation of primary recovery time $\tau_{\rm PR}$ (stars) and the total duration of reverberatory activity $\tau_{r}$ (filled circles) as a function of total MAPK P'ase concentration are shown for different values of $N_r$ (indicated by the color bar). While $\tau_{\rm PR}$ decreases monotonically with increasing $[P_{K}]$, $\tau_{r}$ shows a more complex dependence ($[P_{2K}] = 200 pM$ and $[P_{3K}] = 6 pM$). (e) Dependence of the total memory time $\tau_{m}$ on total MAPK P'ase concentration ($[P_K]$ shown in log scale) for different total concentrations of MAP2K P'ase (values indicated above each of the three panels) and MAP3K P'ase (indicated using different colors as shown in the color bar). Note that we consider only situations where the system attains a steady state on maintaining stimulation. For details of all other parameter values see Supplementary Information. } \label{fig:fig7} \end{figure} {\em Dependence of reverberatory activity on total phosphatase concentrations.} We have also investigated the role that phosphatase availability plays on the reverberatory activity of the cascade following the withdrawal of the stimulus. As is the case for total kinase concentrations shown in Fig.~\ref{fig:fig6}, we see from Fig.~\ref{fig:fig7}~(a-b) that the number of spikes $N_r$ and the duration of total memory time $\tau_m$ depend on the total concentrations of the phosphatases MAPK P'ase, MAP2K P'ase, and MAP3K P'ase. For larger values of the concentrations, viz., $[P_K]$, $[P_{2K}]$ and $[P_{3K}]$, respectively, the system operates in the low-amplitude response regime. As mentioned earlier, the reverberatory MAPK dynamics during recovery following withdrawal of the applied stimulus will not be seen in this regime. As the phosphatase concentrations are decreased, spiking behavior of MAPK activity is observed with both $\tau_m$ and $N_r$ attaining high values in an optimal range. The large variation seen in $\tau_m$ [Fig.~\ref{fig:fig7}~(b)] arises as regions in $[P_{2K}]$-$[P_{3K}]$ parameter space characterized by the same value of $N_{r}$ are seen to exhibit a range of different values of $\tau_{r}$ and $\tau_{PR}$ [Fig.~\ref{fig:fig7}~(d)]. For reverberatory activity associated with a specific $N_{r}$, we observe that the duration $\tau_{r}$ increases with increasing total MAPK P'ase concentration. This is a consequence of the intervals between successive spikes ($t_{i}-t_{i-1}$) increasing with $[P_{K}]$ as is shown in Fig.~\ref{fig:fig7}~(c). Note that the results are qualitatively similar for different amplitudes of the applied stimulus (see Supplementary Information). However, increasing $[P_K]$ results also in decreased time for primary recovery $\tau_{PR}$ [Fig.~\ref{fig:fig7}~(d)], which in conjunction with the previously mentioned result leads to non-monotonic dependence of the total memory time $\tau_{m}$ on phosphatase availability. While this non-monotonicity is suggested in Fig.~\ref{fig:fig7}~(b), it is shown clearly in Fig.~\ref{fig:fig7}~(e) where the central panel corresponds to situations where spiking behavior is observed in MAPK activity. Investigation into the dependence of $\tau_{m}$ on $P_{K}$ [Fig.~\ref{fig:fig7}(e)] reveals that the range of $[P_K]$ over which reverberatory activity (i.e., $N_r \neq 0$) occurs is demarcated by discontinuities in the functional dependence of $\tau_{m}$ on $P_{K}$. For intermediate $P_{2K}$ [Fig.~\ref{fig:fig7}(e), central panel] where the system attains a steady state on maintaining stimulation, the spiking activity following withdrawal of the stimulus becomes more prominent for low total concentration of MAP3K P'ase. For higher $P_{2K}$ [Fig.~\ref{fig:fig7}(e), right panel] where the system becomes oscillatory over an intermediate range of $[P_K]$, reverberatory activity is observed over a broader range of $[P_{3K}]$. While we have assumed that the same phosphatase acts on both the singly and doubly phosphorylated forms of the kinase in a particular layer of the cascade (as in the canonical Huang-Ferrell model), we have explicitly verified that our results are not sensitively dependent on this. \section{Discussion} In this paper we have shown that an isolated MAPK signaling module can serve as a fundamental motif in the intra-cellular signaling network for imparting a form of short-term memory to the cell. The emergence of long-lived reverberatory activity reported here arises from the diversity of relaxation timescales for the different components of the MAP Kinase cascade, which results in flux imbalance between activation of the MAPK layer and deactivation in the MAP2K layer. One may therefore expect to observe results qualitatively similar to what has been reported here whenever the system has disparate timescales regardless of the actual molecular concentrations and kinetic rates which can vary substantially across different cells~\cite{Stumpf2016,Legewie2013,Das2013}. Thus, as the MAPK cascade is present in all eukaryotic cells~\cite{Seger1995,Johnson1999}, the mechanism for short-term memory in such a signaling cascade that is presented here may hold for such cells in general. As the duration of MAPK$^{**}$ activity is critical for many cellular decisions~\cite{Marshall1995}, e.g., the prolonged activation of ERK resulting in its translocation to the nucleus~\cite{Seger2011}, the persistent reverberatory activity seen here may play a non-trivial role in regulation of cellular functions. The basal level activity of MAPK in a normal cell is maintained at a low proportion of the total MAPK concentration and serves several biological functions~\cite{Kosik1998}. We observe a crossover between two qualitatively distinct regimes of relaxation behavior of MAPK$^{**}$ occurring at a steady state that is characterized by relatively low proportion of activation of the available MAPK [$\sim 17\%$ in Fig.~\ref{fig:fig5}~(b)]. Thus, there appears to be an effective threshold for MAPK activity (which may be related to its basal state level) that demarcates the different relaxation regimes following the removal of the applied stimulus. A similar crossover is also observed for the primary recovery time $\tau_{PR}$. It is known that ERK MAPK isoforms (e.g., p42 and p44) are abundantly expressed in non-dividing terminally differentiated neurons~\cite{Sweatt2001}. Activation of MAPK by spaced stimulation is known to be responsible for morphological changes in dendrites~\cite{Tsien2001}. Studies also suggest that the activation of the MAPK pathway is linked with associative learning in the mammalian nervous system, synaptic plasticity and neurological memory~\cite{Carew2013,Tsien2001,Carew2008,Sweatt1998,Sweatt2001}. An intriguing possibility suggested by the results reported here is that the observed repeated spiking in MAPK activity may function as an effective temporally spaced signal to the nucleus of a neuron. This can then facilitate subsequent changes in the cell required for memory formation. Another well-known example of eukaryotic cellular memory is observed during chemotactic migration along the gradient of a chemical signal~\cite{Rappel2014,Shah2016}. The directionality of migration is known to persist for a certain duration, even if the chemical gradient is altered or becomes static. Studies show that the protein Moesin contributes to the long-lived rigidity of the cytoskeleton assembly that subsequently leads to the directional memory in polarized migrating cells~\cite{Shah2016}. However, the intra-cellular processes that underlie the persistent activity of Moesin in the absence of a gradient mediated signal are still largely unknown. Evidence suggests that the regulation of Moesin and other ERM proteins are linked with the activity of the MAPK pathway~\cite{Huang2009,Wang2006}. The long-term reverberatory activity of MAPK following the withdrawal of a stimulus that is reported here may be a possible mechanism underlying such persistent cellular behavior. To conclude, we have shown the possibility of long-lived reverberatory activity in a signaling cascade following the withdrawal of external stimuli. Our results suggest a mechanism through which the intra-cellular signaling system can encode short-term memory of signals to which the cell was previously exposed. The large-amplitude spiking activity of MAPK following the removal of a prior stimulus may also provide a mechanism for signal integration and learning when the cascade is repeatedly stimulated. We note that there may be additional factors not considered here that may lengthen the persistence of reverberatory activity, including scaffold proteins that increase the lifetime of kinase complexes. Our results suggest that the MAPK cascade potentially has a key role in shaping the information processing capabilities of eukaryotic cells in diverse environments. \begin{acknowledgements} {\small SNM is supported by the IMSc Complex Systems Project ($12^{\rm th}$ Plan). The simulations required for this work were done in the High Performance Computing facility (Nandadevi and Satpura) of IMSc which is partially funded by DST (SR/NM/NS-44/2009). We thank James Ferrell, Upinder Bhalla, Tharmaraj Jesan, Uddipan Sarma, Bhaskar Saha, Jose Faro, Vineeta Bal, J. Krishnan, Mukund Thattai, Marsha Rosner and Pamela Silver for helpful discussions.} \end{acknowledgements}
\section{Introduction} \label{sec:intro} Convolutional neural networks (CNN) became very popular to solve classification problems in the last five years. Several authors have proposed to use CNNs to solve steganalysis problems \cite{Qian_2015_Deep}, \cite{Pibre2016}, \cite{Xu2016a}, \cite{Ye2017}. These methods yield encouraging results but remained comparable to the state-of-the-art algorithms performances. Authors have explored many approaches to improve it such as using a phase split \cite{Chen2017}, an ensemble of CNN \cite{Xu2016b}, the transfer learning \cite{Qian2016_Transfer} or the augmentation of the database \cite{Ye2017}, \cite{Zeng2017_Millions}. Let us put aside the quest of the best deep learning network architecture for the steganalysis task. In this paper, our objective is to look at a "real-world" problem \cite{Ker2013_RealWorld}, which is to learn with a small size database. This problem is also known as low regime learning. It is well-known that supervised approaches based on the use of CNNs need a lot of samples when used for steganalysis purposes. The seminal propositions of Qian {et al.} \cite{Qian_2015_Deep} and Pibre {et al.} \cite{Pibre2016} used from 8 000 to 80 000 spatial images resized to 256$\times$256 (BOSSBase \cite{Bas2011-BOSS} or ImageNet \cite{Krizhevsky_AlexNet_2012}). In 2017 the authors mainly use around 5 000 pairs of images \cite{Xu2016a}, \cite{Ye2017}, \cite{Chen2017}, \cite{Xu2017}, which is probably insufficient. The number of images for the learning has even reached five millions of samples in \cite{Zeng2017_Millions}. In an operational and realistic protocol, the number of available images for the learning task could be much smaller than what is used in "laboratory". Because all the CNN-based steganalysis are sensitive to the cover-source mismatch phenomenon \cite{Cancelli2008, Ker2014_Mishmash, kodovsky2014study}, each time the source distribution is modified, the learning process has to be restarted. The aim of this paper is thus to look at the impact of {\it artificial data-augmentation}, which is probably more realist than having access to a huge database of a given source distribution. In all cases, using data-augmentation is an automatic process which requires less human time consumption than searching for images of similar distributions. Today, the classical scenario used to test an embedding algorithm efficiency is to use the BOSSBase \cite{Bas2011-BOSS} for training and testing, assigning 5000 of the 10000 images to the learning database, while the rest used as testing database. A classical way to artificially increase the learning database without changing the labels is to flip and rotate the learning database without interpolation \cite{Krizhevsky_AlexNet_2012}. Recently, Ye {\it et al.} \cite{Ye2017} proposed to increase the size of the training database, by adding to the initial 50\% of BOSSBase, the whole BOWS2 \cite{BOWS2008} database (this gives a total of 15000 pairs of images for the training set), while the test set is unchanged and is made of the remaining 50\% of BOSSBase. This process effectively improves the results in terms of error probability of detection. However, it could be considered as {\it a very lucky measure} because the improvement is essentially due to the fact that BOSSBase and BOWS2 share some identical camera models, and a similar "development" process\footnote{The "development" stands for the numerical processes transforming a color RAW image to a 256$\times$256 8-bit grey-levels image}. The question is thus still open: how should we process in order to enrich a learning database? Can we enrich even more the BOSS learning base in order to obtain a huge learning base, and thus improve the steganalysis results? In this paper we intend to experimentally explore efficient ways to {\bf increase} the learning database of a CNN based steganalyzer. In Section \ref{sec:cnn}, we recall the topology of the CNN used for the various experiments \cite{Yedroudj2018_Net}. In Section \ref{sec:methodo}, we describe the experimental protocol and briefly present all the setups. In Section \ref{sec:exp}, we experimentally explore the different augmentation methods and we draw conclusions on the practical question of the learning database augmentation. \section{Yedroudj-Net CNN} \label{sec:cnn} In this paper, our study on the data augmentation for spatial steganalysis is conducted only on the Yedroudj-Net \cite{Yedroudj2018_Net}. This CNN has been created in 2017 and is a mix of the Xu-Net \cite{Xu2016a} and Ye-Net \cite{Ye2017}, which are the two best CNNs created up to 2017 for steganalysis purposes. Yedroudj-Net gives better results than Xu-Net \cite{Xu2016a} and Ye-Net \cite{Ye2017} on WOW \cite{Holub2012_WOW} and S-UNIWARD \cite{Holub2014}, and also provides better results than an Ensemble Classifier \cite{Kodovsky2012-EnsembleClassifiers} with a Rich Model \cite{Fridrich2012_Rich} when compared on a baseline where there is only one CNN, and no tricks such as the use of an ensemble or transfer learning. We have also conducted database augmentation experiments on Xu-Net \cite{Xu2016a} and Ye-Net \cite{Ye2017} and they follow the same trend as Yedroudj-Net. Yedroudj-Net is composed of a {\it pre-processing block}, five {\it convolutional blocks}, and a {\it fully connected block} made of three fully connected layers followed by a {\it softmax}. The network produces a probability distribution over the two class labels: stego or cover image. Fig. \ref{fig:yedroudj-net} illustrates the overall architecture of our CNN. \begin{figure*}[t] \centering \includegraphics[width=18cm,height=4cm]{network.png} \caption{Yedroudj-Net CNN architecture. Figure taken from \cite{Yedroudj2018_Net}.} \label{fig:yedroudj-net} \end{figure*} For more details on Yedroudj-Net, the reader can have a look at the paper \cite{Yedroudj2018_Net} and the online code at \url{http://www.lirmm.fr/~chaumont/DemoAndSources.html} Note that the hyper-parameters are kept identical. \section{Experimental methodology} \label{sec:methodo} \subsection{Objectives and Dataset baseline} \label{sec::setup} Our final objective is to {\bf increase the size of the learning database} of a CNN based steganalysis through data-augmentation in order to improve its performances. Indeed, increasing the number of learning samples is often beneficial for learning efficient features dedicated to a specific task. But, for steganalysis, the samples have to be selected carefully. The "new" samples have to share a "similar distribution" compared to the "original" samples. One thus tries to find {\bf distribution-preserving transformations} which, when applied on an input cover or precover image, generate synthesized images that follow the same distribution. Those synthesized images could then be integrated into the learning database as additional images in order to increase the CNN classifier efficiency. In this paper, first, we explore the factors that are influencing a cover distribution such as the camera model, or the development, and second, we propose {\it distribution-preserving} transformations that allow to enrich an initial database and to improve the CNN efficiency. Our baseline setup will thus be working with the BOSSBase split into two sets. We assign 50\% of the cover/stego pairs to the "original" training set, and the rest, to the testing set. For the training set, 4000 out of 5000 pairs are randomly selected for training and the remaining 1000 pairs are set aside for validation. Thus, the testing set is made of 5000 pairs. {\bf Regardless of the learning database enrichment, the test database will always contain images from and only from BOSSBase}. For a fair comparison, we will use the same test base for all the experiments. To summarize, the learning set will always contain at least 4000 pairs of BOSSBase images, and the {\bf validation set will always contain 1000 pairs of BOSSBase images}. \subsection{Software platform} We used S-UNIWARD \cite{Holub2014}, and WOW \cite{Holub2012_WOW}, two well-known content-adaptive methods for the embedding in the spatial domain. Note that we used the Matlab implementations (online codes\footnote{http://dde.binghamton.edu/download/}) with the simulator for the embedding and a random key for each embedding. We thus avoid any wrong use of the C++ codes, i.e. a fixed and unique embedding key, as reported in \cite{Pibre2016}. All experiments were performed with the publicly available {\it Caffe} toolbox \cite{caffe_jia} with necessary modifications, plus digits V5. All tests were run on an NVidia Titan X GPU card. \subsection{Datasets} \label{Training_section} Due to our GPU computing platform and time limitation, we conduct all the experiments on images of 256$\times$256 pixels. To this end, we resampled all the 512$\times$512 images to 256$\times$256 images, using the {\it imresize()} Matlab function with the default parameters (bicubic interpolation with anti-aliasing). For the various experimental setup, we are using the different databases listed below, and convert them to $256x256$ images: \begin{itemize} \item the BOSSBase v1.01 \cite{Bas2011-BOSS} consisting of 10 000 grey-level images of size $512\times512$, never compressed, and coming from 7 different cameras, \item the BOWS2 \cite{BOWS2008} consisting of 10 000 grey-level images of size $512\times512$, never compressed, and whose distribution is close to BOSSBase, \item the LIRMMBase \cite{Pibre2016} consisting of 9 388 grey-level images of size $512\times512$, never compressed, and coming from 7 different cameras. All the used cameras are different from those used in BOSSBase. This database is a variant of the LIRMMBase (\url{http://www.lirmm.fr/~chaumont/LIRMMBase.html}) where images with no semantic content have been suppressed. Note that the development (of the RAW images) used in order to obtain the 256$\times$256 images have been done reusing the same script than the one used for generating BOSS and BOWS2 (\url{http://www.lirmm.fr/~chaumont/LIRMMBase/macroProductPGM.sh}). \item the PLACES2 \cite{zhou2017places} containing more than one million of JPEG images coming from unknown cameras. For the experiments, those images are decompressed, converted in grey-level images, and then resized. \end{itemize} For some experiments, we re-run a {\it development} process and we will use the {\it ImageMagick} free and open-source software. During the CNNs training, we regularly observe the {\it Loss} and {\it Accuracy} curves, computed on the validation test, to manually stop the training when an over-fitting phenomenon appears. This over-fitting occurs when the {\it Loss} curve continues to decrease on the training set but starts to increase on the validation set. For all the experiments, we report the error probability evaluated on the testing set. \subsection{Description of the different experimental setups} Below, we briefly listed all the experimental setups with a small description explaining each choice: \begin{itemize} \item {\bf Setup 1: Classical enrichment}. In this setup, the goal is to obtain the performance baseline. The enrichment of the {\it original} learning database (made of 4000 pairs) is obtained thanks to the virtual augmentation using the label-preserving flipping and rotations \cite{Ye2017}, and the enrichment with BOWS2 images. This experiment is presented in Section \ref{sec:classical_enrichment}, \item {\bf Setup 2: Enrichment with other cameras}. In this setup, the goal is to evaluate the gain/loss of adding images from different cameras from the ones used in the {\it original} learning set. This experiment is presented in Section \ref{sec:other_cameras}, \item {\bf Setup 3: Enrichment with strongly dissimilar sources and unbalance proportions}. In this setup, the goal is to evaluate the gain/loss of adding a huge number of images generated using cameras and a development, totally different from those used in the {\it original} learning set. This experiment is presented in Section \ref{sec:different_sources_unbalance}, \item {\bf Setup 4: Enrichment with the same RAW images but with a different development}. In this setup, the idea is to evaluate the gain/loss of adding the same {original} RAW images whose development is different from the one used for the {\it original} learning set. This experiment is presented in Section \ref{sec:RAWimages_different_dev}, \item {\bf Setup 5: Enrichment with a re-development of the learning set}. In this setup, the objective is to evaluate the gain/loss of adding the same {original} images which are {\it re-developed}. This experiment is presented in Section \ref{sec:images_redevelop}, \end{itemize} \section{Results and discussions} \label{sec:exp} \subsection{Setup 1: Classical enrichment} \label{sec:classical_enrichment} \begin{table}[htb] \renewcommand{\arraystretch}{1.6} \renewcommand{\arraystretch}{1.1} \scalebox{0.8}{ \begin{tabular} {l|c|c|c|c|} \cline{2-3} & \multicolumn{2}{c|}{\cellcolor[HTML]{656565}{\color[HTML]{FFFFFF} \textit{\textbf{BOSS 256$\times$256}}}} \\ \cline{2-3} \hline \multicolumn{1}{|l|}{{\cellcolor[HTML]{B4ACAC}\backslashbox {Steganalysis}{Payload}}} & {\cellcolor[HTML]{C0C0C0}\color[HTML]{FFFFFF} \textbf{WOW 0.2 bpp}} & {\cellcolor[HTML]{C0C0C0}\color[HTML]{FFFFFF} \textbf{S-UNIWARD 0.2 bpp}} \\ \hline \cline{1-3} \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}{\color[HTML]{FFFFFF} Yedroudj-Net }} & {\bf 27.8} \% & {\bf 36.7} \% \\ \hline \cline{1-3} \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}{\color[HTML]{FFFFFF} SRM+EC \cite{Fridrich2012_Rich,Kodovsky2012-EnsembleClassifiers}}} & 36.5 \% & {\bf 36.6} \% \\ \hline \cline{1-3} \end{tabular}} \vspace{+0,4cm} \caption{ Table 1: Steganalysis error probability of Yedroudj-Net, and SRM+EC for two embedding algorithms WOW and S-UNIWARD at 0.2 bpp and 0.4 bpp.\label{tab:Classical}} \vspace{+0,5cm} \end{table} In Table \ref{tab:Classical}, we report the error probability obtained when there is {\bf no enrichment} which means there are 4000 pairs in the learning set (+ 1000 pairs in the validation set), and 5000 pairs in the test set. All images are from BOSSBase. For a cursory comparison, the performance is reported for the Yedroudj-Net, and the Spatial Rich Model + the Ensemble Classifier {\it (SRM + EC)}, for the embedding algorithm WOW \cite{Holub2012_WOW} and S-UNIWARD \cite{Holub2014} at payload 0.2 bpp. Yedroudj-Net has an error probability 8\% lower for WOW algorithm at 0.2 bpp, and a similar error probability for S-UNIWARD at 0.2 bpp compared to SRM+EC. As reported in \cite{Yedroudj2018_Net}, Yedroudj-Net obtains similar or better results compared to the state-of-the-art (including versus Xu-Net and Ye-Net) in a fair comparison setup. \begin{table}[htb] \centering \renewcommand{\arraystretch}{1.1} \scalebox{0.9}{ \begin{tabular}{l|l|l|l|l|} \cline{2-3} & \cellcolor[HTML]{C0C0C0}WOW 0.2 bpp & \cellcolor[HTML]{C0C0C0}S-UNIWARD 0.2 bpp \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS} & {\bf 27.8} \% & {\bf 36.6} \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+VA} & 24.2 \% & 34.8 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+BOWS2} & 23.7 \% & 34.4\% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+BOWS2+VA} & 20.8 \% &31.1 \% \\ \hline \end{tabular}} \vspace{+0,4cm} \caption{Table 2: Base Augmentation influence: error probability of Yedroudj-Net, on WOW and S-UNIWARD at 0.2 bpp with and without Data Augmentation.\label{tab:base_augmentation}} \vspace{+0,5cm} \end{table} In Table \ref{tab:base_augmentation}, we report the results with {no enrichment} (noted {\bf BOSS}), the results with the Virtual Augmentation (VA) of the BOSS's training set (noted {\bf BOSS + VA}; Virtual Augmentation consists in label-preserving flipping and rotations), the results with BOWS2 enrichment (noted {\bf BOSS + BOWS2}), and the results with BOWS2 enrichment + the Virtual Augmentation (noted {\bf BOSS+BOWS2+VA}). Some of these results have already been given in \cite{Yedroudj2018_Net}, are re-presented in order to have a self-containing paper. Note that for BOSS+BOWS2, the training set is made of 14 000 pairs (without counting the validation), 32 000 pairs for BOSS+VA (without counting the validation), and for BOSS+BOWS2+VA, the training set is made of 112 000 pairs (without counting the validation). When the enrichment is obtained by only applying a virtual augmentation (BOSS+VA), a significant improvement is observed. The decrease of the error probability detection is 3\% for WOW (resp. 2\% for S-UNIWARD). This enrichment measure was initially proposed in \cite{Krizhevsky_AlexNet_2012} and it is indeed very efficient. The reader should understand that the VA is an easy and low-cost measure in order to significantly improve the performances. One can also observe better performance when using BOSS+BOWS2 compared to only using BOSSBase. The CNN decreases its detection error probability by 4\% for WOW (resp. 2\% for S-UNIWARD). As stated in the introduction, BOSSBase and BOWS2 share some identical camera models and a similar "development" process. As also observed in Section \ref{sec:RAWimages_different_dev}, in a close setup, this enrichment setup ("similar cameras" + "similar development") allows to increase the performances. We guess that in that case, the added images increase the generalization capability of the network. When the enrichment is obtained with BOSS+BOWS2+VA, again a significant improvement is observed. The decrease of the error probability detection is 7\% for WOW (resp. 5\% for S-UNIWARD) compared to the no-enrichment setup. Note that the results given in the current Section will be the reference performances for the comparisons given in the next sections. The observations given in this Section are confirming that if the database augmentation ensures a good diversity of the database, the CNN can improve its detection accuracy. The experiments described in the next sections are thus done in order to better understand the properties that have to be kept when adding images to the {\it original} database. \subsection{Setup 2: Enrichment with other cameras} \label{sec:other_cameras} \begin{table}[htb] \centering \renewcommand{\arraystretch}{1.6} \scalebox{0.8}{ \begin{tabular}{l|l|l|l|l|l|} \cline{2-3} & \cellcolor[HTML]{C0C0C0}WOW 0.2 bpp & \cellcolor[HTML]{C0C0C0}S-UNIWARD 0.2 bpp \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS} & {\bf 27.8} \% & {\bf 36.7} \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+LIRMM} & 29.9 \% & 38.6 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+LIRMM+BOWS2} & 26.8 \% & 36.9 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+LIRMM+BOWS2+VA} & 25.7 \% & 36.1 \% \\ \hline \end{tabular}} \vspace{+0,4cm} \caption{Table 3: Base Augmentation influence: error probability of Yedroudj-Net, on WOW and S-UNIWARD at 0.2 bpp with a learning base augmented with either LIRMM, LIRMM+BOWS2, or LIRMM+BOWS2+VA. \label{tab:other_cameras}} \vspace{+0,5cm} \end{table} In Table \ref{tab:other_cameras}, we report the results with {\it no enrichment} (noted {\bf BOSS}), the results with LIRMM enrichment (noted {\bf BOSS + LIRMM}), the results with LIRMM and BOWS2 enrichment (noted {\bf BOSS + LIRMM + BOWS2}), and the results with LIRMM and BOWS2 enrichment + the Virtual Augmentation (noted {\bf BOSS + LIRMM + BOWS2 + VA}). Note that for {\it BOSS+LIRMM}, the training set is made of 14 000 pairs, for {\it BOSS+LIRMM+BOWS2}, the training set is made of 23 388 pairs (without counting the validation), and for the {\it BOSS+LIRMM+BOWS2}, the training set is made of 187 104 pairs (without counting the validation). One can observe that results are worst when using {\it BOSS+LIRMM}, compared to only using {\it BOSSBase}. There is 2\% increase of the detection error probabilities for both WOW and S-UNIWARD. For this setup, the enrichment of the learning set is not strongly unbalanced (1 BOSS pair for 2 LIRMM pairs), done with images acquired with different cameras but processed with the same development. {\bf It seems that for a beneficial enrichment, the additional images have to be acquired with the same cameras}. Additional facts seem to confirm this hypothesis in Section \ref{sec:different_sources_unbalance} and Section \ref{sec:RAWimages_different_dev}. When enriching the {\it BOSSBase} with {\it BOSS + LIRMM + BOWS2}, the results are as good (or a slightly better for WOW) as using the {\it BOSSBase} alone. Finally, the results become better when {\it BOSS+BOWS2+LIRMM2+VA} is used, but the increase in performance is only of 0.9\% for S-UNIWARD (resp. 2\% for WOW), while using the {\it BOSS+BOWS2} (see Tab.\ref{tab:base_augmentation}) give 2\% increasing for S-UNIWARD (resp. 4\% for WOW). Those results confirm again that performance is increased if there is an enrichment with images acquired with the same cameras and with the same development (BOWS-2 share similar cameras and a similar development). This tendency seems to contradict the idea that using millions of images, whose distribution is diverse, would be the best solution for increasing the steganalysis results \cite{Zeng2017_Millions}. Indeed, the added images have to share a very similar "distribution" and images have probably to be acquired with the same cameras. In Section \ref{sec:different_sources_unbalance} we explore a little bit more this hypothesis. \subsection{Setup 3: Enrichment with strongly dissimilar sources and unbalance proportions} \label{sec:different_sources_unbalance} \begin{table}[htb] \centering \renewcommand{\arraystretch}{1.6} \scalebox{0.8}{ \begin{tabular}{l|l|l|l|l|l|} \cline{2-3} & \cellcolor[HTML]{C0C0C0}WOW 0.2 bpp & \cellcolor[HTML]{C0C0C0}S-UNIWARD 0.2 bpp \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS} & {\bf 27.8} \% & {\bf 36.7} \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+PLACES2 1\%} & 34.2 \% & 41.6 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+PLACES2 10\%} & 40.0 \% & 43.9 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+PLACES2 100\%} & 44.6 \% & 45.3 \% \\ \hline \end{tabular}} \vspace{+0,4cm} \caption{Table 4: Base Augmentation influence: error probability of Yedroudj-Net, on WOW and S-UNIWARD at 0.2 bpp with a learning base augmented with different portions of PLACES2. \label{tab:different_sources_unbalance}} \vspace{+0,5cm} \end{table} In Table \ref{tab:different_sources_unbalance}, we report the results with {\it no enrichment} (noted {\bf BOSS}), the results with 1\% of PLACES2 enrichment (noted {\bf BOSS + PLACES2 1\%}), the results with 10\% of PLACES2 enrichment (noted {\bf BOSS + PLACES2 10\%}), and 1\% of PLACES2 enrichment (noted {\bf BOSS + PLACES2 100\%}). Note that for {\it PLACES2 1\%}, the training set is made of 14 000 pairs (without counting the validation), for {\it PLACES2 10\%}, the training set is made of 104 000 pairs (without counting the validation), and for the {\it PLACES2 100\%}, the training set is made of 1 004 000 pairs (without counting the validation). Whatever the enrichment and whatever the embedding algorithm, the results are always worse than using the BOSSBase alone. For the setup where 1\%, resp. 10\%, resp. 100\% of PLACES2 are added to the learning, the results get worse and worse, with respectively an increase of the detection error for S-UNIWARD (resp. WOW) of 5\% (resp. 6\%), 7\% (resp. 12\%), and then 9\% (resp. 17\%). Note that with an enrichment of 100\% of PLACES2 (1 BOSS pair for 251 PLACES2 pairs), the detection is close to a random guessing. Since the distribution of BOSS and PLACES2 are totally different (PLACES2 results from a JPEG dequantization, and a very diverse set of sources of cameras), the BOSS distribution is lost, and since no re-balancing measures are used during the learning, the BOSS distribution is considered as anecdotal and it is not really taken into account during the learning. Practically, the total loss computed for BOSS images is negligible compared to the total loss computed for PLACES2 images, and thus a minimization of the global loss will mainly concentrate on minimizing the loss associated to the PLACES2 images. Coming back to our previous statement, {\bf using millions of images is not sufficient \cite{Zeng2017_Millions}, the added images have to share a very similar "distribution" and images have probably to be acquired with the same cameras}. \subsection{Setup 4: Enrichment with the same RAW images but with a different development} \label{sec:RAWimages_different_dev} \begin{table}[htb] \centering \renewcommand{\arraystretch}{1.6} \scalebox{0.8}{ \begin{tabular}{l|l|l|l|l|l|} \cline{2-3} & \cellcolor[HTML]{C0C0C0}WOW 0.2 bpp & \cellcolor[HTML]{C0C0C0}S-UNIWARD 0.2 bpp \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS} & {\bf 27.8} \% & {\bf 36.7} \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+DEV:Res-Bicub} & 25.7 \% & 37.5 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+DEV:Res-Spline} & 26 \% & 35.8 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+DEV:Res-NoInt} & 25.6 \% &36.2 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+DEV:Crop} & 34.8 \% &44.2 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+DEV:Res-Crop} & 28.1 \% &37.9 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+BOSS-ALP} & 26.0 \% & 35.5\% \\ \hline \end{tabular}} \vspace{+0,4cm} \caption{Table 5: Base Augmentation influence: error probability of Yedroudj-Net, on WOW and S-UNIWARD at 0.2 bpp with a learning base augmented with different BOSSBase versions.\label{tab:RAWimages_different_dev}} \vspace{+0,5cm} \end{table} In Table \ref{tab:different_sources_unbalance}, we report the results with {\it no enrichment} (noted {\bf BOSS}), and the results with 6 different versions of the BOSSBase, each generated from the RAW images. There is an enrichment with a resizing with a {\it bicubic interpolation} (noted {\bf BOSS+DEV:Res-Bicub}), the an enrichment with a resizing with a {\it spline interpolation} (noted {\bf BOSS+DEV:Res-Spline}), the enrichment with a resizing {\it without any interpolation} (noted {\bf BOSS+DEV:Res-NoInt}), the enrichment with no resizing and a {\it central crop} (noted {\bf BOSS+DEV:Crop}), the enrichment with a resizing to a 768$\times$768 images {\it without any interpolation} and then a {\it central crop} (noted {\bf BOSS+DEV:Res+Crop}), and finally an enrichment with the use of Adobe Photoshop Lightroom 6 instead of {\it ImageMagick}, for generating the color images and then resizing to $256\times256$ the images while keeping the width/length ratio (noted {\bf BOSS-APL}). From Table \ref{tab:RAWimages_different_dev}, we can observe that the enrichment with a {\it crop development} (BOSS+DEV:Crop) lead to very bad results. The increase of the detection error of 7\% for S-UNIWARD (resp. 7\% for WOW). The enrichment with a resize to 768$\times$768 followed by a crop (BOSS+DEV:Res+Crop), to a lesser extent, also give bad results with an increase of the detection error of 1\% for S-UNIWARD (resp. 0.3\% for WOW). Those bad results suggest that a resolution change during the development has a strong impact on the pixels distributions. When looking to the extreme case of the {\it crop development} (BOSS+DEV:Crop), we easily understand that the resulting images content change; there is almost no variations and no edges. Thus, {\bf an enrichment with a BOSS version whose development does not ensure the same final pixel resolution than BOSS Base will not enrich favourably the learning data-base}. In counterpart, using the same resize procedure with a slight variation on the {\it interpolation} (spline, no-interpolation, bicubic), or with the {\it Adobe Photoshop Lightroom Process} allows scrounging at most 1\% for S-UNIWARD (resp. 2\% for WOW). This confirms that additional samples very close to the target BOSS distribution can improve the learning capabilities. {\bf Looking back to the various experiment done previously, one can observe that in order to enrich favourably a target database, a favourable measure is to use images acquired with the same cameras than the target database, and to use a very close resizing process than the one used for the target database.} \begin{table}[htb] \centering \renewcommand{\arraystretch}{1.6} \scalebox{0.8}{ \begin{tabular}{l|l|l|l|l|l|} \cline{2-3} & \cellcolor[HTML]{C0C0C0}WOW 0.2 bpp & \cellcolor[HTML]{C0C0C0}S-UNIWARD 0.2 bpp \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS} & {\bf 27.8} \% & {\bf 36.7} \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+all-DEV} & 23.0 \% & 33.2 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+BOWS2} & 23.7 \% & 34.4\% \\ \hline \end{tabular}} \vspace{+0,4cm} \caption{Table 6: Base Augmentation influence: error probability of Yedroudj-Net, on WOW and S-UNIWARD at 0.2 bpp with a learning base augmented with different versions of BOSSBase.\label{tab:RAWimages_all_dev}} \vspace{+0,5cm} \end{table} In order to push the reflection a little bit more, we made an additional experiment where we regrouped diverse versions of BOSSBase (BOSS+DEV:Res+Bicub, BOSS+DEV:Res+Spline, BOSS+DEV:Res+NoInt, BOSS+DEV:Res+Crop) to the exception of BOSS+DEV:Crop. In Table \ref{tab:RAWimages_all_dev}, we report the results with this gathering of various development (noted {\bf BOSS+all-DEV}), and the results with LIRMM and BOWS2 enrichment (noted {\bf LIRMM+BOWS2} and already reported in Section \ref{sec:classical_enrichment}). Note that for {\it BOSS+all-DEV}, the training set is made of 44 000 pairs (without counting the validation), and for {\it LIRMM+BOWS2} the training set is made of 14 000 pairs (without counting the validation). For those two enrichments, there is a real improvement with a decrease of the error probability of detection of 2-3\% for S-UNIWARD (and 4\% for WOW). This last result is very interesting and shows that in order to enrich a database, in a practical scenario, there are at least those two options: \colorbox{lightgray}{ \parbox{8cm}{ Given a target database: \begin{itemize} \item either Eve (the steganalyst) finds the same camera(s) (used for generating the target database), capture new images, and reproduce the same development than the target database, with a special caution to the resizing, \item either Eve has an access to the original RAW images and reproduce similar developments than the target database with the similar resizing, \end{itemize} The reader should also remember that the Virtual Augmentation is also a good cheap processing measure. }} Note that it is unclear which option would be better in a practical case. Additional experiments have to be done in the future. Anyway, those two enrichments show that a very caution process has to be taken for really improving the results. We believe that those enrichments reduce the over-fitting and also improve the generalization of the learner. \subsection{Setup 5: Enrichment with a re-development of the learning set} \label{sec:images_redevelop} In all previous setups, given a target database (never compressed 8-bits grey-level 256$\times$256 images), we were presuming either a prior knowledge of the cameras used for the images acquisitions or a direct access to the RAW versions of the original images. In real-world cases, those knowledges are most of the time not available. Moreover, retrieving the camera models is a very complicated task in a real scenario due to the huge number of cameras. \begin{table}[htb] \centering \renewcommand{\arraystretch}{1.6} \scalebox{0.8}{ \begin{tabular}{l|l|l|l|l|l|} \cline{2-3} & \cellcolor[HTML]{C0C0C0}WOW 0.2 bpp & \cellcolor[HTML]{C0C0C0}S-UNIWARD 0.2 bpp \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS} & {\bf 27.8} \% & {\bf 36.7} \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+DEV:Translation} & 34.7.0 \% & 47.8 \% \\ \hline \multicolumn{1}{|l|}{\cellcolor[HTML]{C0C0C0}BOSS+DEV:Up-Down-Sampling} & 31.2 \% & 42.6 \% \\ \hline \end{tabular}} \vspace{+0,4cm} \caption{Table 7: Base Augmentation influence: error probability of Yedroudj-Net, on WOW and S-UNIWARD at 0.2 bpp with a learning base augmented with a re-development of BOSSBase.\label{tab:images_redevelop}} \vspace{+0,5cm} \end{table} In Table \ref{tab:images_redevelop}, we report the results with {\it no enrichment} (noted {\bf BOSS}), and the results with 2 different redeveloped versions of the BOSSBase, each generated from the original 256$\times$256 8-bits grey-level BOSSBase images. The first redevelopment (noted {\bf BOSS+DEV:Translation}) consists in applying a sub-pixel image translation, of 0.5 pixel, on the padded (symmetric padding) images, and then applying a crop operation to re-obtain a 256$\times$256 images. The second redevelopment (noted {\bf BOSS+DEV:Up-Down-Sampling}) consists in applying a Lanczos3 filter for the up-sampling in order to obtain a 512$\times$512 images, and then down-sampling with the same interpolation Kernel to re-obtain images of 256$\times$256 size. The results are catastrophic with an increase of the error probability of 6\% to 11\% for S-UNIWARD and 4\% to 7\% for WOW. The use of a redevelopment does not seem to be a good idea. \section{Conclusion} In this paper, we have explored ways to enrich a learning database when steganalysis is done with a CNN. The enrichment is a crucial task since, in the majority of the today's experiments, the required number of images have to be extremely high due to the huge number of parameters to be learned. Using an insufficient set of examples (images) leads to CNNs that have not "learned enough" and the average efficiency is thus reduced. After recalling the state-of-the-art of 2017 for the spatial CNN steganalysis, and briefly recalling the state-of-the-art steganalysis approach named Yedroudj-Net, we have presented various results. Additionally to the classical data augmentation which consists to apply flips and rotations on the learning images \cite{Krizhevsky_AlexNet_2012}, we observed two others ways for favorably enriching the learning database. The trend is that, in a clairvoyant scenario (knowledge of the embedding algorithm, knowledge of the payload size, approximate knowledge of the of the images distribution), for a given target (test) database, in order to augment its learning database, the steganalyst (Eve) has two choices: \begin{itemize} \item Either she is able to guess the camera(s) used for generating the target database. She thus captures new images, and reproduce a similar development than the target database, with a special caution to the resizing, \item Either she has an access to the original RAW images and reproduces a similar development than the target database with the similar resizing. \end{itemize} Those two possible ways to enrich the database are very restrictive. As explained in the paper some complementary solutions can be used such as transfer learning \cite{Qian2016_Transfer}, or the use of ensembles \cite{Xu2016b}, but the underlying questions of generalizations / cover-source mismatch have to be explored deeper in the future. \bibliographystyle{IEEEtran}
\section{Introduction} Let $\mathcal{H}$ be a separable infinite dimensional Hilbert space. Recall that the Calkin algebra, the quotient of $\mathbb{B}(\mathcal{H})$ by the closed two-sided ideal $\mathcal{K} = \mathcal{K}(\mathcal{H})$ of compact operators, is a (non separable) simple C*-algebra. In his ground-breaking publication on the noncommutative Weyl--von Neumann theorem, D. Voiculescu proved the following: \begin{Th}{A} (\cite{Voiculescu}, Corollary 19) A separable unital sub-C*-algebra of the Calkin algebra is equal to its (relative) bicommutant. \label{Th:A} \end{Th} For a C*-algebra $\mathcal{B}$, let $\mathcal{M}(\mathcal{B})$ denote its multiplier algebra and $\mathcal{M}(\mathcal{B})/\mathcal{B}$ its corona C*-algebra. As the multiplier algebra of $\mathcal{K}$ is isomorphic to $\mathbb{B}(\mathcal{H})$, the corona C*-algebra of $\mathcal{K}$ is the Calkin algebra. In his mini-course on the corona construction (\cite{PedersenCC}), G.K. Pedersen asks in Remark 10.11 if Voiculescu's theorem can be extended to the case of a $\sigma$-unital algebra $\mathcal{B}$, whose corona algebra is simple. As the corona algebra of a $\sigma$-unital simple purely infinite C*-algebra is simple (\cite{LinContScaleI}, \cite{LinSimpleCorona}), the following main result of this note gives a positive answer to the stable case of Pedersen's question: \begin{Th}{B} Let $\mathcal{B}$ be a $\sigma$-unital stable simple and purely infinite C*-algebra. Then any separable unital sub-C*-algebra of $\mathcal{M}(\mathcal{B})/\mathcal{B}$ is equal to its (relative) bicommutant. \label{Th:B} \end{Th} This note is structured as follows. We quickly review in Section 2, Elliott--Kucerovsky theory of absorbing extensions and use it to show in Proposition \ref{prop:SimpleCorona} that a separable stable simple and purely infinite C*-algebra has a nice theory of extensions. This becomes one of the key tools of the proof of Theorem \ref{Th:B}. Let $\mathcal{A}$ be a unital norm-closed subalgebra of a unital C*-algebra $\mathcal{D}$. Following \cite{Voiculescu}, let $\textbf{Lat}(\mathcal{A})$ denote the set of all self-adjoint projections $e$ of $\mathcal{D}$ such that $(1 - e)a e = 0$ for every $a \in \mathcal{A}$, and let $\mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$ be the subalgebra of all $y \in \mathcal{D}$ such that $ (1 -e) y e = 0, \forall e \in \textbf{Lat}(\mathcal{A}).$ Notice that if $\mathcal{D} = \mathbb{B}(\mathcal{H})$, then $\textbf{Lat}(\mathcal{A})$ is the lattice of closed invariant subspaces (projections) for $\mathcal{A}$, and $\mathcal{A}lg(\textbf{Lat}(\mathcal{A})) = \{ T \in \mathbb{B}(\mathcal{H})\;;\; \textbf{Lat}(\mathcal{A}) \subset \textbf{Lat}(T)\,\}$. Then $\mathcal{A}$ is a reflexive subalgebra of $\mathbb{B}(\mathcal{H})$ if $\mathcal{A} = \mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$. In Theorem 1.8 of \cite{Voiculescu}, D. Voiculescu proves that if $\mathcal{A}$ is a separable unital norm-closed subalgebra of the Calkin algebra, then $\mathcal{A}$ is equal to $\mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$. The main result of Section 3 is Theorem \ref{thm:main1} where we generalizes Voiculescu's result and its proof by replacing $\mathcal{K}$ by any separable stable simple purely infinite C*-algebra $\mathcal{B}$. Corollary \ref{cor:main2} is then the direct generalization of Theorem \ref{Th:A}. In Section 4, we generalize Theorem \ref{thm:main1} by relaxing the separability condition on the C*-algebra $\mathcal{B}$ and prove Theorem \ref{Th:B} (as Corollary \ref{cor:main3}). \section{Preliminaries in the theory of absorbing extensions} The theory of extensions and of absorbing extensions has a long history (see in particular \cite{BDFOriginal}, \cite{ElliottKucerovskyAbsorb}, \cite{KasparovAbsorbing}, \cite{LinAbsorbing2002}, \cite{Voiculescu}), culminating in the Elliott--Kucerovsky theory of absorbing extensions. In this section, we briefly sketch some preliminaries and recall Elliott--Kucerovsky's Theorem 6. Using Lemma \ref{lem:AbsorpAndSimpleCorona}, we summarize in Proposition \ref{prop:SimpleCorona} several characterizations of a separable stable simple purely infinite C*-algebra using properties of its theory of extensions. For background notions in the theory of extensions, we use monographs \cite{BlackadarBook} and \cite{ThomsenJensen}. \begin{df} (See \cite{ElliottKucerovskyAbsorb} Definitions 1 and 2.) \begin{enumerate} \item \label{First} Let $\mathcal{B}$ be a C*-algebra and $\mathcal{E}$ a C*-algebra containing $\mathcal{B}$ as a closed two sided ideal. We say $\mathcal{E}$ is \emph{purely large with respect to} $\mathcal{B}$ if for all $d \in \mathcal{E} - \mathcal{B}$, the C*-algebra $\overline{d \mathcal{B} d^*}$ contains a stable sub-C*-algebra which is full in $\mathcal{B}$. \item Let $\mathcal{A}, \mathcal{B}$ be C*-algebras and let $$0 \rightarrow \mathcal{B} \rightarrow \mathcal{E} \rightarrow \mathcal{A} \rightarrow 0$$ be an extension of $\mathcal{B}$ by $\mathcal{A}$. We say that the extension is \emph{purely large} if the C*-algebra of the extension, $\mathcal{E}$, is purely large with respect to the image of $\mathcal{B}$ in it, in the sense described in (\ref{First}). \end{enumerate} \end{df} Note that a purely large extension $0 \rightarrow \mathcal{B} \overset{\gamma}{\rightarrow} \mathcal{E} \overset{\pi}{\rightarrow} \mathcal{A} \rightarrow 0$ is essential (that is, $\gamma(\mathcal{B})$ is an essential closed two-sided ideal of $\mathcal{E}$). Recall that to any extension $0 \rightarrow \mathcal{B} \rightarrow \mathcal{E} \rightarrow \mathcal{A} \rightarrow 0$ is naturally associated a *-homomorphism from $\mathcal{A} = \mathcal{E}/\mathcal{B}$ to the corona algebra $\mathcal{M}(\mathcal{B})/\mathcal{B}$ called the \emph{Busby invariant} of the extension. It is well-known (see, for example, \cite{BlackadarBook}, 15.4) that up to strong isomorphism (in the sense of Blackadar), an extension is determined by its Busby invariant. Therefore, we will not distinguish between extensions and their Busby invariants. For the rest of this section, let $\mathcal{A}$ be a unital C*-algebra. Recall (\cite{BlackadarBook}, 15.5) that a unital, extension $\phi : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$ is a \emph{(strongly) unital trivial extension} if it lifts to a unital *-homomorphism $\phi_0$ from $\mathcal{A}$ to $\mathcal{M}(\mathcal{B})$. To simplify notation and as in \cite{ElliottKucerovskyAbsorb}, we will omit the term strongly. As in \cite{ElliottKucerovskyAbsorb}, Definition 5, recall that a *-homomorphism $\phi_0 : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})$ is \emph{weakly nuclear} if for each contraction $b \in \mathcal{B}$, the contractive c.p. map $\mathcal{A} \rightarrow \mathcal{B}$ given by $a \mapsto b \phi_0(a) b^*$ is nuclear (i.e., it factors approximately (in norm) through finite dimensional C*-algebras with contractive c.p. maps). Then a trivial unital extension $\phi : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$ is \emph{weakly nuclear} if it lifts to a weakly nuclear unital *-homomorphism $\phi_0 : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})$. If $\mathcal{B}$ is stable, let $S$ and $T$ be two isometries of $\mathcal{M}(\mathcal{B})$ such that $S S^* + T T^* = 1_{\mathcal{M}(\mathcal{B})}$. Then for two extensions $\phi, \psi : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$, let $\phi \oplus \psi$ be their \emph{Brown--Douglas--Fillmore (BDF) sum} given, for $a \in \mathcal{A}$, by $$\phi \oplus \psi(a) = s \phi(a)s^* + t\psi(a) t^*$$ where $s = q(S)$ and $t = q(T)$ (and $q$ is the canonical surjection from $\mathcal{M}(\mathcal{B})$ to $\mathcal{M}(\mathcal{B})/\mathcal{B}$). The BDF sum is well-defined up to BDF-equivalence and is independent of the choice of isometries $S$ and $T$ in $\mathcal{M}(\mathcal{B})$. Let $\mathcal{A}$ and $\mathcal{B}$ be separable C*-algebras with $\mathcal{A}$ unital and $\mathcal{B}$ stable. A unital extension $\phi : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$ is \emph{absorbing in the nuclear sense} if for any weakly nuclear (strongly) unital trivial extension $\psi : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$, there exists a unitary $U \in \mathcal{M}(\mathcal{B})$ such that, for all $a \in \mathcal{A}$, $$\phi(a) = u( \phi \oplus \psi(a))u^*$$ where $u = q(U)$. Then the main result of Elliott--Kucerovsky's paper is the following: \begin{thm} (\cite{ElliottKucerovskyAbsorb}, Theorem 6) Let $\mathcal{A}$ and $\mathcal{B}$ be separable C*-algebras with $\mathcal{A}$ unital and $\mathcal{B}$ stable. For a unital essential extension $\phi : \mathcal{A} \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$ of $\mathcal{B}$ by $\mathcal{A}$, the following statements are equivalent: \begin{enumerate} \item $\phi$ is purely large. \item $\phi$ is absorbing in the nuclear sense. \end{enumerate} \label{thm:ElliottKucerovskyAbsorb} \end{thm} For the sake of completeness, we include a proof of the following lemma, even if it is certainly well-known to the experts. \begin{lem} Let $\mathcal{B}$ be a separable stable simple C*-algebra with the following property: For every unital separable C*-algebra $\mathcal{A}$, every unital essential extension of $\mathcal{B}$ by $\mathcal{A}$ is absorbing in the nuclear sense. Then the corona algebra $\mathcal{M}(\mathcal{B})/B$ of $\mathcal{B}$ is simple. \label{lem:AbsorpAndSimpleCorona} \end{lem} \begin{proof} We prove the contrapositive. Suppose that $\mathcal{M}(\mathcal{B})/\mathcal{B}$ is not simple. Let $a \in \mathcal{M}(\mathcal{B})/\mathcal{B}$ be a nonzero self-adjoint element which is not full in $\mathcal{M}(\mathcal{B})/\mathcal{B}$, i.e., the closed two sided ideal generated by $a$ is a proper ideal of $\mathcal{M}(\mathcal{B})/\mathcal{B}$. Let $\phi : C^*(a, 1_{\mathcal{M}(\mathcal{B})/\mathcal{B}}) \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$ be the inclusion map. Then $\phi$ is a unital essential extension. However, $\phi$ is not absorbing in the nuclear sense, since nuclearly absorbing extensions always bring nonzero elements to full elements (and since $\phi(a)$ is not full). \end{proof} Recall that a nonunital $\sigma$-unital simple C*-algebra $\mathcal{B}$ has \emph{continuous scale} if $\mathcal{B}$ has an approximate identity $\{ e_n \}_{n=1}^{\infty}$ such that i. $e_{n+1} e_n = e_n$ for all $n$ and ii. for every $b \in \mathcal{B}_+ - \{ 0 \}$, there exists $N \geq 1$ such that for all $m > n \geq N$, $e_m - e_n \preceq b$. (See \cite{LinContScaleI}.) We summarize and recall in the next proposition several characterizations of the simplicity of the corona algebra. This also illustrates the correspondence between ``nice" extension theory and ``nice" corona algebra structure. \begin{prop} Let $\mathcal{B}$ be a separable stable simple C*-algebra. Then the following statements are equivalent: \begin{enumerate} \item Either $\mathcal{B} \cong \mathcal{K}$ or $\mathcal{B}$ is simple purely infinite. \item Either $\mathcal{B} \cong \mathcal{K}$ or $\mathcal{B}$ has continuous scale. \item $\mathcal{M}(\mathcal{B})/\mathcal{B}$ is simple. \item $\mathcal{M}(\mathcal{B})/\mathcal{B}$ is simple purely infinite. \item For every unital separable C*-algebra $\mathcal{A}$, every unital essential extension of $\mathcal{B}$ by $\mathcal{A}$ is purely large. \item For every unital separable C*-algebra $\mathcal{A}$, every unital essential extension of $\mathcal{B}$ by $\mathcal{A}$ is absorbing in the nuclear sense. \end{enumerate} \label{prop:SimpleCorona} \end{prop} \begin{proof} The equivalence of (2), (3) and (4) can be found in \cite{LinContScaleI} and \cite{LinSimpleCorona} (see also \cite{Zhang1989}). The equivalence of (1) and (3) can be found in \cite{ZhangRiesz} and \cite{RorIdeal} (see also \cite{LinContScaleI} and \cite{LinSimpleCorona}). The equivalence of (5) and (6) is \cite{ElliottKucerovskyAbsorb} Theorem 6 (see our Theorem \ref{thm:ElliottKucerovskyAbsorb}). That (1) implies (5) can be found in \cite{ElliottKucerovskyAbsorb} Theorem 17 items (i) and (ii), as well as \cite{Voiculescu}. That (6) implies (3) is Lemma \ref{lem:AbsorpAndSimpleCorona}. \end{proof} We note that in Proposition \ref{prop:SimpleCorona} above, statements (2), (3) and (4) are equivalent even without the assumption of stability (e.g., see \cite{LinSimpleCorona} Corollary 3.3). We will require stability to relate simplicity of the corona algebra to simple pure infiniteness of the canonical ideal as well as nice extension theory. \section{Generalization of Voiculescu's bicommutant theorem} In this section, we first show three lemmas, which will be used in the proof of Theorem \ref{thm:main1} and Corollary \ref{cor:main2}. These two results generalize Voiculescu's Theorem 1.8 and Corollary 1.9 of \cite{Voiculescu}. Let us first recall some notation introduced in \cite{Voiculescu}. If $\mathcal{D}$ is a unital C*-algebra and if $\mathcal{A}$ is a subalgebra of $\mathcal{D}$, then $\textbf{Lat}(\mathcal{A})$ denotes the set of all projections $e$ of $\mathcal{D}$ such that $(1 - e)a e = 0$ for every $a \in \mathcal{A}$, and let $\mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$ be the subalgebra of $\mathcal{D}$ equal to $$\mathcal{A}lg(\textbf{Lat}(\mathcal{A})) = \{ y \in \mathcal{D} : (1 -e) y e = 0, \forall e \in \textbf{Lat}(\mathcal{A}) \}.$$ Note that, as remarked in \cite{ArvesonDuke} page 344, $\textbf{Lat}(\mathcal{A})$ need not form a lattice, but we will follow the notation of previous authors. Notice that if $\textbf{Proj}(\mathcal{D})$ is the set of projections of $\mathcal{D}$ and if $\mathcal{A}$ is a sub-C*-algebra of $\mathcal{D}$, then $\textbf{Lat}(\mathcal{A}) = \{ e \in \textbf{Proj}(\mathcal{D}) : e \in \mathcal{A}' \}$ and $(\mathcal{A}' \cap \mathcal{D})' \cap \mathcal{D} \subseteq \mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$. In the proof of the last theorem (Theorem \ref{thm:Reflexive}), in order to emphasize the ambient algebra $\mathcal{D}$, we will write instead $\textbf{Lat}_{\mathcal{D}}(\mathcal{A})$ and $\mathcal{A}lg_{\mathcal{D}}(\textbf{Lat}_{\mathcal{D}}(\mathcal{A}))$. For the rest of the paper, since the ambient algebra is clear, we will drop the subscript ``$\mathcal{D}$". \begin{lem} Let $\mathcal{D}$ be a unital C*-algebra and $\mathcal{A}$ be a subalgebra of $\mathcal{D}$. Then for any $d \in \mathcal{D}$, $$\sup_{e \in \textbf{Lat}(\mathcal{A})} \| (1-e)d e \| \leq dist(d, \mathcal{A}).$$ \label{lem:Mar3020176AM} \end{lem} \begin{proof} As for any $a \in \mathcal{A}$ and $e \in \textbf{Lat}(\mathcal{A})$, $$\| (1 - e) d e \| = \| (1 - e) (d - a) e \| \leq \| d - a \|,$$ the lemma is verified. \end{proof} The proof of the next lemma is contained in the first part of the proof of \cite{ArvesonDuke}, Corollary 2, pages 344 and 345. \begin{lem} Let $\mathcal{C}$ be a unital separable C*-algebra and $\mathcal{A}$ be a unital subalgebra of $\mathcal{C}$. Then for any $c \in \mathcal{C}$, there exist a unital *-representation $\psi : \mathcal{C} \rightarrow \mathbb{B}(\mathcal{H_{\psi}})$ on a separable infinite dimensional Hilbert space $\mathcal{H_{\psi}}$ and a projection $p \in \mathbb{B}(\mathcal{H_{\psi}})$ such that \begin{enumerate} \item $p \in \textbf{Lat}(\psi(\mathcal{A}))$, i.e., $(1 -p)\psi(a) p = 0$ for all $a \in \mathcal{A}$, and \item $\| (1- p) \psi(c) p \| = \| (1 - p) \psi(c) p \|_{ess} \geq dist(c, \mathcal{A})$, where the $\|. \|_{ess}$ denotes the essential norm. \end{enumerate} \label{lem:Mar3020177AM} \end{lem} \begin{lem} Let $\mathcal{B}$ be a separable stable C*-algebra, and let $\mathcal{A}$ be a separable norm-closed unital subalgebra of the corona algebra $\mathcal{M}(\mathcal{B})/\mathcal{B}$. If $x \in \mathcal{M}(\mathcal{B})/\mathcal{B}$ is an element such that the inclusion of the C*-algebra $C^*(x, \mathcal{A})$ generated by $x$ and $\mathcal{A}$ in $\mathcal{M}(\mathcal{B})/\mathcal{B}$ is purely large, then there exists a projection $p \in \mathcal{M}(\mathcal{B})/\mathcal{B}$ such that \begin{enumerate} \item $p \in \textbf{Lat}(\mathcal{A})$, and \item $\|(1 -p) x p \| = dist(x, \mathcal{A}).$ \end{enumerate} \label{lem:Mar3020178AM} \end{lem} \begin{proof} By Lemma \ref{lem:Mar3020176AM}, it suffices to find a projection $p \in \textbf{Lat}(\mathcal{A})$ such that $$\|(1 -p) x p \| \geq dist(x, \mathcal{A}).$$ Since $\mathcal{B}$ is stable, we may replace $\mathcal{B}$ by $\mathcal{B} \otimes \mathcal{K}$, where $\mathcal{K}$ is the C*-algebra of compact operators on a separable infinite dimensional Hilbert space $\mathcal{H}$. Let us denote by $\mathcal{C}$ the separable unital sub-C*-algebra of $\mathcal{M}(\mathcal{B} \otimes \mathcal{K})/(\mathcal{B} \otimes \mathcal{K})$ generated by $x$ and $\mathcal{A}$. Since $\mathcal{M}(\mathcal{K}) = \mathcal{H}$, let us denote by $\sigma : \mathcal{C} \rightarrow \mathcal{M}(\mathcal{K})$ the unital *-homomorphism given by Lemma \ref{lem:Mar3020177AM}, and by $q_0 \in \mathcal{M}(\mathcal{K})$ the projection such that \begin{enumerate} \item[i.] $(1 -q_0) \sigma(a) q_0 = 0$, for all $a \in \mathcal{A}$, and \item[ii.] $\| (1 - q_0) \sigma(x) q_0 \| = \| (1 - q_0) \sigma(x) q_0 + \mathcal{K} \|_{\mathcal{M}(\mathcal{K})/\mathcal{K}} \geq dist(x, \mathcal{A})$. \end{enumerate} Note that since $\mathcal{K}$ is nuclear, the unital trivial extension \begin{equation} \mathcal{C} \rightarrow \mathcal{M}(\mathcal{B} \otimes \mathcal{K})/\mathcal{B} \otimes \mathcal{K} : c \mapsto \pi (1_{\mathcal{M}(\mathcal{B})} \otimes \sigma(c)) \label{equ:Oct182017} \end{equation} is weakly nuclear, where $\pi$ denotes the canonical surjection from $\mathcal{M}(\mathcal{B} \otimes \mathcal{K})$ onto the corona algebra $\mathcal{M}(\mathcal{B} \otimes \mathcal{K})/ \mathcal{B} \otimes \mathcal{K}$. For any two isometries $S, T \in \mathcal{M}(\mathcal{B} \otimes \mathcal{K})$ such that $1_{\mathcal{M}(\mathcal{B} \otimes \mathcal{K})} = S S^* + T T^*$, let $s = \pi(S)$ and $t = \pi(T)$ denote the corresponding two isometries of $\mathcal{M}(\mathcal{B} \otimes \mathcal{K})/\mathcal{B} \otimes \mathcal{K}$. As by assumption the inclusion of $\mathcal{C}$ in $\mathcal{M}(\mathcal{B} \otimes \mathcal{K})/\mathcal{B} \otimes \mathcal{K}$ is purely large, and as the trivial extension (\ref{equ:Oct182017}) is weakly nuclear, then by Theorem \ref{thm:ElliottKucerovskyAbsorb}, there exists a unitary $U \in \mathcal{M}(\mathcal{B} \otimes \mathcal{K})$ such that for all $c \in \mathcal{C}$, $$c = u (s c s^* + t \pi (1_{\mathcal{M}(\mathcal{B})} \otimes \sigma(c)) t^*) u^*$$ where $u = \pi(U)$. Let $p$ be the projection of $\mathcal{M}(\mathcal{B} \otimes \mathcal{K})/(\mathcal{B} \otimes \mathcal{K})$ given by $$p =_{df} u t \pi (1_{\mathcal{M}(\mathcal{B})} \otimes q_0) t^* u^*,$$ and let us show that $p$ is the required projection. As $(1-p) a p = u t \pi(1_{\mathcal{M}(\mathcal{B})} \otimes (1_{\mathcal{M}(\mathcal{K})} - q_0) \sigma(a) q_0) t^* u^* = 0$ for all $a \in \mathcal{A}$, we have that $p \in \textbf{Lat}(\mathcal{A})$. Moreover, \begin{eqnarray*} & & \| (1 - p) x p \| \\ & = & \| (1 - p) u t \pi(1_{\mathcal{M}(\mathcal{B})} \otimes \sigma(x)) t^* u^* u t \pi(1_{\mathcal{M}(\mathcal{B})} \otimes q_0) t^* u^* \| \\ & = & \| (1 - p) u t \pi(1_{\mathcal{M}(\mathcal{B})} \otimes \sigma(x) q_0) \| \\ & = & \| [us s^*u^* + u t \pi(1_{\mathcal{M}(\mathcal{B})} \otimes (1_{\mathcal{M}(\mathcal{K})}- q_0)) t^* u^*]u t \pi(1_{\mathcal{M}(\mathcal{B})} \otimes \sigma(x) q_0) \| \\ & = & \| u t \pi(1_{\mathcal{M}(\mathcal{B})} \otimes (1_{\mathcal{M}(\mathcal{K})} - q_0)\sigma(x) q_0) \| \\ & = & \| (1 - q_0) \sigma(x) q_0 + \mathcal{K} \|_{\mathcal{M}(\mathcal{K})/\mathcal{K}} \\ & \geq & dist(x, \mathcal{A}) \makebox{ (by ii).} \\ \end{eqnarray*} \end{proof} \begin{thm} Suppose that either $\mathcal{B} \cong \mathcal{K}$ or $\mathcal{B}$ is a separable simple stable purely infinite C*-algebra. Let $\mathcal{A}$ be a norm-closed separable unital subalgebra of the corona algebra $\mathcal{M}(\mathcal{B})/\mathcal{B}$, and $\textbf{Lat}(\mathcal{A})$ be the set of all projections $e \in \mathcal{M}(\mathcal{B})/\mathcal{B}$ such that $(1 - e) a e = 0$, for all $a \in \mathcal{A}$. Then the algebra of all elements of $\mathcal{M}(\mathcal{B})/\mathcal{B}$ leaving invariant each projection of $\textbf{Lat}(\mathcal{A})$ is equal to $\mathcal{A}$. \label{thm:main1} \end{thm} As for any sub-C*-algebra $\mathcal{A}$ of a unital C*-algebra $\mathcal{D}$, we have $$\mathcal{A} \subseteq (\mathcal{A}' \cap \mathcal{M}(\mathcal{B})/\mathcal{B})' \cap \mathcal{M}(\mathcal{B})/\mathcal{B} \subseteq \mathcal{A}lg(\textbf{Lat}(\mathcal{A})), $$ the following corollary is a direct consequence of Theorem \ref{thm:main1}: \begin{cor} If $\mathcal{B} \cong \mathcal{K}$ or $\mathcal{B}$ is a separable simple stable purely infinite C*-algebra, and $\mathcal{A}$ is a separable unital sub-C*-algebra of $\mathcal{M}(\mathcal{B})/\mathcal{B}$, then $\mathcal{A}$ is equal to its relative bicommutant, i.e., $$\mathcal{A} = (\mathcal{A}' \cap \mathcal{M}(\mathcal{B})/\mathcal{B})' \cap \mathcal{M}(\mathcal{B})/\mathcal{B}.$$ \label{cor:main2} \end{cor} \begin{proof}[Proof of Theorem \ref{thm:main1}] Let $$\mathcal{A}lg(\textbf{Lat}(\mathcal{A})) =_{df} \{ x \in \mathcal{M}(\mathcal{B})/\mathcal{B} : (1 - e)x e = 0, \forall e \in \textbf{Lat}(\mathcal{A}) \}$$ denote the algebra of elements of $\mathcal{M}(\mathcal{B})/\mathcal{B}$ leaving invariant $\textbf{Lat}(\mathcal{A})$. As $\mathcal{A}$ is clearly contained in $\mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$, let us prove the other inclusion. Let $x \in \mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$ and let $\mathcal{C} = C^*(x, \mathcal{A})$ be the separable unital sub-C*-algebra of $\mathcal{M}(\mathcal{B})/\mathcal{B}$ generated by $x$ and $\mathcal{A}$. By Proposition \ref{prop:SimpleCorona}, the inclusion of $\mathcal{C}$ into $\mathcal{M}(\mathcal{B})/\mathcal{B}$ is purely large. Hence, by Lemma \ref{lem:Mar3020178AM}, there exists a projection $p \in \textbf{Lat}(\mathcal{A}) \subset \mathcal{M}(\mathcal{B})/\mathcal{B}$ such that $$\| (1-p) x p \| = dist(x, \mathcal{A}).$$ As $x \in \mathcal{A}lg(\textbf{Lat}(\mathcal{A}))$ and $\mathcal{A}$ is closed, $x \in \mathcal{A}$. \end{proof} \section{Pedersen's question} Theorem \ref{thm:Reflexive}, the main result of this section generalizes Theorem \ref{thm:main1}, by relaxing the separability condition on the C*-algebra $\mathcal{B}$. Then in Corollary \ref{cor:main3}, we give a complete answer in the stable case to Pedersen's question in \cite{PedersenCC}. Before stating and proving these results, let us first introduce some preliminaries needed below. \begin{lem} Let $\mathcal{B}$ be a simple, purely infinite C*-algebra, and let $a, b \in \mathcal{B}_+$, $\| a \| = \| b \| = 1$. Then for any $0 < \delta < 1$, and for any $\epsilon > 0$, there exists $x \in \mathcal{B}$ such that $$\| a - x b x^* \| \leq \epsilon \makebox{ and } \| x \|^2 \leq \frac{1}{\delta}.$$ \label{lem:CuntzWithControl} \end{lem} \begin{proof} For $0 < \delta < 1$, fixed, we have $\| b - (b - \delta)_+ \| \leq \delta$ and as $\mathcal{B}$ is simple purely infinite, $a \preceq (b - \delta)_+$. Then for any $\epsilon > 0$, there exists by \cite{KaftalNgZhang}, Lemma 2.2, $x \in \mathcal{B}$ with $\| x \|^2 \leq \frac{1}{\delta}$ and $(a - \epsilon)_+ = xb x^*$. Then $\| a - x b x^* \| \leq \| a - (a - \epsilon)_+ \| \leq \epsilon$. \end{proof} Let $\mathcal{C}$ be a separable sub-C*-algebra of a $\sigma$-unital, stable, simple, purely infinite C*-algebra $\mathcal{B}$, and let $\{ c_n \}_{n \geq 1}$ be a countable dense subset of the unit sphere of $\mathcal{C}_+$. By Lemma \ref{lem:CuntzWithControl}, for each $n, m$ and $k \geq 1$, there exists $y_{n,m, k} \in \mathcal{B}$, such that $\| y_{n,m, k} \|^2 \leq \frac{3}{2}$ and $$\| y_{n,m,k} c_n y_{n,m,k}^* - c_m \| < \frac{1}{k}.$$ Then the separable sub-C*-algebra $\widetilde{\mathcal{C}}$ of $\mathcal{B}$ generated by $\mathcal{C}$ and $\{ y_{n,m,k} : n, m, k \geq 1 \}$ is said to be obtained from $\mathcal{C}$ by a \emph{PI-operation}. Using this construction inductively, we have the following: \begin{prop} Let $\mathcal{B}$ be a $\sigma$-unital, stable, simple purely infinite C*-algebra, and let $\mathcal{C} \subseteq \mathcal{B}$ be a separable sub-C*-algebra. Then there exists a separable, stable, simple, purely infinite sub-C*-algebra $\mathcal{D}$ of $\mathcal{B}$ containing $\mathcal{C}$. \label{prop:SeparableSubalgebra} \end{prop} \begin{proof} Let $b \in \mathcal{B}_+$ be a strictly positive element, and let $\mathcal{C}_0$ be the (separable) sub-C*-algebra generated by $\mathcal{C}$ and $b$.\ By \cite{RordamStableSurvey} Corollary 2.3, any sub-C*-algebra of $\mathcal{B}$ containing $\mathcal{C}_0$ is stable. Then construct an increasing sequence $\{ \mathcal{C}_l \}_{l \geq 0 }$ of separable sub-C*-algebras of $\mathcal{B}$ such that $\mathcal{C}_{l+1}$ is obtained from $\mathcal{C}_l$ by a PI-operation, and $\mathcal{D} =_{df} \overline{\bigcup_{l \geq 1} \mathcal{C}_l }$. Then $\mathcal{D}$ contains $\mathcal{C}_0$, is stable, and simple (by similar argument as in \cite{BlackadarGeneralBook} II.8.5.6). To prove that $\mathcal{D}$ is purely infinite, it is enough to show that for any $c, d \in \mathcal{D}_+$, $\| c \| = \| d \| = 1$, for any $\epsilon > 0$, there exists $y \in \mathcal{D}$ such that $$\| y c y^* - d \| < \epsilon.$$ For $l \geq 0$, let $\{ c^l_n \}_{n \geq 1}$ denote the dense sequence of the unit sphere of $(\mathcal{C}_l)_+$, used in the construction of $\mathcal{C}_{l+1}$. Then choose $l \geq 1$ and $c^l_n, c^l_m \in (\mathcal{C}_l)_+$ such that $$\| c - c^l_n \| \leq \frac{\epsilon}{4} \makebox{ and } \| d - c^l_m \| \leq \frac{\epsilon}{3}.$$ By definition of $\mathcal{C}_{l+1}$, there exists a $y \in \mathcal{C}_{l+1}$, $\| y \|^2 \leq \frac{3}{2}$ such that $$\| c^l_m - y c^l_n y^* \| \leq \frac{\epsilon}{3}.$$ Hence, $$\| d - y c y^* \| \leq \frac{\epsilon}{3} + \frac{\epsilon}{3} + \| y (c^l_n - c) y^* \| \leq \frac{\epsilon}{3} + \frac{\epsilon}{3} + \frac{3}{2} * \frac{\epsilon}{4} \leq \epsilon.$$ \end{proof} \begin{thm} Let $\mathcal{B}$ be either the compact operators $\mathcal{K}$ or a $\sigma$-unital, stable, simple, purely infinite C*-algebra. Let $\mathcal{A}$ be a separable, norm-closed, unital subalgebra of $\mathcal{M}(\mathcal{B})/\mathcal{B}$. Then $$\mathcal{A} = \mathcal{A}lg(\textbf{Lat}(\mathcal{A})).$$ \label{thm:Reflexive} \end{thm} Recall (\cite{LinContScaleI} Theorem 3.8) that if $\mathcal{B}$ is a stable $\sigma$-unital C*-algebra, then the corona algebra $\mathcal{M}(\mathcal{B})/\mathcal{B}$ is simple if and only if either $\mathcal{B} \cong \mathcal{K}$ or $\mathcal{B}$ is simple purely infinite. Then the following corollary, which follows immediately from Theorem \ref{thm:Reflexive}, resolves the stable case of Pedersen's question. \begin{cor} Suppose that either $\mathcal{B} \cong \mathcal{K}$ or $\mathcal{B}$ is a $\sigma$-unital stable simple purely infinite C*-algebra. Let $\mathcal{A}$ be a separable unital sub-C*-algebra of $\mathcal{M}(\mathcal{B})/\mathcal{B}$. Then $$(\mathcal{A}' \cap \mathcal{M}(\mathcal{B})/\mathcal{B})' \cap \mathcal{M}(\mathcal{B})/\mathcal{B} = \mathcal{A}.$$ \label{cor:main3} \end{cor} In the proof of Theorem \ref{thm:Reflexive}, we will need the following notions and results from \cite{KaftalNgZhang}: Let $\mathcal{B}$ be a $\sigma$-unital simple C*-algebra. Then a sequence $\{ x_l \}_{l \geq 1}$ of $\mathcal{B}_+$ gives a \emph{bidiagonal series} $X$ if $X = \sum_{l \geq 1} x_l$ converges in the strict topology and $x_k x_l = 0$ for all $|k - l| \geq 2$. If $T \in \mathcal{M}(\mathcal{B})_+$, then by \cite{KaftalNgZhang}, Theorem 4.2, for any $\epsilon > 0$, there exist a bidiagonal series $\sum_{k \geq 1} t_k$ and a self-adjoint element $a_{\epsilon} \in \mathcal{B}$ with $\| a_{\epsilon} \| < \epsilon$ and $$T = \sum_{k \geq 1} t_k + a_{\epsilon}.$$ \begin{proof}[Proof of Theorem \ref{thm:Reflexive}] To simplify notation, let us denote $\mathcal{C}(\mathcal{B}) =_{df} \mathcal{M}(\mathcal{B})/\mathcal{B}$. As $\mathcal{A}$ is already contained in $\mathcal{A}lg_{\mathcal{C}(\mathcal{B})}(\textbf{Lat}_{\mathcal{C}(\mathcal{B})}(\mathcal{A}))$, let us prove that if $x \in \mathcal{A}lg_{\mathcal{C}(\mathcal{B})}(\textbf{Lat}_{\mathcal{C}(\mathcal{B})}(A))$ then $x \in \mathcal{A}$. Let $\{ a_l \}_{l=1}^{\infty}$ be a dense sequence in $\mathcal{A}$ and choose $X$ and $A_l$ in $\mathcal{M}(\mathcal{B})$ such that $\pi(X) = x$ and $\pi(A_l) = a_l$ for $l \geq 1$ (where $\pi : \mathcal{M}(\mathcal{B}) \rightarrow \mathcal{M}(\mathcal{B})/\mathcal{B}$ is the canonical quotient map). By \cite{KaftalNgZhang}, Theorem 4.2, there exist for $l \geq 1$ and $1 \leq j \leq 4$, bidiagonal series $X_j$ and $A_{l,j}$ in $\mathcal{M}(\mathcal{B})_+$ and $y, c_l \in \mathcal{B}$, such that $$X = \sum_{j=1}^4 i^j X_j + y \makebox{ and } A_l = \sum_{j=1}^4 i^j A_{l,j} + c_l,$$ Then, let us write $X_j = \sum_{n \geq 1} x_{j,n}$ and $A_{l,j} = \sum_{n \geq 1} d_{l,j,n}$, where for $1 \leq j \leq 4$ and $l \geq 1$, $\{ x_{j,n}, d_{l,j,n} : n \geq 1 \} \subset \mathcal{B}_+$ and the series converge in the strict topology. Let $b \in \mathcal{B}_+$ be strictly positive. Let $\mathcal{C}$ denote the separable sub-C*-algebra of $\mathcal{B}$, generated by $\{b, y, c_l, x_{j,n}, d_{l,j,n} : 1 \leq j \leq 4, l, n\geq 1, \}$. By Proposition \ref{prop:SeparableSubalgebra}, let $\mathcal{D}$ be a separable, stable, simple, purely infinite sub-C*-algebra of $\mathcal{B}$ containing $\mathcal{C}$. For $l \geq 1$ and $1 \leq j \leq 4$, by construction, $X_j$ and $A_{l,j}$ belong to $\mathcal{M}(\mathcal{D})$, and therefore, $X, A_l \in \mathcal{M}(\mathcal{D})$. Since $b \in \mathcal{D}$, the inclusion $\mathcal{D} \subseteq \mathcal{B}$ induces the (unital) inclusion $\mathcal{M}(\mathcal{D}) \subseteq \mathcal{M}(\mathcal{B})$ and $\mathcal{M}(\mathcal{D})/\mathcal{D} \subseteq \mathcal{M}(\mathcal{B})/\mathcal{B}$. Moreover, $x = \pi(X)$ and $a_l = \pi(A_l)$, for $l \geq 1$, belong to $\mathcal{M}(\mathcal{D})/\mathcal{D}$. Since $x \in \mathcal{A}lg_{\mathcal{C}(\mathcal{B})}(\textbf{Lat}_{\mathcal{C}(\mathcal{B})}(\mathcal{A})) \cap \mathcal{C}(\mathcal{D})$, $x \in \mathcal{A}lg_{\mathcal{C}(\mathcal{D})}(\textbf{Lat}_{\mathcal{C}(\mathcal{D})}(\mathcal{A}))$ and by Theorem \ref{thm:main1}, $x \in \mathcal{A}$. \end{proof} Farah asked whether $(A' \cap \mathcal{D}^{**})' \cap \mathcal{D} = \mathcal{A}$ for every unital simple purely infinite separable C*-algebra $\mathcal{D}$ and $\mathcal{A}$ any unital sub-C*-algebra of $\mathcal{D}$ (\cite{FarahBicommutant}, Question 5.2). We note that, by arguments similar to those for Proposition \ref{prop:SeparableSubalgebra} and Theorem \ref{thm:Reflexive}, this question is equivalent to the same question but without the requirement that $\mathcal{D}$ be separable. We have actually answer Farah's question in the affirmative for the case where $\mathcal{D}$ is a nonseparable simple purely infinite C*-algebra of the form $\mathcal{M}(\mathcal{B})/\mathcal{B}$ where $\mathcal{B}$ is $\sigma$-unital and stable. Here is the short argument: If $x \in (\mathcal{A}' \cap (\mathcal{M}(\mathcal{B})/\mathcal{B})^{**})' \cap \mathcal{M}(\mathcal{B})/\mathcal{B}$, then by \cite{FarahBicommutant}, Proposition 5.3, $x \in (\mathcal{A}' \cap (\mathcal{M}(\mathcal{B})/\mathcal{B}))' \cap \mathcal{M}(\mathcal{B})/\mathcal{B}$, and so by Corollary \ref{cor:main3}, $x \in \mathcal{A}$.
\section{Introduction} In the collection and analysis of scientific data, a phenomenon often encountered is the existence of complex dependency structures between analyzed units. This is encountered in diverse fields such as epidemiology, econometrics, ecology, geostatistics, psychometrics and genetics, and can arise due to spatial correlations, temporal correlations, family relations, or other sources of heterogeneity \citep{pfeiffer_spatial_2008,rabe-hesketh_maximum_2005,bolker_generalized_2009,rabe-hesketh_generalized_2004,yang_advantages_2014,burton_genetic_1999,diggle_model-based_1998}. This idea is often captured through the use of random or mixed-effects models \citep{mcculloch_generalized_2008}, or equivalently, through Gaussian process (GPs; \citealt{rasmussen_gaussian_2006}) or latent Gaussian models \citep{fahrmeir_multivariate_2001}. Such models associate every sampled unit with a latent variable, and express the dependency structures as covariance matrices of latent variables. A second important concept is that of \emph{ascertainment}, or the non-random sampling of units. Ascertainment is especially common in case-control studies, when a binary response variable of interest has a highly unbalanced distribution, such as a rare disease wherein cases are much rarer than healthy controls \citep{breslow_statistics_1996}. In this paper we consider situations that contain both elements---a complex covariance structure and case-control sampling---and the statistical modeling solutions available for these situations. Our interest lies in an extreme form of this combination, where the covariance matrix is dense and full rank (i.e., there is a large number of random effects), and the case-control ascertainment is performed at the individual unit level (i.e., every unit is chosen into the study with a probability that depends only on its response and not on the covariance structure). As we discuss below, special cases of this combination have been addressed in the literature \citep{glidden_ascertainment_2002,epstein_ascertainment-adjusted_2002,neuhaus_family-specific_2006,neuhaus_likelihood-based_2014}, but to our knowledge, there is a limited set of available solutions for the general setting, which is indeed very challenging. A major motivating application for our study is genome-wide association studies of diseases with a case-control sampling design (GWAS-CC) \citep{price_progress_2015}. In GWAS-CC, the genomes of individuals affected with a disease and of unaffected controls are collected in an effort to uncover the genetic mechanisms driving disease risk \citep{visscher_10_2017}. Studies in this field have diverse goals, reflected in the diversity of the statistical inference tasks they seek to solve \citep{price_progress_2015}: testing disease associations with genetic variants \citep{yang_advantages_2014,bush_chapter_2012}, estimating disease heritability \citep{yang_common_2010,golan_measuring_2014,loh_contrasting_2015}, risk prediction \citep{zhou_polygenic_2013,golan_effective_2014,moser_simultaneous_2015, weissbrod_multikernel_2016}, and more. GWAS-CC studies typically employ case-control designs, where patients are recruited in hospitals or clinics whereas healthy controls are recruited independently, owing to the small prevalence of complex genetic diseases---even common diseases like type 1 diabetes or schizophrenia typically have a population prevalence $<$2\%. Furthermore, statistical models for such studies typically treat genetic variant-disease effects as random effects sampled from a distribution. This is because such studies include hundreds of thousands of variants, and the effects are typically very small \citep{yang_common_2010,golan_measuring_2014, zhou_polygenic_2013,golan_effective_2014,moser_simultaneous_2015}. Hence, GWAS-CC studies give rise to settings with case-control sampling and a dense covariance structure, because every individual has a latent genetic effect (given by the inner product of her genotype and the random effects), and the genetic effects are correlated due to genetic similarity. Despite the extensive interest that GWAS-CC studies have attracted in recent years \citep{wtccc_genome-wide_2007, ehret2011genetic, sawcer_genetic_2011, timmann2012genome, ripke2014biological, okada_genetics_2014}, the statistical modeling problems this setting generates have been discussed in a limited manner, with application of heuristic methods that do not formally take the probabilistic structure of the problem into account \citep{lee_estimating_2011,hayeck_mixed_2015,weissbrod_accurate_2015,chen_control_2016,jiang_retrospective_2015}. Similar settings arise in other scientific domains, where case-control sampling, high dimensional random effects and a dense covariance matrix simultaneously occur. Prominent examples include disease mapping studies with a smoothing kernel \citep{diggle_model-based_1998,kelsall_spatial_1998,held_towards_2005} and GP-based classification of data collected in case-control studies \citep{chu_classification_2010,ziegler_individualized_2014,young_accurate_2013}. The analyses employed in these examples often ignore the effects of case-control sampling, a practice we would like to avoid and whose fundamental flaws we discuss and illustrate below. The problem we consider poses substantial statistical and computational challenges, various aspects of which have been addressed in the statistics and machine learning literature. The main approaches for maximum likelihood estimation under ascertainment include the profile maximum likelihood and its close variant, the ascertained maximum likelihood (AML), which offer ``almost maximum likelihood'' solutions \citep{scott_maximum_2001,wild_fitting_1991,scott_fitting_1997}. The main approach for statistical inference with random effects is generalized linear mixed models (GLMMs; \citealt{mcculloch_generalized_2008}), also known in different scientific communities as Gaussian process \citep{rasmussen_gaussian_2006} or latent Gaussian models \citep{fahrmeir_multivariate_2001}. GLMMs provide a likelihood-based solution, but do not deal naturally with unit-level ascertainment and can pose significant computational difficulties. Modern approaches for alleviating computational difficulties include pairwise likelihood (PL; \citealt{renard_pairwise_2004}) and expectation propagation (EP; \citealt{minka_expectation_2001}). Here we propose two approaches for approximate likelihood computation in our setting of interest: \begin{enumerate} \item GLMM + PL + AML, which proposes a tractable likelihood approximation but is very sensitive to model misspecification. \item GLMM + modified EP + AML. This solution is more computationally intensive, but is more robust and is closer to traditional maximum likelihood estimation. \end{enumerate} We evaluate the merits of our approaches on both synthetic and real data sets of genetic studies involving thousands of individuals and hundreds of thousands of explanatory variables treated as having random effects. \break \section{Detailed Problem Description} We are interested in settings with (i) unit-level ascertainment; (ii) a full-rank covariance matrix; and (iii) a dense covariance matrix. These concepts are explained below. Unit-level ascertainment indicates that the decision whether to sample a unit is performed for every unit separately (Figure \ref{fig:classical_versus_us} a). This stands in contrast to several common study designs, such as family studies \citep{neuhaus_analysis_2002}, ascertained longitudinal studies \citep{liang_longitudinal_1986} or clustered case-control studies \citep{neuhaus_effect_1990}, where each correlated cluster is either entirely selected or entirely omitted from the study, and so there is no interaction between the ascertainment and the dependence structure. \begin{figure} \centering \includegraphics[width=0.75\linewidth] {classical_versus_us.pdf} \caption{\label{fig:classical_versus_us} The properties that are unique to our setting of interest (top row) compared to more traditional statistical settings (bottom row). (a) We are interested in unit-level sampling, where the decision whether to sample units depends on their response. In contrast, in clustered case-control studies an entire cluster of correlated units is either sampled or omitted from the study. (b) We are interested in a full rank covariance matrix of latent variables, which corresponds to having a large number of random effects. (c) We are interested in a dense covariance matrix, where the latent variables of every pair of units are correlated. In contrast, many studies assume a large number of mutually uncorrelated clusters.} \end{figure} A full-rank covariance matrix indicates that there are more random effects than samples, because the matrix rank measures the number of random effects (Figure \ref{fig:classical_versus_us} b). Modern data sets often include a very large number of random effects, either because they are very high dimensional, or because of the use of basis expansions or kernels, which implicitly project a small number of variables into a large (possibly infinite-dimensional) space \citep{diggle_model-based_1998,rasmussen_gaussian_2006,held_towards_2005}. Likelihood inference in the presence of such high dimensional dependencies is computationally challenging because it requires evaluating an integral whose dimensionality is equal to the matrix rank. Finally, a covariance matrix is dense when all of its entries are different from zero, indicating that all units are correlated (Figure \ref{fig:classical_versus_us} c). This exacerbates both the computational challenge, because the density does not factorize into multiplicative terms, and the statistical challenge, because classic statistical theory requires a large number of independent samples. \section{Existing Approaches for Likelihood-based Analysis of Correlated Data} We now briefly overview the GLMM and GP approach for analysis of correlated data, and then describe approaches for approximate inference in such settings. Throughout this section we assume that the data is not ascertained. We address analysis of ascertained data in Section \ref{sec:ascertainment}. \subsection{Generalized Linear Mixed Models / Gaussian Processes} Consider a sample of $n$ units, each having $d$ covariates associated with fixed (non-random) effects $\mathbf{X}_{i} \in \mathbb{R}^{d \times 1}$, $m$ covariates associated with random effects $\mathbf{Z}_{i} \in \mathbb{R}^{m \times 1}$ and an outcome variable $y_{i}$. GLMMs assume the existence of a latent random effect $\mathbf{b} \in \mathbb{R}^{m \times 1}$ such that \begin{align} P \left( y_{i}\ |\ \mathbf{X}_{i},\ \mathbf{Z}_{i},\ \mathbf{b;\beta} \right) &= h\left( \mathbf{X}_{i}^{T}\mathbf{\beta} + \mathbf{Z}_{i}^{T}\mathbf{b} \right), \nonumber \end{align} where $h\left( \cdot \right)$ is a likelihood function (which is closely related to an inverse link function in GLM terminology) and $\mathbf{\beta} \in \mathbb{R}^{d \times 1}$ are (non-random) fixed effects. In this work we assume that the random effects \(\mathbf{b}\) are normally distributed with a zero mean and a covariance matrix \(\mathbf{D}\left( \mathbf{\theta} \right)\) parameterized by \(\mathbf{\theta}\)\textbf{,} \(\mathbf{b}\sim \mathcal{N}\left( \mathbf{0},\mathbf{D}\left( \mathbf{\theta} \right) \right)\). In most random effects formulations in statistical genetics and other areas, it is usually assumed that \(\mathbf{b}\sim \mathcal{N}\left( \mathbf{0},\theta\mathbf{I} \right)\) for some scalar \(\theta\), typicalled called a \emph{variance component}. GLMMs naturally encode a latent variable for every individual, \(g_{i} = \mathbf{Z}_{i}^{T}\mathbf{b}\)\textbf{,} which aggregates the effects of all random variables. The covariance matrix relating the latent variables (which is dense and full rank in our setting) is therefore given by \(\mathbf{ZD}\left( \mathbf{\theta} \right)\mathbf{Z}^T\), where \(\mathbf{Z} \in \mathbb{R}^{n \times m} = \left\lbrack \mathbf{Z}_{1},\ldots\mathbf{Z}_{n} \right\rbrack^{T}\). This view enables \(\mathbf{Z}\) to be implicitly infinite dimensional as long as the matrix \(\mathbf{ZD}\left( \mathbf{\theta} \right)\mathbf{Z}^T\) can be defined, and thus unifies the GLMM and GP formulations. A schematic graphical model for GLMMs is shown in Figure \ref{fig:graphical_model}. \begin{figure} \centering \includegraphics[width=0.65\linewidth] {graphical_model.pdf} \caption{\label{fig:graphical_model} A directed graphical model for a GLMM with one covariate associated with a fixed effect (denoted as X), three covariates (dented as $Z^1$, $Z^2$, $Z^3$) with associated random effects (denoted as $b^1$, $b^2$, $b^3$), and two sampled units (indicated by the subscript indices) with latent variables $g_1$, $g_2$ and observed responses $y_1$, $y_2$. Also shown is the extension to unit-level ascertainment, which consists of adding a sampling indicator $s_i$ that depends on $y_i$, and is equal to 1 for every sampled unit. Latent (non-observed) variables are marked with a double-lined border. } \end{figure} Given a vector of observed outcomes \(\mathbf{y} \in \mathbb{R}^{n \times 1}\) and the matrix \(\mathbf{X} = \left\lbrack \mathbf{X}_{1},\ldots\mathbf{X}_{n} \right\rbrack^{T}\), the GLMM likelihood is given by: \begin{align} L\left( \mathbf{\beta},\mathbf{\theta} \right) = P\left( \mathbf{y}\ |\ \mathbf{X},\mathbf{Z}\ ;\ \mathbf{\theta},\mathbf{\beta} \right) & = \int{P\left( \mathbf{g|Z};\mathbf{\theta} \right) \prod_{i} {P(y_{i}|\mathbf{X}_{i},g_{i};\mathbf{\beta})} d\mathbf{g}.} \nonumber \end{align} Exact likelihood evaluation is computationally infeasible even in the presence of a modest number of random effects \(m\), but efficient approximations have been developed \citep{kuss_assessing_2005,nickisch_approximations_2008,varin_overview_2011}, two of which are described next. \subsection{Pairwise Likelihood \label{subsec:PL}} PL belongs to the family of composite likelihood approximations, which approximate the joint density of a large number of random variables via a product of joint densities of subsets of the data \citep{varin_overview_2011}. PL is defined as follows: \begin{align} P\left( \mathbf{y}\ |\ \mathbf{X},\mathbf{Z};\mathbf{\theta},\mathbf{\beta} \right)& \appropto \prod_{i,j} {P\left( y_{i},y_{j}\ |\ \mathbf{X}_{i},\mathbf{X}_{j},\mathbf{Z}_{i},\mathbf{Z}_{j}\ ;\mathbf{\theta}, \mathbf{\beta} \right)}, \nonumber \end{align} where $\appropto$ indicates approximate proportionality with respect to the model parameters $\mathbf{\theta}$, $\mathbf{\beta}$. Hence, the maximum pairwise likelihood estimate is also approximately the maximum likelihood estimate. PL estimation has the favorable properties of being computationally efficient owing to its quadratic dependency on the sample size, and of being consistent under suitable regularity conditions \citep{varin_overview_2011}. \subsection{Expectation Propagation \label{subsec:EP}} EP is a popular approach for approximating complex distributions by iteratively replacing every multiplicative term in the joint distribution of the observed and latent variables, with a simpler term from an exponential family distribution \citep{minka_expectation_2001,rasmussen_gaussian_2006}. The joint distribution of GLMMs is given by \(P\left( \mathbf{g|Z};\mathbf{\theta} \right)\prod_{i}{P(y_{i}|\mathbf{X}_{i},g_{i};\mathbf{\beta})}\). EP replaces every term in the product above by an unnormalized Gaussian, $ P\left( y_{i}|{\mathbf{X}_{i},g}_{i} \right) \approx t_{i}\left( g_{i} \right) \triangleq r_{i}\mathcal{N}\left( g_{i};{\widetilde{\alpha}}_{i},{\widetilde{\gamma}}_{i} \right) $, where we omitted the parameters $\mathbf{\beta}$ and $\mathbf{\theta}$ for brevity, and the site parameters $r_i$, $\widetilde{\alpha}_i$, $\widetilde{\gamma}_i$ implicitly depend on $\mathbf{X}_i$, $y_i$ and $\mathbf{\beta}$. EP iteratively updates the terms $t_i(g_i)$, such that each term minimizes the generalized Kullback Leibler divergence (GKL) between the functions $q_{-i}(g_i)t_i(g_i)$ and $q_{-i}(g_i)P(y_i | \mathbf{X}_i, g_i)$ (i.e., the KL divergence between these functions after standardizing them to integrate to unity), where the cavity distribution $q_{-i}(g_i) \propto \int{P(\textbf{g}|\textbf{Z}) \prod_{j \neq i}t_j(g_j) d\textbf{g}_{j \neq i}}$ represents the current approximation of $P\left(g_i | \mathbf{Z}, \mathbf{y}_{j \neq i}\right)$. Given an EP approximation, the GLMM likelihood can be approximated as: \begin{align} P\left( \mathbf{y}\ |\ \mathbf{X},\mathbf{Z} \right) & \approx \int{P\left( \mathbf{g|Z} \right)\prod_{i}{t_{i}\left( g_{i} \right)}d\mathbf{g}}. \nonumber \end{align} This expression can be evaluated analytically because it is an integral of a product of (unnormalized) Gaussian densities. EP has proven to consistently outperform alternative approximation methods for binary data \citep{nickisch_approximations_2008}, and recent theoretical analysis has demonstrated its consistency under certain modeling assumptions \citep{dehaene_bounding_2016,dehaene2018expectation}. \section{Existing Approaches for Likelihood-based Analysis of Ascertained Data \label{sec:ascertainment}} Analysis of ascertained data is typically carried out by defining a sampling indicator for every unit \(s_{i} \in \left\{ 0,1 \right\}\) which depends only on $y_i$, where $s_i=1$ for every unit in the study (Figure \ref{fig:graphical_model}), and then incorporating these indicators into the analysis. The two main approaches for likelihood-based estimation in the presence of such indicators are maximum profile likelihood and AML, which are described next. \subsection{Maximum profile likelihood} Maximum profile likelihood consists of maximizing the profile likelihood \(L_{\text{profile}}\left( \mathbf{\theta}_{y|\mathbf{X}} \right) = P\left( \mathbf{y}\ |\ \mathbf{X,s = 1}\ ;\ \mathbf{\theta}_{y|\mathbf{X}},\mathbf{\pi} \right)\) \citep{scott_maximum_2001}. Here, \(\mathbf{\theta}_{y|\mathbf{X}}\) parameterizes the distribution \(P\left( y|\mathbf{X} \right)\), \(\mathbf{s} = 1\) is a shorthand notation for \(s_{1} = 1,\ldots,s_{n} = 1\), and the parameters vector \(\mathbf{\pi}\) defines the sampling probability \(P\left( s_{i} = 1|y_{i} \right)\) for every possible value of \(y_{i}\). The resulting estimator is equivalent to maximum likelihood estimation, in the sense that it attains the Cramer-Rao lower bound. \subsection{Ascertained Maximum Likelihood} AML is similar to maximum profile likelihood, with the main difference being that the sampling probabilities \(P\left( s_{i} = 1|y_{i} \right)\) are defined beforehand by exploiting knowledge of the distribution of \(y\) in the population \citep{scott_fitting_1997}. For a binary outcome with a population prevalence \(K\) and an in-sample prevalence \(P\), every pair of sampling probabilities obeying the constraint \(\frac{P\left( s_{i} = 1|y_{i} = 0 \right)}{P\left( s_{i} = 1|y_{i} = 1 \right)} = \frac{K\left( 1 - P \right)}{\left( 1 - K \right)P}\) guarantees consistent estimates, because it yields the observed case-control ratio in expectation. This approach is often termed pseudo likelihood or conditional likelihood \citep{manski_alternative_1981,hsieh_estimation_1985}, but as both terms have alternative meanings in GLMM literature, we use the term ascertained likelihood instead. AML estimates are less statistically efficient than maximum profile likelihood estimates, but the loss of efficiency has been shown to be negligible in practice \citep{wild_fitting_1991,scott_fitting_1997}. The AML approach has previously been used for family-based studies \citep{glidden_ascertainment_2002,epstein_ascertainment-adjusted_2002}, but to our knowledge it has not been used under the combination of a dependency structure and unit-level sampling. \subsection{The Challenge in Combining GLMMs with AML} To combine GLMMs with the AML framework, we define the ascertained GLMM likelihood and apply Bayes' law as follows: \begin{align} L^{*}\left( \mathbf{\beta},\mathbf{\theta} \right) = P\left( \mathbf{y}\ |\ \mathbf{X},\mathbf{Z},\mathbf{s} = 1\ ;\ \mathbf{\theta},\mathbf{\beta} \right) = \frac{P\left( \mathbf{y}\ |\ \mathbf{X},\mathbf{Z}\ ;\ \mathbf{\theta},\mathbf{\beta} \right)}{P\left( \mathbf{s = 1}\ |\ \mathbf{X},\mathbf{Z}\ ;\ \mathbf{\theta},\mathbf{\beta} \right)}\prod_{i}^{}{P\left( \mathbf{s}_{i}\mathbf{= 1}\ |\mathbf{y}_{i} \right)}. \label{eq:combine_glmm_aml} \end{align} The last term in the rhs of Equation \ref{eq:combine_glmm_aml} is considered known under the AML framework and requires no special treatment. The numerator is equal to the standard GLMM likelihood under no ascertainment, whereas the denominator is equal to the likelihood of a GLMM in which the outcome is \(s_{i}\) instead of \(y_{i}\). A naive approach is to approximate the numerator and denominator separately. However, obtaining an accurate estimate of the ratio is extremely challenging, because both the numerator and denominator are challenging to approximate, and any inaccuracy is compounded by the division. In our experience, this approach does not lead to reasonable estimators. \subsection{The Implications of Ignoring Ascertainment in GLMMs} GLMMs are often employed in the analysis of case-control data without explicitly accounting for the ascertainment scheme \citep{chen_control_2016,jiang_retrospective_2015}. We demonstrate here that ignoring ascertainment leads to unrealistic conclusions which stand in contrast to some fundamental motivations for GLMM use, like the central limit theorem. We focus on binary GLMMs, which can be formulated according to the liability threshold model \citep{dempster_heritability_1950}. Under this model, every unit has a latent liability value \(l_{i} = g_{i} + \epsilon_{i}\), where \(\epsilon_{i}\) is a latent residual variable whose distribution depends on the likelihood function (e.g. normally distributed for probit, or logit distributed for logit), and cases are units with \(l_{i} > t\) for some cutoff \(t\). The cutoff \(t\) is the \(1 - K\) percentile of the liabilities distribution in the population, where \(K\) is the prevalence of cases. It is common to use likelihood functions associated with a smooth and symmetrically distributed \(\epsilon_{i}\), such as logit or probit, which leads to a smooth and symmetric distribution of liabilities in the population. However, the liabilities and the latent variables \(g_{i}\) in an ascertained sample follow a non-symmetric and possibly non-continuous distribution (Figure \ref{fig:fig_densities} a), and thus cannot be analyzed with standard likelihood functions. This problem motivates the statistical solutions presented in this work for analysis of case-control studies. \begin{figure} \centering \includegraphics[width=0.75\linewidth] {densities.pdf} \caption{\label{fig:fig_densities} The implications of assuming normality of random effects in the population from which units are sampled (panel a) or in a case-control study (panel b), for a GLMM with a probit likelihood function. The liability is given by $l_i=g_i+\epsilon_i$, and we assume $g_i,\epsilon_i \sim \mathcal{N}(0,0.5)$ . Units with liabilities greater than their (1-prevalence) percentile in the population are considered cases. (a) When assuming normality in the underlying population, the distribution of the latent variables and of the liabilities in a case-control study (i.e., conditional on $s_i=1$) is non-normal, unless the cases prevalence is 50\%, in which case the study is a random population sample. (b) When assuming normality in a case-control study, the latent variables and the liabilities are not normally distributed in the underlying population, in contrast to the underlying assumptions of the liability threshold model.} \end{figure} Many studies in practice opt to ignore the complexities above, and instead use common likelihood functions such as a logit or a probit to analyze case-control studies \citep{chen_control_2016,jiang_retrospective_2015,hobbs_exome_2016,kramer_african_2017,qi_genetics_2017,sanders_gwas_2017}. However, this solution implies a non-symmetric and possibly non-smooth distribution of liabilities and latent variables in the population from which units are sampled, in contrast to the central limit theorem assumptions (Figure \ref{fig:fig_densities} b). Thus, ignoring the ascertainment scheme in GLMMs may lead to nonsensical probabilistic settings, under common assumptions. \section{Adapting the Statistical Approaches to Ascertained Settings \label{sec:Adapting}} Here we describe how the GLMM approximations, PL and EP, can be adapted to ascertained settings. \subsection{Adapting Pairwise Likelihood to Ascertained Settings} PL can naturally be adapted to ascertained settings via the approximation: \begin{align} P\left( \mathbf{y}\ |\ \mathbf{X},\mathbf{Z,s = 1} \right) & \appropto \prod_{i,j} {P\left( y_{i},y_{j}\ |\ \mathbf{X}_{i},\mathbf{X}_{j},\mathbf{Z}_{i},\mathbf{Z}_{j},s_{i} = 1,s_{j} = 1 \right)} \nonumber \\ & = \ \prod_{i,j}\frac { P\left( y_{i},y_{j}\ |\ \mathbf{X}_{i},\mathbf{X}_{j},\mathbf{Z}_{i},\mathbf{Z}_{j} \right) } { P\left( s_{i} = s_{j} = 1\ |\ \mathbf{X}_{i},\mathbf{X}_{j},\mathbf{Z}_{i},\mathbf{Z}_{j} \right) } P\left( s_{i} = s_{j} = 1|\ y_{i},y_{j} \right), \nonumber \end{align} where \(P\left( s_{i} = s_{j} = 1|\ y_{i},y_{i} \right) = P\left( s_{i} = 1|\ y_{i} \right)P\left( s_{j} = 1|\ y_{j} \right)\) are known constants which can be ignored, and we omitted the parameters $\mathbf{\beta}$, $\mathbf{\theta}$ for brevity. The terms in the numerator and the denominator can be separately evaluated as in standard PL, where we treat the denominator as a GLMM with a suitable likelihood function. Unlike before, the evaluation of the ratio is accurate since both the numerator and denominator can be computed exactly. In certain settings, the PL evaluation can be substantially accelerated via a Taylor approximation around \(\mathbf{Z}_{i}^{T}\mathbf{Z}_{j} = 0\), which enables factoring each bivariate distribution into a product of marginal distributions (Appendix A). \subsection{Adapting Expectation Propagation to Ascertained Settings \label{sec:AEP}} Our novel derivation of ascertained EP (AEP) replaces the standard EP step with a modified step that equates the functions $\int q_{-i}(g_i)t_i(g_i) dg_i$ and $ \frac{\int q_{-i}(g_i)P(y_i,s_i|g_i,\textbf{X}_i)dg_i}{\int q_{-i}(g_i)P(s_i|g_i,\textbf{X}_i)dg_i} $. Specifically, at each step we find the unnormalized Gaussian $t_i(g_i)$ which makes these functions and their first two partial derivatives with respect to $\mu_{-i}$ (the mean of the Gaussian $q_{-i}(g_i)$) have the same value when evaluated at $\mu_{-i}$. We show in Section \ref{sec:AEP_equivalence} that this step objective coincides with the standard EP objective in the absence of ascertainment (i.e. when $P(s_i | y_i)$ is a constant regardless of $y_i$). Hence, our proposed algorithm generalizes standard EP to handle ascertainment. The sampling distribution of the AEP maximum likelihood estimator can be approximated efficiently via jackknife sampling, by reusing the functions $t_i(g_i)$ \citep{opper_gaussian_2000,qi_predictive_2004,vehtari_bayesian_2016}. The evaluation of each jackknife sample requires inverting a matrix that is a submatrix of a matrix that was inverted in the original computation, with one row and one column removed. Such an inversion can be computed rapidly while retaining numerical stability, by combining a Cholesky decomposition with a series of Givens rotations \citep{seeger2004low}. \subsection{Analysis of Ascertained EP} Here we provide an analysis of AEP and its derivation. As the theoretical properties of EP are not well understood (except under relatively strong conditions, e.g. \citealt{dehaene2018expectation}), we do not provide a formal analysis of AEP. Instead, we state several assumptions and then provide an informal analysis under these assumptions. Specifically, we demonstrate the consistency of AEP in Section \ref{sec:AEP_consistency}, provide a justification for the specific form of the AEP step in Section \ref{sec:AEP_step_deriv}, and demonstrate that EP and AEP coincide in the absence of ascertainment in Section \ref{sec:AEP_equivalence}. Throughout this section, the notation $\textbf{s}$ is a shorthand notation for $s_1= \ldots=s_n=1$, $\textbf{u}_{-i}$ indicates the vector $\textbf{u}$ with the $i^{\text{th}}$ component removed, and we omit the dependence on \(\mathbf{\beta},\mathbf{\theta}\) for brevity. \subsubsection{Consistency of Ascertained EP \label{sec:AEP_consistency}} Our informal proof of AEP consistency is based on two assumptions: \begin{assumption} The composite likelihood approximation: \textup{ \begin{align} P(\textbf{s} | \textbf{X},\textbf{Z}) \approx \frac{1}{C(\textbf{X}, \textbf{Z})} \prod_{i} P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i}), \hspace{10pt} \text{for some proportionality factor} \hspace{5pt} C(\textbf{X}, \textbf{Z}). \nonumber \end{align} } \end{assumption} \begin{assumption} At the fixed point of AEP we have: \normalfont \begin{align} \int P(\textbf{g} | \textbf{Z}) \prod_{i} t_i(g_i) d\textbf{g} \approx \int P(\textbf{g}|\textbf{Z}) \prod_{i} \frac{P(y_i,s_i|g_i,\textbf{X}_i)}{P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})} d\textbf{g}. \nonumber \end{align} \end{assumption} Note that if these assumptions hold, this implies that they also hold when replacing $\textbf{s}$ with $\textbf{s}_{-j}$ and omitting $j$ from the product in Assumption 1, and when integrating over $\textbf{g}_{-j}$ and omitting $j$ from the products in Assumption 2. These properties will be used in the proofs. Assumption 1 is motivated by the theory of composite likelihood estimators \citep{varin_overview_2011}. Specifically, the composite maximum likelihood estimator is asymptotically normally distributed around the true parameter value under suitable regularity conditions \citep{cox2004note}, indicating consistency. Since both the full and the composite maximum likelihood estimators are asymptotically normal with the same mean, the composite likelihood is approximately proportional to the full likelihood around this mean, with the approximation accuracy depending on the ratio between their variances. This ratio depends on the ratio between the diagonal entries of the Fisher and the Godambe information matrices \citep{varin_overview_2011}. Assumption 2 arises because the AEP algorithm explicitly strives to improve its underlying approximation until reaching the fixed point, as shown in Section \ref{sec:AEP_step_deriv}. This is the analogue of the standard EP objective $t_i(g_i) \approx P(y_i | X_i, g_i)$, with the difference that here $t_i(g_i) \approx \frac{P(y_i,s_i|g_i,\textbf{X}_i)}{P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})}$. We now provide an informal proof of AEP consistency using Assumptions 1-2. \begin{lemma} \label{lemma1} At the fixed point of the AEP algorithm, we have: \normalfont \begin{align} \int P(\textbf{g}|\textbf{Z}) \prod_i t_i(g_i)dg \approx C(\textbf{X}, \textbf{Z}) \cdot P(\textbf{y} | \textbf{X},\textbf{Z},\textbf{s}). \nonumber \end{align} \end{lemma} \begin{proof} \begin{align} \int P(\textbf{g}|\textbf{Z}) \prod_i t_i(g_i)d\textbf{g} & \stackrel{2}{\approx} \int P(\textbf{g}|\textbf{Z}) \prod_i \frac{P(y_i,s_i | g_i,\textbf{X}_i)} {P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})} d\textbf{g} \nonumber \\ & = \int \frac{ P(\textbf{g}|\textbf{Z}) \prod_i P(s_i | g_i,\textbf{X}_i)}{\prod_i P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})} \prod_i P(y_i | s_i,g_i,\textbf{X}_i)d\textbf{g} \nonumber \\ & \stackrel{1}{\approx} C(\textbf{X}, \textbf{Z}) \int \frac{ P(\textbf{g}|\textbf{Z}) P(\textbf{s}|\textbf{g},\textbf{X})}{P(\textbf{s}|\textbf{X},\textbf{Z})} P(\textbf{y}|\textbf{s},\textbf{g},\textbf{X}) d\textbf{g} \nonumber \\ & =C(\textbf{X}, \textbf{Z}) \int P(\textbf{g}|\textbf{X},\textbf{Z},\textbf{s})P(\textbf{y}|\textbf{s},\textbf{g},\textbf{X})d\textbf{g} \nonumber \\ & = C(\textbf{X}, \textbf{Z}) \cdot P(\textbf{y}|\textbf{X},\textbf{Z},\textbf{s}). \nonumber \end{align} The last two equalities use the fact that $\textbf{y}$ and $\textbf{s}$ are conditionally independent of $\textbf{Z}$ given $\textbf{g}$. \end{proof} Lemma \ref{lemma1} implies consistency because it indicates that the AEP likelihood approximation is approximately proportional to the true likelihood. Hence, the parameters $\mathbf{\beta}$, $\mathbf{\theta}$ which maximize the AEP likelihood are approximately the maximum likelihood estimates. \subsubsection{Derivation of the Ascertained EP Step \label{sec:AEP_step_deriv}} Here we provide an informal justification for the specific form of the AEP step described in Section \ref{sec:AEP}. Our derivation makes use of several propositions, whose proofs are provided in Appendix B. These proofs make use of Assumptions 1-2 and an additional assumption: \begin{assumption} Weak dependence between \textup{$\textbf{y}_{-i}$} and \textup{$s_i$} conditional on \textup{$\textbf{X}$} and on \textup{\textbf{Z}}: \normalfont \begin{align} P(\textbf{y}_{-i} | \textbf{X},\textbf{Z},\textbf{s}) \approx P(\textbf{y}_{-i} | \textbf{X},\textbf{Z},\textbf{s}_{-i}). \nonumber \end{align} \end{assumption} Recall from Section \ref{sec:AEP} that the AEP step equates the functions $\int q_{-i}(g_i)t_i(g_i) dg_i$ and $ \frac{\int q_{-i}(g_i)P(y_i,s_i|g_i,\textbf{X}_i)dg_i}{\int q_{-i}(g_i)P(s_i|g_i,\textbf{X}_i)dg_i} $, where $q_{-i}(g_i) \propto \int{P(\textbf{g}|\textbf{Z}) \prod_{j \neq i}t_j(g_j) d\textbf{g}_{-i}}$. We now write down the derivation leading to this objective function, based on Assumptions 1-3. We first write down the natural analogue of the standard EP step objective for AEP. Following Assumption 2, this objective finds the unnormalized Gaussian $t_i(g_i)$ that optimizes the approximation: \begin{align} \int q_{-i}(g_i)t_i(g_i) dg_i \approx \int q_{-i}(g_i) \frac{P(y_i,s_i|g_i,\textbf{X}_i)}{P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})} dg_i. \label{eq:EP_asc_goal_best_nostar} \end{align} The above objective is motivated by observing that the lhs of Equation \ref{eq:EP_asc_goal_best_nostar} is proportional to the lhs of Lemma 1, and hence is approximately proportional to the likelihood we wish to evaluate. However, we cannot follow the EP approach of minimizing the GKL divergence between the functions in the integrals in Equation \ref{eq:EP_asc_goal_best_nostar}, because this will lead to the same solution as standard EP, up to a scaling factor that is absorbed in the zeroth moment of $t_i(g_i)$. To see this, note that the function in the integral on the rhs of Equation \ref{eq:EP_asc_goal_best_nostar} can be written as $q_{-i}(g_i)P(y_i | g_i, \textbf{X}_i) W$, where $W = \frac{P(s_i | y_i)}{P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})}$ is constant with respect to $g_i$. This is the same function used in standard EP, up to the scaling factor $W$. This is a result of Dawid's selection paradox \citep{dawid1994selection,senn2008note}. Instead of minimizing the GKL divergence, we first use Assumptions 1-3 to approximate the rhs of Equation \ref{eq:EP_asc_goal_best_nostar} as follows: \begin{align} \int q_{-i}(g_i) \frac{P(y_i,s_i|g_i,\textbf{X}_i)}{P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})} dg_i \approx \frac{\int q_{-i}(g_i)P(y_i,s_i|g_i,\textbf{X}_i)dg_i}{\int q_{-i}(g_i)P(s_i|g_i,\textbf{X}_i)dg_i} \label{eq:rhs_approx_main}. \end{align} Next, we equate the lhs of Equation \ref{eq:EP_asc_goal_best_nostar} with the rhs of Equation \ref{eq:rhs_approx_main} by imposing the constraint that the zeroth, first and second derivatives of both functions with respect to $\mu_{-i}$ (the mean of the Gaussian $q_{-i}(g_i)$) have the same value when evaluated at $\mu_{-i}$. These constraints render AEP equivalent to standard EP in the absence of ascertainment, as shown in Section \ref{sec:AEP_equivalence}. The derivation is conceptually simple, because $\mu_{-i}$ is simply the parameter encoding the mean of the Gaussian $q_{-i}(g_i)$. It remains to derive Equation \ref{eq:rhs_approx_main}. Our main tool is the following approximation: \begin{proposition} \label{Approx1} At the fixed point we have: \normalfont $ q_{-i}(g_i) \approx P(g_i, \textbf{X},\textbf{Z}, \textbf{y}_{-i}). \nonumber $ \end{proposition} Our derivation uses Proposition \ref{Approx1} twice. First, we use it to obtain the following approximation to the rhs of Equation \ref{eq:EP_asc_goal_best_nostar}: \begin{proposition} \label{Approx2} \normalfont \begin{align} \int q_{-i}(g_i) \frac{P(y_i,s_i|g_i,\textbf{X}_i)}{P(s_i | \textbf{X},\textbf{Z},\textbf{s}_{-i})} dg_i \approx P(y_i | \textbf{X},\textbf{Z},\textbf{y}_{-i},s_i). \label{eq:prop2_eq} \end{align} \end{proposition} Afterwards, we use Proposition \ref{Approx1} again, along with the graphical model structure (Figure \ref{fig:graphical_model}) to approximate the rhs of Equation \ref{eq:prop2_eq} via $q_{-i}(g_i)$ as follows: \begin{align} P(y_i | \textbf{X},\textbf{Z},\textbf{y}_{-i},s_i) & = \frac {P(y_i,s_i | \textbf{X},\textbf{Z},\textbf{y}_{-i})} {P(s_i | \textbf{X},\textbf{Z},\textbf{y}_{-i})} \nonumber \\ & = \frac {\int P(g_i | \textbf{X},\textbf{Z},\textbf{y}_{-i}) P(y_i,s_i | \textbf{X}_i,g_i) dg_i} {\int P(g_i | \textbf{X},\textbf{Z},\textbf{y}_{-i}) P(s_i | \textbf{X}_i,g_i) dg_i} \nonumber \\ & \approx \frac {\int q_{-i}(g_i) P(y_i,s_i | \textbf{X}_i,g_i) dg_i} {\int q_{-i}(g_i) P(s_i | \textbf{X}_i,g_i) dg_i}. \nonumber \end{align} This completes the derivation. \subsubsection{Equivalence of AEP and Standard EP Under no Ascertainment \label{sec:AEP_equivalence}} In standard (non-ascertained) EP we minimize the Generalized Kullback-Leibler (GKL) divergence between $\hat{m}(g_i) \triangleq q_{-i}(g_i) P(y_i | g_i,\textbf{X}_i)$ and $ \tilde{m}(g_i) \triangleq q_{-i}(g_i) \cdot t_i(g_i) $. Since $\tilde{m}(g_i)$ is an unnormalized Gaussian, we can minimize the GKL divergence by equating its zeroth, first and second moments with those of $\hat{m}(g_i)$ \citep{rasmussen_gaussian_2006}. Hence, standard EP requires computing the mean $\hat{\mu}_i$ and variance $\hat{\sigma}^2_i$ of $\hat{m}(g_i)$. A straightforward but lengthy derivation shows that we can compute these quantities as follows: \begin{align} \hat{\mu}_i& = \frac{\partial}{\partial \mu_{-i}}\left[\log \int{\hat{m}(g_i) dg_i}\right]\sigma^2_{-i} + \mu_{-i} \nonumber \\ \hat{\sigma}^2_i & = \frac{\partial ^2}{\partial \left(\mu_{-i}\right)^2}\left[\log \int{\hat{m}(g_i) dg_i}\right]\left(\sigma_{-i}^2\right)^2 + \sigma^2_{-i}, \nonumber \end{align} where $\mu_{-i}$, $\sigma^2_{-i}$ are the mean and variance of the Gaussian $q_{-i}(g_i)$, and the derivatives are evaluated at the actual value of $\mu_{-i}$. Hence, there is a one-to-one correspondence between the first two moments of $\hat{m}(g_i)$ and its first two partial derivatives with respect to $\mu_{-i}$ (when evaluated at $\mu_{-i}$). Consequently, each step of standard EP can alternatively be described as imposing the constraint that the zeroth, first and second derivatives of the integrals of $\tilde{m}(g_i)$ and $\hat{m}(g_i)$ with respect to $\mu_{-i}$ are the same. This is the same constraint used in AEP. Hence, EP and AEP coincide in the absence of ascertainment, where $P(s_i=1|y_i)$ is constant regardless of the value of $y_i$. \section{Results} We evaluated the performance of our methods using extensive simulations and real data analysis. We first describe our simulation studies, and then demonstrate the results obtained on real data. \subsection{Simulations Overview} To evaluate the performance of the methods, we simulated data that closely mimic real GWAS-CC studies, and evaluated the accuracy of genetic heritability estimation (i.e., variance component estimation) under each method. We simulated data according to the liability threshold model, where each subject has liability \(l_{i} = \mathbf{X}_{i}^{T}\mathbf{\beta +}\mathbf{Z}_{i}^{T}\mathbf{b} + \epsilon_{i}\), and the variance of the liability in the population is 1. The heritability is the fraction of liability variance explained by genetics, which is given by the variance \(\sigma_{g}^{2}\ \)of the latent variable \(g_{i} = \mathbf{Z}_{i}^{T}\mathbf{b}\) in the population (assuming $\text{var}(l_i)=1$). We simulated genetic data based on single nucleotide polymorphisms (SNPs), which can be encoded as 0/1/2, according to the number of minor alleles carried by an individual at a specific position in the genome. We first generated a minor allele frequency (MAF) $f^j \sim \mathcal{U}(0.05,0.5)$ for every SNP $j$, and then sampled a matrix $\textbf{Z}$ of SNP, such that $Z_{ij} \sim \text{Bin}(2,f^j)$. Finally, we standardized each column in the matrix $\textbf{Z}$ by subtracting the mean and dividing by the standard deviation corresponding to its allele frequency. To simulate unit-level ascertainment, we (1) generated a population of 1,000,000 individuals, where for every individual $i$ we generated a vector of standardized genotypes $\mathbf{Z}_{i} \in \mathbb{R}^m$ as described above, and a vector \(\mathbf{X}_{i}\mathcal{\sim \mathcal{N}}\left( 0,\mathbf{I} \right) \in \mathbb{R}^{c}\) representing additional standardized risk factors such as sex or age; (2) generated a random vector \(\mathbf{b}\mathcal{\sim \mathcal{N}}\left( 0,\sigma_{g}^{2}/m\mathbf{I} \right)\) of random effects, and \(\mathbf{\beta}\mathcal{\sim \mathcal{N}}\left( 0,\sigma_{c}^{2}/c\mathbf{I} \right)\) of fixed effects; (3) assigned a latent variable \(g_{i} = \mathbf{Z}_{i}^{T}\mathbf{b}\) and a liability \(l_{i} = g_{i} + \mathbf{X}_{i}^{T}\mathbf{\beta}{+ \epsilon}_{i}\) for every individual \(i\), where \(\epsilon_{i}\mathcal{\sim \mathcal{N}}\left( 0,1 - \sigma_{c}^{2} - \sigma_{g}^{2} \right)\) i.i.d; (4) defined all individuals with \(l_{i}\) greater than the \(1 - K\) percentile of the liability distribution as cases, where \(K\) is the desired prevalence; and (5) selected a subset of \(\frac{n}{2}\) cases and \(\frac{n}{2}\) controls for the case-control study, where \(n\) is the desired study size. Unless otherwise stated, we used \(m = 500\), \(n = 500\), \(K = 1\%,\) \(\sigma_{g}^{2} = 0.25,\ \sigma_{c}^{2} = 0.25\), and $c=1$. In all settings, we first estimated the fixed effects via a novel ascertainment-aware generalized estimation equations (AGEE) approach that we developed, and then adjusted the affection cutoffs accordingly (Appendix C). \begin{figure} \centering \includegraphics[width=0.65\linewidth] {results_Fig1.pdf} \caption{\label{fig:fig_var_comp} Evaluating the performance of variance component estimation methods. Shown are box-plots depicting the estimates of each method across 100 different simulations, under data sets with an equal number of cases and controls, and a model with a single variance component, denoted as $\sigma^2$. The dashed horizontal lines represent the true underlying values of $\sigma^2$ used to generate the data. (a) AEP, APL and PCGC provide accurate estimates of $\sigma^2$ when the true trait prevalence (the prevalence of cases in the population) is 1\%, for various values of $\sigma^2$, whereas plain EP is severely biased. (b) All methods except for plain EP accurately estimate $\sigma^2$ regardless of the underlying trait prevalence. Plain EP is accurate only when the prevalence is 50\%, in which case there is no ascertainment. } \end{figure} \subsection{Simulation Studies: Estimating Variance Components} Our first experiment evaluated the ability to estimate the variance component \(\theta\) (i.e. the parameter governing the distribution of the latent variables $\textbf{g} \sim \mathcal{N}(0, \theta \textbf{ZZ}^T)$). In addition to the methods proposed here we also evaluated a method called phenotype correlation genotype correlation (PCGC), which is the state of the art approach for heritability estimation in genetic studies \citep{golan_measuring_2014}. PCGC is similar in spirit to the PL solution proposed in this work, but uses a moment rather than a likelihood-based estimator. In addition to PCGC, we examined AEP, ascertained pairwise likelihood (APL), and plain EP, which is the standard variant of EP that does not account for ascertainment. The results indicate that all methods except plain EP yield empirically unbiased estimates, whereas plain EP is severely biased (Figure \ref{fig:fig_var_comp} a). To further investigate the behavior of the methods, we generated case-control studies under different prevalence values \(K\), and verified that all methods except plain EP remain accurate regardless of \(K\), whereas plain EP is only accurate when \(K = 0.5\), in which case there is no ascertainment (Figure \ref{fig:fig_var_comp} b). In the next experiment, we examined the sensitivity of variance component estimation methods to sample size and data dimensionality (corresponding to the number of rows and columns in the matrix \(\mathbf{Z}\), respectively). We first verified that all methods become increasingly accurate with increasing sample size, but PCGC has a consistently larger estimator variance, because it uses a moment-based rather than a likelihood-based estimator (Figure \ref{fig:fig_simulations} a). We also observed that all methods become increasingly accurate as the number of covariates with random effects increases, but AEP is substantially more accurate in the presence of $<$50 covariates (Figure \ref{fig:fig_simulations} b). This is because the other two methods use a Taylor expansion around \(\mathbf{Z}\mathbf{Z}^{T} = \mathbf{I}\), which is inaccurate in the presence of a small number of covariates. \begin{figure} \centering \includegraphics[width=0.7\linewidth] {results_Fig2.pdf} \caption{\label{fig:fig_simulations} Investigating how estimation performance is affected by sample size, data dimensionality and modeling violations. (a) All the methods gain accuracy as the sample size increases. The estimator variance of PCGC is consistently larger, because it uses a moment-based rather than a likelihood-based estimator. (b) All the methods gain accuracy as the number of random effects increases. AEP is substantially more accurate than the other methods in the presence of a small number of covariates, because the other two methods use a Taylor expansion around $\mathbf{ZZ}^T=\mathbf{I}$, which is inaccurate in the presence of a small number of covariates. APL estimates for numbers $<$50 are equal to 1.0, and are omitted for clarity. (c) AEP is robust to covariate standardization misspecification (see main text), whereas PCGC is moderately sensitive and APL is highly sensitive.} \end{figure} We also examined the behavior of the methods under modeling misspecification. To do this, we introduced noise into the standardization procedure of the covariates. Specifically, we multiplied the estimated frequency of every binary variable \(j\) by \(r_{j} \sim U\left( \frac{1}{1 + e},1 + e \right)\) prior to standardizing it, where \(e \in \left\lbrack 0,1 \right\rbrack\) is the standardization error magnitude, and used this value for estimation, but not for the true generative model. This noise model is motivated by GWAS, where genetic variants are often standardized according to (somewhat noisy) estimates of their population frequency rather than their sample frequency, to prevent bias due to ascertainment. The results indicate that AEP is highly robust to such modeling misspecification, whereas PCGC is moderately sensitive and APL is highly sensitive to such misspecification (Figure \ref{fig:fig_simulations} c). These experiments indicate that AEP is more reliable than the other methods under a wide variety of modeling assumptions, and is thus the method of choice for likelihood-based variance component estimation in case-control studies. Finally, we examined the computational speed of the evaluated methods. Our analysis shows that PCGC and APL are very efficient as compared to AEP, because they scale quadratically with the sample size whereas AEP scales cubically, just like standard EP \citep{nickisch_approximations_2008}. Nevertheless, AEP can still perform maximum likelihood estimation in data sets with 3,000 units in less than two hours, and is thus applicable to solve reasonably sized real-world problems. \begin{figure} \centering \includegraphics[width=0.65\linewidth] {wtccc.pdf} \caption{\label{fig:WTCCC} Estimating the heritability of various complex disorders from \citep{wtccc_genome-wide_2007}. Shown are the variance component estimates according to three examined methods, which can be interpreted as the heritability of a complex trait (the fraction of liability variance explained by genetic factors). The error bars are the standard deviation multiplied by 1.96, as estimated via jackknife. The complex disorders are Crohn’s disease (CD), rheumatoid arthritis (RA), bipolar disorder (BD), type 1 diabetes (T1D), type 2 diabetes (T2D), coronary artery disease (CAD) and hypertension (HT). The population prevalence of each trait is shown below its name, as provided in \citep{golan_effective_2014}. The estimates of AEP and PCGC are relatively concordant, whereas the estimated of APL are significantly down-biased, in agreement with the results of simulations of misspecified covariance matrices.} \end{figure} \subsection{Real Data Analysis} Finally, we evaluated the ability of the proposed methods to estimate variance components in real data sets. To this end, we estimated the heritability of seven complex disorders, having population prevalence between 0.1\% and 6\%, based on large data sets with $\sim$3,700 individuals and $\sim$280,000 genetic variants from the Wellcome Trust 1 case-control consortium \citep{wtccc_genome-wide_2007}. We performed stringent preprocessing to avoid artifacts from biasing our results, as reported in our previous publication \citep{weissbrod_multikernel_2016}. We modeled sex, which is strongly associated with several of these traits, as a binary covariate associated with a fixed effect, and estimated its effect via AGEE as done in the simulation studies. Standard errors were computed via jackknife sampling. Our results indicate that the heritability explained by measured genotypes for all investigated disorders lies between 20\%-60\% (Figure \ref{fig:WTCCC}). We additionally see a high degree of concordance between PCGC and AEP, whereas the estimates of APL are substantially lower. This behavior is consistent with the one seen in the simulation studies of covariance misspecification, and suggests that the use of APL in practice may be highly sensitive to model misspecification. To conclude, AEP appears to be more accurate than the state of the art (PCGC) under simulations and yields similar estimates under real data analysis, and is thus the first reliable method we are aware of for likelihood-based inference in GLMMs with unit-level ascertainment and a dense and full-rank covariance matrix. \section{Discussion} This study presents several methods for parameter estimation and inference in settings with unit-level ascertainment, a large number of random effects, and a dense correlation structure. This was done by combining the ascertained likelihood framework with GLMMs, which form the statistical backbone of likelihood based analysis of non-iid data. We proposed two approximate likelihood-based methods for the ascertained GLMM framework, AEP and APL, and empirically compared them with PCGC -- the current state of the art method for estimating variance components in genetic case-control studies, which uses a moment-based rather than a likelihood-based estimator. APL is very computationally efficient but appears to be highly sensitive to model misspecification. AEP, which is the most complex and best approximation of maximum likelihood we propose, is slower and is more technically complex than the other methods, but is consistently more accurate than PCGC, and is less sensitive to modeling assumptions in our simulations. AEP additionally has the advantage of providing a full probabilistic model with a well-defined likelihood, and it recovers standard EP as a special case under random ascertainment. On the other hand, PCGC has a principled underlying approximation, whereas APL and AEP are less well understood. We thus believe that the three methods are complementary in terms of their strengths and weaknesses, and we encourage future case-control studies to use multiple methods to gain a deeper understanding of high dimensional dependency structures. The combination of unit-level ascertainment, a large number of random effects and a dense correlation structure is very common in statistical genetics \citep{golan_measuring_2014}, but is often encountered in other scientific domains, such as geostatistics and GP classification \citep{diggle_model-based_1998,chu_classification_2010,ziegler_individualized_2014,young_accurate_2013}. Ascertained sampling is almost inevitable when studying rare phenomena, and the increasing dimensionality of studied data often necessitates the introduction of random rather than fixed effects, which in turn induce dense dependency structures. Additionally, it is often more convenient to perform dense sampling in a small number of clusters rather than collecting a large number of clusters \citep{bellamy_quantifying_2005,zhang_inconsistent_2004,glidden_modelling_2004} leading to dense, full-rank dependency structures at the cluster level. Hence, we expect our work to be applicable in diverse scientific fields. One limitation of the dense dependency structure setting is that statistical theory is relatively undeveloped for this case. Specifically, assuming a study with \(r\) mutually independent clusters of \(m\) units, statistical theory is well developed for the asymptotic behavior \(r/m \rightarrow \infty\), but is limited for \(r/m \rightarrow 0\), which is our setting of interest (as \(r\)\emph{=1} when the covariance matrix is dense). The consistency of estimators in such cases has been established in limited settings, including GEEs \citep{xie_asymptotics_2003}, maximum penalized quasi likelihood \citep{bellamy_quantifying_2005}, composite likelihood approximation \citep{heagerty_composite_1998} Laplace approximations \citep{shun_laplace_1995}, and specific geostatistical models \citep{zhang_towards_2005,du_fixed-domain_2009}. Several recent studies have established the consistency of maximum likelihood estimators for linear mixed models in similar settings using random matrix theory \citep{bonnet_heritability_2015,jiang_high-dimensional_2016,dicker_maximum_2016}, but to our knowledge such results have not been derived for GLMMs. We conclude that there is a major gap in statistical theory regarding \(r/m \rightarrow 0\) asymptotics, representing questions of both theoretical and practical importance. In this study we extend the well-known EP algorithm \citep{minka_expectation_2001} to approximate the GLMM likelihood. Another common approach utilizes Gauss Hermite quadrature \citep{pinheiro_approximations_1995,pinheiro_efficient_2006}, but this approach is computationally infeasible in our settings because it scales exponentially with the number of random effects. Another approach performs Markov chain Monte Carlo (MCMC) sampling combined with an integration scheme such as thermodynamic integration \citep{kuss_assessing_2005,nickisch_approximations_2008,gelman_simulating_1998}, but in our experience such approaches are in practice too slow and complex for use with modern sized data sets. Other approaches include analytical approximations such as penalized quasi likelihood \citep{breslow_approximate_1993,wolfinger_generalized_1993}, Laplace approximations \citep{tierney_accurate_1986,raudenbush_maximum_2000} and variational approximations \citep{opper_variational_2009}. Of these, EP has proven to consistently outperform the alternatives in terms of accuracy-computation tradeoff \citep{kuss_assessing_2005,nickisch_approximations_2008}, and thus forms the basis for our proposed improvement. In recent years, Bayesian approaches have proven to be potential alternatives to likelihood based approaches in GLMMs \citep{ferkingstad_improving_2015}. However, such approaches can be sensitive to the choice of prior distribution, and require using extremely computationally expensive MCMC integration. Several analytical approximations exist, but these are often relatively inaccurate in the presence of binary data \citep{fong_bayesian_2010}. Hence, the potential use of Bayesian approaches for inference in GLMMs under case-control ascertainment remains to be explored. Several topics that remain unexplored in this work are GLMMs with multiple variance components, outcome prediction and testing of fixed effects, for which several heuristic methods have been proposed in the statistical genetics literature \citep{hayeck_mixed_2015,weissbrod_accurate_2015,chen_control_2016,jiang_retrospective_2016}. Extending our approach to handle these topics is a potential avenue for future work. \acks{This work was supported by grant 1804/16 from the Israel Science Foundation. This study makes use of data generated by the Wellcome Trust Case Control Consortium. A full list of the investigators who contributed to the generation of the data is available from www.wtccc.org.uk. Funding for the project was provided by the Wellcome Trust under award 076113. We thank Malka Gorfine for fruitful discussions.}
\section{} \label{} \section{} \label{} \part[Theoretical Predictions]{Theoretical Predictions \footnote{M.~Pellen, M.~Zaro (Eds.)}} \input{./WG1/WG1.tex} \input{./WG2/WG2.tex} \input{./WG3/WG3.tex} \input{SR_Summary.tex} \phantomsection \addcontentsline{toc}{part}{Acknowledgements} \input{./SR_Acknowledgements.tex} \renewcommand\leftmark{References} \renewcommand\rightmark{References} \bibliographystyle{./StyleFilesMacros/atlasnote} \cleardoublepage \phantomsection \addcontentsline{toc}{part}{References} \section*{Acknowledgements} The authors would like to acknowledge the contribution of the COST Action CA16108. We would like to thank the Split-FESB team for the great hospitality in Split. Kristin Lohwasser, Hannes Mildner, and Philip Sommer are supported by the European Union Horizon 2020 research and innovation programme under ERC grant agreement No. 715871. Nigel Glover, Raquel Gomez-Ambrosio, Giulia Gonella, Markus Schumacher acknowledge the support of the Research Executive Agency (REA) of the European Union under the Grant Agreement PITN-GA-2012-316704 (``HiggsTools''). Stefan Dittmaier and Christopher Schwan acknowledge support by the state of Baden-W\"urttemberg through bwHPC and the DFG through grant no. INST 39/963-1 FUGG and grant DI 784/3. Benedikt Biedermann, Ansgar Denner, and Mathieu Pellen acknowledge financial support by the German Federal Ministry for Education and Research (BMBF) under contract no. 05H15WWCA1 and the German Research Foundation (DFG) under reference number DE 623/6-1. Andreas Hinzmann gratefully acknowledges funding in the Emmy-Noether program (HI 1952/1-1) of the German Research Foundation DFG. Ilaria Brivio and Michael Trott acknowledge support from the Villum Foundation, NBIA, the Discovery Center at Copenhagen University and the Danish National Science Foundation (DNRF91). Qiang Li is supported in part by the National Natural Science Foundation of China, under Grants No. 11475190, No. 11661141008 and No. 11575005, by the CAS Center for Excellence in Particle Physics (CCEPP). Jan Kalinowski acknowledges support from the Polish National Science Center HARMONIA project under contract UMO-2015/18/M/ST2/00518 (2016-2019). The work of Barbara J\"ager is supported in part part by the Institutional Strategy of the University of T\"ubingen (DFG, ZUK 63) and in part by the BMBF under contract number 05H2015. Alexander Karlberg acknowledges financial support by the Swiss National Science Foundation (SNF) under contract 200020-175595. The work of Marc-André Pleier was supported by the DOE Contract No. DE-SC0012704. \chapter*{Introduction\markboth{Introduction}{Introduction}} \section{Introduction} \label{chapter:intro} In the past years, the study of the vector-boson scattering (VBS) attracted lots of interest in the theory and experimental communities (see \emph{e.g.}\ References~\cite{Rauch:2016pai, Green:2016trm} for recent reviews). If the Standard Model (SM) is a partial description of Nature and its completion happens at energies which are experimentally unreachable, the cross section of VBS processes could increase substantially between the Higgs boson mass and the scale at which new physics mechanisms intervene to restore the unitarity of the process. The study of VBS offers then the unique opportunity to seize this scenario of ``delayed unitarity cancellations" even if the energy scale at which the processes beyond the SM (BSM) enter into play goes beyond our experimental reach, either today or in the next future. This measurement, though, presents several challenges, both on the theory side and on the experimental one. For example difficulties arise, at hadron colliders, because of the complexity of the final state already at tree level, where six fermions arise from the interaction vertex of the initial state partons. Four of them are expected to be the product of vector-boson disintegrations, while two to be remnants of the colliding protons. In this complex environment, the exact calculation of the process needs to be kept as reference to validate any approximations performed to understand the main features of the process. Effective field theory parameterisations of BSM theories have to cope with the multiplex final state, and higher order corrections are not easily calculated either. Experimentally, several processes give rise to signatures similar to the VBS ones, and the events typically span a large angle in rapidity, involving the entire particle detectors in the measurement. Therefore, algorithms need to be optimised to reject backgrounds at best, involving all the sub-elements of each measuring apparatus, and featuring the most advanced data analysis techniques. Only a coherent action in the experimental and theoretical community will grant that all these challenges will be met and that the data delivered by current and future particle colliders will be exploited at best. The VBSCan COST Action is a four-year project, funded by the Horizon 2020 Framework Programme of the European Union, aiming at a consistent and coordinated study of VBS from the phenomenological and experimental points of view, gathering all the interested parties in the high-energy physics community, together with experts of data mining techniques. The community is organised in five working groups, three of which are focussing on the scientific aspects of the collaboration. One is dedicated to the theoretical understanding of the VBS process (WG1), which targets a detailed description of the signal and relative backgrounds in the SM, as well as effective field theory (EFT) modelling of BSM effects. A second one focuses on analysis techniques (WG2), studying the definition of data analysis protocols and performances to maximise the significance of the VBS analyses at hadron colliders, promoting the communication between theory and experiments. A third one fosters the optimal deployment of the studies in the hadron collider experiments data analyses (WG3). The remaining two working groups address the knowledge exchange and cross-activities (WG4), and the implementation of the COST inclusiveness policies (WG5), respectively. The Network is composed of theoretical and experimental physicists from both the ATLAS and CMS experiments, as well as data analysis experts and industrial partners. The first general meeting marked the start of the activities. It happened at the end of June 2017 in Split~\cite{kickoff} and was dedicated to reviews of the data analysis status of the art, as well as of the theoretical and experimental instruments relevant for VBS studies. This report contains a summary of the talks presented \footnote{All the presentations can be found at \url{https://indico.cern.ch/event/629638/}.} divided into sections corresponding to the Network working groups. A review of the theoretical understanding and the parameterisation of the impact of new physics in the VBS domain through effective field theory expansion is given in Section 1; an outline of the existing experimental results at the time of the Split workshop, and the overview of future prespectives are presented in Section 2; we conclude in Section 3 with an overview of the existing techniques for the identification of jets in the ATLAS and CMS experiments, which are the most complicated physics objects to be dealt with in VBS and, therefore, the main focus of WG3. \chapter*{Introduction\markboth{Introduction}{Introduction}} \section{Summary} \label{chapter:summary} The VBSCan COST Action aims at a consistent and coordinated study of VBS from the phenomenological and experimental points of view, gathering all the interested parties in the high-energy physics community, together with experts of data mining techniques. In fact, the complex struture of the process calls for a joint effort to exploit at best the data sets that will be delivered by the LHC in the following years. This will require a close interaction between the experimental community and the theory one, as well as the deployment of the most advanced data analysis techniques to maximise the reach of the ATLAS and CMS collaborations. This document contains the summary of the kickoff meeting of the VBSCan Action, happened in June 2017, and paves the way for the activities of the Network. \section{WG1: theoretical understanding} \subsection{Complete NLO corrections to ${\rm W^+ W^+}$ scattering}\footnote{speaker: M. Pellen} The first VBS process that has been observed during the run~I of the LHC is the same-sign WW production~\cite{Aad:2014zda,Aaboud:2016ffv,Khachatryan:2014sta}. This observation has already been confirmed by a measurement of the CMS collaboration at the 13 TeV run~II~\cite{CMS:2017adb}. In view of the growing mole of data which will be collected by the experiments, and of the consequent reduction of the uncertainties affecting these measurements, precise theoretical predictions become necessary. In that respect next-to-leading order (NLO) QCD and electroweak (EW) corrections to such signatures should be computed. So far, NLO computations have focused on NLO QCD corrections to the VBS process~\cite{Jager:2009xx,Jager:2011ms,Denner:2012dz,Rauch:2016pai} and its QCD-induced irreducible background process~\cite{Melia:2010bm,Melia:2011gk,Campanario:2013gea,Baglio:2014uba,Rauch:2016pai}. No NLO EW corrections had been computed and the NLO QCD computations relied on the so-called VBS approximation. In Reference~\cite{Biedermann:2017bss}, for the first time, all leading order (LO) and NLO contributions to the full ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$ process have been reported\footnote{The $\mathcal{O}{(\alpha^{7})}$ corrections were computed previously in Reference~\cite{Biedermann:2016yds}.}. As the full amplitudes are used, this amounts to computing three LO contributions and four NLO contributions. At LO, the three contributions are the EW process [order $\mathcal{O}{(\alpha^{6})}$], its QCD-induced counterpart [order $\mathcal{O}{(\alpha_{\rm s}^2\alpha^{4})}$] as well as the interference [order $\mathcal{O}{(\alpha_{\rm s}\alpha^{5})}$]. Due to the VBS event selection applied to the final state, the full process is dominated by the purely EW contribution (see Table~\ref{table:LOVBS}). This EW contribution features the proper VBS diagrams but also background diagrams where, for example, the W bosons are simply radiated off the quark lines. \begin{table} \begin{center} \begin{tabular}{l|c|c|c|c} Order & $\mathcal{O}{(\alpha^{6})}$ & $\mathcal{O}{(\alpha_{\rm s}\alpha^{5})}$ & $\mathcal{O}{(\alpha_{\rm s}^2\alpha^{4})}$ & Sum \\ \hline \hline ${\sigma_{\mathrm{LO}}}$ [fb] & $1.4178(2)$ & $0.04815(2)$ & $0.17229(5)$ & $1.6383(2)$ \\ \end{tabular} \end{center} \caption{ Fiducial cross section from Reference~\cite{Biedermann:2017bss} at $\sqrt{s}$=13~TeV at LO for the process ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$, at orders $\mathcal{O}{(\alpha^{6})}$, $\mathcal{O}{(\alpha_{\rm s}\alpha^{5})}$, and $\mathcal{O}{(\alpha_{\rm s}^2\alpha^{4})}$. The sum of all the LO contributions is in the last column and all contributions are expressed in femtobarn. The statistical uncertainty from the Monte Carlo integration on the last digit is given in parenthesis.} \label{table:LOVBS} \end{table} At NLO, the four contributions arise at the orders $\mathcal{O}{(\alpha^{7})}$, $\mathcal{O}{(\alpha_{\rm s}\alpha^{6})}$, $\mathcal{O}{(\alpha_{\rm s}^{2}\alpha^{5})}$, and $\mathcal{O}{(\alpha_{\rm s}^{3}\alpha^{4})}$. An interesting feature is that the orders $\mathcal{O}{(\alpha_{\rm s}\alpha^{6})}$ and $\mathcal{O}{(\alpha_{\rm s}^{2}\alpha^{5})}$ receive both EW and QCD corrections. Thus, at NLO (as opposed to LO) it is not possible to strictly distinguish the EW process from the QCD-induced one. As it can be seen from Table~\ref{table:NLOVBS}, at the level of the fiducial cross section, the largest corrections are the ones of order $\mathcal{O}{(\alpha^{7})}$. These are the NLO EW corrections to the EW processes. \begin{table} \begin{center} \begin{tabular}{l|c|c|c|c|c} Order & $\mathcal{O}{(\alpha^{7})}$ & $\mathcal{O}{(\alpha_{\rm s}\alpha^{6})}$ & $\mathcal{O}{(\alpha_{\rm s}^{2}\alpha^{5})}$ & $\mathcal{O}{(\alpha_{\rm s}^{3}\alpha^{4})}$ & Sum \\ \hline \hline ${\delta \sigma_{\mathrm{NLO}}}$ [fb] & $-0.2169(3)$ & $-0.0568(5)$ & $-0.00032(13)$ & $-0.0063(4)$ & $-0.2804(7)$ \\ \hline $\delta \sigma_{\mathrm{NLO}}/\sigma_{\rm LO}$ [\%] & $-13.2$ & $-3.5$ & $0.0$ & $-0.4$ & $-17.1$ \\ \end{tabular} \end{center} \caption{ NLO corrections from Reference~\cite{Biedermann:2017bss} for the process ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$ at the orders $\mathcal{O}{(\alpha^{7})}$, $\mathcal{O}{(\alpha_{\rm s}\alpha^{6})}$, $\mathcal{O}{(\alpha_{\rm s}^{2}\alpha^{5})}$, and $\mathcal{O}{(\alpha_{\rm s}^{3}\alpha^{4})}$. The sum of all the NLO contributions is in the last column. The contribution $\delta\sigma_{\mathrm{NLO}}$ corresponds to the absolute correction while $\delta \sigma_{\mathrm{NLO}}/\sigma_{\rm LO}$ gives the relative correction normalised to the sum of all LO contributions. The absolute contributions are expressed in femtobarn while the relative ones are expressed in per cent. The statistical uncertainty from the Monte Carlo integration on the last digit is given in parenthesis.} \label{table:NLOVBS} \end{table} This is also reflected in two differential distributions in the transverse momentum for the hardest jet and invariant mass for the two leading jets in Figure~\ref{fig:VBSALL}. At LO, the QCD-induced process as well as the interference are rather suppressed due to the typical VBS event selection (as for the fiducial cross section). This is exemplified in the invariant mass of the two leading jets where, at high invariant mass, the QCD-induced background becomes negligible. At NLO, the bulk of the corrections originates from the large EW corrections to the EW process at order $\mathcal{O}{(\alpha^{7})}$. In particular, they display the typical behaviour of Sudakov logarithms that grow large in the high-energy limit. Note that the contribution from initial-state photon is also shown but is not taken into account in the definition of the NLO predictions. This contribution is rather small and relatively constant in shape over the whole range studied here. Finally, as at NLO it is not possible to isolate the EW production from its irreducible backgrounds, a global measurement of the full process ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$ with all components is desirable. \begin{figure} \includegraphics[width=.5\textwidth,trim={2.2cm 0 0.15cm 0},clip=true]{WG1/WG1_plots/histogram_transverse_momentum_j1} \includegraphics[width=.5\textwidth,trim={2.2cm 0 0.15cm 0},clip=true]{WG1/WG1_plots/histogram_invariant_mass_mjj12} \caption{Differential distributions at $\sqrt{s}$=13~TeV from Reference~\cite{Biedermann:2017bss} for ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$: transverse momentum for the hardest jet~(left) and invariant mass for the two leading jets~(right). The two lower panels show the relative NLO corrections with respect to the full LO in per cent, defined as $\delta_i = \delta \sigma_{i} / \sum \sigma_{\text{LO}}$, where $i=\mathcal{O}{(\alpha^{7})},\mathcal{O}{(\alpha_{\rm s}\alpha^{6})},\mathcal{O}{(\alpha_{\rm s}^2\alpha^{5})},\mathcal{O}{(\alpha_{\rm s}^3\alpha^{4})}$. In addition, the NLO photon-induced contributions of order $\mathcal{O}{(\alpha^{7})}$ is provided separately.} \label{fig:VBSALL} \end{figure} We conclude by stressing that usually EW corrections are particularly sizeable only in phase space regions which are dominated by large scales and hence are suppressed. Therefore the impact at the level of the total fiducial cross section is usually rather limited. This is not the case here where the corrections are already large at the level of the cross section and reach $-17.1\%$ \cite{Biedermann:2016yds}. The origin of these large EW corrections are virtual corrections and in particular the ones corresponding to the insertion of massive vector particles in the scattering process \cite{Biedermann:2016yds}. Hence, large NLO EW corrections are an intrinsic feature of VBS at the LHC. As the EW corrections are particularly large, it might be possible to measure them at a high luminosity LHC, hence probing the EW sector of the SM to very high precision. This is illustrated on the right-hand side of Figure~\ref{fig:VBSEW} where the band represents the estimated statistical error for a high-luminosity LHC collecting $3000~{\rm fb}^{-1}$. \begin{figure} \includegraphics[width=.5\textwidth,trim={2.2cm 0 0.2cm 0},clip=true]{WG1/WG1_plots/histogram_transverse_momentum_j1_ew} \includegraphics[width=.5\textwidth,trim={2.2cm 0 0.2cm 0},clip=true]{WG1/WG1_plots/histogram_rapidity_j1j2_ew} \caption{Differential distributions from Reference~\cite{Biedermann:2016yds} for ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$ including NLO EW corrections (upper panel) and relative NLO EW corrections (lower panel) at $\sqrt{s}$=13~TeV. Left plot: Transverse momentum of the most energetic jet. Right plot: Rapidity distribution of the leading jet pair. The yellow band describes the expected statistical experimental uncertainty for a high-luminosity LHC collecting $3000~{\rm fb}^{-1}$ and represents a relative variation of $\pm 1/\sqrt{N_{\rm obs}}$, where $N_{\rm obs}$ is the number of observed events in each bin.} \label{fig:VBSEW} \end{figure} \subsection{Monte Carlo comparisons for ${\rm W^+ W^+}$ scattering}\footnote{speaker: M. Zaro} \label{sec:MCcomparison} This talk presents some preliminary results of a study which has appeared during the publication of these proceedings~\cite{Ballestrero:2018anz}. In the last decade many codes capable of performing VBS simulations have appeared. Within a network such as VBSCan it is therefore natural to perform a quantitative comparison of these programs, both to cross-validate results and to assess the impact of the different approximations which are used. In fact, already at LO, when considering the process ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$ at order $\mathcal O (\alpha^6)$, the various implementations of VBS simulations are different. They differ, for example, by the (non-)inclusion of diagrams with vector bosons in the $s$-channel or by the treatment of interferences between diagrams. The reason of these differences is that, when typical signal cuts for VBS are imposed, these effects turn out to be small on rates and distributions. In the comparison, the following codes are used: \begin{itemize} \item The program {\sc Bonsay}~\cite{Schwan:2017yy} (contact person: C. Schwan) consists of a general-purpose Monte Carlo integrator and matrix elements taken from several sources: Born matrix elements are adapted from the program {\sc Lusifer} \cite{Dittmaier:2002ap} for the partonic processes, real matrix elements are written by Marina Billoni, and virtual matrix elements by Stefan Dittmaier. One loop integrals are evaluated using the {\sc Collier} library \cite{Denner:2014gla,Denner:2016kdg}. \item {\sc MadGraph5\_aMC@NLO}~\cite{Alwall:2014hca} (contact person: M. Zaro) is a meta-code, automatically generating the source code to simulate any scattering process including NLO QCD corrections both at fixed order and including matching to parton showers. It makes use of the FKS subtraction method~\cite{Frixione:1995ms, Frixione:1997np} (automated in the module {\sc MadFKS}~\cite{Frederix:2009yq, Frederix:2016rdc}) for regulating IR singularities. The computations of one-loop amplitudes are carried out by switching dynamically between two integral-reduction techniques, OPP~\cite{Ossola:2006us} or Laurent-series expansion~\cite{Mastrolia:2012bu}, and TIR~\cite{Passarino:1978jh,Davydychev:1991va,Denner:2005nn}. These have been automated in the module {\sc MadLoop}~\cite{Hirschi:2011pa}, which in turn exploits {\sc CutTools}~\cite{Ossola:2007ax}, {\sc Ninja}~\cite{Peraro:2014cba, Hirschi:2016mdz}, or {\sc IREGI}~\cite{ShaoIREGI}, together with an in-house implementation of the {\sc OpenLoops} optimisation~\cite{Cascioli:2011va}.\\ The simulation of VBS at NLO-QCD accuracy can be performed by issuing the following commands in the program interface: \begin{verbatim} > set complex_mass_scheme #1 > import model loop_qcd_qed_sm_Gmu #2 > generate p p > e+ ve mu+ vm j j QCD=0 [QCD] #3 > output #4 \end{verbatim} With these commands the complex-mass scheme is turned on {\tt \#1}, then the NLO-capable model is loaded {\tt \#2}\footnote{Despite the {\tt loop\_qcd\_qed\_sm\_Gmu} model also includes NLO counterterms for computing electroweak corrections, it is not yet possible to compute such corrections with the current version of the code.}, finally the process code is generated {\tt \#3} (note the {\tt QCD=0} syntax to select the purely-electroweak process) and written to disk {\tt \#4}. Because of some internal limitations, which will be lifted in the future version capable of computing both QCD and EW corrections, only loops with QCD-interacting particles are generated. \item {\sc VBFNLO}~\cite{Arnold:2008rz, Arnold:2011wj, Baglio:2014uba} (contact person: M. Rauch) is a flexible parton-level Monte Carlo for processes with electroweak bosons. It allows the calculation of VBS processes at NLO QCD in the VBF approximation also including the $s$-channel tri-boson contribution, neglecting interferences between the two. Besides the SM, also anomalous couplings of the Higgs and gauge bosons can be simulated. \item The {\sc Powheg-Box}~\cite{Alioli:2010xd,Frixione:2007vw} (contact person: A. Karlberg) is a framework for matching NLO-QCD calculations with parton showers. It relies on the user providing the matrix elements and Born phase space, but will automatically construct FKS subtraction terms and the phase space for the real emission. For the VBS processes all matrix elements are being provided by a previous version of {\sc VBFNLO}~\cite{Arnold:2008rz, Arnold:2011wj, Baglio:2014uba} and hence the approximations used in the {\sc Powheg-Box} are similar to those used in {\sc VBFNLO}. \item The program {\sc Recola+MoCaNLO} (contact person: M. Pellen) is composed of a flexible Monte Carlo program dubbed \mbox{\sc MoCaNLO}~\cite{MoCaNLO} and the general matrix element generator {\sc Recola} \cite{Actis:2012qn,Actis:2016mpe}. To numerically evaluate the one-loop scalar and tensor integrals, {\sc Recola} relies on the {\sc Collier} library \cite{Denner:2014gla,Denner:2016kdg}. These tools have been successfully used for the computation of the full NLO corrections for VBS~\cite{Biedermann:2016yds,Biedermann:2017bss}. \item {\sc Whizard}~\cite{Moretti:2001zz,Kilian:2007gr} (contact person: V. Rothe) is a multi-purpose event generator with the LO matrix element generator {\sc O'Mega}. It provides FKS subtraction terms for any NLO process, while virtual matrix elements are provided externally by {\sc OpenLoops}~\cite{Cascioli:2011va} (alternatively, {\sc Recola}~\cite{Actis:2012qn,Actis:2016mpe} can be used as well). {\sc Whizard} allows to simulate a huge number of BSM models as well, in particular for new physics in the VBS channel in terms of both higher-dimensional operators as well as explicit resonances. \end{itemize} The complete comparison of the codes will be published in a separate work. Here, we present some preliminary results obtained at LO $\mathcal O (\alpha^6)$ and including NLO QCD corrections at fixed-order $\mathcal O (\alpha^6\alpha_s)$, for the process ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$. In Table~\ref{tab:wg1_codes} the details of the various codes are reported. In particular, it is specified whether: \begin{itemize} \item all $s$- and $t/u$-channel diagrams that lead to the considered final state are included; \item interferences between diagrams are included at LO; \item diagrams which do not feature two resonant vector bosons are included; \item the so-called non-factorisable (NF) QCD corrections, that is the corrections where (real or virtual) gluons are exchanged between different quark lines, are included; \item EW corrections to the $\mathcal O (\alpha^5\alpha_s)$ interference are included. These corrections are of the same order as the NLO QCD corrections to the $\mathcal O (\alpha^6$) term. \end{itemize} \begin{table} \footnotesize \begin{tabularx}{\textwidth}{l|X|X|X|X|X} \multirow{1}{*}{Code} & \multicolumn{5}{c}{process content}\\ \cline{2-6} & $\mathcal O(\alpha^6)$ $|s|^2/$ $|t|^2/|u|^2$ & $\mathcal O(\alpha^6)$ interf. & Non-res. & NF QCD & EW corr. to $\mathcal O(\alpha^5\alpha_s)$ \\ \hline \hline {\sc POWHEG} & $t/u$ & No & Yes & No & No \\ {\sc Recola} & Yes & Yes & Yes & Yes & Yes \\ {\sc VBFNLO} & Yes & No & Yes & No & No \\ {\sc Bonsay} & $t/u$ & No & Yes, No virt & No & No \\ {\sc MG5\_aMC} & Yes & Yes & Yes & No virt & No \\ {\sc Whizard} & Yes & Yes & Yes & No & No \\ \end{tabularx} \caption{\label{tab:wg1_codes} Summary of the different properties of the codes employed in the comparison. Among them, the table details whether virtual corrections are included (virt), as well as non-factorisable (NF) QCD correction are present. } \end{table} We simulate VBS production at the LHC, with a center-of-mass energy $\sqrt s = 13 \TeV$. We assume five massless flavours in the proton, and employ the NNPDF~3.0 parton density~\cite{Ball:2014uwa} with NLO QCD evolution (the {\tt lhaid} in LHAPDF6~\cite{Buckley:2014ana} for this set is 260000) and strong coupling constant $\alpha_s( \MZ ) = 0.118$. Since the employed PDF set has no photonic density, photon-induced processes are not considered. Initial-state collinear singularities are factorised with the ${\overline{\rm MS}}$ scheme, consistently with what is done in NNPDF.\\ We use the following values for the mass and width of the massive particles: \begin{alignat}{2} \Mt &= 173.21\GeV, & \quad \quad \quad \Gt &= 0 \GeV, \nonumber \\ \MZOS &= 91.1876\GeV, & \quad \quad \quad \GZOS &= 2.4952\GeV, \nonumber \\ \MWOS &= 80.385\GeV, & \GWOS &= 2.085\GeV, \nonumber \\ M_{\rm H} &= 125.0\GeV, & \GH &= 4.07 \times 10^{-3}\GeV. \end{alignat} The pole masses and widths of the W and Z~bosons are obtained from the measured on-shell (OS) values \cite{Bardin:1988xt} according to \begin{equation} M_V = \frac{\MVOS}{\sqrt{1+(\GVOS/\MVOS)^2}},\qquad \Gamma_V = \frac{\GVOS}{\sqrt{1+(\GVOS/\MVOS)^2}}. \end{equation} The EW coupling is renormalised in the $G_\mu$ scheme \cite{Denner:2000bj} where \begin{equation} G_{\mu} = 1.16637\times 10^{-5}\GeV^{-2}. \end{equation} The derived value of the EW coupling $\alpha$, corresponding to our choice of input parameters, is \begin{equation} \alpha = 7.555310522369 \times 10^{-3}. \\ \end{equation} We employ the complex-mass scheme~\cite{Denner:1999gp,Denner:2005fg} to treat unstable intermediate particles in a gauge-invariant manner.\\ Cross sections and distributions are computed within the following VBS cuts inspired by experimental measurements \cite{Aad:2014zda,Aaboud:2016ffv,Khachatryan:2014sta,CMS:2017adb}: \begin{itemize} \item The two same-sign charged leptons are required to have \begin{align} \ptsub{\Pl} > 20\GeV,\qquad |y_{\Pl}| < 2.5, \qquad \Delta R_{\Pl\Pl}> 0.3\,. \end{align} \item The total missing transverse energy, computed from the vectorial sum of the transverse momenta of the two neutrinos in the event, is required to be \begin{align} \etsub{\text{miss}}=p_T^{miss} > 40\GeV\,. \end{align} \item QCD partons (quarks and gluons) are clustered together using the anti-$k_T$ algorithm~\cite{Cacciari:2008gp} with distance parameter $R=0.4$. Jets are required to have \begin{align} \ptsub{\Pj} > 30\GeV, \qquad |y_{\Pj}| < 4.5, \qquad \Delta R_{\Pj\Pl} > 0.3 \,. \end{align} On the two jets with largest transverse-momentum the following invariant-mass and rapidity-separation cuts are imposed \begin{align} m_{\Pj \Pj} > 500\GeV,\qquad |\Delta y_{\Pj \Pj}| > 2.5. \end{align} \item When EW corrections are computed, real photons and charged fermions are clustered together using the anti-$k_T$ algorithm with radius parameter $R=0.1$. In this case, leptons and quarks mentioned above must be understood as {\it dressed fermions}. \end{itemize} \begin{table}[h!] \centering \begin{tabular}{c|c} Code & $\sigma[\rm{fb}]$ \\ \hline \hline {\sc Bonsay} & $1.5524 \pm 0.0002$ \\ {\sc MG5\_aMC}& $1.547 \pm 0.001$ \\ {\sc POWHEG} & $1.5573 \pm 0.0003$ \\ {\sc Recola+MoCaNLO} & $1.5503 \pm 0.0003$ \\ {\sc VBFNLO} & $1.5538 \pm 0.0002$ \\ {\sc Whizard}& $ 1.5539 \pm 0.0004 $ \end{tabular} \caption{\label{tab:wg1_LOrates} Rates at LO accuracy within VBS cuts obtained with the different codes used in this comparison, for the ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$ process. The quoted uncertainty corresponds to the integration error.} \end{table} \begin{figure}[h!] \centering \includegraphics[width=0.49\textwidth,angle=0,clip=true,trim={0.4cm 2.5cm 0.cm 1.cm}]{WG1/WG1_plots/mjj_LO.pdf} \includegraphics[width=0.49\textwidth,angle=0,clip=true,trim={0.4cm 2.5cm 0.cm 1.cm}]{WG1/WG1_plots/mll_LO.pdf} \caption{\label{fig:wg1_mjj-llLO} Invariant-mass of the two tagging jets (left) and of the two leptons (right), at LO accuracy, computed with the different codes used in this comparison. The inset shows the ratio over {\sc VBFNLO}. } \end{figure} \begin{table}[h!] \centering \begin{tabular}{c|c} Code & $\sigma[\rm{fb}]$ \\ \hline \hline {\sc Bonsay} & $1.3366 \pm 0.0009$ \\ {\sc MG5\_aMC}& $1.318 \pm 0.003$ \\ {\sc POWHEG} & $1.334 \pm 0.0003$ \\ {\sc Recola+MoCaNLO} & $1.317 \pm 0.004 $ \\ {\sc VBFNLO} & $1.3531 \pm 0.0003$ \\ \end{tabular} \caption{\label{tab:wg1_NLOrates} Rates at NLO-QCD accuracy within VBS cuts obtained with the different codes used in this comparison, for the ${\rm p}{\rm p}\to\mu^+\nu_\mu{\rm e}^+\nu_{\rm e}{\rm j}{\rm j}$ process. The quoted uncertainty corresponds to the integration error.} \end{table} In Table~\ref{tab:wg1_LOrates} we report the total rates at LO accuracy obtained with the set-up described above, and in Figure~\ref{fig:wg1_mjj-llLO} we show the results for the tagging jets (left) and lepton-pair (right) invariant-mass distributions. In both cases we show the absolute distributions in the main frame of the figures, while in the inset the ratio over {\sc VBFNLO} is displayed. For both observables we find a relatively good agreement among the various tools, which confirms the fact that contributions from $s$-channel diagrams as well as from non-resonant configurations are strongly suppressed in the fiducial region. The same level of agreement is found for all other differential observables. At NLO, rates show slightly larger discrepancies, as it can be observed in Table~\ref{tab:wg1_NLOrates}. This is most likely due to low dijet invariant-mass configurations, where $s$-channel diagrams and interferences are less suppressed than at LO, because of the presence of extra QCD radiation. We conclude this section by recalling that the results presented must be regarded as preliminary. In the coming months, this work will be enlarged to include comparison of predictions at NLO QCD matched to parton shower or with EW corrections, as well as to study the effect of changing the VBS cuts. The QCD-induced background will also be studied. \subsection{Polarisation of vector bosons}\footnote{speaker: E. Maina} Processes related to new physics could disturb the delicate balance which preserves unitarity in VBS between longitudinally polarised vector bosons, and lead to potentially large enhancements of the VBS rate, making it the ideal process for searches of deviations from the SM and hints of new physics. Developing methods which allow the separation of the different vector polarisations is, therefore, of primary relevance. A new technique has been proposed and applied to the scattering of two W bosons of opposite charge \cite{Ballestrero:2017bxn}: the investigated process is $pp\rightarrow jje^-\mu^+\nu\nu$ at the LHC@13TeV, after VBS-like kinematic cuts. The underlying formalism was established long time ago (see \emph{e.g.}\ References~\cite{Bern:2011ie,Stirling:2012zt}). The polarisation tensor in the W propagator can be expressed in terms of polarisation vectors: \begin{equation} -g^{\mu\nu} + \frac{k^{\mu}k^{\nu}}{M^2} = \sum_{\lambda = 1}^4 \varepsilon^{\mu}_\lambda(k) \varepsilon^{\nu^*}_{\lambda}(k)\,\,. \end{equation} The decay amplitudes of the W depend on its polarisation. In the rest frame of the $\ell\nu$ pair, they are: \begin{equation}\label{eq:longamp} \mathcal{M^D}_0 = ig\,\sqrt{2}E \,\sin\theta \,\,,\quad \mathcal{M^D}_{R/L} = ig\,E \,(1 \pm \cos\theta)e^{\pm i\phi} \,\,, \end{equation} where $0,R,L$ refer to the longitudinal, right, and left polarisations and $(\theta, \phi)$ are the charged lepton angles relative to the boson direction. Hence, each physical polarisation is uniquely associated with a specific angular distribution of the charged lepton. Two issues, however, remain unresolved: \begin{itemize} \item With few exceptions, electroweak boson production processes are described by amplitudes including non resonant diagrams, which cannot be interpreted as production times decay of any vector boson. These diagrams are essential for gauge invariance and cannot be ignored. For them, separating polarisations is simply unfeasible. \item Since the W's are unstable particles, the decays of the individual polarisations interfere among themselves. \end{itemize} In order to define amplitudes with definite W polarisation, it is necessary to devise an accurate approximation to the full result that only involves double resonant diagrams. Reference~\cite{Ballestrero:2017bxn} employed an on-shell projection (OSP) method, similar to the procedure employed for the calculation of EW radiative corrections to W$^+$W$^-$ production in Reference~\cite{Denner:2000bj}. It consists in substituting the momentum of the $\ell\nu$ pair with a momentum on the W mass shell, while the denominator in the W propagator is left untouched. However, this projection is not uniquely defined. In order to have an unambiguous prescription one can choose to conserve: the total four--momentum of the WW system (thus, also $M_{\rm WW}$ is conserved); the direction of the two W bosons in the WW center of mass frame; the angles of each charged lepton, in the corresponding W center of mass frame, relative to the boson direction in the laboratory. This procedure is gauge invariant. If, for instance, one considers a polarised W$^-$ boson and a non-polarised W$^+$ one, once all non double resonant diagrams have been dropped and the resonant ones have been projected, the squared amplitude becomes: \begin{equation}\label{eq:interfpol} \underbrace{|\mathcal{M}|^2}_{\textrm{coherent sum}} = \underbrace{\sum_{\lambda}| \mathcal{M}_{\lambda}|^2}_{\textrm{incoherent sum}} + \underbrace{\sum_{\lambda \neq \lambda'} \mathcal{M}_{\lambda}^{ *}\mathcal{M}_{\lambda'}}_{\textrm{interference terms}}\,, \end{equation} where $\lambda$ is the W$^-$ polarisation. In the absence of cuts on the final state leptons, the interference terms in Equation~\ref{eq:interfpol} cancel upon integration and the projected cross section is simply the sum of singly polarised cross sections. In the W center of mass frame the charged lepton angular distribution is: \begin{equation} \frac{1}{\sigma(X)} \,\,\frac{d\sigma(\theta,X)}{d\cos\theta} \ =\ \frac{3}{8} (1 + \cos\theta)^2 \,f_L + \frac{3}{8} (1 - \cos\theta)^2 \,f_R + \frac{3}{4} \sin^2\theta \, f_0 \,. \label{eq:dcdist} \end{equation} The coherent sum of polarised amplitudes, obtained via direct computation (OSP method), differs by about 1\% from the exact cross section. The differential distributions which do not depend on decay products of the W bosons are equally well described. Other variables, like the transverse momentum or the angle $\phi$ of the electron, show sizeable differences between the exact distributions and the projected ones. The polarisation fractions obtained expanding the full result on the first three Legendre polynomials and through direct computation of singly polarised processes agree. \begin{figure}[!tb] \centering \subfigure{\includegraphics[scale=0.5]{WG1/WG1_plots/thetael_mww300_polOSPvsFUL_lepcut20_withLegendre.pdf}} \qquad \subfigure{\includegraphics[scale=0.5]{WG1/WG1_plots/polfracVSmww_H125_PA_lepcut20.pdf}} \caption{Distribution of $\cos\theta$ in the $W^-$ reference frame (top), polarisation fractions as functions of $M_{\rm WW}$ (bottom). Lepton cuts: $p_T^{e} > 20$ GeV, $|\eta^e| < 2.5$.} \label{fig:distrib_thetal_polfrac_lepcut} \end{figure} The approach proposed in Reference~\cite{Ballestrero:2017bxn} can be applied also when standard acceptance cuts ($p_T^{\ell}>20 \,\,\mathrm{GeV}$ and $|\eta^{\ell}| < 2.5$) are imposed on both charged leptons. In this case, the coherent sum of OSP polarised amplitudes differs from the full result by about 2\%. The interference among polarisations is generally small. The distributions obtained from the incoherent sum of three OSP distributions agree well with the full result for variables which do not depend on the W decay products. The individual polarisations are not affected equally by the cuts. Typically, the cross section for right-- handed W's is reduced the most, followed by the cross section for longitudinally polarised W's. Left--handed W bosons seem to be the least sensitive to acceptance cuts. The full angular distribution, Figure~\ref{fig:distrib_thetal_polfrac_lepcut}~(top), is approximated within a few percent, over the full range, by the sum of the unpolarised distributions. The exact result, shown by the black histogram, however, is not of the form of Equation~\ref{eq:dcdist}. This becomes clear expanding the full result on the first three Legendre polynomials which yields the blue, green, and orange smooth curves in Figure~\ref{fig:distrib_thetal_polfrac_lepcut}: their sum (smooth grey curve) fails to describe the correct distribution, thus the Legendre expansion cannot be applied when lepton cuts are imposed.\\ Computing the polarised cross section for different bins of WW invariant mass, we obtain the polarisation fractions as functions of $M_{\rm WW}$, shown in the bottom panel of Figure~\ref{fig:distrib_thetal_polfrac_lepcut}: even in the presence of cuts, the fraction of longitudinally polarised W$^-$'s is well above 10\%. The fact that the exact distribution is well described by the incoherent sum of the polarised differential distributions allows for a measurement of the polarisation fractions, within a single model, even in the presence of cuts on the charged leptons, using Monte Carlo templates for the fit. This analysis demonstrates that it is possible to study the polarisation of massive gauge bosons in a well defined set-up for VBS processes. The method has been implemented in the code Phantom \cite{Ballestrero:2007xq}. \subsection{Effective field theory for vector-boson scattering}\footnote{speaker: I. Brivio} VBS processes represent a particularly interesting probe of new physics, as they give a unique access to the couplings of gauge bosons. Without committing to a specific model, a convenient instrument for testing experimental data against the presence of BSM effects is that of effective field theories (EFTs). In a EFT approach, the SM is assumed to be the low energy limit of an unknown UV completion, whose typical scale $\Lambda$ is well separated from the electroweak one. In this scenario, the new physics sector is decoupled and its impact onto observables measured at $E\muchless\Lambda$ can be parametrised without specifying any property of the UV completion, by means of a Lagrangian that contains only the SM fields and respects the SM symmetries. New physics effects are organised in a Taylor expansion in $E/\Lambda$, \emph{i.e.}\ they are encoded in an infinite series of gauge-invariant operators ordered by their canonical dimension. This is often called SMEFT (SM EFT) Lagrangian and, neglecting lepton number violating terms, it reads \begin{equation} \mathcal{L}_{\rm SMEFT} = \mathcal{L}_{\rm SM} + \frac{1}{\Lambda^2}\mathcal{L}_{\rm dim-6} + \frac{1}{\Lambda^4}\mathcal{L}_{\rm dim-8} + \dots \,, \end{equation} with the dots standing for higher orders. The SMEFT Lagrangian constitutes a convenient theoretical tool for probing the presence of new physics, as it provides the only systematic parameterisation of its effects that is both well-defined as a field theory and model-independent, in that it can be matched onto any UV completion compatible with the SM symmetries and field content. One can restrict to leading deviations from the SM cutting the series at dimension 6 which reads \begin{equation} \mathcal{L}_{\rm dim-6} = \sum_i C_i \mathcal{O}_i\, . \end{equation} Here $\{\mathcal{O}_i\}$ is a set of gauge-invariant dimension-6 operators that form a complete basis and $\{C_i\}$ are the corresponding Wilson coefficients. Any evidence for a non-zero Wilson coefficient would represent a smoking gun of new physics. Further, knowing which terms are non-vanishing can allow to characterise the new physics states and help designing more effective direct search strategies. A complete basis for dimension-6 terms contains 59 independent structures (+ their Hermitian conjugates) that in complete generality are associated to 2499 independent parameters~\cite{Alonso:2013hga}. This number can be significantly reduced by assuming CP conservation and/or an approximate $U(3)^5$ flavour symmetry. Choosing convenient kinematic cuts in the experimental measurements can also help to restrict the set of relevant operators. Different basis choices for $\mathcal{L}_{\rm dim-6}$ have been proposed in the literature, that are related by equation-of-motion and integration-by-parts transformations. Despite containing different sets of operators (often distributing the effects differently among fermion and boson couplings), all the bases give equivalent parametrisations for physical $S$-matrix elements, \emph{i.e.}\ once a complete process with stable external states is computed. The so-called Warsaw basis~\cite{Grzadkowski:2010es} is sometimes preferred, due to the fact that this was the first complete basis in the literature and that its renormalisation group evolution (RGE) and one-loop renormalisation are completely known~\cite{Jenkins:2013zja,Jenkins:2013wua,Alonso:2013hga,Grojean:2013kd,Alonso:2014zka,Ghezzi:2015vva}. Assuming CP conservation and a $U(3)^5$ flavour symmetry, VBS processes receive corrections from 14 dimension-6 operators. To keep the analysis as general as possible and to have a well-defined IR limit of a given underlying UV sector, these should be all considered simultaneously in the fit. Setting a subset of the Wilson coefficients to zero cannot be done arbitrarily. For example, this may spoil strong correlations hidden in the parametrisation and artificially remove blind directions\footnote{From a theoretical point of view, removing operators arbitrarily is problematic because a given basis is a minimal set in which a vast amount of redundant structures have already been systematically removed. This means that each operator retained in the basis does not simply account for corrections to the couplings that it contains, but also to those contained in other structures related to it \emph{e.g.}\ by equations of motion, that have been removed~\cite{Passarino:2016saj, Passarino:2016pzb}. This happens in a non-intuitive way, which is hard to control a posteriori. For instance in the Warsaw basis some operators affecting triple gauge couplings (TGCs) are traded for a specific combination of fermionic + Higgs terms, which are apparently unrelated to the self-couplings of the gauge bosons.}. In particular, including anomalous fermion couplings may have a significant impact on the analysis, despite the strong constraints imposed by LEP measurements (see \emph{e.g.}\ Reference~\cite{Baglio:2017bfe,Franceschini:2017xkh} for a recent study in the context of W$^+$ W$^-$ production at the LHC). A reduction of the number of parameters may be necessary, nonetheless, for the technical feasibility of the analysis. In this case the removal of some (combination of) operators may be very carefully considered in the future. The possibility of extending the EFT analysis with dimension-8 operators has also been discussed, as these terms can introduce important decorrelation effects between triple and quartic gauge couplings. Although this is an interesting avenue, exploring it in a consistent way is a challenging task due to the extremely large number of parameters involved (considering one fermion generation, there are 895 B-conserving independent operators at $d=8$, among which up to 86 can contribute to quartic gauge couplings (QGCs) and TGCs~\cite{Henning:2015alf}) and to the fact that a complete basis of dimension-8 operators is not available to date. Therefore it is advisable to defer this study to a later stage. A more compelling alternative is rather performing an analysis in the basis of the Higgs EFT (HEFT), for which complete bases have been presented in References~\cite{Buchalla:2013rka,Brivio:2016fzo} (see references therein for further theoretical details and previous phenomenological studies). The HEFT differs from the SMEFT in that it is not constructed with the Higgs doublet, but rather embedding the Goldstone fields into a dimensionless matrix $\mathbf{U}=\exp(i\pi^a\sigma^a/v)$ (analogously to the pion fields in chiral perturbation theory) and treating the physical Higgs as a gauge singlet. The HEFT is more general than the SMEFT and it matches the low energy limit, for instance, of some theories with a strongly interacting electroweak symmetry breaking sector in the UV, such as composite Higgs models. Such an analysis would be highly motivated as the scattering of longitudinal gauge bosons constitutes one of the best probes for UV scenarios matching the HEFT (see \emph{e.g.}\ References~\cite{Delgado:2013hxa,Delgado:2014jda} for recent studies), and they are among the observables that may allow to disentangle it from the SMEFT. The number of relevant Wilson coefficients for VBS in the HEFT (in the CP conserving, $U(3)^5$ symmetric limit) is about 30, which is larger than for the SMEFT but much lower than for including a complete dimension-8 set of operators, which makes this analysis an ideal follow-up to the SMEFT one. One of the main points to be addressed in the EFT analysis is that of its validity: as mentioned above, adopting a dimension-6 parametrisation is theoretically justified only for $\Lambda$ sufficiently larger than the Higgs vev $v$. Namely the impact of dimension-8 terms $\sim (E/\Lambda)^4$ should be roughly smaller than the experimental uncertainty. When analysing experimental data, however, the cutoff scale $\Lambda$ is unknown and the actual energy $E$ exchanged in the process is often inaccessible too. Extracting $E$ is particularly complex for VBS at the LHC, with various scales entering at different stages in the (sub-)process(es). Thus the validity of the EFT cannot be established a priori: at best it can be verified a posteriori, checking that the energy range of the distributions used for the fit does not exceed the lower limit obtained for the cutoff. Some methods of this kind have been discussed in the literature (see \emph{e.g.}\ References~\cite{Busoni:2013lha,Buchmueller:2013dya,Biekoetter:2014jwa,Englert:2014cva,Racco:2015dxa,Contino:2016jqw,Falkowski:2016cxu,Brivio:2017ije,Franceschini:2017xkh}) and could also be applied to VBS studies. If a constraint is found to be incompatible with the validity of the EFT itself, it should be rejected. Attention should be paid to the application of unitarisation methods, that are often employed to correct the divergences obtained in the kinematic distributions of Monte Carlo generated signals. Introducing a damping of the distribution tails, these techniques may alter the behaviour of the Taylor series in a way that does not reflect the correct behaviour of the EFT at high energies (which is indeed divergent where the expansion breaks down) and lead to an incorrect estimation of the constraints. The first step of the EFT-VBS program is an accurate theoretical study of VBS in the SMEFT at dimension-6, which includes agreeing on a given parametrisation, evaluating the necessity of reducing the number of operators considered and testing the capabilities of available theoretical tools (Monte Carlo generators etc). This will be conducted in parallel with a preliminary study of the experimental constraints that could be obtained. One of the primary goals of these studies, in which both theorists and experimentalists will participate, is to define an optimal way to report data (cross sections and differential distributions) that maximises the transparency and versatility of the results. Finally, further avenues are worth exploring in subsequent stages, among which the analysis of the HEFT basis (and later on, if possible, of dimension-8 operators) and a comparison of the impact of VBS processes with that of other data sets, with the possibility of considering a combination of different measurements in the fit. \section{WG2: Analysis techniques} \label{WG2} \subsection{Experimental Overview}\footnote{speaker: N. Lorenzo Martinez} At the time of the workshop, a number of experimental results in VBS have been made available, all of them from the LHC experiments CMS and ATLAS (see Table~\ref{tab:wg2:expres}). The highlight among these results is a measurement from the CMS experiment in the W$^\pm$W$^\pm$ channel, which for the first time observes the VBS contribution in EW processes with a significance above $5\sigma$ (5.5 $\sigma$ observed)~\cite{CMS:2017adb}. It is interesting to notice that apart from this observation only two other evidences have been found, one for the VBS production in the Z$\gamma$ channel and one for the exclusive production $\gamma\gamma\rightarrow WW$. The lack of evidences and observations of the VBS process is a consequence of its very small cross-section (order of 1~fb), but also of the large size of systematic uncertainties coming from background evaluation and the jet reconstruction in the forward region of detectors. \begin{table}[htb] \centering \begin{tabular}{l|c|c|c|c|c|c} Channel & \multicolumn{2}{c|}{$\sqrt{s}$} & \multicolumn{2}{c|}{Luminosity [fb$^{-1}$]} & \multicolumn{2}{c}{Observed (expected) significance} \\ \hline \hline & ATLAS & CMS & ATLAS & CMS & ATLAS & CMS \\ $Z(\ell\ell)\gamma$ & 8 TeV & 8 TeV & 20.2 & 19.7 & 2.0$\sigma$ (1.8$\sigma$)\cite{Aaboud:2017pds} & 3.0$\sigma$ (2.1$\sigma$)\cite{Khachatryan:2017jub} \\ $Z(\nu\nu)\gamma$ & 8 TeV & -- & 20.2 & -- & Only aQGC lim. \cite{Aaboud:2017pds} & -- \\ $W^\pm W^\pm$ & 8 TeV & 8 TeV & 20.3 & 19.4 & 3.6$\sigma$ (2.3$\sigma$)\cite{Aaboud:2016ffv},\cite{Aad:2014zda} & 2.0$\sigma$ (3.1$\sigma$)\cite{Khachatryan:2014sta} \\ $W^\pm W^\pm$ & -- & 13 TeV & -- & 35.9 & -- & 5.5$\sigma$ (5.7$\sigma$)\cite{CMS:2017adb} \\ $W(\ell\nu)\gamma$ & -- & 8 TeV & -- & 19.7 & -- & 2.7$\sigma$ (1.5$\sigma$) \cite{Khachatryan:2016vif} \\ $Z(\ell\ell)Z(\ell\ell)$ & -- & 13 TeV & -- & 35.9 & -- & 2.7$\sigma$ (1.6$\sigma$) \cite{Sirunyan:2017fvv} \\ $W(\ell\nu)Z(\ell\ell)$ & 8 TeV & 8 TeV & 20.2 & 19.4 & Only aQGC lim. \cite{Aad:2016ett} & N/A \cite{Khachatryan:2014sta} \\ $W(\ell\nu)V(qq)$ & 8 TeV & -- & 20.2 & -- & Only aQGC lim. \cite{Aaboud:2016uuk} & -- \\ $\gamma\gamma\rightarrow WW$ & -- & 7 TeV & -- & 5.05 & -- & $\sim 1\sigma$ \cite{Chatrchyan:2013akv} \\ $\gamma\gamma\rightarrow WW$ & 8 TeV & 7+8 TeV & 20.2 & 24.8 & 3.0$\sigma$ \cite{Aaboud:2016dkv} & 3.4$\sigma$ (2.8$\sigma$) \cite{Khachatryan:2016mud} \\ \end{tabular} \caption{\label{tab:wg2:expres} Summary of all published experimental results on VBS processes by final state with the details on luminosity and energy at the center of mass $\sqrt{s}$ used for the measurements. When available both expected and observed significances are provided. Channels for which ``Only aQGC limits'' were studied are indicated in the significance column. } \end{table} By now, a large fraction of the different possible final state boson combinations have been studied by at least one experiment, with the notable absence of the $\gamma\gamma$ and W$^\pm$W$^\mp$ channels in the non-exclusive channel, which are much more complex to reach given the amount of experimental background associated to them. This wide coverage of channels has been shown to be very helpful when constraining aQGCs, as the different channels show varying sensitivity to different operators, as shown in Figures~\ref{fig:EFT} and~\ref{fig:EFT2}. With the larger datasets collected during the second phase of exploitation of LHC (Run2), experiments will be able to reach more easily the VBS phase space and be able to study channels that are not accessible yet. \begin{figure}[h!] \begin{center} \includegraphics[width=\textwidth,scale=1]{WG2/WG2_plots/aQGC_ft} \end{center} \caption{Limits on dimension-8 mixed transverse and longitudinal parameters $f_{M,i}$~\cite{CMSanCouplSumm}.} \label{fig:EFT} \end{figure} \begin{figure}[h!] \begin{center} \includegraphics[width=\textwidth,scale=1]{WG2/WG2_plots/aQGC_fm-2} \end{center} \caption{Limits on dimension-8 transverse parameters $f_{T,i}$~\cite{CMSanCouplSumm}.} \label{fig:EFT2} \end{figure} The presentation and interpretation of results in the VBS studies reviewed during the workshop show some notable differences among the various analyses and experiments. The first difference is on the treatment of interference between electroweak and QCD amplitudes in the predictions for SM cross sections. Most of the time, the interference is derived from the {\sc MadGraph}~\cite{Alwall:2007fs} or {\sc Phantom}~\cite{Ballestrero:2007xq} generators, and is treated as systematic uncertainty on the signal yield, leading to 5-10\% uncertainties. In some cases, on the other hand, the interference is treated as a signal ($W^\pm W^\pm$ for the ATLAS experiment) or neglected when found to be too small (generally below 4\%). Such differences could complicate the combination of results. Even if, with respect to the current level of experimental accuracy, the differences in treatment of interference effects are still small, with the continued data-taking at the LHC a common approach is desirable. Another difference is the framework in which the aQGCs results are interpreted. There are mainly two approaches: one based on the CP-conserving dimension-8 EFT operators that maintains $SU(2)_L \times U(1)_Y$ gauge symmetry of the type $\phi/\lambda{}4$ (for the ATLAS experiment the Z$\gamma$ channel, for the CMS one the Z$\gamma$, W$\gamma$, $W^\pm W^\pm$, and ZZ ones), the other one based on the $\alpha_4$ and $\alpha_5$ coefficients of the two linearly independent dimension-4 operators contributing to aQGCs (for the ATLAS experiment the WZ, $W^\pm W^\pm$, WV semileptonic channels). Even if the conversion between the two frameworks can be done, it can be better for quick comparison and combination to adopt an unique framework. Finally, another difference lies in the treatment of unitarity issues that can arise when the analysis sensitivity to potential aQGCs is not high enough to exclude aQGC values within the energy range where the EFT can be considered unitary. In the $\alpha_4$, $\alpha_5$ framework, the unitarisation condition is imposed with the so-called K-matrix method, within the {\sc WHIZARD}~\cite{Kilian:2007gr} generator. In the dimension-8 EFT operator framework, different approaches are used by ATLAS and CMS, respectively. ATLAS scales the spectra with analytical form factors of the type $f_i/(1+s/\Lambda_{FF^2})^n$, where $n=2$ and $\Lambda_{FF}$ is the cut-off scale. CMS, on its side, provides a validity bound, \emph{i.e.}\ the scattering energy at which the observed limit would violate the unitarity, derived with the {\sc VBFNLO}~\cite{Arnold:2008rz} generator. Some of the results published by the CMS collaboration show that at the LHC scales, already many limits are set in the unitarity unsafe region. Choosing different approaches could severely complicate the combination of different aQGCs limits measurements. Performing such combinations could substantially increase the statistical power of the total dataset and could help to break degeneracies between the effects of different operators which may affect a single channel in similar ways. Providing recommendations to unify the treatments mentioned above is an important goal for WG2. Another lesson learned from the experimental review concerns the modeling of the main background producing the same final state via QCD interactions, which is most of the time very important. To control its impact on the analyses, experiments use control regions (generally low dijet invariant mass) in which they constrain and verify the QCD background normalization and shape. While until now the precision is not enough to constrain these quantities, with more statistics it will become more relevant and QCD modeling issues could become one limiting factor. At the same time, care should be taken in the signal definition as well, because of the presence of the interference between the electroweak and QCD production of the VBS final state. The measurements are currently dominated by statistical uncertainty, due to the very low VBS cross-sections. Then generally follow the uncertainty on the jet energy scale and resolution, the uncertainty on background estimation and theory uncertainties (scales, parton distribution functions). The experimental uncertainties together with the previous point will be important to mitigate in the future: this is one of the goals of WG2 and WG3. Finally, it is interesting to notice the importance of the WV channel, where V is a W or Z boson decaying hadronically. Thanks to advanced jet substructure techniques, this channel brings the tightest constraint on EFT charged parameters, since the boosted topology allows to reach higher energy regimes. The WG3 activities will focus on such techniques as well. \subsection{Common Selection Criteria}\footnote{speaker: X. Janssen} In order to facilitate feasibility studies and similar forward looking analyses in a way that allows for a fair comparison between such studies, it is useful to define a common baseline selection for a fiducial phase space. This baseline criteria aim at selecting the two bosons and the two jets that are found in the final state of VBS processes, without entering yet in a VBS-enriched region (this will be a subject for later discussions in WG1, WG2 and WG3). A single definition cannot serve as the base for every study for the following reasons: \begin{itemize} \item Different VBS channels and different boson decay modes may require notably different selection criteria. \item The experiments don't always have the same geometrical acceptances and efficiencies in the final state objects identification and reconstruction (depends on the calorimeter and muon systems), \item The experiments will evolve due to hardware upgrades planned for the high luminosity phase of the LHC, necessitating different assumptions on the detector acceptance depending on the integrated luminosity used for the forward looking study. \end{itemize} A simple example can be taken from studies of VBS channels with signals large enough to be amenable to a simple ``cut \& count'' style analysis, notably the W$^\pm$W$^\pm$ channel. Based on published results, a phase-space region close to CMS as well as ATLAS studies has been identified (see Table~\ref{tab:wg2:phasespace}). This phase space definition can be used for forward-looking comparison studies within the experiments reaching up to, but excluding the high luminosity phase of the LHC, when experiments will undergo upgrades that will improve their acceptance. \begin{table}[htb] \centering \begin{tabular}{l|l|l|l|l} & electrons & muons & jets & photons \\ \hline \hline $|\eta|$ & $<2.5$ & $<2.4$ & $<4.5$ & $<2.5$ \\ $p_T^{lead.}$ & $>25$~GeV & $>25$~GeV &$>30$~GeV &$>25$~GeV\\ $p_T^{sublead.}$ & $>15$~GeV & $>15$~GeV &&\\ \end{tabular} \caption{\label{tab:wg2:phasespace} Proposed phase space for studies in the $W^+W^-$ channel.} \end{table} These numbers differ from the ones quoted in Section~\ref{sec:MCcomparison}, that were used only for a Monte Carlo comparison purpose of the same VBS process, and then did not need to follow exactly the experimental constraints (for example the current lepton trigger energy thresholds). Further extrapolation into the future suffers from the problem that the design work for the envisioned detector upgrades is not entirely completed yet, so that work in this area is necessarily somewhat speculative. Nevertheless a few general conclusions can be drawn from existing detector design documents~\cite{Contardo:2020886, CMS-PAS-SMP-14-008, Collaboration:2257755, CERN-LHCC-2015-020, ATL-PHYS-PUB-2013-006, ATL-PHYS-PUB-2016-025}. Both experiments plan to improve their trigger systems to keep the thresholds for lepton triggers at a similar level to current running conditions, so that $p_T$ thresholds should remain close to current ones. Both experiments also plan to extend coverage of their respective tracking detectors up to $|\eta|\sim 4$. For studies of channels with very low cross section, branching fraction or efficiency, for example the ZZ$\rightarrow 4\ell$ channel~\cite{Sirunyan:2017fvv}, the phase-space defined above is not suitable, and the analysis is performed in a more inclusive phase-space (by lowering the threshold on the lepton transverse momentum). \subsection{Prospects}\footnote{speaker: M. Kobel} The presentation touched on several major topics interesting for future studies. First among these was the study of the final state bosons polarisation fractions. The scattering of longitudinal vector bosons violates unitarity in the absence of a standard model Higgs boson. By looking at the scattering of electroweak gauge bosons we will be probing the Higgs boson properties. At the LHC by the time of the workshop the $W^\pm W^\pm \rightarrow \ell \nu \ell \nu$ channel was the only one with observation of weak boson scattering. The polarisation is accessible through the angular distributions of the boson decay products in the boson rest frame, but in this particular channel the decay products include two neutrinos, which prevent a straight-forward reconstruction of the boson decay angular distribution. Other channels, which allow for the reconstruction of these angular distributions, on the other hand, suffer from much larger backgrounds. Several potential approaches to address the issue of the missing information were presented. One of them is to use a number of mass-like variables~\cite{Barr:2011,UlrikeMBI:2015} that have shown to be able to distinguish between the $W$ polarisations. Figure~\ref{fig:WW_mass-like} shows the contributions from the different polarization states as a function of two of this potential mass-like variables $M_{1\top}$\footnote{$M_{\circ 1}=\left(\left|\vec{p}_{T}(\ell_1)\right|+|\vec{p}_{T}(\ell_2)|+|\vec{p}_{Tmiss}|\right)^2-\left(|\vec{p}_{T}(\ell_1)|+|\vec{p}_{T}(\ell_2)|+|\vec{p}_{Tmiss}|\right)^2$} and the $M_{\circ 1}$\footnote{$M_{1\top} = \left(\sqrt{M^2_{\ell \ell}+ \vec{p}(\ell_1)+\vec{p}(\ell_2)} + |\vec{p}_{Tmiss}|\right)^2 - \left(\vec{p}(\ell_1)+\vec{p}(\ell_2)+\vec{p}_{Tmiss}\right)^2$}. The use of this variables may allow to extract polarisation information even from final states with two neutrinos and might also be sensitive to new physics effects. Another possibility to access the polarisation will be the use of a regression technique for pulling out the missing information~\cite{Baldi:2015}. In this sense it might be interesting to use a deep learning technique to output the true polarization values~\cite{Searcy:2015apa} using as input measurable quantities like leptons, jets and missing energy ($p_T$, $\eta$, $\phi$ etc.). \begin{figure}[!h] \begin{center} \includegraphics[width=\textwidth,scale=1]{WG2/WG2_plots/WW_mass-like} \end{center} \caption{Contributions from the different polarization states as a function of the mass-like variables $M_{1\top}$ on the left and the $M_{\circ 1}$ on the right~\cite{UlrikeMBI:2015}.} \label{fig:WW_mass-like} \end{figure} As a topic for future studies, the presentation discussed potential information to be gained by measuring the relative cross sections of different VBS channels, in particular channels related by charge symmetry. Beyond the naive expectations related to the valence quark content of the proton, the charge cross section ratio can provide useful constraints on the effects of the underlying parton density functions~\cite{Arrington:2012}. It was shown as well that these ratios can provide sensitivity to BSM processes~\cite{Anger:2014}. As an example Figure~\ref{fig:WZChargeRatio} shows for the $W^{\pm} Zjj$ channel the charge cross section ratio using different unitarization prescriptions and different aQGC parameters. For increasing aQGC parameters the charge ratio increases up to a plateau separating from the SM prediction. \begin{figure}[!h] \begin{center} \includegraphics[width=0.7\textwidth,scale=1]{WG2/WG2_plots/WZChargeRatio} \end{center} \caption{Next-to-leading order fiducial cross section ratios of the electroweak $W^{+}Zjj$ and $W^{-}Zjj$ production in the electroweak $WZjj$ fiducial phase space as a function of different aQGC parameters for fully unitarized and the ununitarized processes~\cite{Anger:2014}.} \label{fig:WZChargeRatio} \end{figure} Additionally, the interpretation of experimental results in terms of BSM effects was discussed. While the EFT approach discussed above has the advantage of being generic and provides a complete description of a very wide range of BSM models, there is also a number of shortcomings. However, anomalous couplings of a size that will cause observable effects at low scales, will commonly violate unitarity at high scales, so that ad-hoc approaches to unitarization are applied which introduce a new model-dependence: the dependence on the unitarization scheme. Beyond this, there is the issue that the EFT is only valid in the approximation that the scale of the observed scattering is much smaller than the scale $\Lambda$. Empirical studies, comparing explicit resonance models to EFTs~\cite{Daniel:2014}, show that the amount by which $\Lambda$ has to exceed the described region of data can be substantial, to the point where visible effects that are accurately described by an EFT would correspond to theories so strongly coupled, that their treatment in perturbation theory would be questionable. A way to avoid these problems would be an interpretation using a simplified resonance parameterization~\cite{Alboteanu:2008,Reuter:2013}, which does not run into unitarity issues, but is by construction less general than the EFT approach. \section{Experimental measurements} \label{WG3} \subsection{Large R jets and boosted object tagging in ATLAS}\footnote{speaker: C. F. Anders} At the high center of mass energies of the Large Hadron Collider even the heaviest known SM particles can be observed with large transverse momenta, in the so called boosted topology. Boosted W, Z, and Higgs bosons, and top quarks that decay to quarks will have highly collimated decay products and can therefore be reconstructed in a single jet with large radius parameter $R$. In ATLAS jets are reconstructed with the anti-k$_t$~\cite{Cacciari:2008gp} algorithm, usually requiring a transverse momentum of $p_T>200$~GeV and a radius parameter of $R=1.0$, and are trimmed~\cite{Krohn:2009th} with the parameters $R_{\mathrm{sub}}=$ 0.2 and $f_{\mathrm{cut}}=$ 5\%. To distinguish signal, \emph{e.g.}\ real W bosons, from QCD induced jet backgrounds one of the main observables is the jet mass, calculated from the jet constituents. In Figure~\ref{fig:jetmass_W} the distribution of the jet mass in data and simulation is shown after a lepton + jet selection that aims at selecting $t\bar{t}$ events. It shows a clear peak at the expected SM W boson mass. Using a further discriminating variable W boson taggers are built that have a fixed signal efficiency of 50\% and reduce the background by a factor of 50. \begin{figure}[!h] \begin{centering} \includegraphics[width=0.48\textwidth]{WG3/WG3_plots/fig_07} \caption{Distribution of the calorimeter jet mass spectrum for the leading-p$_T$ jet, in the ATLAS experiment, in 13~TeV data and MC simulation using trimmed~\cite{Krohn:2009th} anti-k$_t$ R=1.0 jets, with trimming parameters $f_{\mathrm{cut}}=5$\% and $R_{\mathrm{sub}} = 0.2$ in lepton+jets events. The large $R$ jets are required to have $p_T>200$~GeV~\cite{ATLASplots1}.} \label{fig:jetmass_W} \end{centering} \end{figure} Recently, the possibilities of adding more information and exploiting multi-dimensional correlations have been explored by using Boosted Decision Trees (``BDT'') and Deep Neural Networks (``DNN'') to tag boosted hadronically decaying W bosons. Compared to simple 2-variable tagging approaches the multivariate ones perform better, as can be seen in Figure~\ref{fig:MVA}. \begin{figure}[!h] \begin{centering} \includegraphics[width=0.48\textwidth]{WG3/WG3_plots/fig_07c} \caption{Distributions showing comparison of the BDT and DNN taggers performance to a simple W tagger~\cite{ATL-PHYS-PUB-2017-004} in the ATLAS experiment.} \label{fig:MVA} \end{centering} \end{figure} \subsection{Jet substructure techniques for VBS in CMS}\footnote{speaker: A. Hinzmann} Jet identification techniques that make use of jet substructure information are important tools for the measurement of VBS. A brief summary of the existing tools used by the CMS experiment and future prospects for the HL-LHC is given in the following. To probe high WW, ZZ or WZ invariant masses, special jet identification techniques for W and Z bosons decaying to quarks are needed, since for high momentum W and Z bosons, the shower of hadrons originating from the quark anti-quark pair merges into a single large radius jet of particles~\cite{CMS-PAS-JME-16-003, CMS-PAS-JME-14-002, Khachatryan:2014vla}. The maximum angular separation between the quark and anti-quark is given by $\Delta R_{q\bar{q}}=2 m / p_{T}$, where $m$ and $p_T$ are the mass and transverse momentum, respectively, of the W or Z boson. For a W boson with $p_T=1$ TeV, an angular separation of $\Delta R_{q\bar{q}}=0.2$ is expected, which is well below the typical jet size parameter of 0.4 used by CMS. At even higher $p_T=3.5$ TeV, the angular distance $\Delta R_{q\bar{q}}=0.05$ between the decay products of a W boson is even smaller than the granularity of the hadron calorimeter of CMS with cell sizes of $\Delta \eta \times \Delta \phi = 0.087 \times 0.087$ in the barrel region of the detector. CMS thus employs a particle-flow event algorithm~\cite{Sirunyan:2017ulk} to measure jet substructure, that reconstructs and identifies each individual particle with an optimized combination of information from the various elements of the CMS detector, benefiting from spatial and energy resolution of all sub-detectors. \begin{figure}[htb] \begin{center} \includegraphics[width=.35\textwidth]{WG3/WG3_plots/CMS-PAS-JME-16-003_Figure_018-c} \includegraphics[width=.48\textwidth]{WG3/WG3_plots/CMS-PAS-JME-16-003_Figure_014-b} \end{center} \caption{(Left) Softdrop jet mass of boosted W bosons in data and simulated samples of top pair production in the single lepton plus jets final state. (right) Pileup jet MVA discriminator in data and simulation for jets with $|\eta|>3.0$. The studies have been performed by the CMS collaboration~\cite{CMS-PAS-JME-16-003}.} \label{fig:CMSsubstructure} \end{figure} Figure~\ref{fig:CMSsubstructure} (left) shows the main observable used by CMS to distinguish W and Z boson jets from quark and gluon initiated jets, the softdrop jet mass, which is the mass of the jet after iteratively removing soft radiation with the modified mass-drop algorithm~\cite{Dasgupta:2013ihk,Butterworth:2008iy}. This ``softdrop'' algorithm~\cite{Larkoski:2014wba} reduces the mass of quark and gluon jets and improves the mass resolution of W and Z boson jets. In addition, the substructure of the jet is explored with an N-subjettiness~\cite{Thaler:2010tr} ratio that distinguishes the W and Z boson jets composed of two hard subjets from single quark and gluon jets. With this combination of observables, a mistag rate of $\sim1$\% at an efficiency of 50\% is achieved for a broad range of jet transverse momenta from $p_T>200$ GeV up to at least 3.5 TeV. The jet mass and substructure observables are calibrated using a data sample of top pair production in the single lepton final state containing high-$p_T$ W bosons, achieving uncertainties of the order of 1\% on jet mass scale and 10\% on jet mass resolution and jet substructure tagging efficiency, which increase at higher jet $p_T$ where simulation is used for extrapolation. Particles from additional interactions happening in the same pp bunch crossing, called pileup interactions, can significantly distort these observables. CMS thus employs dedicated particle-based pileup removal techniques that correct not only jet momenta, but also jet shape and substructure observables. Charged particles that are identified by the tracking detector to originate from pileup interaction vertices are removed before jet clustering (this procedure is called charged hadron subtraction, {\sc CHS}). For neutral particles a probability weight based on the distribution of surrounding particles following the pileup per particle identification ({\sc PUPPI}) algorithm~\cite{Bertolini:2014bba} is applied to the particle four momenta~\cite{CMS-PAS-JME-14-001}. With these pileup suppression techniques, the performance of W and Z boson identification is constant up to at least 40 pileup interactions, and with the higher granularity tracking detector planned for the HL-LHC, performance is maintained up to 200 pileup interactions. Notable for VBS studies, the longitudinal and transverse polarization of W boson jets can be separated using subjet information, yielding a mistag rate of $\sim$30\% at an efficiency of 50\%~\cite{Khachatryan:2014vla}. Also the two forward jets from VBS require an analysis of their substructure, in order to suppress the background from (possibly overlapping) jets originating from pileup interactions~\cite{CMS-PAS-JME-16-003, CMS-PAS-JME-13-005}. In a scenario of 25 pileup interactions (about half of the pileup expected in Run II of the LHC), without pileup mitigation $\sim$50\% of VBS selected forward jets come from pileup. Since for $|\eta|>3.0$ no tracking information is available to suppress pileup particles and also jet shape differences are difficult to resolve due to coarse calorimeter granularity ($\Delta \eta \times \Delta \phi = 0.175 \times 0.175$), a multivariate analysis (MVA) is needed to distinguish quark jets from pileup and gluon background. Figure~\ref{fig:CMSsubstructure} (right) shows the pileup jet MVA discriminator that allows to achieve a pileup mistag rate of $\sim$30\% at a quark efficiency of 50\%. At the HL-LHC, for which CMS tracking and vertex identification will be extended from $|\eta|<2.5$ to $|\eta|<4$ and a high granularity endcap calorimeter will be installed in the region $1.5<|\eta|<3$, VBS jet identification can rely on the much more powerful {\sc CHS} and {\sc PUPPI} pileup rejection techniques.
\section{Introduction} Of the many billions of galaxies visible in the ``Observable Universe", only those within the local few megaparsecs are amenable to detailed dissection by our telescopes. Within this regards, our own Milky Way (MW) and the neighbouring Andromeda (M31), hold pride of place, providing the opportunity to reveal an unparalleled view of the formation and evolution of large galaxies, directly confronting our cosmological paradigm. Unfortunately, we are buried deep within the MW and thus M31 represents the only large spiral galaxy that can be observed in detail over its entirety, and hence is the focus of numerous observational programs \citep{2004MNRAS.351..117I,2006MNRAS.369..120M,2006ApJ...648..389K,2006MNRAS.369...97H,2009Natur.461...66M,2009ApJ...705.1275G,2012ApJS..200...18D}. \begin{figure*} \centering \includegraphics[width=1.6\columnwidth]{bestmodel_massprofile} \caption{Summary of the recent mass measurements of the M31 galaxy obtained from the different literature sources (as labelled) that use varieties of techniques. The black solid line with grey shade (showing uncertainties) is the mass profile of the galaxy calculated in this paper by modelling the high velocity Planetary Nebulae (PNe). To convert the projected radius $(R)$ to spherical radius $(r)$, an approximate relation $R = 2\,r/\pi$ is assumed \citep{2006eac..book.....S}.} \label{fig:cumumass} \end{figure*} An accurate measurement of the mass profile of the M31 galaxy is fundamental in understanding structural and dynamical properties as well as the formation history of the galaxy. So far several attempts have been made to acquire M31 dynamical mass, which can be classified into five broad categories: \begin{enumerate} \item the rotation curve method \citep{1970ApJ...159..379R,1975ApJ...201..327R,2001ARA&A..39..137S,2006ApJ...641L.109C,2009ApJ...705.1395C}, \item velocity dispersion, virial theorem and tracer mass formalism \citep{1979ApJ...232..699R,1999AJ....118..337C,2000ApJ...537L..91C,2006A&A...456..985G,2008ApJ...674..886L,2010MNRAS.406..264W,2012ApJ...752...45T,2014MNRAS.442.2929V}, \item dynamical model or distribution function fitting \citep{2000ApJ...540L...9E,2000MNRAS.316..929E}, \item tidal stream orbit modelling \citep{2004MNRAS.351..117I,2013MNRAS.434.2779F}, and \item the timing and angular momentum arguments \citep{2012ApJ...753....8V,2014MNRAS.443.1688D,2014ApJ...793...91G}. \end{enumerate} For an exhaustive review of the topic we refer the reader to \cite{2013MNRAS.434.2779F} while in Fig.~\ref{fig:cumumass} we provide a crude visual summary of the range of the galaxy masses taken from recent literature sources. The use of different mass tracers, measurements at range of radii, and differences in the approaches to infer the masses make a fair comparison between the reported measurements a daunting task, nonetheless, a convenient summary of all this work is that the total mass of M31 is still uncertain, estimated to be as low as $\sim 0.7\times10^{12}\,\rm M_\odot$ \citep{2000ApJ...540L...9E,2012A&A...546A...4T} and as high as $\sim2.5\times10^{12}\,\rm M_\odot$ \citep{2000ApJ...540L...9E,2010MNRAS.406..264W} with plethora of measurements in the intermediate range \citep[e.g.][]{2008ApJ...674..886L,2013MNRAS.434.2779F,2014MNRAS.442.2929V}. In the light of the huge scatter in the quoted mass of the galaxy, we seek for an alternative way to improve the measurement. In this, we attempt an independent measurement of the mass of M31 using the escape velocity inferred from the high velocity tracers, the method first proposed by \cite{1990ApJ...353..486L}. The method has remained successful in inferring the escape speed and dynamical mass of the MW, of which the studies by \cite{2007MNRAS.379..755S} and \cite{2014A&A...562A..91P} have remained influential. Both the studies use the same Radial Velocity Experiment \citep[RAVE,][]{2006AJ....132.1645S} survey, albeit different version of the data, of the Galactic disc. While \cite{2007MNRAS.379..755S} study is only limited to the solar neighbourhood, \cite{2014A&A...562A..91P} improves the method further to explore the radial dependence of the Galactic escape velocity. More recently, \cite{2017MNRAS.468.2359W} use the halo sample from the Sloan Digital Sky Survey (SDSS) and were able to extend the method out to the MW centric distance of $50\kpc$. The key reasons for the success of this method are that it is relatively simple and it is empirically powerful as it can estimate the escape velocity from the line-of-sight velocities alone with a similar level of accuracy that can be achieved even when the full phase-space motions are used \citep{1990ApJ...353..486L,1991ARA&A..29..409F}. The method can be easily adopted for the case of the M31 galaxy or for that matter to any galaxy provided we have enough tracers with high velocity residing in a galaxy. In this paper, we first improve on the original method by adding additional features such as providing a Bayesian framework, a proper model to capture potential outliers, provisions for the marginalization of the unknown variables and propagation of uncertainties in the observables, a parametric and non-parametric radial fitting for the escape velocities, and eventually use the formalism to make independent predictions for the mass model of M31. The paper is arranged as follows: In Section~\ref{sec:data}, we introduce our sample of the dynamical tracers of M31, namely Planetary Nebulae (PNe). Section~\ref{sec:hbs} presents Bayesian framework of our modelling scheme. Our results and some model predictions are given in Section~\ref{sec:results}. In Section~\ref{sec:discussion} we discuss our result to provide it a proper cosmological context. Finally, we draw our main conclusions in Section~\ref{sec:conclusion}. Throughout the paper we denote the normal distribution by $\mathcal{N}$ and the uniform distribution by $\mathcal{U}$. The values for the Hubble constant $H_0= 67.8\,\kms\,\mathrm{Mpc}^{-1}$ and the matter density of the universe $\Omega_m=0.308$ are assumed from the \cite{2016A&A...594A..13P}. \section{Data}\label{sec:data} \subsection{Planetary Nebulae (PNe)}\label{sec:pne} With the development of wide-field multi-object spectrographs \citep{2002PASP..114.1234D} there has been a surge in the number of identified PNe, that happens to be one of the brightest and ubiquitous kinematic tracer of nearby galaxies. Currently, the PNe catalogue, constructed by \cite{2006MNRAS.369..120M} and \cite{2006MNRAS.369...97H}, comprises the largest publicly available sample of the dynamical tracers of M31, providing sufficiently ample sample with accurate enough line-of-sight velocity information to allow the dynamical modelling of the galaxy. The data were observed using the Planetary Nebula Spectrograph on the William Herschel Telescope in La Palma and were made publicly available on-line\footnote{\url{http://www.strw.leidenuniv.nl/pns/PNS_public_web/PN.S_data.html}}. In total, the published catalogue provides 3300 emission-line objects of which only 2730 are identified as the PNe, and among the likely-PNe sample roughly $6\%$ of the objects are associated with external galaxies and satellite galaxies within M31. We cull the contaminants and only consider the remaining 2637 PNe that belong to the M31 as our starting sample. A large fraction of these sources lie in the disk of the galaxy, and are close to the dynamical centre of the galaxy and therefore, they have short orbital time meaning they are relatively better phase-mixed in compare to the tracers in the outskirts of the galaxy where the sub-structures are known to dominate \citep{2007ApJ...671.1591I,2009MNRAS.396.1842R,2011ApJ...731..124C,2012ApJ...760...76G,2014ApJ...780..128I,2017MNRAS.464.4858K}. \subsection{Frame of references and coordinate transformations}\label{sec:coord} To begin with, we assume the central properties of the M31 galaxy as the followings: \begin{equation*} \begin{tabular}{lr} \hline \hline \\ Right Ascension & $00^{\text{hh}}42^{\text{mm}}44.33^{\text{ss}}$ \\ Declination & $+41^{\circ}16'07.5''$ \\ Position angle$^1$ & $37.7^{\circ}$\\ Inclination angle$^2$ & $77.5^{\circ}$ \\ Distance from the Sun $(d_\mathrm{M31})^3$ & $780\,\text{kpc}$\\ Heliocentric radial velocity $(v_{\mathrm{M31},\,\mathrm{h}})^4$ & $-301\,\kms$ \\ \\ \hline \end{tabular} \end{equation*} $^1$ \cite{1958ApJ...128..465D}, $^2$ \cite{1992ASSL..176.....H}, $^3$ \cite{1998AJ....115.1916H,1998ApJ...503L.131S,2005MNRAS.356..979M,2012ApJ...758...11C}, and $^4$ \cite{1991rc3..book.....D,2008ApJ...678..187V}. Additionally, we assume the distance of the Sun from the centre of the MW to be $R_0=8.2\,\kpc$ \citep{2016ARA&A..54..529B}. In our modelling exercise we require peculiar velocity $(\vpp)$ of dynamical tracers of the M31 galaxy, that is the observed heliocentric line-of-sight velocity of the tracers ($v_\textrm{h}$) with contributions from the solar-reflex $(U_\odot, V_\odot, W_\odot)$, local-standard of rest ($V_\mathrm{LSR}$) and a heliocentric radial motion of the M31 ($\upsilon_{\textrm{M31},\,\mathrm{h}}$) deducted. This can be done using the following transformation \begin{equation}\label{eqn:vpec} \vpp = (\upsilon_{\mathrm{h}} + T)- (v_{\mathrm{M31},\,\mathrm{h}} + T)\cos \Omega, \end{equation} with \begin{equation}\label{eqn:vpecT} T = U_\odot \cos l \cos b + (V_\odot + V_\mathrm{LSR})\, \sin l \cos b + W_\odot \sin b, \end{equation} where $l$ and $b$ are the Galactic longitude and latitude, and $\Omega$ is the angular separation of the tracer from the centre of the M31. Consistent with the previous dynamical studies \citep[e.g.][]{2000MNRAS.316..929E,2000ApJ...540L...9E,2014MNRAS.442.2929V} we neglect the tangential motion of M31 in our calculation. This approximation is admissible mainly because the tangential motion of M31 with respect to the MW is known to be less than about $17\kms$ \citep{2012ApJ...753....8V} and such small transverse motion would only induce a side-wise motion of a few $\kms$ even for PNe as remote as $\Omega\approx10^{\circ}$, which is negligible compare to our measurement uncertainties. Furthermore, to complete the transformation we assume the values for $U_\odot=11.1\,\kms, V_\odot=12.24\,\kms, W_\odot=7.25\,\kms$ and $V_\textrm{LSR}=239.3\,\kms$ \citep{2010MNRAS.403.1829S}. Similarly, we desire position vector of the tracer in M31 centric coordinate frame. Given equatorial coordinates and the heliocentric distances, we can derive respective Cartesian vectors of the M31 as well as its tracers, using say equations B1-B3 of \cite{2007MNRAS.374.1125M}. Then to transform the Cartesian position vectors of the M31 tracers from the heliocentric frame of reference (denoted by $x_{\star,\mathrm{h}}$) to the M31 centric frame ($x_{\star, \mathrm{M31}}$), we can shift the position vectors to the centre of M31 and rotate them to the M31 centric coordinate system using \begin{equation}\label{eqn:posvec} \mathbf{x}_{\star,\,\mathrm{M31}} = {\cal R}_{\mathrm{h} \to \mathrm{M31}}(\mathbf{x}_{\star,\,\mathrm{h}} - \mathbf{x}_\mathrm{M31,\,h}), \end{equation} where $\mathbf{x}_\mathrm{M31,\,h}$ is the heliocentric Cartesian vector of the M31 galaxy. Here, ${\cal R}_{\mathrm{h} \to \mathrm{M31}}$ is the appropriate rotation matrix and is given by \begin{equation} {\cal R}_{\mathrm{h} \to \mathrm{M31}} = \left( \begin{array}{ccc} 0.770 & 0.324 & 0.549 \\ -0.632 & 0.502 & 0.591 \\ -0.084 & -0.802 & 0.592 \end{array} \right), \end{equation} which is a function of $R_0$ and central coordinates of the M31 galaxy and is calculated using equation B12 of \cite{2007MNRAS.374.1125M}. \begin{figure} \centering \includegraphics[width=1.1\columnwidth]{PNe_Rvlos} \caption{Peculiar velocity distributions of our starting M31 PNe sample, corrected for the M31 systematic motion. (a) Velocity distribution in the conventional on-sky coordinates $\xi$ and $\eta$ in degrees obtained from the gnomonic projection of the tracers Right Ascension and Declination. (b) Distribution of the velocities with red dashed lines showing threshold velocity $\upsilon_\mathrm{min}=\pm300\,\kms$ used to classify the high velocity stars $(|\vpp|>|\upsilon_\mathrm{min}|)$.} \label{fig:vesc_with_vpec} \end{figure} In Fig.~\ref{fig:vesc_with_vpec}(a) we show our starting sample of 2637 PNe on-sky projection colour coded by the peculiar velocity ($\vpp$) whereas in (b) we present distribution of $\vpp$. Here, $\sim85$ stars are seen to be high velocity candidates, depending on the kinematic restriction we apply to classify high velocity stars. The red vertical dashed lines in panel (b) put at $\pm300\,\kms$ show our default choice of the minimum velocity, discussed later in Section~\ref{sec:hbs}. The heliocentric distances to these PNe are unfortunately unknown and typical uncertainty in their line-of-sight velocity $\sigma_\upsilon\sim14\,\kms$ \citep{2006MNRAS.369..120M}. \section{Method: Hierarchical Bayesian Modelling and Accessories}\label{sec:hbs} Below we present an outline of the method that comprises three major steps of our approach: determination of the escape velocity, simple model predictions (derivation of cumulative mass, potential and circular velocity runs) and inference of the virial properties. \subsection{Escape velocity curve modelling} \subsubsection{Setting up the inference}\label{sec:modelsetup} Similar to \cite{1990ApJ...353..486L}, we start by assuming that the high velocity $\{\vpp: |\vpp|>\upsilon_\mathrm{min} \}$ wings of the distribution function of the galaxy follow a power-law distribution and can be expressed as \begin{equation}\label{eqn:df} f(\vpp|r) = f_0\,(v_\textrm{esc}(r) - |\vpp|)^{k+1}, \end{equation} where the normalization, $f_0$, is given by \begin{equation}\label{eqn:fnorm} \begin{aligned} f_0 &= \int_{\upsilon_\mathrm{min}}^{\vesc} f(\vpp|r)\,\text{d}\,\vpp\\ & = \frac{k+2}{(\vesc(r) - \upsilon_\mathrm{min})^{k+2}}. \end{aligned} \end{equation} The $\upsilon_\mathrm{min}$ is a threshold velocity, that is the tracer with the absolute peculiar velocity ($|\vpp|$ in equation~\ref{eqn:vpec}) larger than $\upsilon_\mathrm{min}$ is classified as a high velocity tracer and makes it to our final sample. Generally, in the literature $\upsilon_\mathrm{min}$ is assumed to be $300\,\kms$ \citep{1990ApJ...353..486L,2007MNRAS.379..755S,2014A&A...562A..91P} and we also make it our default choice, however later we investigate the effect of our choice in final results. Similar to \cite{2014A&A...562A..91P} we express the escape speed as a function of the tracer galacto-centric distance $r$, this is to allow us to infer the spatial run of the speed. The specific details about the exact expressions for the $\vesc(r)$ are provided in Section~\ref{sec:escvel}. Some tracers in our data could probably be outliers (possibly unbound stars) and to capture this we adopt an outlier, or background model, $g$, which is given by \begin{equation}\label{eqn:outlier} g(\vpp) = g_0 \mathcal{T}(\vpp|0, \sigma_g, \nu_g), \end{equation} and the model is normalized between $[\upsilon_\mathrm{min}, \infty]$ such that \[g_0 = \frac{1}{2} - \frac{1}{\pi} \tan^{-1} (\upsilon_\mathrm{min}/\sigma_g).\] Here, ${\cal T}$ represents the Student t-distribution, defined by three parameters mean, variance $(\sigma_g^2)$ and degree of freedom $(\nu_g)$, and is known to approximate the ${\cal N}$ distribution as $\nu_g \to \infty$. The ${\cal T}$ distribution is preferable over the ${\cal N}$ distribution as the former has broader wings. We fix $\sigma_g=1000 \kms$ and $\nu_g = 1$, but investigate the effects of these assumptions in our analysis in Section~\ref{sec:results}. Additionally, we like to put a note here that instead of introducing an outlier model and thereby increasing the modelling complexity, one could simply use $3\sigma$ or $5\sigma$ velocity clippings to get rid of outliers at the earlier data curating step. However, given the potential future application of the modelling scheme, as new data arrive, it is therefore sensible to adopt the former, a comparatively superior approach. Equipped with the above models, now we can express a joint probability distribution for the `complete-data' (high velocity and outlier stars) as \begin{equation}\label{eqn:likeli} p(\vpp^t|r) = \eta\,f(\vpp^t|r) + (1-\eta)\, g(\vpp^t), \end{equation} where $\eta$ indicates the outlier fraction, $\vpp^t$ represents the clean, error-free `true' version of the observed peculiar velocity ($\vpp$) and $\sigma_\upsilon$ is the error in $\vpp$. Since $\vpp^t$ is not directly observed, we treat it as a latent variable and assume the errors $\sigma_v$ are Gaussian $({\cal N})$. Finally, we can construct the full likelihood function as \begin{equation}\label{eqn:flikeli} \mathcal{L}(\Theta) = p(\vpp^t|\Theta, r)\,p(r|\alpha)\,\mathcal{N}(\vpp|\vpp^t, \sigma_\upsilon),\\ \end{equation} \begin{figure} \centering \includegraphics[width=1\columnwidth]{plate} \caption{A plate diagram for escape velocity modelling. It shows a graphical illustration of the dependencies between the observed data (grey shaded circle) and model parameters that are kept free (green circle) or fixed (black dot) in the form of a probabilistic graphical model. Orange circles represent the latent parameters.} \label{fig:platediag} \end{figure} Here, $p(r|\alpha)$ is the tracer density profile, which for simplicity we assume to be a single power-law of the galacto-centric distance $r$, that is \begin{equation}\label{eqn:density} p(r|\alpha) \propto r(\mathbf{x}_{\star,\,\mathrm{M31}})^{-\alpha}. \end{equation} The distance, $r$, is a function of the position vector, $\mathbf{x}_{\star,\,\mathrm{M31}}$, that is related to the observables $\mathrm{RA}$ and $\mathrm{Dec}$, and unknown heliocentric distances, $s$, of the tracers via equation~\ref{eqn:posvec}. As we do not know the distance $s$ to the tracers we treat it as a latent parameter. Furthermore, we keep the logarithmic power-law slope $\alpha$ of the tracer density distribution free in the range between 2 and 3.5, in line with recent literature \citep[e.g.][]{2005ApJ...628L.105I,2007ApJ...671.1591I,2011ApJ...739...20C,2012ApJ...760...76G,2014ApJ...780..128I}. \subsubsection{Expressions of Escape Velocity}\label{sec:escvel} We can determine $\vesc$, required for equation ~\ref{eqn:df}, either parametrically, or non-parametrically. In the first approach, we express $\vesc$ in a simple parametric form given by \begin{equation}\label{eqn:vescp} \vesc(r) = \vesco \,(r/r_s)^{-\gamma}, \end{equation} with the scale-length, $r_s$, fixed at $15\kpc$. In the other approach, we assume that the $\vesc(r)$ profile over the radial extent of the data is a linear interpolation of $\upsilon_{\mathrm{esc},j}$ measured at distance $r_j$, where the number of nodes $j$ and corresponding radius $r_j$ are pre-specified. We can express this form for $\vesc$ as the following \begin{equation}\label{eqn:vescnp} \vesc(r) = \mathrm{Interpolate}\,(r_j, \upsilon_{\mathrm{esc},\,j}). \end{equation} Here, the number of nodes $j$ can be viewed as a parameter that provides the radial resolution of $\vesc(r)$. Ideally, $j$ can be kept infinitely large to fully capture the $\vesc$ range of the galaxy. However, for practical purposes we keep $j=6$ and calculate $\{\upsilon_{\mathrm{esc},1},....,\upsilon_{\mathrm{esc},6}\}$ at $r/\kpc=5,10,15,20,25\,\mathrm{and}\,30$; essentially $\vesc(r)$ that enters into equation~\ref{eqn:df} is linear interpolation of $\upsilon_{\mathrm{esc},j}$ at the specified radii $r_j$. The probabilistic graphical model indicating the interdependences of our model parameters and observables are shown in Fig.~\ref{fig:platediag}. Syntax-wise, in the case of the non-parametric approach we replace $\{ \gamma, \vesco \}$ in $\Theta$ with $\{\upsilon_{\mathrm{esc},1},..\upsilon_{\mathrm{esc},j}\}$ while the rest of the steps remain exactly same. \subsubsection{Prior and posterior distributions} Ultimately, in the Bayesian format the posterior distribution that we like to sample can be written as the product of priors and likelihood function as the following \begin{equation}\label{eqn:posterior} p(\Theta, s_t, \vpp^t|\vpp) \propto p(k,\vesco)\, \prod_n \mathcal{L}(\Theta), \end{equation} where product is over all $n$ stars. Here, $\Theta$ represents the set of model parameters $\{ k, \vesco, \gamma, \alpha, \eta \}$ that we aim to constrain, which forms the higher level of our hierarchical model whereas the heliocentric distance $s$ and the error free peculiar velocity $\vpp^t$ of the tracers make the lower level of our model. Here $p(k,\vesco)$ represent priors on $k$ and $\vesco$ parameters. For different Milky-Way like simulated galaxies obtained from cosmological simulations the maximum value of $k$ is found to cover a range between 2.3-4.7 \citep{2014A&A...562A..91P}. Following this we consider $p(k)\in{\cal U}[0,4.7]$ as a prior on $k$. Similarly, for $\vesco$ also we adopt the (less) informed uniform prior, $p(\upsilon_\mathrm{esc,\{j: j \in R\}}/\kms) \in{\cal U}[\upsilon_\mathrm{min},1000]$. Also, we assume flat priors for the remaining parameters, namely, $\eta\in{\cal U}[0,1]$ and $\gamma\in{\cal U}[0,1]$. The heliocentric distance $s/\kpc$ of each tracer is proposed between ${\cal U}[600,1100]$ constrained to follow the density distribution given by equation~\ref{eqn:density} with hyper-prior $\alpha\in{\cal U}[2,3.5]$ and the proposal distribution for $|\vpp^t|/\kms$ is assumed to follow ${\cal U}[\upsilon_\mathrm{min}, |\vpp| + 5\sigma_\upsilon]$. \subsection{Mass modelling}\label{sec:massmodel} With the escape velocity curve next we can derive the mass profile and the virial properties of the galaxy. For this we interpret the escape velocity, $\vesc$, as the minimum speed required to reach some limiting radius, $r_\mathrm{max}$, and relate it to the galactic potential using the relation \begin{equation}\label{eqn:pot} \vesc = \sqrt{2\,|\Phi(r) -\Phi(r_\mathrm{max})|}, \end{equation} where $\Phi$ represents the total potential of the galaxy at a given radius $r$. Similar to \cite{2007MNRAS.379..755S} and \cite{2014A&A...562A..91P}, we also assume $r_\mathrm{max}$ to be thrice that of the virial radius, a sufficiently large distance. Since the gravitational potential is a weak function of radius at such large distances, we expect results are insensitive to small changes in the limiting radius, which is demonstrated to be a valid assumption in \cite{2014A&A...562A..91P}. The above equation can be solved to express $\Phi(r)$ as a function of $\vesc$, which can then be fitted to a mass model of the M31 and the model can be finally used to infer key dynamical properties of the galaxy. But first, we must construct a realistic model of the galaxy. We assume that the two most dominant stellar components of the M31 that is bulge and disk follow \cite{1990ApJ...356..359H} and \cite{1975PASJ...27..533M} type potentials given by \begin{equation}\label{eqn:bulge} \Phi_\mathrm{b} = -\frac{\g\, M_\mathrm{b}}{r + q}\, \end{equation} and \begin{equation}\label{eqn:disk} \Phi_\mathrm{d} = -\frac{\g\, M_\mathrm{d}}{\sqrt{R^2 + \left( a + \sqrt{z^2 + b^2} \right) ^2 }}, \end{equation} respectively, where $M_\mathrm{b}$ and $q$ represent the bulge mass and scale-length, whereas $M_\mathrm{d}$, $a$ and $b$ are for the disk mass, scale-length and scale-height respectively. In addition to the bulge and disk models, we assume the potential of the dark matter halo to have a Navarro-Frenk-White \cite[NFW,][]{1996ApJ...462..563N} profile given by \begin{equation} \Phi_\mathrm{h} = \frac{-\g\,\mvir \ln(1+r\,c/\rvir)}{g(c)\,r}, \end{equation} with $g(c) = \ln(1+c) - c/(1+c)$, and \begin{equation}\label{eqn:rvir} \mvir = \frac{4\,\pi}{3} \rvir^3 \Delta\, \rho_c\, \end{equation} where $\mvir$, $\rvir$ and $c$ denote the virial mass, virial radius and concentration parameter, whereas $\Delta$ is the virial over-density parameter and $\rho_c = 3H_0^2/(8 \pi G)$ is the critical density of the Universe. Generally, two contrasting choices for $\Delta$ are preferred in the literature. First, for the spherical collapse definition $\Delta = \Omega_m \delta_\mathrm{th}$, where $\delta_\mathrm{th}=340$ is an over-density of the dark matter compared to the average matter density \citep{1998ApJ...495...80B}, that is $\Delta\simeq100$. We denote virial mass and radius for this cases as $\mvir$ and $\rvir$ respectively. Second, some literature assume $\Delta=200$, and in this case we label the corresponding mass and radius as $M_{200}$ and $r_{200}$ respectively. The different choices for $\Delta$ is just a matter of convention and there is no correct or incorrect choice. The outer radius and mass enclosed are inversely proportional to the $\Delta$ parameter as for a system with monotonically decreasing density distribution 200 times over-density would occur at smaller radius than 100 times over-density compare to the average matter density of the universe. We report final measurements for both the cases. Finally, we combine the contribution of each component of the galaxy and express the total potential of the galaxy as \begin{equation}\label{eqn:ptot} \Phi_\mathrm{t}(r) = \Phi_\mathrm{b}(r) + \langle \Phi_\mathrm{d} (R, z) \rangle_\theta + \Phi_\mathrm{h}(r). \end{equation} Clearly, the bulge and halo models are spherically symmetric but the disk model is a function of both cylindrical radius ($R = r \sin \theta$) and height above the plane of the disk ($z = r \cos \theta$), and is azimuthally averaged. There are total of seven parameters ($M_{\mathrm{b}}$, $q$, $M_{\mathrm{d}}$, $a$, $b$, $\mvir$, $c$) that completes our bulge-disk-halo model, of which the parameters of the baryonic components are assumed as the following \begin{equation}\label{eqn:bdparams} \begin{tabular}{lr} \\ Bulge scale-length ($q$) & $0.7\,\kpc$, \\ Bulge mass ($M_{\mathrm{b}}$) & $3.4\times 10^{10}\,\rm M_\odot$, \\ Disk scale-length ($a$) & $6.5\,\kpc$, \\ Disk scale-height ($b$) & $0.26\,\kpc$, and \\ Disk mass ($M_{\mathrm{d}}$) & $6.9\times10^{10}\,\rm M_\odot$.\\\\ \end{tabular} \end{equation} The values for scale-lengths and scale-height are adopted from \cite{2001ApJ...557L..39B} and \cite{2006AJ....131.1436F} whereas the masses (in the units of $10^{10}\rm M_\odot$) are taken to be a straight average of the most recent estimates obtained from \citet[][$M_{\mathrm{b}}=3.2,M_{\mathrm{d}}=7.2$, a case with the disk mass-to-light ratio of 3.3]{2006MNRAS.366..996G}, \citet[][$M_{\mathrm{b}}=3.5,M_{\mathrm{d}}=5.8$, inferred from the \emph{Spitzer} 3.6-micron imaging data and $B-R$ color profile]{2008MNRAS.389.1911S}, \citet[][$M_{\mathrm{b}}=2.32,M_{\mathrm{d}}=7.1$, bulge mass is derived from stellar velocity dispersions and the disk mass is determined from stellar population models]{2009ApJ...705.1395C}, \citet[][$M_{\mathrm{b}}=3.8,M_{\mathrm{d}}=8.8$, estimated by fitting bulge, disc, gas and dark matter halo combined model to H\,{\sc i} kinematics data]{2010A&A...511A..89C} and \citet[][$M_{\mathrm{b}}=4.4,M_{\mathrm{d}}=5.7$, derived from fitting the rotation curve]{2012A&A...546A...4T}. The remaining two parameters, $c$ and $\mvir$, that defines the dark matter halo are kept free and constrained via the maximum likelihood analysis. The likelihood function or the total probability of obtaining the data (total potential $(\Phi_t)$ given the model parameters ($c$ and $\mvir$) that we aim to maximise is given by \begin{equation}\label{eqn:lnlikelipot} p(c, \mvir|\Phi(r)) = \prod_j {\cal N}(\Phi_t(r_j)|\Phi(r_j), \sigma_{\Phi(r_j)}). \end{equation} \begin{figure*} \centering \includegraphics[width=1.8\columnwidth]{jointdist} \caption{Joint posterior distributions of the model parameters obtained from the escape velocity and mass modellings, showing the default case, where $\upsilon_\mathrm{min}=300\,\kms$, $r_s=15\,\kpc$, $d_\mathrm{M31}=780\kpc$, $v_\mathrm{M31,h}=-301\kms$, $\sigma_g=1000\,\kms$ and $\nu_g=1$ are assumed. Panel in the inset shows the joint distributions of concentration and virial mass obtained from the mass modelling for the corresponding case, where blue and red distributions show results for two different definitions of the halo masses as labelled.} \label{fig:posteriors} \end{figure*} Having established the Bayesian framework for our problem, we like to ultimately sample the posterior distribution $p(\Theta, s_t, \vpp^t|\vpp)$ (equation~\ref{eqn:posterior}) and $p(c, \mvir|\Phi(r))$ (equation~\ref{eqn:lnlikelipot}). Below we briefly discuss the sampling technique. \subsection{Inference: Metropolis within Gibbs (MWG)} The posterior distribution $p(\Theta, s_t, \vpp^t|\vpp)$ is a function of the set of model parameters $\Theta=\{ \vesco, \gamma, \eta, \alpha, k \}$ or $\Theta=\{ \{ \vesco ..., v_\mathrm{esc,j} \}, \gamma, \eta, \alpha, k \}$ depending on whether we adopt the parametric (equation~\ref{eqn:vescp}) or the non-parametric (equation~\ref{eqn:vescnp}) form for $\vesc$. To sample the posterior we make use of the Metropolis within Gibbs sampler from \textsc{bmcmc}\ software\footnote{\url{https://github.com/sanjibs/bmcmc}} \citep[][]{2017ascl.soft09009S,2017ARA&A..55..213S}. Firstly, using the general Metropolis-Hastings algorithm, a set of values for the model parameters, $\Theta$, is proposed from a proposal distribution. Note the posterior distribution function also explicitly depends on the known unknowns or the latent variables such as the heliocentric distance and true peculiar velocity, $\vpp^t$, of the tracers. We must marginalize the distribution function over these latent variables before we can infer anything about the model parameters. Unfortunately, the expression for the likelihood function given in Equation~\ref{eqn:flikeli} is non-analytical meaning marginalization must be be done numerically. Therefore, we set-up a multi-level (hierarchical) inference where we could directly consider the latent variables as hyper-parameters and sample them for each proposal of the model parameters. For this we employ the \textsc{bmcmc}\ that uses Gibbs sampling method for the marginal inference. In short, given a set of observables, $(\alpha, \delta, {\cal R}, \vpp, \sigma_\upsilon)$, for each tracer along with the proposed values for $(\vpp^t, s)$ and assuming a galacto-centric number density distribution (equation~\ref{eqn:density}), \textsc{bmcmc}\ yields the posterior distributions in the form of walks/chains of the model parameters $\Theta$ and ancillary data such as the log-likelihood value at each walk. We use these chains for the final inference, and also where needed we propagate them to derive physical quantities of the interest. Similarly, in the separate case of fitting the mass model via equation~\ref{eqn:lnlikelipot}, we again make use of the \textsc{bmcmc}. In this case there is no latent variable and hence, \textsc{bmcmc}\ only uses the general Metropolis Hastings algorithm to sample the distribution for the model parameters $\{\mvir, c\}$. For all the undertaken experiments, we run MWG for sufficient autocorrelation time to ensure that the distributions of parameters are stabilized around certain values. We report the median of the probability distribution of a model parameter as its best estimate and $16^{\rm th}$ and $84^{\rm th}$ percentiles of the distribution as measure of its uncertainty. \section{Results}\label{sec:results} \begin{table*} \caption{Estimated model parameters from different analysis. When unspecified, the default values for the model parameters are assumed, i.e., $\upsilon_\mathrm{min}=300\,\kms$, $r_s=15\,\kpc$, $d_\mathrm{M31}=780\kpc$, $\upsilon_{\mathrm{M31,h}}=-301\,\kms$, $\sigma_g=1000\,\kms$ and $\nu_g=1$.} \label{table:pneresult} \begin{tabular}{@{}lccccccc} \hline\\ Cases & Number of& $\vesco$ & $\gamma$ & $\eta$ & $k$ & $\mvir(M_{200})$ & $\rvir(r_{200})$ \\ & PNe &(km\,s$^{-1}$) & & & &$(10^{12}M_\odot)$ & $(\kpc)$\\ \hline\\ \rowcolor{lightgray} Default & 86 & $470^{+40}_{-40}$ & $0.26^{+0.07}_{-0.07}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.1}$($0.7^{+0.1}_{-0.1}$) & $240^{+10}_{-10}$($188^{+7}_{-11}$) \\ \\ $d_{\mathrm{M31}} = 790\,\kpc$ & 86 & $480^{+40}_{-40}$ & $0.27^{+0.07}_{-0.07}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.1}$($0.7^{+0.1}_{-0.1}$) & $240^{+10}_{-10}$($188^{+7}_{-11}$) \\ \\ $d_{\mathrm{M31}} = 770\,\kpc$ & 86 & $470^{+40}_{-40}$ & $0.27^{+0.07}_{-0.07}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.1}$($0.7^{+0.07}_{-0.12}$) & $240^{+10}_{-10}$($187^{+7}_{-10}$) \\ \\ \rowcolor{lightgray} $\upsilon_{\mathrm{M31,h}} = -296\,\kms$ & 87 & $490^{+40}_{-40}$ & $0.25^{+0.07}_{-0.07}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.9^{+0.1}_{-0.2}$($0.8^{+0.1}_{-0.2}$) & $250^{+10}_{-20}$($190^{+10}_{-10}$) \\ \\ \rowcolor{lightgray} $\upsilon_{\mathrm{M31,h}} = -306\,\kms$ & 90 & $470^{+40}_{-40}$ & $0.27^{+0.07}_{-0.07}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.73^{+0.07}_{-0.13}$($0.66^{+0.06}_{-0.11}$) & $240^{+10}_{-10}$($184^{+6}_{-9}$) \\ \\ $\upsilon_\mathrm{min}=290\,\kms$ & 111 & $470^{+40}_{-30}$ & $0.27^{+0.06}_{-0.06}$ & $0.99^{+0.01}_{-0.01}$ & $3^{+1}_{-1}$ & $0.76^{+0.07}_{-0.12}$($0.69^{+0.06}_{-0.11}$) & $239^{+7}_{-12}$($186^{+6}_{-9}$) \\ \\ $\upsilon_\mathrm{min}=310\,\kms$ & 65 & $480^{+40}_{-40}$ & $0.24^{+0.08}_{-0.08}$ & $0.98^{+0.03}_{-0.01}$ & $3^{+1}_{-1}$ & $0.9^{+0.1}_{-0.2}$($0.8^{+0.1}_{-0.2}$) & $250^{+10}_{-20}$($190^{+10}_{-10}$) \\ \\ \rowcolor{lightgray} $r_{s}=14\,\kpc$ & 86 & $480^{+40}_{-40}$ & $0.26^{+0.07}_{-0.08}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.1}$($0.7^{+0.1}_{-0.1}$) & $240^{+10}_{-10}$($189^{+7}_{-11}$) \\ \\ \rowcolor{lightgray} $r_{s}=16\,\kpc$ & 86 & $470^{+40}_{-40}$ & $0.27^{+0.07}_{-0.07}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.1}$($0.7^{+0.07}_{-0.12}$) & $240^{+10}_{-10}$($187^{+7}_{-10}$) \\ \\ $\sigma_g=800\,\kms$ & 86 & $470^{+40}_{-40}$ & $0.25^{+0.08}_{-0.07}$ & $0.98^{+0.03}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.2}$($0.7^{+0.1}_{-0.1}$) & $240^{+10}_{-20}$($189^{+8}_{-11}$) \\ \\ \rowcolor{lightgray} $V_\odot+V_\mathrm{LSR}=240\,\kms$ & 86 & $480^{+40}_{-40}$ & $0.27^{+0.07}_{-0.07}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.1}$($0.71^{+0.07}_{-0.13}$) & $240^{+10}_{-10}$($188^{+7}_{-11}$) \\ \\ \rowcolor{lightgray} $V_\odot+V_\mathrm{LSR}=260\,\kms$ & 86 & $470^{+40}_{-40}$ & $0.27^{+0.07}_{-0.08}$ & $0.99^{+0.02}_{-0.01}$ & $3^{+1}_{-1}$ & $0.8^{+0.1}_{-0.1}$($0.7^{+0.07}_{-0.12}$) & $240^{+10}_{-10}$($187^{+6}_{-10}$) \\ \\ \hline \end{tabular} \medskip \end{table*} In this work, we present new measurements of the escape velocity curve $\vesc(r)$ and the virial properties of the M31 galaxy. Below, we first present these findings, and later discuss the possible systematics that may have crept into our final results due to some assumptions that we had to make. Table~\ref{table:pneresult} summarizes the inferred values of our prime model parameters for multitude of cases. \subsection{Escape velocity: inference} \begin{figure} \centering \includegraphics[width=1\columnwidth]{bestmodel_vesc} \caption{Estimated escape velocity curve using parametric (the black solid line with grey shades) and non-parametric (the blue dot with error bars) approaches with default assumptions (results corresponding to the first row in Table~\ref{table:pneresult}).} \label{fig:vesc} \end{figure} Fig.~\ref{fig:posteriors} shows the joint probability distributions of the model parameters obtained from a parametric fit of $\vesc$ (equation ~\ref{eqn:vescp}) to the high velocity PNe sample assuming `default' values of the parameters and key physical properties of the M31, that is, the threshold velocity $\upsilon_\mathrm{min}=300\,\kms$, $r_s=15\,\kpc$, $d_\mathrm{M31}=780\,\kpc$, $v_\mathrm{M31,h}=-301\,\kms$, $\sigma_g=1000\,\kms$, $\nu_g=1$ and uniform priors on $k$ and $\vesco$; the first row of Table~\ref{table:pneresult} presents the measurements for this case. Using our scheme, we derive an escape velocity curve of the M31 and its logarithmic power-law slope $\gamma=0.26\pm{0.07}$, and measure the escape velocity $\vesco=470\pm{40}\,\kms$ at the galacto-centric radius of $r_s=15\,\kpc$. The parametric run of the $\vesc$ is shown with the black solid line in Fig.~\ref{fig:vesc}, where the grey band around the line shows the associated uncertainties inferred from the posterior distribution. Complementing the parametric approach, we also present the $\vesc$ measurements at the given radii obtained from a non-parametric fit (Equation~\ref{eqn:vescnp}), which is shown in the figure with blue dots and vertical error bars. We see that the non-parametric run has larger uncertainties in comparison to the parametric case, which is expected as the non-parametric case has larger degree of freedom due to the increased number of free parameters compared to the other case \footnote{known as the bias-variance trade-off \citep{eosl}}. Comparing the results from the two different fits, in overall, we see that the results agree within the range of uncertainties and thus, validates our choice for the parametric expression of $\vesc(r)$ (i.e., equation~\ref{eqn:vescp}). However, there are some small systematic differences. For $R<15$ kpc, the non-parametric estimate of $v_{\rm esc}$ is less than the parametric one, while for $R>15$ kpc, opposite is true. The observed H\,{\sc i} rotation curve also shows a similar behaviour with respect to our derived parametric rotation curve (Fig.~\ref{fig:vcirc}). This suggests that our parametric model is not flexible enough to capture the full information available in the data. Since the systematic deviations are small, we only consider the parametric form so as to take advantage of the reduced variance and modelling complexity. Unfortunately, we are unable to constrain some model parameters that were kept free. Importantly, we find that although a large value is preferred for $k$, it remains unconstrained. Unconstrained $k$ parameters due to scant number of high velocity stars have remained the main limitation of the undertaken approach, the fate that has been also shared by the MW high velocity works \citep[][refer to their figures 1 and 7 respectively]{1990ApJ...353..486L,2007MNRAS.379..755S}. Also, we find that the logarithmic number density slope favour shallow $(\alpha = 2)$ over steep model $(\alpha = 3)$ and the outlier fraction $\eta \to 1$ suggesting that effectively only a tiny fraction of our tracers are actually drawn from the background model. \subsection{Virial properties: inference} Here, we first substitute the measured $\vesc(r)$ run into Equation~\ref{eqn:pot} to derive the total potential of the galaxy. Then we fit the three component galaxy model to the derived potential and ultimately estimate the virial properties ($\mvir$ and $c$) of the dark matter halo, keeping the disk and bulge models fixed with Equation~\ref{eqn:bdparams}. This exercise is repeated separately for both the definitions of halo virial over-density. In Fig.~\ref{fig:posteriors} inset we show the joint distributions of the $\mvir(M_{200})$ and $c$ resulted from this exercise in blue(red) contours for a case with `default' values of the model parameters. The marginalized distributions of the halo parameters are shown in the corresponding colours at the top and the right sides of the inset-figure. Unfortunately, the marginalized distributions for the $c$ hint that within a large range of parameter space that we explore i.e. [1,60], we are unable to constrain the $c$ parameter, but we are able to measure the virial masses regardless; our final estimates for the $\mvir\,(M_{200})$ (also shown in the first row in Table~\ref{table:pneresult}) are $0.8\pm{0.1}\,(0.7\pm{0.1})\, \times \, 10^{12}\,\rm M_\odot$. Substituting these values for the masses in equation~\ref{eqn:rvir}, we determine $\rvir\,(r_{200}) = 240\pm{10}\,(188^{+7}_{-11})~\kpc$. As discussed earlier in Section~\ref{sec:massmodel}, we note that the $\mvir$ or $\rvir$ values are always greater than for $M_{200}$ or $r_{200}$. \subsection{Relaxing the assumptions}\label{sec:systematics} Finally, it is instructive to investigate repercussions of relaxing some of the key assumptions on our final results, which we discuss below. \subsubsection*{Effects of change in M31 central properties} Arguably, the heliocentric distance and the line-of-sight velocity of the M31 galaxy are known fairly accurately, with the scatter of roughly $1-2\%$ amongst the literature \citep[e.g.,][]{1991rc3..book.....D,1998ApJ...503L.131S,2005MNRAS.356..979M,2008ApJ...678..187V,2012ApJ...758...11C}. Nevertheless, we systematically shift the adopted value of $d_\mathrm{M31}=780\kpc$ and $\upsilon_\mathrm{M31}= -301\kms$ (Section~\ref{sec:coord}) by $\pm{10}\kpc$ and $\pm 5\kms$ respectively and re-run our analysis to understand their implications on our final results. Rows 2-5 in Table~\ref{table:pneresult} provide the estimates of the main model parameters for these cases. Importantly, we see that while the introduced systematic shifts in the $d_\mathrm{M31}$ have as such negligible effect on our final results, the biases introduced in the $\upsilon_\mathrm{M31}$ alters the $|\mvir|$ estimates by $\sim 8\%$. Furthermore, one of our assumption is that the Sun's total tangential velocity relative to the Galactic centre, $V_\odot+V_\textrm{LSR}$ sums to $251.5\,\kms$ noting that it is approximately equal to the literature averaged value of $248\,\kms$ (for $R_\odot=8.2\kpc$) from \cite{2016ARA&A..54..529B}. Since it is apparent from equations~\ref{eqn:vpec} and \ref{eqn:vpecT} that $\vpp \propto (V_\odot+V_\textrm{LSR})$, we test our choice. For this we adopt two different values $240\,\kms$ and $260\,\kms$ for the Sun's total tangential velocity and re-run the analysis. The measurements are reported in the bottom two rows of the Table~\ref{table:pneresult}, and it is evident that the systematic of $\pm{10}\kms$ in $V_\odot+V_\textrm{LSR}$ does not alter our final estimates, and likewise when we adopt slightly different values of $U_\odot=10\,\kms$ and $W_\odot=7\,\kms$ from \cite{2016ARA&A..54..529B}. The null effect is expected because the $T$ term defined in equation~\ref{eqn:vpecT} that contains these constants, for a small angle $\Omega$, largely cancels out in equation~\ref{eqn:vpec}. \subsubsection*{Effects of change in the threshold velocity ($\upsilon_\mathrm{min}$)} As already described, $\upsilon_\mathrm{min}$ is the lower bound on the magnitude of the $\vpp$ that is used to discriminate the high velocity stars. In our final results, we adopt $\upsilon_\mathrm{min}=300\kms$, which is consistent with the value adopted in the literature \cite{1990ApJ...353..486L,2007MNRAS.379..755S,2014A&A...562A..91P}. However, here we desire to investigate the effect of change in $\upsilon_\mathrm{min}$. For this first we lower the limit and set $\upsilon_\mathrm{min}=290\,\kms$, this increases sample size to 111 as more stars are now classified as high velocity. With the new set of data we find that the $\mvir/10^{12}\,\rm M_\odot$ reduces marginally from 0.8 to 0.76. Second, when we increase the limit and set $\upsilon_\mathrm{min}=310\,\kms$ we find that the sample size reduces to 65 and the $\mvir/10^{12}\,\rm M_\odot$ slightly increases from 0.8 to 0.9. Moreover, we find that relaxing the assumption on $\upsilon_\mathrm{min}$ by $\pm10\,\kms$ leads to insignificant changes in the estimates of other parameters, e.g., $\vesco, \gamma$ as well. Rows 6-7 in Table~\ref{table:pneresult} provide the estimates of the model parameters for these cases. \subsubsection*{Indiscernible effects due to change in some parameters} There are also some model dependencies that we tested but which led to negligible changes in our final results, we briefly discuss them here. Throughout the paper, to model the outliers (Equation~\ref{eqn:outlier}), we assume that the $\sigma_g=1000\kms$ and $\nu_g=1$. We test that adopting $800\kms$ or $1200\kms$ for $\sigma_g$ and/or varying $\nu_g\in[0.5,2]$ effectively do not result any changes in the final $\mvir$ measurements. Similarly, given the large distance between M31-MW ($d_\mathrm{M31}\gg R_0$) the assumed position of the Sun on the MW disk ($R_\odot=8.2\,\kpc$ versus $8.5\,\kpc$) has negligible effect in our analysis. Moreover, we check that our final results are robust to the change of at-least $5\%$ in the upper limits of the prior ranges assumed for $\vesc, \gamma, \vpp^t$ and $\alpha$. Similarly, reducing the lower limit of prior range for $\alpha$ parameter from 2.0 to 1.0 do not modify our final $\mvir$ measurement. A slight change of $\pm{1}\,\kpc$ in the adopted value of escape velocity scale-length $r_s = 15\,\kpc$ has no discernible effect in our mass measurement. Results discussed in this Section are again provided in Table~\ref{table:pneresult}. \section{Discussion}\label{sec:discussion} \subsection{Independent validation} It is important to affirm our mass model with existing independent measurements, which are based on completely different physics and hence, should have different systematics. In summary; \subsubsection*{With the rotation curve} \begin{figure} \centering \includegraphics[width=1.05\columnwidth]{bestmodel_vcirc} \caption{Circular velocity curve of the M31. Blue dots with error bars are measured values by \protect\cite{2009ApJ...705.1395C} using H\,{\sc i} emission line observations whereas grey shade with black solid line is our best estimate.} \label{fig:vcirc} \end{figure} Rotation curves have been derived for the M31 galaxy and the history of the measurement dates back to the seminal works by \cite{1970ApJ...159..379R,1980ApJ...238..471R} that use the optical data from H$\alpha$ emission lines. Similarly, the curves have also been derived from the radio data using H\,{\sc i} or CO observations \citep[e.g.][]{1975ApJ...201..327R,1995A&A...301...68L,2006ApJ...641L.109C,2009ApJ...705.1395C,2010A&A...511A..89C}. It is crucial that we check our model prediction for the rotation curve with these independent measurements. In the spherical approximation and assuming that the gravitational and the centripetal acceleration are equal, we can derive the circular speed $\upsilon_\mathrm{circ}$ from the enclosed mass $M(<r)$ within radius $r$ using \begin{equation} \upsilon_\mathrm{circ}(r) = \frac{\text{G} M(<r)}{r}, \end{equation} where the enclosed mass is derived from the escape velocity curve using the relation \[M(<r) = - \frac{r^2\, \vesc}{G} \frac{\mathrm{d}\vesc}{\mathrm{d}r},\] that with Equation~\ref{eqn:vescp} it reduces to \begin{equation}\label{eqn:cumumass} M(<r) = \frac{\gamma\,r}{\mathrm{G}} \vesc^2. \end{equation} The black line and the shaded grey regions in Fig.~\ref{fig:vcirc} show the derived $\upsilon_\mathrm{circ}$ and its associated uncertainty. Additionally, the blue dots with error bars show an independent measurement of the M31 rotation curve, which is constructed using H\,{\sc i} emission line observations of five fields toward the galaxy; for details refer to \cite{2009ApJ...705.1395C}. Some notable features in the H\,{\sc i} rotation curve are that the velocities assume large values ($~350\kms$) in the innermost regions, which dips at $R=4\kpc$, gradually increases up to $\sim 270\,\kms$ at $\simeq15\kpc$ and remains flat ($230\,\kms$) out to $35\kpc$. The $\upsilon_\mathrm{circ}$ we derive from the modelling of the high speed stars is largely in an agreement with the H\,{\sc i} rotation curve at $R\gtrsim10\,\kpc$, considering the large uncertainty around the $\upsilon_\mathrm{circ}$ estimate that we have. Clearly, the two curves are not in agreement in the inner region, which is expected as the assumption of spherical symmetry of the disk used in deriving our $\upsilon_\mathrm{circ}$ profile. We note that at $r_s=15\,\kpc$ the derived $\vesc$ is a factor of $\sim1.5$ times larger than $\sqrt{2}\upsilon_\mathrm{circ}$. If we look this result in conjunction with equation 14 of \cite{2007MNRAS.379..755S} or reference therein, interestingly, we can infer that there is a significant contribution to the $\vesc$ by mass exterior to $r_s$, demonstrating the presence of a dark halo in M31. Finally, in Figure~\ref{fig:cumumass} we compare our derived cumulative mass profile of the M31 with different literature values and find that they are largely consistent. Exception to these are the M31 mass measurements using the tracer mass formalism \citep{2010MNRAS.406..264W,2014MNRAS.442.2929V}, which could be systematically off as the results are degenerate to the unknown velocity anisotropy parameter of the stellar halo. \subsubsection*{With the prediction of the baryonic Tully-Fisher relation (bTFR)} A fundamental empirical relationship between the total baryonic or stellar mass in galaxies and their maximum rotation velocity exists, which is known as the bTFR and it states that the baryonic mass of the spiral galaxy is proportional to the circular speed to the power of roughly $\sim4$ \citep{2000ApJ...533L..99M,2004PASA...21..412G,2009A&A...505..577T,2012AJ....143...40M,2012MNRAS.424.3123D,2015ApJ...802...18M}. For our assumed value for the total stellar mass of the M31 of $13-20\times10^{10}\rm M_\odot$ and adopting the proportionality constant of $41-53\, \rm M_\odot/(\kms)^{4}$ from \cite{2012AJ....143...40M}, it is predicted that the range of maximum $\upsilon_\mathrm{circ}/\kms\in[222,264]$. This estimate can be directly compared with the $\upsilon_\mathrm{circ}$ at the flat part of the measured rotation curve. Consistent with the bTFR, we also see from Fig.~\ref{fig:vcirc} that our $\upsilon_\mathrm{circ}$ is equal to $250\,\kms$ say at $R\approx15\,\kpc$. \subsubsection*{With the timing and momentum mass arguments} As a final consistency check, we turn to the timing and mass arguments that utilize the relative motion of M31 and the MW to independently estimate the intergalactic mass or effectively the total mass of the Local Group. From this, one can subtract off the MW mass, assuming it is known accurately enough, and directly predict the M31 mass. The fact that M31 is moving radially toward the MW indicates that the mass of these galaxies must be sufficient to overcome cosmic expansion; this is known as the timing mass argument and was first proposed by \cite{1959ApJ...130..705K}. Similarly, the argument that M31 and the MW should have equal and opposite momenta in the barycentric frame of reference of the Local Group is known as the momentum argument \citep{1982MNRAS.199...67E}. Early works based on the timing mass argument, such as \cite{2008MNRAS.384.1459L,2012ApJ...753....8V}, have advocated for consistently high mass, i.e., $\sim5\times10^{12}\rm M_\odot$, for the Local Group, suggesting the M31 mass should be roughly 4-6 times that of the MW. However, more recently improved timing \citep{2014ApJ...793...91G} and momentum \citep{2014MNRAS.443.1688D} mass arguments have downward revised the M31-MW combined mass to $\sim2.5\pm{(0.4-1.5)}\times10^{12}\rm M_\odot$. Our current estimate for the mass of M31, $0.8\pm{0.1}\times10^{12}\rm M_\odot$, coupled with the MW mass of $0.8-1.2\times10^{12}\rm M_\odot$ \citep{2012ApJ...761...98K,2014ApJ...794...59K,2016ARA&A..54..529B}, implies a total mass of $\sim2\times10^{12}\rm M_\odot$, which considering the uncertainties in both measurements lean supports to the downward revised mass of the MW-M31 system. \subsection{Cosmological context} It is essential to understand the properties of Local Group galaxies within a cosmological context. Moreover, observations of the local universe have revealed that the existence of the `MW-Magellanic Clouds-M31'-like trio is cosmologically rare \citep{2012MNRAS.424.1448R}, which is even more scarce if we also seek for the planar configuration of the member satellites \citep{2015ApJ...805...67I}. As our current theory of structure formation the \LCDM\ is getting ever more sophisticated mainly, due to increase in particle resolution, refinement of ``gastro-physics" and hydrodynamics, it is useful to compare its core predictions relevant to our observed results as it would allow us to establish the uniqueness or generality of the Local Group. In the following, we compare our results against two profound theoretical predictions, that is, the concentration--virial mass scaling and the stellar-mass--halo-mass relations. \subsubsection*{Comparison with concentration--virial mass relation} \begin{figure*} \centering \includegraphics[width=0.91\columnwidth]{mvirc_best} \includegraphics[width=1.05\columnwidth]{smhm} \caption{Comparison with the prediction of the \LCDM. Left panel (a) showing concentration ($c$)--virial mass ($\mvir$) joint probability distributions where green contour is our best estimate for the M31 whereas the heat map shows similar relation for the Milky Way taken from \protect\cite{2014ApJ...794...59K}. The black dashed and dash-dotted lines demonstrate a typical $c-\mvir$ relations predicted by \LCDM\ dark matter simulations of \protect\cite{2007MNRAS.378...55M,2008MNRAS.390L..64D} respectively. Right panel (b): Stellar mass--halo mass relation expected from the abundance matching in the dark matter simulation, shown with the black dashed lines and grey shaded regions, where blue marker show the observed positions of the M31, and orange (from \protect\citealt{2014ApJ...794...59K}) and green (from \protect\citealt{2014A&A...562A..91P}) markers show the Milky Way galaxies respectively.} \label{fig:lcdmpred} \end{figure*} A generic prediction of simulated virialized halos in the \LCDM\ cosmology is that its mass and concentration are inversely proportional to each other, and assume a typical relation of $c \propto \mvir^{-0.12}$ for $\log(\mvir/\rm M_\odot) \in [11,13]$ \citep[e.g.][etc.]{2001MNRAS.321..559B,2007MNRAS.378...55M,2008MNRAS.390L..64D,2011MNRAS.416.2539K,2016MNRAS.457.4340K,2016MNRAS.460.1214L}. In Fig.~\ref{fig:lcdmpred}(a), we show the similar $c-\mvir$ relations from two representative fits from simulations \citet[][in black dashed line]{2007MNRAS.378...55M} and \citet[][in black dash-dotted line]{2008MNRAS.390L..64D} to which we overlap the green contours estimated of the M31 from Section~\ref{sec:results}. Similarly, the heat map shows the measured $c-\mvir$ relation for the MW from \cite{2014ApJ...794...59K}. Interestingly, we see that both the galaxies show similar joint distributions although they are derived using different approaches and tracers, and barely overlaps with the \LCDM\ predictions at $2\sigma$ level. \subsubsection*{Comparison with Stellar-Mass--Halo-Mass relation} An another prediction of the \LCDM\ is that the stellar mass of the central galaxy embedded within a dark matter halo is correlated with its host halo mass, and is known as the stellar-mass--halo-mass relation \citep[SHM; e.g.][]{2010ApJ...710..903M,2010ApJ...717..379B,2013ApJ...770...57B}. The SHM can be well defined by a double power law where on the either side of a peak-value the trends drop, and the peak-value corresponds to the knee of the stellar mass function \citep[e.g.][]{2012MNRAS.421..621B,2016MNRAS.457.1308M}. In Fig.~\ref{fig:lcdmpred}b, the black dashed line shows a representative SHM adapted from \cite{2010ApJ...717..379B} near our range of interest, that is $\mvir\sim10^{11-12.5}$. The grey shaded regions represent a typical scatter of $\sim0.3$ dex that the SHM relations in different literature sources are considered to have. The blue dot with error bar marks our measurement for the halo mass of the M31 galaxy, given the disk and bulge combined stellar mass of $1.03\times10^{11}\,\rm M_\odot$ taken from equation~\ref{eqn:bdparams}. Clearly, the estimate for the M31 galaxy is higher than the generic prediction of the \LCDM. Similarly, for a comparison we also show the green dot with error bar that represents the estimated values of dark matter halo ($1.3^{+0.4}_{-0.3}\times 10^{12}\,\rm M_\odot$) and combined baryonic ($6.5\times10^{10}\rm M_\odot$) masses of the MW adopted from \cite{2014A&A...562A..91P}, who uses identical modelling approach to this work. Additionally, in orange dot we show the yet another measurement of the MW mass, but from \cite{2014ApJ...794...59K} that uses the Jeans formalism. Here, we like to leave a cautionary note that the above discussed theoretical predictions are for pure dark matter simulations, and are prone to serious systematics as they do not include baryonic processes such as cooling, star formation, and feedback. For example, the collapse of gas due to cooling leads to adiabatic contraction of the dark matter halo, which increases its concentration. Feedback, on the other hand, can have the reverse effect. Similarly, the relationship between dark matter halos and galaxy stellar masses from the halo abundance matching technique rely on the accuracies of observed stellar mass function, the theoretical halo mass function and techniques of abundance matching. Before we summarize our result, we point out some of the limitations of the escape velocity modelling technique. As highlighted in \cite{2014A&A...562A..91P} and \cite{2007MNRAS.379..755S} the conceptual underpinning of the technique that the density of stars in the velocity space tend to zero as velocity $\to \vesc$ (equation~\ref{eqn:df}) is fairly weak. While in some analytic equilibrium models of stellar systems such as \cite{1983MNRAS.202..995J} and \cite{1990ApJ...356..359H} there is a non-zero probability density of finding a star all the way to the $\vesc$ and zero beyond that boundary; in other models, for example, the King-Michie model \citep{1966AJ.....71...64K}, the density is zero even at speed $< \vesc$. Moreover, it is unknown whether the phase space distribution of the galactic tracers extend to $\vesc$ and also whether it depends on the stellar types (for example, PNe versus regular stars). Any truncation in the velocity distribution will result an underestimation of the true $\vesc$, meaning in such case our estimates of $\vesc$ and thus $\mvir$ would only provide the lower limits of the true values. As such this will naturally solve the disagreement we note earlier between the theoretical stellar-mass--halo-mass relation and the observed value of the M31. Being said that \cite{2007MNRAS.379..755S} notes that for a set of galaxies obtained from cosmological simulations \citep{2006MNRAS.365..747A} the level of truncation in the velocity distributions of the stellar component are found to be less than 10 per cent, and it seems not to have any systematic effect in their recovered $\vesc$. \section{Summary}\label{sec:conclusion} In this work, we establish a Hierarchical Bayesian framework in which we improve the method by \cite{1990ApJ...353..486L}, and for the first time report an independent measurement of the radial dependence of the escape velocity curve, $\vesc(r)$, and a new estimate of the dynamical mass of the M31 galaxy. We employ the Planetary Nebulae (PNe) data by \cite{2006MNRAS.369..120M} and \cite{2006MNRAS.369...97H} as it is currently the only publicly available tracer of the M31 disk with ample sample size and accurate enough line-of-sight velocity measurements. After removing the marked extragalactic contaminants and satellite members, and stars with $|\vpp|\leqslant\upsilon_\mathrm{min}$, the final sample we analyse in our main results comprises 86 PNe. From this high velocity sample of the PNe along-with our modelling scheme, we first estimate the $\vesc(r)$ and then derive the total galactic potential to which finally we fit a three component (bulge, disk and dark matter halo) mass model and infer the virial properties of the galaxy. In the end, to provide a proper cosmological context, we discuss how the newly estimated mass of the M31 compares to the mass of our own the MW and also, to some generic predictions of the \LCDM\ such as the concentration-virial mass relation, the stellar mass--halo mass relation and the stellar Tully-Fisher relation. Following are the main conclusions of the paper: \begin{enumerate} \item We present both the parametric and non-parametric $\vesc(r)$ profiles of the M31. Assuming the minimum threshold velocity $\upsilon_\mathrm{min}=300\kms$, the criteria set to classify high velocity stars, we measure $\vesc =470\pm{40}\kms$ at the galacto-centric radius of $r=15\kpc$. Additionally, we are also able to constrain the logarithmic power-law slope of the profile $\gamma=0.26\pm{0.07}$. \item Using the derived $\vesc(r)$ profile and assuming spherical symmetry we are able to further derive the cumulative mass profile, the circular velocity profile as well as the total potential of the galaxy. To the derived potential we then fit a three component model of the galaxy --- Hernquist bulge, Miyamoto-Nagai disk and NFW dark matter halo model, of which we adopt the bulge and disk structural models from the literature \citep{2001ApJ...557L..39B,2012A&A...546A...4T} and keep them fixed. It is important to keep these components fixed because we only restrict our fitting to the derived potentials at $r\gtrsim10\,\kpc$ as we observe that only in this regime the derived circular velocity profile is in a good agreement with the rotation curve constructed from the H\,{\sc i} measurements. However, we keep the two defining parameters that is the concentration and the virial mass of the dark matter halo free. We find that assuming literature averaged bulge mass of $3.4 \times 10^{10}\,M_\odot$ and disk mass of $6.9 \times 10^{10}\,M_\odot$, the derived potential of the galaxy is best fit by a halo of the virial mass $\mvir(M_{200})=0.8\pm{0.1}\,(0.7\pm{0.1}) \times 10^{12} \rm M_\odot$ that corresponds to the virial radius of $240\pm{10}\,(188^{+7}_{-11})\,\kpc$. \item We find that the circular velocity curve ($\upsilon_\mathrm{circ}$) between $10\lesssim R/\kpc<35$ estimated by us is in good agreement with an independent prediction from the H\,{\sc i} observation. Similarly, the value of $\upsilon_\mathrm{circ}=250\,\kms$ we obtain at the flat part of the curve at $R\simeq15\kpc$ is consistent with the prediction from the baryonic Tully-Fisher relation. We note that the measured $c-\mvir$ joint distributions and the observed locus of the stellar and dark matter halo masses of the M31 barely agree to the theoretical predictions at only $2\sigma$ levels. \end{enumerate} \section*{Acknowledgements} We like to thank the referee Prof. Mathias Steinmetz for a constructive and insightful report. {\it Software credit}: {\sc astropy} \citep{astropy}, {\sc bmcmc} \citep{2017ascl.soft09009S}, {\sc chainconsumer} \citep{chainconsumer}, {\sc daft} \url{https://github.com/dfm/daft}, {\sc ipython} \citep{ipython}, {\sc matplotlib} \citep{matplotlib}, {\sc numpy} \citep{numpy}, {\sc pandas} \citep{pandas} and {\sc scipy} \citep{scipy}. \bibliographystyle{mnras}
\section{Introduction} Quantum systems unavoidably interact with their surrounding environments, and such quantum systems are referred to as open quantum systems. The dynamics of open quantum systems can be classified into two categories, Markovian and non-Markovian regimes, depending on whether the system is \emph{weakly} coupled to a \emph{memoryless} environment~\cite{BP02:book,GZ00:book}. For open quantum systems coupled weakly to a memoryless environment, a well-established treatment known as a \emph{Markovian Lindblad master equation} can be used to approximate the time evolution of such systems~\cite{GKS76:jmp,L76:cmp,GZ00:book,BP02:book}. Typical examples of such systems include quantum optical systems~\cite{WM08:book}. Let us consider a continuous-variable open quantum system with $ N$ degrees of freedom, the time evolution of which is described by the following Markovian Lindblad master equation (we set $\hbar=1$) \begin{align} \label{appendixA_proof_chapter1__MME} \frac{d}{d t}\hat{\rho} &=-i[\hat{H},\; \hat{\rho}] +\sum\limits_{j=1}^{K}\mathfrak{D}[\hat{c}_{j}]\hat{\rho}, \end{align} where $\hat{H}=\hat{H}^{\ast}$ is the system Hamiltonian, $\hat{c}=\begin{bmatrix} \hat{c}_{1} &\hat{c}_{2} &\cdots &\hat{c}_{K} \end{bmatrix}^{\top}$ is the vector of Lindblad operators, $K$ is the number of decoherence channels, and $\mathfrak{D}[\hat{c}_{j}]\hat{\rho} \triangleq \hat{c}_{j}\hat{\rho}\hat{c}_{j}^{\ast}-\frac{1}{2}\left(\hat{c}_{j}^{\ast}\hat{c}_{j}\hat{\rho}+ \hat{\rho} \hat{c}_{j}^{\ast}\hat{c}_{j} \right)$. Let $(\hat{q}_{j},\hat{p}_{j})$, $j=1,\cdots,N$, be the position and momentum operators of this quantum system. They satisfy the canonical commutation relation \begin{align} \label{chapter1_commutation 1} \left[\hat{x}, \hat{x}^{\top}\right] =\hat{x}\hat{x}^{\top}-\left(\hat{x}\hat{x}^{\top}\right)^{\top} =i\Sigma, \quad \Sigma\triangleq\begin{bmatrix} 0 & I_{N}\\ -I_{N} &0 \end{bmatrix}, \end{align} where $\hat{x}\triangleq\begin{bmatrix}\hat{q}_{1} &\cdots &\hat{q}_{N} &\hat{p}_{1} &\cdots &\hat{p}_{N}\end{bmatrix}^{\top}$. Suppose that the system Hamiltonian $\hat{H}$ is quadratic in the quadrature operators; i.e., $\hat{H}=\frac{1}{2}\hat{x}^{\top}M\hat{x}$, with $M=M^{\top}\in \mathbb{R}^{2N \times 2N}$. Also, suppose that the vector of Lindblad operators $\hat{c}$ is linear in the quadrature operators; i.e., $\hat{c} = C \hat{x}$, with $C\in \mathbb{C}^{K \times 2N}$. An open quantum system with such $\hat{H}$ and $\hat{c}$ is said to be a linear open quantum system. For a linear open quantum system, given Gaussian initial conditions, the Lindblad master equation~\eqref{appendixA_proof_chapter1__MME} will always have a Gaussian state as its solution. The mean value of $\hat{x}$ is given by $\langle\hat{x}\rangle=\begin{bmatrix}\tr(\hat{x}_{1} \hat{\rho} ) &\tr(\hat{x}_{2} \hat{\rho} ) &\cdots & \tr(\hat{x}_{2N} \hat{\rho} )\end{bmatrix}^{\top}$ and the covariance matrix of $\hat{x}$ is given by $V=\frac{1}{2}\langle \triangle\hat{x}{\triangle\hat{x}}^{\top}+(\triangle\hat{x}{\triangle\hat{x}}^{\top})^{\top} \rangle$, where $ \triangle\hat{x}=\hat{x}-\langle \hat{x} \rangle$. The moment evolution equations for $\langle \hat{x} \rangle$ and $V$ are given by \begin{numcases}{} \frac{d\langle\hat{x}\rangle}{dt}=\mathcal{A}\langle\hat{x}\rangle, \label{chapter1_meanfunction} \\ \frac{dV}{dt}=\mathcal{A}V+V\mathcal{A}^{\top}+\mathcal{D}, \label{chapter1_covfunction} \end{numcases} where $\mathcal{A}=\Sigma\left(M+\im(C^{\dagger}C)\right)$ is the \emph{drift matrix} and $\mathcal{D}=\Sigma\re(C^{\dagger}C)\Sigma^{\top}$ is the \emph{diffusion matrix}. The result described in~\eqref{chapter1_meanfunction} and \eqref{chapter1_covfunction} and the explicit formulas for $\mathcal{A}$ and $\mathcal{D}$ can be found in several references; e.g., \cite{WD05:prl,DW05:QELSC,WM10:book,J14:book,GLS16:CP}. Recent results on the preparation of pure Gaussian states are all built upon the moment evolution equations \eqref{chapter1_meanfunction} and \eqref{chapter1_covfunction}~\cite{KY12:pra,Y12:ptrsa,IY13:pra,MWPY14:msc,NPF16:pra,MWPY18:auto,MPW17:scl,MWPY16:cdc2,MWPY17:jpa,M17:thesis}. To the best of the authors' knowledge, the explicit derivation for~\eqref{chapter1_meanfunction} and \eqref{chapter1_covfunction} from the master equation~\eqref{appendixA_proof_chapter1__MME} cannot be found in the literature. So we provide a detailed derivation here for the interested reader. \section{Derivation of Moment Evolution Equations} For simplicity, we consider a linear open quantum system with a single decoherence channel ($K=1$). The extension of the derivation to multiple decoherence channels is straightforward; see Remark~\ref{remark}. We will first calculate the evolution equation for the mean vector $\langle\hat{x}\rangle$. Then, we will calculate the evolution equation for the covariance matrix $ V $. \\ \noindent\emph{\textbf{Part 1: Calculation of the Evolution Equation for the Mean Vector $\langle\hat{x}\rangle$}} Let $\hat{x}_{\ell}$ be the $\ell$th entry of the column vector $\hat{x}$. Then the commutation relations~\eqref{chapter1_commutation 1} can be written as \begin{align*} [\hat{x}_{\ell},\;\hat{x}_{m}]=\hat{x}_{\ell}\hat{x}_{m}-\hat{x}_{m}\hat{x}_{\ell}= i\Sigma_{\ell m}, \end{align*} where $\Sigma_{\ell m}$ is the $(\ell,m)$ entry of the matrix $\Sigma$. The equation of motion for $\langle\hat{x}_{\ell}\rangle$ is \begin{align} \frac{d\langle\hat{x}_{\ell}\rangle}{dt}&=\tr\left(\hat{x}_{\ell}\frac{d \hat{\rho} }{d t}\right) = \tr\bigg(\hat{x}_{\ell}\left(-i[\hat{H},\; \hat{\rho}]+\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg) \notag \\ &=\tr\bigg(\hat{x}_{\ell}\left(-i[\hat{H},\; \hat{\rho}]\right)\bigg)+\tr\bigg(\hat{x}_{\ell}\left(\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg). \label{appendixA_proof_chapter1_meanfunction_evolution} \end{align} Let us calculate $\tr\bigg(\hat{x}_{\ell}\left(-i[\hat{H},\; \hat{\rho}]\right)\bigg)$ and $\tr\bigg(\hat{x}_{\ell}\left(\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg)$ separately. First, we have \begin{align} &\tr\bigg(\hat{x}_{\ell}\left(-i[\hat{H},\hat{\rho}]\right)\bigg)=-\frac{i}{2}\tr\bigg(\hat{x}_{\ell}\hat{x}^{\top}M\hat{x}\hat{\rho}-\hat{x}_{\ell} \hat{\rho} \hat{x}^{\top}M\hat{x} \bigg)\notag \\ =&-\frac{i}{2}\tr\bigg(\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\hat{x}_{\ell}\hat{x}_{j}\hat{x}_{k}\hat{\rho} - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\hat{x}_{\ell} \hat{\rho} M_{jk}\hat{x}_{j}\hat{x}_{k} \bigg)\notag \\ =&-\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} M_{jk} \tr \bigg(\hat{x}_{\ell}\hat{x}_{j}\hat{x}_{k}\hat{\rho} - \hat{x}_{j}\hat{x}_{k} \hat{x}_{\ell} \hat{\rho}\bigg) \notag \\ =&-\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\tr\bigg(\left(\hat{x}_{j}\hat{x}_{\ell}+i\Sigma_{\ell j}\right)\hat{x}_{k}\hat{\rho} - \hat{x}_{j}\hat{x}_{k} \hat{x}_{\ell} \hat{\rho}\bigg)\notag \\ =&-\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk} \tr\bigg(i\Sigma_{\ell j}\hat{x}_{k}\hat{\rho} +\hat{x}_{j}\hat{x}_{\ell}\hat{x}_{k}\hat{\rho} - \hat{x}_{j}\hat{x}_{k} \hat{x}_{\ell} \hat{\rho}\bigg)\notag \\ =&-\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\tr\bigg(i\Sigma_{\ell j}\hat{x}_{k}\hat{\rho} +i\Sigma_{\ell k}\hat{x}_{j}\hat{\rho}\bigg)\notag \\ =&\frac{1}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} M_{jk}\langle \hat{x}_{k}\rangle+ \frac{1}{2} \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell k} M_{jk} \langle \hat{x}_{j}\rangle \notag \\ =&\frac{1}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} M_{jk}\langle \hat{x}_{k}\rangle+ \frac{1}{2} \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell k} M_{kj} \langle \hat{x}_{j}\rangle \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} M_{jk}\langle \hat{x}_{k}\rangle\notag \\ =&\Sigma_{\ell :}M \langle \hat{x}\rangle, \label{appendixA_proof_chapter1_meanfunction_evolution1} \end{align} where $\Sigma_{\ell :}$ denotes the $\ell$th row of $\Sigma$. Second, we have \begin{align} &\tr\bigg(\hat{x}_{\ell}\left(\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg)=\tr\bigg(\hat{x}_{\ell}\Big(\hat{c}\hat{\rho}\hat{c}^{\ast}-\frac{1}{2} \hat{c}^{\ast}\hat{c}\hat{\rho}- \frac{1}{2} \hat{\rho} \hat{c}^{\ast}\hat{c} \Big)\bigg)\notag \\ =&\tr\bigg(\hat{c}^{\ast}\hat{x}_{\ell} \hat{c}\hat{\rho}-\frac{1}{2} \hat{x}_{\ell} \hat{c}^{\ast}\hat{c}\hat{\rho}- \frac{1}{2}\hat{c}^{\ast}\hat{c} \hat{x}_{\ell} \hat{\rho} \bigg)\notag \\ =&\tr\bigg(\Big(\sum\limits_{j=1}^{2N} C_{j}^{\ast}\hat{x}_{j}\Big)\hat{x}_{\ell}\Big(\sum\limits_{k=1}^{2N} C_{k}\hat{x}_{k}\Big)\hat{\rho}-\frac{1}{2}\hat{x}_{\ell}\Big(\sum\limits_{j=1}^{2N} C_{j}^{\ast}\hat{x}_{j}\Big) \Big(\sum\limits_{k=1}^{2N} C_{k}\hat{x}_{k}\Big)\hat{\rho} \notag\\ &-\frac{1}{2} \Big(\sum\limits_{j=1}^{2N} C_{j}^{\ast}\hat{x}_{j}\Big)\Big(\sum\limits_{k=1}^{2N} C_{k}\hat{x}_{k}\Big) \hat{x}_{\ell} \hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}C_{j}^{\ast}C_{k} \tr\bigg( \Big( \hat{x}_{j}\hat{x}_{\ell}\hat{x}_{k} -\frac{1}{2}\hat{x}_{\ell} \hat{x}_{j}\hat{x}_{k}-\frac{1}{2} \hat{x}_{j} \hat{x}_{k} \hat{x}_{\ell} \Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg( \Big(\frac{i}{2}\Sigma_{j\ell}\hat{x}_{k}+\frac{i}{2}\Sigma_{\ell k}\hat{x}_{j}\Big)\hat{\rho} \bigg)\notag \\ =&\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \Sigma_{j\ell}\langle \hat{x}_{k}\rangle +\frac{i}{2} \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k}\Sigma_{\ell k}\langle \hat{x}_{j}\rangle\notag \\ =&- \frac{i}{2} \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} C_{j}^{\ast}C_{k} \langle \hat{x}_{k}\rangle+\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell k}C_{k} C_{j}^{\ast} \langle \hat{x}_{j}\rangle\notag \\ =&- \frac{i}{2} \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} C_{j}^{\ast}C_{k} \langle \hat{x}_{k}\rangle+\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j}C_{j} C_{k}^{\ast} \langle \hat{x}_{k}\rangle\notag \\ =&\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j}\left( - C_{j}^{\ast}C_{k}+ C_{j}C_{k}^{\ast} \right) \langle \hat{x}_{k}\rangle\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \im \left( C_{j}^{\ast}C_{k} \right) \langle \hat{x}_{k}\rangle \notag \\ =& \Sigma_{\ell :}\im\left(C^{\dagger}C \right) \langle \hat{x}\rangle. \label{appendixA_proof_chapter1_meanfunction_evolution2} \end{align} Here $C_{j}\in\mathbb{C}$ denotes the $j$th entry of the row vector $C$. Substituting~\eqref{appendixA_proof_chapter1_meanfunction_evolution1} and~\eqref{appendixA_proof_chapter1_meanfunction_evolution2} into~\eqref{appendixA_proof_chapter1_meanfunction_evolution}, we obtain \begin{align} \frac{d\langle\hat{x}_{\ell}\rangle}{dt}&=\Sigma_{\ell :}\left(M + \im\left(C^{\dagger}C \right) \right) \langle \hat{x}\rangle. \label{appendixA_proof_chapter1_meanfunction_evolution3} \end{align} The evolution equation \eqref{chapter1_meanfunction} follows immediately from \eqref{appendixA_proof_chapter1_meanfunction_evolution3}. \\\vspace{0.4cm} \noindent\emph{\textbf{Part 2: Calculation of the Evolution Equation for the Covariance Matrix $V$}} \vspace{0.4cm} Suppose $V_{\ell m}$ is the $(\ell,m)$ entry of the covariance matrix $V$. Then we have \begin{align*} &V_{\ell m}\notag\\ =&\frac{1}{2}\langle\triangle\hat{x}_{\ell}\triangle\hat{x}_{m}+\triangle\hat{x}_{m}\triangle\hat{x}_{\ell}\rangle \\ =&\frac{1}{2}\langle(\hat{x}_{\ell}-\langle\hat{x}_{\ell}\rangle)(\hat{x}_{m}-\langle\hat{x}_{m}\rangle)+(\hat{x}_{m}-\langle\hat{x}_{m}\rangle)(\hat{x}_{\ell}-\langle\hat{x}_{\ell}\rangle)\rangle \\ =&\frac{1}{2}\left(\langle\hat{x}_{\ell}\hat{x}_{m}+ \hat{x}_{m}\hat{x}_{\ell} \rangle -\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle-\langle\hat{x}_{m}\rangle\langle\hat{x}_{\ell}\rangle \right)\\ =&\frac{1}{2}\langle\hat{x}_{\ell}\hat{x}_{m}+ \hat{x}_{m}\hat{x}_{\ell} \rangle -\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle. \end{align*} Therefore, the equation of motion for $V_{\ell m}$ is given by \begin{align} &\frac{dV_{\ell m}}{dt}\notag\\ =&\frac{1}{2}\frac{d\langle\hat{x}_{\ell}\hat{x}_{m}+ \hat{x}_{m}\hat{x}_{\ell} \rangle}{dt} -\frac{d\left(\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle\right)}{dt}\notag\\ =&\frac{1}{2} \tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\frac{d\hat{\rho}}{dt}\bigg)-\frac{d\left(\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle\right)}{dt}\notag\\ =&\frac{1}{2}\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(-i[\hat{H},\hat{\rho}]\right)\bigg)\notag\\ &+ \frac{1}{2}\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg) -\frac{d\left(\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle\right)}{dt}.\label{appendixA_proof_chapter1_covariance_evolution} \end{align} Let us calculate $\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(-i[\hat{H},\hat{\rho}]\right)\bigg)$, $\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg)$ and $\frac{d\left(\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle\right)}{dt}$ separately. First, we have \begin{align} &\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(-i[\hat{H},\hat{\rho}]\right)\bigg)\notag \\ =&-\frac{i}{2}\tr\bigg(\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)M_{jk}\hat{x}_{j}\hat{x}_{k}\hat{\rho} \notag\\ &- \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right) \hat{\rho} M_{jk}\hat{x}_{j}\hat{x}_{k} \bigg)\notag \\ =&-\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk} \tr\bigg(\hat{x}_{\ell}\hat{x}_{m}\hat{x}_{j}\hat{x}_{k}\hat{\rho}+\hat{x}_{m}\hat{x}_{\ell}\hat{x}_{j}\hat{x}_{k}\hat{\rho} \notag \\ & - \hat{x}_{\ell}\hat{x}_{m} \hat{\rho} \hat{x}_{j}\hat{x}_{k} - \hat{x}_{m}\hat{x}_{\ell} \hat{\rho} \hat{x}_{j}\hat{x}_{k} \bigg) \notag \\ =&-\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\tr \bigg(\hat{x}_{\ell}\hat{x}_{m}\hat{x}_{j}\hat{x}_{k}\hat{\rho}+\hat{x}_{m}\hat{x}_{\ell}\hat{x}_{j}\hat{x}_{k}\hat{\rho} \notag \\ & - \hat{x}_{j}\hat{x}_{k} \hat{x}_{\ell}\hat{x}_{m} \hat{\rho} - \hat{x}_{j}\hat{x}_{k} \hat{x}_{m}\hat{x}_{\ell} \hat{\rho} \bigg) \notag \\ =&-\frac{i}{2}\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk} \tr\bigg(\hat{x}_{\ell}\hat{x}_{m}\hat{x}_{j}\hat{x}_{k}\hat{\rho}+\left(\hat{x}_{\ell}\hat{x}_{m}+i\Sigma_{m \ell}\right)\hat{x}_{j}\hat{x}_{k}\hat{\rho}\notag \\ & - \hat{x}_{j}\hat{x}_{k} \hat{x}_{\ell}\hat{x}_{m} \hat{\rho} -\hat{x}_{j}\hat{x}_{k}\left(\hat{x}_{\ell}\hat{x}_{m}+i\Sigma_{m \ell}\right) \hat{\rho} \bigg) \notag \\ =&-i\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk} \tr \bigg(\hat{x}_{\ell}\hat{x}_{m}\hat{x}_{j}\hat{x}_{k}\hat{\rho}- \hat{x}_{j}\hat{x}_{k} \hat{x}_{\ell}\hat{x}_{m} \hat{\rho} \bigg) \notag \\ =&-i\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\tr \bigg(\hat{x}_{\ell}\left(\hat{x}_{j}\hat{x}_{m}+i\Sigma_{mj}\right)\hat{x}_{k}\hat{\rho}- \hat{x}_{j}\left(\hat{x}_{\ell}\hat{x}_{k}+i\Sigma_{k\ell}\right) \hat{x}_{m} \hat{\rho} \bigg)\notag \\ =&-i\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk} \tr \bigg(\hat{x}_{\ell}\hat{x}_{j}\hat{x}_{m}\hat{x}_{k}\hat{\rho}- \hat{x}_{j}\hat{x}_{\ell}\hat{x}_{k} \hat{x}_{m} \hat{\rho} \notag\\ & +i\Sigma_{mj} \hat{x}_{\ell}\hat{x}_{k} \hat{\rho} -i\Sigma_{k\ell} \hat{x}_{j} \hat{x}_{m} \hat{\rho} \bigg) \notag \\ =&-i\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk} \tr \bigg(\hat{x}_{\ell}\hat{x}_{j}\left(\hat{x}_{k}\hat{x}_{m}+i\Sigma_{mk}\right)\hat{\rho}- \left( \hat{x}_{\ell}\hat{x}_{j} +i\Sigma_{j\ell} \right) \hat{x}_{k} \hat{x}_{m} \hat{\rho} \notag \\ & +i\Sigma_{mj} \hat{x}_{\ell}\hat{x}_{k} \hat{\rho} -i\Sigma_{k\ell} \hat{x}_{j} \hat{x}_{m} \hat{\rho} \bigg) \notag \\ =&-i\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk} \tr \bigg(i\Sigma_{mk} \hat{x}_{\ell}\hat{x}_{j}\hat{\rho}- i\Sigma_{j\ell} \hat{x}_{k} \hat{x}_{m} \hat{\rho} \notag\\ & +i\Sigma_{mj} \hat{x}_{\ell}\hat{x}_{k} \hat{\rho} -i\Sigma_{k\ell} \hat{x}_{j} \hat{x}_{m} \hat{\rho}\bigg) \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{mk} \tr \bigg( \hat{x}_{\ell}\hat{x}_{j}\hat{\rho}\bigg) -\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{j\ell} \tr \bigg( \hat{x}_{k} \hat{x}_{m} \hat{\rho}\bigg) \notag\notag \\ & +\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{mj} \tr \bigg( \hat{x}_{\ell}\hat{x}_{k}\hat{\rho}\bigg)- \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{k\ell} \tr \bigg( \hat{x}_{j} \hat{x}_{m} \hat{\rho}\bigg) \notag \\ =&2\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{mk} \tr \bigg( \hat{x}_{\ell}\hat{x}_{j}\hat{\rho}\bigg) -2\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{j\ell} \tr \bigg( \hat{x}_{k} \hat{x}_{m} \hat{\rho}\bigg) \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{mk} \tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{j}+ \hat{x}_{j}\hat{x}_{\ell}+i\Sigma_{\ell j} \right)\hat{\rho} \bigg)\notag \\ & -\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{j\ell} \tr\bigg( \left( \hat{x}_{k} \hat{x}_{m} + \hat{x}_{m}\hat{x}_{k}+i\Sigma_{km}\right) \hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{mk} \langle \hat{x}_{\ell}\hat{x}_{j}+ \hat{x}_{j}\hat{x}_{\ell}\rangle - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}M_{jk}\Sigma_{j\ell} \langle \hat{x}_{k} \hat{x}_{m} + \hat{x}_{m}\hat{x}_{k}\rangle \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} M_{jk} \langle \hat{x}_{k} \hat{x}_{m} + \hat{x}_{m}\hat{x}_{k}\rangle - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \langle \hat{x}_{\ell}\hat{x}_{j}+ \hat{x}_{j}\hat{x}_{\ell}\rangle M_{jk} \Sigma_{km}. \label{appendixA_proof_chapter1_covariance_evolution1} \end{align} \vspace{0.4cm} Second, we have \begin{align} &\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg)\notag \\ =&\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\Big(\hat{c}\hat{\rho}\hat{c}^{\ast}-\frac{1}{2}\hat{c}^{\ast}\hat{c}\hat{\rho}-\frac{1}{2} \hat{\rho} \hat{c}^{\ast}\hat{c}\Big)\bigg)\notag \\ =&\tr\bigg(\hat{c}^{\ast} \left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\hat{c}\hat{\rho}-\frac{1}{2}\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\hat{c}^{\ast}\hat{c}\hat{\rho} \notag\\ &-\frac{1}{2}\hat{c}^{\ast}\hat{c} \left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right) \hat{\rho} \bigg)\notag \\ =&\tr\bigg(\Big(\sum\limits_{j=1}^{2N} C_{j}^{\ast}\hat{x}_{j}\Big)\Big(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\Big)\Big(\sum\limits_{k=1}^{2N} C_{k}\hat{x}_{k}\Big)\hat{\rho}\notag \\ & -\frac{1}{2}\Big(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\Big)\Big(\sum\limits_{j=1}^{2N} C_{j}^{\ast}\hat{x}_{j}\Big) \Big(\sum\limits_{k=1}^{2N} C_{k}\hat{x}_{k}\Big)\hat{\rho}\notag \\ & -\frac{1}{2} \Big(\sum\limits_{j=1}^{2N} C_{j}^{\ast}\hat{x}_{j}\Big)\Big(\sum\limits_{k=1}^{2N} C_{k}\hat{x}_{k}\Big)\Big(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\Big) \hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg( \Big( \hat{x}_{j}\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\hat{x}_{k} \notag \\ &-\frac{1}{2}\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right) \hat{x}_{j}\hat{x}_{k} -\frac{1}{2} \hat{x}_{j} \hat{x}_{k} \left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right) \Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg( \Big( \hat{x}_{j}\left(2\hat{x}_{\ell}\hat{x}_{m}-i\Sigma_{\ell m}\right)\hat{x}_{k} \notag \\ & - \frac{1}{2} \left(2\hat{x}_{\ell}\hat{x}_{m}-i\Sigma_{\ell m}\right) \hat{x}_{j}\hat{x}_{k} - \frac{1}{2} \hat{x}_{j} \hat{x}_{k} \left(2\hat{x}_{\ell}\hat{x}_{m}-i\Sigma_{\ell m}\right)\Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg( \Big( 2 \hat{x}_{j} \hat{x}_{\ell}\hat{x}_{m} \hat{x}_{k} - \hat{x}_{\ell}\hat{x}_{m} \hat{x}_{j}\hat{x}_{k} - \hat{x}_{j} \hat{x}_{k} \hat{x}_{\ell}\hat{x}_{m} \Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg( \Big( 2 \left(\hat{x}_{\ell} \hat{x}_{j} +i\Sigma_{j\ell}\right) \left(\hat{x}_{k} \hat{x}_{m}+i\Sigma_{mk} \right) \notag\\ &- \hat{x}_{\ell}\left( \hat{x}_{j} \hat{x}_{m}+i\Sigma_{mj}\right)\hat{x}_{k} - \hat{x}_{j} \left( \hat{x}_{\ell} \hat{x}_{k}+i\Sigma_{k\ell} \right)\hat{x}_{m} \Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg( \Big( 2\hat{x}_{\ell} \hat{x}_{j}\hat{x}_{k} \hat{x}_{m} +2i\Sigma_{j\ell}\hat{x}_{k} \hat{x}_{m}+2i\Sigma_{mk} \hat{x}_{\ell} \hat{x}_{j} \notag \\ & - 2\Sigma_{j\ell}\Sigma_{mk} - \hat{x}_{\ell} \hat{x}_{j} \hat{x}_{m}\hat{x}_{k}-i\Sigma_{mj} \hat{x}_{\ell} \hat{x}_{k} - \hat{x}_{j} \hat{x}_{\ell} \hat{x}_{k}\hat{x}_{m} - i\Sigma_{k\ell} \hat{x}_{j} \hat{x}_{m} \Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg(\Big( i\Sigma_{km}\hat{x}_{\ell} \hat{x}_{j} + i\Sigma_{\ell j}\hat{x}_{k} \hat{x}_{m}+2 i\Sigma_{j\ell}\hat{x}_{k} \hat{x}_{m}\notag\\ &+2 i\Sigma_{mk} \hat{x}_{\ell} \hat{x}_{j} - 2 \Sigma_{j\ell}\Sigma_{mk} -i\Sigma_{mj} \hat{x}_{\ell} \hat{x}_{k} - i\Sigma_{k\ell} \hat{x}_{j} \hat{x}_{m} \Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \tr\bigg(\Big( i\Sigma_{j\ell}\hat{x}_{k} \hat{x}_{m}+ i\Sigma_{mk} \hat{x}_{\ell} \hat{x}_{j} \notag \\ &- 2 \Sigma_{j\ell}\Sigma_{mk} -i\Sigma_{mj} \hat{x}_{\ell} \hat{x}_{k} - i\Sigma_{k\ell} \hat{x}_{j} \hat{x}_{m} \Big)\hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i C_{j}^{\ast}C_{k}\Sigma_{j\ell} \tr\bigg( \hat{x}_{k} \hat{x}_{m}\hat{\rho}\bigg) + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} i C_{j}^{\ast}C_{k} \Sigma_{mk} \tr\bigg( \hat{x}_{\ell} \hat{x}_{j} \hat{\rho} \bigg) \notag\\ &- 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \Sigma_{j\ell}\Sigma_{mk} - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i C_{j}^{\ast}C_{k}\Sigma_{mj} \tr\bigg( \hat{x}_{\ell} \hat{x}_{k}\hat{\rho} \bigg) \notag\\ & - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} i C_{j}^{\ast}C_{k}\Sigma_{k\ell} \tr\bigg( \hat{x}_{j} \hat{x}_{m} \hat{\rho} \bigg)\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i C_{j}^{\ast}C_{k} \Sigma_{j\ell} \tr\bigg( \hat{x}_{k} \hat{x}_{m}\hat{\rho}\bigg) + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i C_{j}^{\ast}C_{k}\Sigma_{mk} \tr\bigg( \hat{x}_{\ell} \hat{x}_{j} \hat{\rho} \bigg) \notag\\ &- 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \Sigma_{j\ell}\Sigma_{mk} - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i C_{k}^{\ast} C_{j} \Sigma_{mk} \tr\bigg( \hat{x}_{\ell} \hat{x}_{j}\hat{\rho} \bigg) \notag\\ & - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i C_{k}^{\ast} C_{j} \Sigma_{j\ell} \tr\bigg( \hat{x}_{k} \hat{x}_{m} \hat{\rho} \bigg) \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i \left( C_{j}^{\ast}C_{k}- C_{k}^{\ast} C_{j} \right)\Sigma_{j\ell} \tr\bigg(\hat{x}_{k} \hat{x}_{m}\hat{\rho}\bigg) \notag\\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}i\left( C_{j}^{\ast}C_{k}- C_{k}^{\ast} C_{j} \right)\Sigma_{mk} \tr\bigg( \hat{x}_{\ell} \hat{x}_{j} \hat{\rho} \bigg) \notag \\ & - 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \Sigma_{j\ell}\Sigma_{mk}\notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}2\im\left( C_{j} C_{k}^{\ast} \right) \Sigma_{j\ell} \tr\bigg(\hat{x}_{k} \hat{x}_{m}\hat{\rho}\bigg) \notag \\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}2\im\left( C_{j} C_{k}^{\ast} \right) \Sigma_{mk} \tr\bigg( \hat{x}_{\ell} \hat{x}_{j} \hat{\rho} \bigg)\notag \\ & - 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \Sigma_{j\ell}\Sigma_{mk} \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}2\im\left( C_{j} C_{k}^{\ast} \right)\Sigma_{j\ell} \tr\bigg( \frac{\hat{x}_{k} \hat{x}_{m}+\hat{x}_{m}\hat{x}_{k}+i\Sigma_{km} }{2}\hat{\rho} \bigg)\notag \\ & + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}2\im\left( C_{j} C_{k}^{\ast} \right)\Sigma_{mk} \tr\bigg( \frac{\hat{x}_{\ell} \hat{x}_{j}+\hat{x}_{j}\hat{x}_{\ell}+i\Sigma_{\ell j} }{2} \hat{\rho} \bigg) \notag\\ & - 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \Sigma_{j\ell}\Sigma_{mk} \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\im\left( C_{j} C_{k}^{\ast} \right) \Sigma_{j\ell}\langle\hat{x}_{k} \hat{x}_{m}+\hat{x}_{m}\hat{x}_{k}\rangle \notag\\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\im\left( C_{j} C_{k}^{\ast} \right)\left( i \Sigma_{j\ell} \Sigma_{km} \right) \notag \\ & + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\im\left( C_{j} C_{k}^{\ast} \right) \Sigma_{mk} \langle \hat{x}_{\ell} \hat{x}_{j}+\hat{x}_{j}\hat{x}_{\ell} \rangle \notag\\ & + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\im\left( C_{j} C_{k}^{\ast} \right) \left( i \Sigma_{mk} \Sigma_{\ell j} \right) \notag \\ & - 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} C_{j}^{\ast}C_{k} \Sigma_{j\ell}\Sigma_{mk} \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j}\im\left( C_{j}^{\ast} C_{k} \right) \langle \hat{x}_{k} \hat{x}_{m}+\hat{x}_{m}\hat{x}_{k}\rangle \notag\\ &+2i \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} \im\left( C_{j}^{\ast} C_{k} \right) \Sigma_{km} \notag \\ & + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \langle \hat{x}_{\ell} \hat{x}_{j}+\hat{x}_{j}\hat{x}_{\ell} \rangle \im\left( C_{j}^{\ast} C_{k} \right) \Sigma_{k m} \notag\\ & - 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} C_{j}^{\ast}C_{k} \Sigma_{k m} \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j}\im\left( C_{j}^{\ast} C_{k} \right) \langle \hat{x}_{k} \hat{x}_{m}+\hat{x}_{m}\hat{x}_{k}\rangle \notag\\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \langle \hat{x}_{\ell} \hat{x}_{j}+\hat{x}_{j}\hat{x}_{\ell} \rangle \im\left( C_{j}^{\ast} C_{k} \right) \Sigma_{k m} \notag \\ & - 2 \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} \re\left( C_{j}^{\ast}C_{k} \right) \Sigma_{k m}. \label{appendixA_proof_chapter1_covariance_evolution2} \end{align} Third, using~\eqref{appendixA_proof_chapter1_meanfunction_evolution3}, we have \begin{align} &\frac{d\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle}{dt}=\frac{d\langle\hat{x}_{\ell}\rangle}{dt}\langle\hat{x}_{m}\rangle+ \langle\hat{x}_{\ell}\rangle \frac{d\langle\hat{x}_{m}\rangle}{dt}\notag \\ =&\bigg(\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} M_{jk}\langle \hat{x}_{k}\rangle + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \im \left( C_{j}^{\ast}C_{k} \right) \langle \hat{x}_{k}\rangle\bigg) \langle\hat{x}_{m}\rangle \notag \\ &+\langle\hat{x}_{\ell}\rangle \bigg(\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{m j} M_{jk}\langle \hat{x}_{k}\rangle + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{m j} \im \left( C_{j}^{\ast}C_{k} \right) \langle \hat{x}_{k}\rangle\bigg) \notag\\ =&\bigg(\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} M_{jk}\langle \hat{x}_{k}\rangle + \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \im \left( C_{j}^{\ast}C_{k} \right) \langle \hat{x}_{k}\rangle\bigg) \langle\hat{x}_{m}\rangle \notag \\ +&\langle\hat{x}_{\ell}\rangle \left(-\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\langle\hat{x}_{k}\rangle M_{kj} \Sigma_{j m }+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \langle \hat{x}_{k}\rangle \im \left( C_{k}^{\ast}C_{j} \right) \Sigma_{jm}\right) \notag\\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \bigg( M_{jk} + \im \left( C_{j}^{\ast}C_{k} \right) \bigg) \langle \hat{x}_{k} \rangle \langle\hat{x}_{m}\rangle \notag \\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \langle\hat{x}_{\ell}\rangle \langle\hat{x}_{k}\rangle \bigg( -M_{kj} + \im \left( C_{k}^{\ast}C_{j} \right)\bigg) \Sigma_{jm} \notag\\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \bigg( M_{jk} + \im \left( C_{j}^{\ast}C_{k} \right) \bigg) \langle \hat{x}_{k} \rangle \langle\hat{x}_{m}\rangle \notag \\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \langle\hat{x}_{\ell}\rangle \langle\hat{x}_{j}\rangle \bigg( -M_{jk} + \im \left( C_{j}^{\ast}C_{k} \right)\bigg) \Sigma_{km}. \label{appendixA_proof_chapter1_covariance_evolution3} \end{align} Substituting~\eqref{appendixA_proof_chapter1_covariance_evolution1}, \eqref{appendixA_proof_chapter1_covariance_evolution2} and~\eqref{appendixA_proof_chapter1_covariance_evolution3} into~\eqref{appendixA_proof_chapter1_covariance_evolution}, we obtain \begin{align} &\frac{dV_{\ell m}}{dt} \notag\\ =&\frac{1}{2}\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(-i[\hat{H},\hat{\rho}]\right)\bigg) \notag\\ &+ \frac{1}{2}\tr\bigg(\left(\hat{x}_{\ell}\hat{x}_{m}+\hat{x}_{m}\hat{x}_{\ell}\right)\left(\mathfrak{D}[\hat{c}]\hat{\rho}\right)\bigg) -\frac{d\left(\langle\hat{x}_{\ell}\rangle\langle\hat{x}_{m}\rangle\right)}{dt} \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} M_{jk} \frac{ \langle \hat{x}_{k} \hat{x}_{m} + \hat{x}_{m}\hat{x}_{k}\rangle}{2} \notag\\ &- \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \frac{\langle \hat{x}_{\ell}\hat{x}_{j}+ \hat{x}_{j}\hat{x}_{\ell}\rangle }{2} M_{jk} \Sigma_{km} \notag \\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j}\im\left( C_{j}^{\ast} C_{k} \right) \frac{ \langle \hat{x}_{k} \hat{x}_{m}+\hat{x}_{m}\hat{x}_{k}\rangle}{2} \notag \\ &+ \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\frac{ \langle \hat{x}_{\ell} \hat{x}_{j}+\hat{x}_{j}\hat{x}_{\ell} \rangle}{2} \im\left( C_{j}^{\ast} C_{k} \right) \Sigma_{k m} \notag \\ & - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} \re\left( C_{j}^{\ast}C_{k} \right) \Sigma_{k m} \notag \\ &-\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \bigg( M_{jk} + \im \left( C_{j}^{\ast}C_{k} \right) \bigg) \langle \hat{x}_{k} \rangle \langle\hat{x}_{m}\rangle \notag \\ &- \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\langle\hat{x}_{\ell}\rangle \langle\hat{x}_{j}\rangle \bigg( -M_{jk} + \im \left( C_{j}^{\ast}C_{k} \right)\bigg) \Sigma_{km} \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \bigg( M_{jk} + \im \left( C_{j}^{\ast}C_{k} \right) \bigg) \bigg(\frac{ \langle \hat{x}_{k} \hat{x}_{m} + \hat{x}_{m}\hat{x}_{k}\rangle}{2} - \langle \hat{x}_{k} \rangle \langle\hat{x}_{m}\rangle \bigg) \notag \\ & +\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \bigg( \frac{\langle \hat{x}_{\ell}\hat{x}_{j}+ \hat{x}_{j}\hat{x}_{\ell}\rangle }{2} - \langle\hat{x}_{\ell}\rangle \langle\hat{x}_{j}\rangle\bigg)\bigg(\im\left( C_{j}^{\ast} C_{k} \right)-M_{jk} \bigg) \Sigma_{km} \notag \\ & - \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} \re\left( C_{j}^{\ast}C_{k} \right) \Sigma_{k m} \notag \\ =&\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N}\Sigma_{\ell j} \bigg( M_{jk} + \im \left( C_{j}^{\ast}C_{k} \right) \bigg) V_{k m} \notag\\ &+\sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} V_{\ell j}\bigg(-M_{jk}+ \im\left( C_{j}^{\ast} C_{k} \right) \bigg) \Sigma_{km} \notag \\ &- \sum\limits_{j=1}^{2N}\sum\limits_{k=1}^{2N} \Sigma_{\ell j} \re\left( C_{j}^{\ast}C_{k} \right) \Sigma_{k m} \notag \\ =& \Sigma_{\ell :} \bigg( M + \im \left( C^{\dagger}C \right)\bigg) V_{: m} + V_{\ell :} \bigg(-M+ \im\left( C^{\dagger} C \right) \bigg)\Sigma_{: m} \notag\\ &- \Sigma_{\ell :}\re\left( C^{\dagger}C \right) \Sigma_{: m}, \label{appendixA_proof_chapter1_covariance_evolution4} \end{align} where $V_{: m}$ denotes the $m$th column of $V$ and $V_{\ell :}$ denotes the $\ell$th row of $V$. It follows from \eqref{appendixA_proof_chapter1_covariance_evolution4} that \begin{align*} \frac{dV}{dt} &= \Sigma\bigg( M + \im \left( C^{\dagger}C \right)\bigg) V + V \bigg(-M+ \im\left( C^{\dagger} C \right) \bigg)\Sigma \\ &- \Sigma \re\left( C^{\dagger}C \right) \Sigma \\ &= \Sigma\bigg( M + \im \left( C^{\dagger}C \right)\bigg) V + V \bigg(M+ \im\left( C^{\dagger} C \right) \bigg)^{\top}\Sigma ^{\top}\\ &+ \Sigma \re\left( C^{\dagger}C \right) \Sigma^{\top}. \end{align*} That is, Equation~\eqref{chapter1_covfunction} holds. This completes the derivation.\vspace{0.5cm} \begin{rmk}\label{remark} The above results can be easily extended to linear open quantum systems with multiple decoherence channels. By adding extra decoherence-induced terms (which are analogous to those obtained in~\eqref{appendixA_proof_chapter1_meanfunction_evolution2} and \eqref{appendixA_proof_chapter1_covariance_evolution2}), we can obtain the moment evolution equations for linear open quantum systems with multiple decoherence channels. The results are given by \eqref{chapter1_meanfunction} and \eqref{chapter1_covfunction}. \end{rmk}
\section{\newpage\stdsection} \let\stdparagraph\paragraph \renewcommand\paragraph{\vspace*{1em}\stdparagraph} \renewcommand{\cite}[1]{{[\cites{#1}}} \newcommand{\qedsolid}{\nopagebreak\flushright$\filledmedsquare$} \newcommand{\vphi}{\phi} \renewcommand{\phi}{\varphi} \newcommand{\vrho}{\rho} \renewcommand{\rho}{\varrho} \newcommand{\vtheta}{\theta} \renewcommand{\theta}{\vartheta} \newcommand{\eps}{\ensuremath{\varepsilon}} \newcommand{\subdot}{\d} \renewcommand{\d}{\partial} \newcommand{\ot}{\ensuremath{\leftarrow}} \newcommand{\ex}{\exists} \newcommand{\fa}{\forall} \newcommand{\lnorm}{\left\lVert} \newcommand{\rnorm}{\right\lVert} \newcommand{\lbetr}{\left\lvert} \newcommand{\rbetr}{\right\lvert} \newcommand{\norm}[1]{\lnorm {#1}\rnorm} \newcommand{\betr}[1]{\lbetr {#1}\rbetr} \newcommand{\abs}[1]{\lbetr {#1}\rbetr} \newcommand{\lletter}{\l} \newcommand{\rletter}{\r} \renewcommand{\l}{\ensuremath{\left}} \renewcommand{\r}{\ensuremath{\right}} \newcommand{\ubr}{\underbrace} \newcommand{\obr}{\overbrace} \newcommand{\uli}{\underline} \newcommand{\oli}{\overline} \newcommand{\opn}{\operatorname} \newcommand{\sgn}{\operatorname{sgn}} \renewcommand{\iff}{\ensuremath{\Leftrightarrow}} \newcommand{\then}{\ensuremath{\Rightarrow}} \newcommand{\neht}{\ensuremath{\Leftarrow}} \newcommand{\sse}{\ensuremath{\subseteq}} \newcommand{\ess}{\ensuremath{\supseteq}} \newcommand{\ssne}{\ensuremath{\subsetneq}} \newcommand{\enss}{\ensuremath{\supsetneq}} \newcommand{\vol}{\ensuremath{\mathrm{vol}}} \newcommand{\diag}{\ensuremath{\mathrm{diag}}} \newcommand{\Hf}{\ensuremath{\mathfrak{H}}} \newcommand{\Gf}{\ensuremath{\mathfrak{G}}} \newcommand{\If}{\ensuremath{\mathfrak{I}}} \newcommand{\gf}{\ensuremath{\mathfrak{g}}} \newcommand{\tr}{\ensuremath{\opn{tr}}} \newcommand{\id}{\opn{id}} \newcommand{\nn}[1][{}]{\ensuremath{\mathbb{N}^{#1}}} \newcommand{\rn}[1][{}]{\ensuremath{\mathbb{R}^{#1}}} \newcommand{\cn}[1][{}]{\ensuremath{\mathbb{C}^{#1}}} \newcommand{\qn}[1][{}]{\ensuremath{\mathbb{Q}^{#1}}} \newcommand{\zn}[1][{}]{\ensuremath{\mathbb{Z}^{#1}}} \newcommand{\Kn}[1][{}]{\ensuremath{\mathbb{K}^{#1}}} \newcommand{\Tn}[1][{}]{\ensuremath{\mathbb{T}^{#1}}} \newcommand{\Hn}[1][{}]{\ensuremath{\mathbb{H}^{#1}}} \newcommand{\Tf}[1][{}]{\ensuremath{\mathfrak{T}^{#1}}} \newcommand{\lp}[1][{}]{\ensuremath{\mathcal{L}^{#1}}} \newcommand{\Tp}[1][{}]{\ensuremath{\mathcal{T}^{#1}}} \newcommand{\Sp}[1][{}]{\ensuremath{\mathcal{S}^{#1}}} \newcommand{\Ap}[1][{}]{\ensuremath{\mathcal{A}^{#1}}} \newcommand{\fock}[1][{}]{\ensuremath{\mathcal{F}_{#1}}} \newcommand{\expvec}[1][{}]{\ensuremath{\mathcal{E}_{#1}}} \newcommand{\erf}{\ensuremath{\opn{erf}}} \newcommand{\erfc}{\ensuremath{\opn{erfc}}} \newcommand{\res}{\ensuremath{\opn{res}}} \newcommand{\pr}{\ensuremath{\opn{pr}}} \newcommand{\ind}{\ensuremath{\opn{ind}}} \newcommand{\loLc}{\ensuremath{\mathrm{l.o.L.c.}}} \newcommand{\trKV}{\ensuremath{\tr_{\mathrm{KV}}}} \newcommand{\Htr}{\ensuremath{\mathrm{Htr}}} \begin{document} \title[$\zeta$-reg. and the heat-trace on some compact quantum semigroups]{Zeta-regularization and the heat-trace on some compact quantum semigroups} \author{Jason Hancox} \address{Department of Mathematics and Statistics, Lancaster University, LA1 4YF, Lancaster, United Kingdom} \email{<EMAIL>} \author{Tobias Hartung} \address{Department of Mathematics, King's College London, Strand, WC2R 2LS, London, United Kingdom} \email{<EMAIL>} \date{\today} \begin{abstract} Heat-invariants are a class of spectral invariants of Laplace-type operators on compact Riemannian manifolds that contain information about the geometry of the manifold, e.g., the metric and connection. Since Brownian motion solves the heat equation, these invariants can be obtained studying Brownian motion on manifolds. In this article, we consider Brownian motion on the Toeplitz algebra, discrete Heisenberg group algebras, and non-commutative tori to define Laplace-type operators and heat-semigroups on these C*-bialgebras. We show that their traces can be $\zeta$-regularized and compute ``heat-traces'' on these algebras, giving us a notion of dimension and volume. Furthermore, we consider $SU_q(2)$ which does not have a Brownian motion but a class of driftless Gaussians which still recover the dimension of $SU_q(2)$. \end{abstract} \maketitle \tableofcontents \section{Introduction}\label{sec:intro} In this article, we want to consider $\zeta$-regularization and the heat-trace in the non-commutative settings of the Toeplitz algebra, discrete Heisenberg group, non-commutative tori, and $SU_q(2)$. $\zeta$-regularization is a means to extend tracial functionals (not necessarily bounded) that are defined on a subalgebra to a larger domain. More precisely, consider an algebra $A$, a subalgebra $A_0$, and a linear functional $\tau:\ A_0\to\cn$ such that $\fa x,y\in A_0:\ \tau(xy)=\tau(yx)$. Given a holomorphic family $\phi:\ \cn\to A$ and $\Omega\sse\cn$ open and connected such that the restriction $\phi|_\Omega$ of $\phi$ to $\Omega$ takes values in $A_0$, we want to consider maximal holomorphic extensions $\zeta(\phi)$ of $\tau\circ\phi|_{\Omega}$. In a way, this is a generalized version of the Riemann $\zeta$-function $\zeta_R$ and its applications like ``$\sum_{n\in\nn}n=\zeta_R(-1)$''. These ideas were pioneered by Ray and Singer~\cite{ray,ray-singer} whose initial works had already been successfully applied by Hawking~\cite{hawking} to compute the energy momentum tensor on the black hole horizon. Since traces are important for studying invariants, $\zeta$-regularization has become an integral part of the pseudo-differential toolkit, especially in geometric analysis. As such, the ``classical case'' to consider is where $A=\Psi$ is the algebra of classical [classical is important because we are not looking at the entire algebra of $\psi$dos] pseudo-differential operators on a compact Riemannian $C^\infty$-manifold $M$ without boundary, $A_0$ the dense subalgebra of classical pseudo-differential operators that are trace class on $L_2(M)$, and $\tau$ the canonical trace $\tr$ on the Schatten class $S^1(L_2(M))$. It is then possible to construct this holomorphic family $\phi$ of pseudo-differential operators in such a way that each $\phi(z)$ has affine order $qz+a$ where $q>0$. Then, $\phi(z)$ is of trace class whenever $\Re(z)<\frac{-\dim M-\Re(a)}{q}$ and $\tau\circ\phi$ has a meromorphic extension to $\cn$. Furthermore, all poles are simple and contained in the set $\l\{\frac{j-a-\dim M}{q};\ j\in\nn_0\r\}$. This construction, using the notion of gauged symbols, was introduced by Guillemin~\cite{guillemin}, the residues at the poles give rise to Wodzicki's non-commutative residue~\cite{wodzicki} which (up to a constant factor) is the unique continuous trace on $\Psi$ (if $\dim M>1$), and the constant Laurent coefficients give rise to the Kontsevich-Vishik trace \cite{kontsevich-vishik,kontsevich-vishik-geometry}. It was later shown~\cite{maniccia-schrohe-seiler} that the Kontsevich-Vishik trace (which is unbounded in general) is the unique extension of the canonical trace on $S^1(L_2(M))$ to the subspace of pseudo-differential operators of non-integer order (a dense subspace of $\Psi$ which is not an algebra). The Kontsevich-Vishik trace has also been extended to Fourier integral operators (or, more precisely, ``gauged poly-$\log$-homogeneous distributions'' which contain the gauged Lagrangian distributions studied by Guillemin~\cite{guillemin} which in turn contain Fourier integral operator traces) in Hartung's Ph.D. thesis~\cite{hartung-phd,hartung-scott}. Families $\phi$ of the form $\phi(z)=TQ^z$, which are constructed using a classical pseudo-differential operator $T$ and complex powers $Q^z$ of an appropriate invertible elliptic operator $Q$~\cite{seeley}, are particularly important example of such $\zeta$-functions. Here, the meromorphic extension of $\tr TQ^z$ is denoted by $\zeta(T,Q)$ and called the $\zeta$-regularized trace of $T$ with weight $Q$. It was shown~\cite{paycha-scott} that the constant term of the Laurent expansion of $\zeta(T,Q)$ centered at zero is of the form $\trKV T-\frac{1}{q}\res(T\ln Q)-\tr(T\pr_{\ker Q})$ where $\trKV$ denotes the Kontsevich-Vishik trace, $\res(T\ln Q)$ is the so called ``trace anomaly'', and $\res$ denotes the extended Wodzicki residue (note that $T\ln Q$ is typically not a pseudo-differential operator and the formula holds only locally as neither $\trKV$ nor $\res$ are globally defined in general). For $T=1$, $\res(\ln Q)$ this is called the logarithmic residue~\cite{okikiolu,scott}. This trace anomaly only appears in the so called ``critical case'' which is if there exists a degree of homogeneity $-\dim M$ in the asymptotic expansion of $T$, i.e., $\zeta(T,Q)$ has a pole in zero.\footnote{Here, we are ignoring the fact that the residue might be zero in which case $\zeta(T,Q)$ is holomorphic in a neighborhood of zero. However, even if this is the case $\zeta(T,Q)(0)$ behaves exactly like you expect the constant Laurent coefficient to behave in the presence of a pole, so for all intents an purposes $\zeta(T,Q)$ has a pole.} The Kontsevich-Vishik trace of $T$ can be stated in the following form. Let $T$ have symbol $\sigma$ with asymptotic expansion $\sigma(x,\xi)\sim\sum_{j\in\nn_0}\alpha_{m-j}(x,\xi)$ where each $\alpha_{m-j}$ is homogeneous of degree $m-j$ in $\xi$. In other words, \begin{align*} k(x,y):=&(2\pi)^{-\dim M}\int_{\rn[\dim M]}e^{i\langle x-y,\xi\rangle_{\ell_2(\dim M)}}\sigma(x,\xi)d\xi\\ \sim&\sum_{j\in\nn_0}\ubr{(2\pi)^{-\dim M}\int_{\rn[\dim M]}e^{i\langle x-y,\xi\rangle_{\ell_2(\dim M)}}\alpha_{m-j}(x,\xi)d\xi}_{=:k_{m-j}(x,y)} \end{align*} coincides locally with the kernel of $T$ modulo smoothing operators. Then, there exists $N\in\nn$ (any $N>\dim M+\Re(m)$ will do) such that the operator $T^{\mathrm{reg}}$ with kernel $k^{\mathrm{reg}}:=k-\sum_{j=0}^Nk_{m-j}$ is of trace class and \begin{align*} \trKV T=\tr T^{\mathrm{reg}}=\int_Mk^{\mathrm{reg}}(x,x)d\vol_M(x). \end{align*} This formula has a very important consequence, namely that the Kontsevich-Vishik trace of differential operators ($m\in\nn_0$ and $\fa j\in\nn_{>m}:\ \alpha_{m-j}=0$) vanishes. If $Q=\Delta+\pr_{\ker\Delta}$ where $\Delta$ is an elliptic differential operator and $\pr_{\ker\Delta}$ the projection onto its kernel, then $\Gamma(-z)TQ^{-z}$ is the Mellin transform of $Te^{-tQ}$ and, provided $\Delta$ is non-negative, $z\mapsto\Gamma(-z)\zeta(T,Q)(-z)$ is the inverse Mellin transform of $t\mapsto\tr Te^{-tQ}$. For $T=1$ the function $t\mapsto \tr e^{-tQ}$ is called the (generalized) heat-trace generated by $-Q$. An important application of these heat-traces is given in the heat-trace proof~\cite{atiyah-bott-patodi} of the Atiyah-Singer index theorem; namely, if $D$ is a differential operator, then its Fredholm index is given by $\ind D=\tr (e^{-t D^*D}- e^{-t DD^*})$. Using the inverse Mellin mapping theorem~\cite{azzali-levy-neira-paycha}, it follows that $\tr Te^{-tQ}$ has an asymptotic expansion $\frac{1}{q}\sum_{j\in\nn_0}a_jt^{-d_j}+O(t^{-\gamma})$ where $d_j=\frac{j-a-n}{q}$, $a_j=-\frac{1}{q}\res(TQ^{-d_j})$ for $d_j>0$, and some appropriate $\gamma>\frac{a+\dim M}{q}$. If $T$ is a differential operator plus a trace class operator $T_0$, then we also know that $a_j=\tr T_0-\frac{1}{q}\res(T\ln Q)$ if $d_j=0$. For instance, let $Q$ be the positive Laplace-Beltrami operator on a compact Riemannian $C^\infty$-manifold $M$ of even dimension and without boundary. Then, \begin{align*} \tr e^{-tQ}=\frac{\vol(M)}{(4\pi t)^{\frac{\dim M}{2}}}+\frac{\mathrm{total\ curvature}(M)}{3(4\pi)^{\frac{\dim M}{2}}t^{\frac{\dim M}{2}-1}}+\mathrm{higher\ order\ terms} \end{align*} and, more generally, for $\dim M\in\nn$, the heat-trace has an expansion \begin{align*} \tr e^{-tQ}=(4\pi t)^{-\frac{\dim M}{2}}\sum_{k\in\nn_0}A_kt^{\frac{k}{2}} \end{align*} for $t\searrow0$. The $A_k$ are called heat-invariants and are spectral invariants of Laplace type operators $\nabla^*\nabla+V$ generating the corresponding ``heat-semigroup'' where $\nabla$ is a connection on a vector bundle over $M$ and $V$ is a multiplication operator called the potential. More precisely, the heat-invariants are functorial algebraic expressions in the jets of homogeneous components of $Q$, i.e., if $Q$ is geometric, then the heat-invariants carry information about the underlying metric and connection on $M$. We can see this quite nicely in the Laplace-Beltrami case, in which the volume and total curvature appear as lowest order heat-invariants and the dimension of the manifold in the pole order. These properties of $\zeta$-functions and heat-traces are fundamental in geometric analysis which begs the questions whether or not they extend to non-commutative settings. Such questions have also been studied on the non-commutative torus, the Moyal plane, the Groenewold-Moyal star product, the non-commutative $\phi^4$ theory on the $4$-torus, and $SU_q(2)$~\cite{azzali-levy-neira-paycha,carey-gayral-rennie-sukochev,carey-rennie-sadaev-sukochev,connes-fathizadeh,connes-moscovici,connes-tretkoff,dabrowski-sitarz-curved,dabrowski-sitarz-asymmetric,fathi,fathi-ghorbanpour-khalkhali,fathi-khalkhali,fathizadeh,fathizadeh-khalkhali-scalar-4,fathizadeh-khalkhali-scalar-2,fathizadeh-khalkhali-gauss-bonnet,gayral-iochum-vassilevich,iochum-masson,levy-neira-paycha,liu,matassa,sadeghi,sitarz,vassilevich-I,vassilevich-II}. The non-commutative torus $\Tn[n]_\theta$ is a deformation of the torus $\rn[n]/{\zn[n]}$ using a real anti-symmetric $n\times n$ matrix $\theta$ as a twist. The corresponding C*-algebra $A_\theta$ which has a dense subalgebra consisting of elements $a=\sum_{k\in\zn[n]}a_kU_k$ where $(a_k)_{k\in\zn[n]}$ is in the Schwartz space $\Sp(\zn[n])$, $U_0=1$, each $U_k$ is unitary, and $U_kU_l=e^{-\pi i\langle k,\theta l\rangle_{\ell_2(n)}}U_{k+l}=e^{-2\pi i\langle k,\theta l\rangle_{\ell_2(n)}}U_lU_k$. The construction of $A_\theta$ and its algebra of pseudo-differential operators $\Psi(\Tn[n]_\theta)$ is chosen in such a way that $\theta\to0$ recovers $A_0=C^\infty\l(\rn[n]/{\zn[n]}\r)$ and $\Psi(\Tn[n]_0)$ is the algebra of classical pseudo-differential operators on $\rn[n]/{\zn[n]}$. Then, it is possible to define $\Tn[n]_\theta$ versions of the Wodzicki residue and Kontsevich-Vishik trace and show many of the properties described above. In particular, in~\cite{levy-neira-paycha} it is shown that $\zeta$-functions are meromorphic on $\cn$ with isolated simple poles at $\frac{j-a-n}{q}$ for $j\in\nn_0$ and that the heat-trace pole order is $\frac{n}{2}$. Similarly, it is possible to introduce a Dirac operator $D_q$ on $SU_q(2)$~\cite{kaad-senior} taking symmetries into account while constructing a twisted modular spectral triple and insuring that the classical limit $q\to 1$ recovers the Dirac operator on $SU(2)$. Using $D_q$, $\zeta$-functions and heat kernels can be constructed on $SU_q(2)$. Heat kernel expansions, heat-traces, $\zeta$-functions and their asymptotics, and their relation to the Dixmier trace (which for pseudo-differential operators coincides with the Wodzicki residue of the $\zeta$-function~\cite{connes-action-functional}) have been studied in this context~\cite{carey-gayral-rennie-sukochev,carey-rennie-sadaev-sukochev,matassa}. In this article, we want to add another layer of abstraction and consider a number of quantum semigroups. While it is perfectly possible to define a ``twisted'' Laplace-Beltrami operator and, more generally pseudo-differential operators, on the non-commutative torus or $SU_q(2)$ by introducing a non-commutative twist on the classical algebra of pseudo-differential operators on the torus or $SU(2)$, such a construction is not straight forward, if at all possible, for many interesting quantum semigroups. Instead, we want to make use of the fact that Brownian motion solves the heat equation. In other words, the Laplace operator and the heat-semigroup can be recovered using Brownian motion. Hence, our approach in this article is to consider driftless Gaussian processes on quantum semigroups that allow us to define an appropriate notion of Brownian motion and use these Markov semigroups to define Laplace-type operators and ``heat-semigroups''. The study of L\'evy processes on *-bialgebras (cf. \cite{schurmann}) gives a very satisfying theory of independent increment processes in the non-commutative framework. This was initiated in the late eighties by Accardi, Sch\"urmann, and von Waldenfels \cite{accardi-schurmann-waldenfels}. The theory generalizes the notion of L\'evy processes on semigroups and allows for various types of familiar L\'evy processes. The most important of these types in this article, and arguably in general, is the notion of a Gaussian L\'evy process. The construction of these L\'evy processes is purely algebraic. Attempts at extending these methods to the C*-algebraic framework have made great progress. Lindsay and Skalski have completed this work relying on the assumption that the generator of the L\'evy process is bounded \cite{lindsay-skalski1,lindsay-skalski2,lindsay-skalski3}. More recently, Cipriani, Franz and Kula \cite{cipriani-franz-kula} have developed a characterization in terms of translation invariant quantum Markov semigroups on compact quantum groups that does not assume the generator to be bounded. At the time of writing an unpublished approach by Das and Lindsay will give a full characterisation for reduced compact quantum groups again which allows unbounded generators. In this article, we will introduce a C*-algebraic L\'evy process methodology that does not rely on the boundedness of the generator but will require the C*-algebra to be universal and ``nicely-generated'' in some sense. This will allow us to develop Gaussian processes on C*-bialgebras (whose generators in general are not bounded) and then by a canonical choice of Gaussian process which we will take to be Brownian motion we will have definitions for a heat-semigroup on our examples of C*-bialgebras. The Toeplitz algebra is an interesting choice of algebra to consider in this context since it does not have a twist structure of the form allowing us to directly model pseudo-differential operators, yet defining Brownian motion is very natural. Hence, we will start by formally introducing the Toeplitz algebra $\Tp$ and give an overview of convolution semigroups (which contain the notion of L\'evy processes) in section~\ref{sec:semigroups}. Since Brownian motion is classically generated by the Laplace-Beltrami operator, we define a class of operators (polyhomogeneous operators) on the Toeplitz algebra which play a similar role to classical pseudo-differential operators in section~\ref{sec:zeta}, as well as their $\zeta$-functions. Then, we will study the heat-semigroup and $\zeta$-regularized heat-trace in section~\ref{sec:heat}. While the dynamics of the Toeplitz algebra are generated by the circle $\d B_{\cn}\cong\rn/{2\pi\zn}$, it is not obtained from ``twisting'' the product on $C(\d B_{\cn})$. In particular, it is not merely some $\Tn_\theta$. In order to relate these results to more ``classical'' scenarios, we will consider the discrete Heisenberg group algebra in sections~\ref{sec:heisenberg} and~\ref{sec:heisenberg-Z-complex}, and non-commutative tori in section~\ref{sec:non-com-torus}. In particular, we can relate the heat-traces of discrete Heisenberg group algebras and non-commutative tori to the ``classical'' heat-traces on tori. Finally, we will consider $SU_q(2)$ which, although being a ``twisted'' manifold, does not have a Brownian motion. Instead all driftless Gaussian semigroups are generated by constant multiples of a unique operator (which is not the Laplacian on $SU(2)$). Still, this family of driftless Gaussians can be regularized and is formally very similar to the Brownian motion on the Toeplitz algebra. Our main observations are the following. \begin{enumerate} \item[(i)] On the Toeplitz algebra, $\zeta$-functions of polyhomogeneous operators have at most simple poles in the set $\l\{\frac{-2-d_\iota}{\delta};\ \iota\in I\r\}$ where the $d_\iota$ are the degrees of homogeneity and $\delta$ plays the same role $q$ did above. Furthermore, the ``heat-trace'' can be $\zeta$-regularized, has a first order pole in zero, and the sequence of heat coefficients $(A_k)_{k\in\nn_0}$ satisfies $A_0=-2\pi$ and $\fa k\in\nn:\ A_k=0$. This is exactly what we would expect to see if the Toeplitz algebra were a $2$-dimensional manifold of ``volume'' $-2\pi$ (all other heat coefficients vanishing). \item[(ii)] In the case of the discrete Heisenberg group algebra $\Hn_N$ we consider two cases; namely, the twist being an abstract unitary or having a complex twist. \begin{enumerate} \item[(a)] If the twist is an abstract unitary, then $\zeta$-functions of polyhomogeneous operators have isolated first order poles in the set $\l\{\frac{-2N-1-d_{\iota}}{\delta};\ \iota\in I\r\}$. This corresponds to the classical case of a $2N+1$-dimensional manifold. The heat-trace however is given by $-\tr\circ S$ where $S$ is the heat-semigroup on the $\rn[2N]/{2\pi\zn[2N]}$, i.e., the heat-trace appears as if $\Hn_N$ were a $2N$-torus with all heat-coefficients multiplied by $-1$. \item[(b)] If we consider a complex twist, then $\zeta$-functions of polyhomogeneous operators have isolated first order poles in the set $\l\{\frac{-2N-d_{\iota}}{\delta};\ \iota\in I\r\}$ and the heat-trace coincides with the heat-trace on $\rn[2N]/{2\pi\zn[2N]}$. In other words, $\Hn_N$ looks exactly like a $2N$-dimensional torus. \end{enumerate} \item[(iii)] The non-commutative torus $A_\theta^N$ is closely related to the discrete Heisenberg group algebra case. As such we will consider two cases again; (a) ${\Tf}$ twists that are abstract unitaries and (b) ${\Tf}$ complex twists. It is also possible to add another $T'$ complex twists to the case (a) without changing the results. \begin{enumerate} \item[(a)] If the twists are abstract unitaries, then $\zeta$-functions of polyhomogeneous operators have isolated first order poles in $\l\{\frac{-N-{\Tf}-d_{\iota}}{\delta};\ \iota\in I\r\}$. This corresponds to the classical case of an $N+{\Tf}$-dimensional manifold. The heat-trace however is given by $(-1)^{\Tf}\tr\circ S$ where $S$ is the heat-semigroup on the $\rn[N]/{2\pi\zn[N]}$, i.e., the heat-trace appears as if $A_\theta^N$ were an $N$-torus with all heat-coefficients multiplied by $(-1)^{\Tf}$. \item[(b)] If we consider a complex twists, then $\zeta$-functions of polyhomogeneous operators have isolated first order poles in the set $\l\{\frac{-N-d_{\iota}}{\delta};\ \iota\in I\r\}$ and the heat-trace coincides with the heat-trace on $\rn[N]/{2\pi\zn[N]}$. In other words, $A_\theta^N$ looks exactly like an $N$-dimensional torus. \end{enumerate} \item[(iv)] $SU_q(2)$ is a somewhat special case in the list of quantum semigroups we consider here since it does not have a Brownian motion. Hence, there is no heat-semigroup. However, there is still a class of driftless Gaussians that we can consider in lieu of alternatives. Their traces can be $\zeta$-regularized and have a pole in zero which is of order $\frac32$. This corresponds to a $3$-dimensional manifold ($SU_q(2)$ is a twisted $3$-dimensional Calabi-Yau algebra and $SU(2)$ is isomorphic to the $3$-sphere). The sequence of corresponding ``heat-coefficients'' $(A_k)_{k\in\nn_0}$ is given by $A_0=-2\pi^2r^{-\frac{3}{2}}$ and $\fa k\in\nn:\ A_k=0$ where $r\in\rn_{>0}$ is a parameter describing the family of driftless Gaussians on $SU_q(2)$. Hence, we still obtain consistent results regarding dimensionality of $SU_q(2)$ but interpreting the ``heat-coefficient'' $A_0$ as volume would be a bit of a stretch as it is also negative in the $SU(2)$ case. Furthermore, $\zeta$-functions of polyhomogeneous operators have isolated first order poles in the set $\l\{\frac{-3-d_{\iota}}{\delta};\ \iota\in I\r\}$. \end{enumerate} \paragraph{\textbf{Acknowledgements}} The authors would like to express his gratitude to Prof. Martin Lindsay and Prof. Simon Scott for inspiring comments and conversations which helped us to develop the work presented in this article. The first author was funded by the Faculty of Science and Technology at Lancaster University. \section{Convolution semigroups and the Toeplitz algebra}\label{sec:semigroups} In this section we will introduce the Toeplitz algebra as a C*-bialgebra. This has been introduced previously in~\cite{aukhadiev-grigoryan-lipacheva}. We will characterize the Sch\"urmann triples on this C*-bialgebra which generalizes the notion of L\'evy processes on a compact topological semigroup. This will lead to a natural choice for Brownian motion and in later sections we will calculate important quantities associated to this semigroup that in the classical setting give information about the structure of the manifold involved. \begin{definition} The universal C*-algebra generated by the right shift operator $R:\ \ell_2(\nn_0)\to \ell_2(\nn_0)$ such that \begin{align*} R(\lambda_0,\lambda_1,\dots)= (0,\lambda_0,\lambda_1,\dots) \end{align*} is called the Toeplitz algebra and denoted $\Tp$. \end{definition} The Toeplitz algebra has a dense *-subalgebra with basis given by $R_{n,m}=R^nR^{*m}$. We will denote this sub *-algebra $\Tp_0$. For a more detailed account of the Toeplitz algebra see \cite{murphy}. We will proceed to define C*-bialgebras, these are the non-commutative analogue to topological semigroups with identity in the same sense that C*-algebras are a non-commutative analogue to locally compact Hausdorff topological spaces and compact quantum groups are non-commutative analogues to compact groups. \begin{definition} A *-bialgebra is a unital *-algebra $A$ with unital *-homomorphisms $\Delta:\ A\to A\otimes A$ and $\eps:\ A\to \cn$ that satisfy \begin{align*} (\Delta\otimes \id)\circ\Delta=(\id\otimes \Delta)\circ \Delta \quad\text{ and }\quad (\eps\otimes \id)\circ\Delta=\id=(\id\otimes \eps)\circ \Delta \end{align*} where $\otimes$ is the algebraic tensor product. \end{definition} \begin{definition} A C*-bialgebra is a unital C*-algebra $A$ with unital C*-homo--morphisms $\Delta:\ A\to A\otimes A$ and $\eps:\ A\to \cn$ that satisfy \begin{align*} (\Delta\otimes \id)\circ\Delta=(\id\otimes \Delta)\circ \Delta \quad\text{ and }\quad (\eps\otimes \id)\circ\Delta=\id=(\id\otimes \eps)\circ \Delta \end{align*} where $\otimes$ is the spatial tensor product. \end{definition} If we also required that the sets $\Delta(A)(1\otimes A)$ and $\Delta(A)(1\otimes A)$ were dense in $A\otimes A$ in the definition of C*-bialgebra we would have the definition of a compact quantum group. These conditions are the quantum cancellation properties but will not be required for this. The map $\Delta$ is called to co-multiplication and the first identity involving only $\Delta$ is called co-associativity. This is to mirror the multiplication of a semigroup. The map $\eps$ is called the co-unit and the second identity is called the co-unital property. This is analogous to the identity element of a semigroup. \begin{prop} The Toeplitz algebra can be given the structure of a C*-bialgebra with co-multiplication $\Delta(R_{n,m})=R_{n,m}\otimes R_{n,m}$ and co-unit $\eps(R_{n,m})=1$ for all $n,m\in\nn_0$. Furthermore, the restriction of these maps to $\Tp_0$ makes $\Tp_0$ a *-bialgebra. \end{prop} \begin{proof} As the Toeplitz algebra is a universal C*-algebra generated by the isometry $R$, we only need to show that $\Delta(R)^*\Delta(R)=I_{\Tp\otimes \Tp}$ and $\eps(R)^*\eps(R)=1$. This is straightforward: \begin{align*} \Delta(R)^*\Delta(R)&=(R^*\otimes R^*)(R\otimes R)=R^*R\otimes R^*R=I_{\Tp}\otimes I_{\Tp}=I_{\Tp\otimes\Tp} \end{align*} and \begin{align*} \eps(R)^*\eps(R)&=(1^*)(1)=1. \end{align*} The fact that the maps restricted to $\Tp_0$ gives it the structure of a *-bialgebra is easily seen by the identity $\Delta(R_{n,m})=R_{n,m}\otimes R_{n,m}$. \end{proof} Now that we have a *-bialgebra we can appeal to the theory of L\'evy processes on *-bialgebras~\cite{schurmann,lindsay-skalski}. For a pre-Hilbert space $D$, let $L^*(D)$ denote the set of adjointable operators, that is, linear maps $T:\ D\to D$ such that there exists $T^*:\ D\to D$ such that $\fa x,y\in D:\ \langle x,Ty \rangle=\langle T^*x,y \rangle$. This is clearly a unital *-algebra. \begin{definition} Let $A$ be a *-bialgebra . A Sch\" urmann triple $(\rho,\eta,L)$ consists of a unital *-homomorphism $\rho:\ A\to L^*(D)$ for some pre-Hilbert space $D$, a $\rho-\eps$ cocycle $\eta:\ A\to D$, i.e., \begin{align*} \eta(ab)=\eta(a)\eps(b)+\rho(a)\eta(b) \end{align*} and a *-linear functional $L:\ A\to\cn$ such that \begin{align*} L(ab)=L(a)\eps(b)+\eps(a)L(b)+\l\langle \eta(a^*),\eta(b)\r\rangle. \end{align*} A Sch\"urmann triple will be called surjective if the cocycle $\eta$ has dense image. \end{definition} If we let $\overline{D}$ be the Hilbert space completion of $D$ and we consider unital *-homomorphisms $\rho:\ \Tp_0\to L^*(D)$, we can see that $\rho(R)\in L^*(D)$ is an isometry and can therefore be extended to $B\l(\overline{D}\r)$. As $\Tp_0$ is generated by $R$ we can now use induction on word length to see that $\rho(R_{n,m})$ can be extended to $B\l(\overline{D}\r)$ for all $n,m\in \nn_0$. Therefore we can replace the pre-Hilbert space in the Sch\"urmann triple definition by a Hilbert space and the adjointable operators by the bounded operators. We will now proceed to characterize the Sch\"urmann triples on $\Tp_0$. \begin{theorem}\label{thm:isolp} Given an isometry $V\in B(H)$ on some Hilbert space $H$, $h\in H$, and $\lambda\in \rn$, there exists a unique Sch\"urmann triple $(\rho,\eta,L)$ on $\Tp$ such that \begin{align*} \rho(R)=V,\quad \eta(R)=h,\quad\text{ and }\quad L(R-R^*)=i\lambda. \end{align*} Furthermore, every Sch\"urmann triple arises this way. \end{theorem} \begin{proof} Clearly given any Sch\"urmann triple we can see that $\rho(R)$ is an isometry on some Hilbert space $H$. By definition $\eta(R)$ is an element of $H$ and by *-linearity $L(R-R^*)$ is a purely imaginary number. Starting with $V\in B(H), h\in H$, and $\lambda \in \rn$, we easily construct $\rho:\Tp\to B(H)$ by universality where $\rho(R)=V$. If we let $\eta(R)=h$, $\eta(R^*)=-Vh$ and $\eta(ab)=\eta(a)\eps(b)+\rho(a)\eta(b)$ for all $a,b\in \Tp_0$, we will see that $\eta(R^*R)=0$ and $\eta:\ \Tp_0\to H$ is well-defined. Finally, let $L(R-R^*)=i\lambda$, $L(R+R^*)=-\l\langle h,h\r\rangle$, and $L(ab)=L(a)\eps(b)+\eps(a)L(b)+\l\langle \eta(a^*),\eta(b)\r\rangle$ for all $a,b\in \Tp_0$. Again, we see that $L(R^*R)=0$ and $L:\Tp_0\to \cn$ is well-defined. \end{proof} \begin{definition} A convolution semigroup of states is a family of linear functionals $\phi_t:\ A\to \cn$ such that $\phi_t(a^*a)\geq 0$ and $\phi_t(1)=1$ for all $t\geq 0$, i.e., $\phi_t$ is a *-algebra state for all $t\in\rn_{\ge 0}$ and \begin{align*} \phi_t*\phi_s:=(\phi_s\otimes \phi_t)\circ\Delta=\phi_{t+s},\quad \phi_0=\eps,\quad \text{ and }\quad \lim_{r\to 0}\phi_r(a)=\eps(a) \end{align*} for all $t,s\in \rn_{\ge0}$ and $a\in A$. \end{definition} \begin{definition} A generating functional is a linear functional $L:A\to \cn$ such that $$L(1)=0, \quad L(a^*)=\overline{L(a)},\quad \text{ and } L((a-\eps(a))^*(a-\eps(a)))\geq 0$$ for all $a\in A$. \end{definition} Sch\"urmann proved that following are in one-to-one correspondence \begin{itemize} \item Sch\"urmann triples on $A$; \item Convolution semigroups of states on $A$; \item Generating functionals on $A$. \end{itemize} In the classical setting given a L\'evy process $X_t$ on a compact semigroup the associated probabiltity distributions $\mu_t$ form a convolution semigroup of probability measures. This motivates the definition of L\'evy processes on *-bialgebras as states act as a noncommutative analogue to probability measures by results such as the Markov-Riesz-Kakutani theorem. In the definition of the Sch\"urmann triple the functional $L$ is the generating functional. These will assist us in constructing contraction semigroups of operators. To extend these results to the C*-algebraic level we will introduce the symmetric Fock space. \begin{definition} Let $H$ be a Hilbert space. The symmetric Fock space is given by \begin{align*} \cn\Omega\oplus\bigoplus_{n\geq 1} H^{\vee n} \end{align*} where $\Omega$ is called the vacuum vector and $H^{\vee n}\sse H^{\otimes n}$ such that elements are unchanged by the action of permutation of tensor factors. The symmetric Fock space of $H$ is denoted by $\Gamma(H)$. If $H=L_2(\rn_{\ge0}; K)$ for some Hilbert space $K$, we will call $\Gamma(H)=\fock$ and for $I\subseteq \rn_{\ge0}$ call $\Gamma(L_2(I; K))=\fock[I]$. \end{definition} Note that the so called exponential property of Fock spaces with \begin{align*} L_2([0,b_1);K)\oplus L_2([b_1,b_2);K)\oplus \dots \oplus L_2([b_n,\infty);K)\cong L_2(\rn_{\ge0};K) \end{align*} gives the decomposition \begin{align*} \fock[[0,b_1)]\otimes\fock[[b_1,b_2)]\otimes\dots\otimes \fock[[b_n,\infty)]\cong \fock \end{align*} for all $n\in \nn$ and $0< b_1<b_2<\dots<b_n$. A very important subspace of the Fock space is the the space of exponential vectors given by the linear span of the vectors \begin{align*} e(u)=\l(1,u,\frac{u^{\otimes 2}}{\sqrt{2}},\dots ,\frac{u^{\otimes n}}{\sqrt{n!}},\dots\r)\in \fock \end{align*} for all $u\in L_2(\rn_{\ge0};K)$. This is a dense subspace of $\fock$ and we will denote it by $\expvec$. Using this characterization of Sch\"urmann processes we can now appeal to the Representation Theorem (Theorem~1.15~\cite{franz}) to realize our L\'evy process on the Fock space. This gives us a family of adapted unital weak*-homomorphisms $j_{s,t}:\ \Tp_0\to L^\dagger(\expvec)$ where $L^\dagger(\expvec)$, in the context of $\expvec$ being a subspace of a Hilbert space, is the family of linear operators $T:\ \expvec\to \fock$ such that the adjoint $T^*$ has domain which contains $\expvec$. More specifically, $j_{s,t}:A\ \to L^\dagger(\expvec)$ is a family such that $j_{s,t}(a)$ acts non-identically only on $\fock[[s,t)]$ (adapted), $j_{s,t}(1)=\id_{\fock}$ (unital), satisfies the weak multiplicative property \begin{align*} \langle x,j_{s,t}(a^*b)y\rangle=\langle j_{s,t}(a)x,j_{s,t}(b)y\rangle, \end{align*} and is a Fock space L\'evy process, i.e., a family $(j_{s,t})_{0\leq s\leq t}$ of maps $A\to L^\dagger(\expvec)$ such that \begin{itemize} \item[(i)] $ j_{t,t} =\id_{\fock}$, \item[(ii)] $ (j_{r,s}\otimes j_{s,t})\circ \Delta =j_{r,t}$, \item[(iii)] $\lim_{t\to s}\langle e(0), j_{s,t}(a)e(0))\rangle =1$ and \item[(iv)] $\langle e(0), j_{s,t}(a)e(0))\rangle =\langle e(0), j_{s+r,t+r}(a)e(0))\rangle$. \end{itemize} The following result of Belton and Wills \cite{belton-wills} tells us that, because the Toeplitz algebra is nicely generated, algebraic unital weak*-homomorphisms are enough to extend to C*-algebraic unital homomorphisms. \begin{prop} There is a one-to-one correspondence between unital weak*-homomorphisms $j:\ \Tp_0\to L^\dagger(\expvec)$ and unital C*-homomorphisms $\hat{j}:\ \Tp\to B(\fock)$. \end{prop} \begin{proof} Clearly given $\hat{j}:\ \Tp\to B(\fock)$ then $j:=\hat{j}|_{\Tp_0}$ defines a unital *-homomorphism $j:\ \Tp_0\to B(\fock)\subseteq L^\dagger(\expvec)$. Now let $j:\ \Tp_0\to L^\dagger(\expvec)$ this implies that \begin{align*} \norm x^2=\langle x,j(R^*R)x\rangle=\langle j(R)x,j(R)x\rangle=\norm{j(R)x}^2 \end{align*} for all $x\in \expvec$. Since $\expvec$ is dense in $\fock$, $j(R)$ can be extended to an isometry in $B(\fock)$. Adjointability implies that $j(R^*)$ is also bounded. We can now use induction on word length and linearity to show that $j(R_{n,m})\in B(\fock)$ for all $n,m\in \nn_0$. Now using universality there exists a unital C*-homomorphism $\hat{j}:\ \Tp\to B(\fock)$ such that $\hat{j}(R)=j(R)$. \end{proof} \begin{corollary} There is a one-to-one correspondence between Sch\"urmann triples on $\Tp_0$ and L\'evy processes $j_{s,t}:\ \Tp\to B(\fock)$. \end{corollary} Given such a L\'evy process we get a $C_0$-convolution semigroup of states \cite{lindsay-skalski1} on the C*-algebra $\Tp$ this is given by $\phi_t(a)=\langle \Omega,j_{0,t}(a)\Omega\rangle$. Furthermore we get an associated $C_0$-semigroup $T(t):\ \Tp\to \Tp$ given by $T(t):=(\id\otimes \phi_t)\circ \Delta$. \begin{example*} Let $H=\cn$, $V=\id_{\cn}$, $h=1$, and $\lambda=0$ from Theorem \ref{thm:isolp}. This is the natural choice of Brownian motion on the Toeplitz algebra. Firstly Sch\"urmann triples are said to be Gaussian if and only if the associated unital *-homomomorphism is of the form $\rho=\epsilon$. Furthermore, if the $V\in B(H)$ in Theorem \ref{thm:isolp} is chosen to be unitary, then the associated L\'evy process can be restricted to the quotient C*-algebra $\Tp/K(\ell_2(\nn_0))\cong C(\d B_{\cn})$ the continuous functions on the circle group. In the case above the associated L\'evy process corresponds to the standard Brownian motion on the real line ``wrapped'' around the circle. More explicitly the Sch\"urmann triple on the dense *-bialgebra $\Tp_0$ is given by \begin{align*} \rho(R_{n,m})=\eps(R_{n,m})=1,\quad \eta(R_{n,m})=n-m,\quad \text{ and }\quad L(R_{n,m})=-\frac{(n-m)^2}{2}. \end{align*} This has an associated $C_0$-convolution semigroup of states that acts on the dense *-bialgebra by \begin{align*} \phi_t(R_{n,m})=e^{-\frac{(n-m)^2}{2}t}. \end{align*} \end{example*} \section{$\zeta$-regularized traces of polyhomogeneous operators}\label{sec:zeta} In this section, we want to consider a class of operators that generate convolution semigroups on the Toeplitz algebra $\Tp$ which resemble pseudo-differential operators. In particular, the generator of Brownian motion, i.e., our version of the Laplacian, is an operator of this type. We will then show, that these operators have $\zeta$-regularized traces, i.e., analogues of the Kontsevich-Vishik trace and residue trace. Recall the following properties of the Toeplitz algebra $\Tp$ and generators of convolution semigroups on $\Tp$. \begin{enumerate} \item[(i)] The space $\Tp_0:=\opn{lin}\l\{R_{n,m};\ n,m\in\nn_0\r\}$ is a dense $^*$-subalgebra of $\Tp$. \item[(ii)] The co-unit $\eps$ satisfies $\fa m,n\in\nn_0:\ \eps(R_{n,m})=1$. \item[(iii)] The co-multiplication $\Delta$ satisfies \begin{align*} \fa m,n\in\nn_0\ \fa\alpha\in\cn:\ \Delta(\alpha R_{n.m})=\alpha R_{n,m}\otimes R_{n,m}. \end{align*} \item[(iv)] Let $L$ be the generating functional of a convolution semigroup $\omega$. Then, the corresponding operator semigroup is given by $t\mapsto (\id\otimes\omega_t)\circ\Delta$ and has generator $(\id\otimes L)\circ\Delta$. \end{enumerate} \begin{definition} An operator $H$ on $\Tp$ is called polyhomogeneous if and only if there exists a functional $L:\ \Tp_0\to\cn$ such that $H|_{\Tp_0}=(\id\otimes L)\circ\Delta$ and \begin{align*} \ex r\in\rn\ \ex I\sse\nn\ \ex\alpha\in \ell_1(I)\ \ex d\in(\cn[2]_{\Re(\cdot)<r})^I\ \fa m,n\in\nn_0:\ L(R_{n,m})=\sum_{\iota\in I}\alpha_\iota \sigma_{d_\iota}(m,n) \end{align*} where $\cn_{\Re(\cdot)<r}:=\{z\in\cn;\ \Re(z)<r\}$, $\cn[2]_{\Re(\cdot)<r}:=\cn_{\Re(\cdot)<r}\times\cn_{\Re(\cdot)<r}$, $\sigma_{d_\iota}:\ \rn[2]\to\cn$ is homogeneous of degree $d_\iota$, i.e., \begin{align*} \fa \lambda\in\rn_{>0}\ \fa\xi\in\rn[2]:\ \sigma_{d_\iota}(\lambda\xi)=\lambda^{d_\iota}\sigma_{d_\iota}(\xi), \end{align*} and $\sum_{\iota\in I}\alpha_\iota \sigma_{d_\iota}(m,n)$ is absolutely convergent. \end{definition} \begin{example*} The generating functional of Brownian motion is given by \begin{align*} \fa m,n\in\nn_0:\ L_{BM}(R_{n,m})=-\frac{(n-m)^2}{2}=\l(\frac{-1}{2}n^2m^0\r)+\l(n^1m^1\r)+\l(\frac{-1}{2}n^0m^2\r). \end{align*} Thus, the generator $H_{BM}$ of the Brownian motion semigroup $B$ is polyhomogeneous with finite $I$ and each $d_\iota=2$. \end{example*} Since $2H_{BM}$ is the Laplace-Beltrami on compact Riemannian manifolds without boundary, we obtain the following definition of the Laplacian on $\Tp$. \begin{definition} Let $H_{BM}=(\id\otimes L_{BM})\circ\Delta$ be the generator of Brownian motion. Then, we call the (polyhomogeneous) operator $\Delta_{\Tp}:=2H_{BM}$ the Laplacian on $\Tp$. \end{definition} We are now interested in $\zeta$-regularized traces of polyhomogeneous operators. Thus, in order to compute traces, the following results shine a light on their spectral properties. \begin{lemma} Let $L$ be the generating functional of a convolution semigroup of states on $\Tp$ and $H:=(\id\otimes L)\circ\Delta$. Then, $H$ is a closed, densely defined operator and \begin{align*} \fa n\in\nn\ \fa \lambda\in\rn_{>\omega}:\ \norm{(\lambda-H)^{-1}}\le\frac{1}{\lambda}. \end{align*} \end{lemma} \begin{proof} Let $\phi$ be the convolution semigroup of states generated by $L$. Then, $t\mapsto(\id\otimes\phi_t)\circ\Delta$ satisfies \begin{align*} \fa t\in\rn_{>0}:\ \norm{T(t)}=\norm{(\id\otimes\phi_t)\circ\Delta}\le\norm{\id\otimes\phi_t}\norm\Delta=1 \end{align*} and is a contraction semigroup on $\Tp$. Since $\Tp$ is a Banach space, the Theorem of Hille-Yosida-Phillips yields the result. \end{proof} \begin{lemma} Let $H=(\id\otimes L)\circ\Delta$ with $L:\ \Tp_0\to\cn$ linear. Then, the point spectrum $\sigma_p(H)$ of $H$ is given by \begin{align*} \l\{L(R_{n,m});\ m,n\in\nn_0\r\}\sse\sigma_p(H) \end{align*} including multiplicities and the spectrum $\sigma(H)$ of $H$ is given by \begin{align*} \sigma(H)=\oli{\l\{L(R_{n,m});\ m,n\in\nn_0\r\}}. \end{align*} In particular, if $\l\{L(R_{n,m});\ m,n\in\nn_0\r\}$ is closed in $\cn$, then \begin{align*} \sigma(H)=\sigma_p(H)=\l\{L(R_{n,m});\ m,n\in\nn_0\r\} \end{align*} including multiplicities. Furthermore, if $\sigma(H)\ssne\cn$, then $H$ is closable. \end{lemma} \begin{proof} Let $S:=\l\{L(R_{n,m});\ m,n\in\nn_0\r\}$. Then, we observe \begin{align*} \fa m,n\in\nn_0:\ HR_{n,m}=L(R_{n,m})R_{n,m}, \end{align*} i.e., $S\sse\sigma_p$ and $\oli{S}\sse\sigma(H)$ since the spectrum is always closed. Let $\lambda\in\cn\setminus\oli{S}$. Then, $\lambda-H$ is boundedly invertible\footnote{By ``boundedly invertible on $\Tp_0$'' we mean that $\lambda-H:\ \Tp_0\to\Tp_0$ is bijective, i.e., the inverse relation $(\lambda-H)^{-1}:=\{(x,y)\in\Tp[2]_0;\ (y,x)\in\lambda-H\}$ is an operator, and $(\lambda-H)^{-1}:\ \Tp_0\to\Tp_0$ is bounded with respect to the topology induced by $\Tp$.} on $\Tp_0$ and, since $\Tp_0$ is dense in $\Tp$, we obtain $\sigma(H)\sse\oli{S}$. Finally, assume $\sigma(H)\ssne\cn$ and let $\lambda\in\rho(H)$. Then, $\lambda-H$ is boundedly invertible, i.e., closable. Since $H$ is closable if and only if $\lambda-H$ is closable, we obtain the assertion. \end{proof} \begin{example*} The Laplacian $\Delta_{\Tp}$ and the heat-semigroup $T$ (generated by $\Delta_{\Tp}$) have pure point spectrum \begin{align*} \sigma(\Delta_{\Tp})=&\sigma_p(\Delta_{\Tp})=\l\{-(n-m)^2;\ m,n\in\nn_0\r\}\\ \fa t\in\rn_{\ge0}:\ \sigma(T(t))=&\sigma_p(T(t))=\l\{\exp\l(-(n-m)^2t\r);\ m,n\in\nn_0\r\} \end{align*} including multiplicities. \end{example*} \begin{remark*} Here we can see two very important differences to the classical theory. Namely, $\Delta_{\Tp}$ does not have compact resolvent and the heat-semigroup is not a semigroup of trace class operators (in fact, they are not even compact). In particular, this means that the heat-trace will need to be regularized. \end{remark*} Hence, we know which polyhomogeneous operators have pure point spectrum. However, since ``$\tr H=\sum_{\lambda\in\sigma(H)\setminus\{0\}}\mu_\lambda \lambda$'' (where $\mu_\lambda$ denotes the multiplicity of $\lambda$) will not converge in general, the idea is to use a spectral $\zeta$-regularization similar to ``$\sum_{n\in\nn}n=\zeta_R(-1)$'' where $\zeta_R$ is the Riemann $\zeta$-function. \begin{definition} Let $\Gf$ be a holomorphic family of operators satisfying \begin{align*} \fa z\in\cn:\ \Gf(z)=(\id\otimes L_{\Gf(z)})\circ\Delta=\Gf_0(z)+\Gf_p(z) \end{align*} such that each $\l\{L_{\Gf(z)}(R_{n,m});\ m,n\in\nn\r\}$ is closed, $\Gf_0(z)$ is of trace class for all $z\in\cn_{\Re(\cdot)<R}$ with $R\in\rn_{>0}$, and $\Gf_p$ is polyhomogeneous with \begin{align*} \fa m,n\in\nn_0:\ L_{p,\Gf(z)}(R_{n,m})=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}(m,n) \end{align*} where each $\alpha_\iota$ is holomorphic and $\delta\in\rn_{>0}$. Then, we call $\Gf$ a gauged polyhomogeneous operator with index set $I$. Furthermore, we call $\Gf$ normally gauged if and only if $\delta=1$. $\delta$ is called the gauge scaling. \end{definition} \begin{theorem}\label{thm:existence-zeta-function} Let $\Gf=\Gf_0+\Gf_p$ be a gauged polyhomogeneous operator on $\Tp$ with \begin{align*} \fa m,n\in\nn_0:\ L_{p,\Gf(z)}(R_{n,m})=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}(m,n) \end{align*} such that $\sigma(\Gf_p(z))=\sigma_p(\Gf(z))=\{L_{p,\Gf(z)}(R_{n,m});\ m,n\in\nn_0\}$. Then, $\Gf$ is of trace class if $\Re(d_\iota+\delta z)<-2$. Furthermore, the meromorphic extension $\zeta(\Gf)$ of \begin{align*} \cn_{\Re(\cdot)<\frac{-2-\sup\{\Re(d_\iota);\ \iota\in I\}}{\delta}}\ni z\mapsto\tr\Gf(z)\in\cn \end{align*} exists on a half space $\cn_{\Re(\cdot)<R}$ with $R\in\rn_{>0}$ and has at most simple poles at points in $\l\{\frac{-2-d_\iota}{\delta};\ \iota\in I\r\}$. \end{theorem} \begin{proof} Since $\Gf_0$ is of trace class on a half space $\cn_{\Re(\cdot)<R}$ with $R\in\rn_{>0}$, it suffices to consider $\Gf_p$. Since $\Gf_p(z)$ has the same spectrum as $D(z):=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}\l(\frac{\abs\nabla}{2}\r)$ on $\rn[2]/{2\pi\zn[2]}$. Thus, the result follows from the known pseudo-differential theory. \end{proof} \begin{corollary} Let $\Gf$ and $\Hf$ be gauged polyhomogeneous operators with $\Gf(0)=\Hf(0)$. \begin{enumerate} \item[(i)] The residue $c_{-1}(\zeta(\Gf),0)$ of $\zeta(\Gf)$ in zero is gauge-invariant up to the gauge scalings $\delta_{\Gf}$ and $\delta_{\Hf}$. More precisely, \begin{align*} \frac{c_{-1}(\zeta(\Gf),0)}{\delta_{\Gf}}=\frac{c_{-1}(\zeta(\Hf),0)}{\delta_{\Hf}}. \end{align*} \item[(ii)] Let $\fa\iota\in I:\ d_\iota\ne-2$. Then, the constant Laurent coefficient is gauge-invariant, i.e., \begin{align*} c_{0}(\zeta(\Gf),0)=c_{0}(\zeta(\Hf),0) \end{align*} \end{enumerate} \end{corollary} \begin{definition} Let $\Gf$ be a gauged polyhomogeneous operator. \begin{enumerate} \item[(i)] $\Gf(0)$ is called non-critical if and only if $\fa\iota\in I:\ d_\iota\ne-2$. \item[(ii)] Let $\Gf(0)$ be non-critical. Then, we define the $\zeta$-regularized trace of $\Gf(0)$ as \begin{align*} \tr_\zeta(\Gf(0)):=\zeta(\Gf)(0). \end{align*} \end{enumerate} \end{definition} Since criticality, i.e., whether or not there is a $d_\iota=-2$, determines the possible existence of a pole in zero, we will use the following terminology. The lowest order Laurent coefficient of $\zeta(\Gf)$ is independent of chosen gauge, i.e., it depends only on $\Gf(0)$, justifying the definition \begin{align*} \loLc(\Gf(0)):= \begin{cases} c_{-1}\l(\zeta(\Gf),0\r)&,\ \Gf(0)\text{ critical}\\ c_{0}\l(\zeta(\Gf),0\r)&,\ \Gf(0)\text{ non-critical} \end{cases} \end{align*} independent on whether or not these values are zero. \begin{prop} The lowest order Laurent coefficient is tracial given any normal gauge. More precisely, let $A=(\id\otimes L_A)\circ\Delta$ and $B=(\id\otimes L_B)\circ\Delta$ be polyhomogeneous operators. Then, $AB=BA$ and, if $AB$ is non-critical, $\tr_\zeta(AB)=\tr_\zeta(BA)$. \end{prop} \begin{proof} Note that $AB=BA$ since \begin{align*} \fa m,n\in\nn_0:\ ABR_{n,m}=&A\l(L_B(R_{n,m})R_{n,m}\r) =L_A(R_{n,m})L_B(R_{n,m})R_{n,m}\\ =&BAR_{n,m}. \end{align*} Let $\Hf$ be a gauged polyhomogeneous operator with $\Hf(0)=B$, $\Gf_1:=A\Hf$, and $\Gf_2:=\Hf A$. Then, $\Gf_1=\Gf_2$ and, hence, $\zeta(\Gf_1)=\zeta(\Gf_2)$. Since $\loLc$ is gauge independent, we obtain $\loLc(AB)=\loLc(BA)$. \end{proof} \begin{example*} Consider the Laplacian $\Delta_{\Tp}=(\id\otimes L_{\Delta_{\Tp}})\circ\Delta$ with \begin{align*} \fa m,n\in\nn_0:\ L_{\Delta_{\Tp}}\l(R_{n,m}\r)=-(n-m)^2=-n^2+2mn-m^2. \end{align*} Thus, $\Delta_{\Tp}$ is non-critical and $\tr_\zeta(\Delta_{\Tp})$ can be written as a Kontsevich-Vishik trace of a classical pseudo-differential operator which yields \begin{align*} \tr_\zeta(\Delta_{\Tp})=\trKV\l(-\frac{(\abs{\d_1}-\abs{\d_2})^2}{4}\r)=0 \end{align*} where $(\d_1,\d_2)$ is the gradient on $\rn[2]/{2\pi\zn[2]}$. More generally, let $p:\ \rn[2]\to\cn$ be a polynomial. An operator $D=(\id\otimes L)\circ\Delta$ with $L(R_{n,m})=p(m,n)$ is called a differential operator. Then, $D$ is non-critical and $\tr_\zeta(D)=0$. \end{example*} \section{The $\zeta$-regularized heat-trace}\label{sec:heat} For a compact Riemannian manifold $M$ without boundary and of even dimension $\dim M\in 2\nn$, the heat-trace, that is, the trace of the heat-semigroup $T$, has a polyhomogeneous expansion in the time parameter near zero which is of the form \begin{align*} \tr T(t)=\frac{\vol(M)}{(4\pi t)^{\frac{\dim M}{2}}}+\frac{\mathrm{total\ curvature}(M)}{3(4\pi)^{\frac{\dim M}{2}}t^{\frac{\dim M}{2}-1}}+\mathrm{higher\ order\ terms}. \end{align*} More generally, for $\dim M\in\nn$, the heat-trace has an expansion \begin{align*} \tr T(t)=(4\pi t)^{-\frac{\dim M}{2}}\sum_{k\in\nn_0}t^{\frac{k}{2}}A_k \end{align*} for $t\searrow0$ where the $A_k$ are called heat-invariants. These heat-invariants are spectral invariants of Laplace type operators $\nabla^*\nabla+V$ generating the corresponding ``heat-semigroup'' where $\nabla$ is a connection on a vector bundle over $M$ and $V$ is called the potential. In this section, we want to consider the heat-semigroup $T$ generated by $\Delta_{\Tp}$ on $\Tp$ and compute the heat-coefficient. However, while the heat-semigroup is a semigroup of trace class operators, this is no longer true for the Toeplitz algebra since \begin{align*} \sigma(T(t))=\sigma_p(T(t))=\l\{\exp\l(-t(n-m)^2\r);\ m,n\in\nn_0\r\} \end{align*} including multiplicities. In other words, each eigenvalue has multiplicity $\aleph_0$, i.e., $T(t)$ is bounded but not compact. Thus, we need to regularize $\tr T(t)$. However, if we na\"ively expand $\exp\l(-t(n-m)^2\r)=\sum_{k\in\nn_0}\frac{(-t)^k(n-m)^{2k}}{k!}$, we obtain a polyhomogeneous representation which fails to satisfy $\sup_{\iota\in I}\Re(d_{\iota})<\infty$. In other words, we cannot simply apply the theory developed in section~\ref{sec:zeta}. Thus, we define a slightly more general $\zeta$-function. \begin{definition} Let $\Gf=\l(\Gf(z)\r)_{z\in\cn[2]}$ be a holomorphic family of operators on $\Tp$. Then, we call $\Gf$ a generalized gauged polyhomogeneous operator (or generalized gauge) if and only if $\Gf(0)=1$ and $\fa z\in\cn[2]:\ \Gf(z)=\Gf_0(z)+(\id\otimes L_{p,\Gf(z)})\circ\Delta$ where $\Gf_0$ is of trace class for all $z\in\cn[2]_{\Re(\cdot)<R}$ for some $R\in\rn_{>0}$ and \begin{align*} \fa z\in\cn[2]\ \fa m,n\in\nn_0:\ L_{p,\Gf(z)}(R_{n,m})=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_{1,\iota}+\delta_1z_1}(m)\sigma_{d_{2,\iota}+\delta_2z_2}(n). \end{align*} Furthermore, let $H$ be a polyhomogeneous operator on $\Tp$. Then, we define $\zeta(H,\Gf)$ to be the maximal holomorphic extension of $z\mapsto\tr(H\Gf(z))$ with open, connected domain containing $\cn[2]_{\Re(\cdot)<r}$ for some $r\in\rn$ sufficiently small. \end{definition} \begin{corollary} Let $H=(\id\otimes L_H)\circ\Delta$ and $\Gf=(\id\otimes L_{\Gf})\circ\Delta$ a generalized gauge. Then, \begin{align*} \fa m,n\in\nn_0\ \fa z\in\cn[2]:\ H\Gf(z)R_{n,m}=L_H\l(R_{n,m}\r)L_{\Gf}(z)\l(R_{n,m}\r). \end{align*} \end{corollary} Eventually, we are interested in $\zeta(H,\Gf)(z,z)$ in a neighborhood of $z=0$. However, with the introduction of a second complex parameter, we can compute the limit $\lim_{z\to0}\zeta(H,\Gf)(z,z)$ by computing either $\lim_{z_1\to0}\lim_{z_2\to0}\zeta(H,\Gf)(z_1,z_2)$ or $\lim_{z_2\to0}\lim_{z_1\to0}\zeta(H,\Gf)(z_1,z_2)$ which may be significantly easier. This is possible since the identity theorem holds for holomorphic functions on $\Omega\sse\cn[n]$ in the usual sense, that is, if $\Omega$ is open and connected and a holomorphic function $f$ vanishes in an open subset of $\Omega$, then $f=0$. Thus, the $\zeta$-function in multiple variables is unique. Furthermore, since restricting a generalized gauge to the diagonal yields a gauge again, it suffices to check gauge independence of the lowest order Laurent coefficient at zero using gauges parametrized on $\cn$. \begin{lemma}\label{lemma-gauge-independence} Let $A$ be an operator on $\Tp$ and $\Gf$ and $\Hf$ gauged polyhomogeneous operators with $\Gf(0)=\Hf(0)$, $L_{\Gf(z)}\l(R_{n,m}\r)=\sigma_{\delta z}(m,n)$, and $L_{\Hf(z)}\l(R_{n,m}\r)=\tilde\sigma_{\delta z}(m,n)$. Then, the lowest order Laurent coefficient of $\zeta(A,\Gf)$ and $\zeta(A,\Hf)$ in zero coincide, i.e., depend only on $A$. \end{lemma} \begin{proof} Let $l$ be the order of the lowest order Laurent coefficient of $\zeta(A,\Gf)$ and $\zeta(A,\Hf)$. Then, $\If(z):=\frac{\Gf(z)-\Hf(z)}{z}$ is also a gauged polyhomogeneous operator and the order of the lowest order Laurent coefficient of $\zeta(A,\If)$ is $l$. In particular, $z\mapsto z^l\zeta(A,\If)(z)=z^{l-1}\l(\zeta(A,\Gf)(z)-\zeta(A,\Hf)(z)\r)$ is holomorphic in zero, i.e., the lowest order Laurent coefficients of $\zeta(A,\Gf)$ and $\zeta(A,\Hf)$ must coincide. \end{proof} Thus, we can compute the leading order coefficient of the $\zeta$-regularized heat-trace on $\Tp$. \begin{theorem}\label{thm:heat-trace-toeplitz} Let $\fa m,n\in\nn_0\ \fa z\in\cn[2]:\ L_{\Gf}(z)\l(R_{n,m}\r)=\sum_{\iota\in I}\alpha_\iota(z)n^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}$ with finite $I$, $\Gf=(\id\otimes L_{\Gf})\circ\Delta$ such that $\Gf(0)=1$, and $T$ the heat-semigroup on $\Tp$ (generated by $\Delta_{\Tp}$). Then, the following assertions are true. \begin{enumerate} \item[(i)] $\max\l\{\frac{\Re(z_1)}{\delta_{1,\iota}},\frac{\Re(z_2)}{\delta_{2,\iota}};\ \iota\in I\r\}<-1\ \then\ \fa t\in\rn_{\ge0}:\ T(t)\Gf(z_1,z_2)$ is of trace class. \item[(ii)] For all $t\in\rn_{>0}$, we obtain \begin{align*} \lim_{z_2\to0}\lim_{z_1\to0}\zeta(T(t),\Gf)(z_1,z_2)=-\frac{1}{2}-\sum_{k\in\nn}(k+1)e^{-tk^2} \end{align*} and \begin{align*} \Htr_{\Tp,\zeta,\Gf}(t)=\frac{1}{2}-\sum_{k\in\nn}(k-1)e^{-tk^2}. \end{align*} \item[(iii)] $\lim_{t\searrow0}\ 4\pi t\ \Htr_{\Tp,\zeta,\Gf}(t)=-2\pi$. \end{enumerate} \end{theorem} \begin{proof} ``(i)'' The assertion follows directly from the fact that $I$ is finite and each $\abs{L_{T(t)}\l(R_{n,m}\r)}\le1$. \paragraph{} ``(ii)'' Setting $k:=n-m$ we observe for $\Re(z_1)$ and $\Re(z_2)$ sufficiently small \begin{align*} \zeta(T(t),\Gf)(z)=&\sum_{m\in\nn}\sum_{n\in\nn}\sum_{\iota\in I}\alpha_\iota(z)e^{-t(n-m)^2}n^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}\\ =&\sum_{m\in\nn}\sum_{k\in\zn_{>-m}}\sum_{\iota\in I}\alpha_\iota(z)e^{-tk^2}(m+k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}\\ =&\sum_{m\in\nn}\l(\sum_{k=1-m}^0+\sum_{k\in\nn}\r)\sum_{\iota\in I}\alpha_\iota(z)e^{-tk^2}(m+k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}. \end{align*} Let us consider the $\sum_{k=1-m}^0$ case first. To assist readability, we will notationally suppress $\sum_{\iota\in I}\alpha_\iota(z)$ since $I$ is finite. Then, \begin{align*} \sum_{m\in\nn}\sum_{k=1-m}^0e^{-tk^2}(m+k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}=&\sum_{m\in\nn}\sum_{k=0}^{m-1}e^{-tk^2}(m-k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}\\ =&\sum_{k\in\nn_0}e^{-tk^2}\sum_{m\in\nn_{>k}}(m-k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2} \end{align*} is holomorphic in $z_1$ in a neighborhood of $0$ given $\Re(z_2)<-\frac{1}{\delta_{2,\iota}}$ and the limit $z_1\to0$ yields \begin{align*} \lim_{z_1\to0}\sum_{m\in\nn}\sum_{k=1-m}^0e^{-tk^2}(m+k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}=&\sum_{k\in\nn_0}e^{-tk^2}\sum_{m\in\nn_{>k}}m^{\delta_{2,\iota}z_2}\\ =&\sum_{k\in\nn_0}e^{-tk^2}\l(\zeta_R(-\delta_{2,\iota}z_2)-\sum_{m=1}^km^{\delta_{2,\iota}z_2}\r) \end{align*} which itself has a holomorphic extension in $z_2$ to a neighborhood of $0$, i.e., \begin{align*} \begin{aligned} \lim_{z_2\to0}\lim_{z_1\to0}\sum_{m\in\nn}\sum_{k=1-m}^0e^{-tk^2}(m+k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}=&\sum_{k\in\nn_0}e^{-tk^2}\l(\zeta_R(0)-k\r)\\ =&-\sum_{k\in\nn_0}e^{-tk^2}\frac{2k+1}{2}. \end{aligned} \end{align*} Considering the $\sum_{k\in\nn}$ term, we still have holomorphy in $z_1$ in a neighborhood of $0$ given $\Re(z_2)<-\frac{1}{\delta_{2,\iota}}$ and, thus, \begin{align*} \lim_{z_2\to0}\lim_{z_1\to0}\sum_{k\in\nn}\sum_{m\in\nn}e^{-tk^2}(m+k)^{\delta_{1,\iota}z_1}m^{\delta_{2,\iota}z_2}=&\lim_{z_2\to0}\sum_{k\in\nn}\sum_{m\in\nn}e^{-tk^2}m^{\delta_{2,\iota}z_2}\\ =&\lim_{z_2\to0}\sum_{k\in\nn}e^{-tk^2}\zeta_R(-\delta_{2,\iota}z_2)\\ =&-\frac{1}{2}\sum_{k\in\nn}e^{-tk^2}. \end{align*} Hence, \begin{align*} \lim_{z_2\to0}\lim_{z_1\to0}\zeta(T(t),\Gf)(z_1,z_2)=-\frac{1}{2}-\sum_{k\in\nn}(k+1)e^{-tk^2} \end{align*} since $\sum_{\iota\in I}\alpha_\iota(0)=1$. Since gauging terms with $m=0$ or $n=0$ yields the constant function $0$, we need to add these terms again for the heat-trace, i.e., \begin{align*} \Htr_{\Tp,\zeta,\Gf}(t)=-\frac{1}{2}-\sum_{k\in\nn}(k+1)e^{-tk^2}+1+2\sum_{k\in\nn}e^{-tk^2}=\frac{1}{2}-\sum_{k\in\nn}(k-1)e^{-tk^2}. \end{align*} \paragraph{} ``(iii)'' It suffices to consider the $-\sum_{k\in\nn}(k+1)e^{-tk^2}$ term since the remainder is a ``classical'' heat-trace on a $1$-dimensional compact manifold without boundary and, thus, has asymptotics proportional to $t^{-\frac12}$ for $t\searrow0$. We can estimate the series using the integral comparison test since $\rn_{>0}\ni x\mapsto(x+1)e^{-tx^2}\in\rn$ is increasing on $[0,K_t]$ and decreasing on $\rn_{\ge K_t}$ where $K_t:=\frac12\sqrt{\frac{2}{t}+1}-\frac12$. On $[0,K_t]$, we obtain \begin{align*} \sum_{k=1}^{\lfloor K_t\rfloor-1}(k+1)e^{-tk^2}\le\int_1^{\lfloor K_t\rfloor}(x+1)e^{-tx^2}dx\le\sum_{k=2}^{\lfloor K_t\rfloor}(k+1)e^{-tk^2} \end{align*} and \begin{align*} \kappa_t:=\int_1^{\lfloor K_t\rfloor}(x+1)e^{-tx^2}dx=&\frac{\sqrt{\pi t}\erf(\sqrt t\lfloor K_t\rfloor)-e^{-t\lfloor K_t\rfloor^2}}{2t}-\frac{\sqrt{\pi t}\erf(\sqrt t)-e^{-t}}{2t} \end{align*} where $\erf$ denotes the error function (with range $[-1,1]$). Then, we obtain \begin{align*} \sum_{k=1}^{\lfloor K_t\rfloor}(k+1)e^{-tk^2}\in\l[\kappa_t+2e^{-t},\kappa_t+(\lfloor K_t\rfloor+1)e^{-t\lfloor K_t\rfloor^2}\r]. \end{align*} Similarly, on $\rn_{\ge K_t}$, we obtain \begin{align*} \sum_{k\in\nn_{\ge \lfloor K_t\rfloor+2}}(k+1)e^{-tk^2}\le\int_{\rn_{\ge \lfloor K_t\rfloor+1}}(x+1)e^{-tx^2}dx\le\sum_{k\in\nn_{\ge \lfloor K_t\rfloor+1}}(k+1)e^{-tk^2} \end{align*} and \begin{align*} \lambda_t:=\int_{\rn_{\ge \lfloor K_t\rfloor+1}}(x+1)e^{-tx^2}dx=&\frac{\sqrt{\pi}}{2\sqrt t}-\frac{\sqrt{\pi t}\erf(\sqrt t(\lfloor K_t\rfloor+1))-e^{-t(\lfloor K_t\rfloor+1)^2}}{2t} \end{align*} which yields \begin{align*} \sum_{k\in\nn_{\ge \lfloor K_t\rfloor+1}}(k+1)e^{-tk^2}\in\l[\lambda_t,\lambda_t+(\lfloor K_t\rfloor+2)e^{-t(\lfloor K_t\rfloor+1)^2}\r]. \end{align*} Hence, \begin{align*} \sum_{k\in\nn}(k+1)e^{-tk^2}-\kappa_t-\lambda_t\in\l[2e^{-t},(\lfloor K_t\rfloor+1)e^{-t\lfloor K_t\rfloor^2}+(\lfloor K_t\rfloor+2)e^{-t(\lfloor K_t\rfloor+1)^2}\r]. \end{align*} In order to compute $\lim_{t\searrow0}t\sum_{k\in\nn}(k+1)e^{-tk^2}$, we need to study $\lim_{t\searrow0}\sqrt t\lfloor K_t\rfloor$ first. Let $\lfloor K_t\rfloor=n$. Then, \begin{align*} n\le K_t=\frac12\sqrt{\frac{2}{t}+1}-\frac12<n+1 \end{align*} implies \begin{align*} \frac{2}{(2n+3)^2-1}<t\le\frac{2}{(2n+1)^2-1}. \end{align*} In other words, \begin{align*} \lfloor K_t\rfloor=n\quad \then\quad\sqrt t\lfloor K_t\rfloor\in\l(\frac{n\sqrt2}{\sqrt{(2n+3)^2-1}},\frac{(n+1)\sqrt2}{\sqrt{(2n+1)^2-1}}\r] \end{align*} which yields \begin{align*} \lim_{t\searrow0}\sqrt t\lfloor K_t\rfloor\in\l[\lim_{n\to\infty}\frac{\sqrt2}{\sqrt{\frac{(2n+3)^2-1}{n^2}}},\lim_{n\to\infty}\frac{\sqrt2}{\sqrt{\frac{(2n+1)^2-1}{(n+1)^2}}}\r]=\{1\}. \end{align*} Finally, this implies \begin{align*} \lim_{t\searrow0}t\kappa_t=&\lim_{t\searrow0}\frac{\sqrt{\pi t}\erf(\sqrt t\lfloor K_t\rfloor)-e^{-t\lfloor K_t\rfloor^2}}{2}-\frac{\sqrt{\pi t}\erf(\sqrt t)-e^{-t}}{2}=\frac{1-e^{-1}}{2}\\ \lim_{t\searrow0}t\lambda_t=&\lim_{t\searrow0}\frac{\sqrt{\pi t}}{2}-\frac{\sqrt{\pi t}\erf(\sqrt t(\lfloor K_t\rfloor+1))-e^{-t(\lfloor K_t\rfloor+1)^2}}{2}=\frac{e^{-1}}{2}, \end{align*} i.e., \begin{align*} \lim_{t\searrow0}4\pi t\ \Htr_{\Tp,\zeta,\Gf}(t)=\lim_{t\searrow0}-2\pi t-4\pi t\sum_{k\in\nn}(k+1)e^{-tk^2}=-4\pi\lim_{t\searrow0}t\kappa_t+t\lambda_t=-2\pi. \end{align*} \end{proof} \begin{remark*} This result is very interesting as well, since it says the ``heat-invariants'' and ``criticality'' in section~\ref{sec:zeta} indicate that $\Tp$ is a ``quantum manifold'' of dimension $2$ with ``volume'' $-2\pi$. This stands in stark contrast to the classical background. The Brownian motion on $\Tp$ is induced by Brownian motion on the circle $\rn/{2\pi\zn}$. Yet, we do not observe ``criticality'' $-1$ and $\lim_{t\searrow0}\sqrt{4\pi t}\Htr_{\Tp,\zeta,\Gf}(t)\in\rn\setminus\{0\}$ which would be expected if Brownian motion in $\Tp$ inherited the properties of Brownian motion in $\rn/{2\pi\zn}$. However, there is a way of making sense of these results. $\Tp_0$ can be seen as the semigroup algebra of the bicyclic semigroup and $\Tp$ as the universal inverse semigroup C*-algebra of the bicyclic semigroup. In a sense we can view $\Tp$ as the ``generalized Pontryagin type dual'' of the bicyclic semigroup which would give rise to the dimension $2$. \end{remark*} \section{The discrete Heisenberg group algebras}\label{sec:heisenberg} In this section, we want to consider the $\zeta$-regularized trace and $\zeta$-heat-trace on the group algebra generated by the discrete Heisenberg groups. \begin{definition}\label{def:heisenberg} Let $N\in\nn$ and $P_j$, $Q_j$ ($j\in\nn_{\le N}$), and $Z$ be unitaries satisfying $P_iZ=ZP_i$, $Q_jZ=ZQ_j$, $P_iP_j=P_jP_i$, $Q_iQ_j=Q_jQ_i$, $P_iQ_j=Q_jP_i$ for $i\ne j$, and $P_iQ_i=ZQ_iP_i$. The discrete Heisenberg group algebra $\Hn_N$ of dimension $2N+1$ is the universal C*-algebra generated by $\l\{R_{m,n,p}:=P^mQ^nZ^p;\ m,n\in\zn[N], p\in\zn\r\}$. $\Hn_N$ carries the structure of a C*-bialgebra by extending the maps $\Delta(R_{m,n,p})=R_{m,n,p}\otimes R_{m,n,p}$ and $\eps(R_{m,n,p})=1$. \end{definition} \begin{prop} Let $H$ be a Hilbert space, $\eta_{P_j}, \eta_{Q_j}$ be elements of $H$ such that $$\eta_P:=(\langle\eta_{P_i},\eta_{P_j} \rangle)_{1\leq i,j\leq N}\in M_N(\rn),\quad \eta_Q:=(\langle\eta_{Q_i},\eta_{Q_j} \rangle)_{1\leq i,j\leq N}\in M_N(\rn)$$ and $\Im(\langle\eta_{P_i},\eta_{Q_j} \rangle)$ is constant over $i,j\in \{1,\dots N\}$ and let $\lambda_{P_j}$ and $\lambda_{Q_j}$ be real numbers then there exists a unique Gaussian Sch\" urmann triple on the discrete Heisenberg group algebra such that \begin{align*} \eta(P_j)&=\eta_{P_j},&\eta(Q_j)&=\eta_{Q_j},\\ L(P_j-P_j)&=2i \lambda_{P_j} & L(Q_j-Q_j)&=2i \lambda_{Q_j}. \end{align*} Furthermore every Gaussian Sch\"urmann triple on the discrete Heisenberg group algebra arises this way. \end{prop} \begin{proof} The method of proof is identical to that of Theorem \ref{thm:isolp}. Given a Gaussian Sch\"urmann triple on $\Hn_N$ the commutativity conditions and the product rule on $L$ give the real constraint on the matrices $\eta_P$ and $\eta_Q$. Note that for Gaussian cocycles the relation $PQ=ZQP$ implies that $\eta(Z)=0$. The constant imaginary constraint, $\Im\langle \eta_{P_i},\eta_{Q_j}\rangle$, is a result of the product rule on $L$ and the identity $L(P_{i}Q_{j})=L(ZQ_{j}P_{i})$ which implies that $L(Z)=\langle \eta_{P_i},\eta_{Q_j}\rangle-\langle \eta_{Q_j},\eta_{P_i}\rangle$ for all $i,j$. \end{proof} \begin{corollary} Every Gaussian generating functional on the discrete Heisenberg group algebra is of the form $$L(P^mQ^nZ^p)=i(m\cdot\lambda_P+n\cdot \lambda_Q+p \lambda_Z)-\frac{1}{2}\begin{pmatrix}m&n\end{pmatrix}\begin{pmatrix}\eta_P &\eta_{PQ}\\ \eta_{PQ}^t& \eta_Q\end{pmatrix}\begin{pmatrix}m\\n\end{pmatrix}$$ for all $m,n\in \zn[N]$ and $p\in \zn$ where $\eta_{PQ}:=(\langle\eta_{P_i},\eta_{Q_j}\rangle)_{1\leq i,j\leq N}$. \end{corollary} \begin{example*} Note that the generating functional in the previous Corollary strongly resembles the exponent of the characteristic function of a multivariate normal distribution. Furthermore, if $\lambda_Z=0$ then $\eta_{PQ}\in M_N(\rn)$ and the corresponding L\'evy process can be restricted to the classical $2N$-torus via the quotient by the ideal generated by $Z-I$. In this case the vectors $\lambda_P$ and $\lambda_Q$ dictate the drift in various directions and the matrices $\eta_P,\eta_Q$ and $\eta_{PQ}$ give us information of the covariance. The canonical choice of Brownian motion on a multidimensional object is without drift and should consist of independent one-dimensional Brownian motions in each direction. In this scenario, this can be achieved by the choice $H=\cn[2N]$, $\eta_{P_i}=e_i$, $\eta_{Q_j}=e_{N+j}$, $\lambda_{P_i}=\lambda_{Q_j}=0$. Thus, \begin{align*} \fa \mu=(m,n)\in\zn[2N]\ \fa p\in\zn:\ L(R_{\mu,p})=-\frac{1}{2}\norm{\mu}_{\ell_2(2N)}^2. \end{align*} \end{example*} This warrants the following definition of polyhomogeneous operators on $\Hn_N$. \begin{definition} An operator $H:=(\id\otimes L)\circ \Delta$ on $\Hn_N$ is called polyhomogeneous if and only if $\ex r\in\rn\ \ex I\sse\nn\ \ex\alpha\in \ell_1(I)\ \ex d\in(\cn[2N+1]_{\Re(\cdot)<r})^I\ \fa \mu\in\zn[2N+1]:$ \begin{align*} L(R_\mu)=\sum_{\iota\in I}\alpha_\iota \mu^{d_\iota} \end{align*} where we assume that each $\sum_{\iota\in I}\alpha_\iota \mu^{d_\iota}$ is absolutely convergent. \end{definition} Similar to the Toeplitz case, we obtain that the spectrum of a polyhomogeneous operator $H$ is given by the closure of the point spectrum \begin{align*} \sigma_p(H)=\l\{L\l(R_\mu\r);\ \mu\in\zn[2N+1]\r\} \end{align*} and we can define gauged polyhomogeneous operators in a similar fashion. \begin{definition} Let $\Gf$ be a poly-holomorphic family of operators satisfying \begin{align*} \fa z\in\cn:\ \Gf(z)=(\id\otimes L(z))\circ\Delta \end{align*} such that each $\l\{L(z)(R_\mu);\ \mu\in\zn[2N+1]\r\}$ is closed and each $\Gf(z)$ is polyhomogeneous with \begin{align*} \fa \mu\in\zn[2N+1]:\ L(z)(R_\mu)=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}(\mu) \end{align*} where each $\alpha_\iota$ is holomorphic, $\sigma_{d}:\ \rn[2N+1]\to\cn$ is homogeneous of degree $d$, i.e., $\fa\lambda\in\rn_{>0}:\ \sigma_d(\lambda\cdot)=\lambda^d\sigma_d$, and $\delta\in\rn_{>0}$. Then, we call $\Gf$ a gauged polyhomogeneous operator with index set $I$. Furthermore, we call $\Gf$ normally gauged if and only if $\delta=1$. \end{definition} We can then show that $\zeta$-functions exist. \begin{theorem}\label{thm:existence-zeta-function-heisenberg} Let $\Gf$ be a gauged polyhomogeneous operator with \begin{align*} \fa \mu\in\zn[2N+1]:\ L(z)(R_\mu)=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}(\mu). \end{align*} Then, $\Gf(z)$ is of trace class if $\fa \iota\in I:\ \Re(d_{\iota}+\delta z)<-2N-1$ and the $\zeta$-function $\zeta(\Gf)$ defined by meromorphic extension of $z\mapsto\tr\Gf(z)$ has isolated first order poles in the set $\l\{\frac{-2N-1-d_{\iota}}{\delta};\ \iota\in I\r\}$. Furthermore, the lowest order Laurent coefficient is tracial. \end{theorem} \begin{proof} Consider the torus $T:=\rn[2N+1]/{2\pi\zn[2N+1]}$. Then, $\Gf(z)$ has the same spectrum as $D(z):=\sum_{\iota\in I}\alpha_\iota(z)(i\d)^{d_\iota+\delta_\iota z}$ where $\d_k$ is the derivative in the $k$\textsuperscript{th} coordinate direction. In particular, we obtain that $D(z)$ is of trace class if all $\Re(d_\iota+\delta z)<-2N-1$ and since $D(z)$ is a pseudo-differential operator on $T$, we obtain the assertion from the established pseudo-differential theory. \end{proof} \begin{corollary} Let $\Gf$ be a gauged differential operator on $\Hn[N]$. Then, $I$ is finite and all $d_\iota\in\nn_0$. Then, $\zeta(\Gf)=0$. \end{corollary} Similarly, the heat-trace in $\Hn_N$ can be reduced to the heat-trace in $\rn[2N]/{2\pi\zn[2N]}$. \begin{theorem} Let $T$ be the heat-semigroup on $\Hn_N$, $S$ the heat-semigroup on $\rn[2N]/{2\pi\zn[2N]}$, and $\Gf$ a gauged polyhomogeneous operator on $\Hn_N$ with $\Gf(0)=1$. Then, the $\zeta$-regularized heat-trace $\Htr_{\Hn_N,\zeta,\Gf}$ on $\Hn_N$ satisfies \begin{align*} \Htr_{\Hn_N,\zeta,\Gf}(t)=\zeta(T(t),\Gf)(0)=-\tr S(t). \end{align*} In particular, the $k$\textsuperscript{th} heat coefficient $A_k(\Hn_N)$ of $\Hn_N$ is $-A_k(\rn[2N]/{2\pi\zn[2N]})$ where $A_k(\rn[2N]/{2\pi\zn[2N]})$ is the $k$\textsuperscript{th} heat coefficient of $\rn[2N]/{2\pi\zn[2N]}$. \end{theorem} \begin{proof} Using the same argument as in Lemma~\ref{lemma-gauge-independence}, we obtain gauge independence of $\zeta(T(t),\Gf)(0)$ and can choose $\delta',\delta''\in\rn_{>0}$ such that $\fa\mu\in\zn[2N]\ \fa p\in\zn:\ L_{\Gf(z)}(R_{\mu,p})=\norm{\mu}_{\ell_2(2N)}^{\delta'z}\abs p^{\delta'' z}$. Hence, there exists a gauged polyhomogeneous operator $\Hf$ on $\rn[2N]/{2\pi\zn[2N]}$ with $\Hf(0)=1$ such that \begin{align*} \tr T(t)\Gf(z)=&\sum_{p\in\zn}\ubr{\sum_{\mu\in\zn[2N]}e^{-t\norm\mu_{\ell_2(2N)}^2}\norm{\mu}_{\ell_2(2N)}^{\delta'z}}_{\text{gauged trace of }S(t)}\abs p^{\delta'' z}\\ =&2\tr(S(t)\Hf(z))\sum_{p\in\nn}\abs p^{\delta'' z}\\ =&2\zeta_R(-\delta''z)\tr S(t)\Hf(z) \end{align*} where $\zeta_R$ is the Riemann $\zeta$-function, i.e., $\zeta_R(0)=-\frac12$. \end{proof} \section{The discrete Heisenberg group algebras with $Z\in\cn$}\label{sec:heisenberg-Z-complex} In section~\ref{sec:heisenberg} we considered $\Hn_N$ as generated by the $P_i$, $Q_j$, and $Z$. However, if $Z\in\cn$, then $Z$ is not a generator and we obtain the ``reduced'' algebra $\Hn[r]_N$. Thus, $\Hn[r]_N$ has the generators $\{P^mQ^n;\ m,n\in\zn\}$ and we obtain the following two theorems. \begin{theorem}\label{thm:existence-zeta-function-heisenberg-reduced} Let $\Gf$ be a gauged polyhomogeneous operator with \begin{align*} \fa \mu\in\zn[2N]:\ L(z)((P,Q)^\mu)=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}(\mu). \end{align*} Then, $\Gf(z)$ is of trace class if $\fa \iota\in I:\ \Re(d_{\iota}+\delta z)<-2N$ and the $\zeta$-function $\zeta(\Gf)$ defined by meromorphic extension of $z\mapsto\tr\Gf(z)$ has isolated first order poles in the set $\l\{\frac{-2N-d_{\iota}}{\delta};\ \iota\in I\r\}$. Furthermore, the lowest order Laurent coefficient is tracial. \end{theorem} \begin{theorem}\label{thm:reduced-heisenberg-heat-trace} Let $T$ be the heat-semigroup on $\Hn[r]_N$ and $S$ the heat-semigroup on $\rn[2N]/{2\pi\zn[2N]}$. Then, $\fa t\in\rn_{>0}:\ T(t)$ is of trace class and \begin{align*} \Htr_{\Hn[r]_N}(t)=\tr T(t)=\tr S(t). \end{align*} In particular, the $k$\textsuperscript{th} heat coefficient $A_k(\Hn[r]_N)$ of $\Hn[r]_N$ coincides with the $k$\textsuperscript{th} heat coefficient $A_k(\rn[2N]/{2\pi\zn[2N]})$ of $\rn[2N]/{2\pi\zn[2N]}$. \end{theorem} \begin{remark*} These results do not come as a surprise, since $\Hn[r]_1$ is the non-commutative $2$-torus $A_\theta$ generated by two unitaries $U$ and $V$ satisfying $UV=e^{-2\pi i\theta}VU$ where $\theta\in\rn$. As such the family $(A_\theta)_{\theta\in\rn}$ is a fundamental class of examples of non-commutative spaces generalizing the algebra of continuous functions on the $2$-torus; a property recovered by the Brownian motion approach to the heat-trace. \end{remark*} \section{The non-commutative torus}\label{sec:non-com-torus} Having observed the non-commutative $2$-torus as a special case of the discrete Heisenberg group, we want to continue studying more general non-commutative tori. This will also give us a direct means of comparison with the classical heat-trace approach on the non-commutative torus $\Tn[n]_\theta$ as studied in \cite{azzali-levy-neira-paycha,levy-neira-paycha}. There, too, the heat-trace recovered the dimension of the underlying torus, i.e., the commutative case $\Tn[n]_0=\rn[n]/{2\pi\zn[n]}$. Let us first recall the usual construction of the non-commutative torus. Given a real symmetric $N\times N$ matrix $\theta$ and unitaries $U_k$ with $k\in\zn[N]$, $U_0=1$, and \begin{align*} \fa m,n\in\zn[N]:\ U_mU_n=e^{-\pi i\langle m,\theta n\rangle_{\ell_2(N)}}U_{m+n}, \end{align*} we consider the algebra $A_\theta:=\l\{\sum_{k\in\zn[N]}a_k U_k;\ a\in\Sp(\zn[N])\r\}$ where $\Sp$ denotes the Schwartz space. Then, it is possible to define a corresponding algebra of pseudo-differential operators which has been extensively studied in~\cite{levy-neira-paycha}. The for us interesting operator is the Laplace $\Delta_\theta:=\sum_{j=1}^N\d_j^2$ where $\d_j\sum_{k\in\zn[N]}a_k U_k:=\sum_{k\in\zn[N]}k_ja_k U_k$. Since we need our algebra to be a C*-bialgebra, we consider the C*-algebra $\Ap[N]_\theta$ generated by the $U_k$ ($k\in\zn[N]$) as well as a finite set of additional (unitary) generators $\l\{Z_\tau;\ \tau\in {\Tf}\r\}$ (${\Tf}\in\nn$), and set $\eps(U_k)=\eps(Z_\tau)=1$, $\Delta(U_k)=U_k\otimes U_k$, and $\Delta(Z_\tau)=Z_\tau\otimes Z_\tau$. The $Z_\tau$ are a generalized version of the $e^{-\pi i\theta_{k,l}}$ which we consider to be generators as well (for now). Thus, the Laplacian $\Delta_{\theta}$ has the generating functional $L$ which satisfies \begin{align*} \fa p\in \zn[{\Tf}]\ \fa k\in \zn[N]:\ L_{\Delta_{\theta}}(Z^pU_k)=-\norm k_{\ell_2(N)}^2. \end{align*} This follows from $\Delta_\theta\sum_{k\in\zn[N]}a_k U_k=\sum_{k\in\zn[N]}\sum_{j=1}^N k_j^2 a_k U_k$ and is consistent with the Brownian motion approach (cf. example below Definition~\ref{def:heisenberg}). In particular, we obtain similar results to the Heisenberg group algebra case. \begin{theorem}\label{thm:existence-zeta-function-nc-torus} Let $\Gf$ be a gauged polyhomogeneous operator on $\Ap[N]_\theta$ with \begin{align*} \fa p\in \zn[{\Tf}]\ \fa k\in \zn[N]:\ L(z)(Z^pU_k)=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}((p,k)). \end{align*} Then, $\Gf(z)$ is of trace class if $\fa \iota\in I:\ \Re(d_{\iota}+\delta z)<-N-{\Tf}$ and the $\zeta$-function $\zeta(\Gf)$ defined by meromorphic extension of $z\mapsto\tr\Gf(z)$ has isolated first order poles in the set $\l\{\frac{-N-{\Tf}-d_{\iota}}{\delta};\ \iota\in I\r\}$. Furthermore, the lowest order Laurent coefficient is tracial. \end{theorem} \begin{corollary} Let $\Gf$ be a gauged differential operator on $\Ap[N]_\theta$. Then, $I$ is finite and all $d_\iota\in\nn_0$. Then, $\zeta(\Gf)=0$. \end{corollary} \begin{theorem} Let $T$ be the heat-semigroup on $\Ap[N]_\theta$, $S$ the heat-semigroup on $\rn[N]/{2\pi\zn[N]}$, and $\Gf$ a gauged polyhomogeneous operator on $\Ap[N]_\theta$ with $\Gf(0)=1$. Then, the $\zeta$-regularized heat-trace $\Htr_{\Ap[N]_\theta,\zeta,\Gf}$ on $\Ap[N]_\theta$ satisfies \begin{align*} \Htr_{\Ap[N]_\theta,\zeta,\Gf}(t)=\zeta(T(t),\Gf)(0)=(-1)^{\Tf}\tr S(t). \end{align*} In particular, the $k$\textsuperscript{th} heat coefficient $A_k(\Ap[N]_\theta)$ of $\Ap[N]_\theta$ is $(-1)^{\Tf}A_k(\rn[N]/{2\pi\zn[N]})$ where $A_k(\rn[N]/{2\pi\zn[N]})$ is the $k$\textsuperscript{th} heat coefficient of $\rn[N]/{2\pi\zn[N]}$. \end{theorem} Similarly, for $A^N_\theta$, i.e., the case $Z\in\cn[{\Tf}]$, we obtain the following analogous theorems. \begin{theorem} Let $\Gf$ be a gauged polyhomogeneous operator on $A^N_\theta$ with \begin{align*} \fa k\in \zn[N]:\ L(z)(U_k)=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}(k). \end{align*} Then, $\Gf(z)$ is of trace class if $\fa \iota\in I:\ \Re(d_{\iota}+\delta z)<-N$ and the $\zeta$-function $\zeta(\Gf)$ defined by meromorphic extension of $z\mapsto\tr\Gf(z)$ has isolated first order poles in the set $\l\{\frac{-N-d_{\iota}}{\delta};\ \iota\in I\r\}$. Furthermore, the lowest order Laurent coefficient is tracial. \end{theorem} \begin{corollary} Let $\Gf$ be a gauged differential operator on $A^N_\theta$. Then, $I$ is finite and all $d_\iota\in\nn_0$. Then, $\zeta(\Gf)=0$. \end{corollary} \begin{theorem} Let $T$ be the heat-semigroup on $A^N_\theta$ and $S$ the heat-semigroup on $\rn[N]/{2\pi\zn[N]}$. Then, $\fa t\in\rn_{>0}:\ T(t)$ is of trace class and \begin{align*} \Htr_{A^N_\theta}(t)=\tr T(t)=\tr S(t). \end{align*} In particular, the $k$\textsuperscript{th} heat coefficient $A_k(A^N_\theta)$ of $A^N_\theta$ coincides with the $k$\textsuperscript{th} heat coefficient $A_k(\rn[N]/{2\pi\zn[N]})$ of $\rn[N]/{2\pi\zn[N]}$. \end{theorem} \section{Gaussian invariants of $SU_q(2)$}\label{sec:SUq2} Finally, we want to have a look at the quantum group $SU_q(2)$. This case is particularly interesting since there is a canonical choice of Brownian motion for the classical case $SU_1(2)=SU(2)$ but not necessarily for $SU_q(2)$ for $q\ne 1$. There is a unique driftless Gaussian (up to time scaling) on each $SU_q(2)$ for $q\ne 1$ which we will treat as the heat-semigroup even though it can not be the heat-semigroup on $SU(2)$. This will allow us to compute a $\zeta$-regularized trace and recover that $SU_q(2)$ is $3$-dimensional. We will begin with a quick summary of Section 6.2 of \cite{timmermann}. In order to construct $SU_q(2)$, let us start with the compact Lie group \begin{align*} SU(2):=\l\{g_{\alpha,\gamma}:= \begin{pmatrix} \alpha&-\gamma^*\\ \gamma&\alpha^* \end{pmatrix}\in B\l(\cn[2]\r);\ \alpha,\gamma\in\cn,\ \det g_{\alpha,\gamma}=1\r\} \end{align*} and define $a,c\in C(SU(2))$ by $a(g_{\alpha,\gamma}):=\alpha$ and $c(g_{\alpha,\gamma})=\gamma$. Then, the C*-algebra generated by $a$ and $c$ subject to $a^*a+c^*c=1$ is a C*-algebraic compact quantum group with co-multiplication $\Delta$ given by \begin{align*} \Delta(a)=a\otimes a+c\otimes c\qquad\text{and}\qquad\Delta(c)=c\otimes a+a^*\otimes c, \end{align*} co-unit $\eps(a)=1$, $\eps(c)=0$, and antipode $S(a)=a^*$, $S(a^*)=a$, $S(c)=-c$, and $S(c^*)=-c^*$. \begin{definition} Let $q\in[-1,1]\setminus\{0\}$. Then, we define $SU_q(2)$ to be the universal unital C*-algebra generated by elements $a$ and $c$ subject to the condition that \begin{align*} u:= \begin{pmatrix} a&-qc^*\\c&a^* \end{pmatrix} \end{align*} is unitary, i.e., \begin{enumerate} \item[(i)] $a^*a+c^*c=1$ \item[(ii)] $aa^*+q^2c^*c=1$ \item[(iii)] $c^*c=cc^*$ \item[(iv)] $ac=qca$ \item[(v)] $ac^*=qc^*a$ \end{enumerate} Furthermore, $SU_q(2)$ is endowed with the co-unit $\eps$ given by $\eps(a)=1$ and $\eps(c)=0$, and co-multiplication given by \begin{align*} \Delta(a)=a\otimes a-q c^*\otimes c\qquad\text{and}\qquad\Delta(c)=c\otimes a+a^*\otimes c. \end{align*} \end{definition} If we let $SU^0_q(2)\sse SU_q(2)$ denote the *-subalgebra generated by $a$ and $c$ and $\Delta_0$ and $\eps_0$ the co-multiplication $\Delta$ and co-unit $\eps$ restricted to this *-subalgebra then $(SU^0_q(2), \Delta_0,\eps_0 ) = (SU_q(2), \Delta,\eps)_0$ is the associated algebraic compact quantum group to $(SU_q(2), \Delta,\eps)$. Furthermore, the family $(a_{kmn})_{(k,m,n)\in\zn\times\nn_0\times\nn_0}$ defined as \begin{align*} a_{k,m,n}:= \begin{cases} a^k(c^*)^m c^n&,\ k\in\nn_0\\ (a^*)^{-k}(c^*)^m c^n&,\ k\in-\nn \end{cases} \end{align*} is a basis of $SU_q^0(2)$. The Gaussian generating functionals on $SU_q(2)$ for $|q|\in (0,1)$ are classified in~\cite{schurmann-skeide}. For the quantum group we have a family of characters $\eps_\phi:\ SU_q(2)\to \cn$ for such that \begin{align*} \eps_\phi(a)=e^{i\phi}\quad \text{ and }\quad \eps_{\phi}(c)=0. \end{align*} This family of characters is pointwise continuous with respect to $\phi$ and satisfies $\eps_0=\eps$. On the basis $\{a_{kmn};\ (k,m,n)\in\zn\times\nn_0\times\nn_0\}$ of the dense subalgebra we have that $\eps_\phi(a_{kmn})=e^{ik\phi}\delta_{m+n,0}$ for $\phi\in \rn$. We will define linear functionals $\eps'(a_{kmn})=\d_\phi\eps_\phi(a_{kmn})|_{\phi=0}=ik\delta_{m+n,0}$ and $\eps''(a_{kmn})=\d_\phi^2\eps_\phi(a_{kmn})|_{\phi=0}=-k^2\delta_{m+n,0}$. \begin{prop} All Gaussian generating functionals are of the form \begin{align*} L=r_D\eps'+r\eps'' \end{align*} where $r_D\in \rn$ and $r\in \rn_{>0}$. \end{prop} By the definition of drift, the parameter $r_D$ contributes only to drift so we will only consider $r_D=0$. This leaves only positive multiples of $\eps''$. \begin{prop} The operator $T_L:=(\id\otimes \eps'')\circ\Delta:\ SU_q(2)\to SU_q(2)$ takes the following values on $\{a_{kmn};\ (k,m,n)\in\zn\times\nn_0\times\nn_0\}$ \begin{align*} T_L(a_{kmn})=-(k-m+n)^2a_{kmn}. \end{align*} \end{prop} \begin{proof} First note that \begin{align*} \Delta(a_{kmn})=(a\otimes a-qc^*\otimes c)^k(c^*\otimes a^*+a\otimes c^*)^m(c\otimes a+a^*\otimes c)^n \end{align*} for all $(k,m,n)\in \zn\times \nn_0\times \nn_0$ and, using the commutation rules, we can simplify so that \begin{align*} a^ka^{*m}a^n=a^{k-m+n}+\text{ terms with } c. \end{align*} Then, by applying $\eps''$ to the right leg of the tensor product, we observe that the only non-zero term is given by $a^{k-m+n}$, i.e., \begin{align*} \ T_L(a_{kmn})=a^kc^{*m}c^n\epsilon''(a^ka^{*m}a^n)=-(k-m+n)^2a_{kmn}. \end{align*} for all $(k,m,n)\in\zn\times \nn_0\times \nn_0$. \end{proof} \begin{corollary} Let $\Gf$ be a gauged polyhomogeneous operator with \begin{align*} \fa (k,m,n)\in\zn\times\nn_0\times\nn_0:\ \Gf(z)(a_{kmn})=\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}((k,m,n))a_{kmn}. \end{align*} Then, $\Gf(z)$ is of trace class if $\fa\iota\in I:\ \Re(d_\iota+\delta z)<-3$ and the $\zeta$-function $\zeta(\Gf)$ defined by meromorphic extension of $z\mapsto\tr\Gf(z)$ has at most isolated first order poles in the set $\l\{\frac{-3-d_\iota}{\delta};\ \iota\in I\r\}$. Furthermore, the lowest order Laurent coefficient is tracial. \end{corollary} \begin{proof} This, again, follows directly from the fact that the spectrum of $\Gf(z)$ and $\sum_{\iota\in I}\alpha_\iota(z)\sigma_{d_\iota+\delta z}\l(\l(i\d_1,\frac{\abs{\d_2}}{2},\frac{\abs{\d_3}}{2}\r)\r)$ on $\rn[3]/{2\pi\zn[3]}$ coincide. \end{proof} Now taking the operator exponentiation we see that the operator semigroup $T(t):\ SU_q(2)\to SU_q(2)$ associated with $r\eps''$ is given by \begin{align*} T(t)(a_{kmn})=e^{-rt(k-m+n)^2}a_{kmn} \end{align*} on the basis $\{a_{kmn};\ (k,m,n)\in\zn\times\nn_0\times\nn_0\}$. It is important to note that this is not the heat-semigroup on $SU(2)$. Since $SU(2)$ is a compact Riemannian $C^\infty$-manifold without boundary, its heat-semigroup is a semigroup of trace class operators but each $T(t)$ above has multiplicity $\aleph_0$ for each of its eigenvalues. In other words, none of the $T(t)$ is compact. \begin{theorem}\label{thm:gaussian-trace-SUq(2)} Let $T$ be a driftless Gaussian semigroup on $SU_q(2)$, i.e., \begin{align*} \fa (k,m,n)\in\zn\times\nn[2]_0\ \fa t\in\rn_{>0}:\ T(t)(a_{kmn})=e^{-rt(k-m+n)^2}a_{kmn}, \end{align*} and $\l(\Gf_t(z)\r)_{z\in\cn[3]}$ a holomorphic family of operators on $SU_q(2)$ satisfying \begin{align*} \Gf_t(z)a_{kmn}=e^{-rt(k+m-n)^2}\abs{k}^{\delta_1z_1}m^{\delta_2z_2}n^{\delta_3z_3} \end{align*} for all $z\in\cn[3]$, $(k,m,n)\in\zn\times\nn_0\times\nn_0$, and $t\in\rn_{>0}$, where $\delta_1,\delta_2,\delta_3\in\rn_{>0}$. Then, \begin{align*} \tr_\zeta(T(t))=&\zeta(\Gf_t)(0)=\frac{1}{12}+\frac{13}{12}\sum_{k\in\nn}e^{-rtk^2}+\frac{13}{12}\sum_{k\in\nn}ke^{-rtk^2}-\sum_{k\in\nn}k^2e^{-rtk^2} \end{align*} and \begin{align*} \lim_{t\searrow0}(4\pi t)^{\frac{3}{2}}\tr_\zeta(T(t))=-2\pi^2r^{-\frac{3}{2}}. \end{align*} \end{theorem} \begin{proof} In order to show \begin{align*} \tr_\zeta(T(t))=\zeta(\Gf_t)(0)=\frac{1}{12}+\frac{13}{12}\sum_{k\in\nn}e^{-rtk^2}+\frac{13}{12}\sum_{k\in\nn}ke^{-rtk^2}-\sum_{k\in\nn}k^2e^{-rtk^2}, \end{align*} we need to compute the limit $z\to0$ of \begin{align*} \sum_{k\in\zn}\sum_{m\in\nn}\sum_{n\in\nn}e^{-rt(k-m+n)^2}\abs{k}^{\delta_1z_1}m^{\delta_2z_2}n^{\delta_3z_3} \end{align*} which we can alternatively write as \begin{align*} \sum_{k\in\zn}e^{-rtk^2}\abs{k}^{\delta_1z_1}\sum_{m\in\nn}\sum_{n\in\nn}e^{-rt(n-m)^2}e^{-2rtk(n-m)}m^{\delta_2z_2}n^{\delta_3z_3}. \end{align*} The inner two series are very similar to the heat-trace on the Toeplitz algebra - there is simply an additional factor $e^{-2rtk(n-m)}$ now. Hence, we will treat these series in a similar fashion. \begin{align*} \sum_{m\in\nn}\sum_{n\in\nn}e^{-rt(n-m)^2}e^{-2rtk(n-m)}m^{\delta_2z_2}n^{\delta_3z_3}=\sum_{m\in\nn}\sum_{\ell\in\zn_{>-m}}e^{-rt\ell^2}e^{-2rtk\ell}m^{\delta_2z_2}(m+\ell)^{\delta_3z_3} \end{align*} which allows us to change gauge with respect to $z_3$ to obtain for $\Re(z_2)\ll0$ and we obtain \begin{align*} \sum_{m\in\nn}\sum_{\ell\in\zn_{>-m}}e^{-rt\ell^2}e^{-2rtk\ell}m^{\delta_2z_2}\abs{\ell}^{\delta_3z_3}. \end{align*} Let \begin{align*} A:=\sum_{m\in\nn}\sum_{\ell=1-m}^0e^{-rt\ell^2}e^{-2rtk\ell}m^{\delta_2z_2}\abs{\ell}^{\delta_3z_3} \end{align*} and \begin{align*} B:=\sum_{m\in\nn}\sum_{\ell\in\nn}e^{-rt\ell^2}e^{-2rtk\ell}m^{\delta_2z_2}\abs{\ell}^{\delta_3z_3}. \end{align*} Then, we obtain \begin{align*} \lim_{z_2\to0}A=&\lim_{z_2\to0}\sum_{m\in\nn}\sum_{\ell=0}^{m-1}e^{-rt\ell^2}e^{2rtk\ell}m^{\delta_2z_2}\ell^{\delta_3z_3}\\ =&\lim_{z_2\to0}\sum_{\ell\in\nn_0}\sum_{m\in\nn_{>\ell}}e^{-rt\ell^2}e^{2rtk\ell}m^{\delta_2z_2}\ell^{\delta_3z_3}\\ =&\lim_{z_2\to0}\sum_{\ell\in\nn_0}e^{-rt\ell^2}e^{2rtk\ell}\l(\zeta_R(-\delta_2z_2)-\sum_{m=1}^\ell m^{\delta_2z_2}\r)\ell^{\delta_3z_3}\\ =&-\frac{1}{2}\sum_{\ell\in\nn_0}e^{-rt\ell^2}e^{2rtk\ell}\l(2\ell+1\r)\ell^{\delta_3z_3} \end{align*} and \begin{align*} \lim_{z_2\to0}B=&\sum_{m\in\nn}\sum_{\ell\in\nn}e^{-rt\ell^2}e^{-2rtk\ell}m^{\delta_2z_2}\ell^{\delta_3z_3}=-\frac{1}{2}\sum_{\ell\in\nn}e^{-rt\ell^2}e^{-2rtk\ell}\ell^{\delta_3z_3}. \end{align*} Hence, we are looking to compute \begin{align*} \lim_{z_3\to0}\lim_{z_1\to0}\sum_{k\in\zn}e^{-rtk^2}\abs{k}^{\delta_1z_1}\l(-\frac{1}{2}-\frac{1}{2}\sum_{\ell\in\nn}e^{-rt\ell^2}\ell^{\delta_3z_3}\l((2\ell+1)e^{2rtk\ell}+e^{-2rtk\ell}\r)\r). \end{align*} Using \begin{align*} \sum_{k\in\zn}e^{-rtk^2\pm2rtk\ell}=1+\sum_{k\in\nn}e^{-rtk^2+2rtk\ell}+\sum_{k\in\nn}e^{-rtk^2-2rtk\ell}, \end{align*} we are looking for the limit $z_1,z_3\to0$ of \begin{align*} &-\sum_{k\in\nn}e^{-rtk^2}k^{\delta_1z_1}\\ &-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k-\ell)^2}(2\ell+1)k^{\delta_1z_1}\ell^{\delta_3z_3}-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}(2\ell+1)k^{\delta_1z_1}\ell^{\delta_3z_3}\\ &-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k-\ell)^2}k^{\delta_1z_1}\ell^{\delta_3z_3}-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}k^{\delta_1z_1}\ell^{\delta_3z_3} \end{align*} which, in parts, we already know in terms of $\Htr_{\Tp,\zeta}(t)=-\frac{1}{2}-\sum_{k\in\nn}(k+1)e^{-tk^2}$, the heat-trace on the Toeplitz algebra. Thus, \begin{align*} \zeta(\Gf_t)(0)=&-\sum_{k\in\nn}e^{-rtk^2}-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}(2\ell+1)-\frac{1}{2}\Htr_{\Tp,\zeta}(rt)-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}\\ &-\frac{1}{2}\lim_{z_1,z_3\to0}\sum_{k,\ell\in\nn}e^{-rt(k-\ell)^2}(2\ell+1)k^{\delta_1z_1}\ell^{\delta_3z_3}\\ =&-\sum_{k\in\nn}e^{-rtk^2}-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}(2\ell+1)-\Htr_{\Tp,\zeta}(rt)-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}\\ &-\lim_{z_1,z_3\to0}\sum_{k,\ell\in\nn}e^{-rt(k-\ell)^2}k^{\delta_1z_1}\ell^{1+\delta_3z_3} \\ =&-\sum_{k\in\nn}e^{-rtk^2}-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}(2\ell+1)-\Htr_{\Tp,\zeta}(rt)-\frac{1}{2}\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}\\ &-\zeta_R(-1)\sum_{k\in\nn}e^{-rtk^2}-\zeta_R(-1)+\zeta_R(0)+\l(\frac{1}{2}-\zeta_R(-1)\r)\sum_{k\in\nn}ke^{-rtk^2}\\ &-\frac{1}{2}\sum_{k\in\nn}k^2e^{-rtk^2}\\ =&\frac{1}{12}+\frac{1}{12}\sum_{k\in\nn}e^{-rtk^2}+\frac{19}{12}\sum_{k\in\nn}ke^{-rtk^2}-\frac{1}{2}\sum_{k\in\nn}k^2e^{-rtk^2}\\ &-\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}\ell-\sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2} \end{align*} where we computed the final limit in the same way the limit in the proof of Theorem~\ref{thm:heat-trace-toeplitz}. Finally, the latter two series can be reduced to the former three; namely, \begin{align*} \sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}=&\sum_{\ell\in\nn}\sum_{m\in\nn_{>\ell}}e^{-rtm^2}=\sum_{m\in\nn_{\ge2}}\sum_{\ell=1}^{m-1}e^{-rtm^2}=\sum_{m\in\nn}me^{-rtm^2}-\sum_{m\in\nn}e^{-rtm^2} \end{align*} and \begin{align*} \sum_{k,\ell\in\nn}e^{-rt(k+\ell)^2}\ell=\sum_{m\in\nn_{\ge2}}\sum_{\ell=1}^{m-1}e^{-rtm^2}\ell=\frac{1}{2}\sum_{m\in\nn}m^2e^{-rtm^2}-\frac{1}{2}\sum_{m\in\nn}me^{-rtm^2}. \end{align*} Hence, we obtain \begin{align*} \zeta(\Gf_t)(0)=&\frac{1}{12}+\frac{13}{12}\sum_{k\in\nn}e^{-rtk^2}+\frac{13}{12}\sum_{k\in\nn}ke^{-rtk^2}-\sum_{k\in\nn}k^2e^{-rtk^2}. \end{align*} To obtain the asymptotics with respect to $t\searrow0$, we shall approximate each series using the integral comparison test again which yields \begin{align*} \lim_{t\searrow0}\sqrt{4\pi t}\sum_{k\in\nn}e^{-rtk^2}=\frac{\pi}{\sqrt{r}}, \end{align*} \begin{align*} \lim_{t\searrow0}4\pi t\sum_{k\in\nn}ke^{-rtk^2}=\frac{2\pi}{r}, \end{align*} and \begin{align*} \lim_{t\searrow0}(4\pi t)^{\frac{3}{2}}\sum_{k\in\nn}k^2e^{-rtk^2}=\frac{2\pi^2}{r^{\frac{3}{2}}}. \end{align*} In other words, \begin{align*} \lim_{t\searrow0}(4\pi t)^{\frac{3}{2}}\tr_\zeta(T(t))=-\frac{2\pi^2}{r^{\frac{3}{2}}}. \end{align*} \end{proof} \begin{remark*} Recall that we have not been computing ``heat-invariants'' in Theorem~\ref{thm:gaussian-trace-SUq(2)} since there is no Brownian motion on $SU_q(2)$. Thus, we cannot interpret $SU_q(2)$ as a ``quantum manifold'' of volume $-2\pi^2r^{-\frac{3}{2}}$. However, the driftless Gaussians that we still have at our disposal recovered the pole order $\frac32$ for $t\searrow0$ which is the expected result since $SU(2)$ is isomorphic to the (real) $3$-sphere. In other words, we can interpret $SU_q(2)$ as a three-dimensional ``quantum manifold'' which gives the correct limit at $q=1$. This stands in contrast to Connes' observation~\cite{connes-hochschild-dimension} that the Hochschild dimension of $SU_q(2)$ drops from $3$ ($q=1$) to $1$ ($q\ne1$). However, it is consistent with Hadfield's and Krähmer's results~\cite{hadfield-kraehmer-I,hadfield-kraehmer-II} that $SU_q(2)$ is a twisted $3$-dimensional Calabi-Yau algebra. \end{remark*} \section{Conclusion}\label{sec:conclusion} We have considered driftless Gaussians, in particular Brownian motion, on a number of C*-bialgebras to define Laplace-type operators and heat-semigroups. We spectrally regularized their traces using operator $\zeta$-functions and computed quantities like criticality and heat-coefficients. We noticed that the notion of dimension obtained from the critical degree of homogeneity need not coincide with the dimension obtained from the heat-trace. In particular, having an abstract twist structure is seen in the dimension obtained from criticality but not in the heat-trace. Thus, the ``criticality dimension'' seems (somewhat unsurprisingly) to be related to the algebraic properties of the algebra whereas the ``heat-trace dimension'' (being induced by the dynamics of Brownian motion) seems to be related to geometric/analytic properties of the algebra. This is particularly obvious in the case of twisted classical structures where the ``heat-trace dimension'' coincides with the classical dimension which is not the case for the ``criticality dimension'' which also counts the number of abstract twists (as these are generators of the algebra as well). In the $SU_q(2)$ case, we observed the additional obstruction that there is no Brownian motion and we had to make do with the projectively unique generator of a driftless Gaussian as our version of a ``Laplacian'' (whose $SU(2)$ version does not have compact resolvent). Still, we were able to recover $3$-dimensionality using the ``Gauss-trace'' and criticality. In terms of the ``heat-coefficients'', the leading order coefficient can hardly be interpreted as a volume since many of them are negative. On the other hand, we observed that the ``heat-coefficients'' can be used to differentiate between different algebras (e.g., the Toeplitz algebra and the discrete Heisenberg group algebra $\Hn_1$ have different ``heat-coefficients''). However, it is not possible to ``hear the shape of a quantum drum'' using these ``heat-coefficients'' alone as we have observed that the ``heat-coefficients'' of $\Hn_N$ and $A_\theta^N$ with complex twists coincide with the heat-coefficients of classical tori. \begin{bibdiv} \begin{biblist} \bib{accardi-schurmann-waldenfels}{article}{ AUTHOR = {ACCARDI, L.}, AUTHOR ={SCH\"URMANN, M.}, AUTHOR={VON WALDENFELS, W.}, TITLE = {Quantum independent increment processes on superalgebras}, JOURNAL = {Mathematische Zeitschrift}, VOLUME = {198}, YEAR = {1988}, NUMBER = {4}, PAGES = {451--477}, ISSN = {0025-5874}, DOI = {10.1007/BF01162868}, URL = {http://dx.doi.org/10.1007/BF01162868}, } \bib{atiyah-bott-patodi}{article}{ author={ATIYAH, M.}, author={BOTT, R.}, author={PATODI, V. K.}, title={On the heat equation and the index theorem}, journal={Inventiones Mathematicae}, volume={19 (4)}, pages={279-330}, date={1973} } \bib{aukhadiev-grigoryan-lipacheva}{article}{ author={AUKHADIEV, M. A.}, author={GRIGORYAN, S. A.}, author={LIPACHEVA, E. V.}, title={Infinite-Dimensional Compact Quantum Semigroup}, journal={Lobachevskii Journal of Mathematics}, volume={32}, pages={304-316}, date={2011} } \bib{azzali-levy-neira-paycha}{article}{ author={AZZALI, S.}, author={L{\'E}VY, C.}, author={NEIRA-JIMEN{\'E}Z, C.}, author={PAYCHA, S.}, title={Traces of holomorphic families of operators on the noncommutative torus and on Hilbert modules}, journal={Geometric Methods in Physics: XXXIII Workshop 2014}, pages={3-38}, date={2015} } \bib{belton-wills}{article}{ AUTHOR = {BELTON, A. C. R.}, AUTHOR={WILLS, S. J.}, TITLE = {An algebraic construction of quantum flows with unbounded generators}, JOURNAL = {Ann. Inst. Henri Poincar\'e Probab. Stat.}, VOLUME = {51}, YEAR = {2015}, NUMBER = {1}, PAGES = {349--375}, } \bib{carey-gayral-rennie-sukochev}{article}{ author={CAREY, A. L.}, author={GAYRAL, V.}, author={RENNIE, A.}, author={SUKOCHEV, F. A.}, title={Integration on locally compact noncommutative spaces}, journal={Journal of Functional Analysis}, volume={263}, number={2}, pages={383--414}, date={2012} } \bib{carey-rennie-sadaev-sukochev}{article}{ author={CAREY, A. L.}, author={RENNIE, A.}, author={SADAEV, A.}, author={SUKOCHEV, F. A.}, title={The Dixmier trace and asymptotics of zeta functions}, journal={Journal of Functional Analysis}, volume={249}, number={2}, pages={253--283}, date={2007} } \bib{connes-hochschild-dimension}{article}{ author={CONNES, A.}, title={Cyclic cohomology, quantum group symmetries and the local index formula for $SU_q(2)$}, journal={Journal of the Institute of Mathematics of Jussieu}, volume={3}, pages={17--68}, date={2004} } \bib{connes-action-functional}{article}{ author={CONNES, A.}, title={The Action Functional in Non-Commutative Geometry}, journal={Communications in Mathematical Physics}, volume={117}, pages={673--683}, date={1988} } \bib{connes-fathizadeh}{article}{ author={CONNES, A.}, author={FATHIZADEH, F.}, title={The term $a_4$ in the heat kernel expansion of noncommutative tori}, journal={arXiv:1611.09815v1 [math.QA]}, date={2016} } \bib{connes-moscovici}{article}{ author={CONNES, A.}, author={MOSCOVICI, H.}, title={Modular curvature for noncommutative two-tori}, journal={Journal of the American Mathematical Society}, volume={27}, pages={639-684}, date={2014} } \bib{connes-tretkoff}{article}{ author={CONNES, A.}, author={TRETKOFF, P.}, title={The Gauss–Bonnet theorem for the noncommutative two torus}, journal={Noncommutative Geometry, Arithmetic, and Related Topics}, pages={141-158}, date={2011} } \bib{cipriani-franz-kula}{article}{ AUTHOR = {CIPRIANI, F.}, AUTHOR = {FRANZ, U.}, AUTHOR = {KULA, A.}, TITLE = {Symmetries of {L}\'evy processes on compact quantum groups, their {M}arkov semigroups and potential theory}, JOURNAL = {Journal of Functional Analysis}, VOLUME = {266}, YEAR = {2014}, NUMBER = {5}, PAGES = {2789-2844}, ISSN = {0022-1236}, DOI = {10.1016/j.jfa.2013.11.026}, URL = {http://dx.doi.org/10.1016/j.jfa.2013.11.026}, } \bib{craig}{article}{ author={CRAIG, J. W.}, title={A new, simple and exact result for calculating the probability of error for two-dimensional signal constellations}, journal={Proc. 1991 IEEE Military Commun. Conf.}, volume={2}, pages={571-575}, date={1991} } \bib{dabrowski-sitarz-asymmetric}{article}{ author={DABROWSKI, L.}, author={SITARZ, A.}, title={An asymmetric noncommutative torus}, journal={SIGMA}, volume={11}, pages={075}, date={2015} } \bib{dabrowski-sitarz-curved}{article}{ author={DABROWSKI, L.}, author={SITARZ, A.}, title={Curved noncommutative torus and Gauss–Bonnet}, journal={Journal of Mathematical Physics}, volume={54}, pages={013518}, date={2013} } \bib{fathi}{book}{ author={FATHI, A.}, title={On certain spectral invariants of Dirac operators on noncommutative tori and curvature of the determinant line bundle for the noncommutative two torus}, publisher={Ph.D. thesis, University of Western Ontario}, address={London, ON}, date={2015} } \bib{fathi-ghorbanpour-khalkhali}{article}{ author={FATHI, A.}, author={GHORBANPOUR, A.}, author={KHALKHALI, M.}, title={Curvature of the determinant line bundle for the noncommutative two torus}, journal={arXiv:1410.0475~[math.QA]}, pages={1--18}, date={2014} } \bib{fathi-khalkhali}{article}{ author={FATHI, A.}, author={KHALKHALI, M.}, title={On certain spectral invariants of Dirac operators on noncommutative tori}, journal={arXiv:1504.01174v1~[math.QA]}, pages={1--30}, date={2015} } \bib{fathizadeh}{article}{ author={FATHIZADEH, F.}, title={On the scalar curvature for the noncommutative four torus}, journal={Journal of Mathematical Physics}, volume={56}, pages={062303}, date={2015} } \bib{fathizadeh-khalkhali-scalar-4}{article}{ author={FATHIZADEH, F.}, author={KHALKHALI, M.}, title={Scalar curvature for noncommutative four-tori}, journal={Journal of Noncommutative Geometry}, volume={9}, pages={473-503}, date={2015} } \bib{fathizadeh-khalkhali-scalar-2}{article}{ author={FATHIZADEH, F.}, author={KHALKHALI, M.}, title={Scalar curvature for the noncommutative two torus}, journal={Journal of Noncommutative Geometry}, volume={7}, pages={1145-1183}, date={2013} } \bib{fathizadeh-khalkhali-gauss-bonnet}{article}{ author={FATHIZADEH, F.}, author={KHALKHALI, M.}, title={The Gauss-Bonnet theorem for noncommutative two tori with a general conformal structure}, journal={Journal of Noncommutative Geometry}, volume={6}, pages={457-480}, date={2012} } \bib{franz}{book}{, AUTHOR = {FRANZ, U.}, TITLE = {L\'evy processes on quantum groups and dual groups}, BOOKTITLE = {Quantum independent increment processes. {II}}, SERIES = {Lecture Notes in Mathematics}, VOLUME = {1866}, PAGES = {161-257}, PUBLISHER = {Springer, Berlin}, YEAR = {2006}, DOI = {10.1007/11376637_3}, URL = {http://dx.doi.org/10.1007/11376637_3}, } \bib{gayral-iochum-vassilevich}{article}{ author={GAYRAL, V.}, author={IOCHUM, B.}, author={VASSILEVICH, D. V.}, title={Heat Kernel and Number Theory on NC-torus}, journal={Communications in Mathematical Physics}, volume={273}, pages={415-443}, date={2007} } \bib{guillemin}{article}{ author={GUILLEMIN, V.}, title={Gauged Lagrangian Distributions}, journal={Advances in Mathematics}, volume={102}, pages={184-201}, date={1993} } \bib{hadfield-kraehmer-I}{article}{ author={HADFIELD, T.}, author={KR{\"{A}}HMER, U.}, title={Twisted homology of quantum $SL(2)$}, journal={K-Theory}, volume={34}, pages={327-360}, date={2005} } \bib{hadfield-kraehmer-II}{article}{ author={HADFIELD, T.}, author={KR{\"{A}}HMER, U.}, title={Twisted homology of quantum $SL(2)$ - Part II}, journal={Journal of K-Theory}, volume={6}, pages={69-98}, date={2010} } \bib{hartung-phd}{book}{ author={HARTUNG, T.}, title={$\zeta$-functions of Fourier Integral Operators}, publisher={Ph.D. thesis, King's College London}, address={London}, date={2015} } \bib{hartung-scott}{article}{ author={HARTUNG, T.}, author={SCOTT, S.}, title={A generalized Kontsevich-Vishik trace for Fourier Integral Operators and the Laurent expansion of $\zeta$-functions}, journal={arXiv:1510.07324v2~[math.AP]}, date={2015} } \bib{hawking}{article}{ author={HAWKING, S. W.}, title={Zeta Function Regularization of Path Integrals in Curved Spacetime}, journal={Communications in Mathematical Physics}, volume={55}, pages={133--148}, date={1977} } \bib{iochum-masson}{article}{ author={IOCHUM, B.}, author={MASSON, T.}, title={Heat asymptotics for nonminimal Laplace type operators and application to noncommutative tori}, journal={arXiv:1707.09657 [math.DG]}, date={2017} } \bib{kaad-senior}{article}{ author={KAAD, J.}, author={SENIOR, R.}, title={A twisted spectral triple for quantum $SU(2)$}, journal={Journal of Geometry and Physics}, volume={62}, number={4}, pages={731--739}, date={2012} } \bib{kontsevich-vishik}{article}{ author={KONTSEVICH, M.}, author={VISHIK, S.}, title={Determinants of elliptic pseudo-differential operators}, journal={Max Planck Preprint, arXiv:hep-th/9404046}, date={1994} } \bib{kontsevich-vishik-geometry}{article}{ author={KONTSEVICH, M.}, author={VISHIK, S.}, title={Geometry of determinants of elliptic operators}, journal={Functional Analysis on the Eve of the XXI century, Vol. I, Progress in Mathematics}, volume={131}, pages={173-197}, date={1994} } \bib{levy-neira-paycha}{article}{ author={L{\'E}VY, C.}, author={NEIRA-JIMEN{\'E}Z, C.}, author={PAYCHA, S.}, title={The canonical trace and the noncommutative residue on the noncommutative torus}, journal={Transactions of the American Mathematical Society}, volume={368}, pages={1051-1095}, date={2016} } \bib{lindsay-skalski}{article}{ AUTHOR = {LINDSAY, J. M.}, AUTHOR = {SKALSKI, A. G.}, TITLE = {Quantum stochastic convolution cocycles. {I}}, JOURNAL = {Ann. Inst. H. Poincar\'e Probab. Statist.}, VOLUME = {41}, YEAR = {2005}, NUMBER = {3}, PAGES = {581--604}, } \bib{lindsay-skalski1}{article}{, AUTHOR = {LINDSAY, J. M.}, AUTHOR = {SKALSKI, A. G.}, TITLE = {Quantum stochastic convolution cocycles. {II}}, JOURNAL = {Communications in Mathematical Physics}, VOLUME = {280}, YEAR = {2008}, NUMBER = {3}, PAGES = {575-610}, ISSN = {0010-3616}, DOI = {10.1007/s00220-008-0465-x}, URL = {http://dx.doi.org/10.1007/s00220-008-0465-x}, } \bib{lindsay-skalski2}{article}{, AUTHOR = {LINDSAY, J. M.}, AUTHOR = {SKALSKI, A. G.}, TITLE = {Convolution semigroups of states}, JOURNAL = {Mathematische Zeitschrift}, VOLUME = {267}, YEAR = {2011}, NUMBER = {1-2}, PAGES = {325-339}, ISSN = {0025-5874}, DOI = {10.1007/s00209-009-0621-9}, URL = {http://dx.doi.org/10.1007/s00209-009-0621-9}, } \bib{lindsay-skalski3}{article}{, AUTHOR = {LINDSAY, J. M.}, AUTHOR = {SKALSKI, A. G.}, TITLE = {Quantum stochastic convolution cocycles {III}}, JOURNAL = {Mathematische Annalen}, VOLUME = {352}, YEAR = {2012}, NUMBER = {4}, PAGES = {779-804}, ISSN = {0025-5831}, DOI = {10.1007/s00208-011-0656-1}, URL = {http://dx.doi.org/10.1007/s00208-011-0656-1}, } \bib{liu}{article}{ author={LIU, Y.}, title={Modular curvature for toric noncommutative manifolds}, journal={arXiv:1510.04668v2 [math.OA]}, date={2015} } \bib{maniccia-schrohe-seiler}{article}{ author={MANICCIA, L.}, author={SCHROHE, E.}, author={SEILER, J.}, title={Uniqueness of the Kontsevich-Vishik trace}, journal={Proceedings of the American Mathematical Society}, volume={136 (2)}, pages={747-752}, date={2008} } \bib{matassa}{article}{ author={MATASSA, M.}, title={Non-Commutative Integration, Zeta Functions and the Haar State for $SU_q(2)$}, journal={Mathematical Physics, Analysis and Geometry}, volume={18}, number={6}, pages={1--23}, date={2015} } \bib{murphy}{book}{ AUTHOR = {MURPHY, G. J.}, TITLE = {{$C^*$}-algebras and operator theory}, PUBLISHER = {Academic Press, Inc., Boston, MA}, YEAR = {1990}, PAGES = {x+286}, } \bib{okikiolu}{article}{ author={OKIKIOLU, K.}, title={The multiplicative anomaly for determinants of elliptic operators}, journal={Duke Mathematical Journal}, volume={79}, pages={722-749}, date={1995} } \bib{paycha-scott}{article}{ author={PAYCHA, S.}, author={SCOTT, S. G.}, title={A Laurent expansion for regularized integrals of holomorphic symbols}, journal={Geometric and Functional Analysis}, volume={17 (2)}, pages={491-536}, date={2007} } \bib{ray}{article}{ author={RAY, D. B.}, title={Reidemeister torsion and the Laplacian on lens spaces}, journal={Advances in Mathematics}, volume={4}, pages={109-126}, date={1970} } \bib{ray-singer}{article}{ author={RAY, D. B.}, author={SINGER, I. M.}, title={$R$-torsion and the Laplacian on Riemannian manifolds}, journal={Advances in Mathematics}, volume={7}, pages={145-210}, date={1971} } \bib{sadeghi}{article}{ author={SADEGHI, S.}, title={On logarithmic Sobolev inequality and a scalar curvature formula for noncommutative tori}, journal={Ph.D. thesis, Western University, Ontario}, date={2016} } \bib{schurmann}{book}{ AUTHOR = {SCH\"URMANN, M.}, TITLE = {White noise on bialgebras}, SERIES = {Lecture Notes in Mathematics}, VOLUME = {1544}, PUBLISHER = {Springer-Verlag, Berlin}, YEAR = {1993}, PAGES = {vi+146}, ISBN = {3-540-56627-9}, DOI = {10.1007/BFb0089237}, URL = {http://dx.doi.org/10.1007/BFb0089237} } \bib{schurmann-skeide}{article}{ author={SCH\"URMANN, M.}, author={SKEIDE, M.}, TITLE = {Infinitesimal generators on the quantum group {${\rm SU}_q(2)$}}, JOURNAL = {Infin. Dimens. Anal. Quantum Probab. Relat. Top.}, VOLUME = {1}, YEAR = {1998}, NUMBER = {4}, PAGES = {573--598}, ISSN = {0219-0257}, URL = {http://dx.doi.org/10.1142/S0219025798000314}, } \bib{scott}{article}{ author={SCOTT, S.}, title={The residue determinant}, journal={Communications in Partial Differential Equations}, volume={30}, pages={483-507}, number={4-6}, date={2005} } \bib{seeley}{article}{ author={SEELEY, R. T.}, title={Complex Powers of an Elliptic Operator}, journal={Proceedings of Symposia in Pure Mathematics, American Mathematical Society}, volume={10}, pages={288-307}, date={1967} } \bib{sitarz}{article}{ author={SITARZ, A.}, title={Wodzicki residue and minimal operators on a noncommutative 4-dimensional torus}, journal={Journal of Pseudo-Differential Operators and Applications}, volume={5}, pages={305-317}, date={2014} } \bib{timmermann}{book}{ AUTHOR = {TIMMERMANN, T.}, TITLE = {An invitation to quantum groups and duality}, SERIES = {EMS Textbooks in Mathematics}, NOTE = {From Hopf algebras to multiplicative unitaries and beyond}, PUBLISHER = {European Mathematical Society (EMS), Z\"urich}, YEAR = {2008}, PAGES = {xx+407}, ISBN = {978-3-03719-043-2}, DOI = {10.4171/043}, URL = {http://dx.doi.org/10.4171/043} } \bib{vassilevich-I}{article}{ author={VASSILEVICH, D. V.}, title={Heat kernel, effective action and anomalies in noncommutative theories}, journal={Journal of High Energy Physics}, volume={0508}, pages={085}, date={2005} } \bib{vassilevich-II}{article}{ author={VASSILEVICH, D. V.}, title={Non-commutative heat kernel}, journal={Letters in Mathematical Physics}, volume={67}, pages={185-195}, date={2004} } \bib{wodzicki}{book}{ author={WODZICKI, M.}, title={Noncommutative Residue. I. Fundamentals.}, series={Lecture Notes in Mathematics}, volume={1289}, publisher={Springer-Verlag, Berlin}, date={1987} } \end{biblist} \end{bibdiv} \end{document} \setcounter{theorem}{0}
\section{Introduction} In the early stage of evolution, between $10^{-36}$ sec - $10^{-32}$ sec, the universe went through an inflationary phase of expansion, which has been accepted as a scenario rather than a model. What happened prior to the inflationary era can only be answered in view of `quantum theory of gravity'. In the absence of a complete and legitimate (unitary and renormalizable) quantum theory of gravity, some perception regarding the evolution of the universe in the pre-inflationary phase may be achieved through quantization of a viable cosmological model - known as ``quantum cosmology". In this regard a cosmological model should be chosen such that it leads to a viable inflationary era fitting the recently available data, and also the late-time cosmic acceleration which is a great cry of the present century. Non-minimally coupled scalar-tensor theory of gravity having an action in the form \be\label{A1} A_1=\int\sqrt{-g}\;d^4x\left[f(\phi){R}-\frac{1}{2}\phi_{,\mu}\phi^{,\mu}-V(\phi)\right],\ee is a strong contender for dark-energy candidature, being able to explain late-time cosmic acceleration inclusive of presently available data \cite{late}. It is therefore required to test the theory during early phase of cosmological evolution. To accommodate cosmic inflation in the theory, additional contribution to the above action is required. It is well known that quantum gravity, in any of its forms (super string theory, heterotic string theory super-gravity, M-theory, loop quantum gravity etc.) admits higher order curvature invariant terms. Of particular interest is curvature squared ($R^2, R_{\mu\nu}^2$) term, since it leads to renormalized theory of gravity \cite{stell}. Although, perturbatively it encounters ghost degrees of freedom, non-perturbatively it is well behaved. Further, although unification of the early inflation with late-time cosmic acceleration with non-minimally coupled scalar field has recently been achieved \cite{Beh}, nevertheless one can't ignore the presence of higher order terms in the early universe, particularly because inflation without phase transition is an essential feature of such higher order term \cite{staro, maeda}. Now, in the homogeneous and isotropic background, $R_{\mu\nu}^2$ and $R^2$ terms differ only by a total derivative term, and it is therefore sufficient to add scalar curvature squared term to the above action, which therefore reads as \be\label{A2} A=\int\sqrt{-g}\;d^4x\left[f(\phi){R}+B R^2-\frac{1}{2}\phi_{,\mu}\phi^{,\mu}-V(\phi)\right].\ee As already mentioned, our present aim is not to establish unification, rather to study its behaviour at the very early stage of cosmic evolution particularly, in the quantum domain. This requires canonical formulation of the theory. There exists a host of canonical formalisms in connection with higher order theory of gravity, which requires additional degrees of freedom. In addition to the three space metric ($h_{ij}$), the extrinsic curvature tensor ($K_{ij}$) is taken as an additional basic variable for the purpose. In the process, Cauchy data exceeds and therefore, one requires more boundary data. While, Ostrogrdski's technique \cite{ostro}, Dirac's \cite{dirac} formalism and Horowitz' no boundary proposal \cite{horo} insist upon setting $\delta h_{ij} = 0 = \delta K_{ij}$, at the boundary, and end up with the same phase-space Hamiltonian; a modified version of Horowitz' technique \cite{mod1, mod2, mod3, mod4, mod5} favours $\delta h_{ij} = 0 = \delta R$, at the boundary and for a class of higher order theory of gravity, ends up with a Hamiltonian which although different, is related under a suitable canonical transformation with the one obtained following the known standard techniques \cite{ostro, dirac, horo}. It has therefore been tacitly assumed that the canonical structure of higher order theory of gravity is independent of the choice of boundary condition. However, such a preconceived concept has shattered in view of a very recent work \cite{mod6}. It has been found that for Gauss-Bonnet-dilatonic coupled higher order theory of gravity, \be A_G =\int\sqrt{-g}\;d^4x\left[\alpha{R}+\beta R^2+\Lambda(\phi)\mathcal{G}-\frac{1}{2}\phi_{,\mu}\phi^{,\nu}-V(\phi)\right] + \alpha\Sigma_R + \beta\Sigma_{R^2} + \Lambda(\phi)\Sigma_\mathcal{G},\ee (where, $\Sigma_R = 2 \oint_{\partial\mathcal{V}}K \sqrt hd^3x$, $\Sigma_{R^2} = 4 \oint_{\partial\mathcal{V}} R K\sqrt h d^3x$ and $\Sigma_\mathcal{G} = 4\oint_{\partial\mathcal{V}} \left( 2G_{ij}K^{ij} + \frac{\mathcal{K}}{3}\right)\sqrt hd^3x$ are the supplementary boundary terms known as the Gibbons-Hawking-York term corresponding to the linear sector, its modified version for curvature squared term and for Gauss-Bonnet-dilatonic coupled sector respectively, $\alpha, \beta, ~\mathrm{and}~ \Lambda(\phi)$ are the coupling parameters, $V(\phi)$ is the dilatonic potential, while the symbol $\mathcal{K}$ stands for $\mathcal{K}=K^3 - 3K K^{ij}K_{ij} + 2K^{ij}K_{ik}K^k_j$, $K$ being the trace of extrinsic curvature tensor), modified Horowitz' formalism ends up with a different phase-space Hamiltonian, which is not related to the others under canonical transformation \cite{mod6}. The most important outcome of the work is that, the well-known standard formalisms \cite{ostro, dirac, horo}, for which supplementary boundary terms are not required due to the fact that $\delta h_{ij} = 0 = \delta K_{ij}$ at the boundary, don't produce correct classical analogue of the theory under appropriate semi-classical approximation, although modified Horowitz' formalism does \cite{mod6}. It is true that the choice of boundary terms does not in any way affect classical field equations, nevertheless, the above mentioned results prove unambiguously that it does, in the quantum domain, and the standard techniques \cite{ostro, dirac, horo} towards canonical formulation don't render a viable quantum description of the theory, in general. Here, we have chosen the action \eqref{A2} to establish in particular the fact that, the in-equivalent phase-space structure of the Hamiltonian is an outcome of non-minimal coupling.\\ It is important to repeat that, if one insists upon the boundary conditions $\delta h_{ij}|_{\mathcal{\partial V}}=0=\delta R|_{\mathcal{\partial V}}$, the action must be supplemented by additional boundary terms. On the contrary, the boundary conditions $\delta h_{ij}|_{\mathcal{\partial V}}=0= \delta K_{ij}|_{\mathcal{\partial V}}$ take care of the total derivative terms, and there is no need to supplement the action with additional boundary terms. This was the main argument of Horowitz for his no boundary proposal. Horowitz \cite{horo} argued that, without the supplementary boundary term, superposition principle holds during the transition from the initial configuration space to the final, following an intermediate one. However, Horowitz \cite{horo} also pointed out that, the above argument does't specifically state that boundary terms can't exist. Although sounds attractive, with no boundary proposal the cherished Gibbons-Hawking-York \cite{boun1, boun2} term, which is responsible for the entire contribution to the Euclidean action, also vanishes, and it is not possible to recover it under weak field limit. Next, it is well-known that $F(R)$ theory of gravity admits scalar tensor equivalence, under redefinition of $F(R)$ by an auxiliary variable to Jordan's frame or through conformal transformation to Einstein's frame. Variation of such canonical Lagrangian requires to fix the scalar at the end point. This is indeed equivalent to fixing of the Ricci scalar $R$ at the boundary. Further, Dyer and Hinterbichler \cite{dyre} have shown that the boundary terms reproduce the expected ADM energy, and the entropy of a Schwarzschild black hole is one-quarter of the area of the horizon in units of the effective Planck's length, which agrees with the Wald entropy formula \cite{wald1, wald2}. This clearly indicates that higher curvature terms make no additional correction to the entropy in the result obtained from Gibbons-Hawking-York \cite{boun1, boun2} term. Last but not the least important fact, as already mentioned is that, the quantum counterpart with no boundary proposal for Gauss-Bonnet-dilatonic coupled higher order theory of gravity does not lead to a classical limit under an appropriate semi-classical approximation \cite{mod6}. \\ Usually, either exponential expansion in the de-Sitter form or power law expansion as a solution to the classical field equations, is the starting point of studying inflationary evolution. The aim of the present work is to explore the fact that for the action under consideration \eqref{A2}, the quantum domain generically leads to de-Sitter expansion under appropriate semi-classical approximation, rather than power law expansion. This is the most important outcome of the present work. We therefore make canonical formulation of the action \eqref{A2}, in the Robertson-Walker minisuperspace, canonically quantize and show that the semiclassical wave-function is strongly peaked around the classical de-Sitter solution. Next we show that such a de-Sitter solution goes through to a viable inflationary phase, and the inflationary parameters are very much consistent with currently available data.\\ In the following section we therefore follow modified Horowitz' technique towards canonical formulation of action \eqref{A2} in the homogeneous and isotropic background. However, we encounter certain operator ordering ambiguity during quantization, which can only be resolved after having specific knowledge on the form of the coupling parameter $f(\phi)$. We therefore choose de-Sitter solution, and find a relation between the coupling parameter $f(\phi)$ and the potential $V(\phi)$ in view of the $(^0_0)$ equation of Einstein. The other field equation then fixes the forms of the two, uniquely. In view of the form of the coupling parameter $f(\phi)$, we remove operator ordering ambiguity, present the quantum mechanical probabilistic interpretation, and perform semiclassical approximation to explore the already mentioned fact that, the wave-function is strongly peaked around the classical de-Sitter solution.\\ Since quantum dynamics of action \eqref{A2} admits de-Sitter solution as its generic feature, so in section 3, we study the inflationary regime, with exponential expansion. For this purpose, we first translate our action \eqref{A2} to the Einstein's frame under conformal transformation, to show that the present action involves an additional scalar field $\psi$. This clarifies the reason for imposing a condition in addition to the standard slow-roll approximation. However, the rest of the analysis has been performed in the original variables. While studying gravitational perturbation, we match perturbed generalized scalar-field equation with the perturbed background scalar-field equation and observe that the coupling parameter $f(\phi)$ and the potential $V(\phi)$ must be related exactly in the same manner, as has been found while solving classical field equations assuming de-Sitter exponential solution. In appendix A, we prove that the effective canonical Hamiltonian is hermitian. In appendix B, we show that the standard canonical formulation schemes following Ostrogradski's \cite{ostro}, Dirac's \cite{dirac} and Horowitz' \cite{horo}, lead to the same phase-space structure of the Hamiltonian, which is different from the one obtained following modified Horowitz' technique in section 2, and is not related to it under canonical transformation. \section{Canonical formulation of non-minimally coupled scalar-tensor theory of gravity in the presence of higher order term} In accordance with the discussions in the introduction, we insist upon keeping $\delta h_{ij} = 0 = \delta R$, at the boundary, and so it is required to supplement the action \eqref{A2} with appropriate boundary terms. The action \eqref{A2} therefore reads \be\label{2.3} A=\int\sqrt{-g}\;d^4x\left[f(\phi){R}+B R^2-\frac{1}{2}\phi_{,\mu}\phi^{,\mu}-V(\phi)\right]+ \Sigma_R +\Sigma_{R^2_1} +\Sigma_{R^2_2},\ee where, $\Sigma_R = 2\int f(\phi)K\sqrt{h}~ d^3x$ is the modified Gibbons-Hawking-York boundary term in the presence of non-minimal coupling, and $\Sigma_{R^2} = \Sigma_{R^2_1} +\Sigma_{R^2_2} = 4B\int^3R K\sqrt{h}$ is the boundary term associated with the scalar curvature square term ($R^2$), which has been split into two parts in the manner, $\Sigma_{R^2_1} = 4B\int~^3R K\sqrt{h} ~d^3x;\;\Sigma_{R^2_2} = 4B\int(^4R - ^3R) K\sqrt{h} ~d^3x$. Such splitting is required to take care of the total derivative terms appearing under integration by parts. This has been discussed earlier in details \cite{mod1, mod2, mod3, mod4, mod5, mod6}. In the above, $K$ is the trace of the extrinsic curvature tensor, and $h$ is the determinant of the induced three-space metric. Since reduction of higher order theory to its canonical form requires additional degrees of freedom, hence, in addition to the three-space metric $h_{ij}$, the extrinsic curvature tensor $K_{ij}$ is treated as basic variable. In the homogeneous and isotropic Robertson-Walker metric, viz., \be\label{2.4} ds^2 = - N(t)^2 dt^2 + a^2(t) \left[\frac{dr^2}{1-kr^2} + r^2 (d\theta^2 + sin^2 \theta d\phi^2)\right],\ee we therefore choose the basic variables $h_{ij} = z \delta_{ij}= a^2 \delta_{ij}$, so that $K_{ij} = -{\dot h_{ij}\over 2 N} = -{a\dot a\over N} \delta_{ij}= -\frac{\dot z}{2 N} \delta_{ij}$, and hence, the Ricci scalar is expressed as, \be \label{2.5} R =\frac{6}{N^2}\left(\frac{\ddot a}{a}+\frac{\dot a^2}{a^2}+N^2\frac{k}{a^2}-\frac{\dot N\dot a}{N a}\right)={6\over N^2}\left({\ddot z\over 2z} + N^2 {k\over z} - {1\over 2}{\dot N\dot z\over N z}\right),\ee The action \eqref{2.3} in Robertson-Walker minisuperspace \eqref{2.4}, therefore takes the form, \be\begin{split}\label{2.6} A &= \int\bigg[{3 f\sqrt z}\Big(\frac{\ddot z}{ N}- \frac{\dot N \dot z}{N^2} + 2k N \Big)+\frac{9B}{\sqrt z}\Big(\frac{{\ddot z}^2}{N^3} - \frac{2 \dot N \dot z \ddot z}{N^4} + \frac{{\dot N}^2{\dot z}^2}{N^5} -\frac{4k\dot N \dot z}{N^2}+ \frac{4 k {\ddot z}}{N} + 4 k^2 N \Big)\\&\hspace{2.5 in}+z^{\frac{3}{2}} \Big(\frac{1}{2N}\dot\phi^2-VN\Big)\bigg]dt + \Sigma_R +\Sigma_{R^2_1} +\Sigma_{R^2_2}. \end{split}\ee In the above, $\Sigma_R =-\frac{3f\sqrt z\dot z}{N},~~\text{while}~~\Sigma_{R^2_1}= -\frac{36 B k\dot z}{N\sqrt z}~~\text{and} ~~\Sigma_{R^2_2} =-\frac{18B\dot z}{N^3\sqrt z}\left({\ddot z}-\frac{\dot z\dot N}{N} \right)$. Under integrating by parts, the counter terms $\Sigma_R$ and $\Sigma_{R^2_1}$ get cancelled and the action (\ref{2.6}) reduces to \be\begin{split}\label{2.7} A &= \int\bigg[\Big(-\frac{3f'\dot\phi\dot{z} \sqrt z}{N} - \frac{3 f{\dot z}^2}{2 N\sqrt z} + 6 kN f \sqrt z \Big) + \frac{9 B}{\sqrt z} \Big(\frac{{\ddot z}^2}{N^3}-\frac{2\dot N\dot z \ddot z}{N^4}+\frac{\dot N^2\dot z^2}{N^5} + \frac{2 k {\dot z}^2}{N} + 4 k^2N \Big)\\& \hspace{3.5 in} +z^{\frac{3}{2}}\Big(\frac{1}{2N}\dot\phi^2-VN\Big)\bigg]dt + \Sigma_{R^2_2}, \end{split}\ee where, prime denotes derivative with respect to the scalar field $\phi$. At this stage introducing an auxiliary variable \be\label{2.8}\mathcal Q=\frac{\partial A}{\partial \ddot z}=\frac{18 B}{N^3\sqrt z}\left({\ddot z} -\frac{\dot N\dot z}{N}\right)\ee straight into the action (\ref{2.7}), as \be\begin{split}\label{2.9} A&= \int\Bigg[\left(-\frac{3f'\dot\phi\dot{z} \sqrt z}{N} - \frac{3 f{\dot z}^2}{2 N\sqrt z} + 6 k Nf \sqrt z \right)+ \mathcal Q\ddot z- \frac{N^3\sqrt{z}}{36B}{\mathcal Q}^2-\frac{\dot N\dot z \mathcal{Q}}{N}+ \frac{18B k\dot z^2}{Nz^{\frac{3}{2}}}+\frac{36BNk^2}{\sqrt{z}} \\& \hspace{3.5 in} +z^{\frac{3}{2}}\left(\frac{1}{2N}\dot\phi^2-VN\right)\Bigg]dt+ \Sigma_{R^2_2},\end{split}\ee the rest of the boundary terms is taken care of under integration by parts. Finally, the action being free from the boundary temrs, is expressed as \be\begin{split}\label{2.10} A &= \int\Bigg[-\dot {\mathcal Q}\dot z-\frac{3f'\dot\phi\dot{z} \sqrt z}{N} - \frac{3 f{\dot z}^2}{2 N\sqrt z}+ 6 k N f \sqrt z - \frac{N^3\sqrt{z}}{36B}{\mathcal Q}^2-\frac{\dot N\dot z\mathcal{Q}}{N}+ \frac{18B k\dot z^2}{Nz^{\frac{3}{2}}}+\frac{36BNk^2}{\sqrt{z}} \\& \hspace{3.8 in}+z^{\frac{3}{2}}\left(\frac{1}{2N}\dot\phi^2-VN\right)\Bigg]dt.\end{split}\ee The canonical momenta are \begin{subequations}\label{2.11}\begin{align} & p_{\mathcal Q} = - \dot z \label{pq} \\ &p_z =-\dot {\mathcal Q} -\frac{3f'\dot\phi\sqrt z}{N} -\frac{3f\dot z}{N\sqrt{z}}- \frac{\dot N \mathcal Q}{N}+\frac{36 B k \dot z}{N z^{\frac {3}{2}}} \label{pz} \\ & p_N=-\frac{\dot z \mathcal Q}{N}\\ & p_\phi = - \frac{3f' \dot z \sqrt z}{ N}+{{z^{\frac{3}{2}}}\dot\phi\over N} \label{pphi} \end{align}\end{subequations} The $(^0_0)$ component of Einstein's field equation in terms of the scale factor is \be\begin{split}\label{2.12} ~&\Bigg[-{6f\over a^2}\left({\dot a^2\over N^2}+k\right)-6{f'\dot a\dot\phi\over N^2 a} -{36B\over a^2N^4}\Bigg(2\dot a\dddot a - \ddot a^2 +2{\dot a^2\ddot a\over a} - 3{\dot a^4\over a^2} - 2\dot a^2{\ddot N\over N} - 4{\dot N\over N} \dot a\ddot a + 5 \dot a^2{\dot N^2\over N^2} - 2 {\dot a^3 \dot N\over a N}\\&\hspace{2.8 in} - 2k N^2{\dot a^2\over a^2} +k^2{N^4\over a^2}\Bigg) + \left({\dot \phi^2\over 2 N^2} + V(\phi)\right)\Bigg]Na^3=0, \end{split}\ee which when expressed in terms of the phase-space variables leads to the Hamilton constraint equation. However, construction of the phase-space structure of the Hamiltonian is non-trivial, since the Hessian determinant vanishes and the Lagrangian corresponding to the action \eqref{2.10} is degenerate. This is due to the presence of the time derivative of the lapse (which is essentially a Lagrange multiplier of the theory) in the said action, which is a typical to the higher order theory. Remember that no such time-derivative of the lapse function appears in General Theory of Relativity. The constraint $Q p_Q - N p_N = 0$, is also apparent from the expressions of canonical momenta \eqref{2.11}. Usually Dirac's constraint analysis is invoked to construct the phase-space Hamiltonian. Nevertheless, we have repeatedly pointed out \cite{mod3} that it is possible to bypass the issue and construct the canonical Hamiltonian in the following manner. For this purpose, let us use the expression, \be \label{2.13} p_{\mathcal Q} p_z = \dot {\mathcal Q}\dot z +\frac{3\dot z f'\dot\phi\sqrt z}{N} +\frac{3f\dot z^2}{N\sqrt{z}}+ \frac{\dot N\dot z \mathcal Q}{N}-\frac{36 B k \dot z^2}{N z^{\frac {3}{2}}}\ee obtained in view of the relations (\ref{pq} and \ref{pz}), and construct the Hamiltonian constraint equation in terms of the phase space variables as, \be\begin{split}\label{2.14} H_c &= 3f\Big(\frac{{p_{\mathcal Q}}^2}{2 N \sqrt z} - 2k N \sqrt z \Big) - p_{\mathcal Q} p_z + \frac{N^3 {\mathcal Q}^2 \sqrt z}{36B} - \frac{18 k B}{N\sqrt z} \Big(\frac{{p_\mathcal Q}^2}{ z} + 2kN^2 \Big) +\frac{Np_{\phi}^2}{2z^{\frac{3}{2}}}-\frac{3f'p_Qp_{\phi}}{z}\\&\hspace{3.9 in}+\frac{9f'^2p_Q^2}{2N\sqrt z}+VNz^{\frac{3}{2}}= 0. \end{split}\ee It is important to note that although the phase-space structure of the Hamiltonian corresponding to the higher order theory under consideration has been produced in \eqref{2.14}, it does not establish the diffeomorphic invariance of the theory. Diffeomorphic invariance is apparent only when the Hamiltonian is expressed in terms of the basic variables ($x, z, \phi$) and their canonically conjugate momenta ($p_x, p_z, p_{\phi}$). In order to express the Hamiltonian in terms of the basic variables, we make the canonical transformations following the replacements of $\mathcal Q = \frac{p_x}{N}$ and $ p_{\mathcal Q} = -Nx$, as before. The phase-space structure of the Hamiltonian in terms of the basic variables is then expressed as, \be\begin{split}\label{2.15} H_c &= N\Big[x p_z + \frac{ \sqrt z {p_x}^2}{36B} + 3f\Big(\frac{x^2}{2 \sqrt z} - 2k \sqrt z \Big) - \frac{18 k B}{\sqrt z} \Big(\frac{x^2}{z} + 2k\Big)+ \frac{p_{\phi}^2}{2z^{\frac{3}{2}}}+\frac{3f'xp_{\phi}}{z}+\frac{9f'^2x^2}{2\sqrt z}+Vz^{\frac{3}{2}}\Big]\\&=N\mathcal{H}. \end{split}\ee Diffeomorphic invariance is now clearly established in the equation \eqref{2.15}. The action (\ref{2.7}) can also be expressed in the canonical form with respect to the basic variables as, \be\begin{split}\label{2.16} A &= \int\left(\dot z p_z + \dot x p_x +\dot\phi p_{\phi}- N\mathcal{H}_L\right)dt~ d^3 x = \int\left(\dot h_{ij} \pi^{ij} + \dot K_{ij}\Pi^{ij}+\dot\phi p_{\phi} - N\mathcal{H}_L\right)dt~ d^3 x,\end{split}\ee where, $\pi^{ij}$ and $\Pi^{ij}$ are momenta canonically conjugate to $h_{ij}$ and $K_{ij}$ respectively. This establishes the importance of the use of appropriate basic variables, over other canonical ones. Now, the canonical Hamiltonian \eqref{2.15} may immediately be quantized to obtain, \be \begin{split}\label{2.17} \frac{i\hbar}{\sqrt z}\frac{\partial \Psi}{\partial z} = &-\frac{\hbar^2}{36B x}\left(\frac{\partial^2}{\partial x^2} + \frac{n}{x}\frac{\partial}{\partial x} \right)\Psi -\frac{\hbar^2}{2xz^2}\frac{\partial^2 \Psi}{\partial \phi^2} + {3 \over z^{\frac{3}{2}}}\widehat{f' p_\phi}\\&\hspace{1.0 in}+ \left[\frac{3fx}{2 z} +\frac{9f'^2x}{2z}+\frac{Vz}{x} -{6kf\over x} - {18kBx\over z^2} - {36k^2B\over xz}\right]\Psi = \hat H_e\Psi, \end{split}\ee where, $n$ is the operator ordering index. In the above expression \eqref{2.17} due to the presence of coupling between $f'(\phi)$ and $p_{\phi}$, there still remains some operator ordering ambiguity, which may only be resolved after having specific knowledge regarding the form of $f(\phi)$. \subsection{In search of a form of $f(\phi)$ and Canonical quantization} The nonminimally coupled action (\ref{2.3}) can be re-expressed (apart from the supplementary boundary terms) as, \be\label{3.18} A=\int\sqrt{-g}\;d^4x\left[\frac{1}{2}\mathrm{f}(\phi,R)-\frac{1}{2}\phi_{,\mu}\phi^{,\mu}-V(\phi)\right],\ee where $\mathrm{f}(\phi,R)=2f(\phi){R}+2B R^2$. The field equations in the homogeneous and isotropic flat ($k=0$) Robertson-Walker metric background (with $N=1$), are expressed as \be\label{3.22} H^2=\frac{1}{3F}\left(\frac{1}{2}\dot\phi^2+\frac{R F-\mathrm{f}+2V}{2}-3H\dot F\right),\ee \be\label{3.23} \dot H=-\frac{1}{2F}\left(\dot\phi^2+\ddot F-H\dot F\right),\ee \be\label{3.24} \ddot\phi+3H\dot\phi+\frac{1}{2}\left(2V'-\mathrm{f}'\right)=0,\ee where $F = {\partial \mathrm{f}\over\partial R}$, $H=\frac{\dot a}{a}$, $R=6(\dot H+2H^2)$, and the scalar field equation (\ref{3.24}) follows from equations (\ref{3.22}) and (\ref{3.23}). It is already known that inflation is an essential feature of higher order curvature term \cite{staro, maeda}. Here our aim, as already mentioned in the introduction, is to check if the quantum dynamics of the higher-order theory under consideration in the Trans-Planckian era, leads generically to the inflationary scenario in the post Planck's era. Therefore, we seek inflationary solution of the classical field equations \eqref{3.22} - \eqref{3.24} in the following standard de-Sitter exponential form \be\label{3.65} a=a_0 e^{{\mathrm H}t},~~~\phi=\phi_0 e^{-{\mathrm H}t},\ee where, constant `$\mathrm{H}$' is the Hubble parameter `$H$' in the de-Sitter regime, and $R = 12 \mathrm{H}^2$. Equation \eqref{3.24} relates $V'(\phi)$ and $\mathrm{f'(\phi,R)}$ and in the process $V(\phi)$ and $f(\phi)$ in the following manner, \be\label{Rel1} 2V' - \mathrm{f'} = 4\mathrm{H}^2\phi \Longrightarrow V(\phi) - 12\mathrm{H}^2 f(\phi) = \mathrm{H}^2\phi^2 + c,\ee where $c$ is an integration constant. In view of equation \eqref{3.22}, one can also find \be\label{Rel2} 2V = 12 \mathrm{H}^2 f(\phi) - 12 \mathrm{H}^2 f'(\phi)\phi -\mathrm{H}^2\phi^2.\ee The two equations \eqref{Rel1} and \eqref{Rel2} are simultaneously satisfied restricting the potential and the coupling parameter to the following forms \be\label{3.66} V(\phi)=V_1+\frac{V_0}{\phi},\;\;\;\text{and}\;\;\;f(\phi)=f_0+\frac{f_1}{\phi}-\frac{\phi^2}{12},\ee where $c = -f_0R - 2B R^2$, and the parametric constants, $V_0,\;V_1,\; f_0,\;\mathrm{and}\;f_1$ are related in the following manner, \be \label{3.67}V_0=12f_1 \mathrm{H}^2,\;\;\; V_1 = 6f_0 \mathrm{H}^2.\ee Since the form of the coupling parameter $f(\phi)$ has been explored in \eqref{3.66}, we can now proceed with our left out task regarding canonical quantization. Choosing suitable operator ordering between $f'(\phi)$ and $p_{\phi}$, equation \eqref{2.17} now takes the form \be\begin{split}\label{4.71} \frac{i\hbar}{\sqrt z}\frac{\partial \Psi}{\partial z} &= -\frac{\hbar^2}{36B x}\left(\frac{\partial^2}{\partial x^2} + \frac{n}{x}\frac{\partial}{\partial x} \right)\Psi - \frac{\hbar^2}{2x z^2}\frac{\partial^2\Psi}{\partial \phi^2} +\frac{i\hbar}{2z^{\frac{3}{2}}}\left(\frac{\phi^3+6f_1}{\phi^2}\right)\frac{\partial\Psi}{\partial\phi}+\frac{i\hbar}{4z^{\frac{3}{2}}} \left(\frac{\phi^3-12f_1}{\phi^3} \right)\Psi\\&+ \left[\frac{3 x}{2z}\left(f_0+\frac{f_1}{\phi}-\frac{\phi^2}{12}\right)+\frac{9x} {2z}\left(\frac{f_1}{\phi^2}+\frac{\phi}{6}\right)^2 +\frac{6f_0 \mathrm{H}^2z}{x}+\frac{12f_1\mathrm{H}^2z}{x\phi}\right]\Psi ,\end{split}\ee where Weyl symmetric ordering has been performed between $f'(\phi)$ and $p_\phi$, appearing in the third term on the right hand side, and the form of the potential has been supplemented from equation \eqref{3.66} and \eqref{3.67}. Now, under a change of variable, the above modified Wheeler-de-Witt equation, takes the look of Schr\"odinger equation, viz., \be\begin{split}\label{4.72} i\hbar\frac{\partial \Psi}{\partial \sigma} &= -\frac{\hbar^2}{54B}\left(\frac{1}{x}\frac{\partial^2}{\partial x^2} + \frac{n}{x^2}\frac{\partial}{\partial x} \right)\Psi - \frac{\hbar^2}{3x \sigma^{\frac{4}{3}}}\frac{\partial^2\Psi}{\partial\phi^2}+\frac{i\hbar}{3\sigma}\left(\frac{\phi^3+6f_1}{\phi^2} \right)\frac{\partial\Psi}{\partial\phi}\\& \hspace{1.8 in}+\frac{i\hbar}{6\sigma}\left(\frac{\phi^3-12f_1}{\phi^3} \right)\Psi+ V_e\Psi = \hat H_e\Psi, \end{split}\ee where, $\sigma = z^{\frac{3}{2}} = a^3$ plays the role of internal time parameter. In the above equation, the effective potential $V_e$, is given by, \be\label{4.73} V_e = \left[\frac{ x}{\sigma^{\frac{2}{3}}}\left(f_0+\frac{f_1}{\phi}-\frac{\phi^2}{12}\right)+\frac{3x}{\sigma^ {\frac{2}{3}}}\left(\frac{f_1}{\phi^2}+\frac{\phi}{6}\right)^2 +\frac{4f_0 \mathrm{H}^2\sigma^{\frac{2}{3}}}{x}+\frac{8f_1 \mathrm{H}^2\sigma^{\frac{2}{3}}}{x\phi}\right]. \ee \subsection{Probabilistic interpretation} The hermiticity of $\hat H_e$ (see Appendix A) should enable us to write the continuity equation, which requires to find $\frac{\partial\rho}{\partial\sigma}$, where, $\rho=\Psi^*\Psi.$ A little bit of algebra leads to the following equation, \be\label{4.74}\begin{split} \frac{\partial\rho}{\partial\sigma} &=-\frac{\partial}{\partial x}\left[\frac{i \hbar }{54B x}(\Psi\Psi^*_{,x}-\Psi^*\Psi_{~,x}) \right]- \frac{\partial}{\partial \phi}\left[\frac{i \hbar}{3x\sigma^{\frac{4}{3}}}(\Psi\Psi^*_{,\phi}-\Psi^*\Psi_{~,\phi}) -\left(\frac{\phi^3+6f_1}{3\sigma\phi^2}\right)\Psi^*\Psi \right]\\&+\frac{(n+1)}{x^2} \left(\Psi\Psi^*_{,x}-\Psi^*\Psi_{,x}\right) \end{split}\ee Clearly, continuity equation can be written, only under the choice $n = -1$, as \be\label{4.75}\frac{\partial\rho}{\partial \sigma} + \nabla . {\bf{J}} = 0, \ee where, $ \rho = \Psi^*\Psi ~~ \text{and} ~~ {\bf J} = ({\bf J}_x, {\bf J}_\phi, 0) $ are the probability density and the current density respectively, and \begin{subequations}\label{4.76}\begin{align} {\bf J}_x &= \frac{i \hbar }{54B x}(\Psi\Psi^*_{,x}-\Psi^*\Psi_{~,x})\\ {\bf J}_\phi &= \frac{i \hbar }{3x\sigma^{\frac{2}{3}}}(\Psi\Psi^*_{,\phi}-\Psi^*\Psi_{~,\phi})-\left(\frac{\phi^3+6f_1}{3\sigma\phi^2}\right)\Psi^*\Psi.\end{align} \end{subequations} It is noticeable that the existence condition of standard quantum mechanical probabilistic interpretation, fixes the operator ordering index to $n = -1$. \subsection{Semiclassical approximation} Now to check the viability of the quantum equation (\ref{4.72}), it is required to test its behaviour under certain appropriate semi-classical approximation. For the purpose, it is easier to handle equation (\ref{4.71}) instead, and express it as, \be\begin{split}\label{4.77} -\frac{\hbar^2\sqrt z}{36B x}\left(\frac{\partial^2}{\partial x^2} + \frac{n}{x}\frac{\partial}{\partial x}\right)\Psi - \frac{\hbar^2}{2x z^ {\frac{3}{2}}}\frac{\partial^2\Psi}{\partial \phi^2} - i\hbar\frac{\partial \Psi}{\partial z}+\frac{i\hbar}{2z}\left(\frac{\phi^3+6f_1}{\phi^2}\right) \frac{\partial\Psi} {\partial\phi} + \mathcal{V}\Psi = 0 \end{split}\ee where \be\label{4.78} \mathcal{V} = \left[\frac{3 x}{2\sqrt z}\left(f_0+\frac{f_1}{\phi}-\frac{\phi^2}{12}\right)+\frac{9x}{2\sqrt z}\left(\frac{f_1}{\phi^2}+ \frac{\phi}{6}\right)^2 +\frac{6f_0{\mathrm{H}}^2z^{\frac{3}{2}}}{x}+\frac{12f_1{\mathrm{H}}^2z^{\frac{3}{2}}}{x\phi}+ \frac{i\hbar}{4z}\left(\frac{\phi^3-12f_1}{\phi^3} \right)\right] . \ee The above equation \eqref{4.77} may be treated as time independent Schr{\"o}dinger equation with three variables ($x$, $z$, $\phi$). Therefore, as usual, let us seek the solution of equation (\ref{4.77}) as, \be\label{4.79}\Psi = \psi_0e^{\frac{i}{\hbar}S(x,z,\phi)}\ee and expand $S$ in power series of $\hbar$ as, \be\label{4.80} S = S_0(x,z,\phi) + \hbar S_1(x,z,\phi) + \hbar^2S_2(x,z,\phi) + .... .\ee Now inserting the expression (\ref{4.80}) in equation (\ref{4.79}) and taking appropriate derivatives of $\Psi$, everything may finally be inserted in equation (\ref{4.77}). At the end, equating the coefficients of different powers of $\hbar$ to zero, one obtains the following set of equations (up-to second order) \begin{subequations}\begin{align} &\frac{\sqrt z}{36B x}S_{0,x}^2 + \frac{S_{0,\phi}^2}{2xz^{\frac{3}{2}}} + S_{0,z}-\left(\frac{\phi^3+6f_1}{2z\phi^2}\right)S_{0,\phi} + \mathcal{V}(x,z,\phi) = 0, \label{4.81a} \\ &-\frac{i\sqrt z}{36B x}S_{0,xx} - \frac{in\sqrt z}{36B x^2}S_{0,x} - \frac{iS_{0,\phi\phi}}{2xz^{\frac{3}{2}}} + S_{1,z} + \frac{\sqrt zS_{0,x}S_{1,x}}{18Bx} + \frac{S_{0,\phi}S_{1,\phi}}{xz^{\frac{3}{2}}}-\left(\frac{\phi^3+6f_1}{2z\phi^2}\right)S_{1,\phi} = 0, \label{4.81b}\\ &-i\frac{\sqrt z S_{1,xx}}{36B x} - i\frac{n\sqrt zS_{1,x}}{36B x^2}+{\sqrt z}\frac{S_{1,x}^2+2 S_{0,x}S_{2,x}}{36B x} + \frac{ S_{1,\phi}^2+2S_{0,\phi}S_{2,\phi}}{2xz^{\frac{3}{2}}} - i\frac{S_{1,\phi\phi}}{xz^{\frac{3}{2}}} + S_{2,z}-\left(\frac{\phi^3+6f_1}{2z\phi^2}\right)S_{2,\phi}= 0,\label{4.81c} \end{align}\end{subequations} that are to be solved successively to find $S_0(x,z,\phi),\; S_1(x,z,\phi)$ and $S_2(x,z,\phi)$ and so on. Now identifying $S_{0,x}$ as $p_x$; $S_{0,z}$ as $p_z$ and $S_{0,\phi}$ as $p_{\phi}$ one can recover the classical Hamiltonian constraint equation $H_c = 0$, given in equation (\ref{2.15}) from equation \eqref{4.81a}. This is a consistency check. Thus, $S_{0}(x, z)$ can now be expressed as, \be\label{4.82} S_0 = \int p_z dz + \int p_x dx + \int p_\phi d\phi \ee apart from a constant of integration which may be absorbed in $\psi_0$. The integrals in the above expression can be evaluated using the classical solution for $k = 0$ presented in equation (\ref{3.65}), the definition of $p_z$ given in (\ref{pz}), $p_{\phi}$ in (\ref{pphi}) and $p_x = {\mathcal Q}$. Further, we recall the expression for ${\mathcal Q}$ given in (\ref{2.8}), remember the relation, $x = \dot z$, where, $z = a^2$, choose $n = -1$, since probability interpretation holds only for such value of $n$, and use the form of $f({\phi})$ presented in (\ref{3.66}), to obtain the following expressions of $p_x$, $p_z$ $p_\phi$ in term of $x$, $z$ and $\phi$, \begin{subequations}\begin{align} &\label{4.83} f'=-\left(\frac{f_1}{\phi^2}+\frac{\phi}{6}\right)\\ &x = 2{\mathrm H} z \\ &p_x = 36\sqrt 2 B {\mathrm H}^{\frac{3}{2}} \sqrt {x}\\ &p_z = -72B{\mathrm H}^3\sqrt z-6f_0\mathrm H \sqrt z-\frac{9f_1{\mathrm H}}{a_0\phi_0}z\\ &p_\phi = \frac{6f_1{\mathrm H} a_0^3\phi_0^3}{\phi^5} \end{align}\end{subequations} Hence the integrals in (\ref{4.82}) are evaluated as, \begin{subequations}\begin{align} &\label{4.84}\int p_x dx = 24 \sqrt{2} B {\mathrm H}^{\frac{3}{2}} x^{\frac{3}{2}}; \\ &\int p_z dz = -48B{\mathrm H}^3z^{\frac{3}{2}}-4f_0\mathrm H z^{\frac{3}{2}}-\frac{9f_1 \mathrm H}{2a_0\phi_0}z^2; \\ &\int p_\phi d\phi = -\frac{3f_1{\mathrm H} a_0^3\phi_0^3}{2\phi^4}. \end{align}\end{subequations} \noindent Thus, the explicit form of $S_0$ in terms of $z$ is found as, \be\label{4.85}S_0 = \left(48B\mathrm{H}^3-4f_0\mathrm H\right) z^{\frac{3}{2}} -\frac{6f_1\mathrm H }{a_0\phi_0}z^2.\ee For consistency, one can trivially check that the expression for $S_0$ (\ref{4.85}) so obtained, satisfies equation (\ref{4.81a}) identically. In fact it should, because, equation (\ref{4.81a}) coincides with Hamiltonian constraint equation (\ref{2.15}) for $k = 0$. Moreover, one can also compute the zeroth order on-shell action (\ref{2.10}). Using classical solution (\ref{3.65}) one may express all the variables in terms of $t$ and substitute in the action (\ref{2.10}) to obtain \be\label{4.86}A=A_{cl}=\int\left[144B{\mathrm H}^4a_0^3e^{3{\mathrm H}t}-12f_0{\mathrm H}^2a_0^3e^{3{\mathrm H}t}-\frac{24f_1{\mathrm H}^2}{\phi_0}a_0^3 e^{4{\mathrm H}t}\right]dt. \ee Integrating we have, \be\label{4.87} A=A_{cl}=\left(48B{\mathrm H}^3-4f_0{\mathrm H}\right)a_0^3e^{3{\mathrm H}t}-\frac{6f_1{\mathrm H}}{a_0\phi_0}a_0^4e^{4{\mathrm H}t},\ee which is the same as we obtained in (\ref{4.85}), proving $S_0$ to be the classical action and checking consistency yet again. Hence, at this end, the wave function is \be\label{4.88} \Psi = \psi_0 e^{\frac{i}{\hbar}\left[ \left(48B\mathrm{H}^3-4f_0\mathrm H\right) z^{\frac{3}{2}} -\frac{6f_1\mathrm H } {a_0\phi_0}z^2\right]}.\ee \subsubsection{ First order approximation} Now for $n=-1$, equation \eqref{4.81b} can be expressed as, \be\label{4.89} -\frac{\sqrt z}{36B x}\left(i S_{0,xx} - 2S_{0,x}S_{1,x} - \frac{i}{x}S_{0,x}\right) -\frac{1}{2 x z^{\frac{3}{2}}}\left(i S_{0,\phi\phi} - 2S_{0,\phi} S_{1,\phi}+\frac{x\sqrt z}{\phi^2}\left(\phi^3+6f_1\right)S_{1,\phi}\right) + S_{1,z} = 0. \ee \noindent Using the expression for $S_0$ obtained in (\ref{4.85}), we can write $S_{1,z}$ from the above equation as \be\label{4.90} S_{1,z} = {i \left[{12D\over a_0^2\phi_0^2}- {30\sqrt z\over a_0^3\phi_0^3} - {D\over 96B\mathrm{H}^2 z}\right] \over \left[2 +{D\over 24B \mathrm{H}^2}- {\sqrt z\over 12BH^2a_0\phi_0} +{12D z\over a_0^2\phi_0^2} + (6f_1 - 24){z^{3\over 2}\over a_0^3\phi_0^3}\right]}, \ee where, $D = 12 B\mathrm{H}^2 -1$. On integration the form of $S_1$ is found as, \be \label{4.91}S_1 = i F(z),\ee Therefore, the wavefunction up to first-order approximation reads \be\label{4.92} \Psi = \psi_{01} e^{\frac{i}{\hbar}\left[ \left(48B\mathrm{H}^3-4f_0\mathrm H\right) z^{\frac{3}{2}} - \frac{6f_1\mathrm H }{a_0\phi_0}z^2\right]},\ee where, \be\label{4.93}\psi_{01} = \psi_0 e^{-F(z)}.\ee It has been proved that $S_0$ obeys Hamilton-Jacobi equation. Comparison with classical constraint equation $H_c = 0$ \eqref{2.15}, one finds $p_x = {\partial S_0\over \partial x}$, and $p_z = {\partial S_0\over \partial z}$. So the wavefunction shows a strong correlation between coordinates and momenta. Now using the relation between velocities and momenta and the fact that $S_0$ obeys Hamilton-Jacobi equation, it is apparent that the above relations define a set of trajectories in the $x-z$ plane, which are solutions to the classical field equations. Thus the semiclassical wave function \eqref{4.92} is strongly peaked around classical inflationary solutions \eqref{3.65}. \section{Inflation} Since the very early quantum universe smoothly transits to the de-Sitter type inflationary era, we therefore in the following subsection (3.1), compute the inflationary parameters in connection with the action \eqref{2.3} under consideration. It is important to note that the potential \eqref{3.66} is flat when $\phi$ is sufficiently large, and so, the slow-roll approximation is admissible. In the next subsection (3.2), we study classical aspect of gravitational perturbation. Finally in subsection (3.3) we derive the perturbation spectra generated from the quantum fluctuations in an early scalar field dominated accelerating (inflation) phase. \subsection{Slow roll approximation} Before we proceed, let us perform conformal transformation to demonstrate the fact that the higher order theory of gravity with non-minimal coupling under consideration \eqref{3.18}, involves an additional degree of freedom. Under the following conformal transformation, \be \label{3.19} g_{\mu\nu}\rightarrow \hat{g}_{\mu\nu}=\Omega^2 g_{\mu\nu} ~\mathrm{and~under~the~choice}~ \Omega^2 = F \equiv \frac{\partial{\mathrm{f}(\phi,R)}}{\partial R} = e^{\sqrt{\frac{2}{3}}\psi}\ee where $\psi = \sqrt{3\over 2}\ln F$ is the new dynamical variable, the Lagrangian density, associated with action (\ref{3.18}) may be transformed into \cite{Hwang1, Hwang2} \be \label{3.20} \hat L = \frac{1}{2}\hat R-\frac{1}{2 F}{\phi}_{\hat;\mu}{\phi}^{\hat;\nu}-\frac{1}{2}{\psi}_{\hat;\mu}{\psi}^{\hat;\nu}-\hat {V}(\phi,\psi), \;\;\;\mathrm{where,}\;\;\; \hat {V}(\phi,\psi)=\frac{R F-\mathrm{f}+2V}{2F^2}.\ee In the above, we use hats to denote quantities based on the conformally transformed metric frame. Thus, our original $\mathrm{f}(\phi,R)$ gravity is cast into the Einstein theory with an additional scalar field $\psi$, and a special potential term $\hat{V}(\phi,\psi)$ \eqref{3.20} \footnote{Only in a very special case, assuming $\psi = \psi(\phi)$, one can introduce another scalar field $\hat\phi$ to express the Lagrangian in terms of a single scalar field as in the case of minimally coupled scalar-tensor theory of gravity as, $\hat L = {\hat R\over 2} - {1\over 2} \hat{\phi}_{\hat;\mu}\hat{\phi}^{\hat;\mu} - \hat V(\hat \phi)$. However in that case, $\hat\phi$ should satisfy the relation $ d\hat\phi=\sqrt{\frac{1}{F}{d\phi}^2+{d\psi}^2}.$}. Using the conformal equivalence between the theories, it is possible to derive the equations for the background and the perturbations. The general asymptotic solutions for the perturbations in the generalized gravity from the simple results known in the minimally coupled scalar field may also be presented \cite{Hwang1, Hwang2}. However, we shall not use the conformal transformation properties in the following treatment. Rather we use the conformal transformation to realize that, along with the standard slow-roll conditions of minimally coupled single-field inflation, viz. $\dot\phi^2\ll V$ and $|\ddot\phi|\ll3H|\dot\phi|$, it is required to impose one additional condition due to the presence of additional field viz. $4|\dot{\mathrm{f}}|H\ll 1$ \cite{addic}. As in the case of Gauss-Bonnet coupling \cite{hgb, hgb1, hgb2, hgb3}, instead of standard slow roll parameters, here also the introduction of a combined hierarchy in the following manner, appears to be much suitable. Firstly, the background evolution is described by a set of horizon flow functions (the behaviour of Hubble distance during inflation) starting from \begin{center} \be\label{3.27}\epsilon_0=\frac{d_H}{d_{H_i}}, \ee \end{center} where, $d_H=H^{-1}$ is the Hubble distance, also called horizon in our chosen unit. We use suffix $i$ to denote the era at which inflation was initiated. Now hierarchy of functions is defined in a systematic way as \be\label{3.28} \epsilon_{l+1}=\frac{d\ln|\epsilon_l|}{dN},~~~~~ l\geq 0.\ee In view of the definition $N=\ln{\frac{a}{a_i}},$ which implies $\dot N=H,$ one can compute $\epsilon_1=\frac{d\ln{d_H}}{dN},$ which is the logarithmic change of Hubble distance per e-fold expansion $N$. It is the first slow-roll parameter $\epsilon_1=\dot{d_H}=-\frac{\dot H}{H^2}$, implying that the Hubble parameter almost remains constant during inflation. The above hierarchy allows one to compute $\epsilon_2=\frac{d\ln{\epsilon_1}}{dN}=\frac{1}{H}\frac{\dot\epsilon_1}{\epsilon_1},$ which implies $\epsilon_1\epsilon_2=d_H\ddot{d_H} =-\frac{1}{H^2}\left(\frac{\ddot H}{H}-2\frac{\dot H^2}{H^2}\right).$ In the same manner higher slow-roll parameters may be computed. Equation (\ref{3.27}) essentially defines a flow in space with cosmic time being the evolution parameter, which is described by the equation of motion \be\label{3.29}\epsilon_0\dot\epsilon_l-\frac{1}{d_{H_i}}\epsilon_l\epsilon_{l+1}=0,~~~~l\geq 0.\ee One can also check that (\ref{3.29}) yields all the results obtained from the hierarchy defined in (\ref{3.28}), using the definition (\ref{3.27}). As already mentioned, the additional degree of freedom appearing due to the function $\mathrm{f}(\phi, R)$, requires to introduce yet another hierarchy of flow parameters as \be\label{3.30} \delta_1=4\dot{\mathrm{f}} H\ll 1, ~~~~~\delta_{m+1}=\frac{d\ln|\delta_m|}{d\ln a}, ~~~~\text{with,} ~~~~m\geq 1.\ee Clearly, for $m=1, \delta_2=\frac{d\ln|\delta_1|}{dN}=\frac{1}{\delta_1}\frac{\dot\delta_1}{\dot N},$ and $\delta_1\delta_2=\frac{4}{H}\left(\ddot{\mathrm{f}} H+\dot{\mathrm{f}}\dot H\right),$ and so on. The slow-roll conditions therefore read $|\epsilon_m|\ll 1$ and $|\delta_m| \ll 1$, which are analogous to the standard slow-roll approximation. Now we arrange the field equations (\ref{3.22}) and (\ref{3.24}) in the following manner \be\begin{split}\label{3.25} \dot\phi^2+2V&= 12 H^2 \mathrm{f} + 3(1 + 4 H \dot{\mathrm{f}}) +144 B H^4\left(2+\frac{\dot H}{H^2}\right)- 72B H^4\left(2+\frac{\dot H}{H^2}\right)^2 \\&\hspace{0.7 in}- 144B H^4\left[1-\frac{1}{H^2} \left(\frac{\ddot H}{H}-2\frac{\dot H^2}{H^2}\right)-2\left(1+\frac{\dot H}{H^2}\right)^2 + 1 \right] -3. \end{split}\ee \be\label{3.26} \ddot\phi+3H\dot\phi=-V'+ 6 H^2 \mathrm{f}'\left(2 + {\dot H\over H^2}\right) .\ee In view of the slow-roll parameters, the above equations (\ref{3.25}) and (\ref{3.26}) may therefore be expressed as \be\begin{split} \label{3.31} \dot\phi^2+2V& = 12 H^2\mathrm{f} + 3\left(1+\delta_1\right) +144 BH^4\left(2-\epsilon_1\right)-72 B H^4\left(2-\epsilon_1\right)^2 \\&-144 BH^4 \mathrm{f}\big[(1+\epsilon_1\epsilon_2)-2\left(1-\epsilon_1\right)^2 + 1\big]-3,\end{split}\ee \be\label{3.32} \ddot\phi+3H\dot\phi=-V'+6 H^2 \mathrm{f}'(2-\epsilon_1),\ee respectively, and may be approximated to \be\label{3.33}V \simeq 6H^2 \mathrm{f},\ee \be\label{3.34} 3H\dot\phi\simeq -V'+ 12 H^2 \mathrm{f}'. \ee Since the Hubble parameter $H = \mathrm{H}$, remains constant during inflation, so the above pair of equations \eqref{3.33} and \eqref{3.34} may be combined to obtain \be \label{3.35} \dot\phi={V'\over 3H}.\ee The number of e-folds then has to be computed in view of the following relation, \be\label{3.36} N(\phi)\simeq \int_{t_i}^{t_f}Hdt=\int_{\phi_i}^{\phi_f}\frac{H}{\dot\phi}d\phi\simeq \int_{\phi_i}^{\phi_f} \frac{3H^2}{V'}d\phi,\ee where, $\phi_i$ and $\phi_f$ denote the values of the scalar field at the beginning $(t_i)$ and the end $(t_f)$ of inflation. Since we already have knowledge on the specific forms of the potential $V(\phi)$ and the coupling parameter $f(\phi)$ in view of relations \eqref{3.66} and \eqref{3.67} it is now possible to compute the number of e-folding, along with the other slow-roll parameters.\\ \noindent The number of e-folding (\ref{3.36}) now reads \be\label{3.68}N(\phi)={1\over 4 f_1}\int_{\phi_f}^{\phi_i}\phi^2 d\phi= {1\over 12 f_1}(\phi_i^3-\phi_f^3).\ee We take following numerical values: $\phi_i = 4.8 M_p,\;\;\phi_f = 1.2 M_p,\;\; f_0 = 0.4291 M_p^2,\;\;\mathrm{and},\;\, f_{1} = -0.162 M_p^3$ to find that inflation halts ($\epsilon_f =1$) after $N = 56$~e-fold of expansion. The slow-roll parameters take the numerical values, \be\label{3.69}\epsilon =\frac{M_{pl}^2}{2}\left(\frac{V'}{V}\right)^2=\frac{M_{pl}^2}{2}\left(\frac{V_0^2}{\phi^2 \left(V_0+V_1\phi\right)^2}\right) = {M_p^2 \over \phi_i^2} \left({2f_1^2\over(2f_1 + f_0 \phi_i)^2}\right) = 0.0007562,\ee \be\label{3.70}\eta = M_{pl}^2\frac{V''}{V}= M_{pl}^2 \left(\frac{2V_0}{\phi^2(V_0+V_1\phi)}\right) = {M_p^2 \over \phi_i^2}\left({4f_1 \over (2f_1 + f_0 \phi_i)}\right) = - 0.0162,\ee and therefore the scalar to tensor ratio and the spectral index take the values $r = 16\epsilon = 0.012;$\;and, $n_s = 1- 6\epsilon + 2\eta = 0.963$, which are very much within the limit of recently released data \cite{pd}. \subsection{Gravitational perturbation: Validating the relation between $\mathrm{f}(\phi)$ and $V(\phi)$} In this subsection, we study gravitational perturbation essentially to demonstrate the fact that the perturbed form of the background scalar field equation when equated to the same equation obtained by varying the metric-perturbed action , the relationship between the potential $V(\phi)$ and $\mathrm{f}(\phi, R)$ and hence between $V(\phi)$ and the coupling parameter $f(\phi)$ is found to be the same as already obtained \eqref{Rel1} in view of de-Sitter solution \eqref{3.65} of the classical field equations \eqref{3.22} and \eqref{3.24}. Although, it might appear striking, nevertheless, it validates the semiclassical approximation performed in subsection (2.3), that ends up with a wave-function which is oscillatory about de-Sitter expansion.\\ Cosmological perturbation in Einstein's gravitational theory \cite{Hwang3, Hwang4} and also in a broad class of theories $\mathrm{f}(\phi, R)$, often called generalized gravity theories, have been analysed thoroughly in a series of articles \cite{Hwang1, Hwang2, Hwang5, Hwang6, Hwang7, Hwang8, Noh}, in uniform curvature gauge, first introduced by Mukhanov \cite{Muk}. The asymptotic solutions of the scalar field equation in the large and small scale limits have been found. Further, the primordial seed density fluctuations generated from vacuum quantum fluctuations in different inflationary models for generalized gravity theories, have also been presented \cite{Hwang3, Hwang2, Hwang5}. Although our present aim is to validate the choice of de-Sitter expansion, which relates the potential and the coupling parameter uniquely, however, for the sake of completeness we briefly review the work of Hwang regarding quantum perturbation, and present the expression for the power spectrum in the generalized gravity under consideration. \\ \noindent As usual, we consider a spatially flat, homogeneous and isotropic Robertson-Walker metric together with the most general scalar-type and tensor-type space-time dependent perturbations as, \be \label{3.37} ds^2=-a^2\left(1+2\alpha\right)d\eta^2-a^2\left(\beta_{,\alpha}+{B}_{\alpha}\right)d\eta dx^{\alpha}+a^2\left[g_{\alpha\beta}^{(3)}\left(1+2\varphi \right) +2\gamma_{,\alpha |\beta}+2C_{\alpha |\beta}+2C_{\alpha\beta}\right] dx^{\alpha}dx^{\beta},\ee where, $dt\equiv ad\eta$, $\eta$ being the conformal time. While, $\alpha(\textbf{x},t)$, $\beta(\textbf{x},t)$, $\varphi(\textbf{x},t)$ and $\gamma(\textbf{x},t)$ characterize the scalar-type perturbations, $B_{\alpha}(\textbf{x},t)$ and $C_{\alpha}(\textbf{x},t)$ are trace-free $(B_{|\alpha}^{\alpha} =0 = C_{|\alpha}^{\alpha})$ and correspond to the vector-type perturbations. Finally, $C_{\alpha\beta}(\textbf{x},t)$ is transverse and trace-free $(C_{\alpha |\beta}^{\beta}=0=C_{\alpha}^{\alpha})$ and corresponds to the tensor-type perturbation. Indices are based on $g_{\alpha\beta}^{(3)}$ as the metric and the vertical bar (`$|$') indicates a covariant derivative. Now, we decompose the energy-momentum tensor along with the scalar field by introducing perturbation as, $T_b^a(\textbf{x},t)=\bar{T}_b^a(t)+\delta T_b^a(\textbf{x},t)$, $\phi(\textbf{x},t)=\bar\phi(t)+\delta\phi(\textbf{x},t)$, and $F =\bar F+\delta F$. In these expressions an over-bar indicates a background ordered quantity and it will be omitted unless necessary. At this stage, we introduce a gauge invariant combination as, \be\label{3.38}\delta\phi_{\varphi}=\delta\phi-\frac{\dot\phi}{H}\varphi_{\delta\phi},~~~{\delta F\over \dot F} = {\delta \phi\over \dot\phi},\ee where $H = {\dot a\over a}$ is the Hubble parameter, and since $\delta F$ is related to $\delta\phi$, so one can use either as the representative. Note that $\delta\phi_{\varphi}$ becomes $\delta\phi$ in the uniform-curvature gauge which takes $\phi \equiv 0$ as the gauge condition. The perturbed action in a unified form may be expressed as \cite{Hwang2, Hwang8}, \be\label{3.39} \delta S=\frac{1}{2}\int a^3 \Theta\left\{\dot{\delta\phi_{\varphi}}^2-\frac{1}{a^2}\delta\phi_{\varphi}^ {|\nu}\delta\phi_{\varphi,\nu} +\frac{1}{a^3 \Theta}\frac{H}{\dot\phi}{\left[a^3\Theta {\left(\frac{\dot\phi}{H}\right)}^{.} \right]}^{.}\delta \phi_{\varphi}^2\right\}dtd^3x,\ee where, $\Theta=\frac{1+\frac{3\dot F^2}{2\dot\phi^2 F}}{\left(1+\frac{\dot F}{2HF}\right)^2}$, makes all the difference between generalized theory of gravity under consideration and General Theory of Relativity with a minimally coupled scalar field, for which $\Theta = 1$. The equation of motion of $\delta\phi_{\varphi}$ then takes the following form, \be\label{3.40} \ddot{\delta\phi_{\varphi}}+\frac{(a^3\Theta\dot)}{a^3\Theta}\dot{\delta\phi_{\varphi}} -\left\{\frac{\nabla^{(3)2}}{a^2} + \frac{1}{a^3\Theta}\frac{H}{\dot\phi} {\left[a^3\Theta {\left(\frac{\dot\phi}{H}\right)}^{.} \right]}^{.} \right\}{\delta\phi_{\varphi}}=0. \ee Now, the perturbed form of the background equation (\ref{3.24}) can be expressed \footnote{Here, $\phi=\bar\phi+\delta\phi_{\varphi}$ and $\dot\phi=\phi_{,i}u^{i}.$ So that $\dot\phi = (\bar\phi+\delta\phi_{\varphi})_{,i}(\bar{u}^i+\delta{u^i})$} as, \be\label{3.41} \delta\ddot\phi_{\varphi}+3H\delta\dot\phi_{\varphi}-\frac{\nabla^{(3)2}}{a^2} +\frac{1}{2}\left(2V''-\mathrm{f}''\right) \delta\phi_{\varphi}=0,\ee where, $\nabla^{(3)2}$ is the Laplacian based on the comoving part of the background three-space metric. Equation (\ref{3.40}) reduces to the perturbed form (\ref{3.41}) of the background metric equation (\ref{3.24}) under the following conditions. \begin{eqnarray} \label{3.42} \frac{(a^3\Theta\dot)}{a^3\Theta}=3H \\ \label{3.43} \frac{1}{a^3\Theta}\frac{H}{\dot\phi} {\left[a^3\Theta {\left(\frac{\dot\phi}{H}\right)}^{.} \right]}^{.}&=& \frac{1}{2}\left(2V'' -\mathrm{f}''\right)=\theta_0, \end{eqnarray} where, $\theta_0$ is a constant. Now, the above pair of conditions \eqref{3.42} and \eqref{3.43} lead to \begin{eqnarray}\label{3.44a}\Theta=\text{constant},\\ \label{3.44b} 2V' - \mathrm{f}' = 2\theta_0\phi,\end{eqnarray} where we have set the constant of integration in \eqref{3.44b} to zero. In the process we find exactly the same relationship \eqref{Rel1} between the generalized parameter $\mathrm{f}(\phi, R)$ and the potential $V(\phi)$, under the choice $\theta_0 = 2H^2$, as was found while seeking inflationary solution of the classical field equations in the de-Sitter exponential form. This fact proves without ambiguity that the model under consideration \eqref{A2}, allows de-Sitter expansion in the inflationary regime rather than the power law expansion. Further, it also proves that the technique followed to find gravitational perturbation for non-standard models is legitimate. This is another important finding of the present work.\\ Now, introducing new variables, $z\equiv a\sqrt{\Theta}\frac{\dot\phi}{H}$ and ${v}\equiv \sqrt{\Theta}a\delta\phi_{\varphi}$, one can express the above equation (\ref{3.40}) in terms of $\varphi_{\delta\phi}$ as \be\label{3.45}v_{,\eta\eta}+\left(k^2-\frac{z_{,\eta\eta}}{z}\right)v=0.\ee In the above, comma denotes ordinary derivative. The asymptotic solutions of equation (\ref{3.45}) in the large-scale $(k^2\ll \frac{z_{,\eta\eta}}{z})$ and small-scale $(k^2\gg \frac{z_{,\eta\eta}}{z})$ limits are, \be\label{3.46}\delta \phi_{\varphi}(\textbf{x},t)=-\frac{\dot\phi}{H}\left[{C(\textbf{x})}-{D(\textbf{x})} \int_0^t{\frac{1}{a^3\Theta}\frac{H^2}{\dot\phi^2}dt}\right],\ee \be\label{3.47}\delta \phi_{\varphi}(\textbf{k},\eta)=\frac{1}{a\sqrt{2{k}}}\left[c_1(\textbf{k}) e^{i{k}\eta} +c_1(\textbf{k})e^{-i{k}\eta}\right]\frac{1}{\sqrt{\Theta}}, \ee where, $C(\textbf{x})$, $D(\textbf{x})$ are integration constants of the relatively growing and decaying modes and $c_1(\textbf{k})$, $c_2(\textbf{k})$ are arbitrary integration constants, respectively. Further, as $\frac{z_{,\eta\eta}}{z}=\frac{n}{\eta^2}$, where $n=$ constant, the solution of equation (\ref{3.40}) can be expressed in the following form \cite{Martin, Lyth, TTN}, \be\label{3.48} \delta \phi_{\varphi \textbf{k}}(\eta)=\frac{\sqrt{\pi |\eta|}}{2a}\left[C_1(\textbf{k}) \mathbf{H}_{\nu}^{(1)} (\textbf{k}|\eta|)+D_1(\textbf{k})\mathbf{H}_{\nu}^{(2)}(\textbf{k}|\eta|) \right]\frac{1}{\sqrt{\Theta}}, \ee where $C_1$ and $D_1$ are integration constants, $\nu=\sqrt{n+\frac{1}{4}}$ and the Hankel functions $\mathbf{H}_{\nu}^{(1,2)}(x)\rightarrow \pm \frac{\Gamma(\nu)(\frac{2}{x})^{\nu}}{i\pi}.$ \subsection{Perturbative semiclassical approach} In the post Planck era gravity should be treated classically, while the matter fields still behave quantum mechanically. 'Quantum Field Theory in Curved Space-Time' (QFT in CST), treats gravity classically while the energy-momentum tensor is quantized. For General Theory of Relativity, it is expressed as $G_{\mu\nu} = <\widehat{T}_{\mu\nu}>$, where the quantum operator $<\widehat{T}_{\mu\nu}>$ is a suitably renormalized expectation value. The perturbative semiclassical approximation under consideration in this subsection, is quite different from QFT in CST. In this technique, the perturbed parts of the metric and matter fields are treated as quantum mechanical operators, keeping the background parts classical \cite{Hwang5, Hwang6, Hwang7}. Since, we derive the perturbation spectra generated from the quantum fluctuations in an early scalar field dominated accelerating (inflation) phase, therefore this approach appears to be more legitimate than QFT in CST. However, we shall use the result of QFT in CST to choose appropriate vacuum.\\ Instead of the classical decomposition, we are therefore required to replace the perturbed order variables with the quantum operator in Heisenberg representation of $\delta \hat\phi(\mathbf{x},t)$ as, \be\phi(\mathbf{x},t)=\phi(t)+ {\delta} \hat\phi(\mathbf{x},t);~~~\delta\hat{\phi}_{\varphi} = \delta\hat\phi - {\dot \phi\over H}{\hat\varphi}.\ee Note that the background order quantities are considered as classical variables. Now, in the flat space under consideration it is possible to expand $\delta\hat{\phi}(\mathbf{x},t)$ in the mode expression as \be\delta\hat{\phi}(\mathbf{x},t)=\int{\frac{d^3k}{(2\pi)^{\frac{3}{2}}}\left[\hat a_{\textbf{k}}\delta\phi_{\textbf{k}}(t)e^{i\textbf{k}.\textbf{x}} +\hat a_{\textbf{k}}^{\dag}\delta\phi_{\textbf{k}}^*(t)e^{-i\textbf{k}.\textbf{x}}\right]},\ee where, the annihilation and creation operators, $\hat a_{\textbf{k}}$ and $\hat a_{\textbf{k}}^\dag$ satisfy standard commutation relation: \be\label{cr}[\hat a_{\textbf{k}},\hat a_{\textbf{k}'}]=0=[\hat a_{\textbf{k}}^\dag,\hat a_{\textbf{k}'}^\dag],~~ \mathrm{and},~~ [\hat a_{\textbf{k}},\hat a_{\textbf{k}'}^\dag] =\delta^3(\textbf{k}-\textbf{k}'),\ee while $\delta\phi_{\textbf{k}}(t)$ is the mode function, a complex solution of the classical mode evolution equation \eqref{3.40}. Equal time commutation relation must also hold for $\delta\hat{\phi}(\mathbf{x},t)$ and its canonical conjugate momentum, which reads \be\label{etcr} \left[\delta\hat{\phi}_{\varphi}(\mathbf{x}, t), \delta\dot{\hat{\phi}}_{\varphi}(\mathbf{x'}, t)\right] = {i\over a^3 \Theta} \delta^3(\mathbf{x}-\mathbf{x'}).\ee In order that the commutation relations \eqref{cr} and \eqref{etcr} hold simultaneously, the mode function should satisfy the Wronskian condition, \be\label{wrons} \delta\phi_{\varphi\mathbf{k}}\delta\dot{\phi}^*_{\varphi\mathbf{k}}-\delta\phi^*_{\varphi\mathbf{k}}\delta\dot{\phi}_{\varphi\mathbf{k}}={i\over a^3 \Theta}.\ee At this stage assuming ${z_{,\eta\eta}\over z} = {n\over \eta}$, the implication of which has been discussed in details by Hwang in \cite{Hwang7}, following solution is found \be \label{solution}\delta\phi_{\varphi\mathbf{k}}(\eta) = {\sqrt \pi|\eta|\over 2 a}\left[c_1(\mathbf{k})\mathrm{H}^{(1)}_\nu(k\eta) + c_2(\mathbf{k})\mathrm{H}^{(2)}_\nu(k\eta)\right]{1\over\Theta},\ee where, $\nu = \sqrt{n + {1\over 4}}$. Coefficients $c_1(\mathbf{k})$ and $c_2(\mathbf{k})$ are arbitrary functions of $\mathbf{k}$, which are normalized in accordance with \eqref{wrons} as \be |c_1(\mathbf{k})|^2 - |c_2(\mathbf{k})|^2 = 1.\ee Clearly imposing quantum condition in \eqref{wrons} does not completely fix the coefficients. The remaining freedom depends on the choice of vacuum state. Here, we insert the result of QFT in CST to choose adiabatic vacuum, also known as the Bunch-Davies vacuum in de-Sitter space, which fixes $c_1(\mathbf{k}) = 0$ and $c_2(\mathbf{k}) = 1$, corresponding to positive frequency solution in Minkowski space limit. The power spectrum therefore takes the form, \be\mathcal{P}_{\delta\hat{\phi}_\varphi}(k,t)=\frac{k^3}{2\pi^2}|\delta\phi_{\varphi\textbf k}(t)|^2 =\frac{k^3}{2\pi^2}\int<\delta\hat{\phi}_{\varphi}(\textbf{x}+\textbf{r},t) \delta\hat{\phi}_{\varphi}(\textbf x, t)>_{vac}e^{-i\textbf{k}.\textbf r} d^3\textbf r,\ee where, $< >_{\text{vac}}\equiv <\text{vac}| |\text{vac}>$ is a vacuum expectation value and $a_{\textbf k}|\text{vac}>\equiv 0$ for every $\textbf k$. Now, assuming adiabatic vacuum, two point function $\textbf{G}(x',x'')$ which is defined as, \be\begin{split}&\textbf{G}(x',x'')\equiv <\delta\hat{\phi}_\varphi(x')\delta\hat{\phi}_\varphi(x'')>_{vac}= \int{\frac{d^3k}{(2\pi)^3}}e^{i\textbf{k}.(\textbf{x}'-\textbf{x}'')}\delta\phi_{\textbf k}(t')\delta\phi_{\textbf k}^*(t'')\\& =\int_0^\infty{\frac{k^2dk}{2\pi^2}}J_0({{k}|\textbf{x}'-\textbf{x}''|}) \delta\phi_{\textbf k}(t')\delta\phi_{\textbf k}^*(t'')\end{split},\ee where, $x\equiv(\textbf{x}, t)$, takes the form in the exponential expansion case ($\eta = -{1\over aH}$), \be \textbf{G}(x',x'') = \frac{({1\over 4}-\nu^2)\sec(\pi\nu)}{16\pi a' a'' \eta'\eta''}\times \Gamma\left({3\over 2}+\nu,~{3\over 2}-\nu;~2;~1;~1+\frac{(\eta'-\eta'')^2-(\mathbf{x'} - \mathbf{x''})^2}{4\eta'\eta''}\right){1\over \sqrt{\Theta'\Theta''}},\ee which is valid for $\nu < {3\over 2}$. At the equal time, the vacuum expectation value reads \be <\hat{\delta\phi}(\textbf{x}+\textbf{r},t)\hat{\delta\phi}(\textbf x, t)>_{vac}=\int{\frac{d^3k}{(2\pi)^3}}e^{i\textbf{k}.\textbf r} |\delta\phi_{\textbf k}(t)|^2 =\int_0^\infty{\mathcal{P}_{\hat{\delta\phi}}(k,t)J_0(kr) d\ln k}.\ee In the small scale limit the solution \eqref{solution} takes the form \be \delta\phi_{\varphi\mathbf{k}}(\eta) = {1\over a\sqrt{2k\Theta}}e^{-ik\eta +i(\nu+{1\over 2}){\pi\over 2}}.\ee On the contrary, in the large scale limit we can write from (\ref{solution}) \be \delta\phi_{\varphi\mathbf{k}}(\eta) = i{\sqrt|\eta| \Gamma(\nu) \over 2 a \sqrt{\pi\Theta}}\left({k|\eta|\over 2}\right)^{-\nu},\ee and the power spectrum reads \be\label{Pp}\mathcal{P}_{\delta\hat{\phi}_\varphi}(k,\eta)=\frac{\Gamma(\nu)}{\pi^{3\over 2}a|\eta|}\left({k|\eta|\over 2}\right)^{{3\over 2}-\nu} \frac{1}{\sqrt\Theta}.\ee Since $\Theta$ is a constant in view of \eqref{3.44a}, so the power spectrum may deviate only by a constant factor from the minimally coupled case for which $\Theta = 1$. \section{Concluding remarks} In the absence of a complete theory of gravity, quantum cosmology is studied to perceive the evolution of the universe in the Planck regime, when gravity is quantized. Shortly after the Plank's era, gravity becomes classical, while the matter fields still remain quantized. In this era, the universe went through an inflationary phase. The seed of perturbation grows, which finally leads to the structures we observe. In this manuscript, we have found the wave-function of a model universe which contains scalar curvature squared term. The effective Hamiltonian operator is hermitian and standard quantum mechanical probability interpretation holds, which prove that the wave-function is stable and well behaved. The model universe transits smoothly to a de-Sitter type inflationary phase, and inflationary parameters have been found to be very much within the observational limit. The perturbation analysis shows that only de-Sitter solution is allowed, since it relates the coupling parameter and the potential in the same manner as de-Sitter solution to the classical field equations does. Perturbative semiclassical approximation method has been pursued in which the perturbed parts of the metric and matter fields are treated as quantum mechanical operators, keeping the background parts classical. In the process, we derive the perturbation spectra generated from the quantum fluctuations in an early scalar field dominated de-Sitter phase. The power-spectrum deviates only by a constant term from the minimally coupled case.\\ Regarding the canonical quantization scheme followed here and the results obtained in the present manuscript, there are a few important issues to discuss. We have at least in one case (G-B-dilatonic coupled gravity in the presence of scalar curvature squared term) proved that the known standard techniques (\cite{ostro, dirac, horo}) regarding canonical formulation of higher order theory of gravity do not produce a viable quantum theory, since these techniques don't reveal correct classical analogue under semi-classical approximation \cite{mod6}. It is therefore legitimate to follow the technique of canonical formulation, which is well behaved in all the cases studied so far. Here, we have considered a modified (with higher order term) non-minimally coupled scalar-tensor gravitational action, and aimed at studying the very early universe. Canonical formulation in isotropic and homogeneous background has been performed following modified Horowitz' formalism, which has been extensively applied earlier in different situations. The most important result as already mentioned may be summarized in the following manner. The forms of the coupling parameter $f(\phi)$ and the potential $V(\phi)$ obtained following perturbative analysis, dictates that the classical field equations must admit de-Sitter type exponential expansion in the inflationary regime. The wave function of the universe also admits the same de-Sitter type expansion under semiclassical approximation. This means that the very early universe smoothly transits to exponential expansion (inflationary) phase. This result proves overall consistency of the present study. Finally, although we are neither the proponents of multiverse theory nor do we oppose it as a topic of theological discourse, it should be mentioned that a stable quantum dynamics in the Trans-Planckian era doesn't in any way rule out the possibility of multiverse, which may have been created during the next inflationary phase.. The potential we found is sufficiently flat when the scalar field is large enough, and therefore the possibility of multiverse is nascent in the quantum fluctuation of such a field.
\section{introduction} Newton-Okounkov bodies are convex bodies associated to linear series on a projective variety. They were introduced by Okounkov \cite{O96} and further systematically studied by Lazarsfeld-Musta{\c{t}}{\u{a}} \cite{LM09} and Kaveh-Khovanskii \cite{KK12}. Newton-Okounkov bodies of a linear series $|V|$ are not unique but depend upon the choice of a valuation on the graded algebra of sections $R(|V|)$. In the special case of $X$ being toric and $D$ a torus invariant divisor, one can define a valuation such that the associated Newton-Okounkov body is, up to translation, the polytope $\Delta(D)$ corresponding to $D$ in the sense of the usual toric correspondence (see \cite[Proposition 6.1]{LM09}). In general, for an arbitrary projective variety $X$ and a valuation $\nu$ the Newton-Okounkov body does not need to be rational polyhedral. However, if $\Delta_{\nu}(D)$ is rational polyhedral, one can ask the following question. \begin{quest} Assuming $\Delta_{\nu}(D)$ is rational polyhedral. What is the connection between $X$ and the toric variety corresponding to $\Delta_{\nu}(D)$? \end{quest} The answer to this question was given by D. Anderson. He showed the following. \begin{thmnonr}[\cite{A13}] Let $X$ be a projective variety, $D$ a very ample (Cartier) divisor, and $\nu$ a valuation-like function. Assume that the semigroup $\Gamma=\Gamma_{\nu}(D)=\{(\nu(s),k) \ | \ s\in H^0(X,\mathcal{O}_{X}(kD)), \ k\in\mathbb{N}\}$ is finitely generated. Then there exists a toric degeneration of $X$ w.r.t. $D$ to the toric variety $X_0:= \proj (k[\Gamma])$. Moreover, the normalization of $X_0$ is the normal toric variety corresponding to the polytope $\Delta_{\nu}(D)$. \end{thmnonr} Anderson's Theorem can bee seen as a generalization of the theory of SAGBI bases (see \cite[Chapter 11]{S96} for an introduction). In the SAGBI case, one of the prerequisites is that the coordinate ring $k[X]$ of the corresponding variety $X$ needs to be contained in a polynomial ring $k[T_1,\dots, T_n]$. But this is quite a strong constraint, which we can omit by considering the valuation $\nu$. However, the connection between the variety $X$ and the normal toric variety corresponding to the polytope $\Delta_{\nu}(D)$ is rather implicit, since we need to normalize the variety we degenerate to. Hence, we can raise the following question. \begin{quest} Under which circumstances, does there exist a degeneration of $X$ to the normal toric variety corresponding to $\Delta_{\nu}(D)$? \end{quest} In order to answer this question, we need to determine when the variety $\proj(k[\Gamma])$ is normal. This is the case if and only if there is a $k\in\mathbb{N}$ such that the semigroup $k\cdot \Gamma$ is normal, i.e. $\text{Cone}(k\cdot \Gamma)\cap \mathbb{Z}^d=k\cdot \Gamma$ (see also Section \ref{sectionnormalaffine} for more details). We will see that the property of inducing a normal toric degeneration can indeed be checked by considering the shape of $\Delta_{Y_\bullet}(D)$, or more concretely the Ehrhart polynomial of $\Delta_{Y_\bullet}(D)$. We will define the difference between the Ehrhart polynomial of the Newton-Okounkov body and the hilbert polynomial of $D$ as the \emph{normal defect}. It is then not difficult to prove that this difference is zero if and only if $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration. This gives the following answer. \begin{answ} $\Delta:=\Delta_{\nu}(D)$ induces a normal toric degeneration if the Ehrhart polynomial corresponding to $\Delta$ is equal to the Hilbert polynomial corresponding to $D$. \end{answ} This observation enables us to view the problem of finding a flag for a given divisor which induces a normal toric degeneration as an optimization problem. We will evolve this idea further in the case where $X$ is a surface. It turns out that one can formulate this optimization problem in the following form: {\it Given a divisor $D$, find a flag $Y_\bullet$ such that the number of integral points on the boundary of $\Delta_{Y_\bullet}(D)$ is minimal.} We will indeed prove that under some condition (e.g. if $X$ is a Mori dream surface) such a flag always exists (see Theorem \ref{thmexminsurf}). If we additionally assume that the Zariski decomposition of $X$ is integral (e.g. for del Pezzo surfaces), we will give a concrete algorithm in order to find such flags. Finally, we focus on (weak) del Pezzo surfaces. It will turn out that in this situation, negative curves are good candidates for flags inducing normal toric degeneration. More concretely, we prove the following statement. \begin{thmnonr} Suppose one of the following situations. \begin{itemize} \item $X=X_r$ is the blow-up of $1\leq r\leq 6$ points in general position and $Y_\bullet$ is an admissible flag such that $Y_1$ is negative. \item $X=L_3$ is the blow-up of four points, where three of them are on a line or $X=S_6$ is the blow-up of six points on a conic. Let $Y_\bullet$ be an admissible flag such that $Y_1$ is the unique $(-2)$-curve on $X$. \end{itemize} Then the global semigroup \begin{align} \Gamma_{Y_\bullet}(X)=\{(\nu_{Y_\bullet}(s),D) \ | \ D\in \text{Pic}(X)=N^1(X), \ s\in H^0(X,\mathcal{O}(D)) \} \end{align} is finitely generated normal. \end{thmnonr} In order to proof such a statement, one first needs to prove the finite generation and normality of the value semigroup $\Gamma_{Y_\bullet}(D)$ for all big divisors $D$. One main ingredient of such a proof is the fact that the divisors which occur in the construction of Newton-Okounkov bodies with respect to the above flags, admit integral Zariski decompositions. Another one is the fact that $-K_X+Y_1$ is big and nef, which shows that the restriction morphism of every nef divisor on $X$ to the curve $Y_1$ is surjective. After one has established such a fact, it is necessary to consider what happens when $D$ moves to the boundary of the effective cone. We will prove that the numerical and the valuative Newton-Okounkov body in this case coincide. Then the above statement will follow from Gordan's lemma. We end the article with two examples, which illustrate our results. \section*{Acknowledgement} The author would like to thank Henrik Sepp\"anen for valuable discussions and helpful suggestions for improving this article. \section{Preliminaries} In this section we briefly describe normal affine semigroups, the construction of Newton-Okounkov bodies, its connection to toric degenerations and introduce the notion of Ehrhart polynomials. Note that all varieties mentioned in this article will be defined over an algebraically closed field $k$ of characteristic $0$. Moreover, a divisor will always mean a Cartier divisor. \subsection{Normal affine semigroups}\label{sectionnormalaffine} In this article we will only consider semigroups contained in $\mathbb{N}^d$. So whenever, we talk about about a semigroup, we mean a set $\Gamma\subset \mathbb{N}^d$ which is closed under addition. An \emph{affine semigroup} is a semigroup which is finitely generated. We denote the group generated by a semigroup $\Gamma$ by $G(\Gamma)$. We call the semigroup $\Gamma$ a \emph{normal semigroup} if for all $g\in G(\Gamma)$ and $n\in \mathbb{N}$ such that $n\cdot g\in \Gamma$, it follows that $g\in \Gamma$. Equivalently this means that $\text{Cone}(\Gamma)\cap G(\Gamma)=\Gamma$. For more details on normal semigroups we refer to \cite[2.B]{BG09}. When $D$ is a big divisor on a $d$-dimensional variety, and $Y_\bullet$ is an admissible flag on $X$, we know that $G(\Gamma_{Y_\bullet}(D))=\mathbb{Z}^d$ (see \cite[Lemma 2.2]{LM09}). In this case, $\Gamma_{Y_\bullet}(D)$ is normal if all integral points of $\text{Cone}(\Gamma_{Y_\bullet}(D))$ are valuation points. The connection to algebraic geometry comes with the fact that an affine semigroup $\Gamma$ is normal if and only if the algebra $k[\Gamma]$ is normal (see \cite[Lemma 4.39]{BG09}). Furthermore, the projective variety $X=\proj(k[\Gamma])$ is projectively normal if $k[\Gamma]$, and thus $\Gamma$ is normal. However, $X$ is normal if and only if there is an $m\in \mathbb{N}$ such that the $k[\Gamma]^{(m)}:= \bigoplus_{k\in \mathbb{N}} k[\Gamma]_{mk}$ is normal. But one can easily see that $k[\Gamma]^{(m)}=k[m\Gamma]$. Thus $\proj(k[\Gamma])$ is normal if and only if there is an integer $m$ such that $m\Gamma$ is normal. Again, if $\Gamma=\Gamma_{Y_\bullet}(D)$, the variety $\proj(\Gamma)$ is normal if and only if after passing to an $m$-th multiple of $D$, all the integral points of $\text{Cone}(\Gamma_{Y_\bullet}(mD))$ are valuation points. \subsection{Newton-Okounkov bodies} Let $X$ be a $d$-dimensional projective variety and $D$ a big divisor. We consider $\mathbb{Z}^d$ as an ordered group by choosing the lexicographical order. Let \begin{align} \nu\colon \bigsqcup_{D\in \text{Pic}(X)}H^0(X,\mathcal{O}(D)) \setminus \{0\}\to \mathbb{Z}^d \end{align} be a \emph{valuation-like function}. This is a function having the following properties: \begin{itemize} \item $ \nu(f+g) \geq \operatorname{min} \{\nu(f),\nu(g)\}$ for $f,g\in H^0(X,\mathcal{O}_X(kD))$ \item $\nu(f\otimes g)=\nu(f)+\nu(g)$ for $f\in H^0(X,\mathcal{O}_X(m_1D))$ and $g\in H^0(X,\mathcal{O}_X(m_2D)$. \end{itemize} Additionally, we also pose the following conditions on $\nu$. \begin{itemize} \item $\nu$ has one dimensional leaves (see \cite[Section 2]{KK12} for more details) \item The group generated by $\{ (\nu(f),k) \ | \ k\in\mathbb{N}, \ f\in H^0(X,\mathcal{O}_X(kD))\}$ is equal to $\mathbb{Z}^{d+1}$. \end{itemize} Then we define the semigroup \[ \Gamma_{\nu}(D):= \{ (\nu(f),k) \ | \ k\in\mathbb{N}, \ f\in H^0(X,\mathcal{O}_X(kD))\}\subseteq \mathbb{Z}^d\times \mathbb{N}.\] The \emph{Newton-Okounkov body} of $D$ with respect to $\nu$ is given by \begin{align} \Delta_{\nu}(D)=\overline{\operatorname{Cone}(\Gamma_{\nu}(D))}\cap \left(\mathbb{R}^d\times \{1\}\right). \end{align} In this article, we are mainly interested in valuation-like functions induced by flags $Y_\bullet$, which we denote by $\nu_{Y_\bullet}$. For details on their construction we refer to \cite{LM09}. \subsection{Toric degenerations} The connection between toric degenerations and Newton-Okounkov bodies was first established in \cite{A13}. Before phrasing the main result of interest let us make explicit what we mean by a toric degeneration. \begin{defi} Let $X$ be projective variety. Let $D$ be a very ample divisor on $X$. We say that $X$ \emph{admits a toric degeneration with respect to $D$} if there is a flat projective family $p\colon \mathcal{X}\to \mathbb{A}^1$ such that the zero fiber $X_0:=p^{-1}(0)$ is a toric variety and $\mathcal{X}\setminus X_0$ is isomorphic to $X\times (\mathbb{A}^1\setminus \{0\})$. Furthermore, there is a divisor $\mathcal{D}$ on $\mathcal{X}$ such that it restricts on fibers $X_t\cong X$ for $t\neq 0$ to the divisor $D$ and on $X_0$ to an ample divisor $D_0$. We call it a \emph{normal toric degeneration} if $X_0$ is normal. We call it a \emph{projectively normal toric degeneration} if $D_0$ is very ample and $X_0$ is projectively normal with respect to the embedding given by $D_0$. \end{defi} The main result in \cite{A13} can be summarized in the following theorem. \begin{thm}[\cite{A13}]Let $X$ be a projective variety, $D$ a very ample divisor, and $\nu$ a valuation-like function. Assume that the semigroup $\Gamma=\Gamma_{\nu}(D)=\{(\nu(s),k) \ | \ s\in H^0(X,\mathcal{O}_{X}(kD)),\ k\in\mathbb{N}\}$ is finitely generated. Then there exists a toric degeneration of $X$ with respect to $D$ to the toric variety $X_0:= \proj (k[\Gamma])$. Moreover, the normalization of $X_0$ is the normal toric variety corresponding to the polytope $\Delta_{\nu}(D)$. \end{thm} For the sake of clarity we want to make it precise what it means that a Newton-Okounkov body induces a normal toric degeneration. \begin{defi} Let $X$ be projective variety. Let $D$ be a big divisor on $X$ and $\nu$ a valuation-like function. We say that $\Delta_{\nu}(D)$ \emph{induces a toric degeneration} if $\Gamma_{\nu}(D)$ is finitely generated. We say it induces a \emph{normal toric degeneration} if in addition $\proj(k[\Gamma_\nu])$ is normal. \end{defi} \subsection{Ehrhart theory} Let $\Delta \subseteq \mathbb{R}^d$ be a convex body with non empty interior. We define the \emph{Ehrhart function} $h_{\Delta}\colon \mathbb{N}\to \mathbb{N}$ by setting \begin{align} h_\Delta(k):= \vert \left(k \Delta \cap \mathbb{Z}^d\right) \vert. \end{align} Now, let $\Delta\subseteq \mathbb{R}^d$ be a lattice polytope, i.e. a polytope with integral extreme points. Then there is a polynomial $P_{\Delta}=\sum_{i=0}^{d} a_it^i\in \mathbb{C}[t]$ such that $P_{\Delta}(k)=h_\Delta(k)$ for all $k\in \mathbb{N}$. We call $P_{\Delta}$ the \emph{Ehrhart polynomial} corresponding to $\Delta$. Some basic facts are the following: \begin{itemize} \item The degree of $P_\Delta$ is $d$. \item $a_d$ is equal to $\operatorname{vol}(\Delta)$. \item We have $a_0=1$. \item Let $F$ be a facet of $\Delta$, and let $L_{F}$ be the induced lattice on that facet. Let furthermore $\operatorname{vol}(F)$ be the volume of $F$ with respect to the lattice $L_{F}$. Then $a_{d-1}$ is equal to half the sum of $\operatorname{vol}(F)$ over all facets $F$ of $\Delta$. \end{itemize} \section{Newton-Okounkov bodies and normal toric degenerations} In this section we want to establish the connection between the Ehrhart polynomial of $\Delta_{Y_\bullet}(D)$ and normal toric degenerations induced by $\Delta_{Y_\bullet}(D)$. \subsection{Normal defect} As we have already mentioned, the toric variety $X_0=\proj(k[\Gamma])$ is not necessarily normal. In order to measure the failure of normality, we introduce the following. \begin{defi}\label{defdef} Let $X$ be a projective variety, $D$ a big divisor on $X$ and $\nu$ a valuation-like function. Let $h_D\colon \mathbb{C}\to \mathbb{C}$ be the Hilbert function of $D$, i.e. $h_D(k)=\dim \left( H^0(X,\mathcal{O}_{X}(kD))\right)$ for $k>0$. Let $\Delta_{\nu}(D)$ be the Newton-Okounkov body, and $h_{\Delta_{\nu}(D)}\colon \mathbb{Z}\to \mathbb{Z}$ the corresponding Ehrhart function, i.e. $h_{\Delta_{\nu}(D)}(k)=\vert k \Delta_{\nu}(D)\cap \mathbb{Z}^d \vert$. We call the function \begin{align} \operatorname{Def}_{\nu,D}:=(h_{\Delta_{\nu}(D)}-h_D) \colon \mathbb{N}\to \mathbb{N}. \end{align} the \emph{normal defect}. \end{defi} The next theorem justifies the name normal defect. \begin{thm} \label{thmnormaldef} Let $X$ be a projective variety, $D$ a very ample divisor on $X$ and $\nu$ a valuation-like function. Then a rational polyhedral Newton-Okounkov body $\Delta_{\nu}(D)$ induces a normal toric degeneration if and only if $\operatorname{Def}_{\nu,kD}=0$ for $k\gg 0$ divisible enough. \end{thm} \begin{proof} Suppose first that $\Delta_{\nu}(D)$ induces a normal toric degeneration. This means in particular that the semigroup $\Gamma:=\Gamma_{\nu}(D)$ is finitely generated. Suppose $\Gamma$ is generated in degree $k$. Hence, we can compute $\Delta_{\nu}(kD)$ by taking the convex hull of $\Gamma_k$. By increasing $k$ even more, we might assume that $k\Gamma=\Gamma_{\nu}(kD)$ is a normal affine semigroup. This means that all integral points in $C:=\operatorname{Cone}(k\Gamma)$ are indeed valuation points, i.e. lie in $k\Gamma$. Consider all the integral points of $C$ at level $m$. They can be identified with integral points in $m\Delta_{\nu}(kD)$. There exists $h_{\Delta_{\nu}(kD)}(m)$ many of them. However, the number of different valuation points in $k\Gamma$ of level $m$ is equal to $\dim (H^0(X,\mathcal{O}_X(mkD))=h_{kD}(m)$. By the assumption that $k\Gamma$ is normal, they both agree. This proves the vanishing of the normal defect. Now let $k \in \mathbb{N}$ such that the normal defect $\operatorname{Def}_{\nu,kD}$ is zero. As in the previous case it follows that for each $m\in \mathbb{N}$, there are $h_{\Delta_{\nu}(kD)}(m)=\dim H^0(X,\mathcal{O}_{X}(kmD))$ integral points in the $m$-th level of $k\Gamma$. This proves that all these integral points are valuative, i.e. $\operatorname{Cone}(k \Gamma)\cap \left(\mathbb{Z}^{d}\times \{m\} \right)=(k\Gamma)_m$. Hence, by Gordan's lemma, $k\Gamma$ is a normal affine semigroup. This proves the claim. \end{proof} Let us now denote by $P_D$ the Hilbert polynomial corresponding to the ample divisor $D$. This means that $P_D$ is the polynomial such that $P_D(k)=h_D(k)$ for $k\gg 0$. \begin{cor} Let $X$, be a projective variety, $D$ a very ample divisor on $X$ and $\nu$ a valuation-like function. Then an integral polyhedral Newton-Okounkov body $\Delta_{\nu}(D)$ induces a normal toric degeneration if and only if $P_{\Delta_{\nu}(D)}=P_{D}$. \end{cor} \begin{proof} This follows from the above Theorem and the fact that $h_D(k)=P_D(k)$ and $h_{\Delta_{\nu}(D)}(k)=P_{\Delta_{\nu}(D)}(k)$ for $k\gg 0$. \end{proof} The next two corollaries demonstrate that the condition that $\Delta_{\nu}(D)$ induces a normal toric degeneration, is completely determined by the class of $D$ and the shape of $\Delta_{\nu}(D)$. \begin{cor} Let $X$ be a projective variety, $Y_\bullet$ an admissible flag, and $D$ and $D^\prime$ be two numerical equivalent ample line bundles on $X$. Then $\Delta_{\nu}(D)$ induces a normal toric degeneration if and only if $\Delta_{\nu}(D^\prime)$ does. \end{cor} \begin{proof} First of all, the Newton-Okounkov body of a divisor depends only on its class \cite[Proposition 4.1]{LM09}. Moreover, it follows from Hirzebruch-Riemann-Roch that the Hilbert polynomial of an ample divisor also depends only on the numerical class. Hence, the normal defect of $kD$, does only depend on the numerical class for $k\gg 0$. \end{proof} \begin{cor} Let $X$ be a projective variety, $\nu$ and $\nu^\prime$ be valuation-like functions, and $D$ an ample divisor on $X$. Suppose $\Delta_{\nu}(D)=\Delta_{\nu^\prime}(D)$. Then $\Delta_{\nu}(D)$ induces a normal toric degeneration if and only if $\Delta_{\nu^\prime}(D)$ does. \end{cor} \begin{proof} Also follows from the equality of defects $\operatorname{Def}_{\nu,kD}=\operatorname{Def}_{\nu^\prime,kD}$ for each $k\in\mathbb{N}$. \end{proof} \begin{remark} The above corollary a posteriori legitimates to say that $\Delta_{\nu}(D)$ induces a normal toric degeneration, instead of $\Gamma_{\nu}(D)$. \end{remark} \subsection{Normalized surface area} Despite the characterization of normal toric degenerations in terms of the normal defect, it is not quite practical, since it involves knowing the Hilbert polynomial of a line bundle, as well as the Ehrhart polynomial. In this section we want to omit both problems, but still find a necessary condition to induce normal toric degenerations. Let us fix an ample divisor $D$ on $X$. Our aim is to find a valuation-like function $\nu$ which induces a normal toric degeneration. The idea is to regard this problem as an optimization problem of the shape of $\Delta_{\nu}(D)$. For this purpose consider the following definitions. Let $P$ be a lattice polytope in $\mathbb{Z}^d$. Then denote by $A(P)$ the surface area of $P$ i.e. the sum of the volume of each facet $F$ with respect to the induced sublattice on $F$. \begin{defi} Let $X$ be a projective variety of dimension $d$, $D$ a very ample divisor on $X$ and $\nu$ a valuation-like function. Let furthermore $\Delta_{\nu}(D)$ be rational polyhedral. Let $k\in \mathbb{N}$ be an integer such that $k\Delta_{\nu}(D)$ is an integral polyhedron. Then we call \begin{align} S(D,\nu):= \frac{A(\Delta_{\nu}(kD))}{k^{d-1}} \end{align} the \emph{normalized surface area of} $\Delta_{\nu}(D)$. If $\Delta_{\nu}(D)$ is not rational polyhedral, we define $S(D,\nu)=\infty$. \end{defi} It is not a priori clear that the above definition is well defined. So let $k,k^\prime$ be two integers such that $k\Delta_{\nu}(D)$ and $k^\prime\Delta_{\nu}(D)$ are integral polyhedra. Consider both Ehrhart polynomials $P_{k\Delta_{\nu}(D)}=\sum_{i=0}^d a_i t^i$ and $P_{k^\prime\Delta_{\nu}(D)}=\sum_{i=0}^d a^\prime_i t^i$. From our discussion of Ehrhart theory it follows that \begin{align} A(\Delta_{\nu}(kD))=2\cdot a_{d-1} \quad A(\Delta_{\nu}(k^\prime D))=2\cdot a^\prime_{d-1} \end{align} Trivially, $P_{k\Delta_{\nu}(D)}(k^\prime)=P_{k^\prime\Delta_{\nu}(D)}(k)$. Let us consider the Ehrhart polynomial $P_{k\cdot k^\prime\Delta_{\nu}(D)}=\sum_{i=0}^db_it^i$. Comparing coefficients, we deduce that $b_{d-1}=a^\prime_{d-1}\cdot k^{d-1}=a_{d-1}\cdot (k^\prime)^{d-1}$. This proves that \begin{align} \frac{A(\Delta_{\nu}(kD))}{k^{d-1}}= \frac{A(\Delta_{\nu}(k^\prime D))}{(k^\prime)^{d-1}}. \end{align} \begin{thm}\label{thmnormsurfarea} Suppose that $\Delta_{\nu}(D)$ induces a normal toric degeneration. Then the normalized surface area $S(D,\nu)$ is minimal, i.e. for all valuation-like functions $\nu^\prime$ we have \begin{align} S(D,\nu^\prime)\geq S(D,\nu). \end{align} \end{thm} \begin{proof} Suppose $\Delta_{\nu}(D)$ induces a normal toric degeneration. Let $\nu^\prime$ be another valuation-like function. By Theorem \ref{thmnormaldef}, there is a $k\in\mathbb{N}$ such that the normal defect $\operatorname{Def}(kD,\nu)=0$. We can assume that $\Delta_{\nu^\prime}(D)$ is rational polyhedral, since otherwise $S(D,\nu)=\infty$. Assume furthermore without loss of generality that $\Delta_{\nu}(kD)$ and $\Delta_{\nu^\prime}(kD)$ are integral polyhedra. Since $\operatorname{Def}(kD,\nu^\prime) \geq 0$ we can follow that \begin{align} \sum_{i=0}^d a_it^i=P_{\Delta_{\nu^\prime}(kD)}\geq P_{\Delta_{\nu}(kD)}=\sum_{i=0}^d b_it^i \end{align} The first coefficients $a_d$ and $b_d$ of the above polynomials are both equal to $\operatorname{vol}(\Delta_{\nu}(kD))=\operatorname{vol}(\Delta_{\nu^\prime}(kD))=d!\cdot k^d\operatorname{vol}(D)$. Thus, we have $a_{d-1}\geq b_{d-1}$, which in turn implies $S(D,\nu^\prime)\geq S(D,\nu)$. \end{proof} \section{Normal toric Degenerations on Surfaces} In this section we want to apply the above discussions to the case where $X$ is a surface. We will also restrict our attention to valuations coming from flags. One reason why the surface case in a lot of situations works particularly well is that we have a Zariski decomposition of divisors. In our case this leads to a nice characterization of Newton-Okounkov bodies, which makes things more explicit to handle. Before we dive into normal toric degenerations, we give an overview of the main facts about Zariski decomposition and Newton-Okounkov bodies on surfaces in the first two paragraphs. After that we will prove that for surfaces satisfying condition $(*)$ (see Definition \ref{defstar}) there exists a flag $Y_\bullet$ such that its normalized surface area is minimal with respect to all admissible flags. If we make some more assumptions on the surface $X$, we will establish an algorithm that computes for a given divisor $D$ a flag $Y_\bullet$ which induces a Newton-Okounkov body with minimal normalized surface area with respect to all valuations coming from flags. Hence, if there exists a flag which induces a normal toric degeneration, this algorithm will indeed find it. In the following let $X$ always denote a smooth surface. \subsection{Zariski decomposition} Let $X$ be a smooth surface. Then the Zariski decomposition of a pseudo-effective $\mathbb{Q}$-divisor is given by $D=P+N$ where $P$ and $N$ are $\mathbb{Q}$-divisors such that \begin{enumerate} \item $P$ is nef \item the support of $N=\sum_{i=1}^{N} a_i C_i$ consists of negative curves such that $P\cdot C_i=0$ for all $i=1,\dots,N$ and \item the intersection matrix $(C_i\cdot C_j)_{i,j=1,\dots,N}$ is negative-definite. \end{enumerate} A decomposition with the above prescribed property is unique and we call $P$ the positive and $N$ the negative part of $D$. One consequence of the above properties is that for $k\in \mathbb{N}$ divisible enough such that $kD$ as well as $kP$ are integral divisors the natural morphism \begin{align} H^0(X,\mathcal{O}_X(kP))\to H^0(X,\mathcal{O}_X(kD)) \end{align} is an isomorphism. That means that, after passing to a multiple, all sections of $kD$ are induced by sections of a nef divisor. Zariski's original proof relied on the construction of the negative part, which was rather complicated. An easier approach was introduced by Bauer \cite{B09}, whose idea was to construct the positive part of an effective divisor $D$ as the maximal nef subdivisor of $D$. This reduces the problem of finding the Zariski decomposition of a given divisor to solving a linear program. More concretely, if we write $D=\sum a_i C_i$ as a positive combination of prime divisors, one finds $P=\sum b_iC_i$, where the $b_i$ are chosen such that $\sum b_i$ is maximal under the constraints that $0\leq b_i\leq a_i$, and $\sum b_iC_i$ is nef. \begin{remark} Note that even if $D$ is an integral divisor the Zariski decomposition $D=P+N$ is still a decomposition of $\mathbb{Q}$-divisors, i.e. $P$ and $N$ are not necessarily integral. \end{remark} However, in \cite{BPS15} the authors give an upper bound for the size of the denominators occurring in terms of the negativity of $N$. In the proof of Theorem 2.2 they show the following: \begin{thm}[\cite{BPS15}]\label{thmzarintegral} Let $X$ be a smooth projective surface with Picard number $\rho(X)$, let $D$ be a divisor and $N=\sum a_i \cdot C_i$ be its negative part, with $a_i>0$ and $C_i$ prime divisors. Let furthermore $d$ be the denominator of $N$ and $b$ be the maximum of the negative numbers $(C_i)^2$. Then we have \begin{align}d\leq b^{\rho(X)-1}. \end{align} \end{thm} Another very important feature about the Zariski decomposition, is that it induces a decomposition of the big cone into chambers $\mathcal{C}_i$; the so called \emph{Zariski chambers}. This chamber decomposition was introduced in \cite{BKS04}. We summarize some facts about this decomposition: \begin{itemize} \item The support of the negative parts of $D\in \mathcal{C}_i$ for a fixed $i$ is constant. \item The $\mathcal{C}_i$ are locally polyhedral and form a locally finite decomposition of the big cone \item Inside the closure of each Zariski chamber $\mathcal{C}_i$ the Zariski decomposition varies linearly. \end{itemize} \subsection{Newton-Okounkov bodies on surfaces}\label{sectionOkounkov} Newton-Okounkov bodies are in general difficult to compute. However, on a surface with a valuation-like function coming from a flag, we can give a rather explicit description. Let $Y_\bullet=(X\subseteq C\subseteq \{P\})$ be an admissible flag, i.e. $P$ is a point and $C$ is an irreducible curve which is smooth at $P$. Then we can define a valuation-like function $\nu_{Y_\bullet}$, by setting for a section $s\in H^0(X,\mathcal{O}_X(D))$ \begin{align} \nu_1(s)=\operatorname{ord}_C (s) \quad \nu_2 (s)=\operatorname{ord}_{ \{P\} } (\tilde{s}) \end{align} where $\tilde{s}$ is the restriction of the section $s/(s_C)^{\nu_1(s)}$ to the curve $C$ and $s_C$ is a defining section of $C$. In order to describe the Newton-Okounkov body of a big divisor $D$ with respect to a flag $C\supset \{P\}$ we fix the following notation: \begin{itemize} \item $\nu:=\operatorname{ord}_{C}(N)$ \item $\mu:=\sup \{t\in\mathbb{R}_{\geq 0} \ | \ D-tC \text{ is effective} \}$ \item For $t\in [0,\mu]$ we define $D_t:=D-tC=P_t+N_t$ where the latter is its Zariski decomposition. \item We define the functions $\alpha,\beta\colon [\nu,\mu]\to \mathbb{R}_{\geq 0}$ by setting \begin{align} \alpha(t):= ord_{P} ({N_t}_{|C}) \quad \beta(t):= \alpha(t)+ (P_t\cdot C). \end{align} Moreover, we write $\alpha_D,\beta_D$ if we want to stress that we consider the divisor $D$. \end{itemize} Finally, we present the description of Newton-Okounkov bodies in the following theorem, which is based on the discussions in \cite[Section 6.2]{LM09} and \cite[Section 2]{KLM12}. \begin{thm}\label{thmokounkovsurface} The Newton-Okounkov body of a big divisor $D$ with respect to an admissible flag $Y_\bullet$ on a surface $X$ is given by \begin{align} \Delta_{Y_\bullet}(D)=\{(t,y)\in \mathbb{R}^2 \ | \ t\in [\nu,\mu], \ y\in [\alpha(t),\beta(t)] \}. \end{align} Moreover, $\Delta_{Y_\bullet}(D)$ is a finite polygon, with all extremal points rational except for possibly $(\mu,\alpha(\mu))$ and $(\mu,\beta(\mu))$. \end{thm} The proof of the above theorem uses the fact that the Zariski decomposition varies linearly inside the Zariski chambers. The fact that it is a finite polygon follows by showing that the set of divisors $D_t$ for $t\in [\nu,\mu]$ only meets finitely many chambers. Additionally, it follows from the proof that the extreme points of $\Delta_{Y_\bullet}(D)$ are all of the following form: \begin{itemize} \item $(\nu,\alpha(\nu))$, $(\nu,\beta(\nu))$ \item $(\mu,\alpha(\mu))$, $(\mu,\beta(\mu))$ \item $(t,\alpha(t))$, $(t,\beta(t))$ for $t\in (\nu,\mu)$ such that $D_t$ lies on the boundary of a Zariski chamber. \end{itemize} \subsection{Existence of Newton-Okounkov bodies with minimal normalized surface area} In this paragraph we will prove that for a given divisor $D$ there exists a flag $Y_\bullet$ such that the normalized surface area of $\Delta_{Y_\bullet}(D)$ is minimal with respect to all admissible flags. We will now consider surfaces with the following constraints. \begin{defi}\label{defstar} We say that a smooth projective surface $X$ satisfies condition $(*)$ if it satisfies the following conditions: \begin{enumerate} \item Every pseudo-effective divisor $D$ is semi-effective, i.e. a multiple of $D$ is effective. \item $X$ contains only finitely many negative curves. \end{enumerate} \end{defi} \begin{remark} A large class of examples which satisfy condition $(*)$ are Mori dream surfaces. \end{remark} One necessary condition on the curve of the flag to induce a normal toric degeneration is the following. \begin{lem} Let $Y_\bullet=(C\supseteq \{P\})$ be an admissible flag such that $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration. Then the genus of $C$ is zero, i.e. $C\cong \mathbb{P}^1$. \end{lem} \begin{proof} Choose a rational $t\in \mathbb{Q}$ such that the slice $\{t\}\times \mathbb{R}^{d-1}$ meets the interior of $\Delta_{Y_\bullet}(D)$. Let then $k\in \mathbb{N}$ be such that $kD_t=kP_t+kN_t$ is a decomposition of integral divisors and $kt$ is integral. The slice $\Delta_{Y_\bullet}(kD)_{\nu_1=kt}$ contains $k(P_t\cdot C)+1$ integral points. The valuation points having $kt$ as first coefficient are given by the image of \begin{align*} \operatorname{ord}_{P}\colon H^0(X,\mathcal{O}(kD_t))_{|C}\to \mathbb{Z} \end{align*} and the number of valuation points is given by \begin{align} h^0(X,\mathcal{O}(kD_t))_{|C}=h^0(X,\mathcal{O}(kP_t))_{|C}\leq h^0(C,\mathcal{O}_{C}(kP_t)). \end{align} However, it follows from Riemann-Roch on curves that for $k\gg 0$ we can compute \begin{align} h^0(C,\mathcal{O}_{C}(kP_t))=k(P_t\cdot C)+1-g \end{align} where $g$ is the genus of $C$. But since all integral points of $\Delta_{Y_\bullet}(kD)$ are valuative for $k\gg 0$ it follows that $g=0$ and thus $C\cong \mathbb{P}^1$. \end{proof} We continue by proving two helpful lemmata. \begin{lem}\label{lempoint} Let $D$ be a big divisor on $X$ and $[C]\in N^{1}(X)$ be the numerical class of an irreducible curve $C$. Then the set of Newton-Okounkov bodies $\Delta_{Y_\bullet}(D)$ where $Y_\bullet$ is a flag such that $[Y_1]=[C]$ is finite. \end{lem} \begin{proof} Consider the negative part $N_\mu$ of the pseudo-effective divisor $D_\mu=D-\mu C$. Let $C_1,\dots,C_l$ be the irreducible curves in the support of $N_\mu$. It follows from \cite[Proposition 2.1]{KLM12} that the irreducible components of $N_t$ for $t\in [\nu,\mu]$ is a subset of $\{C_1,\dots,C_l\}$, and that $C$ is not equal to $C_i$ for all $i=1,\dots l$. Let $\nu\leq t_1\leq \dots \leq t_{r}\leq \mu$ be all rational numbers in $[\nu,\mu]$ such that $D_{t_i}$ lies on the boundary of some Zariski chamber. By the discussion in section \ref{sectionOkounkov}, these are indeed finitely many. Consider the negative parts $N_\nu,N_{t_1},\dots, N_{t_r}, N_{\mu}$. By replacing $D$ with $kD$ for $k\gg 0$, we may assume without loss of generality that all these negative parts are integral divisors and the numbers $t_1,\dots,t_r$ are integral. For each $P\in C$ we have \begin{align} \alpha(\mu)=\operatorname{ord}_P N_{\mu|C}\leq \sum_{x\in C\cap N_{\mu}} \operatorname{ord}_x(N_{\mu|C})=(N_\mu\cdot C). \end{align} By \cite[Theorem B]{KLM12}, the function $\alpha$ is increasing, and piecewise linear with possible breaking points at $t_1,\dots,t_r$. This shows that for a fixed class $[C]$ the function $\alpha$ is bounded by some constant independent from the point $P$. By construction, $\alpha$ takes integer values at the points $\nu,t_1,\dots,t_r,\mu$. Varying the point $P$, there are only finitely many possibilities for $\alpha$ since it is uniquely defined by its values on $\nu,t_1,\dots,t_r$ and $\mu$. But, by definition, the same holds for $\beta$. However, we have seen in Theorem \ref{thmokounkovsurface} that $\Delta_{Y_\bullet}(D)$ is determined by $\alpha$ and $\beta$. This shows the claim. \end{proof} \begin{lem}\label{lemnefcurve} Let $X$ be a smooth surface that satisfies condition $(*)$. Let $D$ be a big and nef divisor on $X$. Then the set \begin{align} H_k:=\{[D^\prime]\in N^1(X)_{\mathbb{R}} \ : \ D^\prime \text{ is nef and } (D^\prime\cdot D)= k \} \end{align} is compact for all $k\in \mathbb{N}$. \end{lem} \begin{proof} Suppose that $H_k$ is not compact. It is easy to check that $H_k$ is closed. This means $H_k$ is not bounded. But since it is also convex, there exists for every point in $H_k$ a half line which is completely contained in $H_k$. For this purpose fix any ample class $[A]\in N^1(X)$ and consider the $\mathbb{Q}$-divisor $A^\prime=\frac{k}{(D\cdot A)}A$ which lies in $H_k$. Since $H_k$ is not bounded there is a divisor class $[F]\in N^1(X)_\mathbb{R}$ such that for all $\lambda>0$, the class $[A^\prime+\lambda F]$ lies in $H_k$. We claim that $F$ is nef. Indeed, suppose that $F$ is not nef. Then for $\lambda\gg 0$ the divisor $A^\prime+\lambda F$ is not nef as well and thus does not lie in $H_k$. For a given $\lambda>0$, we have \begin{align} (A^\prime+\lambda F)^2=(A^\prime)^2+2\lambda(A^\prime\cdot F) +(F)^2\geq (A^\prime)^2 +2\lambda (A^\prime\cdot F). \end{align} But $A^\prime$ is ample and $F$ nef, hence semi-effective by condition $(*)$. This implies that $A^\prime\cdot F >0$ and enables us to find a $\lambda>0$ such that \begin{align} \sqrt{(A^\prime+\lambda F)^2}> k/\sqrt{(D)^2}. \end{align} Here, we used the fact that $D$ is big and nef and thus $(D^2)>0$. As $D$ and $A+\lambda F$ are both nef, we can use the Hodge index theorem to deduce \begin{align} (D\cdot (A^\prime+\lambda F))\geq \sqrt{(D)^2 \cdot (A^\prime+\lambda F)^2}>k. \end{align} This shows that $A^\prime+\lambda F$ does not lie in $H_k$, which is a contradiction. Hence, $H_k$ is compact. \end{proof} \begin{thm}\label{thmexminsurf} Let $X$ be a smooth surface satisfying condition $(*)$. Let $D$ be a big divisor on $X$. Then there exists an admissible flag $Y_\bullet=(C\supset \{x\} )$ such that its normalized surface area $S(D,\nu_{Y_\bullet})$ is minimal, i.e. for any admissible flag $Y_\bullet^\prime$ we have $S(D,\nu_{Y_\bullet})\leq S(D,\nu_{Y_\bullet^\prime})$. \end{thm} \begin{proof}By scaling and considering the positive part in the Zariski decomposition of $D$, we can without loss of generality assume that $D$ is big and nef. The idea of the proof is to show that only a finite number of classes of curves $C$ have to be tested. Together with Lemma \ref{lempoint} we can then prove the claim. First of all if $C$ is an irreducible curve, then its class $[C]$ is either nef or it is a negative curve depending on whether $C^2\geq 0$ or $C^2<0$. Since $X$ satisfies condition $(*)$, we have to test only finitely many negative curves. Hence, we can restrict our attention to the case that $C$ is nef. Let $Y_\bullet$ be any admissible flag such that $Y_1$ is nef, and set $M:=S(D,\nu_{Y_\bullet})$. Then for all $C^\prime$, and any point $P^\prime \in C^\prime$ such that $(D\cdot C^\prime)>M$, we know that there are already more than $M+1$ integral points on the boundary of $\Delta_{C^\prime\supset\{P^\prime\}}(D)$, namely $(0,\alpha(0)),(0,\alpha(0)+1),\dots,(0,\beta(0))$. However, this implies $S(D,\nu_{Y_\bullet})>M$. Hence, we have limited the candidates to nef irreducible curves $C^\prime$ such that $(D\cdot C^\prime)\leq M$. But Lemma \ref{lemnefcurve} implies there are only finitely many integral nef classes of curves which satisfy this condition. Moreover, each class of a curve $[C]$ we have to test, has finitely many different Newton-Okounkov bodies, when varying the point $P$ by Lemma \ref{lempoint}. This proves the claim. \end{proof} \subsection{Algorithm for finding a flag with minimal normalized surface area} In this paragraph we want to introduce and discuss an algorithm, which outputs for a given big divisor $D$ on a surface $X$ a flag $Y_\bullet$ such that $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration if such a flag exists. In Theorem \ref{thmexminsurf}, we have limited the possible candidates for flags which induce normal toric degenerations to finitely many classes of curves $[Y_1]$. However, it is a rather difficult task to describe what possible points $P\in C$ can occur and how the function $\alpha$ from Section \ref{sectionOkounkov} varies. The idea of this section is to show that it is possible to reduce to a general point on the chosen curve. Then $\alpha=0$ and $\beta(t)=(P_t\cdot C)$. It follows that the corresponding Newton-Okounkov body only depends on the numerical class of the curve $C$ and in this situation Theorem \ref{thmexminsurf} gives rise to a rather explicit algorithmic way of finding a class of a curve which is the best candidate for defining a flag $Y_\bullet$ such that $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration. The price we pay for being able to choose a general point is the following constraint. \begin{defi} We say that a smooth projective surface $X$ satisfies condition $(**)$ if it satisfies condition $(*)$ and the Zariski decomposition is a decomposition of integral divisors, i.e. for each integral divisor $D$ its positive part $P(D)$ as well as its negative part $N(D)$ is integral. \end{defi} \begin{remark} It follows from Theorem \ref{thmzarintegral} that a surface having only negative curves with self intersection $-1$ induces integral Zariski decompositions for all divisors. An example for this situation would be smooth del Pezzo surfaces (more details follow in the next section). \end{remark} The following lemma is the key for reducing to the case of a general point $P$ on $C$. \begin{lem}\label{lemnormpoint} Let $X$ be a smooth surfaces satisfying condition $(**)$. Suppose $D$ is a big divisor and $Y_\bullet=(C\supset \{P\})$ is an admissible flag such that $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration. Then for each point $P^\prime\in C$ consider the flag $Y_\bullet^\prime=(C\supset \{P^\prime\})$. Then $\Delta_{Y^\prime_\bullet}(D)$ induces a normal toric degeneration as well. \end{lem} \begin{proof} We will do this by proving that the Ehrhart polynomial $P_{\Delta_{Y_\bullet}(kD)}$ is independent of the point $P$ for $k\gg 0$. Let $k\gg 0$ such that $\Delta_{Y_\bullet}(kD)$ is an integral polytope. Define for integral $m,t$ the divisor $D_{m,t}:=mD-tC=:P_{m,t}+N_{m,t}$. Since $X$ satisfies condition $(**)$, the function $\alpha_{kD}(t)=\text{ord}_{P}(N_{k,t|C})$ and $\beta_{kD}(t)=\alpha_{kD}(t)+(P_{k,t}\cdot C)$ admit integral values for each integral $t$. From this we can deduce \begin{align} \vert k\Delta_{Y_\bullet}(D)\cap \mathbb{Z}^2 \vert=\sum_{t=k \nu}^{k\mu}\left((P_{k,t}\cdot C)+1\right). \end{align} But the right hand side does not depend on the choice of the point $P\in C$. Hence, the result follows from Theorem \ref{thmnormaldef}. \end{proof} \begin{remark} The condition that $X$ admits integral Zariski decompositions is indeed necessary for the above lemma. \begin{figure}[H] \includegraphics[scale=0.2]{ehrharttoric} \caption{Newton-Okounkov body of toric variety} \label{newtontoric} \end{figure} For a counterexample consider the blue (dark) polytope in Figure \ref{newtontoric}. Then, by the discussion in \cite[Section 6.1]{LM09}, there is a toric variety $X$ and a divisor $D$ such that with respect to a certain flag $Y_\bullet$, the corresponding Newton-Okounkov body $\Delta_{Y_\bullet}(D)$ is equal to the above blue (dark) polytope. It also follows from this discussion that $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration. If we change the point $Y_2$ of the flag and pick a general one instead, the resulting Newton-Okounkov body equals the red (light) polytope in Figure \ref{newtontoric}. However, the number of integral boundary points on the red polytope (8) is bigger than the boundary points on the blue polytope (4). This proves that for a general point, the corresponding Newton-Okounkov body does not induce a normal toric degeneration even though this holds for a special point. \end{remark} As we have seen above, the Ehrhart polynomial of $\Delta_{Y_\bullet}(D)$ only depends on the numerical class $[Y_1]$ if $X$ satisfies condition $(**)$. Hence, also the normalized surface area $S(D,\nu_{Y_\bullet})$ only depends on the numerical class $[Y_1]$. Therefore, we will just write $S(D,[Y_1])$ instead of $S(D,\nu_{Y_\bullet})$. We are now able to describe an algorithm which will give us for a given divisor $D$ an optimal class of a curve $[C]$. \begin{algorithm} \label{algo} \DontPrintSemicolon \KwIn{a big divisor D} \KwResult{optimal class of a curve C} D=P+N \quad\tcp{compute Zariski decomposition}\; D:=P \quad \tcp{replace the divisor D by its positive part}\; \For{ negative classes of curves $N_i$}{ compute $S(D,[N_i])$ } $optimum:= \min_{N_i} S(D,[N_i])$\; $optimalcurve:= \operatorname{argmin}_{N_i} S(D,[N_i])$\; \For{ all $\xi \in N^1(X)$ s.t. $(D\cdot \xi)<optimum+1$}{ \If{$\xi==[C]$ for some irreducible curve $C$}{ \If{$optimum\leq S(D,\xi)$}{ $optimum=S(D,\xi)$\; $optimalcurve:=\xi$\; } \uElseIf{ $optimum== S(D,\xi)$} {$optimalcurve.append(\xi)$\;} } } \KwOut{optimalcurve} \caption{Algorithm for finding normal toric degenerations} \end{algorithm} \begin{thm} Let $X$ be a projective surface satisfying condition $(**)$. Let $D$ be a very ample divisor. Let us assume that there is a flag $Y_\bullet$ such that $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration. Then the output of Algorithm 1 gives a list of all classes of curves $C_i$ which give rise to flags such that the corresponding Newton-Okounkov bodies induce normal toric degenerations. \end{thm} \begin{proof} This follows from Theorem \ref{thmnormsurfarea}, the proof of Theorem \ref{thmexminsurf} and Lemma \ref{lemnormpoint}. \end{proof} \section{Normal toric Degenerations of (weak) del Pezzo Surfaces} In this paragraph we will use our previous findings and additional ideas to construct normal toric degenerations of \emph{(weak) del Pezzo surfaces}. \subsection{Normal toric degeneration of smooth del Pezzo surfaces} Let us first present some basic facts about smooth del Pezzo surfaces. \begin{defi} We call $X$ a del Pezzo surface if it is a surface and its anticanonical divisor $-K_X$ is ample. \end{defi} Before we give the characterization of smooth del Pezzo surfaces, let us define what we mean by points in general position. \begin{defi} We say that $1\leq r \leq 8$ distinct points $p_1,\dots, p_8$ in $\mathbb{P}^2$ are in \emph{general position} if: \begin{itemize} \item No three of them lie on a line. \item No six of them lie on a conic. \item No eight of them lie on a cubic with a singularity at some of the $p_i$. \end{itemize} \end{defi} We can now state the well known characterization of smooth del Pezzo surfaces. \begin{thm} Up to isomorphy the smooth del Pezzo surfaces are given by $\mathbb{P}^1\times \mathbb{P}^1$ or the blow-up of $\mathbb{P}^2$ in $0\leq r\leq 8$ points in general position. \end{thm} Let $X_r$ be the smooth del Pezzo surface obtained by blowing up $r$ points in general position. In the following we collect some more facts, we want to use: \begin{enumerate} \item We have \begin{align} \operatorname{Pic}(X)\cong N^1(X)\cong \mathbb{Z}^{r+1}\cong\mathbb{Z}[H]\oplus \bigoplus_{i=1}^r \mathbb{Z}[E_i] \end{align} where $H$ is the total transform of a line in $\mathbb{P}^2$ and $E_i$ are the exceptional divisors. \item The intersection form on $N^1(X)$ is determined by the identities $(H)^2=1$, $(H\cdot E_i)=0$, $(E_i\cdot E_j)=-\delta_{ij}$. \item The anticanonical divisor is given by \begin{align} -K_{X_r}=3H-E_1-\dots - E_r. \end{align} \item Every irreducible curve with negative self intersection number is a $(-1)$-curve, and it is, up to permutation of indices, linear equivalent to one of the following divisors: \begin{align} &E_1\\ &H-E_1-E_2\\ &2H-E_1-\dots E_5\\ &3H-2E_1-E_2-\dots - E_7\\ &4H-2E_1-2E_2-2E_3-E_4-\dots -E_8\\ &5H-2E_1-\dots - 2E_6-E_7-E_8\\ &6H-3E_1-2E_2-\dots - 2 E_8. \end{align} \item Let $N=\{C_1,\dots, C_N\}$ be the set of $(-1)$-curves. The effective cone $\operatorname{Eff}(X)$ is generated by the negative curves $C_i$ in $N$. The nef cone is determined by the supporting hyperplanes \begin{align} C_i^{\perp}:=\{[D]\in N^1(X)_{\mathbb{R}} \ | \ D\cdot C_i=0\}. \end{align} \item The Zariski chambers of $X_r$ are also determined by the chamber decomposition of $\operatorname{Eff}(X)$ induced from the hyperplanes $C_i^{\perp}$. \item Suppose $r=1,\dots, 6$. A divisor class $D\in \operatorname{Pic}(X_r)$ contains an irreducible curve $C\in |D|$ if and only if $D$ is either (a) one of the $(-1)$-curves in $N$ or (b) $D$ is big and nef or (c) $D$ is a conic (i.e. $D\cdot (-K_{X_r})=2$) and $D^2=0$. \item Let $C\subset X_r$ be an irreducible smooth curve such that $C\equiv_{\text{lin}}aH-b_1E_1-\dots - b_r E_r$. Then the genus of $C$ is given by \begin{align} g(C)= 1/2 (a-1)(a-2)-1/2 \sum_{i=1}^{r} b_i(b_i-1). \end{align} \end{enumerate} As a reference, we refer to \cite[V.4]{H77} for $(a),(b),(c),(g)$, to \cite[Chapter 5]{ADH14} for properties $(d),(e)$. Property $(f)$ is derived in \cite[Proposition 3.4]{BKS04}. Furthermore, $(h)$ is an easy calculation using Rieman-Roch. Let us now apply Algorithm for a specific del Pezzo surface. \begin{ex} Let $X_5$ be the blow-up of $\mathbb{P}^2$ in five general points. That means that no three of them lie on a line. In this case, the negative curves are of the form \begin{align} E_1,\dots, E_5, \text{ and }H-E_i-E_j \text { for } i,j=1,\dots, 5, \ i\neq j . \end{align} For a given divisor $D$ and a curve $C$, we have all the necessary information to compute the Newton-Okounkov body $\Delta_{C\supset \{P\}}(D)$ for a very general point $P\in C$. With the help of a computer we can thus use our algorithm to compute the set of optimal curves, and the optimal normalized surface area for a given divisor $D$. We can use \cite[Example 1.3]{SX10} to efficiently compute the Hilbert polynomial of a given divisor $D$ as the Ehrhart polynomial of some polytope. Hence, we can compare the second coefficient of the Hilbert polynomial with the normalized surface area. If they agree the given Newton-Okounkov body with respect to the curves found by the algorithm induce normal toric degenerations. Running the algorithm for some randomly chosen divisors gives the following result. Note that all the divisor classes are represented by the basis $H,E_1,\dots, E_5$. {\center \begin{table}[H] \scriptsize \begin{tabular}{l|m{25em}|m{5em}|m{5em}} \hline \textbf{D} & \textbf{optimal curves} & \textbf{\makecell{min.\\ $S(D,[C])$} }&\textbf{\makecell{2nd coef.\\ of $h_D(t)$} } \\ \hline $(6, -1, -1, -2, -3, -4)$ & \begin{tabular}{m{10em}|m{10em}} nef curves & negative curves\\ \hline $(4, -2, 0, -2, -2, -2)$, $(4, -2, 0, -2, -2, -2)$, $(3, -1, -1, -1, -1, -2)$, $(2, -1, -1, -1, 0, -1)$, $(2, -1, -1, 0, -1, -1)$, $(2, -1, 0, -1, -1, -1)$, $(4, 0, -2, -2, -2, -2)$, $(2, 0, -1, -1, -1, -1)$, $(2, 0, 0, -1, -1, -1)$, $(1, 0, 0, -1, 0, 0)$, $(1, 0, 0, 0, -1, 0)$, $(1, 0, 0, 0, 0, -1)$ & $(0, 1, 0, 0, 0, 0)$, $(0, 0, 1, 0, 0, 0)$, $(0, 0, 0, 1, 0, 0)$, $(0, 0, 0, 0, 1, 0)$, $(0, 0, 0, 0, 0, 1)$, $(1, -1, -1, 0, 0, 0)$, $(1, 0, -1, -1, 0, 0)$, $(1, 0, 0, -1, -1, 0)$, $(1, -1, 0, -1, 0, 0)$, $(1, -1, 0, 0, -1, 0)$, $(1, 0, -1, 0, -1, 0)$, $(1, 0, 0, 0, -1, -1)$, $(1, 0, 0, -1, 0, -1)$, $(1, 0, -1, 0, 0, -1)$, $(1, -1, 0, 0, 0, -1)$, $(2, -1, -1, -1, -1, -1)$ \end{tabular} & 6 & 6 \\ \hline $(6, -1, -3, -1, -2, -3)$ & \begin{tabular}{m{10em}|m{10em}} nef curves & negative curves\\ \hline $(2, -1, -1, -1, 0, -1)$, $(2, -1, -1, -1, 0, -1)$, $(2, -1, -1, 0, -1, -1)$, $(2, 0, -1, -1, -1, -1)$, $(1, 0, -1, 0, 0, 0)$, $(1, 0, 0, 0, 0, -1)$ & $(0, 1, 0, 0, 0, 0)$, $(0, 0, 1, 0, 0, 0)$, $(0, 0, 0, 1, 0, 0)$, $(0, 0, 0, 0, 1, 0)$, $(0, 0, 0, 0, 0, 1)$, $(1, -1, -1, 0, 0, 0)$, $(1, 0, -1, -1, 0, 0)$, $(1, 0, 0, -1, -1, 0)$, $(1, -1, 0, -1, 0, 0)$, $(1, -1, 0, 0, -1, 0)$, $(1, 0, -1, 0, -1, 0)$, $(1, 0, 0, 0, -1, -1)$, $(1, 0, 0, -1, 0, -1)$, $(1, 0, -1, 0, 0, -1)$, $(1, -1, 0, 0, 0, -1)$, $(2, -1, -1, -1, -1, -1)$ \end{tabular} & 8 & 8 \\ \hline \end{tabular} \end{table} \begin{table}[H] \scriptsize \begin{tabular}{l|m{25em}|m{5em}|m{5em}} \hline \textbf{D} & \textbf{optimal curves} & \textbf{\makecell{min.\\ $S(D,[C])$} }&\textbf{\makecell{2nd coef.\\ of $h_D(t)$} } \\ \hline $ (8, -3, -2, -2, -2, -3)$ & \begin{tabular}{m{10em}|m{10em}} nef curves & negative curves\\ \hline \center $\emptyset $ & $(0, 1, 0, 0, 0, 0)$, $(0, 0, 1, 0, 0, 0)$, $(0, 0, 0, 1, 0, 0)$, $(0, 0, 0, 0, 1, 0)$, $(0, 0, 0, 0, 0, 1)$, $(1, -1, -1, 0, 0, 0)$, $(1, 0, -1, -1, 0, 0)$, $(1, 0, 0, -1, -1, 0)$, $(1, -1, 0, -1, 0, 0)$, $(1, -1, 0, 0, -1, 0)$, $(1, 0, -1, 0, -1, 0)$, $(1, 0, 0, 0, -1, -1)$, $(1, 0, 0, -1, 0, -1)$, $(1, 0, -1, 0, 0, -1)$, $(1, -1, 0, 0, 0, -1)$, $(2, -1, -1, -1, -1, -1)$ \end{tabular} &12&12 \\ \hline $(4, -1, -1, -1, 0, -1)$ & \begin{tabular}{m{10em}|m{10em}} nef curves & negative curves\\ \hline $(2, -1, -1, -1, 0, -1)$, $(2, -1, -1, -1, 0, -1)$, $(1, -1, 0, 0, 0, 0)$, $(1, 0, -1, 0, 0, 0)$, $(1, 0, 0, -1, 0, 0)$, $(1, 0, 0, 0, 0, -1)$ & $(0, 1, 0, 0, 0, 0)$, $(0, 0, 1, 0, 0, 0)$, $(0, 0, 0, 1, 0, 0)$, $(0, 0, 0, 0, 1, 0)$, $(0, 0, 0, 0, 0, 1)$, $(1, -1, -1, 0, 0, 0)$, $(1, 0, -1, -1, 0, 0)$, $(1, 0, 0, -1, -1, 0)$, $(1, -1, 0, -1, 0, 0)$, $(1, -1, 0, 0, -1, 0)$, $(1, 0, -1, 0, -1, 0)$, $(1, 0, 0, 0, -1, -1)$, $(1, 0, 0, -1, 0, -1)$, $(1, 0, -1, 0, 0, -1)$, $(1, -1, 0, 0, 0, -1)$, $(2, -1, -1, -1, -1, -1)$ \end{tabular} &8 & 8 \\ \hline $(7, -4, 0, -2, -3, -3)$& \begin{tabular}{m{10em}|m{10em}} nef curves & negative curves\\ \hline $(3, -2, -1, -1, -1, -1)$, $(3, -2, -1, -1, -1, -1)$, $(2, -1, -1, -1, -1, 0)$, $(2, -1, -1, -1, 0, -1)$, $(2, -1, -1, 0, -1, -1)$, $(4, -2, 0, -2, -2, -2)$, $(3, -2, 0, -1, -1, -1)$, $(2, -1, 0, -1, -1, -1)$, $(2, -1, 0, -1, -1, 0)$, $(2, -1, 0, -1, 0, -1)$, $(2, -1, 0, 0, -1, -1)$, $(1, -1, 0, 0, 0, 0)$, $(1, 0, 0, -1, 0, 0)$, $(1, 0, 0, 0, -1, 0)$, $(1, 0, 0, 0, 0, -1)$] & $(0, 1, 0, 0, 0, 0)$, $(0, 0, 1, 0, 0, 0)$, $(0, 0, 0, 1, 0, 0)$, $(0, 0, 0, 0, 1, 0)$, $(0, 0, 0, 0, 0, 1)$, $(1, -1, -1, 0, 0, 0)$, $(1, 0, -1, -1, 0, 0)$, $(1, 0, 0, -1, -1, 0)$, $(1, -1, 0, -1, 0, 0)$, $(1, -1, 0, 0, -1, 0)$, $(1, 0, -1, 0, -1, 0)$, $(1, 0, 0, 0, -1, -1)$, $(1, 0, 0, -1, 0, -1)$, $(1, 0, -1, 0, 0, -1)$, $(1, -1, 0, 0, 0, -1)$, $(2, -1, -1, -1, -1, -1)$ \end{tabular} & 9 & 9 \\ \hline \end{tabular} \end{table} } \normalsize We can make several conjectures from this example. First of all in each example the optimal normalized surface area is equal to the second coefficient of the Hilbert polynomial of $D$. Thus, in each example we do indeed get normal toric degenerations. Moreover, in each example all negative curves are optimal. We will see later that this is true for all varieties $X_r$ for $r=1,\dots, 6$. \end{ex} The next theorem describes some conditions on $X$ and on the flag $Y_\bullet$ which make sure that $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration. \begin{thm} \label{thmnormaldegminusone} Let $X$ be a smooth surface, admitting integral Zariski decompositions. Let $Y_\bullet=(C\supseteq \{P\})$ be an admissible flag such that $C\cong \mathbb{P}^1$ and $-K_{X}-C$ defines a big and nef class. Let $D$ be a big divisor on $X$. Then $\Delta_{Y_\bullet}(D)$ induces a normal toric degeneration if and only if $\Delta_{Y_\bullet}(D)$ is rational polyhedral. \end{thm} \begin{proof} Let us first make some observations. If $D$ is a nef divisor, then by assumption $D-C-K_X$ is big and nef. We can therefore use the Kawamata-Viehweg vanishing theorem to deduce that $H^1(X,\mathcal{O}_{X}(D-C))=0$. This implies that the restriction morphism $H^0(X,\mathcal{O}_X(D))\to H^0(C,\mathcal{O}_C(D))$ is surjective for every nef divisor $D$. Our aim is to show that we have an equality \begin{align} \Gamma_k(D)=k\cdot \Delta_{Y_\bullet}(D)\cap \mathbb{Z}^2. \end{align} Then the statement follows by using Gordan's lemma. We will do this by considering the vertical $t$-slices of $k\Delta_{Y_\bullet}(D)$, i.e. points such that the first coordinate is equal to a fixed integer $t\in [k\nu,k\mu]$. The second coordinate of the valuation points $\Gamma_k(D)$ in the $t$-slice are given by the valuation points of the restricted linear series $H^0(X,\mathcal{O}_{X}(kD-tC))_{|C}$ of the valuation $\operatorname{ord}_P$. Define $D_{k,t}:=kD-tC$, $P_{k,t}:=P(D_{k,t})$ and $N_{k,t}:=N(D_{k,t})$. By Theorem \ref{lemnormpoint}, we can without loss of generality assume that the point $P$ is not contained in the support of the negative part $N_{k,t}$. Since $X$ induces an integral Zariski decomposition, we can replace the restricted linear series $H^0(X,\mathcal{O}_X(D_{k,t}))_{|C}$ with the linear series $H^0(X,\mathcal{O}_X(P_{k,t}))_{|C}=H^0(C,\mathcal{O}_C(P_{k,t}))$. As $C\cong \mathbb{P}^1$, we can apply Riemann-Roch to deduce that \begin{align} \dim H^0(C,\mathcal{O}_C(P_{t,k|C}))=(P_{t,k}\cdot C)+1. \end{align} Hence, the valuation points in the $t$-slice are exactly all the points $(t,s)$ where $s\in \{0,\dots (P_{k,t}\cdot C) \}$. These are all the integer points in the $t$-slice of $k\Delta_{Y_\bullet}(D)$. \end{proof} We can use the above theorem to prove the following. \begin{thm} Let $X_r$ be the blow-up of $r$ general points in $\mathbb{P}^2$ for $r=1,\dots, 6$. Let $D$ be a big divisor on $X_r$, $C\subset X_r$ a negative curve and $P\in C$ an arbitrary point. Then $\Delta_{C\supset \{P\}}(D)$ induces a normal toric degeneration. \end{thm} \begin{proof} Since $X_r$ has a rational polyhedral effective cone, the Newton-Okounkov body $\Delta_{Y_\bullet}(D)$ is rational polyhedral for all big divisors and admissible flags $Y_\bullet$. It follows from Theorem \ref{thmzarintegral} and the fact that the only negative curves in $X_r$ are $(-1)$-curves, that $X_r$ admits integral Zariski decompositions. The negative curves of $X_r$ are either exceptional divisors $E_i$, lines $H-E_i-E_j$ or conics $2H-E_{i_1}-\dots - E_{i_4}$. All of them are rational. In addition, a calculation shows that the divisor $-K_{X}-C$ is big and nef for all possible negative curves $C$. Now, we can use Theorem \ref{thmnormaldegminusone}, which proves the claim. \end{proof} \begin{remark} Note that for $X_r$, where $r=7,8$ the assumptions of Theorem \ref{thmnormaldegminusone} are not fulfilled for all negative curves. Consider for example the negative curve $C=3H-2E_1-E_2-\dots E_7$ on $X_7$. Then $-K_{X_7}-C=E_1$ which is clearly not big and nef. \end{remark} \subsection{Normal toric degeneration on weak del Pezzo surfaces} In this paragraph we want to discuss examples of weak del Pezzo surfaces which induce normal toric degenerations. \begin{defi} We call $X$ a \emph{weak del Pezzo surface } if it is a surface and its anticanonical divisor $-K_X$ is nef and big. \end{defi} The characterization of smooth weak del Pezzo surfaces is a bit more complex. Roughly speaking, more constellation of points to blow-up are allowed. One of the main differences to del Pezzo surfaces is that no longer only $(-1)$-curves occur as negative curves but also $(-2)$-curves. We will focus on two examples. First, the blow-up of six points on a conic the and second, the blow-up of four points where three of them lie on a line. \subsubsection{Blow-up of six points on a conic} Consider the variety $S_6$ which is given as the blow-up of six points in $\mathbb{P}^2$ such that no three of them are collinear but all six lie on a single conic. The negative curves are: \begin{enumerate} \item $E_1,\dots, E_6$ the exceptional divisors \item $H-E_i-E_j$ for $i\neq j$, $i,j\in \{1,\dots, 6\}$ the strict transforms of the lines through two points. \item $2H-E_1-\dots -E_6$ the strict transform of the conic through all the six points. \end{enumerate} The first two types of curves are $(-1)$-curves and the last one is a $(-2)$-curve. \begin{thm} Let $D$ be a big divisor on $S_6$. Let furthermore $C$ be the strict transform of the conic going through the six chosen points, and $P\in C$ an arbitrary point. Then $\Delta_{C\supset \{P\}}(D)$ induces a normal toric degeneration. \end{thm} \begin{proof} The proof works similar as before with the only difference that there are also $(-2)$-curves occurring. This means that it is not clear whether $S_6$ admits integral Zariski decompositions. However, a computation shows that $-K_X-C$ is big and nef. We know that $C$ is not contained in the support of $N_t$ for $\nu\leq t \leq \mu$ (see proof of Proposition 2.1 in \cite{KLM12}). Since $C$ is the only $(-2)$-curve in $S_6$, the support of the divisors of $N_t$ only consists of $(-1)$-curves. We can thus use Theorem \ref{thmzarintegral} to deduce that if $D_t$ is integral then also $P_t$ and $N_t$ are integral. Then the proof works exactly as in Theorem \ref{thmnormaldegminusone}. \end{proof} In order to be able to compute Newton-Okounkov bodies, we need to know the Zariski chambers of the effective cone of $S_6$. Note that unlike in the case of del Pezzo surfaces, the decomposition of Zariski chambers is not necessarily given by the decomposition induced from the hyperplanes $C^{\perp}$ where $C$ is in the set of negative curves. This is a consequence of the fact that there exists a $(-2)$-curve. In general it is quite difficult to describe this decomposition. However, in order to compute Newton-Okounkov bodies of a divisor $D$ with respect to the curve $C$ given by the conic going through the six points, we just need to compute the wall crossings of the segment $D-tC$ for $t\in [\nu,\mu]$. The next lemma describes these crossing points. \begin{lem}\label{lemzarint} Let $D$ be a big divisor on $S_6$. Then the intersections of the divisors $D-tC$ for $t\in (\nu,\mu)$ with the boundary of the Zariski chambers all lie in the set $\bigcup C_i^{\perp}$ where the union is taken over all $(-1)$-curves. \end{lem} \begin{proof} The proof is very similar to Proposition $3.4$ in \cite{BKS04}. It is shown in the mentioned proof that if $N$ is a negative divisor whose support contains only $(-1)$-curves, then all the irreducible components of $N$ are orthogonal. Let us now suppose $D_t:=D-tC$ for $t\in (\nu,\mu)$ lies on the boundary of a Zariski chamber. If we define for a divisor $D$ the sets \begin{align} \operatorname{Null}(D)&=\{ C \ | \ \text{irreducible with } (C\cdot D)=0\}\\ \operatorname{Neg}(D)&=\{C \ | \text{ irreducible component of } N(D)\}, \end{align} then according to \cite[Proposition 1.5]{BKS04}, this means that \begin{align} \operatorname{Null}(P_t)\setminus \operatorname{Neg}(D_t)\neq \emptyset. \end{align} Let $C^\prime$ be a curve which lies in $\operatorname{Null}(P_{t})$ but not in $\operatorname{Neg}(D_t)$. Then $C^\prime$ is a negative curve and $N_{D_t}+C^\prime$ is a negative divisor according to \cite[Lemma 4.3]{BKS04}. We want to show that $C^\prime\neq C$. Suppose that they are equal. Then $(P_t\cdot C)=0$. We know from the choice of $t$ that the slice $\Delta_{C\subset\{P\}}(D)_{\nu_1=t}$ has length bigger than $0$ for $t\in (\nu,\mu)$. However, this is a contradiction to $(P_t\cdot C)=0$. Hence, $C^\prime \neq C$ and thus $C^\prime$ is a $(-1)$-curve. It follows that the support of $N_t+C^\prime$ consists of $(-1)$-curves and we conclude $(C^\prime\cdot N_{t})=0$ which implies that $(D_t\cdot C)=0$. This shows that $D_t\in C^\perp$. \end{proof} We are now able to present an example of a Newton-Okounkov body on $S_6$ which induces a normal toric degeneration. \begin{ex} Let us consider the divisor $D=4H-E_1-\dots E_6$. This is an ample divisor. The corresponding Newton-Okounkov body with respect to the curve $C=2H-E_1-\dots - E_6$ and a general point $P$ is illustrated in Figure \ref{exok1}. \begin{figure}[H] \begin{center} \includegraphics[scale=0.5]{6pointsconic} \end{center} \caption{N.-O. body of $D=4H-E_1-\dots, E_6$ on $S_6$} \label{exok1} \end{figure} The Hilbert polynomial, which is equal to the Ehrhart polynomial of $\Delta_{Y_\bullet}(D)$, is given by \begin{align} P_D(t)=5t^2+3t+1. \end{align} \end{ex} \subsection{Blow-up of four points three of them on a line} Let $L_3$ be the blow-up of $\mathbb{P}^2$ of four points where three points lie on a line. This is again a weak del Pezzo surface. The negative curves are: \begin{enumerate} \item $E_1,E_2,E_3,E_4$ the exceptional divisors. \item $H-E_4-E_2$, $H-E_4-E_3$,$H-E_4-E_1$ the strict transforms of the lines through two points. \item $H-E_1-E_2-E_3$ the strict transform of the line through the three collinear points. \end{enumerate} The first two types of curves are $(-1)$- and the last one is a $(-2)$-curve. Analogously as in the previous section, we get the following result. \begin{thm} Let $D$ be a big divisor on $L_3$. Let furthermore $C=H-E_1-E_2-E_3$ be the line through the three chosen points, and $P\in C$ an arbitrary point. Then $\Delta_{C\supset \{P\}}(D)$ induces a normal toric degeneration. \end{thm} \qed Since $H-E_1-E_2-E_3$ is the only $(-2)$-curves, we can use an analog of Lemma \ref{lemzarint} in order to compute Newton-Okounkov bodies. \begin{ex} Let us consider the divisor $D=4H-E_1-E_2-E_3-E_4$. This is an ample divisor. We want to compute the Newton-Okounkov body with respect to the curve $C=H-E_1-E_2-E_3$ and a very general point $P$ on $C$. \begin{figure}[H] \begin{center} \includegraphics[scale=0.5]{4pts3line} \end{center} \label{exok2} \caption{N.-O. body of $D=4H-E_1-\dots- E_4$ on $L_3$} \end{figure} The Hilbert polynomial of $D$ is given by: \begin{align} P_D(t)= 6t^2+4t+ 1. \end{align} \end{ex} \section{Global Newton-Okounkov bodies on surfaces} In this section we want to use our previous findings in order to compute global Newton-Okounkov bodies on (weak) del Pezzo surfaces. We will see that under good conditions the global semigroup $\Gamma_{Y_\bullet}(X)$ is finitely generated. Moreover, we will see how the generators of this semigroup give rise to generators of the Cox ring. We will illustrate our results for the varieties $X_5$ and $L_3$. \subsection{ Generators of the global Newton-Okounkov body on surfaces} In this section we want to generalize results from \cite{SS16} to arbitrary admissible flags. Let us start by defining what we mean by a global Newton-Okounkov body. \begin{defi} Let $X$ be a projective variety. Let $Y_\bullet$ be an admissible flag on $X$. Then we define the \emph{global Newton-Okounkov body of $X$} with respect to $Y_\bullet$ as the closure of \begin{align} \text{Cone}(\{ (\nu_{Y_\bullet}(s),[D]) \ | \ s\in H^0(X,\mathcal{O}_X(D), \ D\in \text{Pic}(X))\} \end{align} in $\mathbb{R}^d\times N^1(X)_\mathbb{R}$. We denote it by $\Delta_{Y_\bullet}(X)$. \end{defi} Note that for any big divisor $D$, we have the following identity \begin{align} \Delta_{Y_\bullet}(D)=\Delta_{Y_\bullet}(X)\cap (\mathbb{R}^d\times \{[D]\}). \end{align} We will now focus on the case where $X$ is a smooth surface. Moreover, let us assume that $X$ admits a rational polyhedral pseudo-effective cone, e.g. if $X$ is a Mori dream surface. Let $C$ be a curve on $X$ and $P\in C$ a smooth point on $C$. Let \begin{align} D_1=P_1+N_1,\dots, D_r=P_r+N_r \end{align} be the set of generators of the Zariski chambers with the property that $C$ is not contained in the support of the negative parts $N_1,\dots, N_r$. The following is a generalization of \cite[Theorem 3.2]{SS16} to arbitrary flags. Note that the proof works quite similar as the mentioned one. \begin{thm}\label{thmglobalok} Consider the notation introduced above. The generators of the global Newton-Okounkov body $\Delta_{C\supset\{P\}}(X)$ are given by \begin{itemize} \item $(1,0,[C])$ \item $(0,\operatorname{ord}_{P}(N_{i|C}),[D_i]) \quad \text{for } i=1,\dots, r$ \item $(0,\operatorname{ord}_{P}(N_{i|C})+(P_i\cdot C),[D_i]) \quad \text{for } i=1,\dots, r$. \end{itemize} \end{thm} \begin{proof} It is not hard to see that all the above points are contained in $\Delta_{C\supset\{P\}}(X)$. Let us now show that all points in $\Delta_{C\supset\{P\}}(X)$ are positive linear combinations of the above points. It is enough to show that all valuation points are of this kind. Let $D$ be a big divisor and $s\in H^0(X,\mathcal{O}(D))$ an arbitrary section. Define $a:=\operatorname{ord}_{C}(s)$, consider $D^\prime:=D-aC$ and set $\xi:=s/s_{C}^a$ where $s_C$ is a defining section of $C$. We have \begin{align} (\nu(s),[D])= a\cdot(1,0,[C])+(\nu(\xi),[D^\prime]). \end{align} Therefore, it is enough to show that $(\nu(\xi),[D^\prime])$ is a positive linear combination of the above points. Let $D_{i_1},\dots, D_{i_s}$ be the generators of the unique Zariski chamber which contains the divisor $D^\prime$. Then we can write \begin{align} D^\prime= \sum_{k=1}^s t_k\cdot D_{i_k}. \end{align} Furthermore, for the negative part $N^\prime:=N(D^\prime)=\sum t_kN_{i_k}$ and $P^\prime:=P(D^\prime)=\sum t_k P_{i_k}$. By definition of $D^\prime$, we get that $C$ is not contained in the support of the negative part $N(D^\prime)$. This also shows that $C$ is not contained in the negative parts of the $D_{i_k}$. Let us now choose $m\in \mathbb{Z}$ such that $mN^\prime$ and $mP^\prime$ are both integral. We can decompose $\xi^m=\zeta \sigma$ for $\zeta \in H^0(X,\mathcal{O}_X(mP^\prime))$ and $\sigma\in H^0(X,\mathcal{O}_X(mN^\prime))$. Then \begin{align} m\cdot(\nu(\xi),[D^\prime])=(\nu(\zeta)+\nu(\sigma),[mP^\prime+mN^\prime])= (\nu(\zeta),[mP^\prime])+(\nu(\sigma),[mN^\prime]). \end{align} Furthermore, \begin{align} \nu(\sigma)=(0,\operatorname{ord}_{P}(\sigma_{|C}))=m\cdot\sum_{k=1}^s t_k\cdot (0,\operatorname{ord}_{P}(N_{i_k|C}). \end{align} On the other hand, we have \begin{align} \nu(\zeta)=(0,bm) \text{ where } b \in [0,P^\prime\cdot C] \end{align} Thus there is a $c\in [0,1]$ such that \begin{align} \nu(\zeta)= cm\cdot \sum_{k=1}^s t_k\cdot (0,0) + (1-c)m \sum_{k=1}^s t_k\cdot(0,P_k\cdot C). \end{align} Putting everything together we get \begin{align} m\cdot (\nu(\xi),[D])=& \left( mc\cdot \sum_{k=1}^s t_k(0,\operatorname{ord}_{P}(N_{i_k|C})) + m(1-c)\bigg(\sum_{k=1}^s t_k(0,\operatorname{ord}_{P}(N_{i_k|C})\right. \\ & \left. +P_k\cdot C\bigg),\left[ \sum_{k=1}^s t_k\cdot D_{i_k} \right] \right) =\\ =& mc \cdot \sum_{k=1}^s t_k \left(0,\operatorname{ord}_{P}(N_{i_k|C}),[D_{i_k}]\right)+\\ +& m(1-c)\cdot\sum_{k=1}^s t_k\left(0,\operatorname{ord}_{P}(N_{i_k|C}\right)+\left(P_{i_k}\cdot C\right)),[D_{i_k}]). \end{align} This proves the claim. \end{proof} The next proposition gives a more concrete characterization of the above mentioned divisors $D_i$. \begin{prop}\label{propzargen} Let $D$ be a divisor which spans an extremal ray of the closure of a Zariski chamber $\overline{\Sigma_P}$. Then $D$ spans an extremal ray of either the pseudo-effective cone or the nef cone of $X$. \end{prop} \begin{proof} Let $P$ be a big and nef divisor. Then we define \begin{align} \operatorname{Face}(P)&:=\bigcap_{C\in \operatorname{Null}(P)} C^{\perp}\cap \operatorname{Nef}(X)\\ V^{\geq 0}(\operatorname{Null}(P))&:=\text{Cone}(\operatorname{Null}(P)). \end{align} Then by \cite[Proposition 1.8]{BKS04}, we have \begin{align} \operatorname{Big}(X)\cap \overline{\Sigma_P}=\operatorname{Big}(X)\cap \operatorname{Face}(P)+ V^{\geq 0}(\operatorname{Null}(P)). \end{align} Hence, the extremal rays of $\overline{\Sigma_P}$ are either extremal rays of $\operatorname{Face}(P)$ or of $V^{\geq 0}(\operatorname{Null}(P))$. However, since $\operatorname{Face}(P)$ is a face of the Nef cone, the first set of extremal rays lies inside the set of extremal rays of the Nef cone. The extremal rays of $V^{\geq 0}(\operatorname{Null}(P))$ are all negative, and thus extremal rays of the pseudo-effective cone. \end{proof} \begin{remark} Proposition \ref{propzargen} combined with Theorem \ref{thmglobalok} is in some sense surprising. It shows that in order to calculate the global Newton-Okounkov body on a surface $X$, it is not necessary to know the exact structure of the Zariski chambers. It is not even necessary to compute any Zariski decomposition at all. However, in order to derive the structure of the generators of the global Newton-Okounkov body we heavily relied on the fact that Zariski decomposition as well as the Zariski chamber decomposition does exist. \end{remark} \subsection{Finite generation of the global semigroup} We have seen above, that a smooth surface $X$ with a rational polyhedral pseudo-effective cone admits rational polyhedral global Newton-Okounkov bodies with respect to all admissible flags. In this section we want to prove a stronger property, namely finite generation of the global semigroup appearing in the construction of global Newton-Okounkov bodies. We will prove this property for the examples we have dealt with so far. In order to prove such a statement, we need to consider Newton-Okounkov bodies of effective but not big divisors. There are two different ways of defining these Newton-Okounkov bodies which both coincide for big divisors. One way is to define it via taking a fiber of the global Newton-Okounkov body. The corresponding body is called the \emph{numerical Newton-Okounkov body}. More concretely, we have \begin{align} \Delta_{Y_\bullet}^{num}(D):=\Delta_{Y_\bullet}(X)\cap \left( \mathbb{R}^d\times \{[D]\}\right). \end{align} Another way to associate a convex body to an effective divisor is to just use the same definition as for big divisors. The resulting body is called the \emph{valuative Newton-Okounkov body}. More, concretely we define \begin{align} \Delta_{Y_\bullet}^{val}(D):= \overline{\text{Cone}(\Gamma_{Y_\bullet}(D))} \cap \left( \mathbb{R}^d\times\{1\}\right) \end{align} where \begin{align} \Gamma_{Y_\bullet}(D):=\{(\nu_{Y_\bullet}(s),k) \ | \ k\in \mathbb{N}, s \in H^0(X,\mathcal{O}(kD))\setminus\{0\} \}. \end{align} In general, we have $\Delta_{Y_\bullet}^{val}(D)\neq\Delta_{Y_\bullet}^{num}(D)$. However, if $D$ is big the mentioned equality holds. \begin{lem}\label{lemnumval} Let $X$ be a smooth Mori dream surface, $D$ an effective divisor on $X$ and $Y_\bullet$ an admissible flag such that $-K_X-Y_1$ is big and nef. Then $\Delta_{Y_\bullet}(D)^{num}=\Delta_{Y_\bullet}(D)^{val}$. \end{lem} \begin{proof} Without loss of generality we might assume that $D$ is nef. Following \cite{CPW17}, there are two different cases for $\Delta_{Y_\bullet}^{num}(D)$. The first case is that $\mu:=\sup \{ t \ : \ D-tY_1 \text{ is effective }\}$ is equal to $0$. Then \begin{align} \Delta^{num}_{Y_\bullet}(D)=\{(0,x) \ | \ x\in [0,D\cdot Y_1] \}. \end{align} Since $\mu=0$, we can deduce that \begin{align} \Delta_{Y_\bullet}^{val}(D)=\{0\}\times \Delta^{val}_{X|Y_1}(D)=\{0\}\times \Delta^{val}_{Y_1}(D). \end{align} Note that for the last identity we have used the fact that $H^1(X,D-Y_1)=0$ which means that the restriction morphism $H^0(X,\mathcal{O}_X(D))\to H^0(Y_1,\mathcal{O}_{Y_1}(D))$ is surjective. However, it easily follows that $\Delta_{Y_1}^{val}(D_{|Y_1})=[0,D\cdot Y_1]$. This proves $\Delta_{Y_\bullet}^{val}(D)=\Delta_{Y_\bullet}^{num}(D)$ in for the case $\mu=0$. Suppose now that $\mu>0$. Then $\Delta_{Y_\bullet}^{num}$ is given by a line segment $\text{Conv}\{(0,0),(\mu,Q)\}$ for some number $Q\in\mathbb{R}_{\geq 0}$. Since $\Delta_{Y_\bullet}^{val}(D)\subseteq\Delta_{Y_\bullet}^{num}(D)$ it is enough to prove that there are sections $s_1,s_2\in H^0(X,\mathcal{O}(kD)$ such that $\nu_{Y_\bullet}(s_1)=(0,0)$, and $\nu_{Y_\bullet}(s_2)=k(\mu,Q)$. However, since $D$ is nef and thus semi ample, the first assertion is clear. Moreover, since $D-\mu C$ is effective, the second assertion follows. This proves the claim. \end{proof} \begin{lem}\label{lemsemnorm} Let $X$ be a smooth del Pezzo surface. Let $Y_\bullet$ be an admissible flag such that $-K_X-Y_1$ is big and nef, and let $Y_1$ be rational, i.e. of genus 0. Then for all effective divisors $D$, the semigroup $\Gamma_{Y_\bullet}(D)$ is finitely generated normal. \end{lem} \begin{proof} This proof works similarly as the proof of Theorem \ref{thmnormaldegminusone}. \end{proof} \begin{remark}\label{remsemnorm} The above lemma is also valid for the varieties $L_3$ and $S_6$, if we take as $Y_1$ the single $(-2)$-curve. \end{remark} \begin{thm} Suppose one of the following situations. \begin{itemize} \item $X=X_r$ is the blow-up of $1\leq r\leq 6$ points in general position and $Y_\bullet$ is an admissible flag such that $Y_1$ is negative. \item $X=L_3$ or $X=S_6$ and $Y_\bullet$ is an admissible flag such that $Y_1$ is the corresponding single $(-2)$-curve. \end{itemize} Then the global semigroup \begin{align} \Gamma_{Y_\bullet}(X)=\{(\nu_{Y_\bullet}(s),D) \ | \ D\in N^1(X)=\text{Pic}(X), \ s\in H^0(X,\mathcal{O}(D)) \} \end{align} is finitely generated normal. \end{thm} \begin{proof} We know, by Theorem \ref{thmglobalok}, that $\Delta_{Y_\bullet}(X)=\overline{\text{Cone}(\Gamma_{Y_\bullet}(X))}$ is rational polyhedral. We want to prove that $\overline{\text{Cone}(\Gamma_{Y_\bullet}(X))}\cap (\mathbb{Z}^2\times N^1(X))=\Gamma_{Y_\bullet}(X)$. Then the result follows from Gordan's lemma. Consider $(a,D)\in \overline{\text{Cone}(\Gamma_{Y_\bullet}(X))}$ for $a\in \mathbb{Z}^2$ and $D$ an integral effective divisor in $N^1(X)$. This means that \begin{align} a\in \Delta^{num}_{Y_\bullet}(D)=\Delta^{val}_{Y_\bullet}(D)=\overline{\text{Cone}(\Gamma_{Y_\bullet}(D))}\cap \left(\mathbb{R}^2\times\{1\}\right). \end{align} But by Lemma \ref{lemsemnorm} and Remark \ref{remsemnorm}, $\Gamma_{Y_\bullet}(D)$ is normal. Thus, there is a section $s\in H^0(X,\mathcal{O}(D))$ such that $\nu_{Y_\bullet}(s)=a$. This proves that $(a,D)\in \Gamma_{Y_\bullet}(X)$. \end{proof} The finite generation of the global semigroup $\Gamma_{Y_\bullet}(X)$ has the following consequences for the Cox ring $\text{Cox}(X)$. \begin{thm}\label{thmcox} Let $X$ be a $\mathbb{Q}$-factorial variety with $N^1(X)=\operatorname{Pic}(X)$. Let $Y_\bullet$ be an admissible flag. Suppose $\Gamma_{Y_\bullet}(X)$ is finitely generated by \begin{align*} (\nu_{Y_\bullet}(s_1),D_1),\dots (\nu_{Y_\bullet}(s_N),D_n). \end{align*} Then the Cox ring $\operatorname{Cox}(X)$ is generated by the sections $s_1,\dots, s_N$. \end{thm} \begin{proof} Let $R$ be the $\mathbb{C}$-algebra which is generated by the sections $s_1,\dots,s_N$. Let $D$ be any effective divisor in $X$. Let $k=h^0(X,\mathcal{O}_X(D))=\vert \nu_{Y_\bullet}(H^0(X,\mathcal{O}_X(D))\setminus\{0\})\vert$. Since the $(\nu_{Y_\bullet}(s_1),D_1),\dots (\nu_{Y_\bullet}(s_N),D_n)$ generate $\Gamma_{Y_\bullet}(X)$, it follows that there are $f_1,\dots,f_k\in R\cap H^0(X,\mathcal{O}_X(D))\setminus\{0\}$ which all have a different valuation. But then it follows from \cite[Proposition 2.3]{KK12} that $f_1,\dots, f_k$ are linearly independent. This proves that they form a basis of $H^0(X,\mathcal{O}_X(D))$ and that every section $s\in H^0(X,\mathcal{O}(D))$ lies in the algebra $R$. This show that $R\cong \operatorname{Cox}(D)$. \end{proof} \subsection{Examples of global Newton-Okounkov bodies and global semigroups} In this last paragraph we want to consider two concrete examples and compute their global Newton-Okounkov bodies. In the second example we also present generators of the global semigroup and use them to find generators of the Cox ring. \begin{ex} First of all we consider the del Pezzo surface $X_5$, which is the blow-up of five points in general position in $\mathbb{P}^2$. As a flag, we take the negative curve $C:=H-E_1-E_2$, and a general point on it. According to Theorem \ref{thmglobalok}, we need to compute all ray generators of Zariski chambers, whose support of the negative part does not contain the negative curve $C$. Using Proposition \ref{propzargen}, these are given by all the negative curves except the curve $C$ and the generators of the extremal rays of the nef cone. With the help of a computer calculation, we compute the global Newton Okounkov body and present the resulting hyperplane representation in $\mathbb{R}^2\times N^1(X_5)_\mathbb{R}\cong \mathbb{R}^8$. Choosing $H,E_1,\dots,E_5$ as a basis for $N^1(X_5)_\mathbb{R}$ we get the following representation for $\Delta_{Y_\bullet}(X_5)$: \begin{align} \tiny \begin{pmatrix} 1& 0& 0& 0& 0& 0& 0& 0 \\ 1& -1& 1& 1& 1& 0& 0& 0 \\ 0& -1& 2& 1& 1& 0& 1& 1 \\ -1& -1& 3& 1& 1& 1& 1& 2 \\ 0& -1& 2& 1& 1& 1& 0& 1 \\ -1& -1& 2& 0& 1& 1& 1& 0 \\ 0& -1& 1& 0& 1& 0& 0& 0 \\ -1& -1& 3& 1& 1& 2& 1& 1 \\ -1& -1& 3& 1& 1& 1& 2& 1 \\ 0& -1& 2& 1& 1& 1& 1& 0 \\ -1& -1& 2& 0& 1& 0& 1& 1 \\ -1& -1& 2& 0& 1& 1& 0& 1 \\ 0& -1& 1& 1& 0& 0& 0& 0 \\ -1& -1& 2& 1& 0& 1& 1& 0 \\ -1& -1& 2& 1& 0& 1& 0& 1 \\ -2& -1& 2& 0& 0& 1& 0& 1 \\ -2& -1& 2& 0& 0& 1& 1& 0 \\ -1& -1& 1& 0& 0& 0& 0& 0 \\ -1& -1& 2& 1& 0& 0& 1& 1 \\ -2& -1& 2& 0& 0& 0& 1& 1 \\ -2& -1& 3& 1& 0& 1& 1& 2 \\ -2& -1& 3& 1& 0& 1& 2& 1 \\ -2& -1& 3& 1& 0& 2& 1& 1 \\ -2& -1& 3& 0& 1& 1& 1& 2 \\ -2& -1& 3& 0& 1& 1& 2& 1 \\ -2& -1& 3& 0& 1& 2& 1& 1 \\ -2& -1& 4& 1& 1& 2& 2& 2 \\ -1& 0& 2& 1& 0& 1& 1& 1 \\ 0& 1& 0& 0& 0& 0& 0& 0 \\ -1& 0& 1& 0& 0& 1& 0& 0 \\ -1& 0& 1& 0& 0& 0& 0& 1 \\ -1& 0& 1& 0& 0& 0& 1& 0 \\ -1& 0& 2& 0& 1& 1& 1& 1 \\ -3& -1& 4& 0& 1& 2& 2& 2 \\ -3& -1& 4& 1& 0& 2& 2& 2 \\ -4& -1& 4& 0& 0& 2& 2& 2 \\ -3& -1& 3& 0& 0& 2& 1& 1 \\ -3& -1& 3& 0& 0& 1& 1& 2 \\ -3& -1& 3& 0& 0& 1& 2& 1 \end{pmatrix}\cdot (x_1,\dots, x_8)^T\leq 0. \end{align} It is a convex cone in $\mathbb{R}^8$ which is defined by a minimal number of $39$ inequalities or a minimal number of $22$ rays. Note that the above equations give an Ehrhart type formula for the Hilbert polynomial of a given divisor $D=(x_3,\dots,x_8)$ similar to the one derived in \cite[Example 1.3]{SX10}. \end{ex} \begin{ex} Consider now $L_3$, which is the blow-up of four points such that three of them lie on a line. Let us suppose that $P_1,\dots, P_3$ lie on a line. We choose $H,E_1,\dots, E_4$ as our basis for $N^1(L_3)_\mathbb{R}$. Then the global Newton-Okounkov body of $L_3$ with respect to the curve $C=H-E_1-E_2-E_3$ and a general point on it is given by the following linear inequalities: \begin{align} \begin{pmatrix} 1& 0& 0& 0& 0& 0& 0\\2& -1& 1& 1& 1& 1& 0\\1& -1& 1& 0& 1& 1& 0\\1& -1& 1& 1& 0& 1& 0\\1& -1& 1& 1& 1& 0& 0\\-1& -1& 1& 0& 0& 0& 0\\0& -1& 1& 0& 0& 1& 0\\0& -1& 1& 0& 1& 0& 0\\0& -1& 1& 1& 0& 0& 0\\0& 1& 0& 0& 0& 0& 0\\-1& 0& 1& 0& 0& 0& 1 \end{pmatrix}\cdot (x_1,\dots,x_7)^T \geq 0. \end{align} The ray generators of the global Newton-Okounkov body are \begin{align} &(0, 0, E_4),\ (0, 0, E_3), \ (0, 0, E_2),\ (0, 0, E_1),\ (0, 0, H-E_1-E_4),\\ & ( 0, 0, H-E_2-E_4),\ (0, 0, H-E_3-E_4),\ (0, 1, H-E_4),\\ & ( 1, 0, H-E_1-E_2-E_3). \end{align} A calculation shows that these generators, form a Hilbert basis, so that they are a generating set of the global semigroup $\Gamma_{Y_\bullet}(L_3)$. It follows from Theorem \ref{thmcox}, that $\text{Cox}(L_3)$ is generated by the following sections: \begin{itemize} \item the negative curves \item the strict transform of a general line going through $P_4$. \end{itemize} \end{ex} \input{bib} \end{document}
\section{\label{sec:level1}First-level heading} Surface/edge energy is normally modeled as a continuous function of surface/edge orientation, $\gamma(\hat{{\bf n}})$ \cite{langer, BWBK}. This function is often constructed so that it is consistent with underlying symmetry constraints combined with experimental observations or data from computations \cite{elder, MBW}. In this paper, we put forward a simple geometric argument that suggests this picture is incomplete for crystals with a non-Bravais lattice structure. Instead, we argue that when such a crystal is cleaved by an arbitrarily positioned plane or line, the resulting surface energy can be both multivalued and discontinuous when viewed as a function of orientation. This is due to the fact that that some orientations give rise to a translation invariant surface energy, while others do not. These singularities occur for a discrete set of orientations that are commensurate with the crystal structure. In the case of graphene, this includes the so-called ``zigzag'' orientation, which is often found to dominate the equilibrium shape of isolated graphene crystals. While we expect similar conclusions to apply to real materials and first-principles calculations, including graphene films grown on substrates, we examine these effects for an isolated hexagonal lattice using nearest-neighbor, bond-counting arguments, neglecting reconstructions and other off-lattice effects. The surface energy we discuss throughout most of the paper corresponds to the zero-temperature energy landscape of an ideal bulk-truncated surface/edge. In a pairwise bond-counting model, an energy is defined for a given lattice configuration by defining sets of bond orientations ${\rm V}=\{\{{\bf v}_{ij}\}_{j=1}^{J_i}\}_{i=1}^{N_p}$ and corresponding bond energies $e_{ij}$ for each of the $N_p$ particles in the system \cite{MMN}. These sets are often restricted to neighboring pairs of atoms, but, in principle, could include all combinations of atoms. For our nearest-neighbor hexagonal/graphene model, the particles have one of two distinct sets of bonds, $\{\{{\bf v}_{Aj}\}_{j=1}^{3},\{{\bf v}_{Bj}\}_{j=1}^{3}\}$. For a crystal with a Bravais lattice structure, the same set of bonds, $\{\mathbf{v}_j \}_{j=1}^J$, applies to each particle in the crystal. The surface/edge energy of bond-counting models on Bravais lattices is given by \begin{equation} \gamma(\hat{\mathbf{n}})=\frac12\sum_{j=1}^J e_j \frac{|\hat{\mathbf{n}}\cdot\mathbf{v}_j|}{|\det A|} \end{equation} where $\hat{\mathbf{n}}$ is the normal to the surface/edge and $A$ is a matrix with the lattice primitive vectors as columns \cite{herr}. The idealized graphene structure is one of the simplest examples of a non-Bravais lattice. Gan and Srolovitz were the first to address the issue of edge energy for individual graphene flakes \cite{GS}. They use DFT calculations for a collection of graphene ribbons at seven different orientations to interpolate an edge energy function, and consider unreconstructed graphene with both non-terminated and hydrogen terminated bonds, as well as a model for reconstructed graphene. Liu et al. \cite{LDY} revisit the problem and first consider an arbitrarily oriented graphene edge that can be decomposed into a number of ``zigzag'' and ``armchair'' components, so that the edge energy can be represented using two energies of these primary configurations along with zigzag and armchair densities that can be computed from simple geometric considerations: $$ \gamma(\chi)=\frac{4}{\sqrt3}\epsilon_A\sin(\chi)+2\epsilon_Z\sin(\pi/6-\chi), $$ where $\epsilon_A$ and $\epsilon_Z$ are the energies of an atom in an armchair or zigzag component respectively and $\chi$ is the edge angle. This assumption is equivalent to assuming edges of the graphene flake do not contain singly-bonded carbon-atoms. This same assumption appears to have been tacitly made in \cite{GS}, as a perfectly linear edge with the slope indicated in their Fig. 2b would have an additional singly-bonded atom at the kinks along the edge. For the graphene structure, we will see that including such atoms leads to a discontinuous, multi-valued edge energy. \begin{figure} \includegraphics[width=\linewidth]{graphdem.png} \hspace{ .2in} \caption{\label{fig:epsart} A hexagonal/graphene lattice cut by two lines in the zigzag orientation (near the top of the figure) and two more in the armchair orientation (near the bottom of the figure). In the case of the zigzag orientations, the broken bond density can be altered by a parallel translation of the edge, while the broken bond density is translation invariant for the armchair orientation. } \end{figure} While it is not surprising that equilibrium shapes are dominated by facets without these dangling atoms, it seems clear they would appear in non equilibrium structures and could affect the dynamics of relaxation and growth processes. Indeed, Liu et al. go on to consider growth mechanisms involving singly-bonded carbon atoms arriving at and diffusing along steps similar to what occurs in the traditional Burton-Cabrera-Frank \cite{BCF} theory of step-flow on surfaces , and singly-bonded atoms at graphene edges have been observed in experiments \cite{SK}. In view of this, we examine a more complete picture of surface/edge energy as a function of perfectly planar/linear facets at arbitrary orientations and positions. The mechanism that is responsible for the discontinuities in the surface energy is illustrated in Figure 1 using a nearest-neighbor bonded crystal with the hexagonal/graphene structure. Most facets behave like the armchair orientation shown at the bottom of Figure 1, where the broken bond density, which represents edge energy in this simple model, is translation invariant. This contrasts with a countable, discrete set of orientations that behave like the zig-zag orientation shown at the top of Figure 1, where the broken bond density alternates between two values as the line cutting the crystal is translated in the normal direction. \begin{figure} \subfloat[]{\includegraphics[width=\linewidth]{LDYgam2.png}} \subfloat[]{\includegraphics[width=\linewidth]{wedge3.png}} \caption{\label{fig:epsart} A polar plot of broken-bond density/edge energy for the hexagonal/graphene crystal as a function of edge orientation. The entire plot is shown in (a) while (b) contains only the wedge ranging between armchair and zigzag orientations. Most values lie on the black curve, while the discrete set of incongruent orientations gives rise to discontinuities with two edge energy values for each orientation: the minimum values are shown in blue and the maximum values are gold. The red curve interpolates between the zigzag and armchair orientation by neglecting dangling bonds. } \end{figure} In general, edge orientations fall into one of two categories: {\em commensurate} orientations result in a periodic pattern of broken bonds, while {\em non-commensurate} orientations result in an aperiodic pattern of broken bonds. An edge with a commensurate orientation can be translated so that it passes through multiple sites, while an edge with an incommensurate orientation can pass through at most one site. The commensurate edges give rise to two subcases we refer to as {\em congruent} and {\em incongruent}. While the incommensurate and congruent orientations have translation invariant edge energies, the edge energy for the incongruent orientations is multi-valued. An edge with a congruent orientation can be translated so that it passes through either no sites or sites with both A-oriented and B-oriented bonds, alternating between the two, while an edge with an incongruent orientation can only pass through no sites or sites with the same bond orientations. These results are summarized in Figure 2. The black curve is the edge energy that applies to the uncountably infinite number of incommensurate and the countably infinite set of congruent edges. This edge energy is exactly $1/3$ what one would find for a nearest neighbor model based on the related Bravais lattice with an additional lattice point in the center of each hexagon. This curve is discontinuous at the incongruent orientations, where one finds two possible values of the edge energy depending on the placement of the facet in the normal direction. It can be shown that the average of these two values again lies on the black curve. Finally, the red curve is the edge energy derived in Liu et al. \cite{LDY} by assuming edges that consist of only armchair and zigzag components. This curve is a lower bound on the edge energy, and is formed by continuously interpolating between the lower of the two possible values one can obtain with a zigzag orientation and the single value for the armchair orientation. Note that if this simple, interpolated edge energy function was used to evolve a non-equilibrium shape, one would not expect any qualitative difference in the dynamics compared to that for a material with a triangular lattice structure, i.e. both edge energies are a six-petaled flower. \begin{figure} \includegraphics[width=\linewidth]{bondlines2} \caption{\label{X} The hexagonal lattice with a single nearest-neighbor bond $\mathbf{v}$ and its corresponding set of bondlines. The blue reference line $\hat{y}=\sqrt{3}x$ is used to define the sequence $\delta_n$ referred to in the text. } \end{figure} To get these results, we follow arguments that generalize those of Mackenzie et. al. \cite{MMN}, i.e. we compute a contribution to the edge energy for each bond orientation ${\bf v}$ and sum the result over all bonds $V$. To this end, consider the set of all {\em bond-lines} parallel to $\mathbf{v}$ that pass through lattice sites. Note that the bonds only cover $\frac{1}{3}$ of each bond-line, with a repeating pattern of one bond followed by two bond-less segments (see Figure 3). Thus, the bonds and bond-line structure are periodic in the vertical direction with period $3a$, where $a$ is the bond length. We will make use of a Cartesian coordinate system where the y-axis is aligned with the bond and the origin is placed at the lower end of an arbitrary bond. It is also convenient to introduce a reference line $\hat{y}=\sqrt{3} x$ and measure distance in the direction of $\mathbf{v}$ relative to this line, $\Delta=y-\hat{y}$. Next, we consider an arbitrary edge $y=sx+b$ with slope $s$ and intercept $b$. Between any two adjacent bond-lines, this line rises a distance $r=\frac{\sqrt{3}}{2}as$ and intersects the $n^{th}$ bond-line, given by $x=n\frac{\sqrt{3}}{2}a$, at $y_n=rn+b$. Relative to the reference line defined above, this produces the sequence $\Delta_n=y_n-\hat{y}_n=(r-\frac{3a}{2})n+b$. We will need to consider y-values mapped to the interval $[0,3a]$ via congruence modulo $3a$. It will therefore be convenient to scale distance so that $a=\frac{1}{3}$ and this congruence operation corresponds to taking the fractional part of y-values. After scaling, half of the bonds are congruent to the interval $[0,1/3]$ while the other half are congruent to the interval $[1/2,5/6]$. Relative to the reference line, the scaled bond locations will have fractional parts in the interval $[0,1/3]$. In order to determine the intersections with bonds, it is sufficient to consider the fractional part of the sequence $\delta_n={\mbox{Frac}(\Delta_n)}$. An edge orientation is commensurate with respect to bond $\mathbf{v}$ if $r\in \mathbb{Q}$ and {\em incommensurate} otherwise. For a given edge orientation, one can show that all of the bonds $\mathbf{v}\in V$ fall into the same category. For incommensurate orientations, the edge energy is defined as the mean number of bonds cut across the entire edge. A natural hypothesis for this mean is $\gamma(\hat{\mathbf{n}})=\frac 13\Gamma(\hat{\mathbf{n}})$, where $\Gamma$ is the edge energy for the related triangular lattice with additional nodes in the center of each hexagon, as the graphene lattice is formed by removing $\frac{2}{3}$ of these bonds. The triangular lattice is Bravais, so that $\Gamma$ can be computed from (1). To see that this is correct, we first consider the case $b=0$, producing the sequence $\delta_n=\mbox{Frac}[(r-\frac{1}{2})n]$. Since $r$ is irrational, so is $r-\frac{1}{2}$ and Weyl's equidistribution theorem \cite{weyl} then indicates that the sequence is uniformly distributed. This implies that one third of the bond-line intersections correspond to broken bonds. For $b \neq 0$, $\mbox{Frac}[(r-\frac{1}{2})n+b] = \mbox{Frac}[(r-\frac{3a}{2})n+\mbox{Frac}(b)]$, from which we can see that broken bond density in the incommensurate case is translation invariant, as the portion of the uniform distribution of $\delta_n$ that is shifted out of the interval $[0,1]$ on the right simply reemerges on the left. The same result holds for each $\mathbf v \in {\rm V}$ and therefore \begin{equation} \gamma(\hat{\mathbf{n}})=\frac{1}{3}\Gamma(\hat{\mathbf{n}})=\frac{2}{3\sqrt{3}}\sum_{i=1}^{3}|\hat{\mathbf{n}}\cdot\mathbf{v}_i, |\end{equation} where we have expressed the result using twice the contribution from the three distinct A-bond orientations $\mathbf{v}_{A1}=(\sqrt{3}/2,1/2), \mathbf{v}_{A2}=(-\sqrt{3}/2,1/2), \mathbf{v}_{A3}=(0,1)$, as the B-bonds give rise to the same contributions. The sequence $\delta_n$ is periodic whenever $r$ is rational, repeating every $N$ bond-lines, where $N$ is the smallest even integer such that $Nr \in \mathbb{Z}$. When this integer $N$ is divisible by three, we refer to the orientation as {\em congruent}, as one can show that congruence applies to all bonds $\mathbf{v}\in V$ or none at all. Congruent orientations have the same translation invariant broken bond density as the incommensurate orientations. To see this, note that the $N$ bond-line intersections are evenly spaced over one period of length $p=rN$ and that the corresponding values of $\delta_n$, though re-ordered, are uniformly spaced over the interval $[0,1]$, with one third of these corresponding to a bond crossing. The remaining commensurate cases have a repeating sequence $\delta_n$ with $N \equiv1$ or $2\mod 3$. In these cases, which we refer to as {\em incongruent}, there is no way to have exactly one third of the $\delta_n$ falling into the first third of $(0,1]$. Instead, the number of intersections with bonds per period will round up or down to the nearest integer that is divisible by 3. If $N \equiv 1\mod 3$, the lesser of the two edge energies is given by $$\gamma_{\mathbf {v}}^-(\hat{\mathbf{n}})=\frac{n-1}{3p}=\frac{p\Gamma_{\mathbf {v}}(\hat{\mathbf{n}})-1}{3p}=\frac13\Gamma_{\mathbf {v}}(\hat{\mathbf{n}})-\frac{1}{3p}, $$ and the greater of the two edge energies is $$\gamma_{\mathbf {v}}^+(\hat{\mathbf{n}})=\frac13\Gamma_{\mathbf {v}}(\hat{\mathbf{n}})+\frac{2}{3p}.$$ Which of the two applies depends on the intercept $b$ of the dividing line, and the edge energy fails to be translation invariant for these orientations. The transition between the two values takes place whenever the edge crosses a lattice site. If $N\equiv 1\mod 3$, this occurs whenever $\text{Frac}(b)=k/N$ or $k/N+1/(3N)$ with $k\in\mathbb{Z}$. And if $N\equiv 2\mod 3$, when $\text{Frac}(b)=k/N$ or $k/N+2/(3N)$. We will refer to the set of edges with $b$ between any two of these transition values as a {\em band}. Note that all edges within a single band share the same energy value. There are two possible values for any edge orientation, with bands alternating between the two and one of the bands being twice as wide as the other. If $N\equiv 2\mod 3$, the two edge energy values are $$\gamma_{\mathbf {v}}^-(\hat{\mathbf{n}})=\frac13\Gamma_{\mathbf {v}}(\hat{\mathbf{n}})-\frac{2}{3p},\; \gamma_{\mathbf {v}}^+(\hat{\mathbf{n}})=\frac13\Gamma_{\mathbf {v}}(\hat{\mathbf{n}})+\frac{1}{3p}.$$ The total edge energy for an edge within a thin band is given by \begin{eqnarray} \gamma_1(\hat{\mathbf{n}})&=&\sum_{N\equiv 1\bmod 3}\gamma_{\mathbf{v}_i}^+(\hat{\mathbf{n}})+\sum_{N\equiv 2\bmod 3}\gamma_{\mathbf{v}_i}^-(\hat{\mathbf{n}}) \nonumber \\ &=&\frac13\Gamma(\hat{\mathbf{n}})+\frac{2}{3p}(m_1-m_2) \end{eqnarray} where $m_j$ is the number of bonds in $\{\mathbf{v}_i\}$ for which $N\equiv j\bmod 3$. Similarly, the edge energy for a edge within a thick band is \begin{equation} \gamma_2(\hat{\mathbf{n}})=\frac13\Gamma(\hat{\mathbf{n}})+\frac{1}{3p}(m_2-m_1). \end{equation} Note that $$ \lim_{p \rightarrow \infty} \gamma_1 =\lim_{p \rightarrow \infty} \gamma_1 = \frac{1}{3}\Gamma, $$ so that in the limit where the period of the bond intersections becomes large, both of the values for the incongruent orientations converge to the value for incommensurate/congruent orientations. Let $\gamma^-(\hat{\mathbf{n}})=\min\{\gamma_1(\hat{\mathbf{n}}),\gamma_2(\hat{\mathbf{n}})\}$ and $\gamma^+(\hat{\mathbf{n}})=\max\{\gamma_1(\hat{\mathbf{n}}),\gamma_2(\hat{\mathbf{n}})\}$. These two functions are then the minimum and maximum energy values for the orientation $\hat{\mathbf{n}}$ shown in Figure 2. In particular, the zigzag orientations minimize $\gamma^-$ over all incongruent orientations. If we perform the classical Wulff construction using $\gamma^-$ as the edge energy, we get a hexagon with zigzag orientation edges, coinciding with the graphene equilibrium shape. Further work examining the impact of these observations on the nonequilibrium evolution of crystals would be of interest. In particular, one would like to know if arbitrarily shaped crystals with a hexagonal/graphene crystal structure exhibit behavior that is qualitatively distinct from identically shaped crystals with a triangular lattice structure. A possible mechanism for such differences may be provided by the fact that a perturbation to the energy minimizing orientation for the hexagonal/graphene crystal will give rise to a jump in the edge energy, while a perturbation for the energy minimizing orientation for a crystal with a Bravais lattice structure will not. Simulations using molecular dynamics, kinetic Monte Carlo and/or phase-field crystal would seem well suited to exploring this possibility. \begin{acknowledgments} We wish to acknowledge support from NSF-DMS-1613729. \end{acknowledgments}
\section{Introduction} A word is an element in a free group. Given a word $w=w(x_1,\ldots,x_d)\in F_d$ and a group $\Gamma$, we have the word map $w:\Gamma ^d \rightarrow \Gamma$ defined by substitution. The set of $w$-values is the set \[ w(\Gamma) := \left\{ w(g_1,\ldots,g_d), w(g_1,\ldots,g_d) ^{-1} \mid g_i\in \Gamma \right\}. \] Sets of word values in many families of groups were extensively studied. See the book \cite{Seg} and the references therein for results on free and hyperbolic groups, nilpotent groups, $p$-adic analytic groups, and general finite groups (the last part is the main ingredient in the proof by Nikolov and Segal of Serre's conjecture that any finite-index subgroup in a finitely generated pro-finite group is open). We briefly describe some of the results that are relevant to this work. Sets of word values in algebraic groups are large: Borel proved in \cite{Bo} that if $w$ is a non-trivial word and $G$ is a connected simple algebraic group defined over an algebraically closed field $k$, then $w(G(k))$ contains a Zariski-open dense set. For Lie groups, the situation is more complicated. For example, Thom \cite[Corollary 1.2]{Th} and Lindenstrauss (unpublished) proved that sets of word values in the unitary group $U_n$ can have arbitrarily small radii. Nevertheless, Borel's theorem implies that, for any semisimple Lie group $\mathbf{G}$ and any non-trivial word $w$, the set of word values $w(\mathbf{G})$ contains an open ball. It follows that, if $\mathbf{G}$ is compact, there is a constant $C$ (depending on $\mathbf{G}$ and $w$) such that any element of $\mathbf{G}$ is a product of at most $C$ word values. For arithmetic groups, sets of word values are very mysterious, even for simple words. For example, for every $n \ge 3$, the question whether every element of $\SL_n(\mathbb{Z})$ is a commutator is widely open. We do, however, know that the set of commutators in $\SL_n(\mathbb{Z})$ is quite large: Dennis and Vasserstein proved in \cite{DV} that every element in $\SL_n(\mathbb{Z})$ is a product of at most six commutators if $n$ is large enough. A remarkable theorem of Larsen and Shalev \cite{LS} says that a stronger statement holds for finite simple groups: for every non-trivial word $w$, if $\Gamma$ is a large enough finite simple group, then every element of $\Gamma$ is a product of two word values. Our first result generalizes the theorem of Dennis and Vasserstein's in a form similar to the theorem of Larsen and Shalev: \begin{theorem} \label{thm:intro.fix.w} There is a constant $C$ with the following property: for any word $w$, there is $n_w$ such that, for all $n>n_w$, every element of $\SL_n(\mathbb{Z})$ is a product of at most $C$ elements of $w(\SL_n(\mathbb{Z}))$. In fact, $C$ can be taken to be equal to 87. \end{theorem} In general, we cannot expect the subgroup generated by $w(\SL_n(\mathbb{Z}))$ to be equal to $\SL_n(\mathbb{Z})$. We define the width of $w$ in $\SL_n(\mathbb{Z})$ to be the minimum of the numbers $C$ such that any element of $\langle w(\SL_n(\mathbb{Z})) \rangle$ is a product of at most $C$ elements of $w(\SL_n(\mathbb{Z}))$. If no such number exists, we say that the width of $w$ is infinite. Our next theorem provides uniform bounds for width, for a fixed $n$: \begin{theorem}\label{thm:intro.fix.n} For any $n \geq 3$ there is an integer $C=C(n)$ such that, for any word $w$, the width of $w$ in $\SL_n(\mathbb{Z})$ is less than $C$. \end{theorem} \begin{remark} Theorems \ref{thm:intro.fix.w} and \ref{thm:intro.fix.n} are optimal in the following sense: for every $C$ there are infinitely many pairs $(n,w)$ such that the width of $w$ in $\SL_n(\mathbb{Z})$ is greater than $C$. This easily follows from \cite[Theorem 1]{Lub}. \end{remark} We do, however, have the following result which is uniform in $n$ and $w$: \begin{theorem} \label{thm:intro.congruence.subgroup} There is a constant $C$ such that, for every any non-trivial word $w$, there is $d=d(w)\in \mathbb{Z}$ such that for every $n \ge 3$, every element of the $d$-congruence subgroup $\SL_n(\mathbb{Z};d)$ is a product of at most $C$ elements of $w(\SL_n(\mathbb{Z}))$. If $n$ is large enough, $C$ can be taken to be equal to 80. \end{theorem} \begin{remark} Let $O$ be the ring of integers in a number field, let $S$ be a finite set of primes of $O$, and let $O_S$ denote the localization of $O$ by $S$. The proofs below also show similar bounds for $\SL_n(O_S)$, but the bounds obtained by these proofs depend on $O_S$. While we do not know whether widths of words in $\SL_n(O_S)$ are bounded uniformly in $O_S$, Corollary 4.6 of \cite{MRS} gives some indication that this is indeed the case. In another direction, we do not even know whether words in other higher-rank non-uniform lattices (especially non-split) have finite width. We exclude lattices of rank one from the discussion since these include free groups and hyperbolic groups for which the the width of every non-trivial word is infinite, see \cite{MN}. \end{remark} \begin{remark} Let $\Gamma$ be an irreducible arithmetic lattice in a higher-rank semisimple group $G$, and assume that there is a compact semisimple Lie group $K$ and a dense embedding $\pi : \Gamma \hookrightarrow K$ (this implies that $\Gamma$ is cocompcat in $G$). By the result of Thomas and Lindenstrauss mentioned above, there are words $w\in F_2$ such that $\pi (w(\Gamma))$ is contained in an arbitrarily small neighborhood of the identity. It follows that the width of $w$ can be arbitrarily large. This means that the analog of Theorem \ref{thm:intro.fix.n} fails for $\Gamma$. Noting that the image under $\pi$ of any finite-index subgroup of $\Gamma$ is dense, we get that Theorem \ref{thm:intro.congruence.subgroup} also fails. We do not know whether every word has finite width in higher-rank cocompact lattices, nor whether the analog of Theorems \ref{thm:intro.fix.w} holds for the class of cocompact lattices. \end{remark} We briefly sketch the proofs of the main theorems. For $n \geq 2$ and $q\in \mathbb{Z}$, denote by $U_n(\mathbb{Z};q)$ the subgroup of all unipotent upper triangular matrices in $\SL_n(\mathbb{Z})$ whose off-diagonal entries are divisible by $q$. Denote similarly $L_n(\mathbb{Z};q)$, replacing upper triangular by lower triangular. Finally, for a group $G$, a subset $X \subset G$, and a natural number $n$, we denote $X^n=\left\{ x_1 \cdots x_n \mid x_i\in X\cup \left\{ 1 \right\} \right\}$. The main step is to prove the following theorem: \begin{theorem} \label{thm:intro.bounded.generation} There is a constant $C$ such that, for any $n \geq 3$ and any $q\in \mathbb{Z}$, $(U_n(\mathbb{Z};q)L_n(\mathbb{Z};q))^C$ is a finite-index subgroup of $\SL_n(\mathbb{Z})$. \end{theorem} Theorem \ref{thm:intro.bounded.generation} is proved by induction on $n$ in \S\ref{sec:ntro.bounded.generation}. The case $n=3$ is essentially due to Carter, Keller, and Paige (see \cite{WM} for an exposition of the proof). The argument for induction step follows Dennis and Vaserstein \cite{DV}. Given Theorem \ref{thm:intro.bounded.generation}, we deduce Theorem \ref{thm:intro.congruence.subgroup} without the explicit bound on $C$ in \S\ref{sec:congruence}. A short arjument implies that $w(\SL_3(\mathbb{Z}))^2$ contains an elementary matrix. Using various embeddings of $\SL_3(\mathbb{Z})$ into $\SL_n(\mathbb{Z})$, we show that $w(\SL_n(\mathbb{Z})^{C'}$ contains $U_n(\mathbb{Z};q)$ and $L_n(\mathbb{Z};q)$ for some $C$ and $q$. Theorems \ref{thm:intro.fix.w} and \ref{thm:intro.fix.n} follow from Theorem \ref{thm:intro.congruence.subgroup}, a $p$-adic open mapping theorem, and the Larsen--Shalev theorem \cite{LS}. \subsection{Acknowledgements} The authors thank Andrei Rapinchuk and Ariel Karelin for helpful conversations. They are also thankful to the anonymous referee for improving the bounds of Theorems \ref{thm:intro.fix.w} and \ref{thm:intro.congruence.subgroup} and for simplifying the proof of Lemma \ref{lem:ad.irr}. N.A. was partially supported by NSF grant DMS-1303205 and BSF grant 2012247. C.M. was partially supported by BSF grant 2014099 and ISF grant 662/15. \section{Proof of Theorem \ref{thm:intro.bounded.generation}}\label{sec:ntro.bounded.generation} In this section, we prove Theorem \ref{thm:intro.bounded.generation}. We start by setting up the notations and recalling some facts. \begin{definition} Let $A$ be a commutative ring with unit, let $I$ be an ideal in $A$, and let $n \geq 2$ be an integer. \begin{enumerate} \item $\SL_n(A;I)$ is the subgroup of $\SL_n(A)$ consisting of the matrices which are congruent to the identity matrix modulo the ideal $I$. The subgroup $\SL_n(A;I)$ is called the $I$-congruence subgroup of $\SL_n(A)$. \item $U_n(A;I)$ is the subgroup of $\SL_n(A;I)$ consisting of unipotent upper triangular matrices. \item $L_n(A;I)$ is the subgroup of $\SL_n(A;I)$ consisting of unipotent lower triangular matrices. \item In the case where $A=\Bbb Z$ and $I=q\Bbb Z$ we sometimes write $\SL_n(\Bbb Z;q)$, $U_n(\Bbb Z;q)$ and $L_n(\Bbb Z;q)$ instead of $\SL_n(\Bbb Z;I)$, $U_n(\Bbb Z;I)$ and $L_n(\Bbb Z;I)$. \end{enumerate} \end{definition} \begin{definition} Let $A$ be a commutative ring with a unit, let $I$ be an ideal in $A$, and let $n \geq 2$ be an integer. \begin{enumerate} \item For $x\in A$ and $1 \leq i \neq j \leq n$, let $e_{i,j}(x)$ denote the $n$-by-$n$ matrix with 1s along the diagonal, $x$ in the $(i,j)$-entry, and zero in all other entries. \item Denote by $E(n,A;I)$ the subgroup generated by the elementary matrices $e_{i,j}(x)$, for $x\in I$. We will write $E(n,A)$ instead of $E(n,A;A)$. \item Denote by $E^\triangleleft(n,A;I)$ the normal subgroup of $E(n,A)$ generated by $E(n,A;I)$. \item In the case where $A=\Bbb Z$ and $I=q\Bbb Z$ we sometimes write $E(n,\Bbb Z;q)$ and $E^\triangleleft(n,\Bbb Z;q)$ instead of $E(n,\Bbb Z;I)$ and $E^\triangleleft(n,\Bbb Z;I)$. \end{enumerate} \end{definition} The following is \cite[Proposition 2]{Tits}: \begin{proposition}[Tits] \label{prop:Tits} If $A$ is a commutative ring, $I$ is an ideal of $A$, and $n \geq 3$, then $E^{\triangleleft}(n,A;I^2) \subseteq \langle U_n(A ; I) \cup L_n(A ; I)\rangle$. \end{proposition} The following is proved in \cite{WM}: \begin{theorem}[Carter-Keller-Paige] \label{prop:CKP}\label{prop:CKP} There is a first-order statement $\varphi$ in the language of rings with the following properties: \begin{enumerate} \item $\varphi$ holds in $\mathbb{Z}$. \item \label{it:bdd.gen.E} If $A$ is a ring satisfying $\varphi$ and $I$ is an ideal of $A$, then $[\SL_n(A;I):E^{\triangleleft}(n,A;I)] \leq 2 \cdot 8!$. \end{enumerate} \end{theorem} \begin{remark} Theorem \ref{prop:CKP} is proved in \cite{WM}. More precisely, if we take $\varphi$ to be the conjunction of the conditions $SR_{1\frac12}$, $Gen(2 \cdot 8!,1)$, $Exp(2 \cdot 8!,2)$ (see \cite[Definitions 2.10, 3.2, 3.6]{WM}), then \cite[Lemma 2.13, Corollary 3.5, Theorem 3.9]{WM} imply that $\mathbb{Z}$ satisfies $\varphi$ and \eqref{it:bdd.gen.E} is \cite[Theorem 3.12]{WM}. \end{remark} \begin{corollary}\label{claim:bdd.gen.2} There is a constant $C=C(n)$ such that the following holds: For any $q \in \Bbb N^+$, there are $g_1,\ldots,g_{2 \cdot 8!}\in \SL_n(\Bbb Z;q^2)$ such that $\SL_n(A;q^2)$ is contained in the union of the translations by $g_1,\ldots,g_{2 \cdot 8!}$ of the set $\left( U_n(\Bbb Z;q) L_n(\Bbb Z;q) \right)^{C}$. \end{corollary} \begin{proof} Let $A$ is a ring which is elementarily equivalent to $\mathbb{Z}$ (i.e., satisfies the same first order sentences as $\Bbb Z$) and let $I$ be an ideal of $A$. Proposition \ref{prop:Tits} and Theorem \ref{prop:CKP} imply that \begin{equation}\label{eq:ele} \left[ \SL_n(A;I^2) : \SL_n(A;I^2) \cap \langle U_n(A;I) L_n(A;I) \rangle \right] \leq 2 \cdot 8!. \end{equation} Assume the Corollary is false. Then, for every $k \in \Bbb N$, there are $q_k \in \Bbb N^+$ and matrices $g_{k,1},\ldots,g_{k,2 \cdot 8!+1} \in \SL_n(\Bbb Z ; q_k^2)$ such that $(g_{k,i}) ^{-1} g_{k,j} \notin \left( U_n(\Bbb Z ; q_k) L_n(\Bbb Z ; q_k) \right) ^k$ if $i\neq j$. Choose a nonprincipal ultrafilter $\mathcal{U}$ on $\mathbb{N}$, and let $A$ be the ultrapower of $\Bbb Z$ over $\mathcal{U}$. Then $A$ is elementarily equivalent to $\mathbb{Z}$ and $\SL_n(A)$ is isomorphic to the ultrapower of $\SL_n(\Bbb Z)$ over $\mathcal{U}$. Let $I$ be the ideal of $A$ represented by $\prod_k q_k\Bbb Z $, and for every $1 \le i \le k$, let $g_i\in \SL_n(A;I^2)$ be the element represented by $(g_{k,i})_k$. Then $g_1,\ldots,g_{2 \cdot 8!+1}$ belong to different cosets of $\langle U_n(A;I) L_n(A;I) \rangle$, contradicting Equation \eqref{eq:ele}. \end{proof} The following two technical lemmas will be needed in the proof of Proposition \ref{claim:bdd.gen.3} below. \begin{lemma} \label{lem:double} Let $G$ be a group, let $X \subset G$ be a symmetric set such that there are $d$ translates of $X$ that cover $G$. Then $X^{4d+2}$ is a group. \end{lemma} \begin{proof} Denote $Y=X^2$. Then $1\in Y$ and there are $d$ translates of $Y$ that cover $G$. Since $1 \in Y$, $Y^k \subseteq Y^{k+1}$ for every $k$. It is enough to show that $Y^{k}=Y^{k+1}$ for some $k \leq 2d+1$. Suppose that $G=\cup_{i=1}^d g_iY$ for some $g_1,\ldots,g_d \in G$. We can assume that $g_1=1$. For every $k$, if $Y^{k} \neq Y^{k+1}$, choose $h\in Y^{k+1} \smallsetminus Y^k$. By assumption, there is $i$ such that $h\in g_iY$. Then $g_i\in Y^{k+2}$ but $g_i \notin Y^k$. By induction we see that if $Y^{2k-1} \neq Y^{2k}$ for some $1 \le k$, then $Y^{2k+1}$ contains at least $k$ distinct $g_i$s. This implies that $Y^{2d+1}=Y^{2d+2}$. \end{proof} \begin{lemma}\label{lem:generation} Let $K \subseteq H \subseteq G$ be groups such that $[H:K] < \infty$. Let $X \subseteq G$ be a symmetric subset. Assume that $HX=G$ and that $K \subseteq X$. Then, $X^{4[H:K]}$ is a subgroup. \end{lemma} \begin{proof} Since $1 \in K \subseteq X$, the sets $\left( X^n K \cap H \right) \subseteq H$ are non-decreasing. Hence, there is $n \leq 4[H:K]-3$ such that $$X^{n} K \cap H=X^{n+1} K \cap H=X^{n+2} K \cap H=X^{n+3} K \cap H=X^{n+4} K \cap H .$$ Since $HX=G$, we have $X^{n+3} \subseteq \left( X^{n+4} \cap H \right) X $. Thus, \[ X^{n+3} \subseteq \left( X^{n+4} \cap H \right) X \subseteq \left( X^{n+4} K \cap H \right) X \subseteq \left( X^{n} K\cap H \right) X \subseteq X^{n+2}, \] so $X^{n+2}$ is a group. \end{proof} \begin{proposition}\label{claim:bdd.gen.3} There is a constant $D=D(n)$ such that, for any $q \in \Bbb N^+$, the set $\left( U_n(\Bbb Z;q) L_n(\Bbb Z;q) \right)^{D}$ is a group, and, therefore, equals to $\langle U_n(\Bbb Z;q) L_n(\Bbb Z;q) \rangle$. \end{proposition} \begin{proof} For any $k$, the set $(L_n(\Bbb Z;q) U_n(\Bbb Z;q))^{k+1}$ contains the symmetric subset $(L_n(\Bbb Z;q) U_n(\Bbb Z;q))^k \cup (U_n(\Bbb Z;q) L_n(\Bbb Z;q))^k$. Corollary \ref{claim:bdd.gen.2} and Lemma \ref{lem:double} imply that there is a constant $D'$ such that $(L_n(\Bbb Z;q) U_n(\Bbb Z;q))^{D'}$ contains a subgroup $S(I)$ of $\SL_n(\Bbb Z;q^2)$ of index at most $2 \cdot 8!$. Note that $\SL_n(\Bbb Z,q)/\SL_n(\Bbb Z,q^2)$ is abelian so $\SL_n(\Bbb Z,q^2)L_n(\Bbb Z;q) U_n(\Bbb Z;q)$ is a subgroup of $\SL_n(\Bbb Z)$. The desired result follows by applying Lemma \ref{lem:generation} to $K=S(I)$, $H=\SL_n(\Bbb Z;q^2)$, $G=\SL_n(\Bbb Z,q^2)L_n(\Bbb Z;q) U_n(\Bbb Z;q)$, and $X=(L_n(\Bbb Z;q) U_n(\Bbb Z;q))^{D'} \cup (U_n(\Bbb Z;q) L_n(\Bbb Z:q))^{D'} \subseteq (L_n(\Bbb Z;q) U_n(\Bbb Z;q))^{D'+1}$: \end{proof} In order to prove Theorem \ref{thm:intro.bounded.generation} we have to show that the constant $D(n)$ in Proposition \ref{claim:bdd.gen.3} can be made independent of $n$. The following technical generalization of Proposition \ref{prop:Tits} is needed. \begin{lemma}\label{lemma: Gen.Tits} Let $n \ge 3$ and let $I$ be an ideal in a commutative ring $A$. Then $E^\triangleleft(n+1; A ,I^2)$ is contained in the subgroup $$K(I):= \langle e_{i,j}(a) \mid 1 \le i \neq j \le n+1 , \{i,j\}\neq \{1,n+1\} , a \in I \rangle.$$ \end{lemma} \begin{proof} We follow the proof of Proposition \ref{prop:Tits} in \cite{Tits}. Let $1 \le i \ne j \le n+1$, $1 \le r \ne s \le n+1$ and $a,b\in A$. Recall the following relations: \begin{equation}\label{eq:rel} \begin{cases} e_{r,s}(b)e_{i,j}(a)e_{r,s}(b)^{-1}=e_{i,j}(a)e_{i,s}(-ab) & \text{ if } j = r \text{ and } i \ne s \\ e_{r,s}(b)e_{i,j}(a)e_{r,s}(b)^{-1}=e_{i,j}(a)e_{r,j}(ab) & \text{ if } j \ne r \text{ and } i = s \\ e_{r,s}(b)e_{i,j}(a)e_{r,s}(b)^{-1}=e_{i,j}(a) & \text{ if } j \ne r \text{ and } i \ne s \end{cases}. \end{equation} For every $1 \le i \ne j \le n+1$, denote $F_{i,j}(I^2):=\langle e_{i,j}(a),e_{j,i}(a) \mid a \in I^2 \rangle $. Let $F_{i,j}^\triangleleft(I^2)$ be the minimal normal subgroup of $F_{i,j}:= F_{i,j}(A)$ which contains $F_{i,j}(I^2)$. Define $F^\triangleleft (I^2):=\langle F^\triangleleft_{i,j}(I^2) \mid 1 \le i \ne j \le n+1\rangle$. Equation \eqref{eq:rel} implies that for every $1 \le i \neq j \le n+1$ and every $a \in A$, $e_{i,j}(a)F^\triangleleft(I^2)e_{i,j}(a)^{-1}=F^\triangleleft(I^2)$. Thus $F^\triangleleft(I^2)$ is a normal subgroup of $E(n+1,A)$ containing all $e_{i,j}(a)$, $a\in I^2$, so it must be equal to $E^\triangleleft(n+1,A,I^2)$. Thus, in order to finish the proof it is enough to show that for every $1 \le i < j \le n+1$, $F^\triangleleft_{i,j}(I^2) \subseteq K(I)$. Let $E^+(n,A;I)$ and $E^-(n,A;I)$ be the images of $E(n,A,I)$ in $\SL_{n+1}(A)$ under the embeddings $M \mapsto \left(\begin{matrix} M &0 \\ 0 & 1 \end{matrix}\right)$ and $M \mapsto \left(\begin{matrix} 1 &0 \\ 0 & M \end{matrix}\right)$. By applying Proposition \ref{prop:Tits} with respect to $E^+(n,A;I)$ and $E^-(n,A;I)$, we see that $K(I)$ contains $F^\triangleleft_{i,j}(I^2)$ for every $1 \le i < j \le n+1$ such that $(i,j)\ne (1,n+1)$. Equation \eqref{eq:rel} implies that $K(I)$ in normalized by $e_{1,n+1}(a)$ and $e_{n+1,1}(a)$ for every $a \in R$. For every $a,b \in I$, $e_{1,n+1}(ab)=[e_{1,2}(a),e_{2,n+1}(-b)]\in K(I)$ and $e_{n+1,1}(ab)=[e_{n+1,2}(a),e_{2,1}(-b)]\in K(I)$. Thus, $F^\triangleleft_{1,n+1}(I^2) \le K(I)$. \end{proof} The next Lemma is the key ingredient in the proof of Theorem \ref{thm:intro.bounded.generation}. \begin{lemma}\label{lem:up} Let $n \ge 3$ and $q \in \Bbb N^+$ and assume that $\left( U_n(\mathbb{Z};q) ) L_n(\mathbb{Z};q) ) \right)^{D}= \langle U_n(\mathbb{Z};q) L_n(\mathbb{Z};q) \rangle $. Then for every $m \ge n$, $\left( U_m(\mathbb{Z};q) ) L_m(\mathbb{Z};q) ) \right)^{D}= \langle U_m(\mathbb{Z};q) L_m(\mathbb{Z};q) \rangle $. \end{lemma} \begin{proof} The proof follows the proof of Lemma 7 of \cite{DV} and is by induction on $m$. The base case $m=n$ is clear. It remains to show that if the claim is true for some $m \ge 3$ then it is also true for $m+1$. Let $T:=\left( U_{m+1}(\Bbb Z ;q) L_{m+1}(\Bbb Z ; q) \right) ^D$ and $H=\left\{ g\in \SL_{m+1}(\Bbb Z) \mid gT=T \right\}$. Since $H$ is a group, it is enough to prove that $H$ contains both $U_{m+1}(\Bbb Z ; q)$ (which is clear) and $L_{m+1}(\Bbb Z ; q)$. We embed $L_m(\Bbb Z;q)$ and $U_m(\Bbb Z ;q)$ in $\SL_{m+1}(\Bbb Z; q)$ by the embedding $M \mapsto \left(\begin{matrix} M &0 \\ 0 & 1 \end{matrix}\right)$. We denote the abelian group $\langle e_{i,m+1}(a) \mid 1 \le i \le m,\ a \in q\Bbb Z \rangle$ by $C_{m+1}(\Bbb Z; q)$ and the abelian group $\langle e_{m+1,i}(q) \mid 1\le i \le m,\ a \in q\Bbb Z \rangle$ by $R_{m+1}(\Bbb Z; q)$. We have that $U_{m+1}(\Bbb Z; q)=U_m(\Bbb Z; q) \ltimes C_m(\Bbb Z; q)$, $L_{m+1}(\Bbb Z; q)=L_m(\Bbb Z; q) \ltimes R_m(\Bbb Z; q)$, and that $U_m(\Bbb Z; q)$ and $L_m(\Bbb Z; q)$ each normalizes both $C_m(\Bbb Z; q)$ and $R_m(\Bbb Z; q)$. The induction hypothesis implies that: \[ L_m(\Bbb Z: q) \left( U_{m+1}(\Bbb Z: q)L_{m+1}(\Bbb Z; q) \right) ^D = \] \[ = L_m(\Bbb Z: q) \left( U_m(\Bbb Z: q) C_m(\Bbb Z: q) L_m(\Bbb Z: q) R_m(\Bbb Z: q) \right) ^D = \] \[ = L_m(\Bbb Z: q) \left( U_m(\Bbb Z: q) L_m(\Bbb Z: q) \right) ^D \cdot \left(C_m(\Bbb Z: q)R_m(\Bbb Z: q)\right)^D = \] \[ =\left( U_m(\Bbb Z: q) L_m(\Bbb Z: q) \right) ^D \cdot \left(C_m(\Bbb Z: q) R_m(\Bbb Z: q)\right)^D= \] \[ =\left( U_m(\Bbb Z: q) C_m(\Bbb Z: q) L_m(\Bbb Z: q) R_m(\Bbb Z: q) \right) ^D = \] \[ =\left( U_{m+1}(\Bbb Z: q)L_{m+1}(\Bbb Z: q) \right) ^D. \] Hence, $L_m(\Bbb Z: q) \subseteq H$, i.e., for every $1 \leq i < j \leq m$ and $a \in I$, we have $e_{j,i}(a) \in H$. Arguing similarly using the embedding $M \mapsto \left(\begin{matrix} 1 &0 \\ 0 & M \end{matrix}\right)$, we get that $e_{j,i}(a)\in H$, for every $2 \leq i < j \leq m+1$ and $a \in I$. It remains to show that for every $a \in I$, $e_{m+1,1}(a)\in H$. The main theorem of \cite{Men} says that $E^\triangleleft(n,\Bbb Z,k)=\SL_n(\Bbb Z,k)$ for every $k \in \Bbb N^+$. Thus, Lemma \ref{lemma: Gen.Tits} implies that $\SL_{m+1}(\Bbb Z;q^2)=E^\triangleleft(m+1,\Bbb Z; q^2) \subseteq H$. Since $\SL_{m+1}(\Bbb Z;q)/\SL_{m+1}(\Bbb Z;q^2)$ is abelian, $e_{m+1,1}(a)U_{m+1}(\Bbb Z: q) e_{m+1,1}(a) ^{-1} \subseteq \SL_{m+1}(\Bbb Z; q^2) \cdot U_{m+1}(\Bbb Z: q)$, for every $a \in I$. It follows that, for every $a \in I$, \[ e_{m+1,1}(a) \left( U_{m+1}(\Bbb Z: q)L_{m+1}(\Bbb Z: q) \right) ^D = \] \[ = e_{m+1,1}(a) U_{m+1}(\Bbb Z: q) e_{m+1,1}(a) ^{-1} e_{m+1,1}(a) L_{m+1}(\Bbb Z: q) \left( U_{m+1}(\Bbb Z: q)L_{m+1}(\Bbb Z: q) \right) ^{D-1} \subseteq \] \[ \subseteq \SL_{m+1}(\Bbb Z; q^2) \cdot U_{m+1}(\Bbb Z: q) L_{m+1}(\Bbb Z: q) \left( U_{m+1}(\Bbb Z: q)L_{m+1}(\Bbb Z: q) \right) ^{D-1} = \] \[ =\left( U_{m+1}(\Bbb Z: q)L_{m+1}(\Bbb Z: q) \right) ^D. \] In particular, for every $a \in I$, $e_{m+1,1}(a)\in H$. Hence, $L_{m+1}(\Bbb Z: q) \subseteq H$ as desired. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:intro.bounded.generation}] Proposition \ref{claim:bdd.gen.3} implies that there is a constant $C=D(3)$ such that $\left( U_3(\mathbb{Z};q) ) L_3(\mathbb{Z};q) ) \right)^{C}= \langle U_3(\mathbb{Z};q) L_3(\mathbb{Z};q) \rangle $. Lemma \ref{lem:up} implies that $\left( U_n(\mathbb{Z};q) ) L_n(\mathbb{Z};q) ) \right)^{C}= \langle U_n(\mathbb{Z};q) L_n(\mathbb{Z};q) \rangle $ for every $n \ge 3$. Proposition \ref{prop:Tits} implies that $\left( U_n(\mathbb{Z};q) ) L_n(\mathbb{Z};q) ) \right)^{C}$ contains the congruence subgroup $\SL_n(\Bbb Z;q^2)$ and this subgroup has a finite index in $\SL(n,\Bbb Z)$. \end{proof} \section{Proof of Theorem \ref{thm:intro.congruence.subgroup} without an explicit bound} \label{sec:congruence} We will need the following lemma, which we state without a proof: \begin{lemma} \label{lem:q.above.diagonal} All upper-triangular matrices $g\in U_n(\mathbb{Z} ; q)$ such that $g_{i,i+1}=q$, for all $i$, are conjugate. \end{lemma} \begin{proof}[Proof of Theorem \ref{thm:intro.congruence.subgroup} without an explicit bound] Identify $\SL_2(\Bbb Z)$ with its image in $\SL_3(\Bbb Z)$ under the embedding $M \mapsto \left(\begin{matrix} M &0 \\ 0 & 1 \end{matrix}\right)$. Since $\SL_2(\Bbb Z)$ contains a non-abelian free group there exists $\pm I_2 \ne g \in w(\SL_2(\Bbb Z))$. There exists $h \in \langle e_{1,3}(1),e_{2,3}(1)\rangle$ such that $[g,h]=g^{-1}h^{-1}gh$ is a non-trivial element and this element is conjugate to $e_{1,3}(q)$ for some positive $q \in \Bbb N$. For the chosen $g$ and $h$, we have $[g,h]^n=[g,h^n] \in w(\SL_3(\Bbb Z))^2$. Since $w(\SL_3(\Bbb Z))^2$ is a normal subset, $\langle e_{1,3}(q)\rangle \subseteq w(\SL_3(\Bbb Z))^2$. We will show that the statement of Theorem \ref{thm:intro.congruence.subgroup} holds with respect to $d=q^2$. We claim that for any integers $a_1,\ldots,a_{n-1}$, there is $g\in w \left( \SL_n(\mathbb{Z}) \right)^{8} \cap U_n(\mathbb{Z} ; q)$ such that for every $i$, $g_{i,i+1}=qa_i$. Using two different embeddings of the group $\SL_3(\mathbb{Z}) \times \cdots \times \SL_3(\mathbb{Z})$ ($\lfloor n/3 \rfloor$ times) into $\SL_n(\mathbb{Z})$ as block-diagonal matrices, we get that there is a matrix $g^1\in w\left( \SL_n(\mathbb{Z}) \right)^{4} \cap U_n(\mathbb{Z} ; q)$ such that $g^1_{i,i+1}=q a_i$ if $i \equiv 1 \text{ (mod 3)}$ and $g^1_{i,i+1}=0$ otherwise. Using one embedding of the group $\SL_3(\mathbb{Z}) \times \cdots \times \SL_3(\mathbb{Z})$ ($\lfloor n/3 \rfloor$ times) into $\SL_n(\mathbb{Z})$ as block-diagonal matrices, we get that there is a matrix $g^2\in w\left( \SL_n(\mathbb{Z}) \right)^{2} \cap U_n(\mathbb{Z} ; q)$ such that $g^2_{i,i+1}=q a_i$ if $i \equiv 2 \text{ (mod 3)}$ and $g^2_{i,i+1}=0$ otherwise. Similarly, there is $g^3 \in w\left( \SL_n(\mathbb{Z}) \right)^{2} \cap U_n(\mathbb{Z} ; q)$ such that $g^3_{i,i+1}=q a_i$ if $i \equiv 3 \text{ (mod 3)}$ and $g^3_{i,i+1}=0$ otherwise. The matrix $g=g^0g^1g^2\in w\left( \SL_n(\mathbb{Z}) \right)^{8} \cap U_n(\mathbb{Z} ; q)$ satisfies $g_{i,i+1}=q a_i$. The proof of the claim in now complete. It follows from Lemma \ref{lem:q.above.diagonal} that $w(\SL_n(\mathbb{Z}))^{8}$ contains all elements $g\in U_n(\mathbb{Z};q)$ such that $g_{i,i+1}=q$ for every $i$. Next, we claim that $U_n(\mathbb{Z} ; q) \subseteq w\left( \SL_n(\mathbb{Z}) \right)^{16}$. Indeed, let $h\in U_n(\mathbb{Z} ; q)$. There is an element $f\in w\left( \SL_n(\mathbb{Z}) \right)^{8} \cap U_n(\mathbb{Z} ; q)$ such that for every $i$, $f_{i,i+1}=q-h_{i,i+1}$. Then $hf\in U_n(\mathbb{Z};q)$ and for every $i$, $(fh)_{i,i+1}=q$, so $fh\in (w \left( \SL_n(\mathbb{Z}) \right) ^{8}$. Since $ w\left( \SL_n(\mathbb{Z}) \right)^{8}$ is symmetric, it follows that $h\in w\left( \SL_n(\mathbb{Z}) \right)^{16}$. Similarly, $L_n(\mathbb{Z} ; q) \subseteq w\left( \SL_n(\mathbb{Z}) \right)^{16}$. By Theorem \ref{thm:intro.bounded.generation}, there is a constant $C$ (independent of $q$) such that $$\langle U_n(\Bbb Z;q)U_n(\Bbb Z;q) \rangle =(U_n(\Bbb Z;q)U_n(\Bbb Z;q))^C \subseteq w\left( \SL_n(\mathbb{Z}) \right)^{32C}.$$ Propositon \ref{prop:Tits} implies that $\SL_n(\Bbb Z,q^2) \le \langle U_n(\Bbb Z;q)U_n(\Bbb Z;q) \rangle$. \end{proof} \section{Proof of Theorems \ref{thm:intro.fix.n} and \ref{thm:intro.fix.w}} In order to deduce Theorems \ref{thm:intro.fix.n} and \ref{thm:intro.fix.w} from Theorem \ref{thm:intro.congruence.subgroup}, we need to study word values in $\SL_n(\mathbb{Z} / q\Bbb Z)$ uniformly in $q$. Equivalently, we need to study word values in $\SL_n ( \widehat{\mathbb{Z}})$ where $\widehat{\mathbb{Z}}$ is the profinite completion of $\Bbb Z$. We will use a version of the open mapping theorem which is well known, but for which we were unable to find a reference. For $a\in \mathbb{Z}_p^n$, denote $\| a\|=\max \left\{ |a_i|_p \right\}$, where $|a|_p$ is the $p$-adic valuation of $a$. The function $d(a,b)=\|a-b\|$ is a metric on $\mathbb{Z}_p^n$. Let $X \subset \mathbb{A}_{\mathbb{Z}_p} ^n$ be an affine $\mathbb{Z}_p$-scheme, i.e. the zero locus of a collection of polynomials in $\mathbb{Z}_p[x_1,\ldots,x_n]$. We denote the set of solutions of $X$ with coordinates in $\mathbb{Z}_p$ by $X(\mathbb{Z}_p)$. The restriction of $d$ to $X(\mathbb{Z}_p)$ is a metric on $X(\mathbb{Z}_p)$\footnote{This metric is independent of the affine embedding, but we will not use this fact.}. Let $\mathbb{Z}_p[X]$ be the ring of regular functions on $X$ (the restrictions of polynomials with $\mathbb{Z}_p$ coefficients to $X$). For $f\in \mathbb{Z}_p[X]$, we define $\val_p(f)=\max \left\{ k \mid f\in p^k \mathbb{Z}_p[X] \right\}$. More generally, if $f:X \rightarrow Y$ is a map of affine $\mathbb{Z}_p$-schemes, we define $\val_p(f)$ as the minimum of the valuations of its coordinates. Note that if $\val(f) \geq k$, then $d(f(a),f(b)) \leq p^{-k}d(a,b)$, for every $a,b\in X(\mathbb{Z}_p)$. Recall that $X$ is called smooth at $a\in X(\mathbb{Z}_p)$ if there are $\psi_1,\ldots,\psi_c\in \mathbb{Z}_p[x_1,\ldots,x_n]$ such that $X$ is the common zero locus of $\psi_i$ and the reductions of $\nabla \psi_i(a)$ modulo $p$ are linearly independent. In this case $n-c$ is called the dimension of $X$ at $a$. \begin{lemma}\label{lem:4.1} Let $X \subseteq \mathbb{A}_{\mathbb{Z}_p}^n$ be a $\mathbb{Z}_p$-scheme and $a\in X(\mathbb{Z}_p)$. Assume that $X$ is smooth in $a$. Then there is a subset $S \subset \left\{ 1,\ldots,n \right\}$ such that the coordinate projection $\pi : \mathbb{Z}_p ^n \rightarrow \mathbb{Z}_p^S$ satisfies: \begin{enumerate} \item\label{item:smooth.1} The restriction of $\pi$ to $X(\mathbb{Z}_p)\cap B(a,p ^{-1})$ is one-to-one where $B(a,p ^{-1})$ is the closed ball of radius $p^{-1}$ around $a$. \item\label{item:smooth.2} $\pi (T_aX(\mathbb{Z}_p))=\mathbb{Z}_p^{S}$. \end{enumerate} \end{lemma} \begin{proof} Let $\psi_i$ be as in the definition of smoothness. After permutation of the indices, we can assume that the $c$-by-$c$ matrix $\left( \frac{\partial \psi_i}{\partial x_j}(a) \right)$ is invertible over $\mathbb{Z}_p$. For any $f\in \mathbb{Z}_p[x_1,\ldots,x_n]$ and any $a,b\in \mathbb{Z}_p^n$ with $0<d(a,b)<1$, we have $|f(a)-f(b)-\langle \nabla f(a),a-b \rangle| \leq \| a-b \|^2 < \| a-b \|$. If $a,b\in X(\mathbb{Z}_p)$ and $d(a,b)<1$, we have $\psi_i(a)=\psi_i(b)=0$, so $| \langle \nabla \psi_i(a),a-b \rangle | < \| a-b \|$. If, in addition, $\pi(a)=\pi(b)$, write $a-b=(v,0)$, where $v\in p \mathbb{Z}_p^c$ and then \[ \left \| \left( \frac{\partial \psi_i}{\partial x_j}(a) \right)v \right\| = \max \left\{ | \langle \nabla \psi_i(a),a-b \rangle | \right\} < \| v \|. \] Since invertible matrices do not decrease norm, this is a contradiction. This complete the proof of \eqref{item:smooth.1}. Denoting $S:=\{c+1,\ldots,n\}$, \eqref{item:smooth.2} readily follows form the assumption that $\left( \frac{\partial \psi_i}{\partial x_j}(a) \right)$ is invertible. \end{proof} \begin{lemma} \label{lem:open.mapping} Let $X,Y$ be affine $\mathbb{Z}_p$-schemes. Let $f:X \rightarrow Y$ be a morphism, let $a\in X(\mathbb{Z}_p)$, and let $k \geq 0$ be an integer. Suppose that \begin{enumerate} \item $\val_p(f) \geq k$. \item $df(a)(T_aX(\mathbb{Z}_p)) \supseteq p^kT_{f(a)}Y(\mathbb{Z}_p)$. \item $X$ is smooth at $a$ and $Y$ is smooth at $f(a)$. \end{enumerate} Then $f(X(\mathbb{Z}_p))$ contains the closed ball of radius $p^{-k-1}$ around $f(a)$. \end{lemma} \begin{proof} We first reduce the claim to the case where $X$ is an affine space. Suppose that $X \subset \mathbb{A} ^n$ is $d$-dimensional. By smoothness, it is given as the zero locus of $\varphi_1,\ldots,\varphi_{n-d}\in \mathbb{Z}_p[x_1,\ldots,x_n]$ such that the reductions modulo $p$ of $\nabla \varphi_i(a)$ are linearly independent. Consider the map $F:\mathbb{A} ^n \rightarrow Y \times \mathbb{A} ^{n-d}$ given by $x \mapsto (f(x),p^k\varphi_1(x),\ldots,p^k\varphi_{n-d}(x))$. Then $F$ satisfies the conditions of the lemma. If the claim holds for $F$, then it holds for $f$. Next, we reduce the claim to the case where $X$ and $Y$ are affine spaces. Indeed, let $e$ be the dimension of $Y$ at $f(a)$. Item \eqref{item:smooth.1} of Lemma \ref{lem:4.1} allows us to assume that the coordinate projection $\pi: Y \rightarrow \mathbb{A} ^{e}$ is one-to-one on $B(f(a),p ^{-1})$. Item \eqref{item:smooth.2} of Lemma \ref{lem:4.1} implies that the function $\pi \circ f$ satisfies the conditions of the lemma, and the claim for $\pi \circ f$ implies the claim for $f$. Finally, we prove the claim in the case $X=\mathbb{A} ^n$ and $Y=\mathbb{A} ^m$. We can assume that $a=0$ and $f(a)=0$. Since the coefficients of $f$ are in $\mathbb{Z}_p$, we have that $df(a')(\mathbb{Z}_p^n) \supseteq p^k \mathbb{Z}_p^m$, for any $a'\in p\mathbb{Z}_p^n$. Let $b\in p^{k+1}\mathbb{Z}_p^m$. We will construct a sequence $a_\ell \in p \mathbb{Z}_p^n$ such that $\| f(a_\ell)-b\| < p^{-k-\ell}$. Taking a limit point of the $a_\ell$s, we get that $b\in f(\mathbb{Z}_p^n)$. The sequence $a_\ell$ is defined by recursion starting from $a_0=0$. Given $a_\ell$, the assumptions imply that there is $\epsilon \in p^{\ell+1} \mathbb{Z}_p^n$ such that $df(a_\ell)(\epsilon)=b-f(a_\ell)$. We have \[ \| f(a_\ell + \epsilon)-b \| = \| f(a_\ell +\epsilon)-f(a_\ell)-df(a_\ell)(\epsilon)+df(a_\ell)(\epsilon)+f(a_\ell)-b\| = \] \[ \| f(a_\ell +\epsilon)-f(a_\ell)-df(a_\ell)(\epsilon) \| \leq p^{-k}\| \epsilon \|^2 < p^{-k-\ell-1}, \] since the function $x \mapsto f(a_\ell+x)-f(a_\ell)-df(a_\ell)(x)$ is a polynomial without constant or linear term and its coefficients are divisible by $p^k$. \end{proof} \begin{definition} For elements $g,h\in \SL_n$, let $\Phi_{g,h}:\SL_n \times \SL_n \rightarrow \SL_n$ be the map $\Phi^R_{g,h}(x,y)=g^x h^y$. \end{definition} \begin{lemma} \label{lem:diff.cc} Let $n \ge 3$ and assume that $a,b\in \SL_n(\mathbb{F}_q)$ generate $\SL_n(\mathbb{F}_p)$ where $\mathbb{F}_q$ is a finite field of order $q$. Then the differential of $\Phi_{a,b}$ at $(1,1)$ is onto. \end{lemma} \begin{proof} After identifying $T_{ab}\SL_n=ab +ab \mathfrak{sl}_n$ and $\mathfrak{sl}_{n}$, the differential of $\Phi_{a,b}$ is $(X,Y) \mapsto (X-X^a)^b +(Y-Y^b)$. Let $\varphi\in \Mat_n(\mathbb{F}_q)^*$ and assume it vanishes on the image of $d \Phi_{a,b}$. Then there is $A\in \Mat_n(\mathbb{F}_q)$ such that $\varphi(X)=\tr(AX)$. For every $Y\in \mathfrak{sl}_n(\mathbb{F}_p)$, $\varphi(Y-Y^b)=0$, so $\tr(Y \cdot (A^{b ^{-1}}-A))=\tr(A(Y-Y^b))=0$. Thus, $A^{b ^{-1}}-A$ is a scalar. Similarly, using the assumption that $\varphi((X-X^a)^b)=0$, we get that $\left( A^{b ^{-1}} \right)^{a ^{-1}}-A^{b ^{-1}}$ is a scalar. Using the fact that $A^{b ^{-1} }-A$ is a scalar, we get that $A^{a ^{-1}}-A$ is also a scalar. The set $X=\left\{ g\in \SL_n(\mathbb{F}_q) \mid \text{$A^g-A$ is a scalar} \right\}$ is closed under multiplication. Since $a ^{-1} ,b ^{-1} \in X$, we get $X=\SL_n(\mathbb{F}_q)$. Since $\SL_n(\mathbb{F}_p)$ is perfect and the function $g \mapsto A^g-A$ is a homomorphism between $\SL_n(\mathbb{F}_q)$ and $\mathbb{F}_q\iden$, we get that this homomorphism must be trivial. Hence, $A$ commutes with $\SL_n(\mathbb{F}_q)$, so it must be scalar. It follows that the restriction of $\varphi$ to $\mathfrak{sl}_n(\mathbb{F}_q)$ is zero. \end{proof} \begin{lemma} \label{lem:width.adelic.fix.w} For every non-trivial word $w$, there is $n_0$ such that, for any integer $n \geq n_0$, we have $w(\SL_n(\widehat{\mathbb{Z}}))^7=\SL_n(\widehat{\mathbb{Z}})$. \end{lemma} \begin{proof} By \cite{LS}, there is $n_0$ such that, if $n \geq n_0$ and $p$ is any prime, then $w(\SL_n(\mathbb{F}_p))^2$ contains all non-scalar matrices. In particular, $w(\SL_n(\mathbb{F}_p))^3=\SL_n(\mathbb{F}_p)$. Fix a prime $p$. Choosing generators $a,b\in \SL_n(\mathbb{F}_p)$ (which are not scalars), there are $g,h\in w(\SL_n(\mathbb{Z}_p))^2$ such that the reductions of $g,h$ modulo $p$ are $a,b$ respectively. We get that $w(\SL_n(\mathbb{Z}_p))^4 \supset \Phi_{g,h}(\SL_n(\mathbb{Z}_p) \times \SL_n(\mathbb{Z}_p))$. It is well known that $\SL_n$ and thus also $\SL_n\times \SL_n$ are smooth at every point. Lemma \ref{lem:diff.cc} and Lemma \ref{lem:open.mapping} imply that $w(\SL_n(\mathbb{Z}_p))^4$ contains the coset $gh\SL_n(\mathbb{Z}_p;p)$. Hence, $w(\SL_n(\mathbb{Z}_p))^7=\SL_n(\mathbb{Z}_p)$. Since $w(\SL_n(\widehat{\mathbb{Z}}))=\prod_p w(\SL_n(\mathbb{Z}_p))$, the claim follows. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:intro.fix.w} (without an explicit bound)] By Theorem \ref{thm:intro.congruence.subgroup} and Lemma \ref{lem:width.adelic.fix.w} \end{proof} We move on to the proof of Theorem \ref{thm:intro.fix.n}. \begin{lemma} \label{lem:ad.irr} For every $n\geq 2$ there is a constant $C$ such that the following holds. If $p$ is a prime and $A\in \mathfrak{sl}_n(\mathbb{F}_p)$ is non-central, then every element of $\mathfrak{sl}_n(\mathbb{F}_p)$ is equal to the sum of at most $C$ elements of $\left\{ x ^{-1} A x \mid x\in \SL_n(\mathbb{F}_p) \right\}$. \end{lemma} \begin{proof} It is well known that the only non-trivial $\SL_n(\mathbb{F}_p) $-invariant subspace of $\mathfrak{sl}_n(\mathbb{F}_p)$ is the subset consisting of scalar matrices. Hence, for every $p$, there is a constant $C_p$ such that every element of $\mathfrak{sl}_n(\mathbb{F}_p)$ is equal to the sum of at most $C_p$ elements of $\left\{ x ^{-1} A x \mid x\in \SL_n(\mathbb{F}_p) \right\}$. Therefore, in order to find a uniform $C$, we can and will assume that $p$ is large. In particular, we assume that $p \ne 2$. For $1 \leq i \neq j \leq n$, let $E_{i,j}(a)$ be the matrix whose $(i,j)$th entry is $a$ and is zero otherwise. Note that $E_{1,2}(a)$ is conjugate to $E_{1,2}(ab^2)$, for every $b\in \mathbb{F}_p$. Since every element in $\mathbb{F}_p$ is a sum of two squares, we get that, for any $a\in \mathbb{F}_p^ \times$, any element of the form $E_{1,2}(b)$ is the sum of at most two conjugates of $E_{1,2}(a)$. In particular, there exists a one dimensional linear subspace of $\mathfrak{sl}_n(\mathbb{F}_p)$ such that all its elements are sums of two conjugates of $E_{1,2}(a)$. Using the fact that the only $\SL_n(\mathbb{F}_p) $-invariant subsapce of $\mathfrak{sl}_n(\mathbb{F}_p)$ is the subset consisting of scalar matrices once again, we see that, if $a \ne 0$, then every matrix in $\mathfrak{sl}_n(\mathbb{F}_p)$ is the sum of at most $2(n^2-1)$ conjugates of $E_{1,2}(a)$. Therefore, it is enough to prove that there is a constant $C$ such that, for some $a\in \mathbb{F}_p$, the matrix $E_{1,2}(a)$ is a sum of $C$ conjugates of $A$. We divide the proof into several steps: \\ \\ {\bf Step A:} Assume that $A$ is nilpotent. By using Jordan's normal form we see that $A$ is conjugate to a block diagonal matrix and each block diagonal matrix has the from \begin{equation} \label{eq:Jordanl.form} \left( \begin{matrix} 0 & a & & & \\ & 0 & 1 & & \\ & & \ddots & \ddots & \\ & & & 0 & 1 \\ & & & & 0 \end{matrix} \right). \end{equation} where $0 \ne a \in \mathbb{F}_p$ (we cannot assume that $a=1$ since we are conjugating with a matrix in $\SL_n(\mathbb{F}_p)$ and not $\GL_n(\mathbb{F}_p)$). A straightforward argument implies that it is enough to deal with the case where there is just one block. Clearly, we can assume that the dimension of this block is at least 3. Then, there exists $\varepsilon \in \{-1,1\}$ such that the diagonal matrix $\diag(\varepsilon,1,-1,\ldots,(-1)^n)$ belongs to $\SL_n(\mathbb{F}_p)$. Denote $B:=\diag(\varepsilon,1,-1,\ldots,(-1)^n)+E_{2,n}(1)$. Then the $n$th coordinate of the first row of $A+B^{-1} AB$ is non-zero while all the other rows equal zero. Thus, $A+B^{-1} AB$ is conjugate to $E_{1,2}(a)$ for some non-zero $a$. \\ \\ {\bf Step B:} Assume that $n=2$. If $A$ is nilpotent, it is conjugate to $E_{1,2}(a)$, for some $a$, and the claim holds. In general, since $A$ is not scalar, it is conjugate to $\left( \begin{matrix} 0 & a \\ b & 0\end{matrix} \right)$, and we can assume that $b\neq 0$. We claim that, if $p \geq 17$, there are $x,y,z\in \mathbb{F}_p^ \times$ such that $x^2+y^2+z^2=0$ and $x^{-2}+y^{-2}+z^{-2} \neq 0$. If this claim holds, then \[ \left( \begin{matrix} x & \\ & x ^{-1} \end{matrix} \right)A\left( \begin{matrix} x ^{-1} & \\ & x \end{matrix} \right) + \left( \begin{matrix} y & \\ & y ^{-1} \end{matrix} \right)A\left( \begin{matrix} y ^{-1} & \\ & y \end{matrix} \right) + \left( \begin{matrix} z & \\ & z ^{-1} \end{matrix} \right)A\left( \begin{matrix} z ^{-1} & \\ & z \end{matrix} \right)= \] \[ =\left(\begin{matrix} 0 & 0 \\ b(x^{-2}+y^{-2}+z^{-2}) & 0 \end{matrix}\right), \] which is nilpotent. To prove the claim, let $X$ be the projective curve defined by $x^2+y^2+z^2=0$. Then $X$ has $p+1$ points over $\mathbb{F}_p$, and at most 6 of them have a zero in some coordinate. At most eight of the points of $X$ satisfy the equation $x^{-2}+y^{-2}+z^{-2}=0$ (these all have the form $[x:y:1]$, where $x^4+x^2+1=0$ and $y=\pm x ^{-1}$). In particular, if $p \geq 17$, the claim is true. \\ \\ {\bf Step C:} Assume $n>2$ and the claim is true for all numbers smaller than $n$. We consider the following cases: {\bf Case 1C: } Assume that $\det A =0$. By conjugating $A$ we can assume that it is of the form \begin{equation} \left( \begin{matrix} 0 & * \\ 0 & B \end{matrix} \right) \end{equation} where $B \in \mathfrak{sl}_{n-1}(\mathbb{F}_p)$. If $B=0$ then $A$ is a nilpotent matrix and we are done by Step 1. Otherwise, we can assume that $p>n-1$ so $B$ is a non-scalar matrix since its trace is equal to zero. Then by the induction hypothesis the sum of a bounded number of conjugates of $A$ is a non-zero nilpotent matrix and we are done by Step 1. {\bf Case 2C:} $\det A \neq 0$. By using the rational canonical normal form we see that there exist non-zero $a,b \in \mathbb{F}_p$ such that $A$ is conjugate to a block diagonal matrix and one of the blocks of $A$ (for notational ease, assume it's the first) is of the form: \begin{equation} \label{eq:rational.form} \left( \begin{matrix} 0 & a & & & \\ & 0 & 1 & & \\ & & \ddots & \ddots & \\ & & & 0 & 1 \\ b & * & \cdots & * & * \end{matrix} \right). \end{equation} Denote $B:=\diag(-1,-1,1,\ldots,1)$. Then, $A+B^{-1}AB$ is a non-zero singular matrix and we are done by case 1C. \end{proof} \begin{remark} The proof of Lemma \ref{lem:ad.irr} can be adapted to work over all finite fields of characteristic different than 2. For fields of characteristic 2, the argument of part 3B should be replaced. \end{remark} \begin{lemma} \label{lem:width.adelic.fix.n} For any $n \geq 3$ there is $C$ such that \begin{enumerate} \item For any $p$, if $X \subseteq \SL_n(\mathbb{Z}_p)$ is symmetric and invariant to conjugation, then $X^C=\langle X \rangle$. \item For any non-trivial word $w$, the width of $w$ in $\SL_n(\widehat{\mathbb{Z}})$ is less than $C$. \end{enumerate} \end{lemma} \begin{proof} \begin{enumerate} \item Let $k=\min \left\{ i \mid \left( \exists g \in X \right) \text{ $g$ is not central modulo $p^{k+1}$} \right\}$. Clearly, $\langle X \rangle \subseteq Z(\SL_n(\mathbb{Z}_p)) \cdot \SL_n(\mathbb{Z}_p;p^{k})$. We will show that there is $C$ such that $\SL_n(\mathbb{Z}_p;p^{k}) \subseteq X^C$, and it will follow that $X^{C+|Z(\SL_n(\mathbb{Z}_p))|}=\langle X \rangle$, which proves the claim since $|Z(\SL_n(\mathbb{Z}_p))| \leq n$. \begin{itemize} \item[Case 1:] $k=0$. Let $\overline{X} \subseteq \SL_n(\mathbb{F}_p)$ be the reduction of $X$ modulo $p$. By assumption, $\overline{X}$ is non-central, so \cite[Corollary 1.9]{LS01} implies that there is $C_1$, depending only on $n$, such that $\overline{X}^{C_1}=\SL_n(\mathbb{F}_p)$. Let $a,b\in X^{C_1}$ such that their reductions modulo $p$ generate $\SL_n(\mathbb{F}_p)$. By Lemma \ref{lem:diff.cc}, the differential of the map $\Phi_{\overline{a},\overline{b}}$ at $(1,1)$ is onto, which implies that $d \Phi_{a,b}(\mathfrak{sl}_n^2(\mathbb{Z}_p)) =\mathfrak{sl}_n(\mathbb{Z}_p)$, since $d \Phi_{a,b}$ is $\mathbb{Z}_p$-linear. By Lemma \ref{lem:open.mapping}, $ab\SL_n(\mathbb{Z}_p;p) \subseteq \Phi_{a,b}(\SL_n(\mathbb{Z}_p) \times \SL_n(\mathbb{Z}_p)) \subseteq X^{2C_1}$. It follows that $X^{3C_1}=\SL_n(\mathbb{Z}_p)$. \item[Case 2:] $k>0$. Let $g\in X$ be such that $g$ is not a scalar modulo $p^{k+1}$. Since $g$ is a scalar modulo $p^{k}$, there exists $h\in \SL_n(\mathbb{Z}_p)$ such that $g^{|Z(\SL_n(\mathbb{Z}_p))|-1}h ^{-1} g h\in X^{|Z(\SL_n(\mathbb{Z}_p))|}$ belongs to $\SL_n(\mathbb{Z}_p;p^{k})$ and is not a scalar modulo $p^{k+1}$. Since $\SL_n(\mathbb{Z}_p;p^{k})/\SL_n(\mathbb{Z}_p;p^{k+1})=\mathfrak{sl}_n(\mathbb{F}_p)$ as $\SL_n(\mathbb{Z}_p)$-modules, Lemma \ref{lem:ad.irr} implies that there is a constant $C$, independent of $X$, such that $X^C \cdot \SL_n(\mathbb{Z}_p;p^{k+1}) \supseteq \SL_n(\mathbb{Z}_p;p^{k})$. Let $\overline{a}$ be a maximal nilpotent Jordan block and let $\overline{b}=\overline{a}^T$. Note that the intersection of the centralizers of $\overline{a},\overline{b}$ in $\Mat_n$ is the collection of scalar matrices. Choose $a,b\in X^C \cap \SL_n(\mathbb{Z}_p;p^{k})$ whose images in $\SL_n(\mathbb{Z}_p;p^{k}) / \SL_n(\mathbb{Z}_p;p^{k+1})=\mathfrak{sl}_n(\mathbb{F}_p)$ are $\overline{a}$ and $\overline{b}$. We will show that $\Phi_{a,b}:\SL_n \times \SL_n \rightarrow \SL_n$ satisfies the conditions of Lemma \ref{lem:open.mapping}. Since $a-1$ is divisible by $p^k$, we have $\val_p(x \mapsto x ^{-1} a x-a) \geq k$. It follows that the derivative of this map also has $p$-valuation at least $k$. Similarly, $\Phi_{a,b}$ satisfies the first condition of Lemma \ref{lem:open.mapping}. Note that $d \Phi_{a,b}(\mathfrak{sl}(\mathbb{Z}_p)^2) \subset p^k \mathfrak{sl}(\mathbb{Z}_p)$. In order to show the reverse containment, it is enough to show that the composition of $d \Phi_{a,b}$ and the reduction map $p^k \mathfrak{sl}_n(\mathbb{Z}_p) \rightarrow p^k \mathfrak{sl}_n(\mathbb{Z}_p) / p^{k+1} \mathfrak{sl}_n(\mathbb{Z}_p)$ is onto. This composition is the map $(X,Y) \mapsto [\overline{X},\overline{a}]+[\overline{Y},\overline{b}]$ (where $[x,y]$ is the Lie bracket), so we need to show that there is no non-zero linear functional that vanishes on all elements of the form $[\overline{X},\overline{a}]$ and $[\overline{X},\overline{b}]$, for $\overline{X}\in \mathfrak{sl}_n(\mathbb{F}_p)$. Any such functional has the form $\tr(A \cdot)$ for some $A\in\mathfrak{sl}_n(\mathbb{F}_p)$. Since $\tr(A[B,C])=\tr([A,B]C)$ for every three matrices $A$, $B$ and $C$, the assumption that $\tr(A[\overline{a},\overline{X}])=0$ for all $\overline{X}\in \mathfrak{sl}_n(\mathbb{F}_p)$ implies that $[A,\overline{a}]=\alpha I$, for some $\alpha$. Similarly, $[A,\overline{b}]=\beta I$, for some $\beta$. From $[A,\overline{a}]=\alpha I$ get (by induction) that $A_{i+1,i}=-i \alpha$, whereas from $[A,\overline{b}]=\beta I$ get that $A_{i+1,i}=A_{i+2,i+1}$. Since $n \geq 3$, we get $\alpha=0$. Similarly, $\beta=0$. Consequently, $A$ commutes with $\overline{a}$ and $\overline{b}$, so $A=0$, a contradiction. Applying Lemma \ref{lem:open.mapping} to $\Phi_{a,b}$, we get that any element in $ab\SL_n(\mathbb{Z}_p;p^{k+1})$ is in $\Phi_{a,b}(\SL_n(\mathbb{Z}_p) ^2)$, so, in particular, $ab\SL_n(\mathbb{Z}_p;p^{k+1}) \subset X^{2C}$ and $\SL_n(\mathbb{Z}_p;p^{k+1}) \subset X^{4C}$. Since $X^C \SL_n(\mathbb{Z}_p;p^{k+1}) \supseteq \SL_n(\mathbb{Z}_p;p^k)$, we get that $X^{5C} \supseteq \SL_n(\mathbb{Z}_p;p^k)$, proving the claim in this case. \end{itemize} \item Since $w(\SL_n(\widehat{\mathbb{Z}}))=\prod w(\SL_n(\mathbb{Z}_p))$, the claim follows from the first claim. \end{enumerate} \end{proof} \begin{proof}[Proof of Theorem \ref{thm:intro.fix.n}] By Theorem \ref{thm:intro.congruence.subgroup} and Lemma \ref{lem:width.adelic.fix.n}. \end{proof} \section{Proof of Theorems \ref{thm:intro.fix.w} and \ref{thm:intro.congruence.subgroup} - with explicit bounds} The goal of this section is to prove the explicit bound of Theorem \ref{thm:intro.fix.w}. The proof follows the arguments in \cite{DV}. \begin{lemma}\label{lemma:explicit.1} Let $q,m \in \Bbb N^+$ and denote $n:=3m$. Assume that $g_1,\ldots,g_m \in \SL_3(\Bbb Z;q)$ and $g_1\cdots g_m=e$. Then $g:=\diag(g_1,\ldots,g_m) \in L_n(\Bbb Z;q)\tilde{U}_n(\Bbb Z;q) U_n(\Bbb Z;q)$ where $\tilde{U}_n(\Bbb Z;q):=\{hkh^{-1} \mid k \in U_n(\Bbb Z;q) \ \wedge \ h \in \SL_n(\Bbb Z)\}$. \end{lemma} \begin{proof} Let $I_3$ be the identity matrix of $\SL_3(\Bbb Z)$ and identify $M_n(\Bbb Z)$ with $M_m(M_3(\Bbb Z))$ where $M_k(R)$ is the ring of $k \times k $ matrices over the ring $R$. Let $l_1$ be the matrix of $M_m(M_3(\Bbb Z))$ with $I_3$ on the diagonal, $g_i^{-1}$ on the $(i+1,i)$ entry for every $1 \le i \le m-1$, and zero elsewhere. Let $l_2$ be the matrix of $M_m(M_3(\Bbb Z))$ with $I_3$ on the diagonal, $I_3$ on the $(i+1,i)$ entry for every $1 \le i \le m-1$, and zero elsewhere. Let $u_1$ be the matrix of $M_m(M_3(\Bbb Z))$ with $I_3$ on the diagonal, $1-g_1\cdots g_i$ on the $(i,i+1)$ entry for every $1 \le i \le m-1$, and zero elsewhere. Let $u_2$ be the matrix of $M_m(M_3(\Bbb Z))$ with $I_3$ on the diagonal, $(1-g_1 \cdots g_i)g_{i+1}$ on the $(i,i+1)$ entry for every $1 \le i \le m-1$, and zero elsewhere. Then, $g=l_1^{-1}u_1^{-1}l_2u_2=(l_1^{-1}l_2)(l_2^{-1}u_1^{-1}l_2)u_2 \in L_n(\Bbb Z;q)\tilde{U}_n(\Bbb Z;q) U_n(\Bbb Z;q)$. \end{proof} \begin{lemma}\label{lemma:explicit.2} Let $q,m \in \Bbb N^+$ and denote $n:=3m$. Assume that $g_1,\ldots,g_m \in U_3(\Bbb Z;q)L_3(\Bbb Z;q)$. Denote $g:=\diag(g_1 \cdots g_m,I_3,\ldots,I_3) \in \SL_n(\Bbb Z;q)$ and $\tilde{U}_n(\Bbb Z;q):=\{hkh^{-1} \mid k \in U_n(\Bbb Z;q) \ \wedge \ h \in \SL_n(\Bbb Z)\}$. Then $g \in L_n(\Bbb Z;q)\tilde{U}_n(\Bbb Z;q) U_n(\Bbb Z;q)L_n(\Bbb Z;q)$. \end{lemma} \begin{proof} Define $h:=\diag(g_m,g_{m-1},\ldots, g_1)\in U_n(\Bbb Z;q)L_n(\Bbb Z;q)$. Lemma \ref{lemma:explicit.1} implies that $gh^{-1} \in L_n(\Bbb Z;q)\tilde{U}_n(\Bbb Z;q) U_n(\Bbb Z;q)$. Thus, $$g \in L_n(\Bbb Z;q)\tilde{U}_n(\Bbb Z;q) U_n(\Bbb Z;q)h \subseteq L_n(\Bbb Z;q)\tilde{U}_n(\Bbb Z;q) U_n(\Bbb Z;q) L_n(\Bbb Z;q).$$ \end{proof} \begin{lemma}\label{lemma:explicit.3} Let $n \ge m \ge 3$ and $q \ge 1$. Denote ${E}^*(m,\Bbb Z;q):=\{\diag(1,\ldots,1,g) \in \SL_n(\Bbb Z) \mid g \in {E}(m,\Bbb Z;q)\}$. Then, ${E}(n,\Bbb Z;q) = L_n(\Bbb Z;q)U_n(\Bbb Z;q)L_n(\Bbb Z;q){E}^*(m,\Bbb Z;q)U_n(\Bbb Z;q)$. \end{lemma} \begin{proof} Let $q \ge 1$. The proof is by induction on $n$. The base case $n=m$ is clear. Assume that the statement is true for some $n \ge m$. We have to show that the statement is true also for $n+1$. Let $U_n^-(\Bbb Z;q)$ and $L_n^-(\Bbb Z;q)$ be the images in $\SL_{n+1}(\Bbb Z)$ of $U_n(\Bbb Z;q)$ and $L_n(\Bbb Z;q)$ under the map $M \mapsto \diag(1,M)$. Denote $C^-_n(q):=\langle e_{j,1}(q) \mid 2 \le j \le n+1\rangle$ and $R^-_n(q):=\langle e_{1,j}(q) \mid 2 \le j \le n+1\rangle$. Finally recall that the main theorem of \cite{Men} implies that for every $k \ge 3$, $$E(k,\Bbb Z;q)=\{g\in \SL_k(\Bbb Z;q) \mid \forall 1 \le i \le k. \ g_{i,i}=1 (\textrm{mod}\ q^2) \}.$$ Let $g \in{E}(n+1,\Bbb Z;q)$. Then, $\gcd(g_{1,1},g_{2,1},\ldots,g_{n,1})=1$ and $\gcd(qg_{1,1},g_{2,1},\ldots,g_{n,1})=q$. Recall that $\Bbb Z$ satisfies the following stable range condition: If $m\ge 3$ and $a_1,\ldots,a_m \in \Bbb Z$ then there exists $t_2,\ldots,t_m \in \Bbb Z$ such that $\gcd(a_1,\ldots,a_m)=\gcd(a_2-t_2a_1,\ldots,a_n-t_na_1)$. Thus, there exists $h\in C^-_n(\Bbb Z;q)g$ such that $\gcd(h_{2,1},\ldots,h_{n,1})=q$. Since $h \in {E}(n,\Bbb Z;q)$, we have $h_{1,1}=1$ modulo $q^2$ so there exists $h'\in R^-_n(\Bbb Z;q)h$ such that $h'_{1,1}=1$. Finally, there is $h''\in C^-_n(q)h'R^-_n(q)$ such that $h''=\diag(1,g')$ for some $g' \in \SL_n(\Bbb Z;q)$. Note that $g' \in {E}(n,\Bbb Z;q)$ since its diagonal entries are equal to 1 modulo $q^2$. Thus, the induction hypothesis implies that $h'' \in L_n^-(\Bbb Z;q)U_n^-(\Bbb Z;q)L_n^-(\Bbb Z;q)E^*(m,\Bbb Z;q)U_n^-(\Bbb Z;q)$. It follows that $g$ belongs to $$C^-_n(\mathbb{Z};q)R^-_n(\mathbb{Z};q)C^-_n(\mathbb{Z};q)L_n^-(\Bbb Z;q)U_n^-(\Bbb Z;q)L_n^-(\Bbb Z;q)E^*(m,\Bbb Z;q)U_n^-(\Bbb Z;q)R^-_n(\mathbb{Z};q).$$ Since both $U_n^-(\Bbb Z;q)$ and $L_n^-(\Bbb Z;q)$ normalize $C^-_n(\mathbb{Z};q)$ and $R^-_n(\mathbb{Z};q)$, we have \[ C^-_n(\mathbb{Z};q)R^-_n(\mathbb{Z};q)C^-_n(\mathbb{Z};q)L_n^-(\Bbb Z;q)U_n^-(\Bbb Z;q)L_n^-(\Bbb Z;q)E^*(m,\Bbb Z;q)U_n^-(\Bbb Z;q)R^-_n(\mathbb{Z};q)= \] \[ C^-_n(\mathbb{Z};q)L_n^-(\Bbb Z;q)R^-_n(\mathbb{Z};q)U_n^-(\Bbb Z;q)C^-_n(\mathbb{Z};q)L_n^-(\Bbb Z;q)E^*(m,\Bbb Z;q)U_n^-(\Bbb Z;q)R^-_n(\mathbb{Z};q) = \] \[ L_{n+1}(\Bbb Z;q)U_{n+1}(\Bbb Z;q)L_{n+1}(\Bbb Z;q)E^*(m,\Bbb Z;q)U_{n+1}(\Bbb Z;q) \] \end{proof} \begin{corollary}\label{cor:explicit} For every $n \ge 3$ denote $\tilde{U}_n(\Bbb Z;q):=\{hkh^{-1} \mid k \in U_n(\Bbb Z;q) \ \wedge \ h \in \SL_n(\Bbb Z)\}=\{hkh^{-1} \mid k \in L_n(\Bbb Z;q) \ \wedge \ h \in \SL_n(\Bbb Z)\}$. There exists an integer $N$ such that for every $n \ge N$ and every $q \in \Bbb Z$ the following holds: $$ E(n,\Bbb Z;q) \subseteq L_n(\Bbb Z;q)(\tilde{U}_n(\Bbb Z;q))^3 U_n(\Bbb Z;q). $$ \end{corollary} \begin{proof} Propositon \ref{claim:bdd.gen.3} implies that there exists a constant $D$ such that for every $q \in \Bbb Z$, $(U_3(\Bbb Z;q)L_3(\Bbb Z;q))^D=\langle U_3(\Bbb Z;q)L_3(\Bbb Z;q) \rangle$. Denote ${E}^*(3,\Bbb Z;q):=\{\diag(1,\ldots,1,g) \in \SL_{3D}(\Bbb Z) \mid g \in {E}(3,\Bbb Z;q)\}$. Lemma \ref{lemma:explicit.2} shows that, for any $q$, $E^*(3,\mathbb{Z};q) \subseteq L_{3D}(\mathbb{Z};q)\widetilde{U}_{3D}(\mathbb{Z};q)U_{3D}(\mathbb{Z};q)L_{3D}(\mathbb{Z};q)$. Lemma \ref{lemma:explicit.3} implies that $$E(n,\Bbb Z;q) \subseteq L_{n}(\Bbb Z;q)U_{n}(\Bbb Z;q)L_{n}(\Bbb Z;q)\tilde{U}_{n}(\Bbb Z;q) U_{n}(\Bbb Z;q)L_{n}(\Bbb Z;q)U_{n}(\Bbb Z;q).$$ Since $L_{n}(\Bbb Z;q)U_{n}(\Bbb Z;q)L_{n}(\Bbb Z;q) \subset L_n(\mathbb{Z};q)\tilde{U}_n(\mathbb{Z};q)$ and $U_{n}(\Bbb Z;q)L_{n}(\Bbb Z;q)U_{n}(\Bbb Z;q) \subset \tilde{U}_n(\mathbb{Z};q)U_n(\mathbb{Z};q)$, we get the result. \end{proof} \begin{proof}[Proof of Theorems \ref{thm:intro.fix.w} and \ref{thm:intro.congruence.subgroup} (with explicit bounds)] Let $n \ge 3$. The proof of Theorem \ref{thm:intro.congruence.subgroup} shows that there is a non-zero $q \in \Bbb Z$ such that $U_n(\Bbb Z;q)$ and $L_n(\Bbb Z;q)$ are contained in $w(\SL_n(\Bbb Z))^{16}$. Since $w(\SL_n(\Bbb Z))$ is a normal subset, the set $\tilde{U}_n(\Bbb Z;q):=\{hkh^{-1} \mid k \in U_n(\Bbb Z;q) \ \wedge \ h \in \SL_n(\Bbb Z)\}$ is contained in $w(\SL_n(\Bbb Z))^{16}$. Corollary \ref{cor:explicit} implies that if $n$ is large enough then $E(n,\Bbb Z;q) \subseteq w(\SL_n(\Bbb Z))^{16\cdot 5}$. Since $E(n,\mathbb{Z};q)$ contains a congruence subgroup, we proved the bound in Theorem \ref{thm:intro.congruence.subgroup}. Finally, Lemma \ref{lem:width.adelic.fix.w} implies that if $n$ is large enough then $\SL_n(\Bbb Z) \subseteq w(\SL_n(\Bbb Z))^{16\cdot 5+7}$. \end{proof}
\section{Keywords:} Quasars, Black Holes, Reverberation Mapping, Broad Line Region, AGN} \end{abstract} \section{Introduction} Reverberation Mapping (RM) has been an extremely successful technique used to study the innermost regions of Active Galactic Nuclei (AGN). The determination of lags between variations in the continuum emission coming from the accretion disk near the central Black Hole (BH), and the response from the emission lines produced in the Broad Line Region (BLR) have shown that the BLR is an extended, virialized and ionizion-stratified structure. Furthermore, the determination of the radius--luminosity relation between the BLR radius at which H$\beta$ is produced and the luminosity of the central source has open, through cross-calibration to other BLR lines, the possibility to measure BH masses in hundred of thousands of sources. The cross-calibration is, however, subject to many uncertainties due to the extrapolations necessary to apply the radius--luminosity relation to sources of very different luminosities to those actually probed with RM experiments, and to the use of emission lines produced by regions of the BLR that can be far from that producing H$\beta$. This is the motivation to conduct RM campaigns in high-$z$, high-luminosity quasars for those emission lines available in the observed optical domain. \section{Observational campaign and resulting light curves} Since 2005 we undertook a long observational campaign to monitor a sample of southern, high-redshift ($z \sim 2.5 -3$, with one source at $z = 1.8$), high-luminosity ($M_B \sim -29$) quasars. 50 targets were originally selected from the SDSS \citep{2005AJ....130..367S} and Cal\'an-Tololo samples \citep{1996RMxAA..32...35M}. We started with a purely R-band imaging (corresponding to rest frame wavelengths $\sim 1700-1800$\AA, depending on the exact redshift of the source) and two years later triggered the first spectroscopic observations of those quasars with the largest photometric variations. Over the years the campaign was narrowed down to a final sample of 17 quasars which have good quality R-band and emission line light curves. Line fluxes were measured using spectral windows tailored to each line and each quasar. We avoided regions where the lines were contaminated by variable absorbing features, but did not attempt to correct for the contribution of other (weaker) emission lines, either narrow or broad. For further details see Lira et al.~(2018, submitted). Over the campaign we found that most quasars showed a substantial degree of variability in the continuum and line emission line fluxes, with typical normalized variability amplitudes $f_{\rm var}$ \citep{1997ApJS..110....9R} of $\sim 10$\%. Most quasars also showed the expected behavior, where the emission lines followed the trends seen in the continuum as traced by the R-band light curves. Many sources, unfortunately, did not shown enough structure in their light curves (which in the rest frame only map the continuum and line flux variations during $\sim 3$ years), to allow for statically significant lag determinations. Two sources showed unexpected Ly$\alpha$ light curves, where the line fluxes depart from the behavior shown by the continuum and the remaining emission lines. One example (J224743) is shown in Figure 1, where we also include a source that presents the expected line response to the continuum variations (CT650). \begin{figure}[h!] \begin{center} \includegraphics[scale=0.5]{CT650_all_lcs.pdf}% \includegraphics[scale=0.5]{J224743_all_lcs.pdf} \end{center} \caption{R-band and emission line light curves for a well behaved source, CT650 (left), and an anomalous quasar, J224743 (right). The time axis is expressed in Julian Dates - 2450000 days. Blue points correspond to photometric observations while red points were obtained from the spectroscopic data. The continuum flux measurements shown in the bottom panel, either photometric or spectroscopic, correspond to the observer-frame R-band, and therefore the corresponding rest-frame spectral coverage changes from quasar to quasar. Taken from Lira et al.~(submitted), \copyright AAS.} \end{figure} \section{Time series analysis} Cross-correlation analysis was conducted using the ICCF and ZCCF methods \citep{1986ApJ...305..175G,1997ASSL..218..163A}. Errors were determined using Monte Carlo simulations were the light curve fluxes were randomized and bootstrapped to contain about 70\%\ of the original data points \citep{2004ApJ...613..682P}. We determined statistically significant lags with respect to that of the R-band continuum for 3 Ly$\alpha$, 5 CIV, 1 SiIV, 1 CIII], and 1 MgII emission line light curves. In Figure 2 we reproduce the light curves for two of our sources, CT286 and J221516. The emission line light curves have been shifted according to the calculated lags, while all curves have been taken to a mean of zero and a standard deviation of one. Figure 2 illustrates that emission line light curves can closely match the observed UV continuum, like in the case of J221516, or can show rather different trends, as seen in CT286, where the line light curves correspond to a heavily smoothed version of the continuum light curve. Two reasons can be invoked to explain such differences: 1) the response of the BLR to continuum variations differs from object to object, and it can be nonlinear and show variations with time; 2) the observed UV continuum might not be a good representation of the ionizing continuum, which is actually responsible of driving the emission line changes. The recent monitoring of NGC5548 by the STORM consortium displays several of these traits during the 170 days of monitoring \citep{2016ApJ...824...11G}. Emission line light curves follow closely that of the continuum during the first 1/3 of the campaign, to then disengage from it showing a decorrelated behavior for $\sim 60-70$ days, to finally going back to the original state. Besides, while some emission lines show a smoother light curve than that of the observed continuum during the last segment of the monitoring, SiIV stands out for showing larger amplitude in its peaks and troughs than that of the continuum. \begin{figure}[h!] \begin{center} \includegraphics[scale=0.4]{CT286_light_curves_padua.pdf}% \includegraphics[scale=0.4]{J221516_light_curves_padua.pdf} \end{center} \caption{Shifted and normalized continuum and emission line light curves for CT286 (left) and J221516 (right). The time axis is expressed in Julian Dates - 2450000 days. R-band continuum, Ly$\alpha$, and CIV light curves are presented using circles, triangles and squares, respectively.} \end{figure} \section{Radius--luminosity relations} As well as providing extremely valuable information about the innerworks of the BLR (see next section), reverberation mapping has provided a huge scientific legacy with the determination of the so called radius--luminosity relations. This tight correlations between the distance at which one particular emission line is produced and the continuum luminosity of the central engine allows for the determination of BH masses by applying these calibrations to a virialized BLR (i.e., $M_{\rm BH} \propto R v^2$, where $R$ comes from the radius--luminosity relation and $v$ is measured from the width of the broad emission lines). So far, RM of the H$\beta$ line for nearby ($z < 0.3$) AGN has produced a solid radius--luminosity relation for this line \citep{1999ApJ...526..579W, 2000ApJ...533..631K, 2005ApJ...629...61K, 2006ApJ...644..133B, 2009ApJ...697..160B, 2013ApJ...767..149B}. Cross--calibration of the correlation to other lines has been a significant enterprise which has allowed to determine BH masses of high-$z$ quasars whose Balmer lines are redshifted into the infrared realm. In particular, MgII has proven to be a safe line to be used as BH mass estimator \citep{2004MNRAS.352.1390M,2012MNRAS.427.3081T}, while it has been extensively shown that CIV yields unreliable results \citep{2005MNRAS.356.1029B, 2007ApJ...671.1256N, 2008ApJ...680..169S, 2012ApJ...753..125S, 2016MNRAS.460..187M}. Our monitoring effort has provided a sizeable number of Ly$\alpha$ and CIV lags at the high-luminosity end of the quasar distribution. This, together with other measurements found in the literature for lower luminosity AGN allows us now to determine radius--luminosity relations for these lines. These are presented in Figure 3, while the analytical expressions are as follows: \begin{equation} \frac{R_{\rm Ly\alpha}}{10\ {\rm lt-days}} = (0.52\pm0.59) \left [ \frac{\lambda L_{\lambda} (1345{\rm \AA})}{10^{43}\ {\rm ergs/s}} \right ]^{(0.45\pm0.22)} \end{equation} \begin{equation} \frac{R_{\rm CIV}}{10\ {\rm lt-days}} = (0.24\pm0.08) \left [ \frac{\lambda L_{\lambda} (1345{\rm \AA})}{10^{43}\ {\rm ergs/s}} \right ]^{(0.52\pm0.06)} \end{equation} where $R_{\rm line}$ is the measured lag and $\lambda L_{\lambda} (1345{\rm \AA})$ corresponds to the product $\lambda \times L_{\lambda}$ as measured at 1345 \AA\ from each spectra. As can be seen from Equation 1, the zero point and slope of the Ly$\alpha$ radius--luminosity correlation are poorly constrained. The reason is clear after an inspection of Figure 3 which reveals that Seyfert type sources show a large dispersion around the best fitted correlation, in contrast with the situation for CIV. In fact, the new CIV radius--luminosity relation is very close to that reported by \citep{2007ApJ...659..997K}, who found a zero point of $0.24 \pm 0.06$ and a slope of $0.55 \pm 0.04$. Notice that the Ly$\alpha$ and CIV relations are consistent within the errors. \begin{figure}[h!] \begin{center} \includegraphics[scale=0.4]{Lya_radius_luminosity_rel.pdf} \includegraphics[scale=0.4]{CIV_radius_luminosity_rel.pdf} \end{center} \caption{Ly$\alpha$ (left) and CIV (right) radius--luminosity relations. Blue triangles correspond to results from our high-$z$, high-luminosity sample, while red circles are taken from the literature. These are NGC3783, NGC5548, NGC7469, F9 and 3C390.3 for the Ly$\alpha$ relation, and NGC4395, NGC5548, NGC3783, NGC7469, and 3C390.3 for the CIV relation (\citeauthor{2005ApJ...632..799P}, 2005, \citeauthor{2006ApJ...641..638P}, 2006; \citeauthor{2015ApJ...806..128D}, 2015; Lira et al., submitted). Taken from Lira et al.~(submitted), \copyright AAS.} \end{figure} \section{BLR stratification} One crucial result that emerged early during the reverberation campaigns of nearby AGN was that the BLR was compact, dense and stratified \citep{1994ASPC...69....1P}, in contrast with previous photoionization results that attempted to explain all emission lines as produced by one set of physical parameters (or one single {\em cloud}). RM results made clear that different regions, with different properties, and located at different distances from the central engine, were producing the observed set of emission lines. To build a consistent picture of the BLR, therefore, it is important to determine where different lines are produced. Our results allows to put constraints on the distance at which Ly$\alpha$ and CIV are produced by obtaining $R_{\rm Ly\alpha}/R_{\rm CIV}$ for all source for which both lags have been measured. This is presented in Figure 4, where three sources at high-luminosities come from our lag determinations. Figure 4 clearly supports that $R_{\rm Ly\alpha}/R_{\rm CIV} \sim 1$ and that this ratio is independent of luminosity. \begin{figure}[h!] \begin{center} \includegraphics[scale=0.4]{Lya_to_CIV_lag_ratio.pdf} \end{center} \caption{Ly$\alpha$ to CIV lag ratios as a function of the $\lambda L_{\lambda} (1345{\rm \AA})$ luminosity continuum.} \end{figure} \section{Summary and conclusions} We have presented selected results from the RM campaign of 17 high-z, high-luminosity quasars, which lasted more than 10 years. For several sources lags between the continuum and BLR line emission were determined, allowing us to extend radius-luminosity relationships up to $\lambda L_{\lambda} (1345{\rm \AA}) \sim 10^{47}$ ergs/s. Continuum and line light curves for all sources can be found in Lira et al.~(submitted). \section*{Author Contributions} PL, IB, SK and HN comply with the requirements for authorship of this article. \section*{Acknowledgments} PL greatly acknowledges the support of the Chilean National TAC (CNTAC) which during more than 10 years allocated telescope time to conduct our reverberation campaign and to the funding by Fondecyt along all these years, and in particular to Project \#1161184. \tiny \bibliographystyle{frontiersinSCNS_ENG_HUMS}
\section{Introduction} \label{sec:introduction} Accretion on to black holes via an optically thick, geometrically thin accretion disc \citep{ShakuraSunyaev73} is thought to be the primary process through which luminous active galactic nuclei (AGN; $M_{\rm BH} \sim 10^{6-9}$\,$M_{\odot}$) and X-ray binaries (XRBs; $M_{\rm BH} \sim 10$\,$M_{\odot}$) are powered. Both types of system are powerful sources of X-rays which are thought to originate via Compton-upscattering of thermal ultraviolet (UV) emission from the disc by a corona of hot electrons \citep{HaardtMaraschi93}. The scattered X-rays then typically form an approximate power-law shape, which dominates the X-ray spectra of accreting black hole sources. In addition to this, other routinely observed spectral features include a `soft excess' $< 2$\,keV \citep{ScottStewartMateos12}, a `Compton reflection' component $> 10$\,keV \citep{NandraPounds94} and various emission lines - in particular, strong emission from Fe\,K$\alpha$ fluorescence at $\sim$6.4\,keV \citep{GeorgeFabian91}. Many details about the geometry and physics of the accretion flow are not well understood and disentangling such a wealth of emission components is challenging - however, X-ray timing provides an alternative diagnostic tool. Recent observations of frequency-dependent X-ray time delays with {\it RXTE}, {\it XMM-Newton} and {\it NuSTAR} have revealed a range of different phenomena. Delays between variations in different X-ray energy bands -- with the hard X-ray variations lagging behind the correlated soft X-ray variations (`hard lags') -- are commonly detected at low frequencies ($\sim$10$^{-5}$--$10^{-4}$\,Hz) in bright, variable AGN (e.g. \citealt{PapadakisNandraKazanas01,VaughanFabianNandra03,McHardy07,LobbanAlstonVaughan14,Kara16,JinDoneWard17}). Interestingly, the magnitude of the lag is often observed to increase with the separation of the energy bands. Hard lags were first detected in XRBs (e.g. Cygnus X-1: \citealt{Cui97,Nowak99}) and it has been argued that the observed lags in AGN and XRBs are analogous but scaled to the appropriate time-scale depending on the size scales of the emitting region (e.g. \citealt{McHardy06}). A number of models have been proposed to explain the delays, ranging from inverse-Compton scattering in the X-ray-producing corona (see \citealt{MiyamotoKitamoto89}) to X-ray reflection by the accretion disc \citep{KotovChurazovGilfanov01}. The leading model to explain the observed low-frequency hard lags is the `propagating fluctuations' model whereby changes in the local mass accretion rate propagate inwards through the accretion disc, powering an extended corona of hot X-ray producing electrons \citep{Lyubarskii97}. Here, stratification of the corona means that inward fluctuations firstly excite the outer, softer-X-ray-producing regions of the corona before driving emission with a harder spectrum from the inner regions, leading to an average hard delay. This model successfully accounts for many observed variability properties of XRBs such as the energy-dependence of the power spectral density (PSD). Further complexity is added to the lag behaviour by the detection of `soft lags', whereby more rapid soft X-ray variations lag behind the correlated harder X-ray variations \citep{DeMarco13}. These soft lags are typically observed in the same AGN that exhibit hard lags but at higher frequencies. They are often interpreted as a signature of the reverberation signal (see \citealt{Uttley14} for a review) as the primary X-ray emission is reflected by material close to the black hole (e.g. \citealt{ZoghbiUttleyFabian11,Fabian13}). An alternative interpretation has been proposed by \citet{Miller10} whereby both the hard and soft lags arise from scattering of the primary X-ray continuum in more distant circumnuclear material tens to hundreds of gravitational radii from the central source. However, a lot of support has recently built up behind the small-scale reverberation model through the discovery of Fe\,K features in lag-energy spectra (e.g. \citealt{AlstonDoneVaughan14,Kara14}). In this paper we study the X-ray lags of the luminous narrow-line Seyfert galaxy / quasar, PG\,1211+143 ($z = 0.0809$; \citealt{Marziani96}). PG\,1211+143 is X-ray bright with a typical X-ray luminosity of $\sim$10$^{44}$\,erg\,s$^{-1}$ and is also optically bright with a strong `Big Blue Bump'. This source is well-known for its spectral complexity and is the archetypal source for displaying strong evidence for a highly-ionized, high-velocity outflow \citep{Pounds03, PoundsPage06, PoundsReeves07, PoundsReeves09}. In addition, the source is observed to be relatively variable despite having a moderately large black hole mass of $M_{\rm BH} \sim 10^{7-8}$\,$M_{\odot}$ \citep{Kaspi00,Peterson04}. \citet{DeMarco11} studied the X-ray time lags using {\it XMM-Newton} data from 2001, 2004 and 2007. They discovered a lag at frequencies $\nu \lesssim 6 \times 10^{-4}$\,Hz, with the soft band (0.3--0.7\,keV) lagging behind the hard band (2--10\,keV) with a time delay of $\sim$500\,s. However, those observations were relatively short in duration ($\sim$40--50\,ks) and spread apart over a number of years, only allowing frequencies down to $\nu \sim 10^{-4}$\,Hz to be accessed. Here, we apply model-independent timing techniques to a new $\sim$630\,ks {\it XMM-Newton} campaign of PG\,1211+143. These {\it XMM-Newton} data have previously been described in \citet{Lobban16a, Lobban16b} and \citet{Pounds16a, Pounds16b}. \section{Observations and data reduction} \label{sec:observations_and_data_reduction} PG\,1211+143 was observed seven times in 2014 with {\it XMM-Newton} (\citealt{Jansen01}) between 2014-06-02 and 2014-07-07. Each observation had a typical duration of $\sim$100\,ks, except for the fifth observation (\textsc{rev}\,2664) which was shorter ($\sim$55\,ks), with a total duration of $\sim$630\,ks. Here, we utilize data aquired with the European Photon Imaging Cameras (EPIC): the pn and the two Metal-Oxide Semiconductor (MOS) detectors, which were operated using the medium filter and also in large-window mode ($\sim$94.9 per cent `livetime' for the pn; $\sim$99.5 per cent for the MOS). We processed all raw data using version 15.0 of the {\it XMM-Newton} Scientific Analysis Software (\textsc{sas}\footnote{\url{http://xmm.esac.esa.int/sas/}}) package, following standard procedures. The details of the data and their reduction are provided in \citet{Lobban16a}\footnote{As pointed out in \citet{Zoghbi10}, the instrumental background rate can be high at energies $\gtrsim 8$\,keV, due to fluorescent Cu and Zn lines arising from the detector. We utilize a large background region and note that the instrumental background region does not have a significant impact on our data. See \citet{Pounds16a} for a comparison of source and background spectra.}. In Table~\ref{tab:obs_log}, we provide an observation log of the {\it XMM-Newton} observations. \begin{table} \centering \begin{tabular}{l c c c c} \toprule Date / & \multirow{2}{*}{EPIC} & \multirow{2}{*}{Total Duration} & \multirow{2}{*}{Count} & \multirow{3}{*}{Flux} \\ ObsID / & \multirow{2}{*}{Camera} & \multirow{2}{*}{[Net Exposure]} & \multirow{2}{*}{Rate} & \\ (Revolution) & & & & \\ \midrule 2014-06-02 & pn & 83 [77] & 3.97 & 1.10 \\ 0745110101 & MOS\,1 & 78 [76] & 0.94 & 1.16 \\ (\textsc{rev}\,2652) & MOS\,2 & 85 [83] & 0.93 & 1.17 \\ \midrule 2014-06-15 & pn & 100 [86] & 2.65 & 0.83 \\ 0745110201 & MOS\,1 & 102 [97] & 0.57 & 0.83 \\ (\textsc{rev}\,2659) & MOS\,2 & 102 [98] & 0.63 & 0.85 \\ \midrule 2014-06-19 & pn & 99 [90] & 3.31 & 0.94 \\ 0745110301 & MOS\,1 & 101 [95] & 0.63 & 0.99 \\ (\textsc{rev}\,2661) & MOS\,2 & 101 [95] & 0.76 & 1.01 \\ \midrule 2014-06-23 & pn & 96 [89] & 3.89 & 1.09 \\ 0745110401 & MOS\,1 & 98 [95] & 0.82 & 1.11 \\ (\textsc{rev}\,2663) & MOS\,2 & 98 [95] & 0.89 & 1.13 \\ \midrule 2014-06-25 & pn & 54 [51] & 5.01 & 1.36 \\ 0745110501 & MOS\,1 & 56 [55] & 0.93 & 1.36 \\ (\textsc{rev}\,2664) & MOS\,2 & 56 [55] & 1.16 & 1.44 \\ \midrule 2014-06-29 & pn & 92 [85] & 4.80 & 1.26 \\ 0745110601 & MOS\,1 & 94 [91] & 0.98 & 1.31 \\ (\textsc{rev}\,2666) & MOS\,2 & 94 [91] & 1.09 & 1.33 \\ \midrule 2014-07-07 & pn & 95 [89] & 3.73 & 1.02 \\ 0745110701 & MOS\,1 & 97 [94] & 0.77 & 1.05 \\ (\textsc{rev}\,2670) & MOS\,2 & 97 [94] & 0.85 & 1.08 \\ \bottomrule \end{tabular} \caption{A log of the {\it XMM-Newton} observations of PG\,1211+143 made in 2014 (see Section~\ref{sec:observations_and_data_reduction}). The durations and net exposure times are given in ks, where `net exposure' refers to the integrated exposure time after accounting for the `dead time' of the detector. All count rates and observed fluxes are calculated after filtering out background flares and are quoted over the full 0.2--10\,keV energy band in units of ct\,s$^{-1}$ and $\times 10^{-11}$\,erg\,cm$^{-2}$\,s$^{-1}$, respectively. The observed fluxes are calculated from broad-band spectral modelling described in \citet{Lobban16a}.} \label{tab:obs_log} \end{table} \section{Results} \label{sec:results} \subsection{X-ray time lags} \label{sec:x-ray_time_lags} The lightcurve of PG\,1211+143 is shown in \citet{Lobban16a} (also later in Section~\ref{sec:x-ray_lightcurves}) and is found to be highly variable. We followed the methods described in \citet{VaughanNowak97}, \citet{Nowak99}, \citet{Vaughan03}, \citet{Uttley11}, and \citet{EpitropakisPapadakis16}, which allows the variability in two distinct broad energy bands to be compared by calculating the cross-spectrum. The seven lightcurves are split into a number of segments of identical length and, for each segment, their Discrete Fourier Transforms are computed. These are then combined to form auto- and cross-periodograms and averaged over the number of segments. This provides, as functions of Fourier frequency, estimates for the power spectra of the two bands, the coherence (see below) and time lags. We utilize data from all three EPIC detectors (to maximize $S/N$), initially using 70\,ks segments, accessing frequencies down to $\nu \sim 1.4 \times 10^{-5}$\,Hz. However, we must exclude data from the \textsc{rev}\,2664 observation, which is only $\sim$50\,ks in length. We also exclude the first $\sim$5\,ks of \textsc{rev}\,2663 due to a large background flare\footnote{\textsc{rev}\,2661 suffers from multiple flares towards the end of observation. However, this only results in $\lesssim 5$\,ks of flaring behaviour in our 70\,ks segment. We include this observation in our timing analysis since it does not significantly affect the results.} (see fig.\,1 of \citealt{Lobban16a}). In terms of assessing the reality of any measured time lags, one necessary criterion is that the light curves, at a given frequency, show some degree of coherence. The coherence is calculated from the magnitude of the cross-periodogram \citep{VaughanNowak97} and is a measure of the linear correlation between two energy bands. Its value should lie between 0 and 1, where a coherence of 0 means no correlation while a coherence of 1 signifies that the two energy bands perfectly linearly predict the variability in each other. The magnitude and shape of the measured lag-frequency spectrum will, in general, be sensitive to the choice of energy bands. We use two broad energy bands which provide a high level of coherence across a large range of frequencies: 0.7--1.5\,keV versus 2--10\,keV. The mean frequency-dependence of the time lags from the 2014 observations is shown in Fig.~\ref{fig:lag-frequency}. A more detailed energy dependence of the lags is presented in Section~\ref{sec:energy_dependence_lags}. We used light curves extracted with $\Delta t = 100$\,s time bins and average the auto- and cross-periodograms over contiguous frequency bins, each spanning a factor of $\sim$1.4 in frequency. The upper panel shows the coherence as a function of frequency, after Poisson noise correction \citep{VaughanNowak97}. Note that the coherence is high ($\sim$0.8--1) at low frequencies and up to $\nu \sim 3 \times 10^{-4}$\,Hz, implying that the soft and hard bands correlate well on long time-scales (i.e. $\gtrsim 3$\,ks). The coherence is not well constrained at higher frequencies, although we note that Poisson noise begins to dominate at $\nu \gtrsim 4 \times 10^{-4}$\,Hz, as shown by the power spectrum in \citet{Lobban16a}. \begin{figure} \begin{center} \hspace{-0.5em} \rotatebox{0}{\includegraphics[width=8.4cm]{2014_lag-f_70ks_35ks.eps}} \end{center} \vspace{-15pt} \caption{The cross-spectral products for the soft (0.7--1.5\,keV) and hard (2--10\,keV) X-ray bands in PG\,1211+143 from EPIC-pn+MOS data averaged across all orbits. Upper panel: the coherence between the two energy bands. Middle panel: the phase lag between the two bands. Lower panel: the time lag between the hard and soft band (a positive value denotes the hard band lagging behind the soft band). The black circles and red diamonds represent data computed with 70\,ks segments and 35\,ks segments, respectively.} \label{fig:lag-frequency} \end{figure} The middle and lower panels of Fig.~\ref{fig:lag-frequency} show the phase lags and time lags as a function of frequency, respectively. While the two energy bands are consistent with having zero lag at the very highest frequencies (i.e. $\gtrsim 1.5 \times 10^{-4}$\,Hz), a significant hard lag\footnote{We use the convention that a `hard' (or `positive') lag signifies a delayed response of the hard energy band compared to the soft one.} is detected $\lesssim$7$\times 10^{-5}$\,Hz, which increases roughly as a power law to a maximum time delay of $\sim$3\,ks at $\sim$1.4$\times 10^{-5}$\,Hz. This is the first detection of a low-frequency hard lag in PG\,1211+143. Additionally, we observe a soft, negative lag at $\sim$9$\times 10^{-5}$\,Hz, with a time delay, $\tau = -410 \pm 220$\,s. A soft lag in PG\,1211+143 was first detected by \citet{DeMarco11}. At the lowest frequencies probed here (i.e. $\sim$1.4 $\times 10^{-5}$\,Hz; 70\,ks segments), we are only afforded 1 Fourier frequency per $> 70$\,ks observation. This results in only 6 raw frequencies contributing to the lowest-frequency bin. We also computed the lags using 35\,ks segments which has the benefit of providing us with more segments to average over and allows us to include data from the shorter \textsc{rev}\,2664 observation. The coherence, phase lags and time lags estimated from 35\,ks segments are superimposed on Fig.~\ref{fig:lag-frequency} in red and are largely consistent with those obtained with 70\,ks segments down to $\nu \sim 3 \times 10^{-5}$\,Hz. \begin{figure} \begin{center} \hspace{-0.5em} \rotatebox{0}{\includegraphics[width=8.4cm]{soft_lag_200-700_vs_2000-5000_700-1500_vs_2000-10000_75ks_phase.eps}} \end{center} \vspace{-15pt} \caption{A detailed view of the soft lag in PG\,1211+143, comparing the 0.2--0.7\,keV band with a harder 2--5\,keV band, estimated using 70\,ks segments (black circles). Upper panel: the coherence between the two energy bands. Middle panel: the phase lag between the two bands. Lower panel: the time lag between the hard and soft band (a negative value denotes the soft band lagging behind the hard band). The blue squares show the view of the soft lag between the 0.7--1.5 and 2--10\,keV bands for comparison with Fig.~\ref{fig:lag-frequency}. A slight offset on the $x$-axis has been applied to the data to avoid overlapping error bars.} \label{fig:soft-lag} \end{figure} In Fig.~\ref{fig:soft-lag}, we show a more detailed view of the soft lag, again with $\Delta t = 100$\,s time bins, but now with a finer frequency binning, with each bin spanning a factor of $\sim$1.1 in frequency. This time we compare a soft 0.2--0.7\,keV band with a harder `continuum' band from 2--5\,keV. This is for a more direct comparison with results from the literature, which we discuss in Section~\ref{sec:discussion_soft_lag}. The lower panel of Fig.~\ref{fig:soft-lag} shows the time lag as a function of frequency where it can be seen that the soft lag extends over a wide range of frequencies ($\nu \sim 6 \times 10^{-5} - 1.5 \times 10^{-4}$\,Hz) with a peak time delay, $\tau = -790 \pm 260$\,s. For comparison, we also overlay the view of the soft lag (blue squares) using the same energy bands as in Fig.~\ref{fig:lag-frequency} (i.e. 0.7--1.5 vs 2--10\,keV) with the same finer frequency binning. \subsubsection{Energy dependence of the X-ray lags} \label{sec:energy_dependence_lags} Motivated by the detection of a significant low-frequency hard lag in PG\,1211+143, we investigated the lag as a function of energy. To calculate the lag-energy spectrum, a cross-spectral lag is calculated for a series of consecutive energy bands against a standard broad reference band over a given frequency range (e.g. \citealt{Uttley11}, \citealt{ZoghbiUttleyFabian11}, \citealt{AlstonDoneVaughan14}, \citealt{LobbanAlstonVaughan14}). The choice of reference band sets the arbitrary lag offset in the resultant lag-energy spectrum. Here, we generated cross-spectral products for 10 logarithmically-spaced energy bands from 0.2--10\,keV against a broad reference band consisting of the full 0.2--10\,keV energy range minus the energy band of interest\footnote{We also computed lag-energy spectra against a constant soft reference band of 0.2--0.7\,keV. The shape of the lag-energy spectrum was consistent with that obtained with the broad reference band, just with an offset on the $y$-axis.}. In this instance, a positive lag indicates that the given energy band lags behind the reference band. We note that errors on the individual lag estimates in each band were calculated using the standard method (e.g. \citealt{BendatPiersol10})\footnote{The lightcurves involved in the lag estimate for each band are all highly correlated. Since they are not independent realizations of a random process, we note that these errors are expected to be conservative since, between adjacent energy bins, they overestimate the scatter in the lags.}. \begin{figure} \begin{center} \hspace{-0.5em} \rotatebox{0}{\includegraphics[width=8.4cm]{2014_lag-e_hard_soft_broad_ref.eps}} \end{center} \vspace{-15pt} \caption{The energy dependence of the lags in PG\,1211+143 against a broad reference band minus the band of interest. The upper panel shows the lowest-frequency range where the hard lag is prominent ($\nu \sim 1.4 - 4.3 \times 10^{-5}$\,Hz). The middle and lower panels cover the frequency range where the high-frequency soft lag dominates: $\nu \sim 6-7.3 \times 10^{-5}$\,Hz (where the soft lag is strongest) and $\nu \sim 1-1.3 \times 10^{-4}$\,Hz, respectively. The black circles shows the lag-energy spectra averaged across all orbits while the red diamonds and green crosses show the lag-energy spectra averaged over \textsc{revs} 2652, 2666 and 2670 and \textsc{revs} 2659, 2661, 2663 and 2664, respectively. The grey solid line shows a fit of the form: $\tau = A$log$(E) + B$ to the averaged data.} \label{fig:lag-e} \end{figure} We computed lag-energy spectra over the lowest frequency bins obtained from our 35\,ks lag-frequency analysis in order to obtain better statistics (see Fig.~\ref{fig:lag-frequency}). This covers the $\nu \sim 1.4$--$4.3 \times 10^{-5}$\,Hz frequency range and is shown in Fig.~\ref{fig:lag-e} (upper panel). The mean low-frequency lag-energy spectrum averaged over all orbits is shown in black and suggests that the magnitude of the hard lag increases with the separation between energy bands, up to a time delay, $\tau$, of a few ks. The shape of the time-averaged lag-energy spectrum suggests that the time lag scales approximately linearly with log($E$), as predicted for the propagating fluctuation model \citep{KotovChurazovGilfanov01}. As such, we fitted the spectrum with a model of the form: $\tau = A$log$(E) + B$, where $A$ and $B$ are constants. The fit is overlaid in Fig.~\ref{fig:lag-e}. In these low-frequency data, we find that $A = 1.3 \pm 0.4$ and $B = 0.1 \pm 0.1$, with $\chi^{2}_{\nu} = 4.0/12$. Similar behaviour can be observed in AGN such as Ark 564 \citep{Kara13} and IRAS 18325-5926 \citep{LobbanAlstonVaughan14} along with XRBs such as Cygnus X-1 \citep{Nowak99} and GX 339-4 \citep{Uttley11}. \begin{figure} \begin{center} \hspace{-0.5em} \rotatebox{0}{\includegraphics[width=8.4cm]{pn_ratio_against_mean.eps}} \end{center} \vspace{-15pt} \caption{The seven EPIC-pn spectra from 2014 (\textsc{rev}\,2652: black; \textsc{rev}\,2659: red; \textsc{rev}\,2661: green; \textsc{rev}\,2663: blue; \textsc{rev}\,2664: cyan; \textsc{rev}\,2666: magenta; \textsc{rev}\,2670: grey) plotted as a ratio against the time-averaged mean spectrum.} \label{fig:ratio_spectrum} \end{figure} We searched for variations in the shape of the lag-energy spectrum by comparing the spectra obtained by combining only certain observations. The source is observed to undergo a significant absorption event in \textsc{rev}\,2659, which, in particular, manifests itself as a deep absorption trough in the soft-band RGS spectrum [see \citealt{Lobban16a} and Reeves, Lobban \& Pounds (in press), a forthcoming paper detailing the inter-orbit spectral variability]. The absorption event lasts for the order of a $\sim$few days and, towards the end of the campaign, the spectrum returns to a state closely resembling the \textsc{rev}\,2652 spectrum at the start of the campaign. All seven EPIC-pn spectra from 2014 are shown in \citet{Lobban16a} along with a high-flux / low-flux difference spectrum, which can be modelled with a steep power law ($\Gamma \sim 2.9$). Another way to visualise the inter-orbit spectral differences is to use ratio spectra. As such, we applied identical binning to all seven spectra. The binning was relatively coarse to increase the $S$/$N$ and help visualise the effect. We then divided each observation through by the time-averaged mean spectrum. These ratio spectra are shown in Fig.~\ref{fig:ratio_spectrum}. In terms of the low-frequency lags, a striking difference can be observed when comparing \textsc{revs} 2652, 2666 and 2670 with \textsc{revs} 2659, 2661, 2663 and 2664. The lag-energy data are shown in Fig.~\ref{fig:lag-e} (upper panel). In this instance, three orbits combine to produce the dominant steep shape of the spectrum. The remaining orbits combine to produce a completely different low-frequency lag whose energy dependence is much flatter (relative to the broad reference band). This behaviour is even more pronounced when probing the lower frequencies allowed with using 70\,ks segments with the hard lag reaching as high as $\sim$15--20\,ks in the \textsc{rev}\,2652+2666+2670 data when the energy-separation is largest - however, we stress that, in this case, there are only 3 `raw' measurements contributing to each bin and so our statistics are highly limited. In the middle and lower panels of Fig.~\ref{fig:lag-e}, we show the energy dependence of the high-frequency soft lag over two separate frequency ranges. The middle panel covers the $\nu \sim 6-7.3 \times 10^{-5}$\,Hz frequency range where the soft lag is strongest (see Fig.~\ref{fig:soft-lag}). We again compute lag-energy spectra against a broad reference band consisting of the full 0.2--10\,keV band minus the band of interest\footnote{We also investigated the energy dependence of the soft lag against a constant hard reference band of 2--5\,keV. The shape of the spectrum was unchanged although with a slight offset on the $y$-axis.}. The soft lag smoothly increases in magnitude at lower energies, similar to the behaviour observed in sources such as Ark 564 \citep{Kara13}. In the lower panel of Fig.~\ref{fig:lag-e}, we show the soft lag over a higher $\nu \sim 1-1.3 \times 10^{-4}$\,Hz frequency range. While the shape of the spectrum is similar, there is a hint of a peak in the lag-energy spectrum at $\sim$6\,keV which appears, in shape, similar to the Fe\,K lags reported in other sources (e.g. \citealt{AlstonDoneVaughan14,Kara14}). In both cases, we also show the energy dependence of the soft lag having combined observations consistently with the hard lag analysis. We find that the energy-dependence of the high-frequency soft lag does not vary with flux or over time in these data, regardless of the choice of reference band. While in Fig.~\ref{fig:lag-e}, we split the observations up according to an absorption event which occurs in \textsc{rev}\,2659, we also make an attempt to search for variations in the energy-dependence of the lag according to flux, using the same method described above. As such, we combined orbits to compute low-flux (\textsc{revs} 2659+2661), medium-flux (\textsc{revs} 2652+2663+2670) and high-flux (\textsc{revs} 2664+2666) lag-energy spectra. We note that \textsc{rev}\,2659 is markedly lower-flux and harder in spectral shape than any other orbit, but we cannot reliably measure the low-frequency lag using this observation alone as it would only offer a maximum of 2 `raw' frequency measurements, even using 35\,ks segments. As such, we combine this observation with the next-lowest-flux orbit: \textsc{rev}\,2661, which also shows significant spectral signatures of the absorption event, which peaked a few days earlier. The low-frequency lag-energy spectra are shown in Fig.~\ref{fig:lag-e_flux}, where the steep energy-dependence of the lag is dominated by the mid-flux observations. The energy-dependence is much flatter in both the low-flux and, curiously, the high-flux cases, suggesting that the variable behaviour of the low-frequency hard lag may require a more complex explanation than simple linear variations with flux. Finally, while we do not repeat the plots here, we also compared the energy-dependence of the soft lag at higher frequencies, finding no significant changes with flux or with the spectra shown in Fig.~\ref{fig:lag-e}. \begin{figure} \begin{center} \hspace{-0.5em} \rotatebox{0}{\includegraphics[width=8.4cm]{2014_lag-e_low-f_low_mid_high_flux.eps}} \end{center} \vspace{-15pt} \caption{The energy dependence of the low-frequency lags ($\nu \sim 1.4 - 4.3 \times 10^{-5}$\,Hz) in PG\,1211+143 against a broad reference band minus the band of interest. The black circles show the medium-flux (`average') orbits while the red diamonds and green crosses show the lag-energy spectra computed from low-flux and high-flux orbits, respectively.} \label{fig:lag-e_flux} \end{figure} \subsection{X-ray lightcurves} \label{sec:x-ray_lightcurves} The broad-band 0.2--10\,keV EPIC-pn lightcurve of PG\,1211+143 is shown in \citet{Lobban16a} with a 1\,ks timing resolution; the source varies by up to a factor of $\sim$2--3 over the course of the {\it XMM-Newton} campaign. Here, part of our analysis involves investigating the properties of the lightcurve at low frequencies, where we detect significant time delays between energy bands. Fig.~\ref{fig:lightcurve} shows the combined EPIC-pn+MOS lightcurves for each of the seven observations from 2014 across four different energy bands: 0.2--0.7, 0.7--1.5, 1.5--5 and 5--10\,keV. Each lightcurve was extracted with a timing resolution of $dt = 100$\,s and has been convolved with a broad Gaussian of width, $\sigma = 5$\,ks, such that the high-frequency variations are smoothed out. As such, only the low-frequency, longer-timescale variations remain. Each lightcurve has been normalized such that its mean count rate is equal to that of the broad-band 0.2--10\,keV EPIC-pn+MOS rate for a given observation. The lowest energy bands are found to be more variable with the 0.2--0.7 and 0.7--1.5\,keV bands varying by a factor of $\sim$3 (peak-to-peak) across all observations. Meanwhile, the 1.5--5 and 5--10\,keV bands roughly vary by factors of $\sim$2 and $\sim$0.5, respectively. To help assess the variability, we estimated 90\,per cent confidence intervals for each curve. For a given lightcurve, we simulated 1\,000 curves of identical length and with the same timing resolution ($dt = 100$\,s), where the total number of counts in each bin was derived from a Poisson distribution assuming a mean identical to the total number of counts in the original observed bin. We then convolved each simulated lightcurve with a Gaussian of width $\sigma = 5$\,ks and determined the 90\,per cent confidence limit by extracting the 5 and 95\,per cent values from the distribution of simulated light curves for each bin. We also include vertical dashed lines in Fig.~\ref{fig:lightcurve} to represent the points along each lightcurve where the convolution kernel reaches the edge of the curve. The half-width of the kernel is $3 \times \sigma$ and, hence, the convolution begins to become unreliable $\lesssim 15$\,ks from the end of each curve. \begin{figure} \begin{center} \hspace{-0.5em} \rotatebox{0}{\includegraphics[width=8.4cm]{2014_pn_mos_200-700_700-1500_1500-5000_5000-10000_smoothed_5ks_lc_confidence_bands.eps}} \end{center} \vspace{-15pt} \caption{The EPIC-pn+MOS lightcurves for each of the seven {\it XMM-Newton} observations from 2014 in four energy bands: 0.2--0.7 (black), 0.7--1.5 (red), 1.5--5 (green) and 5--10\,keV (blue). Each lightcurve has been smoothed through a convolution with a Gaussian of width, $\sigma = 5$\,ks. Within a given observation, the lightcurves were normalized to have the same mean count rate.} \label{fig:lightcurve} \end{figure} In general, it can be observed that the lightcurve has a similar shape across all energy bands. However, a closer look at Fig.~\ref{fig:lightcurve} reveals more complex behaviour within individual observations. For example, the first minimum in \textsc{rev}\,2652 appears to show the softer bands leading harder bands with progressively longer delays, with the three harder bands lagging behind the 0.2--0.7\,keV band by $\sim$3.4, $\sim$4.9 and $\sim$7.4\,ks, respectively. However, roughly opposite behaviour can be observed in \textsc{rev}\,2663, where the softest band appears to lag behind the harder bands with a large delay of up to $\gtrsim 10$\,ks during the first minimum. Curiously, these lags are then much less apparent throughout the rest of that particular observation - in particular, at the first maximum where there all four bands peak within $\sim$0.5\,ks of one another. Further complex behaviour can also be observed in \textsc{rev}\,2670 where the softer bands lead the harder bands by $\sim$2\,ks during the first two minima, but with no obvious delay at the first maximum (after $\sim$35\,ks). Gaussian smoothing is one of a variety of possible ways of filtering out high-frequency variations. While having the advantage of producing a smooth output, we do also provide an alternative approach by computing heavily-binned lightcurves in the same four energy bands. Here, we just focus on \textsc{rev}\,2663, which is one of the more interesting orbits, showing apparent variations in the behaviour at maxima and minima. We show the lightcurves in 5\,ks and 10\,ks bins in Fig.~\ref{fig:rev2663_5ks_10ks_lc}, which demonstrate roughly the same effect we observe in Fig.~\ref{fig:lightcurve}. In particular, the large soft delay occurring at the first minimum is clearly seen, along with the apparent lack of this behaviour during the large maximum $\sim$30\,ks later. It is clear that, throughout the course of the campaign, not all maxima and minima behave in the same way. As such, it is apparent that complex energy-dependent variations are taking place on long timescales in PG\,1211+143 with no particular low-frequency time lag persisting over time. \begin{figure} \begin{center} \hspace{-0.5em} \rotatebox{0}{\includegraphics[width=8.4cm]{rev2663_pn_mos_5ks_10ks_lc_four_bands.eps}} \end{center} \vspace{-15pt} \caption{The EPIC-pn+MOS lightcurves for \textsc{rev}\,2663 in four energy bands: 0.2--0.7 (black), 0.7--1.5 (red), 1.5--5 (green) and 5--10\,keV (blue). The lightcurves are heavily binned with $dt = 5$\,ks (upper panel) and $dt = 10$\,ks (lower panel). The lightcurves were normalized to have the same mean count rate.} \label{fig:rev2663_5ks_10ks_lc} \end{figure} A natural question to arise given a) the complex behaviour of the lightcurves in different energy bands, and b) the apparent changes in the lag behaviour between orbits is whether there are any clear spectral variations that may offer clues or an explanation. While all seven EPIC-pn spectra from 2014 and associated high-flux / low-flux difference spectra are shown in \citet{Lobban16a}, Fig.~\ref{fig:ratio_spectrum} shows all seven spectra as a ratio to the time-averaged mean. It is interesting to note that the \textsc{rev}\,2659 spectrum (red) is noticeably harder than the others. This is due to the spectrum being considerably more absorbed, which is evidenced by the sharp bite taken out of the spectrum at $\sim$0.8\,keV, predominantly arising from enhanced absorption from the unresolved transition array (UTA) from M-shell Fe transitions. This can clearly be seen in figure 4 of \citet{Lobban16a} where a deep absorption trough can be observed in the \textsc{rev}\,2659 Reflection Grating Spectrometer (RGS; \citealt{denHerder01}) data.\footnote{Meanwhile, a detailed spectral study of the variability of the outflow on inter-orbital timescales will be presented in Reeves, Lobban \& Pounds (in press).} While occurring sometime around \textsc{rev}\,2659, the strong absorption trough is still present, although weaker, in \textsc{rev}\,2661 and \textsc{rev}\,2663 and is coincident with the emergence of a slower moving, lower-ionization counterpart of the outflow (see \citealt{Pounds16a, Pounds16b}), while the soft excess is also diminished in flux. A near-simultaneous dip in flux can also be observed in the long-term {\it Swift} \citep{Gehrels04} lightcurves presented in \citet{Lobban16a} (see figure 12) with the UV and X-ray fluxes dropping by $\sim$20 and $\sim$50\,per cent, respectively, roughly a day or two before \textsc{rev}\,2659. Curiously, the enhanced absorption and emergence of the lower-ionization counterpart of the outflow appears to be simultaneous with the changing behaviour of the low-frequency hard lag, which becomes much weaker and has a flatter dependence on energy (see Fig.~\ref{fig:lag-e}: upper panel), before returning to its initial state towards the end of the campaign. Finally, an additional test was performed to search for any obvious short-term inter-orbit spectral variability. This was done by time-slicing all seven spectra into slices 10\,ks in length. The shape of each spectral slice can generally be modelled with two simple power laws - a harder power law ($\Gamma \sim 1.7$) dominating $\gtrsim 1.5$\,keV and a soft power law ($\Gamma \sim 2.9$) dominating at low energies $\lesssim 1.5$\,keV. However, the spectral variations on $\sim$10\,ks timescales are subtle and can be accounted for with small changes in the fluxes / photon indices of the two power laws (i.e. typically varying within $\sim$10\,per cent), which roughly track the behaviour of the soft and hard lightcurves. As such, there is nothing obvious about the spectral shape on short timescales that could contribute to the changing lag behaviour while the individual within-observation slices do not have the $S$/$N$ to detect significant changes in discrete features (e.g. parameters of the high-velocity outflow). \section{Discussion} \label{sec:discussion} In this paper, we have presented an analysis of the short-timescale X-ray variability of PG\,1211+143 with {\it XMM-Newton}. Through Fourier-based analysis, we have detected time lags in both the low- and high-frequency domains, which we now discuss in turn. \subsection{Low-frequency time delays and the nature of the `average' lag} \label{sec:discussion_hard_lag} In Section~\ref{sec:x-ray_time_lags}, we detected a hard lag where the 2--10\,keV band, on average, lags behind the softer 0.7--1.5\,keV band by $\sim$3\,ks at the lowest frequencies. This is the first detection of a hard lag in this source. Low-frequency hard lags are an important phenomenon as they may be ubiquitous in accreting black hole systems ranging from XRBs through to AGN with the frequency and amplitude of the lag scaling with black hole mass. As such, they likely carry important information about the structure of accretion flows surrounding black holes. The leading model to explain the existence of low-frequency hard lags is the `propagating fluctuations' model \citep{Lyubarskii97}. Such a model also predicts that the emitted X-rays follow a linear rms-flux relation (e.g. \citealt{ArevaloUttley06}), the likes of which has been observed in PG\,1211+143 (see \citealt{Lobban16a}). Additionally, such a model is consistent with the observed energy dependence of the hard lag in the sense that the time delay appears to increase with the separation of the energy bands. Given the similarities in the properties of the observed hard lags in XRBs (e.g. Cygnus X-1; \citealt{KotovChurazovGilfanov01}) and many variable AGN (e.g. \citealt{McHardy04}; \citealt{Fabian13}; \citealt{LobbanAlstonVaughan14}), it is conceivable that a similar mechanism is at work in all accreting black hole systems. The observed time-averaged low-frequency time lags in PG\,1211+143 are consistent with such a model and such a detection is useful for helping populate the higher-luminosity / higher-$M_{\rm BH}$ end of the scaling relations. However, we show that more complex time-dependent behaviour of the low-frequency hard lag is also apparent. By computing the low-frequency lag from combinations of specific observations, we find that the energy-dependence of the lag varies significantly, having a much steeper or flatter dependence (relative to the broad reference band) according to which orbits contribute to the lag (see Figs~\ref{fig:lag-e} and~\ref{fig:lag-e_flux}). While this changing behaviour of the low-frequency lag is curious, we only have a limited sample size at the lowest frequencies and so exercise caution in its interpretation. Nevertheless, variable lag behaviour could offer a unique insight into the accretion processes in AGN. One intriguing possible interpretation in the case of PG\,1211+143 may arise from the inter-orbit spectral behaviour which accompanies the lag variability. As Fig.~\ref{fig:ratio_spectrum} helps illustrate (but also see \citealt{Lobban16a}), a significant absorption event occurred around \textsc{rev}\,2659, lasting until roughly \textsc{rev}\,2663. Predominantly manifesting itself in the soft band through absorption of the UTA, the absorption event may hint at enhanced activity in the outflow, particularly as it is somewhat coincident with the emergence of a lower-velocity, lower-ionization counterpart of the outflow (see \citealt{Pounds16a, Pounds16b}; Reeves, Lobban \& Pounds in press). This absorption event is accompanied by a simultaneous drop in flux in the UV and X-ray bands (by $\sim$20 and $\sim$50\,per cent, respectively; see the {\it Swift} lightcurves presented in \citealt{Lobban16a}) and a diminished flux in the soft excess. Given that the low-frequency hard lag is not detected in \textsc{revs} 2659+2661 - and so is coincident with a significant absorption event - it is possible that the two events are linked, perhaps arising from a change / disruption in the inner accretion flow, before the hard lag re-emerges later in the campaign. In the context of highly variable absorption, it is possible that different physical processes are operating on different timescales - e.g. photoionization versus a longer recombination timescale. An interesting case study is the narrow-line Seyfert galaxy, NGC\,4051, where \citet{AlstonVaughanUttley13} found the low-frequency lag to be variable and dependent on the source flux. \citet{SilvaUttleyCostantini16} then investigated the same dataset using a detailed time-dependent photoionization code to predict the effects of intervening, ionized, absorbing material on the observed time lags. Curiously, they found that a warm absorber with the same properties as those observed in NGC\,4051, can produce soft X-ray lags in the low-frequency domain, where the time delay arises from radiative recombination and/or photoionization as the gas varies in response to the ionizing continuum. As such, the low-frequency lags may carry both the signature of a hard-lag-producing process intrinsic to the accretion flow and also a diluting soft lag associated with the warm absorber. As such, it is possible that similar effects are in play in the case of PG\,1211+143, scaled according to the properties of the system and its outflow. In order to interpret time lags physically, it is important to consider them in the time domain as well as in Fourier space. As such, we created a series of Gaussian-smoothed lightcurves, shown in Fig.~\ref{fig:lightcurve} (see Section~\ref{sec:x-ray_lightcurves}). The lightcurves show that the variability behaviour changes across maxima and minima from softer bands leading harder bands to harder bands leading softer bands to, occasionally, no clear lag at all. This is also illustrated in Fig.~\ref{fig:rev2663_5ks_10ks_lc}, where a long, soft-band delay can be observed towards the beginning of \textsc{rev}\,2663, which is then no longer apparent during the latter half of the orbit. So, while the low-frequency lags, when averaged across the entire 2014 campaign, appear consistent with the propagating fluctuations model, it is clear that more complex modes of behaviour may also be apparent on timescales of up to $\sim$days. As such, an alternative interpretation to the inter-orbital lag variations described above is that we are observing a combination of low-frequency X-ray time lags, possibly operating out-of-sync or on different timescales or even entirely independently of one another. Some support for this interpretation comes from Fig.~\ref{fig:soft-lag}, which shows a soft lead in the $\sim$4.5-6 $\times 10^{-5}$\,Hz band and a soft delay in the $\sim$6-7.2 $\times 10^{-5}$\,Hz band, both of which may be considered to be in the low-frequency domain. A natural question that may arise when one observes time delays is whether they are statistically significant or not. In one sense of the word, one may ask whether the apparent variations are due to random fluctuations in the Poisson noise, when, in fact, the two lightcurves vary simultaneously. Or, in other words, given infinite signal-to-noise, would the two lightcurves reach minima / maxima at the same time? In the case of PG\,1211+143, it is clear that some of the variations in some given energy band do not coincide with the confidence bands of different energy bands (e.g. in \textsc{rev}\,2663; see Fig.~\ref{fig:rev2663_5ks_10ks_lc}.). In a second sense of the term `significant', one could ask if the variations are due to intrinsic-but-random differences in the lightcurves, rather than a systematic delay - i.e. if given an infinitely-long lightcurve with an infinite number of maxima / minima, would one find the lags to be randomly distributed about zero? It is important to note that when Fourier methods are employed in performing time lag analysis, the result is an estimate of an {\it average} lag, assuming stationary processes. However, variability of AGN - and, indeed, XRBs - need not be so simple. Given a non-linear or non-stationary response function between energy bands, it could be that minima exhibit delays in a different sense to maxima. Then, given a sufficiently long dataset, one may find that the distributions of lags at minima and maxima were not centered on zero but also different. However, then using Fourier methods to perform a standard lag analysis would yield some weighted average of the different lags intrinsic to the different physical processes. As such, Fourier methods may have the potential to be misleading if the time lags are caused by anything more complicated than simple, linear response functions. It may even be the case that there is no such thing as ``the lag''. Indeed, if the observed lag is different, but nevertheless repeatable, at different parts of the lightcurve - for example, if maxima are different from minima and/or rises show different time delays to falls, then the average lag one estimates from Fourier analysis is some weighted average based on the shape of the lightcurve one happened to observe. \subsection{The high-frequency soft lag} \label{sec:discussion_soft_lag} We also detect the presence of a soft lag (i.e. softer X-rays lagging behind harder X-rays) at higher frequencies (see Figs~\ref{fig:lag-frequency} and~\ref{fig:soft-lag}). The lag occurs at frequencies $\gtrsim 6 \times 10^{-5}$\,Hz with an averaged peak time delay, $\tau = -790 \pm 260$\,s (when comparing the 0.2--0.7 and 2--5\,keV bands). Time lags in PG\,1211+143 were measured by \citet{DeMarco11} using {\it XMM-Newton} data acquired in 2001, 2004 and 2007. While a soft lag was detected with a similar time delay, it occurred at frequencies $> 10^{-4}$\,Hz. However, we note that the exact frequency and magnitude of the lag is sensitive to factors such as the chosen energy bands and frequency-binning. Additionally, \citet{DeMarco11} noted some degree of variability of the soft lag between 2001, 2004 and 2007 and only had access to much shorter datasets (typically $\sim$40--50\,ks in length) and so were unable to access the much broader range of frequencies probed with our longer observations here. \citet{DeMarco13} reported a scaling relation between the black hole mass and amplitude/frequency of the soft lag based on a sample of 15 AGN displaying high-frequency soft lags. They found that the observed frequency, $\nu$, and time lag, $\tau$, are related to the black hole mass by the following relations: log\,$\nu = -3.50[\pm0.07] - 0.47[\pm0.09]$\,log\,$(M_{\rm BH})$ and log\,$|\tau| = 1.98[\pm0.08] + 0.59[\pm0.11]$\,log\,$(M_{\rm BH})$, where $M_{\rm BH}$ is the black hole mass in units of $10^{7}$\,$M_{\odot}$. For the range of $M_{\rm BH}$ estimates for PG\,1211+143 ($\sim$10$^{7-8}$\,$M_{\odot}$), the scaling relations predict the frequency of the soft lag to lie in the range $\sim$8$\times10^{-5}$--$4 \times 10^{-4}$\,Hz, roughly consistent with what we observe. However, this is more consistent with the higher end of the $M_{\rm BH}$ estimate range. Meanwhile, the scaling relations predict the time delay to lie in the range $\sim$75--500\,s. Again, this is roughly consistent with what we observe. However, the peak time delay of $\tau = -790$\,s between the 0.2--0.7 and 2--5\,keV bands (see Fig.~\ref{fig:soft-lag}) is more consistent with a higher black hole mass (e.g. $\sim$3$\times 10^{8}$\,$M_{\odot}$). An alternative hypothesis could be that the black hole mass in PG\,1211+143 is at the lower end of the estimate range (e.g. $\sim$10$^7$\,$M_{\odot}$) and that the magnitude of the soft lag is particularly large. An additional way of estimating the black hole mass is to consider the well-established X-ray-rms--$M_{\rm BH}$ relation (e.g. \citealt{Ponti12}). Here, a robust correlation is found between the rms variability in the X-ray band and the mass of the central black hole, with a higher-amplitude of variability found to be associated with lower-mass systems. We test this in the case of PG\,1211+143 by calculating the normalized excess variance\footnote{The normalized excess variance is described in equation 1 of \citet{Ponti12} and is given by: $\sigma^{2}_{\rm rms} = 1/N\mu^{2} \sum^{N}_{i=1}[(X_{i} - \mu)^{2} - \sigma^{2}_{i}]$, where $N$ is the number of bins in the segment, $\mu$ is the mean count rate and $X_{i}$ is the count rate in a given bin with associated uncertainty, $\sigma_{i}$. The uncertainty on each measurement of $\sigma^{2}_{\rm rms}$ is given by equation A.1 of \citet{Ponti12}, but also see \citet{Vaughan03}.} for a series of lightcurves with 250\,s binning in the 2--10\,keV energy band and with segment lengths of 20, 40 and 80\,ks, for a like-for-like comparison with \citet{Ponti12}. We find measured values of $\sigma^{2}_{\rm rms}$ of $0.009 \pm 0.001$, $0.010 \pm 0.001$ and $0.015 \pm 0.001$ for the 20, 40 and 80\,ks-segment lightcurves, respectively. In the 20\,ks case, the best-fitting relationship derived by \citet{Ponti12} from their sample of AGN is given by: log\,($\sigma^{2}_{\rm rms}$) $= (-2.13 \pm 0.14) + (-1.24 \pm 0.12)$ log($M_{\rm BH, 7}$). The coefficients in the 40 and 80\,ks cases lie largely within these uncertainties. Our measured rms values predict the mass of the black hole in PG\,1211+143 to be $0.88 \pm 0.24$, $1.02 \pm 0.23$ and $0.81 \pm 0.20 \times 10^{7}$\,$M_{\odot}$ for the three cases, respectively. All of these lie at the lower end of the range of mass estimates, at odds with the measured properties of the soft lag. So this could suggest that the observed X-ray variability in PG\,1211+143 is enhanced or the soft lag occurs at higher frequencies and with a larger magnitude than predicted. Either way, we note that this may be one of the longest soft time delays detected in an AGN to date. The most popular model to explain high-frequency soft lags involves reverberation of the primary X-ray emission by material close to the black hole, perhaps via reflection (e.g. \citealt{ZoghbiUttleyFabian11,Fabian13,Uttley14}). In such a scenario, the observed time lag roughly corresponds to the distance between the primary and reprocessed emission sites. In the case of PG\,1211+143, a time delay $\lesssim 1$\,ks would correspond to a distance of a few-to-tens of $r_{\rm g}$ for the given range of black hole mass estimates. As such, the scaling of the characteristic timescales compared to lower-mass AGN (e.g. 1H0707-495; \citealt{ZoghbiUttleyFabian11}) may be consistent with the disc reverberation scenario. Additionally, in a number of sources, the energy-dependence of the high-frequency soft lags have shown evidence for features in the Fe\,K band (e.g. see \citealt{AlstonDoneVaughan14,Kara14}), which have been associated with the small-scale reverberation model. In Fig.~\ref{fig:lag-e}, we find there is a hint of a peak in the energy-dependence of the soft lag of PG\,1211+143 at $\sim$6\,keV, which appears similar to the Fe\,K lags detected in other sources. So, while the behaviour of the high-frequency soft lag in PG\,1211+143 shares similarities with the small-scale reverberation model, we do note that ionized reflection does not appear to be the dominant component in the X-ray spectrum. For example, the soft excess in the {\it XMM-Newton} spectrum is very smooth and does not appear to show any clear signatures of ionized reflection. Indeed, \citet{Pounds16b} find that the soft excess is well-fitted with a smooth, steep power law, which we show in \citet{Lobban16a} to be the component primarily responsible for the inter-orbit spectral variability. In \citet{Lobban16b} we fitted the broad-band spectrum with a relativistically-blurred ionized reflection model but find that we cannot simultaneously model the soft excess and the Fe\,K emission complex. Having accounted for the now well-established components of the high-velocity outflow in the spectrum, we find that an additional component of ionized reflection is allowed by the data, but it is of only moderate strength and predominantly manifests itself in a component of excess emission just red-ward of the Fe\,K$\alpha$ complex (but do see Fig.~\ref{fig:lag-e} and the above discussion of Fe\,K lags). So, while there may be a moderate component of ionized reflection in the broad-band X-ray spectrum of PG\,1211+143, it does not appear to be the dominant component. Alternatively, it may be conceivable that the soft lag is still produced by material close to the black hole but instead via a secondary Comptonization component (e.g. as per \citealt{Done12}; \citealt{GardnerDone14}; \citealt{Rozanska15}), perhaps associated with the outer layers of the accretion disc or the surface of the inner regions of the outflowing wind. \section*{Acknowledgements} This research has made use of the NASA Astronomical Data System (ADS), the NASA Extragalactic Database (NED) and is based on observations obtained with {\it XMM-Newton}, an ESA science mission with instruments and contributions directly funded by ESA Member States and NASA. This research is also based on observations with the NASA/UKSA/ASI mission {\it Swift}. APL acknowledges support from STFC consolidated grant ST/M001040/1 and JNR acknowledges financial support via NASA grant NNX15AF12G. We wish to thank our anonymous referee for a thorough and constructive review of our paper.
\section{Introduction} The celebrated Schelling model \cite{schelling} of spontaneous segregation in a society is one of the most popular models describing collective (social) behavior in communities of individuals. It can be formulated as follows: consider a lattice partially filled with social agents (individuals) represented by two colors, green and red. Colors designate social categories and according to the model, agents prefer to live in the surrounding of the neighbors with the same color. In the original work, Shelling considered a square lattice, where the number of neighbors is 8 (direct and diagonal nearest neighbors). An agent of some color (say, red), who has fraction of nearest neighbors of the same color below some threshold, $f$, is "unhappy" with its surrounding and can be moved to a randomly selected nearest empty lattice cell as long as such cell could be found. In another version of the model, unhappy agents could be moved to any unoccupied cell independent of the distance. Repeating many times these steps, one arrives at a dynamic equilibrium. Note that the number of agents of each color is conserved in course of such evolution. If the number of steps is tends to infinity, one can speak about the phase transition, which occurs at a critical value, $f^*$, such that for $f<f^*$ agents form monochrome clusters with mobile boundaries. The critical threshold, $f^*=\frac{1}{2}$, is exactly known for the Schelling model on a 1D lattice. For a two-dimensional square lattice the value of $f^*$ depends on whether occupied lattice sites are above or below the percolation transition. As discussed in \cite{stat2} the result $f^*=\frac{1}{2}$ in 2D holds only below the percolation transition. The Schelling model demonstrates how relatively weak short-ranged interactions which are encoded in the preference to live with people of the same social category, combined with mixing (ability to move to an empty place) could force global (macroscopic) changes in the system \cite{stat,stat2}. Moreover, these global changes appear abruptly as a first-order phase transition when the personal intolerance to unhappiness, quantitatively expressed in $f$, falls below some critical threshold, $f^*$. The Schelling model in its canonical form was aimed to uncover statistical mechanisms of racial/religious/social segregation associated with resettlement of humans in communities (e.g. city neighborhoods). Thus, the model naturally depends on spatial proximity among agents. To adapt the standard Schelling model to modern times, in which distant connections mediated by social networks such as Facebook, Twitter, etc, become even more important than those in agents' local physical neighborhoods, one can consider the segregation on the topological graph as this has been done in \cite{stat3,stat4,stat5,stat6} for various modifications of Schelling-like model. Our work remaining in the same paradigm, differs from the mentioned ones (i) by detailed study of the phase transitions between various topological structures of emerging communities, which is accompanied by the spectral analysis of corresponding adjacent and Laplacian matrices of networks, and (ii) by special updating procedure which keeps fixed the degree of connections of each network node. In our study we represent the society as a collection of agents from two social categories labeled by red and green colors, connected by some relations represented by edges in a social network. Our society is dynamic, which means that agents can create/destroy social interactions (edges). To formulate the Schelling-like model on a graph, one needs: i) to quantify the affinity for creation of social interactions between agents mediated by their social categories (node colors), and ii) to define the updating (mixing) rules. The details of our model are described in the next section, while here we provide some generic motivations behind the choice of dynamics and formulate the set of phenomena we are attempting to describe by our model. As we demonstrate below, a variant of the Schelling model operating on a graph instead of a lattice, is capable of reproducing a rich pattern of social behaviors beyond a simple segregation (clusterization). Specifically, we impose the following modifications of the original Schelling model: \begin{enumerate} \item We assume that the number of social connections of each agent (the vertex degree of the social network) is strictly conserved. The degree may vary from one agent to another, however for each particular agent it is fixed and cannot be changed during the society evolution. \item Updating rules (which replace mixing in the original Shelling model) consist of adding and removing social connections between agents (network links) under the condition of a strict conservation of a vertex degree in each network node. \item We formulate two different models (the details are provided below) for which we introduce a concept of collective triadic interactions between individuals. In the first model we consider a "polychromatic" network whose vertices belong to the set of $M$ different colors and recoloring of nodes is prohibited. The advantage/disadvantage of specific configurations are controlled by the parameter, $\mu$, which (depending on its sign) encourages or discourages the formation of unicolor triads (i.e. connected sets of three agents from the same social category joined together), and by the parameter $\nu$, which fixes the average number of cross-color links. In the second "colorless" model, the affinity parameter, $\gamma$ is attributed to any short triadic cycle in a network (triple of vertices joined together by 3 links). \end{enumerate} We are interested in typical patterns formed in evolving societies (networks), reached from an entirely random initial network configuration. The social network from that perspective is the Erd\H{o}s-R\'enyi graph. The extensions of our model to scale-free networks is the subject of follow-up studies. The paper is organized as follows. In Section II we introduce the two-parametric model of a "polychromatic" randomly evolving network with the advantage (or disadvantage) of monochrome triads and inter-color links formations. In Section III we propose a model of a "colorless" randomly evolving network favoring the formation of triangles (fully connected triads of nodes). For both models we discuss the results of our numerical simulations, provide the corresponding statistical arguments, and propose possible social interpretations of observed phenomena. In Conclusion we summarize our findings and formulate questions for future investigations. \section{Model I: Critical behavior in polychromatic networks} \subsection{Abstract model} Consider a topological network, where vertices are individuals (agents), and links -- "relations between individuals". Vertices (nodes) could be of different "features", tentatively assigned as "colors". For simplicity, we consider in details a dichromatic (green-red) network of nodes, however, obtained results can be straightforwardly generalized to polychromatic networks of $M\ge 2$ colors. The initial network configuration is a paricular random sample from a standard Erd\H{o}s-R\'enyi graph ensemble without multiple links. The vertex degree of each node is fixed at the network preparation and remains unchanged during the network evolution. We call such class of graphs the "constrained Erd\H{o}s-R\'enyi networks" (CERNs). As in the original Schelling model, we start with the case of $M=2$ colors and introduce two subclasses of nodes, denoted as "green" and "red", which could represent nations, races, religions, clans, genders, social statues, etc. of social agents. In our polychromatic model, individuals prefer to form "monochromatic triads" which are sets of three connected vertices connected by 2 links (open sets) or 3 links (closed sets). In \cite{2star} such sets are referred to as "2-star motifs". The advantage of formation of monochromatic triads of vertices replaces the original Schelling's "happiness with surroundings". To describe advantage/disadvantage of triads, we associate energies (chemical potentials) $\mu_{G}$ and $\mu_{R}$ to each unicolor green and red triad. In addition, we attribute the chemical potential $\nu$ to each cross-color pair of nodes. That enables us to define the partition function \begin{equation} Z=\sum e^{-(\mu_G N_G + \mu_R N_R + \nu D N_{GR})} \label{01} \end{equation} where $N_G$ and $N_R$ are numbers of green and red triads of vertices? $\mu_G$ and $\mu_R$ are respective chemical potentials, $N_{GR}$ is the number of cross-color links, and $D$ is the average degree of the network. The sum in \eq{01} runs over all possible configurations in the network for fixed number of bonds under the condition that \emph{the degree of each vertex is the same as in the seed network}. Our partition function can be considered as the combination of the models suggested in \cite{crit1} (for $\nu=0$) and \cite{arenas} (for $\mu_G=0, \mu_R$=0). Computing \eq{01} is a challenging problem, however is feasible at least in the mean-field approximation since it resembles in some aspects the generalization of the model discussed in \cite{2star}, where the interaction between nearest-neighboring \emph{nodes} is quadratic (i.e. only two joint links are involved in the interaction). The analytic approach for the two-color model will plan to discuss in a separate publication \cite{forth}. To proceed with numerics, we use currently the dynamic algorithm which replaces the numerical evaluation of the combinatorial problem \eq{01} by running stochastic evolution of the CERN (the discrete Langevin dynamics), starting from some initial configuration until the evolution converges. The initial state of the network is prepared by connecting any randomly taken pair of vertices with the probability $p$ (regardless the node color). Then, one randomly chooses two arbitrary links, say, between vertices $i$ and $j$, ($i$--$j$) and between $k$ and $m$, ($k$--$m$), and reconnect them, getting new links ($i$--$m$) and ($j$--$k$) as shown in \fig{f01}a. Such a reconnection conserves the vertex degree \cite{maslov}. As prescribed in \cite{maslov}, if at least one of the links attempted to be generated by the rewiring step exists already, this step is aborted and a new pair of links is selected. That prevents of creating multiple links between the same pair of nodes. Then, following \cite{maslov2,maslov3}, we apply the standard Metropolis rule to each step of a reconnection. The Metropolis rules are as follows: i) if after the rewiring the number of connected unicolor connected triads of nodes (green or red) is increased, a move is accepted, ii) if the number of connected unicolor triad of nodes is decreased by some $\Delta n$, or remains unchanged, a move is accepted with the probability $e^{-\mu \Delta n}$. Here it was assumed that $\mu_R=\mu_G=\mu$, however the generalization to $\mu_R\neq \mu_G$ is straightforward. The network updating after one step of Metropolis dynamics is schematically shown in \fig{f01}b. \begin{figure}[ht] \centerline{\includegraphics[width=12cm]{sch-f01}} \caption{(a) Switching of links preserving degrees of all vertices; (b) Example of a local network updating process which increases the number of red and green triads by one. Thick lines (right) highlight edges connecting new unicolor (red and green) triads that were absent before the switch (left).} \label{f01} \end{figure} The Metropolis algorithm runs repetitively for a large set of randomly chosen pairs of links, until it converges. In \cite{algor} it has been shown that the algorithm actually converges to the true ground state in the equilibrium ensemble of random undirected colorless Erd\H{o}s-R\'enyi networks with fixed vertex degree. For polychromatic networks such a convergence has not yet been considered rigorously in the literature. Below we describe typical patterns of behavior of a dichromatic constrained Erd\H{o}s-R\'enyi network in various regions of the 2D-parameter plane $(\mu,\nu)$, where $\mu=\mu_G=\mu_R$ and $\nu$ are correspondingly chemical potentials for unicolor connected triads of nodes (red and green), and for cross-color pairs of nodes. Our investigation of a novel two-color constrained Erd\H{o}s-R\'enyi network with equal chemical potentials $\mu_G=\mu_R=\mu$ for unicolor connected triads of nodes, and $\nu$ for cross-color pairs of nodes, provides the following results in different regions of the two-dimensional parameter plane $(\mu,\nu)$. \subsubsection{$\mu=0$: Network defragmentation in absence of affinity of unicolor connected triads} \label{s:01} At $\nu=0$ (compare to \cite{crit1}), the two-color network is absolutely unstable with respect to any energy $\mu>0$ favoring formation of unicolor triads of connected vertices, and immediately splits into two mostly monochrome (green and red) clusters, or "layers" (one layer = one color) with relatively small number of cross-color connections between them. The number of cross-color links, $N_{GR}$, rapidly vanishes in this regime as a function of $\mu$. \subsubsection{$\mu\neq 0, \nu \neq 0$: Transition from "cross-community" to "intra-community" network topologies} \label{s:02} If $\mu\neq 0, \nu \neq 0$ the typical phase portrait of the model is shown in \fig{f02}a,b. In \fig{f02}a we have plotted the fraction of cross-color links, $\rho_{RG} = N_{RG}/N$. The region $\nu>\mu$ is characterized by the plateau in the density of inter-color links where the network is bipartite and demonstrates the "cross-community" structure. To the contrary, the region $\nu<\mu$ looks as two weakly connected unicolor clusters with vanishing density of cross-color links. We call this region "the intra-community dominated phase". At $(\mu>\mu_{crit},\nu>\nu_{crit})$, these two phases are separated by the first-order phase transition critical line, while at small values of $(\mu,\nu)$, the transition between two phases occurs as a smooth crossover. In the region $\nu>\mu$ at high values of $\nu$ we have $\rho_{GR}\to 1$. To understand better the topological structure of the network, we have drawn in \fig{f02}b the behavior of the third moment of the spectral density, which measures the bipartitness of the network \cite{bipart}. \begin{figure}[ht] \centerline{\includegraphics[width=15cm]{sch-f02}} \caption{Phase portrait of the network in the parameter $(\mu,\nu)$--plane: (a) Density plot of the fraction of cross-color links, $\rho_{GR}(\mu,\nu)$; (b) Density plot of the third moment of the spectral density, which measures bipartitness of the network. In the simulations there are 128 nodes of each color, $p=0.15$, averaging is performed over 500 realizations.} \label{f02} \end{figure} The behavior of the fraction of cross-color links, $\rho_{GR}$ near the critical line is plotted in \fig{f03} for two particular cross-sections. In \fig{f03}a we have fixed the chemical potential of cross-color links, $\nu=0.1$ and have looked at the dependence $\rho_{GR}(\nu)$. In the region $\mu<\mu_{crit}$ the function $\rho_{GR}(\mu)$ develops a finite plateau, while at $\mu\approx \mu_{crit}$ the number of cross-color links nearly vanishes and remains negligible with further increasing of $\nu$. In the lower panel of \fig{f02} we have shown the dependence of the second eigenvalue, $\lambda_2$ of the Laplacian matrix of the network as a function of $\nu$. It is known that $\lambda_2$ measures the minimal number of links which should be cut to split the connected network into two disconnected parts. As one sees, the behaviors $\lambda_2(\mu)$ and $\rho_{GR}(\mu)$ coincide, which we consider as an additional support of the correct interpretation of the topological structure of our dichromatic network. In \fig{f03}b we have studied an opposite situation and have fixed the chemical potential of unicolor triads at $\mu=0.1$, investigating the dependence $\rho_{GR}(\nu)$. Slightly below the transition point, $\nu_{crit}$, the function $\rho_{GR}(\nu)$ grows very rapidly (in fact, exponentially), reaching just above $\nu_{crit}$ the plateau, $\rho_{GR} = 1$, which is the semi-infinite plateau observed in \cite{arenas}. Measuring the dependence of the second eigenvalue $\lambda_2$ of the Laplacian matrix of the network on $\nu$, we reproduce the behavior of the function $\rho_{GR}(\nu)$ and demonstrate that in the plateau regime, the network is almost bipartite graph looking as a Corbino disk filled by the links connecting the inner and outer boundaries. \begin{figure}[ht] \centerline{\includegraphics[width=16cm]{sch-f03}} \caption{(a) Fraction of cross-color bonds, $\rho_{GR}$, as the function of the chemical potential of unicolor triads, $\mu$ at fixed chemical potential of cross-color bonds, $\nu=0.1$ -- upper panel, and the behavior of the second eigenvalue of Laplacian matrix, $\lambda_2(\mu)$ -- lower panel; (b) The behavior $\rho_{GR}(\nu)$ at fixed $\mu=0.1$ -- upper panel, and the behavior $\lambda_2(\nu)$ -- lower panel.} \label{f03} \end{figure} If there is no affinity of unicolor triad formation, i.e. $\mu=0$, which is the case of works \cite{arenas,radicchi,manheim}, the fraction of cross-color links $\rho_{GR}$ grows exponentially with $\nu$ slightly below $\nu_{crit}$, at which the plateau begins without the jump. \subsubsection{Leadership formation} \label{s:03} When the number of cross-color links is small, at $\nu =\nu_{crit}$ the centrality of the network \cite{centrality} gets changed and strongly decreases above $\nu_{crit}$. The same happens at the plateau exit in the regime \ref{s:02}. In such cases the "spontaneously induced leadership" emerges. Two communities start to communicate via two spontaneously emerged "leaders" (hubs) \cite{crit2,aguirre} which have many connections inside the community and only one (or a few) emitted outside. The example of $M=4$-color network (of 64 nodes in each color) is shown \fig{f:hubs}. The social interpretation of this effect is discussed at length of the Section \ref{s:int} while here we propose some hand-waving statistical arguments behind the phenomenon. There are two question to be elucidated: \begin{itemize} \item[(i)] why the clusters in the vicinity of the transition point in the "intra-community phase" ($\mu>\nu$, both $\mu$ and $\nu$ are large) communicate through "leaders" (or "ambassadors") \item[(ii)] who becomes the "ambassador", i.e. is any correlation between the vertex degree and the possibility to become a "leader" in a polarized world? \end{itemize} \begin{figure}[ht] \centerline{\includegraphics[width=10cm]{sch-f04}} \caption{Typical sample of $M=4$-color network in the "intra-community" phase near the transition boundary. The "ambassadors" provide communication gates between clusters. Each cluster has 64 nodes.} \label{f:hubs} \end{figure} The answer to the question (i) is straightforward. The free energy of the network consists of energetic and entropic parts. At $\mu<\mu_{crit}$ and $\nu<\nu_{crit}$ the entropy, which tends to "mix" links in the whole network as much as possible under prescribed conservation laws, has the contribution comparable to the energy. Thus, the multi-gate "democratic" communication between communities is entropically favorable. However, at $\mu>\mu_{crit}$ and $\nu>\nu_{crit}$, the entropic contribution becomes negligible with respect to the energy of collective interactions, and when $\mu<\nu$, the system tries to minimize cross-community contacts. The "ambassador"-like topology is the unique possibility for communications between polarized clusters in energy-dominated phase before the complete rupture of all relations. Whether the network could be completely deframented at $\mu\gg 1$ and finite $\nu$, depends on the density of bonds, $p$, at the preparation condition. This question definitely requires additional investigation. The answer to the question (ii) seems a bit counterintuitive: the network nodes with intermediate values of vertex degrees (conditionally called "dark horses"), are the best candidates for the leaders in the polarized world. The statistical explanation of this effect is as follows. Network nodes, randomly acquired large vertex degree at the preparation condition are most "energetically favorable" since they could participate in many triads of the same color. From this point of view, we gain more energy connecting these nodes to the vertices of the \emph{same} color. Thus, the "best" nodes do their job inside their own communities and for communication to the "external world" the "next to the best" vertices should be chosen. It is an open and difficult question how this selection happens precisely. The sociological interpretation of this effect we provide in Section \ref{s:int}. \subsection{Overview of the phase behavior and finite-size corrections} The first two phenomena, described in Sections \ref{s:01}-\ref{s:02} are analogous of the segregation happen in the original Schelling model. Indeed, in the Schelling model the social segregation begins at some critical value of "happiness with the surroundings" \cite{schelling}, which in our model is replaced on the graph by the chemical potential $\mu$ controlling the affinity of connected triads of nodes of one social category. In our consideration the Schelling-like segregation occurs at any positive $\mu$. The principal distinction between our model on a graph and the original Schelling model on a lattice is two-fold. Firstly, the adjacency matrix in the Schelling model corresponds to the distribution of neighbors on a two-dimensional surface, while in our model we deal with the topological network and do not care about lengths of network bonds and their weights, taking into account only their presence or absence. Secondly, our model on the graph demonstrates some features of spin glass behavior due to the condition of "quenched" vertex degree distribution in course of the network rearrangement, thus making the phase diagram more rich compared to the original Schelling model which by definition is "annealed". The most important feature of the regime considered in Section \ref{s:02} is the presence of a critical line started at some point $(\mu_{crit}, \nu_{crit})$ in the phase space. This means that the passage from the "intra-community dominated phase" to the "cross-community dominated phase" at large chemical potentials occurs via a phase transition. The vertex degree conservation serves as the local constraint, while the maximization of monochromatic triads and cross-color links, is the global condition. We have investigated the dependence of the critical behavior of the system on the total number of nodes, $N$. The density plots $\rho_{GR}$ in the $(\mu,\nu)$ parametric plane are shown in \fig{f04} for three different values of $N$: for $N=128$ -- in \fig{f04}a, for $N=256$ -- in \fig{f04}b, and for $N=512$ -- in \fig{f04}c. \begin{widetext} \begin{figure}[ht] \centerline{\includegraphics[width=17cm]{sch-f05}} \caption{The phase diagrams (density plots of $\rho_{GR}$) in the $(\mu,\nu)$-plane for three different values of $N$: (a) $N=128$, (b) $N=256$, (c) $N=512$.} \label{f04} \end{figure} \end{widetext} Two comments on these plots are in order. Firstly, we see the strong dependence of position of the end point of the critical line, $(\mu_{crit},\nu_{crit})$, on $N$: it is located at the distance $\sim N_{-1}$ along the diagonal from $(\mu,\nu)=0$. Secondly, the equation for the critical line $\mu=\nu$ is $N$-independent, though depends on the number of colors as it will be shown at length of the Section \ref{s:many}. \subsection{Social interpretation} In the context of social dynamics, our model captures some aspects of competition between individual and collective behaviors. This issue has been addressed in \cite{gran,competition, castellano}. The papers \cite{competition, castellano} review the applications of methods of statistical physics to the social phenomena. The phase transition between cross-community and inter-community behavior, found in our two-parametric ($\mu,\nu$) colored topological network is expected to occur in a wide context of social systems including inter-state communications, formation of crime clans and groups of interests. We hope that some modification of the model, which takes into account different weights of directed links, could describe relationships between social agents of different genders, races, or ethnicities. The conservation of the number of connections between individuals (i.e. the conservation of degrees of network vertices) requested in our model is crucial for the emergent behavior reported above, though seems rather natural for evolution of many real social networks. The degree of a network node represents the "extent of extroversion" (presumably fixed) of social agents incorporated into the network. Special attention should be paid to the paper \cite{gran} discussing the situation in which agents with relatively small number of links could in some situations strongly influence the structure of the whole network. In our model the behavior discussed in \cite{gran} manifests itself in the role of "dark horses" (the bonds with moderate number of nodes): just such "weak" nodes become the leaders (or "ambassadors") in a polychromatic network in the proximity of the transition point. It should be emphasized that our model yet describes only the non-directed connections. Thus, its immediate application to gender relations seems restricted since gender relations are not obliged to be transitive: the interest of $A$ to $B$ does not imply immediately that $B$ is interested in $A$ as well. Formally, the extension of our model to take into account the non-transitivity is not difficult -- we should attribute different weights to matrix elements $a_{ij}$ and $a_{ji}$ making the adjacency matrix non-symmetric and then apply spectral methods. However the interpretation of results is not very straightforward since the topological sense of eigenvalues (which become complex), and of moments of the spectral density for non-symmetric adjacency and Laplacian matrices is hidden. Taking into account the existence of reliable data on friendship relations (see, for example \cite{ander}), the corresponding graph-topological analysis of oriented networks and its comparison with other statistical methods is highly demanded. \subsubsection{International relations} \label{s:int} The transition between the bipartite graph structure (the cross-community topology) to weakly connected closed societies (the intra-community topology) discussed in Section \ref{s:02} has possible implication in schematic description of international relations between countries, which being usually transitive, are described by the symmetric adjacency matrix. Let us begin with the "dichromatic world" consisting of agents of two colors only (red and green). At high weights of parameters $\mu$ (triple in-color connections), representing collective national relations, and $\nu$ (pair cross-color relations), representing international relations, our system can be found in one of two possible phases (i) and (ii): \begin{itemize} \item[(i)] at $\mu>\nu$ the network provides an example of a pair of "closed communities" characterized by a very small number of cross-color "international" links \item[(ii)] at $\mu<\nu$ the networks acquires a nearly bipartite "open world" structure dominated by international relations. \end{itemize} The two phases (i) and (ii) are separated by the critical line of the phase transition with a very narrow transition region. Within this regime there is a competition between the "energies" of unicolor triads of nodes (intra-state), and pairs of cross-color nodes (inter-state). At low values of $\mu$ and $\nu$ (when $(\mu<\mu_{crit},\nu<\nu_{crit})$ -- see \fig{f02}), a crossover regime between two phases is governed by the competition between energetic and entropic effects. One could interpret the tendency to form monochromatic triples of connected nodes, controlled by $\mu$, -- as the extent of a population nationalism, while the cross-color preference, controlled by $\nu$, -- as the tolerance towards formation of international ties. We argue that in the regime where at least one of the parameters (either $\mu$ or $\nu$) is large, a switch between the nationalism-dominated phase to the tolerance-dominated phase occurs as a 1st order phase transition. This observation might have important consequences for internal and international policies of the state. Our study clearly shows that, at high values of $\mu$ and $\nu$, manipulating by relative weights attributed to internal and international issues is quite risky, since the switch of the population' attention between different paradigms is very sharp. Even a modest increase of $\nu$ favoring international communications (e.g. due to state's desire to benefit from international trade), or conversely, a modest increase of $\mu$ favoring national coherence (e.g. as state's attempt to rally people around some kind of national idea, for example, national sport, or jointly fight against the "external enemy"), both could lead to a sudden and irreversible changes of the collective paradigm of the society. Societal changes at the beginning of a war may operate in this regime of an abrupt (first-order) phase transition. To the contrary, evolutionary smooth collective changes are possible at low weights in the crossover regime, when the society is less polarized. The transition from two closed societies in a highly polarized world to the relatively open bipartite world resembles much the end of the cold war around 90s of the previous century. Our study shows that the picture of the phase transition remains the same if the chemical potentials $\mu_G$ and $\mu_R$ are different. In that case the phase transition curve depends on the sum $\mu_G+\mu_R$. In social terms it means that it is sufficient to have a strong nationalism in one country only (say, making $\mu_G$ big) to polarize the world, even in nationalism in another society is low ($\mu_R$ is small). The signature of such a behavior we see in the modern world: the patriotism based on the military rhetoric of one of current players, pushes the world to the new turn of the cold war -- formation of closed weakly communicating societies. Even more intriguing phenomenon occurs when communities are closed and the number of inter-community links, $N_{GR}$ is relatively small. In such a regime, the importance of hubs increases drastically \cite{aguirre,crit2} culminating in the spontaneous emergence of leaders/ambassadors considered in Section \ref{s:03}. All international relations between countries pass in this case through a small number of newly created "hubs" representing country's leaders or "ambassadors". It is eligible to ask the question: "Who becomes the ambassador at the transition point?" We have examined numerically this question and rather counterintuitive answer is as follows: the "dark horse", i.e. the "weak" node with a moderate number of links at the preparation condition becomes the leader, mediating the cross-community relations in the regime when closed societies are dominated. This rhymes well with the conclusion of the work \cite{gran} where the importance of "weak ties" has been emphasized. The statistical arguments behind this effect are provided in Section \ref{s:03}. \subsubsection{Criminal clans} The tendency of humans to establish social interactions with members of the same social category (the same stratum) is well known from the "everyday's experience" and is supported by many investigations. In some sense, this is the continuation of the friendship relations, which in the extreme case can be considered as collective relations in one gang. Typically friendship relations are transitive and can be attributed to the non-oriented edges connecting vertices (social agents) of the network. The polarization of relationships between two conflicting gangs living in one area, happens according to our model, by increasing the "in-gang" collective affinity ($\mu$), decreasing of "cross-gangs" communication ($\nu$), and leads to the "intra-community" dominated network topology. In extremely polarized societies, the cross-clans relations are mediated by ambassadors -- the criminal authorities. There are two scenarios to convert this network structure to the much less polarized bipartite "cross-community" dominated phase. The first scenario implies increasing the chemical potential of cross-community relations, $\nu$. This could be realized in practice by opening, for example, a joint sport centers where agents of different communities could meet each other. However the transition from polarized to cross-community phase is supposed to be sharp (1st order phase transition), and as every 1st order transition could be accompanied by the instability. The second scenario implies decreasing the collective in-color affinity, $\mu$, for example, by diminishing the time spent by social agents together. Such effect could be reached by providing relevant job offers. The second scenario looks more preferable since the passage to the bipartite cross-community phase happens as a crossover if $(\mu<\mu_{crit},\nu<\nu_{crit})$ and therefore is less sharp and not accompanied by instabilities. \subsection{Spectral view on dichromatic networks} Let us make few comments concerning the spectral properties of our dichromatic network. To this aim we need some standard notions from the graph theory. It is convenient to study the network evolution using the network adjacency matrix, $A$, of size $N\times N$, whose elements, $a_{ij}$ are defined as follows: $a_{ij}=1$ if vertices $i$ and $j$ are connected, and $a_{ij}=0$ otherwise. More information about the network structure can be obtained by studying its Laplacian matrix, $L=D-A$, which is related to the adjacency matrix, $A$, and the diagonal matrix, $D$, with the elements $d_{i}=\sum_{j=1}^{N} a_{ij}$, $i=1,...,N$. The Laplacian matrix is positively defined and has the minimal eigenvalue $\lambda_1=0$ corresponding to the homogeneous eigenvector $\mathbf{v}_1= (1,\dots, 1)$. The degeneration of $\lambda_1$ (i.e. the number of zero's eigenvalues in $L$) defines the number of disconnected components of the graph. The behavior of the second eigenvalue of the Laplacian, $\lambda_2$, in random graphs is the subject of several mathematical studies \cite{second3,second4} and has an important meaning, known as "the algebraic connectivity". In particular, if $\lambda_2>0$, the graph is connected. We have seen that $\lambda_2$ as a function of $\mu$ and $\nu$ behaves exactly the same as $N_{GR}$ see \fig{f02}, \fig{f03}. This can be considered as the check of the numerical analysis. Quantitatively, the plateau entrance in the $\mu=0$ limit can be formulated in terms of relation between $\lambda_2$ and $\lambda_3$ \cite{arenas}. \begin{equation} \lambda_2(A,\mu)=\lambda_3(L,\mu) \label{05} \end{equation} where $\lambda_2(A,\mu)$ is the second eigenvalue of the Laplacian matrix of the cluster $A$, and $\lambda_3(L,\mu)$ is the third eigenvalue of the Laplacian matrix of the whole network $L$. The second eigenvalue $\lambda_2$ besides its topological sense discussed in the section \ref{s:02} has an important physical meaning: it defines the diffusion time for the propagation of an excitation in the network. The relation \eq{05} is perfectly seen in our numerical simulations. \subsection{Clusterization in polychromatic graphs} \label{s:many} The clusterization holds also for polychromatic networks of $M\ge 2$ colors. The unicolor clusters get formed above some critical values of $\mu_i$ which depend on $\nu_{ik}$, where $(i,j)=1,..., M$. The new phenomena taking place in the polychromatic network, is as follows. Since each cluster yields the separated eigenvalue in the spectrum of the Laplacian matrix of the network, we obtain $M$ isolated eigenvalues in the spectrum apart from the continuum. These are low-energy modes which turns out to be organized in the second zone. To get the intuition about the critical behavior of multicolor networks we have considered the $M=3$--color network with the particular choice of chemical potentials involving only two parameters. Namely, we have simulated the network with $\mu_1=\mu_2=\mu_3=\mu$ and $\nu_{12}= \nu_{13}=\nu_{23}=\nu$. The results of simulations are presented in \fig{f05}a,b showing the density plot of cross-color links (\fig{05}a) and the third moment of the spectral density (\fig{05}b). Two phases separated by the critical lines are three monochromatic clusters and a tripartite graph. The new interesting feature of this case is that the slope of the critical line gets changed, having the slope described by the equation $\nu= \frac{2}{3} \mu$ for $M=3$. The end of the critical line approaches the point $(0,0)$ on the phase diagram in the same way as for two-color network shown in the family of diagrams \fig{f04}, i.e. as $N^{-1}$ for three networks of 85 nodes each. \begin{figure}[ht] \centerline{\includegraphics[width=15cm]{sch-f06}} \caption{The density plots of phase diagram for the three-color network having 85 nodes of each color (compare to the two color network shown in \fig{f02}): (a) the cross-color density of links; (b) the averaged third moment of spectral density.} \label{f05} \end{figure} The social interpretation of polychromatic network of $M$ colors is a straightforward generalization of the dichromatic model discussed at length of Section \ref{s:int}. In polychromatic networks the spontaneous emergence of communities in the initially homogeneous network is again accompanied by self-organized extraction of leaders/ambassadors. This happens when the parameter $\mu$ controlling the "co-identities of small groups" is increasing while the parameter $\nu$ of the cross-community relations is fixed. The described scenario provides a conceptual model of social dynamics in a primitive communal society when the division of labor and stratification of society just emerged. \section{Model II: Emergence of small interconnected groups} \subsection{Favoring of triangles (regime A)} So far we have discussed the stability of communities in polychromatic networks with respect to the interplay between the number of unicolor triadic contacts and cross-color connections, which mimic social contacts in small groups of individuals. Here we consider a different phenomena occurring in a \emph{colorless} network, where we have an advantage/disadvantage of primitive "motifs" -- small connected subgraphs of special topology (3-cycles, 4-cycles, etc). The evolution of the network again strictly preserves the degrees of all individual nodes favoring (or preventing) the formation of triads of connected nodes. Such a degree-preserving rewiring dynamics via the Metropolis algorithm with energy determined by the number of small topological motifs (triangles, squares, or some feedback loops) was first considered in Refs. \cite{maslov2,maslov3} and is schematically depicted in \fig{f06}. The Metropolis dynamics controlled by a single chemical potential, $\gamma$, which makes formation of small closed loops ("social clubs") either preferred, or undesirable. In what follows we consider the case of triangles only (complete graph of three nodes). We are asking when the society, represented by its social network, is stable with respect to the change of $\gamma$, see \cite{avet}. \begin{figure}[ht] \centerline{\includegraphics[width=14cm]{sch-f07}} \caption{(a) Switching of network links preserving degrees of all vertices; (b) Example of a local network updating move which increases the number of triangles.} \label{f06} \end{figure} Let us begin with the case $\gamma>0$, which makes the formation of 3-cycles favorable. If the vertex degree of graph nodes is not fixed, the advantage of 3-cycles forces the formation of so-called Strauss clusters \cite{strauss}. This case has been analytically investigated in \cite{burda,newman}. It was argued that, when $\gamma$ is changing (while staying positive), the system develops two phases with essentially different concentration of 3-cycles: at large $\gamma$ the system falls into the Strauss phase with a single clique (almost full sub-graph) of nodes, while at small $\gamma$ the system looks as a weakly clustered random Erd\H{o}s-R\'enyi graph. The condensation of triads is a non-perturbative phenomenon identified in \cite{burda,newman} with the 1st order phase transition or crossover for different regions of parameter space in the framework of the mean-field cavity-like approach. The system behaves essentially differently when a vertex degree is strictly conserved during the Metropolis rewiring. We found that above some critical fugacity, $\gamma_c$, a large network is fragmented into a collection of $[p^{-1}]$ almost fully connected sub-graphs (cliques) \cite{avet}, where $p$ is the bond formation probability in the initial random Erd\H{o}s-R\'enyi network and $[...]$ denotes the integer part of the argument. In \fig{f07}a,b we show typical structure of adjacency matrices at few intermediate stages of network rewiring towards the ground states of constrained (\fig{f07}a) and unconstrained (\fig{f07}b) Erd\H{o}s-R\'enyi networks (reproduced from \cite{avet}). The adjacency matrix $A$ in the ground state of the constrained network has block-diagonal structure with slightly fluctuating blocks of the mean size $N/[p^{-1}] \approx Np$. In contrast, the ground state in the unconstrained Erd\H{o}s-R\'enyi network in the Strauss phase consists of a single complete clique. To visualize the kinetics, we enumerated vertices at the preparation condition in arbitrary order and run the Metropolis stochastic dynamics. When the system is equilibrated and the cliques are formed, we re-enumerated vertices sequentially according to their belongings to cliques. Then we restored corresponding dynamic pathways back to the initial configuration. \begin{figure}[ht] \centerline{\includegraphics[width=15cm]{sch-f08}} \caption{Few typical samples of intermediate stages of network evolution: (a) Networks with strictly conserved vertex degree (our model); (b) Networks with non-conserved vertex degree ("Strauss model") [reproduced from \cite{avet}].} \label{f07} \end{figure} It should be pointed out that the phase transition in the model with the conserved vertex degree distribution has been discussed in \cite{tamm}, however the key nature of the system, the multi-clique structure, was overlooked. \subsection{Suppression of triangles (regime B)} The negative value of the chemical potential $\gamma$ means that the triangles are suppressed. In this case the network evolution gives rise to an interesting critical behavior conjectured in \cite{bipart}, resulting in a nearly bipartite network in which connections within each cluster are suppressed. Namely, in the vicinity of some critical value, $\gamma_c<0$, the number of triangles decreases nearly to zero, making the network bipartite. The adjacency matrix acquires the block-off-diagonal form. Topologically the network looks as an annulus filled by links connecting nodes in the boundaries. In \fig{f08} the dependence of the transitivity $C$ and the Estrada index $\beta$ which are the measures of network bipartiteness \cite{estrada} is plotted. \begin{figure}[ht] \centerline{\includegraphics[width=13cm]{sch-f09}} \caption{Critical behavior at negative $\gamma$.} \label{f08} \end{figure} \subsection{Social interpretation of regimes A and B} Various ground state network topologies found in models A and B have allow different social interpretations. The simplest example of a short cycle (or more generally, of a fully-connected small clique) could be identified with a family consisting of two parents and a child. Thus, by increasing/decreasing the weight favoring short cycles (which means the relative "proximity" of relations in the family), one can increase/decrease the role of a family in the social structure of the society. On the basis of the model A, we conjecture that by increasing the role of families, i.e. by increasing the average number of triangles, one could trigger defragmentation of initially homogeneous "proto-civilization" into a collection of weakly-connected communities. The number of communities depends on the number of connections in the proto-civilization. One could speculate about the applicability of this model to the description of segregation in prehistoric societies. It is known that the transition from the life in the open air to the life in caves increased the role of tight group and hence increased the affinity of small circles which in turn forced the separation of the entire network (society) in communities-clans. It would be interesting to incorporate our model in the identification of social and cultural communities in the archeological context reviewd in \cite{brugh}. To the contrary, in the model B the family-like communities are suppressed and a complete restructuring of the social network happens at a critical point. Below some critical level of suppression of triangles, $\gamma_c$, the whole society gets completely polarized into two big subgroups. This emergent property is driven exclusively by the entropic forces. Connections within each of two subgroups are very loose and the major fraction of links connect vertices between opposite groups. There are various social interpretations of inter-group links, but within each of these interpretations agents prefer to develop "external relations" than to form in-group connections. Interestingly, this effect goes beyond the mean-field theoretical description. Our current understanding of this transition lags behind that of its counterpart taking place at positive $\gamma$. \section{Conclusions} In this work we explore critical phenomena taking place in evolving social networks. In particular, we study two models inspired by the classical Schelling model of social segregation. Both models exhibit rich collective behavior. The network evolution in our simulations starts from an Erd\H{o}s-R\'enyi random graph, and all vertex degrees are strictly conserved in the course of rewiring dynamics. The first model describes a "polychromatic" network with vertices of different "colors" which are attributed to different social categories. The driving mechanism for the network evolution is the competition between monochromatic triads of connected vertices of the same color, and links between pairs of vertices of different colors. The phase portrait of this two-parametric model is analyzed in our study. It turns out that if connected monochromatic triads dominate, the network spontaneously splits into weakly connected clusters (one cluster per each color). Defragmentation of a network with respect to such a "color segregation" can be viewed as an effective mechanism of revealing hidden layers (stratification) in a society. Since the whole effect depends only on the sum of chemical potentials for the monochromatic triadic interactions in each color, the chemical potential in one color is capable of inducing effective interactions in other colors. In the opposite limit, where the formation of cross-color links dominates, the network develops a bipartite structure. We have identified a critical line separating these two regimes at large values of chemical potentials $\mu$ and $\nu$, while at small values the phase is replaced by a crossover behavior. The main implications of our results for real-life social networks could be as follows. In a two-color society, whenever the weight controlling intra-community triads, or that controlling pairwise inter-community connections is high enough, a "risky" regime favoring abrupt first-order phase transitions between the "cross-community" and the "intra-community" network topologies is realized. To avoid unpredictable societal transformations ("revolutions"), both triadic and pairwise weights should be kept well below some critical values. The window for the crossover regime at small weights decreases as $N^{-1}$ as the size of the network, $N$, is increased. Another interesting feature is as follows: in the regime with small number of inter-color links, each cluster of a particular color selects a single "ambassador" (the leader), to whom all cross-society connections are delegated. In the second (colorless) model we observe how a constrained network acquires several qualitatively different topologies separated by abrupt phase transitions. The driving force behind these transitions is the advantage/disadvantage of formation of small closed connected groups of individuals (3-cycles of graphs nodes). Above some critical value $\gamma^+>0$, attributed to 3-cycle motifs, the society gets spontaneously defragmented into a set of weakly interacting communities. Contrary, the suppression of 3-cycles, leads below $\gamma^-<0$ to formation of a polarized two-community (bipartite) structure with loose intra-community connections. Such phenomena, though expected from the mathematical studies, have been observed in the simulations for the first time and to the best of our knowledge have not yet been discussed in any physical/social context. Our simultaneous consideration of two different models (polychromatic and colorless) is motivated by following reasons: these models represent two faces of segregation: due to multiple interactions of species of different types (in the polychromatic model I) and due to formation of subgraphs of special topology (in the colorless model II). Both models deserve detailed analytic investigation and the model I seems more feasible since the corresponding Hamiltonian is quadratic in pairs of links. There are several natural directions for the further studies. To name but a few of them in the social context, let us point out that it is desirable to consider more general situation when the total number of links in the network, $N$, could vary. In this case the Markov chain language would be useful. It should be emphasized that the networks we consider in this study, belong to the so-called "mixed ensemble" where the number of links (and vertices) is fixed as in microcanonical ensemble, while the number of 3-cycles is controlled by the chemical potential as in the canonical ensemble. Critical properties of this ensemble differ from the ones of the canonical ensemble in which chemical potentials control both for numbers of links and 3-cycles as in \cite{strauss}, or from the microcanonical ensemble in which both these numbers are fixed \cite{radin}. Comparison of different ensembles seems very intriguing question since the full microcanonical ensemble exhibits a number of phases which still are waiting for proper identification. We also plan to relax partially the constraint of strictly fixed vertex degree in all nodes, allowing the vertex degrees to fluctuate under some control in course of network rewiring. If the control of fluctuation is entirely lost, the network will ultimately fall into the Strauss phase, however how it happens for large systems, continuously or critically, is a challenging open question. Last but not least open question deals with the connection between the topological structure of directed networks and the spectral analysis of corresponding non-symmetric adjacency matrix. \begin{acknowledgments} The authors are grateful for A. Andreev, D. Grebenkov, A. Poddiakov, M. Tamm and D. Ushakov for useful discussions. The work of V.A. was supported within frameworks of the state task for ICP RAS 0082-2014-0001 (state registration AAAA-A17-117040610310-6); the work of A.G. was performed at the Institute for Information Transmission Problems within the financial support of the Russian Science Foundation (Grant No.14-50-00150); O.V. thanks to Program of Fundamental Reasearch of Higher School of Economics; S.N. acknowledges the support of the RFBR grant No. 16-02-00252. V.A and S.N. are grateful to the RFBR grant No. 18-29-03167. \end{acknowledgments}
\section{introduction} Recent observations in the Galactic Center (GC) revealed a population of young stars, which is consistent with a star formation episode $\sim 4-6$~Myr ago \citep[the young nuclear cluster, YNC, e.g.,][]{Lu+09,Bartko+10,Do+13kin,Do+130.5pc,Feldmeier+15}. These young stars appear to have two distinct kinematic structures around the Supermassive Black Hole (SMBH). Closer to the SMBH ($\lsim 0.04$~pc) the stars have an isotropic distribution with high eccentricities \citep[following a thermal distribution][]{Gillessen+17} and may be slightly older as the highest mass stars are B stars \citep{Ghez+03}. These stars are the so called S-star cluster \citep[e.g.,][]{Schodel+03,Ghez+05,Eisenhauer+05,Ghez+08,Gillessen+09,Bartko+10,Yelda+14}. Between $\sim 0.04$~pc and $0.5$~pc, roughly $3/4$ of the stars are old, late-type giants and the remaining $1/4$ are young stars, including many massive Wolf-Rayet stars \citep{Levin+03,Genzel+03,Eis+05,Paumard+06,Lu+09,Bartko+09,Yelda+14}. Over time, the kinematic picture is becoming more precise as it has become possible to measure accelerations on the plane of the sky. Recently, \citet{Yelda+14}, using high precision kinematic measurements and modeling of $116$ young stars in the inner $\sim 1$~pc of the GC, suggested that the stellar disk is composed of $\sim 20\%$ of the stars sampled between $\sim 0.04$~pc and $0.5$~pc. The off-disk stellar population is less constrained and seems to be extended beyond $\sim 0.1$~pc ($\sim 3.2''$). The existence of additional substructure in this regime has been suggested (for example a warped disk), but it seems to have low significance \citep{Bartko+09}. Dynamical modeling of the stars in the disk yields an average stellar eccentricity of $\sim 0.3$ \citep{Yelda+14}. Moreover, the stars in the disk seem to follow a moderately top-heavy mass function \citep{Bartko+10,Lu+13}. In addition, the B stars in the disk have on average, similar kinematic properties as the more massive O and WR stars, suggesting a common star formation event \citep{Lu+13}. The presence of the disk and its proprieties provide an important constraint to the origin of the young stars, which are hard to form in the inhospitable environment around the SMBH \citep[e.g.,][]{Levin07}. For example, it was suggested that the young S-star cluster might have formed further out in the disk and migrated in \citep[e.g.,][]{Levin+03,Nayakshin06,Levin07,Alexander+08}. Note, that there are many other ideas in the literature of the origin of the young stars in the GC, varying from breaking up binaries \citep[e.g.,][]{Hills88,Yu+03,Perets09}, to collisions and mergers \citep[e.g.,][]{Ginsburg07,AP12,Stephan+16}, and others \citep[e.g.,][]{Perets07,Hobbs+09,Perets+09}. However, the kinematic substructure of the YNC, mentioned above, suggests that the cluster, and thus the young stars, formed in-situ rather than far from the SMBH \citep[e.g.,][]{Berukoff+06,Lu+09,Yelda+14,Stostad+15,Feldmeier+15}. The stellar membership estimations and the modeling of the disk's properties are based on multiple years of astrometric measurements, but typically only use {\it one} radial velocity ($V_z$) measurement \citep[e.g.,][]{Bartko+09,Yelda+14}. However, if at least some of the stars in the disk are in a binary configuration, the associate z-component velocity may be misleading, resulting in poor disk membership interpretation, and with larger apparent eccentricity around the SMBH than the physical one. Interestingly, among the stars with detected accelerations on the plane of the sky, which generally have the most robust disk membership estimate, the photometrically identified binary \citep{Martins+06} IRS 16SW has the lowest disk membership probability \citep{Yelda+14}. Recent observations have suggested that binaries are prevalent in our Galaxy \citep[$\gsim 70\%$ for ABO spectral type stars, e.g.,][]{Raghavan+10}. Thus, on face value, the binary fraction should be large among the young stars in the GC as well. So far, there have been three confirmed binaries in the inner $\sim0.2$~pc of the GC. The first confirmed binary (IRS 16SW) is an equal-mass binary ($50$~M$_\odot$) at a projected distance estimated as $\sim0.05$~pc with a period of 19.5 days \citep{Ott+99,Martins+06,Rafelski+07}. Recently, \citet{Pfuhl+13} discovered two additional binaries, an eclipsing Wolf-Rayet binary with a period of 2.3 days, and a long-period binary with an eccentricity of 0.3 and a period of 224 days. Both of these binaries are estimated to be at only $\sim0.1$~pc from the SMBH. These observational studies suggest that the total massive binary fraction in the Young nuclear star cluster is comparable to the galactic one \citep[e.g.,][]{Ott+99,Rafelski+07}. Recently \citet{Stephan+16} showed that the binary fraction in the nuclear star cluster might be as high as $70\%$, compared to the initial binary fraction, following a star formation episode that took place in that region a few million years ago \citep[e.g.,][]{Lu+13}. Furthermore, other studies focusing on the overabundance of observed X-ray sources in the central 1pc suggests that compact binaries, involving stellar-mass BHs and neutron stars, may reside there in larger than average numbers \citep{Muno+05}. Together, these studies suggest that binaries are likely to be prevalent at the GC. \begin{figure*} \centering \begin{minipage}[t][][b]{\textwidth} \centering \hspace{-4.5cm} \begin{minipage}[b]{.32\textwidth} \centering \includegraphics[scale=.49]{SingleStarsNewDec6.pdf} \end{minipage}\hspace{3.8cm \begin{minipage}[b]{.32\textwidth} \centering \includegraphics[scale=.49]{binaryStarsNewDec6.pdf} \end{minipage} \end{minipage}\par\medskip \begin{minipage}[b]{\textwidth} \centering \includegraphics[scale=.52]{VaDHistDec28.pdf} \end{minipage} \qquad\caption{ {\it Top panels}: 3D representation of the disk. {\it Top left panel}: stars in the disk, without accounting for the binaries' affect on the velocity. The inset shows the distribution of the the $v_z$ component for the binaries' center of mass motion around the SMBH. {\it Top right panel}: stars in the disk while accounting for binaries affect on the velocities. The color code shows the observed z-component velocities for binary stars, i.e., $v_{z,{\rm obs}}=v_z+\delta v_{z,{\rm obs}}$. The inset shows the distribution of the z-component velocity of these binary stars around the SMBH. {\it Bottom panel} shows the $z$-component velocity as a function of the stellar disk's semi-major axis $a_D$. We show the input velocity $v_z$ (blue), the induced wobble $\delta v_{z, {\rm obs}}$ (red) and the observed part $v_{z,\rm obs}=v_z +\delta v_{z, {\rm obs}}$. For illustrative purposes we show only $20\%$ from the Monte-Carlo simulations. The cyan line shows the maximum value of $v_{z,\rm obs}$. We show the associated probability densities of these quantities in the right bottom panel. Note that unless said explicitly, we consider the $e_D=0$ case. } \label{fig:Diskvel} \hspace{1cm} \vspace{0.5cm} \end{figure*} Several groups have begun to explore the dynamical effects of binaries (both stellar and compact objects) in shaping the physical properties of stellar distribution in the GC. For example, binaries are invoked to explain some long-standing observational puzzles, such as hypervelocity stars, the young stars in the S-cluster, the dark cusp, etc., \citep[e.g., ][]{Hills88,Yu+03,Antonini+10,OLeary+09,Perets+09,AH09,AP12,AP13,Phifer+13,Prodan+15,Witzel+14,Witzel+17,Stephan+16}. Furthermore, it has been suggested that compact object binaries in the GC are a potential source of gravitational wave emission \citep[e.g.,][]{OLeary+09,AP12,Prodan+15,Hoang+17}. Within the vicinity of a SMBH, the members of a stable binary have a tighter orbital configuration than the orbit of their mutual center of mass around the SMBH. In such a system, gravitational perturbations from the SMBH can induce large eccentricities on the binary orbit, which can cause the binary members to merge \citep[see for review of the dynamics][]{Naoz16}. This coalescence may form a new star that can look like the G2 and G1 objects \citep{Phifer+13,Prodan+15,Witzel+14,Witzel+17,Stephan+16}, which may eventually become blue stragglers \citep[e.g.,][]{NF}. Here we suggest that some of the puzzling observations associated with the stellar disk may arise from neglecting the contribution of binaries to the kinematic measurements. {Ignoring the contribution of binaries is known to cause an overestimation of the dynamical mass of star clusters \citep[e.g.][]{Kouwenhoven+08}.} We demonstrate the importance of including binaries in the GC kinematic modeling by adopting a thin stellar disk with a population of binaries. We focus on the effects in inferring the disk's properties as a result of neglecting the presence of these binaries. In particular, we show that ignoring the motion of binaries may lead to reduced disk membership and an increased apparent eccentricity and semi-major axis of the stars in the disk. We present our initial conditions in Section \ref{sec:ICs} and present the spirant biases and disk properties in Section \ref{sec:ap}, and finally, discuss our results and implication in Section \ref{sec:dis}. \section{Initial conditions for disk Binaries }\label{sec:ICs} \begin{figure} \hspace{-2.8cm} \centering \begin{minipage}[t][][b]{.4\textwidth} \centering \includegraphics[scale=.32]{PdensityProjBetaDec6.pdf} \end{minipage}\par\medskip \begin{minipage}[b]{.4\textwidth} \hspace{-1.4cm} \includegraphics[scale=.38]{SkyProjectZoomDec6.pdf} \end{minipage} \qquad\caption{ {\it Top row}: The density probability of the apparent orbital parameters as a result of the binary wobble. We show the (right from left) the apparent ascending nodes ($\Omega_{\rm ap}$), inclination, ($i_{\rm ap}$), and the quantity $\beta$. No change in the parameters yields a zero tilt angle. {The green dashed lines in each panel mark the peak of the distribution. The black dashed line represents the $\beta$ angle associated with $68\%$ of the population (see text). } {\it Bottom panel}: Apparent sky projection of the disk in an equal area Mollweide projection. The direction of the normal vector is described by the inclination ($i_{\rm ap}$), depicts here by horizontal lines spaced $45^\circ$ apart) and the angle to the ascending node ($\Omega_{\rm ap}$) longitudinal lines spaced $45^\circ$ apart, with the line marked N representing $0^\circ$). The razor thin initial disk was set to be at $(i_D,\Omega_D)=(130^\circ,96^\circ)$. The color shows the density of systems in $0.2$ square degree pixel area. The light blue X marks the maximum density peak disk value, which corresponds to $i_D$ and $\Omega_D$. We also note that some systems do exist in the left half sphere of the sky-projection plot, but the density is very low corresponding to light yellow in the color palette.} \label{fig:angles} \hspace{1cm} \end{figure} We present a proof-of-concept calculation of the effect of the binary motion on the apparent orbital parameters. We assume a razor thin stellar disk around a $4\times 10^6$~M$_\odot$ SMBH \citep[e.g.,][]{Ghez+08,Boehle+16,Gillessen+17}. We model the disk extending from $0.04$~pc to $0.5$~pc around the SMBH. The semi-major axis of the orbit around the SMBH ($a_2$) is chosen to have a Bahcall-Wolf-like distribution with the number density $n(r)\sim r^{-2}$ \citep[as supported by observations, e.g.,][]{Lu+09,Stostad+15}. Note that the number of stars in a shell can be written as $dN=4\pi r^2 n(r)dr$, and thus the choice of the semi-major axis around the SMBH follows a uniform distribution in $a_2$ (i.e., constant $dN/dr$) between $0.04$~pc and $0.5$~pc. We adopt \citet{Yelda+14} orbital parameters for the disk location on the Sky. Specifically, we set $i_D=130^\circ$ and $\Omega_D=96^\circ$. The angle $i_D$ is the inclination with respect to the observer, such that $\cos i_D=h_z/h_D$, where $h_z$ is the z-component of the angular momentum of a star ${\bf h}_D$ and $h_D$ is the magnitude of the stellar orbital angular momentum around the SMBH. {The $z$ axis is along the line of sight} and the observer is located at $z=-8.32$~kpc \citep[e.g.,][]{Gillessen+17}. In the first simulation, each binary star system is assigned to be on a circular velocity around the SMBH (i.e., $e_D=0$ for all the orbits). In a second simulations, the binaries are put on orbits around the SMBH with $e_D=0.3$. The nominal, default, case we consider throughout the paper is the case for $e_D=0$, and we will refer to the eccentric case for comparison in our results. We model a total of $80,000$ systems for two disk's eccentricity choices ($40,000$ per choice of disk's eccentricity) and for each system use a uniform distribution to chose (1) the argument of periapsis of the orbit around the SMBH, $\omega$ ($0^\circ$ to $360^\circ$) and (2) the mean anomaly of the orbit around the SMBH ($0^\circ$ to $180^\circ$), from which we find the true anomaly for the circular and eccentric cases. Given these orbital parameter we can find the location (${\bf r}_D=(x,y,z)$) and velocity (${\bf v}_D=(v_{x},v_{y},v_{z})$) of the stars in the disk \citep[e.g.,][]{MD00}. We note that compared to the \citet{MD00} transformation, the observation convention is such that $x\to y$ and $y\to -x$. This convention corresponds to having the origin of the longtime of ascending nodes ($\Omega$) in the north, corresponding to positive $x$ \citep[e.g.,][]{Ghez+05}. The top left panel in Figure \ref{fig:Diskvel} shows the 3D representation of the disk, color coded by the z-component of the velocities around the SMBH, $v_z$. We assume that every star in the disk is actually a $m=10$~M$_\odot$ star with a binary companion, with a mass ratio $q$. The mass ratio was chosen from a uniform distribution between $0$ and $1$ {to match the distributions of the Galactic O star population \citep[e.g.,][]{Sana+11,Sana+12}}. We assume that all the binaries are on a circular orbit with a semi-major axis of $0.1$~AU \citep[e.g.,][Ginsburg et al in prep.]{Li+17,Chu+17}, which sets the binary period to be $P=3.6/\sqrt{1+q}$~days. {Larger separations are more sensitive to eccentricity excitations due to the Eccentric Kozai-Lidov (EKL) mechanism as they yield shorter EKL timescale compared to General Relativity\footnote{{Note that comparable precession timescale between General Relativity and EKL can still cause eccentricity excitations in the form of resonant behavior, \citep[e.g.,][]{Naoz+13} thus we have chosen a much larger difference in the timescales.} }, which can lead to merging the two binary members \citep[e.g.,][]{Stephan+16,Li+17}. Furthermore, gravitational perturbations from fly-by stars that eventually can unbind the binary \citep[e.g.,][]{Binney+87}. Thus, we adopt a hard binary \citep[e.g.,][]{Quinlan96} with $0.1$~AU separation as a proof-of-concept. } {The induced observed wobble of the primary at the z-direction}\footnote{{Note that velocity wobble due to the stellar companion may also be observable because of the flat mass ratio distribution. For simplicity, we ignore this contribution, and assume that these companions are fainter than the primaries.}}, due to the binary, (either positive or negative) is then (for a binary on a circular orbit around it's center of mass) \begin{equation}\label{eq:dv} \delta v_{z,\rm obs}^3 = 2\pi G \frac{q^3}{(1+q)^2} \frac{m}{P}\sin^3 i_{\rm bin} \cos^3 f_{\rm bin} \ , \end{equation} where $i_{\rm bin}$ is the binary inclination, drawn from a isotropic distribution between $0-180^\circ$ {(i.e,. uniform in $\cos i_{\rm bin}$)}, $f_{\rm bin}$ is the true anomy of the binary, and $G$ is the gravitational constant. Each orbit on the disk with a velocity vector ${\bf v}_D$ will have an additional observed velocity component along the z direction $\delta {\bf v}_z$. In other words the observed velocity will be ${\bf v}_{\rm obs}={\bf v}_D+\delta {\bf v}_{z,\rm obs}$. Note that our choose of a random binary mass ratio, binary phase and inclination, reduces the impact of the binaries. On the other hand we fixed the binary separation and assumed a circular binary. Allowing for a distribution of binary separations might increase in some cases and decrease in others the wobble value.Thus, we do not expect a qualitatively change the results of this proof-of-concept calculations. The wobble velocity $\delta {\bf v}_{z,\rm obs}$ will be at the order of ${\bf v}_D$ at characteristic distances from the SMBH \begin{equation} a_{D,c}\sim a_1\frac{M}{m} \frac{1+q}{q^2}\frac{1}{\sin i_{\rm bin}} \sim 8\times 10^4 \left(\frac{M}{4\times 10^6 {\rm M}_\odot}\right)~{\rm AU} \end{equation} For example a typical value for a star in the disk is $\sim 200$~km~sec$^{-1}$ (see inset in the left panel of Figure \ref{fig:Diskvel}), and a typical wobble for these massive binaries are $\sim 100$~km~sec$^{-1}$ {see Figure \ref{fig:Diskvel}}. Therefore, the resulted observed z-component velocity spread on somewhat larger range and has different velocity distribution (see Figure \ref{fig:Diskvel}, top right panel). Binaries that are closer to the SMBH will be less sensitive to the additional velocity induced by the binary. As depicted in Figure \ref{fig:Diskvel}, further away from the SMBH the Keplerian velocity around the SMBH may be comparable to that of the binary wobble and thus can greatly affect the inferred orbital properties. \section{Disk property biases induced by Binaries }\label{sec:ap} Given this ``new" observed velocity component we can find the ``observed" (apparent) orbital parameters. In other words, treating a binary system as a single star can result in inferring orbital parameters that are inconsistent with the physical ones. Specifically, we are interested in $\Omega_{{\rm ap}}$ and $i_{{\rm ap}}$, where the subscript ``ap" stand for apparent. We calculate the apparent angular momentum ${\bf h}_{\rm ap}$ and thus, the angles can be easily found using the following relations \citep[e.g.,][]{MD00}: \begin{equation} \cos i_{\rm ap} = \frac{h_{z,{\rm ap}}}{h_{\rm ap}} \ , \end{equation} and \begin{equation} \cos \Omega_{\rm ap} = \frac{-h_{y,{\rm ap}}}{h_{\rm ap}\sin i_{\rm ap}} \quad {\rm and} \quad \sin \Omega_{\rm ap} = \frac{h_{x,{\rm ap}}}{h_{\rm ap}\sin i_{\rm ap}} \ . \end{equation} We show the probability density of these angles in Figure \ref{fig:angles} top panels\footnote{The probability density is calculated based on a normal kernel function, and is evaluated at equally-spaced points of the relevant angle.}. As expected the resulted angles have a wide distribution that peaks at the disk value, i.e., $i_D=130^\circ$ and $\Omega_D=96^\circ$. These values are close to the median of the distributions. However, due to the long tail the averages are different. Specifically, we find, $<i_{\rm ap} >\sim 130.6^\circ$ and $<\Omega_{\rm ap}>\sim95.6^\circ$ with standard deviations of $\sim 7.8^\circ$ and $\sim 15^\circ$ respectively. These angles define the location of the disk on a sky, and in Figure \ref{fig:angles}, bottom panel, we show the apparent sky projection, color coded with the density of stars from our simulations. We define the density as the number of stars in a degree area of $i_{{\rm ap}}\times\Omega_{\rm ap}$. Note that the maximum density takes place at $i_D$ and $\Omega_D$, marked by light blue $X$ in the bottom Figure of \ref{fig:angles}, as indicated in the probability distribution in the top of Figure \ref{fig:angles}. {Note the slight ``shadow" near the $X$ is a result of over-density of slightly dark pixels and it corresponds to roughly $1\sigma$ of disk membership (see below).} The spread around the razor thin disk is the result of the relative motion of the binaries around each-other. Interestingly, the density of the apparent disk members around the maximum, projected on the sky, is not dissimilar from the observations \citep[see for example][figure 10]{Yelda+14}. \begin{figure*} \centering \includegraphics[width=\linewidth ]{SMAEccAugDec28.pdf} \caption{{\it Top raw}: {The density probability of the apparent semi-major axis ($a_{\rm ap}$), left panel, and the apparent eccentricity ($e_{\rm ap}$), right panel. We show the two cases associated with two different initial eccentricities for each star in the disk, $e_D=0$ (blue dashed lines) and $e_D=0.3$ (green dashed lines). The two initial eccentricity cases give the same density probabilities for the angles in Figure \ref{fig:angles}. The dashed gray line in the left panel shows the probability density of the initial disk and it's range. The solid red lines show the disk members' eccentricity (right) and $a_{\rm ap}$ (left) density probability for the $e_D=0$ run. Disk members are defined as those with $\beta\leq11.2^\circ$ (i.e., $\beta_{68}$). {\it Bottom panel}: The fraction of stars in the disk (red line) represented as stars with $\beta\leq 11.2^\circ$ (solid line). Stars with $\beta>11.2^\circ$ are inferred to lay outside the disk (solid, cyan line). The black line shows the disk members estimated from the 116 stars from \citet{Yelda+14}. The observed disk membership is normalized such that $20\%$ of the stars reside in the disk (see text). } Overplotted are the sky projected radius bins at $3.2''$ and $6.5''$ when assuming a distance to the SMBH of $8.32$~kpc. {Note that the observed disk membership per projected distance bin and our calculations show the same trend, with a $\sim 2.5$ difference. This similarity implies that the disk membership might be as high as $\sim 50\%$ instead of the inferred $\sim 20\%$ fraction achieved while ignoring binaries. } } \label{fig:SMAEcc} \end{figure*} We define a quantity \begin{equation}\label{eq:b} \beta=\sqrt{(\Omega_{\rm ap} -\Omega_D)^2+(i_{\rm ap}-i_D)^2} \ , \end{equation} which can be used as a proxy for disk membership (see below). In Figure \ref{fig:angles}, top right panel we show probability density of $\beta$ which peaks at $1^\circ$. The deviation from a peak at $\beta=0^\circ$ can be understood from the asymmetry of the inclination distribution. The In terms of the number systems, the peak of this distribution for $i_{\rm ap}$ is about a factor of two smaller than that for $\Omega_{\rm ap}$. Combing $i_{\rm ap}$ and $\Omega_{\rm ap}$ yields $\beta$. We found that the average $<\beta>\sim 10.1^\circ$ with a standard divination of $13.5^\circ$. { Because the peak distributions in $\Omega_{\rm ap}$ and $i_{\rm ap}$ are similar to the initial disk input, the apparent peak density of stars in the sky projected disk (bottom panel in Figure \ref{fig:angles}) is at the initial disk input (marked by the light blue X). Below we adopt the disk membership by estimating the critical angle $\beta_{68}$ at which $68\%$ of the systems lay within it around the disk, which corresponds to $\beta_{68}=11.2^\circ$. The $68\%$ from the initial disk's input (i.e., $\beta=0$) is shown in the vertical dashed black line in Figure \ref{fig:angles}. } We also calculate the apparent eccentricity in the disk using Kepler relation, i.e., \begin{equation}\label{eq:e} e_{\rm ap}=\sqrt{1-\frac{h_{\rm ap}^2}{G (M +m(1+q)) a_{\rm ap}}} \ , \end{equation} where $M$ is the SMBH mass and $a_{\rm ap}$ is found from the following Kepler relation \begin{equation}\label{eq:a} \frac{1}{a_{\rm ap}}=\frac{2}{r_D} - \frac{v_{\rm obs}^2}{ G (M +m(1+q))} \ . \end{equation} We show the distribution of the apparent semi-major axis and eccentricity in Figure \ref{fig:SMAEcc}, top left and right panels, respectively. As depicted in this Figure, closer to the SMBH, the apparent semi-major axis roughly follows the razor thin input disk distribution (the latter depicted in black dashed line). At radii larger than $\sim0.2$~pc the apparent semi-major axis distribution significantly deviates from the initial input, where the $a_{\rm ap}$ is inferred to have much larger values than the input ones. As can be seen from Equation (\ref{eq:a}) large observed velocity yields a larger apparent semi-major axis of the stars around the SMBH than they actually are (left panel in Figure \ref{fig:SMAEcc}). Note that the projected distance of the disk (i.e., $\sqrt{x^2+y^2}$) is independent on the binary velocity component. In particular, as depicted in Figure \ref{fig:SMAEcc}, disk membership drops to $\sim 50\%$ for radii larger than the projected $6.5''$. The latter projected distance is often used in observation to determine the disk location. The results from our proof-of-concept calculations are consistent with the observed high disk membership inside $\sim 3.2''$ \citep[e.g.,][]{Yelda+14}. {In particular, we consider the $116$ stars with kinematic data from \citet{Yelda+14}, who estimated that about $20\%$ of the stars reside on the disk. We find the likelihood value, presented in \citet{Yelda+14}, that is associated with setting the sum over all fraction of stars in the disk, in each bin, to $20\%$, as shown in the bottom panel of Figure \ref{fig:SMAEcc}, black line\footnote{{ We emphasize that we did not use \citet{Yelda+14} uncertainties estimations, instead we reduced their likelihood to assigned disk membership which allows to a ``cleaner'' comparison with our calculations.} }. As depicted, the observations show the same sky projected trend as our simulations, where stars closer to the SMBH have larger {\it assigned} disk membership. This similarity in trend suggests that the binary fraction in the galactic center is rather large. In fact, taking this analysis at face value, the results presented here suggest that the disk fraction should be higher by a factor of $2.5$ (estimated roughly from the comparison between the red and black lines in Figure \ref{fig:SMAEcc}). Thus, suggesting a possible {\it true} disk fraction of $\sim50\%$\footnote{The fraction of disk membership is estimated by summing over all of the bins, i.e., $\sum n \Delta a_2 / \Delta a_{\rm Disk}$, where $n$ is the number of stars in the disk inside of projected bin $ \Delta a_2$ (in linear scale). We then divid by the total linear projected length of the disk ($\Delta a_{\rm Disk}\sim 0.46$~pc). }. It is interesting to point out that the confirmed binary IRS 16SW, which has a detected acceleration and which resides rather close to the inner edge of the SMBH (the first bin from the left, in the plot) is the only star at the inner disk edge with a low disk membership probability.} The stars in the razor thin disk were set with $e_D=0$, but their apparent eccentricity distribution has a wide range with an average of $\sim0.23$ and standard deviation of $0.2$, taking only bound orbits. The probability distribution is depicted in Figure \ref{fig:SMAEcc}, right panel, solid blue line. Furthermore, we also found that about $3\%$ of the inferred systems resulted in eccentricities that are nearly radial or completely unbound on hyperbolic orbit. This may explain the observed high eccentricity and the nearly radial orbits reported by \citet{Bartko+09}. Taking only the disk members in our simulation (i.e., either $\beta\leq 11.2^\circ$), we plot their eccentricity's probability distribution in Figure \ref{fig:SMAEcc}, top right panel. The average disk members' eccentricity is $0.14$ with standard deviation of $0.13$. Thus, our simulations suggest that perhaps some of the observed eccentric stars may actually have a circular orbit around the SMBH, and their eccentricity is only inferred to be high, as a result from the induced z-component velocity of a binary. We also take \citet{Yelda+14} reported eccentricity at face value and repeat the above exercise for initial $e_D=0.3$. We found that all the above angles (i.e., $i_{\rm ap}$, $\Omega_{\rm ap}$, $\alpha$ and $\beta$) produce similar probability distribution, and thus are omitted from the Figures to avoid clutter. On the other hand the inferred eccentricity probability distribution is different (as depicted in Figure \ref{fig:SMAEcc}, green dashed lines), with an average of $0.4$ and a standard deviation of $0.24$, taking only bound orbits. About $3\%$ of systems resulted on a hyperbolic orbits in this case. As illustrate in this Figure, if the orbits around the SMBH were indeed eccentric, the binary contribution would have implied an apparent eccentricity, with an even higher values. This may explain the large eccentricities reported in the literature \citep[e.g.,][]{Bartko+09,Yelda+14}. While $\Omega$, $i$ and $\beta$ are sky projected quantities, we are also interested in the physical tilt between the input disk's angular momentum and the resulted apparent disk. Thus, we calculate the relative deflection angle $\alpha$ between the actual stellar disk's angular momentum ${\bf h}_D$ and the apparent one ${\bf h}_{\rm ap}$ where \begin{equation} \cos \alpha = \frac{ {\bf h}_D \cdot {\bf h}_{\rm ap} }{h_D h_{\rm ap}} \ , \end{equation} The distribution of this angle is shown in the inset of Figure \ref{fig:DiskvelSMA}. This distribution peaks around $\sim 1^\circ$ with an average of $8^\circ$ with a standard deviation of $8^\circ$. In other words, a razor thin disk appears to be puffed when the mutual motion of the binaries is neglected. { In addition to that, the disk appears tilted compared to its actual orientation as the peak of $\alpha$ is not oriented at zero}. \begin{figure} \centering \hspace{-0.7cm} \includegraphics[width=1.1\linewidth]{cosalphadvzDec6.pdf} \caption{ The angle between the two angular momenta ($\alpha$) as a function of the binary radial velocity. The different color corresponds to the input semi-major axis of each binary around the SMBH in log space. The green solid line shows the analytical Equation (\ref{eq:cosalpha}). The inset show $\alpha$ distribution. }\label{fig:DiskvelSMA} \end{figure} The stars' Keplerian orbits imply that binaries that are further away from the disk, have smaller velocity around the SMBH compared to stars that are closer to the SMBH (see Figure \ref{fig:Diskvel}). Thus, the stars that are closer to the SMBH will have smaller deflection angle (i.e, $\cos \alpha \sim 1$) relative to the stars that are further away in the disk. We depict this behavior in Figure \ref{fig:DiskvelSMA}, were the larger deflection angles are associated with larger semi-major axes ($a_D$) from the SMBH. From vectorial identities, and using the fact that the binary velocity excess is observed only in the $z$-component (i.e., $\Delta=\delta v_{z,\rm obs} /v_D$), we can write: \begin{equation}\label{eq:cosalpha} \cos\alpha= \frac{1+(v_z/v_D) \Delta}{\sqrt{ 1+2 (v_z/v_D) \Delta +(x^2+y^2)/r_D^2 \Delta^2}} \ , \end{equation} and in terms of the inclination and longitude of ascending nodes we can write: \begin{equation}\label{eq:ab} \cos\alpha= \sin i_D\sin i_{\rm ap} \cos(\Omega_D-\Omega_{\rm ap}) + \cos i_D\cos i_{\rm ap} \ . \end{equation} In Figure \ref{fig:DiskvelSMA}, we show the analytical relation from Equation (\ref{eq:cosalpha}) for the far edge of the disk $0.5$~pc, and the maximum $v_z/v_D$ in the disk (which is about $0.77$). Large $\alpha$ can be mistakenly interpreted as if stars lay outside the plane of the disk. As expected, the error in estimating the stellar disk's membership (small $\beta$ and thus small $\alpha$, from Eq.~(\ref{eq:ab})) is highly correlated with the distance from the SMBH. Stars that have wider orbit around the SMBH need larger $\delta v_{z,{\rm obs}}$ to produce larger variations in $\alpha$, and thus are less likely to be sensitive to binary configuration. \section{Discussion and Conclusions}\label{sec:dis} We have shown that the binarity nature of stars can significantly influence the apparent (observed) stellar disk properties in the GC. The stellar disk in the GC is estimated to be located between $0.04$~pc and $0.5$~pc, with sky projected inclination of $i_D=130^\circ$ ascending nodes of $\Omega_D=96^\circ$ \citep{Yelda+14}. Since the determination of disk membership is often estimated by one RV measurement, a velocity wobble on the z--axis (the line-of-sight) due to the binary motion can change the apparent properties. We have conducted a simple proof-of-concept calculation that considered a razor-thin disk around the SMBH in the GC, assuming that each star is, in a binary configuration (see Figure \ref{fig:Diskvel}). The apparent physical and projected orbital parameter are substantially different compared to the input one. For example, the inclination and ascending nodes deduced when ignoring the possibilities of an extra z-component that arises from the binary motion results in a wide distribution for these angles (as depicted in Figure \ref{fig:angles}). The width of the distribution is largely caused by the velocity distribution, which is sensitive to the binary mass ratio and binary orientation (both drawn from a uniform distributions). The binary motion causes the apparent location of the disk to be slightly shifted from the input location (as shown in Figure \ref{fig:angles} bottom panel). Note that we assumed a $100\%$ binary fraction in the disk, as we have fixed all values which are model dependent (e.g., binary fraction and binaries eccentricity and separation distribution). These effects may changed the quantitate results presented here (e.g., a distribution of binary separations may increase the effect) but not the qualitative effect. {As expected disk members that are farther away from the SMBH will be more sensitive to the binary motion than those that are closer to the SMBH since the latter have larger orbital velocity $v_D$. The binary wobble velocity along the line of sight cause a system to appear off the disk and further away from the SMBH than truly is. In particular, we are more likely to deduce that stars that are closer to the SMBH belong to the disk, than those that are initially further away from the SMBH. This behavior is shown in Figure \ref{fig:SMAEcc}, bottom panel, and remarkably, this trend is consistent with observations, depicts as the black line in this Figure. Considering the observations, we find that the binary IRS 16SW, which resides rather close to the SMBH, was found to have low probability to reside in the disk \citep{Yelda+14}, consistent with our finding.} {We note that \citet{Yelda+14} showed that observational sampling and prior assumptions can have large impact on the probability of disk membership. Using a forward modeling approach, they find that observations along the line of nodes of the disk along with uniform acceleration priors in the analysis can result in an over prediction for the disk by a factor of $2$. Future quantitative comparisons with this work will likely need to account for similar types of observational biases. } Furthermore, the disk eccentricity may appear different than the actual orbital eccentricity. Starting with circular orbits around the SMBH, we found that the apparent eccentricity around the SMBH significantly differs from zero (see Figure \ref{fig:SMAEcc}, right panel). Interestingly, the apparent disk's eccentricity distribution (blue line in Figure \ref{fig:SMAEcc}) has a mean value of $\sim0.26$, which is consistent with \citet{Yelda+14} estimation from observations. The apparent disk eccentricity can reach extreme values and even results in an apparent unbound orbits, which is also consistent with observations \citep[e.g.,][]{Bartko+09}. Not only the disk's eccentricity will deviate from the physical one, but also the disk's members semi-major axis. Ignoring the contribution from binary motion will cause many disk members to appear more distant from the SMBH than they actually are (see Figure \ref{fig:SMAEcc} left panel). We defined a disk membership condition using a quantity that roughly describes an angular distance from the disk location on the sky, $\beta$, in the longitude of ascending nodes, $\Omega$ and the inclination, $i$, plane. We estimate the disk membership by considering the systems that lay within $\beta_{68}$ (i.e., corresponding to $68\%$ of systems around the initial location of the disk). As expected, we find that the disk fraction decreases as a function of the projected distance (e.g., Figure \ref{fig:SMAEcc}, bottom panel). This trend is consistent with the observations, as shown in that Figure, black line. This functional agreement, suggests that binaries are more prevalent in the Galactic Center and may result in reducing the disk membership. Taking on face value our initial conditions and comparing our results to observations, may suggest that disk membership can be as high as $\sim 50\%$. We conclude that the possibility of existing binaries in the measurements of the stellar disk properties cannot be ignored. As we showed, many of the puzzles and controversies involved the characteristics of the disk may be explained by the existence of binaries. We encourage the community to take more measurements of the z-component of the stars' velocities. \acknowledgements We thank the referee for his/her useful comments. S.N and A.M.G thank the Keck foundation for their partial support of the {\it NStarsOrbits} Project. S.N. acknowledges partial support from a Sloan Foundation Fellowship. A.M.G thanks the NSF grant number AST-1412615.
\section{Introduction} \label{sec:intro} Starting with the discovery of the two RCs in the bulge color-magnitude diagram, it is widely believed that most of the stellar component of the Milky Way bulge is in a giant X-shaped structure \citep{2010ApJ...724...1491,2010ApJL...721...L28,2013MNRAS...435...1874}. This discovery, together with the dynamical simulations where the X-shaped structure can naturally arise via bar buckling \citep{2012ApJL...757...L7}, has led to the suggestion that the ``pseudo bulge'' is not restricted to the low-latitude region of the bulge, but expanded even to the high-latitude field. However, a completely different interpretation has been suggested by \citet{2015MNRAS...453...3906} and \citet{2017ApJ...840...98}, according to which the double RC phenomenon is caused by two stellar populations with different helium abundances. Since the helium-enriched stars are brighter than helium-normal stars \citep{2005ApJ...621...L57,2010ApJL...715...L63}, this can reproduce the two RCs without a difference in distance. \begin{figure}[ht!] \figurenum{1} \plotone{f1.pdf} \caption{Formation of an artificial X-shaped structure. When an ellipsoidal bulge model (middle panel) is subtracted from a boxy bulge model (left panel), an artificial X-shaped structure remains in the residual map (right panel) \label{fig:toymodel}} \end{figure} Recently, \citet[hereafter NL16]{2016AJ...152...14} claimed that an X-shaped structure is revealed when a simple exponential model is subtracted from the \textit{WISE} image of the Milky Way bulge (see their Fig. 3). However, there are a couple of potential problems in their analysis. One is a lack of appropriate correction of dust extinction which is non-negligible even in the infrared image of the bulge. The other is the use of a simple ellipsoidal model for the bulge, while it is well-known that the Milky Way has a boxy bulge \citep{1995ApJ...445...716,2005AA...439...107,2011AA...534...A3}. As illustrated in a toy model in Figure \ref{fig:toymodel}, an artificial X-shaped structure remains in the residual map when an ellipsoidal bulge model is subtracted from a boxy bulge. This effect is well-known in the extragalactic community, for example, the similar artificial X-shaped structures appear when ellipse-fit galaxy models are subtracted from the images of early-type galaxies \citep[see e.g.,][]{2011ApJ...730...23,2016ApJ...822...95}. The purpose of this paper is to investigate the effects of the adopted bulge model subtracted from the original image and the dust extinction correction on the residual maps. \section{Extinction corrections and Model fitting} \label{sec:method} Following NL16, we use the ``unWISE'' images of the bulge fields across $(|l|, |b|) < (10\degr, 10\degr)$ in the \textit{WISE} \textit{W1} and \textit{W2} bands. A detailed procedure for the construction of ``unWISE'' images is described in \citet{2014AJ...147...108}. In order to investigate the effects of dust extinction on the residual images, we choose two dust maps (Fig. \ref{fig:dustmaps}), one of which is the most widely adopted by the community \citep[hereafter SFD98]{1998ApJ...500...525}, and the other provides the highest resolution \citep[hereafter P14]{2014AA...571...A11}. The resolutions of the two maps are $6\arcmin$ and $5\arcmin$, respectively, which are equivalent to $\sim 4$ pixel in the bulge images we employed. Despite the progress in the construction of the dust maps during the past decades, the uncertainty in the reddening correction still increases rapidly toward the Galactic plane. Therefore, the low-latitude zones $(|b| < 2\degr)$ are masked in our analysis as has been done in other recent studies \citep[e.g.,][]{2013AA...552...A110,2016PASA...33...e025}. The pixels in the top $5\%$ and bottom $5\%$ in the \textit{W1}-\textit{W2} color distribution are also masked as in NL16. \begin{figure}[h!] \figurenum{2} \epsscale{0.6} \plotone{f2.pdf} \caption{E(B-V) maps of \citet[left]{1998ApJ...500...525} and \citet[right]{2014AA...571...A11}. Note that E(B-V) values at very low-latitude regions ($|b| < 2\degr$) well exceed the maximum value of the scalebar. \label{fig:dustmaps}} \end{figure} To see the effects of the bulge models on the residual images, first, we use the same ellipsoidal bulge model employed in NL16, which has a simple exponential profile with an axis ratio of $0.38$. We then employ the triaxial boxy bulge model of \citet[hereafter L05]{2005AA...439...107}, which is based on the 2MASS star counts. The axial ratios of this boxy bulge model are $1:0.49:0.37$ and the major axis is oriented with respect to the Sun-Galactic center direction of $29\degr$. The normalization coefficient in the bulge model fitting is determined by the chi-square minimization: \begin{displaymath} \sum_{(x, y)}\chi^2(a) = [\frac{D(x, y) I(x, y) - a B(x, y)}{\sigma(x, y)}]^2, \end{displaymath} with $D(x, y) = 100^{\frac{2}{5}(R(W_1, W_2) E(B-V))},$ where: \noindent $D(x, y)$ is the dust extinction correction term for each pixel; \noindent $I(x, y)$ is the pixel value at each pixel in the bulge image; \noindent $a$ is the normalization coefficient between the bulge image and model; \noindent $B(x, y)$ is the pixel value at each pixel in the bulge model; \noindent $\sigma(x, y)$ is the Poisson noise at each pixel in the bulge image; \noindent $R(W_1, W_2)$ is the extinction in the \textit{W1} or \textit{W2} band relative to E(B-V), from \citet{2013MNRAS...430...2188} \newpage \section{Residual images of the bulge} \label{sec:results} \begin{figure}[h!] \figurenum{3} \plotone{f3.pdf} \caption{\textit{WISE W1} data (panel (a)) fit by bulge model of NL16 (panel (b)) before the dust extinction correction. Panels (c) and (d) are residual maps. As has been done in NL16, 25 pixel median smooth filtering is applied in panels (a) and (d) to see the overall structure rather than particular details. \label{fig:original-NL16}} \end{figure} Before we proceed to the effects of dust extinction correction, Figure \ref{fig:original-NL16} shows the residual maps with the uncorrected \textit{WISE W1} data which is essentially identical with those in NL16 (see their Fig. 3). Because we mask the low-latitude regions, here we show the images in the logarithmic and linear scales, while NL16 used arcsinh scale to highlight the faint X-shaped structure in the image without masking the extremely bright central region. The asymmetry of the images in Figure \ref{fig:original-NL16} is due to the effect of perspective of the elongated bar projected on the sky. The effects of dust extinction corrections are then shown in Figures \ref{fig:sfd98-NL16} and \ref{fig:planck-NL16} for the two different E(B-V) maps. As is clear from these figures, after the dust extinction corrections, a boxy structure, rather than the X-shaped structure, is left in the residual maps. This suggests that the result of NL16 was noticeably influenced by a lack of the dust extinction correction. \begin{figure}[h!] \figurenum{4} \plotone{f4.pdf} \caption{Same as Fig. \ref{fig:original-NL16}, but after the dust extinction correction with the E(B-V) map of SFD98. \label{fig:sfd98-NL16}} \end{figure} \begin{figure}[h!] \figurenum{5} \plotone{f5.pdf} \caption{Same as Fig. \ref{fig:sfd98-NL16}, but with the E(B-V) map of P14. \label{fig:planck-NL16}} \end{figure} \newpage Figures \ref{fig:sfd98-L05} and \ref{fig:planck-L05} show the results for the case the boxy bulge model of L05 is subtracted instead of a simple ellipsoidal model from the images corrected with the two different E(B-V) maps, respectively. We can see again from these figures that the residual maps show no obvious X-shape similarly to the previous case. It appears that the difference on the residual map of the Milky Way bulge caused by the two adopted models is not as pronounced as that expected from the toy model in Figure \ref{fig:toymodel}. The residual maps in Figures \ref{fig:sfd98-L05} and \ref{fig:planck-L05} appear more symmetric compared to those in Figures \ref{fig:sfd98-NL16} and \ref{fig:planck-NL16}, which is because the effect of perspective is included in the elongated boxy bulge model substracted. \begin{figure}[h!] \figurenum{6} \plotone{f6.pdf} \caption{Same as Fig. \ref{fig:sfd98-NL16}, but after the subtraction of the L05 boxy bulge model. \label{fig:sfd98-L05}} \end{figure} \begin{figure}[h!] \figurenum{7} \plotone{f7.pdf} \caption{Same as Fig. \ref{fig:sfd98-L05}, but with the E(B-V) map of P14. \label{fig:planck-L05}} \end{figure} \section{Discussion} \label{sec:discussion} \begin{figure}[h!] \figurenum{8} \epsscale{0.6} \plotone{f8.pdf} \caption{Fractional residuals as defined by $(N_{obs}-N_{mod})/N_{obs}$ when the NL16 bulge model is subtracted after the dust extinction correction by the E(B-V) maps of SFD98 (left) and P14 (right), respectively. $N_{obs}$ and $N_{mod}$ are pixel values of the dereddened \textit{WISE W1} data and the bulge model of NL16, respectively. \label{fig:frac-res}} \end{figure} We have shown that the analysis in NL16 is affected substantially by the dust extinction correction and partly by a bulge model subtracted from the original image. Therefore, their claim of the direct connection between the X-shaped structure and the double RC phenomenon is seriously questioned as well. However, some faint structures are still remained in our residual maps, and since many of the current studies on the Galactic bulge are based on the two RCs, it is important to check whether they could be related to the double RC phenomenon. \begin{figure}[h!] \figurenum{9} \epsscale{0.5} \plotone{f9.pdf} \caption{The fractions of pixel values of the residual (blue) and NL16 bulge model (red) as functions of Galactic latitude averaged over $-10\degr < l < 10\degr$. Solid and dashed lines are for the E(B-V) maps of SFD98 and P14, respectively. \label{fig:frac-lat}} \end{figure} \begin{figure}[h!] \figurenum{10} \plotone{f10.pdf} \caption{Simulations of apparent magnitude distribution for RG + RC stars towards the bulge field at $(l, b) = (0\degr, -8\degr)$. Top: theoretical RG + RC luminosity functions for the metal-rich/poor subpopulations of \citet{2017AA...599...A12} at the same bulge field. Bottom: predicted distance modulus distribution functions for the metal-rich/poor subpopulations under the assumptions that their density maps can be attributed to the X-shaped and spheroidal bulge, respectively. Right: convolved apparent mangitude distribution function. \label{fig:lfunction}} \vspace{2pt} \end{figure} To estimate the level of flux contribution by the structures in our residual maps to the bulge images, we plot in Figure \ref{fig:frac-res} the fractional residuals when the NL16 bulge model is subtracted from the two extinction corrected images considered above. Based on these, we compare in Figure \ref{fig:frac-lat} the fraction of pixel values of the residual maps with that of the NL16 bulge model as a function of Galactic latitude. The level of flux contribution of the residual maps are estimated to be about $15\%$ at $b= -8\degr$, where the double RC is observed to be most prominent. Interestingly, this fraction is very similar to the population ratio ($17\%$) of the metal-rich (MR) stars in the bimodal metallicity distribution function of \citet{2017AA...599...A12} at this bulge field. They have also shown that the density map and kinematics of MR subpopulation are more bar-like, while the metal-poor (MP) subpopulation follows the ellipsoidal density map with a slower rotation. Since the claimed X-shaped structure is supposed to be originated from the Galactic bar, it would be reasonable to assume, arguably, that the stars in this MR subpopulation is connected to the X-shaped structure. Under this assumption, we construct an apparent magnitude distribution for the bulge red giant (RG) + RC populations, in order to investigate whether this minority MR stars could reproduce the observed double RC. The result is shown in Figure \ref{fig:lfunction}, where the theoretical RG + RC luminosity functions are based on the Y2 isochrones \citep{2002APJS...143...499}. For the MR stars in the X-shaped structure, we adopt the distance modulus distribution of \citet{2012APJ...756...22} which is based on the N-body bulge model of \citet{2003MNRAS...341...1179}. For the MP stars, we assume that they follow the triaxial ellipsoidal bulge model of \citet{2015APJ...811...113} obtained from the bulge RR Lyrae survey. As is clear from Figure \ref{fig:lfunction}, the double peak produced by the X-shaped structure is not revealed in the convolved apparent magnitude distribution function when the majority MP subpopulation with highly concentrated spatial distribution is considered together. As has been suggested by \citet{2015MNRAS...450...L66}, our simulations also suggest that the fraction of at least $45\%$ for the MR subpopulation (stellar component in the X-shaped structure) is required to make a clear double peak in the apparent magnitude distribution function as is observed. Therefore, we conclude that the X-shaped structure claimed by NL16 is not confirmed in this investigation, and even if it is real, the faint structure in the residual map has little to do with the double RC phenomenon. \acknowledgments This work was supported by the National Research Foundation of Korea (grants 2017R1A2B3002919 and 2017R1A5A1070354).
\section{Introduction} \label{intro} The bulk of the Milky Way (MW) bulge stars show a lower-metallicity end at $-1.5 \lesssim$ [Fe/H] $\lesssim -1.0$ (e.g., \citealp{Rojas-Arriagada+14,Rojas-Arriagada+17}; \citealp{Zoccali+17}, and references therein). These relatively high lower-end metallicities are expected from an early fast chemical enrichment in the central parts of the Galaxy, as modeled by, e.g., \citet{Cescutti+08}. From a selection of bulge globular clusters (GCs) presented by \citet{Bica+16}, it was shown that their metallicity distribution also has a peak at [Fe/H]$\sim -1.0$. A subclass of these clusters show a blue horizontal branch (BHB), making these combined characteristics to be indicative, in principle, of a very old age \citep{Lee+94}. Furthermore, \citet{Marin-Franch+09} demonstrated that the GCs with galactocentric distance ($R_{\rm{GC}}$) less than 10 kpc follow a flat age-metallicity relation with an age dispersion of only $\sim$ 5\%, reinforcing the idea that a very low metallicity is not a restrictive prior condition to find stellar relics in the bulge. Our main targets in this work, NGC\,6522 and NGC\,6626 (M28), are both bulge GCs with similar metallicities ($-1.3 \leq$ [Fe/H] $\leq -1.0$) and BHBs and are both affected by field contamination and high absorption ($A_{\rm{V}}$ $>$ 1.20) due to their proximity to the Galactic center ($R_{\rm{GC}} < 3$ kpc). In particular, NGC\,6522 is a very interesting GC located in Baade's Window. Located at a Galactocentric distance $\lesssim$ 1 kpc, likely in the foreground with respect to the Galactic center, NGC\,6522 was suggested to be among the oldest clusters in the MW \citep{Barbuy+09}. An important issue in the analysis of stellar populations in globular clusters is the presence of multiple stellar populations (e.g., \citealp{Milone+15,Milone+17,Nardiello+15a,Nardiello+15b,Piotto+15}). In this paper we address this point with optical \textit{Hubble Space Telescope} (\textit{HST}) bands, and we present the first photometric evidence for multiple stellar populations in NGC\,6522. Based on \textit{VLT}/FLAMES\footnote{Fibre Large Array Multi Element Spectrograph (FLAMES) is the multi-object, intermediate- and high-resolution spectrograph of the Very Large Telescope (VLT)} optical high-resolution spectroscopy, \cite{Barbuy+09,Barbuy+14} and \cite{Ness+14} analyzed NGC\,6522 and derived its metallicity and chemical abundances. With the same instrument, \cite{Villanova+17} performed a similar analysis for NGC\,6626 and interestingly found the presence of at least two stellar populations in the cluster. Very recently, using near-infrared high-resolution spectroscopy from the APOGEE (Apache Observatory Galactic Evolution Experiment; \citealp{Majewski+16}), \cite{Schiavon+17} discovered one star in NGC\,6522 with a very high nitrogen abundance ([N/Fe]=$+1.04$), suggesting that this cluster hosts multiple stellar populations. An additional three stars analyzed by \cite{Fernandez-Trincado+18} were found with similar chemical abundances. Furthermore, \cite{Recio-Blanco+17} inferred a high Al abundance together with a low Mg abundance for one star, corroborating the hypothesis of more than one stellar population hosted by NGC\,6522. Despite the accurate metallicity and chemical abundance determinations for NGC\,6522 and NGC\,6626, to date there are no analogous results for self-consistent age, distance, and reddening determinations for these clusters. The main reason is the lack of deep, proper-motion-cleaned color-magnitude diagrams (CMDs), based on high-photometric-precision data with which to perform a statistical analysis. Currently only the \textit{HST} (e.g., \citealp{Ortolani+07,Ferraro+16,Piotto+15}) and 8m class telescopes with multi-conjugated adaptive optical (MCAO) systems (e.g., \citealp{Ferraro+09,Saracino+15,Saracino+16}) are able to collect images with such high quality for GCs, spatially resolving stars with an FHWM $\lesssim$ 0.10 arcsec in their cores. The primary goal of this work is to derive such physical parameters (age, distance, and reddening ) for NGC\,6522 and NGC\,6626 using a statistical isochrone fitting on accurate, proper-motion-cleaned \textit{HST}-based CMD. These two clusters were not included in the ACS Survey of GCs \citep{Sarajedini+07} or in the HST UV Legacy Survey of Galactic GCs \citep{Piotto+15}, and consequently they were not listed in the most recent and comprehensive papers concerning dating Galactic GCs \citep{DeAngeli+05,Marin-Franch+09,Dotter+10,VandenBerg+13,Wagner-Kaiser+16,Wagner-Kaiser+17}. Although they are included in the large compilation of age, metallicity, and abundance pattern for 41 Galactic GCs presented by \citet{Roediger+14}, their ages (15.0 $\pm$ 1.10 for NGC\,6522 and 14.0 $\pm$ 1.1 for NGC\,6626) are marked as ``less certain'' values\footnote{These age values are not even cited in their online table -- http://www.astro.queensu.ca/people/Stephane\_Courteau/roediger\\ 2013/index.html.}. The only two age determinations for NGC\,6522 based on \textit{HST} data were carried out by \citet{Meissner+Weiss06} and \citet{Barbuy+09}, in both cases using the same \textit{HST}/WFPC2\footnote{Wide Field and Planetary Camera 2 (WFPC2).} data in F439W and F555W bands collected in a snapshot program \citep{Piotto+02}. Since the CMDs generated with these data barely reach 1 mag below the main-sequence turnoff (MSTO), the most solid results in these papers were based on the magnitude difference between the MSTO and the horizontal branch (HB) ($\Delta V^{\rm{HB}}_{\rm{TO}}$). In fact, NGC\,6522 presented a remarkably high $\Delta V^{\rm{HB}}_{\rm{TO}}$ value, suggesting that it is $\sim$ 2 Gyr older than 47 Tuc and M5 (NGC\,5904) when the mean loci of these clusters are overplotted \citep{Barbuy+09}. Using the same stellar evolutionary models (A Bag of Stellar Tracks and Isochrones -- BaSTI, \citealp{Pietrinferni+04}), \citet{Meissner+Weiss06} recovered an age between 13.9 and 16.1 Gyr, whereas \citet{Barbuy+09} estimated $\sim$ 16 Gyr. As concerns NGC\,6626, \citet{Testa+01} presented a relative age determination based on \textit{HST}/WFPC2 data. These authors analyzed the F555W, F555W--F814W CMD for this cluster in comparison with three halo GCs with BHB (NGC\,2298, NGC\,5897, NGC\,6535) whose metallicities are [Fe/H]$\sim -1.73$, $-1.70$, and $-1.83$, respectively, i.e. about 0.4--0.5 dex lower than the value for NGC\,6626 ([Fe/H]$\sim -1.33$). Measuring the color difference between the MSTO and an arbitrary point in the red giant branch (RGB), they identified NGC\,6626 as the oldest cluster in their sample, 1.2 $\pm$ 0.9 Gyr older than NGC\,2298 and 2.4 $\pm$ 1.6 Gyr older than NGC\,6535. Assuming an age of $\sim$ 13.0 Gyr for these two clusters as determined by \citet{Dotter+10}, NGC\,6626 could be older than $\sim$ 14.0 Gyr. \begin{figure*} \centering \includegraphics[angle=0,scale=0.22]{NGC6522_hst_ACS_WFPC2.eps} \includegraphics[angle=0,scale=0.22]{NGC6626_hst_ACS_WFPC2.eps} \includegraphics[angle=0,scale=0.22]{NGC6362_hst_ACS.eps} \caption{\textit{HST} images of the GCs NGC\,6522 (left), NGC\,6626 (right), and NGC\,6362 (middle). All these images were collected with ACS/WFC in the F625W filter. North is up, east is left. The ACS/WFC field of view is 202 x 202 arcsec$^2$. The red contours correspond to the WFPC2 field of view of the first epoch for NGC\,6522 and NGC\,6626, whereas the blue circles are the adopted limiting radius defining the bulk of the cluster's stars. } \centering \label{HST_images} \end{figure*} In order to determine some of the main physical parameters of NGC\,6522 and NGC\,6626 in a comparative way, we retrieved \textit{HST}/ACS\footnote{Advanced Camera for Surveys (ACS).} archive images in the filters F435W and F625W for these clusters. Additional \textit{HST}/WFPC2 archive images for each cluster allowed us to generate proper-motion-cleaned CMDs, drastically minimizing the effect of the field stellar contamination in our results. The main method employed in the present work is based on statistical comparisons between observed and synthetic fiducial lines, providing ages, distance moduli, and reddening values self-consistently. We used $\alpha$-enhanced BaSTI and Dartmouth isochrones with canonical ($Y \sim$ 0.25) and enhanced helium abundance ($Y = 0.30$ for BaSTI; $Y = 0.33$ for Dartmouth) to generate the synthetic fiducial lines. The MSTO magnitude and the HB level are independently determined in order to give additional tests to better constrain the cluster physical parameters. In particular, the RR Lyrae stars presented in the compilation by \citet{Clement+01} (hereafter referred to as Clement's catalog -- 2017 edition\footnote{http://vizier.cfa.harvard.edu/viz-bin/VizieR?-source=V/150}) and in the OGLE catalog\footnote{http://ogledb.astrouw.edu.pl/~ogle/CVS/} (\citealp{Soszynski+14}) were used to determine the HB magnitude level. Further detailed studies of the HB morphology in these clusters will be addressed in a future work. For comparison purposes, we included the analysis of NGC\,6362, a GC that has been extensively studied in the aforementioned \textit{HST} surveys and for which there are \textit{HST}/ACS archive images in the F625W and F438W filters. It is an inner halo GC ($R_{\rm{GC}} = $ 5.1 kpc) located at a moderate Galactic latitude ($\sim$17\fdg6) and therefore toward a region with low reddening ($E$(\textit{B}$-$\textit{V}) $\lesssim 0.10$) and low field stellar contamination. Its metallicity was recently determined by means of high-resolution spectroscopy ([Fe/H]$=-1.09 \pm 0.01$, \citealp{Mucciarelli+16}; [Fe/H]$=-1.07 \pm 0.01$, \citealp{Massari+17}), confirming NGC\,6362 to be similar in metallicity to NGC\,6522 and NGC\,6626. On the other hand, differently from NGC\,6522 and NGC\,6626, NGC\,6362 shows a red horizontal branch (RHB). Furthermore, other works based on \textit{HST} data \citep{Dalessandro+14,Piotto+15,Milone+17} and high-resolution spectroscopy \citep{Mucciarelli+16} demonstrated that NGC\,6362 hosts multiple stellar populations. Since NGC\,6362 is one of the analyzed clusters in \citet{DeAngeli+05}, \citet{Meissner+Weiss06}, \citet{Marin-Franch+09}, \citet{Dotter+10}, \citet{Paust+10}, \citet{VandenBerg+13} and \citet{Wagner-Kaiser+16,Wagner-Kaiser+17}, it is a key comparison object for the present paper. It was identified as one of the oldest Galactic GCs by \citet{Marin-Franch+09}, \citet{Paust+10}, \citet{VandenBerg+13} and \citet{Wagner-Kaiser+16,Wagner-Kaiser+17}. The observations, proper-motion cleaning, and radial density profiles are described in Section 2. CMDs are presented in Section 3. In Section 4 the literature metallicities and abundances are reported. In Section 5 the isochrone fitting method is presented, and adopted stellar evolutionary models are briefly described. In Section 6 cluster ages, distances, and reddening values are derived. In Section 7 a discussion and a tentative identification of multiple stellar populations in the sample clusters are presented. Conclusions are drawn in Section 8. \section{Observations and Data Reduction} \textit{HST} images of the bulge GCs NGC\,6522 and NGC\,6626 and the inner halo cluster NGC\,6362 are employed in the present work (Figure \ref{HST_images}). In order to build proper-motion-cleaned CMDs for the first two clusters, images from two different epochs were retrieved from the \textit{HST} archive.\footnote{https://archive.stsci.edu} The \textit{HST} images of NGC\,6522 were collected as part of the program GO-9690 (PI: J. Grindlay), with the ACS/WFC.\footnote{Wide Field Channel (WFC) on the ACS.} The observations of NGC\,6626 were performed using the same camera during the program GO-11340 (PI: J. Grindlay). For both clusters we reduced the data in F435W, F625W, and F658N filters. For NGC\,6362 we employed data in F438W obtained with the WFC3/UVIS\footnote{UVIS Channel on the Wide Field Camera 3 (WFC3).} and in F625W (ACS/WFC) collected during GO-13297 (PI: G. Piotto) and GO-12008 (PI: A. Kong), respectively. As a first step, all images were corrected for the imperfect charge transfer efficiency. The data reduction was carried out using the software described in detail by \citet{Anderson+08}. The point-spread function (PSF) model used in this work is a perturbation of the library PSF by \citet{Anderson+King06}; in this way, we took into account the change of focus of the spacecraft. We corrected the measured stellar positions for geometric distortion by using the solution provided by \citet{Anderson+King06}. We calibrated the magnitudes into the Vega-mag systems as in \citet{Bedin+05}. Finally, we corrected the CMDs for differential reddening using the procedure described in detail by \citet{Milone+12}. An inspection of the theoretical magnitude predictions in the filters F438W and F435W indicates a negligible difference of $\sim$0.01 mag. Even if small, this small difference was taken into account when the F435W magnitudes of NGC\,6362 were converted to the F438W filter. For NGC\,6522 we used as first-epoch images in F439W and F555W taken with the WFPC2 as part of the program GO-6095 (PI: S. Djorgovski) on 1995 September 9 ($t_{\rm I}=1995.69$). As second epoch we used all the images in F435W, F625W, and F658N taken during GO-9690 (PI: J. Grindlay) on 2003 July 10 ($t_{\rm II}=2003.52$). The time baseline for the proper-motion measurements is $\sim 7.83$\,yr. For NGC\,6626 we considered as first epoch the WFPC2 observations in F555W and F814W carried out during GO-6625 (PI: R. Buonanno) on 1997 September 12 ($t_{\rm I}=1995.70$), while as second epoch we used the F435W and F625W observations taken for GO-11340 (PI: J. Grindlay) on 2010 April 26 ($t_{\rm II}=2010.32$). The time baseline is $\sim 14.62$\,yr. \subsection{Proper Motions} Stellar relative proper motions were measured for NGC\,6522 and NGC\,6266, in order to separate cluster members and field stars. The approach used is the same as that by, e.g., \citet{Anderson+06}, \citet{Bellini+10}, \citet{Libralato+14} and \citet{Nardiello+16}. Briefly, we used six-parameter, local linear transformations to transform stars' positions as measured in the first-epoch reference frame into that of the second epoch and then computed the displacements. To compute the coefficients of these local transformations, we considered a sample of close-by, likely cluster members (e.g.,​ red giant branch [RGB], and subgiant branch [SGB] stars). These stars were selected according to their location in the CMDs and/or in the vector-point diagram (VPD). ​By using cluster stars, the stellar displacements in both coordinates ($\Delta X, \Delta Y$) are computed relative to the cluster mean motion, and in the VPD the cluster distribution is centered at (0,0), while the bulk of the field stars are located in a different region (Figure \ref{VPD_pm}). In this figure the number of stars as a function of total displacements $(\Delta X^{2}+\Delta Y^{2})^{1/2}$ is shown in the insets within each of the two main panels. The cutoff in proper motion was chosen based on the visual inspection of the final cleaned CMDs. \begin{figure*} \centering \includegraphics[angle=0,scale=0.35]{NGC6522_VPD_dist_pm.eps} \includegraphics[angle=0,scale=0.35]{NGC6626_VPD_dist_pm.eps} \caption{ VPD of NGC\,6522 (left) and NGC\,6626 (right). Likely cluster stars (red) and remaining stars (gray) are presented in each panel. The histograms inserted in insets give the number of stars as a function of $(\Delta X^{2}+\Delta Y^{2})^{1/2}$. The vertical dashed line represents the cutoff limit to define the cluster members. } \centering \label{VPD_pm} \end{figure*} \begin{figure*} \centering \includegraphics[angle=0,scale=0.28]{NGC6522_RDP_king1.eps} \includegraphics[angle=0,scale=0.28]{NGC6626_RDP_king1.eps} \includegraphics[angle=0,scale=0.28]{NGC6362_RDP_king1.eps} \caption{Radial density profile of NGC\,6522 (left), NGC\,6626 (middle), and NGC\,6362 (right). The best fits for the King model are also presented (green lines). Vertical lines correspond to limiting radius as shown in Figure \ref{HST_images} (blue dashed line), core radius from King's model (black dashed line), and core radius from \citet{Trager+95} (black solid line).} \centering \label{RDPs} \end{figure*} \subsection{Radial Density Profiles} \label{sect_RDPs} The radial density profiles of NGC\,6522, NGC\,6626, and NGC\,6362 are presented in Figure \ref{RDPs}. They were determined by counting stars in a sequence of concentric rings using the F625W photometric catalog. The center of the clusters was inferred by changing the center position until we found the ($X,Y$) coordinates where the density maximizes. The area of each ring was evaluated by means of a numerical approach, where a large number of artificial points are generated in random positions. Those points located inside the boundaries of the \textit{HST} instruments (overlapping WFPC2 and ACS field of view for NGC\,6522 and NGC\,6626; ACS for NGC\,6362) (see Figure \ref{HST_images}) are used to determine the area fraction covered by them. Only cluster stars brighter than F625W$_{\rm{MSTO}}$ + 1.0 mag were used, preventing incompleteness effects. In order to determine the core radius ($r_{\rm{c}}$) and the central star density ($\rho_{0}$), we adopted the two-parameter model from \citet{King62}: $$ \rho(r) = \rho_{0} \frac{1}{1+(\frac{r}{r_{\rm{c}}})^{2}} .$$ A nonlinear minimum square fitting was employed to find the best solutions. The structural parameters from these fits are shown in Table \ref{tab_coord}. NGC\,6522 and NGC\,6626 have very similar and small core radii ($\sim$ 12 arcsec), as well as similar and high central star density ($\sim$ 5 stars arcsec$^{-2}$), different from the ones presented for NGC\,6362 (91 $\pm$ 12 arcsec and 0.23 $\pm$ 0.03 stars arcsec$^{-2}$). In Figure \ref{RDPs} we compare the core radius recovered by us and the ones determined by \citet{Trager+95}. The agreement is very good for NGC\,6626 and NGC\,6362. On the other hand, we obtained a core radius for NGC\,6522 significantly larger than the one determined by \citet{Trager+95}. We did not apply the three-parameter King's model since the observed angular radii covered by the \textit{HST} images ($\sim 2$ arcmin) are significantly smaller than the tidal radii of these clusters ($\gtrsim$ 5 arcmin). In particular, only the core region of NGC\,6362 was analyzed because it is a very extended cluster with a core radius $\gtrsim$ 60 arcsec. For the two bulge clusters the analyzed area corresponds to about 10 times the core size. \section{Color-Magnitude Diagrams} \label{sect_CMDs} Figure \ref{cmds} shows the CMDs of NGC\,6522, NGC\,6626, and NGC\,6362. In all CMDs, the main sequence (MS), SGB, and RGB are very well defined after field star decontamination, ranging along at least 7 mag. Different magnitude and color limits are adopted for each cluster in order to place their MSTO level side by side, thus allowing direct comparisons. An important difference between these clusters is related to the HB: NGC\,6522 and NGC\,6626 have similar BHBs, whereas NGC\,6362 presents an RHB. Looking at Figure \ref{cmds}, it seems that the stars in the upper RGB are significantly more scattered in the two bulge GCs than in NGC\,6362, indicating that there is a possible saturation effect for stars brighter than the HB. Blue stragglers seem to be present in the three clusters. Figure \ref{cmds} also presents the fiducial line for each cluster, defined by the color median throughout the MS, SGB, and RGB, using magnitude bins of $\Delta$mag$ = 0.15$. \subsection{MSTO} The MSTO, defined as the bluest MS point, is the main CMD feature to characterize ages of stellar clusters. In this work the MSTO point was determined by adopting the following procedure. A denser sequence of fiducial points was determined by applying small magnitude shifts (0.01 mag) to the original magnitude bins (0.15 mag), therefore better sampling the MSTO region and reducing the uncertainties in the MSTO position. The final MSTO magnitude in the F625W filter was defined as the average over all fiducial points with a color difference $\leq$ 0.010 mag ($\sim$ random uncertainty in color for each point) relative to the bluest point, with the uncertainty in this value being provided by the standard deviation over these points ($\leq$ 0.08 mag for all clusters). These determinations are presented in Table \ref{tab_photom}. \begin{figure*} \centering \includegraphics[angle=0,scale=0.65]{cmd_all_clusters.eps} \caption{F625W vs. F435W--F625W CMDs of NGC\,6522 and NGC\,6626, and F625W vs. F438W--F625W CMD of NGC\,6362. Cluster stars (black) and noncluster stars (gray) are shown in each panel. The fiducial lines (cyan solid lines) and the position of the RR Lyrae stars from Clement's catalog (open circles) that were identified in the \textit{HST}/ACS data are also presented. The horizontal dashed lines represent the MSTO magnitude (lower line) and the average of the mean magnitudes for all RR Lyrae stars in Clement's catalog and the OGLE catalog (upper line) (See Section 3.2 for details). } \centering \label{cmds} \end{figure*} \subsection{HB Level and RR Lyrae Stars} For BHB clusters the HB magnitude at the RR Lyrae position is uncertain, particularly at the TO color, where the HB presents few or even no stars, as can be seen in Figure \ref{cmds}. For this reason the use of RR Lyrae to determine the HB magnitude in BHB clusters is highly recommended, sometimes mandatory \citep{Zoccali+99}. To provide a first guess about the location of the RR Lyrae stars in the \textit{HST} CMDs, we cross-matched our \textit{HST} data with the RR Lyrae stars presented in Clement's catalog. We identified five RR Lyrae in NGC\,6522 and seven in NGC\,6626 and NGC\,6362 (Figure \ref{cmds}). Although most of these RR Lyrae stars were not present in our multi-epoch photometry, preventing their membership evaluation, they appear to be cluster members owing to their magnitudes, similar to the HB one. As expected, significant magnitude and color spreads can be seen in the \textit{HST} photometry for these short-period variable stars. This is an effect of instantaneous measurements at random phase positions in RR Lyrae light curves, since they present amplitudes that can reach $\sim$ 1.0 mag in optical bands and periods of $\sim 0.2-0.7$ days. In order to reduce the uncertainties in the HB level that would be introduced by determinations using instantaneous magnitudes, we analyzed the $V$ mean magnitudes of the RR Lyrae stars presented in Clement's catalog and the OGLE catalog (Figure \ref{RRLyrae}). For NGC\,6522 there are 17 RR Lyrae stars in the OGLE catalog (8 of Rab type and 9 of RRc type; \citealp{Soszynski+14}), and 10 of them are also present in the compilation given in \citet[edition 2017]{Clement+01}.\footnote{In Clement's catalog the RRab and RRc types are designed as RR0 and RR1, respectively, as suggested by N.~N. Samus at the IAU XXVIth General Assembly, Prague 2006.} For NGC\,6626 Clement's catalog presents only 10 RR Lyrae stars with mean magnitude values in the $V$ filter (8 RRab and 2 RRc - \citealp{Wehlau+Butterworth90}). Two RR Lyrae stars toward this cluster were rejected owing to their discrepant magnitudes, being probably foreground or background field stars. A large number of 35 RR Lyrae stars (18 RRab and 17 RRc; \citealp{Olech+01}) are available for NGC\,6362. The OGLE catalog does not provide any entry for RR Lyrae stars in the other two GCs in our sample. The mean of the mean magnitudes is also shown in Table \ref{tab_photom} and Figure \ref{RRLyrae}, as well as the standard deviation in these values. The mean $V$ magnitudes of the RR Lyrae stars were converted into the F625W filter, allowing a consistent comparison with the MSTO, as previously determined by us. The transformation of $V$ magnitudes presented in Clement's and OGLE catalogs into the F625W band has been done in the following steps: conversion of the $V$ into the $R$ band and then from $R$ to F625W using the \citet{Sirianni+05} ACS calibration. First, the given magnitudes have been corrected for color excess $E$(\textit{V}$-$\textit{R}) starting with our color excess $E$(\textit{B}$-$\textit{V}) (See Section \ref{results}) and the conversions from \citet{Fitzpatrick99}. Subsequently we adopted the transformations from $V$ to $R$ using PARSEC isochrone \citep{Bressan+12} colors.\footnote{Available at http://stev.oapd.inaf.it/cgi-bin/cmd.} The $R$ magnitudes so derived are then converted into F625W based on \citet{Sirianni+05}. As a consistency check, this transformation has also been obtained using BaSTI isochrone tables for HB stars with the same average temperature of the RR Lyrae, comparing the $V$ magnitudes with the corresponding F625W magnitudes. This conversion requires interpolation of the data, but the results are basically identical to the previous procedure. In a conservative approach, we can assume that the uncertainties related to the transformation from $V$ to F625W are $\sim$ 0.08, including the ones from the reddening ($\sim 0.04$), and in the transformation from $V$ to $R$ ($\sim 0.07$). These uncertainties combined with those in the $V$ filter provide the final values in Table \ref{tab_photom}. Finally, we also calculated the magnitude difference between the MSTO and the HB as determined by the RR Lyrae stars ($\Delta V^{\rm{HB}}_{\rm{TO}} $). This is a very commom parameter used to constrain the ages of GCs (e.g., \citealp{DeAngeli+05,VandenBerg+13}, and references therein) since it is distance and reddening independent. The $\Delta V^{\rm{HB}}_{\rm{TO}} $ parameter is particularly useful to determine relative ages when the clusters have similar metallicities and are homogeneously analyzed in terms of filters and method, as in the present case. \begin{figure} \centering \includegraphics[angle=0,scale=0.42]{RRLyr_all_clusters.eps} \caption{ Mean $V$ magnitude vs. period of the RRab (red circles) and RRc (blue circles) Lyrae stars presented in NGC\,6522 (top panel), NGC\,6626 (middle panel), and NGC\,6362 (bottom panel). The mean of the mean $V$ magnitudes (solid line) and its standard deviation (dotted line) are shown in each panel. Two rejected field RR Lyrae stars toward NGC\,6626 (open circles) are also presented. } \centering \label{RRLyrae} \end{figure} \begin{table*} \begin{center} \caption{Coordinates and Present Structural Parameters} \begin{tabular}{lcccccc} \tableline \tableline Cluster & R.A. (J2000) & Decl. (J2000) & $l$ & $b$ & $\rho_{0}$ & $r_{\rm{c}}$ \\ & (h m s) & ($\degr$ $\arcmin$ $\arcsec$) & ($\degr$) & ($\degr$) & (stars/arcsec$^2$) & (arcsec) \\ \tableline NGC\,6522 & 18:03:34.08 & -30:02:02.3 & -1.02 & -3.93 & 5.22 $\pm$ 0.13 & 12.32 $\pm$ 0.26 \\ NGC\,6626 (M28) & 18:24:32.89 & -24:52:11.4 & 7.80 & -5.58 & 5.01 $\pm$ 0.14 & 12.67 $\pm$ 0.31 \\ NGC\,6362 & 17:31:54.99 & -67:02:54.0 & 325.55 & -17.57 & 0.233 $\pm$ 0.026 & 91.2 $\pm$ 11.9 \\ \tableline \end{tabular} \end{center} \label{tab_coord} \tablecomments{F625W magnitude cutoff for the King's model: F625W$_{\rm{MSTO}}$ + 1.0 (see Table \ref{tab_photom})} \end{table*} \begin{table*} \begin{center} \caption{Photometric Parameters from \textit{HST} Data and RR Lyrae Stars} \begin{tabular}{lccccc} \tableline \tableline Cluster & MSTO & RR Lyrae & RR Lyrae & RR Lyrae & $\Delta V^{\rm{HB}}_{\rm{TO}}$ \\ & F625W & No. of Stars & $\langle V \rangle$ & $\langle$F625W$\rangle$ & $\langle$F625W$\rangle$ \\ \tableline NGC\,6522 & 19.73 $\pm$ 0.05 & 17 & 16.70 $\pm$ 0.05 & 16.27 $\pm$ 0.09 & 3.46 $\pm$ 0.10 \\ NGC\,6626 (M\,28) & 18.74 $\pm$ 0.08 & 10 & 15.73 $\pm$ 0.06 & 15.16 $\pm$ 0.10 & 3.58 $\pm$ 0.13 \\ NGC\,6362 & 18.56 $\pm$ 0.08 & 35 & 15.26 $\pm$ 0.01 & 14.94 $\pm$ 0.08 & 3.62 $\pm$ 0.11 \\ \tableline \end{tabular} \end{center} \label{tab_photom} \end{table*} \begin{table*} \begin{center} \caption{Metallicity and Chemical Abundances from High-resolution Spectroscopy} \begin{tabular}{lccccccc} \tableline \tableline Cluster & [Fe/H] & [O/Fe] & [Mg/Fe] & [Si/Fe]& [Na/Fe] & [$\alpha$/Fe] & References \\ \tableline NGC\,6522 & $-1.00~\pm$ 0.20 & +0.40 & +0.03 & +0.23 & +0.25 & +0.25 & B09 \\ & $-1.15~\pm$ 0.15 & ... & +0.43(2G) & +0.42 & +0.28 & +0.36 & N14 \\ & $-1.15~\pm$ 0.15 & ... & $-0.21$(1G) & +0.42 & +0.28 & +0.36 & N14 \\ & $-0.95~\pm$ 0.15 & +0.36 & $-0.07$ & +0.23 & +0.13 & +0.18 & B14 \\ & $-1.06~\pm$0.07 & +0.33 & +0.07 & +0.38 & ... & +0.26 & F18 \\ \tableline NGC\,6626 & $-1.29~\pm$ 0.01 & $-$0.36(2G) & +0.46(2G) & +0.34 & +0.46(2G) & +0.37 & V17 \\ (M28) & $-1.29~\pm$ 0.01 & +0.27(1G) & $-0.04$(1G) & +0.34 & -0.04(1G) & +0.38 & V17 \\ \tableline NGC\,6362 & $-1.09~\pm$ 0.01 & ... & ... & ... & +0.00(1G) & ... & M16 \\ & $-1.09~\pm$ 0.01 & ... & ... & ... & +0.33(2G) & ... & M16 \\ & $-1.07~\pm$ 0.01 & ... & +0.54 & +0.45 & ... & +0.32 & M17 \\ \tableline \end{tabular} \end{center} \label{tab_spec} \tablecomments{B09 - \citet{Barbuy+09}; N14 - \citet{Ness+14}; B14 - \citet{Barbuy+14}; F18 - \citet{Fernandez-Trincado+18}; V17 - \citet{Villanova+17}; M16 - \citet{Mucciarelli+16}; M17 - \citet{Massari+17} } \end{table*} \section{Physical Parameters from the literature} \begin{table*} \begin{center} \caption{Age, Distances, Reddening, and Structural Parameters from Literature} \begin{tabular}{lccccc@{}c@{}c@{}c@{}c@{}c@{}c@{}c@{}c@{}} \tableline \tableline Cluster & Age & Refs & ($m-M$)$_{0}$ & $d_{\odot}$ & $R_{\rm{GC}}$ & ~~$E$(\textit{B}$-$\textit{V})~~ & $r_{\rm{c}}$ & c & $M_{\rm{V}}$ & Refs & Mass & Refs \\ & (Gyr) & & & (kpc) & (kpc) & & (arcsec) & ~~(log($\frac{r_{\rm{t}}}{r_{\rm{c}}}$))~~ & & & ~($\times 10^{4}$ M$_{\odot}$)~ & \\ \tableline NGC\,6522 & $\gtrsim$ 14.0 & B09 & 14.43 & 7.7 & 0.6 & 0.48 & 3.1 & 2.50c & -7.65 & H96 & 5.93 & GO97 \\ & 15.0 $\pm$ 1.1 & MW06 (a) & 14.34 & 7.4 & 0.8 & 0.66 & & & & VFO10 & & \\ & 13.8 $\pm$ 1.6 & MW06 (b) & 14.30 & 7.2 & $<$ 1 & 0.46 & & & & T98 & & \\ & & & 14.52 & 7.8 & 0.6 & 0.48 & & & -7.67 & P02 & & & \\ \tableline NGC\,6626 & 14.2 $\pm$ 0.9 & T01, D10 & 13.70 & 5.5 & 2.7 & 0.42 & 14.4 & 1.67 & -8.16 & H96 & 44.2 & GO97 \\ (M28) & $\sim$ 13.0 & V17 & & & & & & & & & & \\ \tableline NGC\,6362 & 12.5 $\pm$ 0.25 & VdB13 & 14.40 & 7.6 & 5.1 & 0.09 & 79.4 & 1.10 & -6.95 & H96 & 11.7 & GO97 \\ & 12.5 $\pm$ 0.50 & D10 & 14.55 & 8.1 & & 0.07 & & & -7.06 & D10 & & \\ & 13.6 $\pm$ 0.6 & MF09 & & & & & & & & & & \\ & 14.0 & P10 & 14.39 & 7.6 & 5.1 & 0.09 & 72 & 1.17 & -6.94 & P10 & & \\ & 12.82$^{+0.03}_{-0.04}$ & WK16 & 14.56 & 8.1 & & 0.09 & & & & WK16 & & \\ & 13.497$^{+0.003}_{-0.011}$ & WK17 & 14.44 & 7.7 & & 0.10 & & & & WK17 & & \\ & 10.5 & MW06 (a) & 14.54 & 8.1 & 5.3 & 0.08 & & & -7.06 & P02 & & \\ & 9.0 $\pm$ 0.5 & MW06 (b) & & & & & & & & & & \\ \tableline \end{tabular} \end{center} \label{tab_param_lit} \tablecomments{ B09 - \citet{Barbuy+09}; D10 - \citet{Dotter+10}; GO97 - \citet{Gnedin+Ostriker97}; H96 - \citet[update in 2010]{Harris96}; MF09 - \citet{Marin-Franch+09}, 1.06 $\pm$ 0.05 $\times$ 12.8 Gyr (mean reference age using Dartmouth isochrones); MW06 - \citet{Meissner+Weiss06}, using their own isochrones (a) and BaSTI (b) isochrones; P10 - \citet{Paust+10}; P02 - \citet{Piotto+02}; T98 - \citet{Terndrup+98}; T01 - \citet{Testa+01}, 1.2 $\pm$ 0.90 Gyr older than NGC\,2298, taken as 13.0 Gyr from D10; VFO10 - \citet{Valenti+10}; VdB13 - \citet{VandenBerg+13}; V10 - \citet{Villanova+17}, age comparable to M12 owing to their similar metallicity and BHB; WK16 - \citet{Wagner-Kaiser+16}, for two populations with $Y=0.220$ (1G) and $0.265$ (2G); WK17 - \citet{Wagner-Kaiser+17}, for a single population with $Y=0.327$ and adopting [$\alpha$/Fe]=+0.40. } \end{table*} \subsection{Metallicity and Alpha-elements} Metallicities and main abundance ratios available are reported in Table \ref{tab_spec}. A spectroscopic analysis of eight RGB stars in NGC\,6522 using the FLAMES-GIRAFFE spectrograph, with $R\sim$22,000, was presented in \citet{Barbuy+09}. The authors found a metallicity of [Fe/H]$=-1.0 \pm 0.2$ together with the $\alpha$-element enhancements (see Table \ref{tab_spec}). Using the same FLAMES-GIRAFFE data, \cite{Ness+14} reanalyzed the eight stars and measured [Fe/H]=$-1.15$, and a somewhat higher enhancement of $\alpha$-elements. An improved analysis of four of the same RGB stars by \citet{Barbuy+14} was obtained using the FLAMES-UVES spectrograph at $R\sim$45,000, and a higher signal-to-noise ratio. This resulted in [Fe/H]$=-0.95 \pm 0.15$, and $\alpha$-enhancements similar to those given in \citet{Barbuy+09}. Based on the DR13 release of APOGEE, \citet{Fernandez-Trincado+18} find [Fe/H]$=-1.06 \pm 0.06$, and [$\alpha$/Fe]=+0.26 (mean of O, Mg, Si) for second-generation stars. As concerns NGC\,6626, \citet{Villanova+17} recently analyzed 21 stars observed with FLAMES-UVES. They obtain [Fe/H]$=-1.29$, and abundances for 21 elements. For NGC\,6362 the spectroscopic analysis carried out by \citet{Mucciarelli+16} gives values of metallicity [Fe/H] and [Na/Fe]. Using sodium as a key indicator of stars from first and second generations (e.g., \citealp{Campbell+13}), \cite{Mucciarelli+16} and \cite{Villanova+17} provided two distinct [Na/Fe] values for NGC\,6362 and NGC\,6626, respectively. For NGC\,6522 no Na excess is found in \citet{Barbuy+09, Barbuy+14}, except for star B-8 in \citet{Barbuy+09}. \citet{Ness+14} found three stars Na-normal and five stars with Na excess, partly due to their lower metallicities relative to \citet{Barbuy+14}. Note that for NGC\,6522 [$\alpha$/Fe]=[$\langle$(O$+$Mg$+$Si$+$Ca$+$Ti)$\rangle$/Fe], whereas for NGC\,6626 [$\alpha$/Fe]=[$\langle$Mg$+$Si$+$Ca$+$Ti$\rangle$/Fe], since oxygen abundances are not derived for the latter. The [$\alpha$/Fe] values reported in Table \ref{tab_spec} justify the adopted [$\alpha$/Fe]$\sim+$0.4 available in the isochrone sets. Such $\alpha$-enhancements are of the same order as measured in other clusters of the Galactic bulge (e.g., Table 4 of \citealp{Bica+16}). Finally, it must be pointed out that since Mg and Si are important electron donors, they contribute to the formation of the H$^{-}$ ion, which is the main opacity source at the temperatures of G--K type stars, therefore affecting the effective temperature scale of both MSTO and (mostly) RGB stellar models. The trend is that by increasing the Mg and/or Si abundance at a given [Fe/H], the RGB becomes cooler: an increase of 0.4 dex causes a decrease of about 100--150 K in $T_{\rm eff}$. Because Mg and Si (together with O and Ne) affect the difference in $T_{\rm eff}$ (and hence color) between the MSTO and the lower RGB at a fixed age, the use of such a diagnostic to determine the relative ages of star clusters having very similar [Fe/H] values will yield reliable results only if the cluster-to-cluster differences in the abundances of these elements are small, or if the effects of such differences are taken into account (see \citealp{VandenBerg+12} for a detailed discussion on this issue). As a warning, we note that -- as listed in Table \ref{tab_spec} -- the Mg and Si abundances in these GCs might be lower than that of halo clusters. \subsection{Age, Distance, Reddening, and Structural Parameters} In Table \ref{tab_param_lit} we compile literature results for the sample clusters, including ages, solar and galactocentric distances, reddening, absolute magnitudes, core radii, and concentration parameter. NGC\,6522 and NGC\,6626 are within the bulge volume, and NGC\,6522 is located at $<$ 1 kpc from the Galactic center in Baade's Window. As for the ages, NGC\,6522 was found to be very old ($\gtrsim$ 13.8 Gyr) in two studies available using \textit{HST} previous data \citep{Meissner+Weiss06,Barbuy+09}. For NGC\,6626 there is only one relative age determination \citep{Testa+01}, suggesting that is 1.2 $\pm$ 0.9 Gyr older than NGC\,2298 (13.0 Gyr, as determined by \citealp{Dotter+10}). Recently, \citet{Villanova+17} argued that this cluster should be as old as M15 ($\sim$ 13.0 Gyr) owing to their similar BHB at the same metallicity. The inner halo cluster NGC\,6362 has been studied more extensively in the literature and can be used as a reference with respect to other studies, and conversely as a comparison probe with the present clusters. Most results for this cluster indicate an age $\gtrsim$ 12.5 Gyr, therefore classifying it as an old GC. The only exception is the work from \citet{Meissner+Weiss06}, where a younger age ($\sim$ 10 Gyr) for NGC\,6362 is given, significantly younger (by $\sim 4$ Gyr) than NGC\,6522. The two bulge clusters have $E$(\textit{B}-\textit{V}) $>$ 0.40, while NGC\,6362 has a low reddening. On the other hand, NGC\,6522 and NGC\,6362 present similar solar distances ($\sim$ 7--8 kpc), $\sim 2$ kpc farther than NGC\,6626. The structural parameters indicate that NGC\,6522 is a core-collapse cluster \citep{Terndrup+98}, and the most compact and least massive object ($\sim6\times10^{4}M_{\odot}$) in our sample \citep{Gnedin+Ostriker97}, whereas NGC\,6626 is the most massive ($\sim4\times10^{5}M_{\odot}$) and NGC\,6362 is the least compact one. \section{Isochrone fitting} \label{isot_fits} \subsection{Isochrone Models} \label{isochronemodels} In order to compare the \textit{HST} data for the sample clusters with theoretical models, we selected $\alpha$-enhanced isochrones with canonical ($Y\sim0.25$) and helium-enhanced ($Y=0.30-0.33$) isochrones from the Dartmouth Stellar Evolutionary Database (DSED; \citealp{Dotter+08}) and from BaSTI models \citep{Pietrinferni+06}. Based on the spectroscopic results for these clusters, isochrones with [Fe/H]=$-1.0$, $-1.15$ and $-1.30$ and [$\alpha/$Fe]$=+0.40$ were employed, covering ages from 10.0 to 15.0 Gyr (in steps of 0.50 Gyr). The effects of age, metallicity, and helium enhancement in DSED and BaSTI isochrones are illustrated in Figure \ref{isochrones}. Essentially helium-enhanced isochrones predict bluer MS and RGB, as well as fainter MSTO, than the isochrones with standard helium abundance. A $\Delta Y \sim 0.05-0.08$ can produce an effect as large as $\sim 0.05$ in (F435W--F625W) color for the MS or RGB stars, and about 0.20 mag (F625W) in the MSTO magnitude, resembling a difference of $\sim$ 0.15 dex in [Fe/H] or $\sim$ 2.5 Gyr in age. Therefore, it is expected that isochrone fits using helium-enhanced models will recover higher reddening and lower distance values, as well as younger ages. Furthermore, helium enhancement produces a remarkable change in the SGB shape, which becomes significantly steeper. It is important to point out that the BaSTI models have been computed by neglecting the effect of atomic diffusion, which is included in the DSED models (when computing BaSTI models it was chosen not to include this effect owing to the uncertainty on the atomic diffusion coefficients). This introduces an offset in the age scale based on the two distinct model sets: the inclusion of the diffusion reduces the age by about 0.9 Gyr at the metallicity of the sample GCs (\citealp{Cassisi+98,Cassisi+99} and references therein). Therefore, the BaSTI-based ages should be reduced by 0.9 Gyr, and this completely removes the apparent contradiction with the age of the universe (13.799 $\pm$ 0.021 Gyr; \citealp{Planck16}). Before using theoretical isochrones to fit the cluster CMDs, we had to consider carefully an important issue, related to the high extinction along the line of sight to some clusters in our sample, as in the case of NGC\,6522 and NGC\,6626, for which $A_{V} > 1$. It is well known that the ratio between the extinction in a given photometric band ($A_{\lambda}$) and $A_{V}$ depends on the flux distribution of the stellar source and is in principle dependent on parameters such as the effective temperature, surface gravity, and chemical composition (see, e.g., \citealp{Bedin+05}; \citealp{Ortolani+17}, for discussions and data specific for the ACS photometric filters). As long as $A_{V}$ is small, this effect is negligible and a single value of $A_{\lambda}/A_{V}$ can be safely applied along the whole isochrone. But the high value of the extinction in the case of NGC\,6522 and NGC\,6626 makes it necessary to consider, in the fits to the observed CMD, the variation of $A_{\lambda}/A_{V}$ along the isochrones due to (mainly) the change in the stellar effective temperature. In order to account for this effect when needed, we proceeded as follows: we first used the CMD 3.0 web interface,\footnote{http://stev.oapd.inaf.it/cgi-bin/cmd} which implements the results by \citet{Girardi+08}, to determine the extinction in the relevant photometric filters, covering the full range of $T_{\rm{eff}}$ values of our isochrones and zero-age horizontal branch (ZAHB), for a suitable value of the metallicity, and for varying values of the extinction; these final extinction values in the F625W and F435W bands were then applied to the theoretical isochrones transformed to the ACS system. These ${\rm T_{eff}}$-dependent extinction corrections have the effect of steepening the RGB by $\Delta$(F435W--F625W) $\sim$ 0.05, as shown in Figure \ref{ACS}; indeed, this correction is very relevant for present work, because the effect on the RGB and SGB shape is quite similar to that related to a variation in the initial He abundance. \begin{figure*} \centering \includegraphics[angle=0,scale=0.42]{isochrones_BaSTI_feh_Y.eps} \includegraphics[angle=0,scale=0.42]{isochrones_DSED_feh_Y.eps} \caption{Isochrones from BaSTI (left panels) and Dartmouth (right panels) showing the metallicity effects for two ages (10.0 and 15.0 Gyr). All these isochrones are $\alpha$-enhanced ([$\alpha$/Fe]=+0.40]). Isochrones with [Fe/H]$\sim -$1.0 and canonical ($Y\sim 0.25$; solid lines) and enhanced ($Y=0.30$ for BaSTI models, $Y=0.33$ for DSED models; dotted lines) helium abundances are presented. } \centering \label{isochrones} \end{figure*} \begin{figure} \centering \includegraphics[angle=0,scale=.40]{BaSTI_new_reddening.eps} \caption{CMD correction for the reddening effect using a uniform $E$(\textit{B}$-$\textit{V}) (first order; dashed lines) and a temperature-dependent one (second order; solid lines). A single $\alpha$-enhanced BaSTI isochrone with 12 Gyr, $Y=0.251$ and [Fe/H]$=-1.01$ is converted from its reddening-free position (dotted line) to the ones corresponding to the reddening values $E$(\textit{B}$-$\textit{V})=0.40 and 0.50. } \label{ACS} \end{figure} \subsection{Statistical Fiducial Line Comparisons} \label{fitting} The age, reddening, and distance modulus of each cluster were derived from statistical comparisons between synthetic fiducial lines and the observed ones. Similar procedures have been applied to analyze \textit{HST} CMDs of Galactic GCs (e.g., \citealp{Marin-Franch+09,VandenBerg+13}) and populous LMC clusters (e.g., \citealp{Kerber+07}). The synthetic fiducial lines were determined by the color median positions at each magnitude bin of synthetic CMDs encompassing the MS, SGB, and RGB. These CMDs were generated using DSED and BaSTI isochrones with [$\alpha$/Fe]=+0.40, [Fe/H]=$-1.0$ (for NGC\,6522, NGC\,6362) and $-1.15$ (for NGC\,6522, NGC\,6362), and [Fe/H]=$-1.3$ (for NGC\,6626) and different helium abundances (from $Y\sim0.25$ to 0.33). The synthetic CMDs explored a wide and regular model grid, typically covering $\Delta$(age)=5.0 Gyr, $\Delta$($E$(\textit{B}$-$\textit{V}))=0.20, $\Delta$(($m-M$)$_{0}$)=0.40, in steps of 0.50 Gyr, 0.02 mag, and 0.02 mag respectively. Furthermore, educated guesses for photometric uncertainties (similar to the ones determined for the bulk of stars), binarity (20\%), and initial mass function (Salpeter) were used in order to reproduce the observed CMD features. The $\chi^{2}$ statistics was employed to compare the model (mod) and data (obs) colors, being computed for the $N_{\rm{bin}}$ magnitude bins along the fiducial line according to the expression $$\chi^{2} = \frac{1}{N_{\rm{bin}}-1}\sum_{i=1}^{N_{\rm{bin}}}\left[\frac{(\rm{color})_{\rm{obs},\textit{i}}-(\rm{color})_{\rm{mod},\textit{i}}}{\sigma_{\rm{color}}}\right]^{2} ,$$ where $\sigma_{\rm{color}}$ is the dispersion in the median color position for the $i^{\rm{th}}$ magnitude bin in the model (typically $\sim$ 0.02). To determine the final values of the fit parameters, as well as to study the confidence intervals and correlations between them, we applied the Markov chain Monte Carlo (MCMC) sampling technique. For that purpose, we used the \texttt{emcee} code \citep{Foreman-Mackey+13} to sample the posterior probability in the three-dimensional parameter space, assuming $\mathrm{likelihood}\propto \exp[-\chi^2/2]$ and a uniform prior probability within the acceptable physical ranges. Figure \ref{NGC6522_cmd_obs_vs_models_BaSTI_fehm115} illustrates our isochrone fitting method applied to the \textit{HST} CMD of NGC\,6522. In this fit we employed $\alpha$-enhanced BaSTI models with [Fe/H]$=-1.01$ and $Y=0.251$. The left panels in this figure present the observed CMD and its fiducial line, as well as their synthetic counterparts for the best solution, whereas the right panel shows the MCMC sampling results for NGC\,6522. The complete set of results for all clusters, including all figures with the output of the MCMC, is available in the online material. \begin{figure*} \centering \includegraphics[angle=0,scale=0.40]{NGC6522_cmd_obs_vs_model_BaSTI_fehm100_v2.eps} \includegraphics[angle=0,scale=0.40]{n6522_stat_wz403y251aes_new_red_corner.eps} \caption{ Left panels: the observed CMD and the fiducial line for NGC\,6522 compared with a synthetic CMD for the best isochrone fit using $\alpha$-enhanced BaSTI models with [Fe/H]$=-1.01$ and $Y=0.251$. Isochrones with 11.0, 12.0, 13.0, 14.0, and 15.0 Gyr are overplotted (black lines). In each panel, cluster members (left) and synthetic stars (right) are shown (gray points). The color difference between the data and the fiducial line for the best fit is also presented. Right panels: corner plots showing the output from the MCMC method. They present the one- and two-dimensional projections of the posterior probability distributions for all parameters. The contours correspond to the [0.5$\sigma$, 1$\sigma$, 1.5$\sigma$, 2$\sigma$] levels. } \centering \label{NGC6522_cmd_obs_vs_models_BaSTI_fehm115} \end{figure*} \section{Results from isochrone fitting} \label{results} \subsection{NGC\,6522} For this cluster two different values of metallicity were used: [Fe/H]=$-$1.0 and $-$1.15. The best isochrone fits using BaSTI and DSED models are shown in Figs. \ref{NGC6522_cmd_obs_vs_models_BaSTI} and \ref{NGC6522_cmd_obs_vs_models_DSED}. The recovered physical parameters are presented in these figures and in Table \ref{tab_all_parameters}, including the minimum $\chi^{2}$ for each set of models ($\chi^{2}_{\rm{min}}$). The results with BaSTI isochrones indicate an age of $\sim$ 14.2 Gyr for this cluster, or $\sim$ 13.3 Gyr when corrected for the effect of atomic diffusion (See Section 5.1). On the other hand, DSED models point to $\sim$ 12.2 Gyr if a canonical helium abundance ($Y\sim 0.25$) is employed, or $\sim$ 11.4 Gyr if a $\Delta Y \sim 0.08$ is considered. The age results seem to be insensitive to the choice of metallicity and present random uncertainties that are $\sim$ 1.0 Gyr. In contrast, there are significant variations in distance modulus and reddening as a function of the adopted stellar evolutionary model and helium abundance. As expected, helium-enhanced models recovered solutions with shorter distances and higher reddening values, producing systematic differences of $\sim$ 0.13 mag in distance modulus ($\sim 0.4$ kpc) and $\sim$ 0.04 in $E$(\textit{B}$-$\textit{V}). Besides this, in comparison to results from BaSTI models, DSED isochrones favored isochrone fits with significantly higher values for distance and reddening. Another remarkable result concerns the dependency of the goodness of fit with the helium abundance: as attested by the color difference between model and data and consequently by the $\chi^2_{\rm{min}}$ value, the shape of the observed fiducial line in the MSTO region and the SGB region seems to be better reproduced by helium-enhanced models, independently of the choice related to the stellar evolutionary model. However, in Section 7.2 we demonstrate that the helium enhancement hypothesis is ruled out by the mean magnitude of the RR Lyrae stars. \begin{figure*} \centering \includegraphics[angle=0,scale=0.40]{NGC6522_cmd_obs_vs_models_BaSTI_fehm100_v2.eps} \includegraphics[angle=0,scale=0.40]{NGC6522_cmd_obs_vs_models_BaSTI_fehm115_v2.eps} \caption{ Left panels: the observed fiducial line for NGC\,6522 compared with a synthetic one for the best isochrone fit using $\alpha$-enhanced BaSTI models with [Fe/H]$=-1.01$. Two different helium abundances were tested: $Y\sim 0.25$ and $Y=0.30$. Isochrones with 11.0, 12.0, 13.0, 14.0, and 15.0 Gyr are overplotted (black lines). The cluster members are also shown (gray points). The color differences between the data and the best fiducial lines for models with $Y\sim 0.25$ (solid line) and $Y=0.30$ (dotted line) are also presented. Right panels: the same as in the left panels, but for the BaSTI models with [Fe/H]$=-1.15$.} \centering \label{NGC6522_cmd_obs_vs_models_BaSTI} \end{figure*} \begin{figure*} \centering \includegraphics[angle=0,scale=0.40]{NGC6522_cmd_obs_vs_models_DSED_fehm100_v2.eps} \includegraphics[angle=0,scale=0.40]{NGC6522_cmd_obs_vs_models_DSED_fehm115_v2.eps} \caption{Same as Figure \ref{NGC6522_cmd_obs_vs_models_BaSTI}, but for DSED isochrones with [Fe/H]$=-1.00$ (left panels) and [Fe/H]$=-1.15$ (right panels). The DSED helium-enhanced models have $Y=0.33$.} \centering \label{NGC6522_cmd_obs_vs_models_DSED} \end{figure*} \begin{table*} \begin{center} \caption{Physical Parameters for NGC\,6522, NGC\,6626, and NGC\,6362 from Isochrone Fits Using $\alpha$-enhanced BaSTI and DSED Models} \begin{tabular}{lcccccccccc} \tableline \tableline \hline \tableline Cluster & Model & [Fe/H] & $Z$ & $Y$ & Age (Gyr) & $(m-M)_{0}$ & $d_{\odot}$ (kpc) & $R_{\rm{GC}}$ & $E$(\textit{B}$-$\textit{V}) & $\chi^{2}_{\rm{min}}$ \\ \tableline \tableline NGC\,6522 & BaSTI & -1.01 & 0.0040 & 0.2510 & 14.1 $\pm$ 1.0$^{a}$ & 14.32 $\pm$ 0.05 & 7.31 $\pm$ 0.17 & 0.88 $\pm$ 0.12 & 0.515 $\pm$ 0.010 & 2.99 \\ & BaSTI & -1.01 & 0.0037 & 0.3000 & 14.1 $\pm$ 1.0$^{a}$ & 14.22 $\pm$ 0.05 & 6.98 $\pm$ 0.16 & 1.15 $\pm$ 0.14 & 0.540 $\pm$ 0.009 & 1.47 \\ & BaSTI & -1.15 & 0.0029 & 0.2490 & 14.2 $\pm$ 0.9$^{a}$ & 14.29 $\pm$ 0.05 & 7.21 $\pm$ 0.17 & 0.96 $\pm$ 0.13 & 0.539 $\pm$ 0.009 & 1.91 \\ & BaSTI & -1.15 & 0.0027 & 0.3000 & 14.4 $\pm$ 1.0$^{a}$ & 14.19 $\pm$ 0.05 & 6.89 $\pm$ 0.16 & 1.23 $\pm$ 0.14 & 0.562 $\pm$ 0.010 & 0.83 \\ \tableline & DSED & -1.00 & 0.0035 & 0.2506 & 12.1 $\pm$ 1.0 & 14.41 $\pm$ 0.05 & 7.62 $\pm$ 0.18 & 0.67 $\pm$ 0.08 & 0.526 $\pm$ 0.013 & 2.95 \\ & DSED & -1.00 & 0.0031 & 0.3300 & 11.4 $\pm$ 1.0 & 14.27 $\pm$ 0.05 & 7.14 $\pm$ 0.17 & 1.01 $\pm$ 0.14 & 0.560 $\pm$ 0.011 & 0.61 \\ & DSED & -1.15 & 0.0023 & 0.2488 & 12.4 $\pm$ 1.0 & 14.36 $\pm$ 0.05 & 7.45 $\pm$ 0.17 & 0.78 $\pm$ 0.10 & 0.554 $\pm$ 0.011 & 1.60 \\ & DSED & -1.15 & 0.0021 & 0.3300 & 11.4 $\pm$ 1.0 & 14.24 $\pm$ 0.05 & 7.05 $\pm$ 0.16 & 1.09 $\pm$ 0.13 & 0.596 $\pm$ 0.013 & 0.59 \\ \tableline \tableline NGC\,6626 & BaSTI & -1.31 & 0.0020 & 0.2480 & 14.3 $\pm$ 1.0$^{a}$ & 13.60 $\pm$ 0.06 & 5.25 $\pm$ 0.15 & 2.96 $\pm$ 0.13 & 0.424 $\pm$ 0.010 & 1.61 \\ (M28) & BaSTI & -1.31 & 0.0019 & 0.3000 & 14.0 $\pm$ 1.1$^{a}$ & 13.51 $\pm$ 0.06 & 5.04 $\pm$ 0.14 & 3.15 $\pm$ 0.13 & 0.447 $\pm$ 0.010 & 0.58 \\ \tableline & DSED & -1.30 & 0.0016 & 0.2477 & 12.1 $\pm$ 1.0 & 13.67 $\pm$ 0.06 & 5.42 $\pm$ 0.15 & 2.81 $\pm$ 0.13 & 0.440 $\pm$ 0.013 & 1.28 \\ & DSED & -1.30 & 0.0015 & 0.3300 & 11.1 $\pm$ 0.9 & 13.57 $\pm$ 0.06 & 5.18 $\pm$ 0.14 & 3.02 $\pm$ 0.12 & 0.476 $\pm$ 0.011 & 0.39 \\ \tableline \tableline NGC\,6362 & BaSTI & -1.01 & 0.0040 & 0.2510 & 14.3 $\pm$ 1.0$^{a}$ & 14.40 $\pm$ 0.05 & 7.59 $\pm$ 0.17 & 5.11 $\pm$ 0.05 & 0.038 $\pm$ 0.011 & 1.54 \\ & BaSTI & -1.01 & 0.0037 & 0.3000 & 14.3 $\pm$ 1.1$^{a}$ & 14.30 $\pm$ 0.05 & 7.24 $\pm$ 0.17 & 5.04 $\pm$ 0.03 & 0.060 $\pm$ 0.012 & 1.17 \\ & BaSTI & -1.15 & 0.0029 & 0.2490 & 14.7 $\pm$ 0.9$^{a}$ & 14.38 $\pm$ 0.05 & 7.52 $\pm$ 0.17 & 5.02 $\pm$ 0.03 & 0.062 $\pm$ 0.011 & 1.09 \\ & BaSTI & -1.15 & 0.0027 & 0.3000 & 14.8 $\pm$ 1.1$^{a}$ & 14.28 $\pm$ 0.05 & 7.18 $\pm$ 0.17 & 5.02 $\pm$ 0.03 & 0.091 $\pm$ 0.011 & 1.58 \\ \tableline & DSED & -1.00 & 0.0035 & 0.2506 & 12.8 $\pm$ 1.0 & 14.48 $\pm$ 0.05 & 7.87 $\pm$ 0.18 & 5.19 $\pm$ 0.06 & 0.040 $\pm$ 0.015 & 0.99 \\ & DSED & -1.00 & 0.0031 & 0.3300 & 11.2 $\pm$ 1.2 & 14.36 $\pm$ 0.05 & 7.45 $\pm$ 0.17 & 5.08 $\pm$ 0.04 & 0.081 $\pm$ 0.016 & 2.09 \\ & DSED & -1.15 & 0.0023 & 0.2488 & 12.8 $\pm$ 1.0 & 14.44 $\pm$ 0.05 & 7.73 $\pm$ 0.18 & 5.15 $\pm$ 0.05 & 0.070 $\pm$ 0.014 & 0.96\\ & DSED & -1.15 & 0.0021 & 0.3300 & 11.2 $\pm$ 1.1 & 14.32 $\pm$ 0.05 & 7.31 $\pm$ 0.17 & 5.05 $\pm$ 0.04 & 0.128 $\pm$ 0.016 & 2.56\\ \tableline \tableline \end{tabular} \end{center} \tablecomments{ $^{a}$Ages using BaSTI models neglecting the effect of atomic diffusion. The inclusion of this effect reduces the ages by about 0.9 Gyr (See Section \ref{isochronemodels} for more details). } \label{tab_all_parameters} \end{table*} \subsection{NGC\,6626} Figure \ref{NGC6626_cmd_obs_vs_models_fehm130} presents the observed fiducial line for NGC\,6626 in comparison with the best isochrone fits using DSED and BaSTI stellar evolutionary models. We adopted a single metallicity for this cluster, very close to the value determined by \citet{Villanova+17}. As demonstrated by the previous results related to NGC\,6522, this constraint is crucial to reduce the systematic uncertainties in distance and reddening. The recovered physical parameters are shown in Table \ref{tab_all_parameters}. This cluster presents very similar results with respect to NGC\,6522. Assuming the same helium abundance and the same stellar evolutionary model, their ages are almost identical. As occurred for NGC\,6522, the goodness of fit increases significantly with the adoption of helium-enhanced models. However, as demonstrated in Section 7.2, once again a helium enhancement of $\Delta Y\sim 0.05$ is not compatible with the mean magnitude of RR Lyrae stars observed in this cluster. \begin{figure*} \centering \includegraphics[angle=0,scale=0.40]{NGC6626_cmd_obs_vs_models_BaSTI_fehm130_v2.eps} \includegraphics[angle=0,scale=0.40]{NGC6626_cmd_obs_vs_models_DSED_fehm130_v2.eps} \caption{Same as Figure \ref{NGC6522_cmd_obs_vs_models_BaSTI}, but for NGC\,6626 and BaSTI (left panels) and DSED (right panels) isochrones with [Fe/H]$\sim-1.3$.} \centering \label{NGC6626_cmd_obs_vs_models_fehm130} \end{figure*} \subsection{NGC\,6362} The eight isochrone fits for this cluster using different combinations of metallicity, helium abundance, and stellar evolutionary models are presented in Figs. \ref{NGC6362_cmd_obs_vs_models_BaSTI} and \ref{NGC6362_cmd_obs_vs_models_DSED}. The physical parameters determined in this analysis are shown in Table \ref{tab_all_parameters}. Regardless of the choice in metallicity and in helium abundance, the BaSTI models also indicated an old age for this cluster ($\sim$ 13.5 Gyr/14.5 Gyr with/without atomic diffusion). This evidence suggests a slightly older age in comparison with the other two clusters, but still in agreement if the uncertainties ($\sim$ 1.0 Gyr) are taken into account. The sample clusters are found to be coeval also from the results for DSED models, within uncertainties, with ages of $\sim$ 12.4 Gyr assuming a canonical helium abundance ($Y\sim 0.25$) or $\sim$ 11.2 Gyr for $Y\sim 0.33$. In contrast with the results for NGC\,6522 and NGC\,6626, Table \ref{tab_all_parameters} shows that the goodness of fit for NGC\,6362 does not favor helium enhancement using BaSTI models, and for DSED models, a canonical helium is clearly favored. Assuming a helium abundance of $Y\sim 0.25$, and a metallicity taken as the average between the two most recent determinations ([Fe/H]$=-1.08$; \citealt{Mucciarelli+16, Massari+17}), we get an intrinsic distance modulus of 14.39 (BaSTI) or 14.46 (DSED) and $E$(\textit{B}$-$\textit{V}) of 0.050 (BaSTI) or 0.055 (DSED). \begin{figure*} \centering \includegraphics[angle=0,scale=0.40]{NGC6362_cmd_obs_vs_models_BaSTI_fehm100_v2.eps} \includegraphics[angle=0,scale=0.40]{NGC6362_cmd_obs_vs_models_BaSTI_fehm115_v2.eps} \caption{Same as Figure \ref{NGC6522_cmd_obs_vs_models_BaSTI}, but for NGC\,6362.} \centering \label{NGC6362_cmd_obs_vs_models_BaSTI} \end{figure*} \begin{figure*} \centering \includegraphics[angle=0,scale=0.40]{NGC6362_cmd_obs_vs_models_DSED_fehm100_v2.eps} \includegraphics[angle=0,scale=0.40]{NGC6362_cmd_obs_vs_models_DSED_fehm115_v2.eps} \caption{Same as Figure \ref{NGC6522_cmd_obs_vs_models_DSED}, but for NGC\,6362.} \centering \label{NGC6362_cmd_obs_vs_models_DSED} \end{figure*} \section{Discussion} \begin{figure*} \centering \includegraphics[angle=0,scale=.65]{cmd_all_clusters_BaSTI_fits.eps} \caption{F626W vs. F435W--F625W CMDs for the three sample clusters. BaSTI isochrones of 14 Gyr, $Y=0.25$ are shown as red sequences corresponding to [Fe/H]$=-1.01$ and blue ones corresponding to [Fe/H]$=-1.31$. The blue ZAHB sequence corresponds to tracks with ($Z=0.003$, $Y=0.251$) and the red ZAHB sequence corresponds to ($Z=0.004$, $Y=0.251$). Dashed lines represent the MSTO and HB levels (as in Figure \ref{cmds}). } \label{CMDfinal} \end{figure*} \begin{figure*} \centering \includegraphics[angle=0,scale=.29]{Vmag_RRLyr_NGC6522.eps} \includegraphics[angle=0,scale=.29]{Vmag_RRLyr_NGC6626.eps} \includegraphics[angle=0,scale=.29]{Vmag_RRLyr_NGC6362.eps} \caption{Predicted average $V$ magnitude for the RR Lyrae stars as a function of the apparent distance modulus in $V$ for NGC\,6522 (left panels), NGC\,6626 (middle panels), and NGC\,6362 (right panels). The analysis is done over two empirical $\langle M_{\rm{v}} \rangle$ RR Lyrae values: the recent one obtained by the \cite{Gaia17} (red solid lines, with 1$\sigma$ confidence level marked by red dotted lines), and the one for the RR Lyrae star itself (blue solid line; \citealp{Catelan+Cortes08}). The results for the apparent distance modulus in $V$ from the isochrone fits using BaSTI (top panels) and DSED (bottom panels) are presented (vertical solid lines) within 1$\sigma$ confidence level (dotted lines). The average of the mean RR Lyrae $V$ magnitudes and its standard deviation are depicted in each panel (horizontal solid and dotted lines, respectively). The expected increment of $-0.20$ mag in $V$ predicted by the BaSTI models due to a helium enhancement of $\Delta Y\sim0.05$ in the canonical helium abundance for a cluster with [Fe/H]$\sim-1.15$ ($Y\sim 0.25$) is also shown (green solid lines). } \label{Vmag_RRLyrae} \end{figure*} Figure \ref{CMDfinal} summarizes the best isochrone fits to the MSTO, SGB, and RGB from the statistical analysis, together with the newly calculated tracks for the ZAHB, with all models from BaSTI. For NGC\,6626 and NGC\,6362 the fits are remarkably good all along the sequences. For NGC\,6522 the SGB-RGB sequences are well fitted, although there is a slight offset around the MSTO. The theoretical ZAHB location is bluer/brighter than the observed distribution. We postpone a detailed investigation of this issue to a forthcoming paper; however, we note that a variation (increase) of the adopted metallicity (see data in Table \ref{tab_spec}) would help in improving the quality of the fit. If a higher helium is adopted (e.g., $Y=0.30$), the HB models have a higher luminosity by $\sim$0.25 mag, at the color of the RR Lyrae. \subsection{Comparisons with literature} From a comparison between the present results and literature results (Table \ref{tab_param_lit}), we confirm an age $\gtrsim 12.0$ Gyr for all clusters under the assumption of a canonical helium abundance. A very old age of $\sim$ 14.0 Gyr (or 13 Gyr if corrected for diffusion) for NGC\,6522 and NGC\,6626 obtained by the preceding studies using \textit{HST} data \citep{Testa+01, Meissner+Weiss06, Barbuy+09} is in good agreement with our results using BaSTI models. Note that \citet{Testa+01} found evidence for a canonical helium abundance in NGC\,6626. The ages obtained for NGC\,6362 using BaSTI models ($\sim$ 14.0 Gyr) are compatible with the ones from \citet{Marin-Franch+09} and \citet{Paust+10}, whereas the ages $\sim$ 13.0 Gyr from our fits using DSED models, and BaSTI models if diffusion is taken into account, in both cases with a canonical helium abundance, are in better agreement with results from \citet{Dotter+10}, \cite{VandenBerg+13}, and \cite{Wagner-Kaiser+16}. The distances and reddening values presented in our paper and those in the literature are comparable, but our results favor slightly shorter solar and galactocentric distances and slightly lower $E$(\textit{B}$-$\textit{V}) values. Ages of $\sim$12.5 Gyr are indicated by our fits with DSED isochrones for the three clusters and derivations for other clusters using the same set of isochrones in the literature. Our results also pointed out that these clusters are located at shorter solar distances and have lower reddening values than previously thought. Concerning NGC\,6522 structural parameters, we found a core radius of 12.32 $\pm$ 0.26 arcsec, approximately four times ($\sim$ 4$\times$) higher than the one from \cite{Trager+95} (3.1 arcsec), who classified this cluster as core collapse. Due to the high stellar contamination and high reddening toward this cluster, the analysis performed by \cite{Trager+95} over surface brightness profiles obtained from ground-based photometry likely underestimated the core radius for NGC\,6522. Assuming the average solar distances recovered by us for NGC\,6522 (7.2 kpc), NGC\,6626 (5.2 kpc), and NGC\,6362 (7.5 kpc), their intrinsic core radii are 0.43, 0.32, and 3.3 pc, respectively. This reveals that NGC\,6626 is in fact the most compact cluster in our sample. \subsection{Constraints from RR Lyrae stars} The RR Lyrae stars provide independent constraints on the apparent distance modulus, helium abundance, and age. First, to bypass the theoretical limitations from the stellar evolutionary models and to avoid using a conversion from $V$ to F625W, we analyzed the $V$ magnitude of the RR Lyrae stars directly from Clement's catalog and the OGLE catalog, comparing them with two empirical average $\langle M_{V} \rangle$ determinations for the RR Lyrae. For this purpose we used the very recent $M_{V}-$[Fe/H] calibrated relations for RR Lyrae stars from the \cite{Gaia17} based on Tycho-\textit{Gaia} Astrometric Solution (TGAS). Since they employed three different methods to perform such calibration, we assumed the mean $M_{V}$ solution for these approaches, taking into account three distinct sources of uncertainties: (1) $\sim$ 0.10 dex in [Fe/H] (0.02 mag); (2) the stochastic effects in the fits (0.04 mag); (3) and the main one, the systematics due to the different solutions (0.10). Assuming [Fe/H]$=-1.07 \pm 0.10$ as the metallicity of NGC\,6522 and NGC\,6362, we obtained $\langle M_{V} \rangle = 0.67 \pm 0.11$ for their RR Lyrae stars. Since NGC\,6626 is slightly more metal poor ([Fe/H]$=-1.30 \pm 0.10$), such variable stars should be slightly brighter ($\langle M_{V} \rangle = 0.62 \pm 0.11$) in this cluster. Due to the similarity with the metallicity of the RR Lyrae star itself ([Fe/H]$=-1.16$), these values are very close to the one found for the prototype of this class of variable stars ($\langle M_{V} \rangle = 0.66 \pm 0.14$, \citealp{Catelan+Cortes08}). Figure \ref{Vmag_RRLyrae} presents the expected apparent $V$ magnitude for the RR Lyrae stars as a function of the apparent distance modulus in $V$ (($m-M$)$_{0}$ + $A_V$) for all clusters analyzed in this work. It is clear from these plots that the apparent distance moduli from the isochrone fits agree within 1$\sigma$ with what would be expected to bring the absolute magnitudes for the RR Lyrae stars to the observed ones. The only possible exception is the solution for NGC\,6626 using BaSTI models, where a higher apparent distance modulus seems to be required. We also checked whether the isochrone fits and the observed RR Lyrae stars can be consistent with helium-enhanced stars. BaSTI models predict that RR Lyrae stars with $Y=0.30$ should be $\sim$ 0.20 mag brighter in $V$ than ones with a canonical helium abundance for a metallicity of [Fe/H]$\sim -1.15$ ($Y\sim 0.25$). The results for this simple experiment are also depicted in Figure \ref{Vmag_RRLyrae}, clearly revealing that such bright magnitudes are not compatible with the mean $V$ magnitude of the RR Lyrae stars observed in these clusters at the expected apparent distance moduli, therefore rejecting a helium enhancement of $\Delta Y\sim 0.05$. In fact, the recent analysis of the red giant branch bump performed by \cite{Lagioia+18} on the data from the \textit{HST} UV Legacy Survey of Galactic GCs support the hypothesis that the variations in the average helium abundance between distinct subpopulations are lower than $\Delta Y\lesssim 0.03$. Taking the advantage that all clusters have similar metallicities and their MSTO and RR Lyrae mean magnitudes were homogeneously derived in the same filter, we computed the $\Delta V^{\rm{HB}}_{\rm{TO}} $ parameter in F625W to check whether there is any indication of age differences between these clusters. The results presented in Table \ref{tab_photom} reveal similar $\Delta V^{\rm{HB}}_{\rm{TO}} $ values within the uncertainties; therefore, these clusters are probably coeval within $\sim$ 1.0 Gyr. Further investigations to discover new RR Lyrae stars in the cores of NGC\,6522 and NGC\,6626, as well as accurate MSTO determinations in the $V$ filter, can reduce the uncertainties in $\Delta V^{\rm{HB}}_{\rm{TO}} $ and reveal some age difference. \subsection{Testing the presence of multiple stellar populations} \label{multiple} The high quality of \textit{HST} data and proper-motion-cleaned CMDs allows us to investigate the presence of multiple stellar populations (MPs) in NGC\,6522. This is the first time that this kind of analysis is employed in this cluster. The presence of more than one stellar population in NGC\,6362 was also detected by combining optical \textit{HST} and UV ground-based photometry. \cite{Dalessandro+14} have demonstrated that the RGB of NGC\,6362 is split into two separate sequences. A deep photometric analysis performed by \cite{Piotto+15} and \cite{Milone+17} using UV--optical \textit{HST} data, clearly revealed the presence of these two stellar populations even for the MS stars. These results were recently corroborated by the high-resolution spectroscopic analysis performed by \cite{Mucciarelli+16} and \cite{Massari+17}. Concerning NGC\,6626, the signature of MPs was revealed by the abundance analysis of 17 RGB stars from \cite{Villanova+17}, which presented an Na-O anticorrelation and an Na-Al correlation. No photometric evidence of MPs in this cluster was found so far. In order to detect a possible signature of MPs, we analyzed the SGB morphology. In the left panel of Figure \ref{ratio} it is shown that, in the $m_{\rm F625W}$ versus $m_{\rm F435W}-m_{\rm F625W}$ proper-motion-cleaned CMD, the SGB of NGC\,6522 is formed by two components: a more populated bright and blue SGB (potentially associated with a second stellar generation -- 2G) and a less populated faint and red SGB (a first stellar generation -- 1G). An analysis of the ratio between the number of stars in each SGB population and the total number of SGB stars is performed. The left panels of Figure \ref{ratio} show the procedure adopted. First, the SGB sequence is rectified using the procedure described in detail in \cite{Milone+09} and \cite{Bellini+13}. The result is shown in the bottom right panel of Figure \ref{ratio}. The top right panel shows the abscissa distribution (the bin size of the histogram is equal to 0.15). Stars with 0.05 mag from the median of this distribution are the candidates to a 1G population (red points). By counting stars before and after this threshold, the fraction of 1G and 2G stars was determined. The results indicate that $14\% \pm 2\%$ and $86\% \pm 5\%$ of the stars belong to the 1G and 2G, respectively. Poisson uncertainties were assumed. The right panel of Figure \ref{ratio} presents the radial cumulative fraction distribution of the 1G and 2G stars. The two distributions seem to agree inside the core radius; however, at larger radii the 2G stars are more concentrated than the 1G stars. A Kolmogorov--Smirnov (K-S) test provides a probability of 18\% that the two samples were drawn from the same underlying distribution. To check whether the 1G sample is related to residual contaminating field stars we, compute the expected number of such stars in the proper-motion-cleaned CMD taking into account the spatial and kinematical information. First, we defined a distance from the cluster center where the field stars are dominant ($R > R_{\rm{field}} = 100$ arcsec). After that, we selected those with proper motions larger than 0.50 pixels (see Figure \ref{VPD_pm}). Taking into account the areas in the sky and in the VPD that are covered by the cluster and field stars, we found 110 stars that might be contaminating the cluster sample. As can be seen in Figure \ref{ratio}, these stars are outside the box used to analyze the presence of multiple populations, so they cannot explain the wide SGB observed in this cluster. In order to do a comparative study, we proceed with the same analysis for the two other clusters. These results are presented in Figure \ref{ratio_other_clusters}. As can be seen in both panels, no more than $6 \% \pm 2\%$ of the stars in NGC\,6626 and NGC\,6362 could be associated with a 1G by the same method. This result suggests that the 1G fraction of $14\% \pm 2\%$ for NGC\,6522 is a meaningful result, as well as that the 1G proportion is probably a minimum value, and that a higher proportion might be revealed when UV colors will be available. This is expected because for NGC\,6362 we find a low 1G fraction, whereas \cite{Milone+17} and \cite{Wagner-Kaiser+16}, analysing UV--optical \textit{HST} data, determined higher values of $57.4\% \pm 3.5\%$ and $38.5^{+2.6}_{-2.5}\%$, respectively. \begin{figure*} \centering \includegraphics[angle=0,scale=0.42]{NGC6522_SGB_1G_2G_cluster_vs_field.eps} \includegraphics[angle=0,scale=0.42]{NGC6522_cumdist_1SG_2SG.eps} \caption{Left panels: SGB of NGC\,6522 zoomed in, and ratio of candidates of first (red) to second (blue) stellar generations. DSED $\alpha$-enhanced isochrones for [Fe/H]=-1.01 and $Y=0.25$ with 10.0, 11.0, 12.0, 13.0, 14.0, and 15.0 Gyr are overplotted. The expected residual field stars are also presented (green crosses). Right panel: radial cumulative fraction distribution. The core radius (dashed line) and the K-S probability are also given.} \label{ratio} \end{figure* \begin{figure*} \centering \includegraphics[angle=0,scale=0.42]{NGC6626_eMSTO.eps} \includegraphics[angle=0,scale=0.42]{NGC6362_eMSTO.eps} \caption{Same as the left panels of Figure \ref{ratio}, but for NGC\,6626 (left panels) and NGC\,6362 (right panels).} \label{ratio_other_clusters} \end{figure* \subsection{Final remarks} The combined constraints from MSTO-SGB-RGB and HB allowed us to conclude on final values of age, helium abundance, distance, and reddening for the sample clusters. While the statistical comparisons of observed fiducial lines and theoretical ones (Figure \ref{NGC6522_cmd_obs_vs_models_BaSTI}) appear to lead to the possibility of a higher-than-primordial helium abundances, the HB and RR Lyrae levels, compared with theoretical models, imposed a normal helium content. The observed CMDs of NGC\,6522 and NGC\,6626 are very similar (despite their differences in distance and reddening); therefore, in the absolute magnitudes and colors they should almost coincide. To verify this, in Figure \ref{overplot1} we show the CMDs and fiducial lines of NGC\,6522 and NGC\,6626 transformed to absolute magnitudes and colors. Since the retrieved distance modulus and reddening do depend on the adopted metallicity, in the left and right panels of Figure \ref{overplot1} we present the comparison between the two clusters by adopting the parameters derived when assuming [Fe/H]$=-$1.0 and [Fe/H]$=-$1.15 for NGC\,6522, respectively. The reddening and distance modulus corrections change with metallicity and lead the HB to fit better the sequences of NGC\,6626 in the latter. With regard to the metallicity and abundances from high-resolution spectroscopy of NGC\,6522, we should note two main issues: (a) [$\alpha$/Fe]$<$+0.4 (Table \ref{tab_spec}), and in particular, recalling that the bulk of stars are of a 2G generation, oxygen should be lower, whereas the models assume [$\alpha$/Fe]=+0.4; (b) Na is enhanced, since the bulk of stars belong to a second generation. These abundance variations can explain the need for a change in metallicity, with respect to NGC\,6626. This shows the need, in the future, to have models taking into account a range of element abundances, in particular of O, Na, Al, Mg, and overall alpha-elements (Si, Ca, Ti, besides O, Mg). \begin{figure} \centering \includegraphics[angle=0,scale=0.42]{fidlines_NGC6522_vs_NGC6626_BaSTI_cut.eps} \caption{CMDs and fiducial lines of NGC\,6522 and NGC\,6626 in absolute magnitudes $M_{\rm{F625W}}$ vs. $M_{\rm{F435W}}-M_{\rm{F625W}}$. The conversion from observed magnitudes to the absolute ones takes into account the BaSTI stellar evolutionary models for the metallicities informed in each panel, as well as the distance moduli and reddening values that are consistent with the isochrone fits. A canonical helium abundance of $Y\sim 0.25$ was assumed. } \label{overplot1} \end{figure \section{Conclusions} We analyzed \textit{HST} proper-motion-cleaned CMDs of the bulge GCs NGC\,6522 and NGC\,6626, together with the inner halo cluster NGC\,6362, for comparison purposes. The three clusters have similar metallicities ($-1.3 \lesssim$ [Fe/H]$ \lesssim -1.0$) and alpha-enhancements ([$\alpha$/Fe]$\sim+0.4$). They were observed in the same filters and (in the case of NGC\,6522 and NGC\,6626) in two epochs, making it possible to select the likely cluster members. Thus, these homogeneous and high-photometric-precision data allowed a detailed comparative analysis. In this study we addressed the fundamental problem of deriving age, reddening, and distance consistently, based on statistical isochrone fitting and RR Lyrae analysis, including variable helium content. The isochrone sets BaSTI and DSED were used, chosen because they offer the needed parameters, in particular with regard to helium and alpha-element abundances. The use of BaSTI models leads to coeval ages of $\sim$ 13.0 Gyr for the three clusters, or $\sim$ 14.0 Gyr if the atomic diffusion is neglected, independently of the helium content. The results from DSED isochrones with canonical helium abundances point to an age of $\sim$ 12.5 $\pm$ 0.5 Gyr for the clusters, in very good agreement with ages given by \cite{Dotter+10}, \cite{VandenBerg+13}, and \cite{Wagner-Kaiser+16} for NGC\,6362. The fact that NGC\,6522 and NGC\,6626 have almost identical HB morphology, as shown in Figure \ref{overplot1}, while at the same their metallicities differ by $\sim$0.2--0.3 dex from high-resolution spectroscopic studies, indicates that NGC\,6522 should be older than NGC\,6626. The shape of the observed fiducial lines indicates some evidence of helium enhancement for NGC\,6522 and NGC\,6626, but the average $V$ magnitudes of RR Lyrae stars from Clement's catalog and the OGLE catalog tend to rule out this hypothesis, since there is a good agreement between these values and those expected from the recent empirical calibration for the $\langle M_{V} \rangle$ Galactic RR Lyrae stars performed by the \cite{Gaia17} (assuming the apparent distance moduli from our isochrone fits). If the observed RR Lyrae stars in these clusters were helium enhanced by $\Delta Y \sim 0.05$, they should be about 0.20 mag brighter on average, as predicted by BaSTI models. Further inspection of HB morphology and new stellar evolutionary models will be the subject of a future work. For the first time based on CMDs, we revealed that NGC\,6522 has at least two stellar populations, in proportions of approximately 86\% (2G) and 14\% (1G). According to the study by \cite{Milone+17}, in his classification of type II GCs, the clusters that show clearly two stellar populations in their so-called chromosome maps show a split subgiant branch (SGB) also in optical colors. NGC\,6522 does show a split in the SGB in optical colors, whereas UV colors are not available for this cluster for a definitive diagnostic as type II. The type I clusters show a split SGB only in UV colors. This is the case of NGC\,6362, where a double stellar population is clearly detected with the UV colors, as shown by \cite{Piotto+15} and \cite{Milone+17}. For NGC\,6626, with the available optical data, there is no evidence so far of multiple stellar populations. Under the assumption that the total mass of NGC\,6522 is around half of that of NGC\,6362 \citep{Gnedin+Ostriker97}, NGC\,6522 establishes a new lower GC mass limit where both photometric and spectroscopic signatures of multiple populations are present. As a summary of main results, we emphasize that some parameters not available in the literature for these clusters were derived in the present work, in particular the age of NGC\,6626, more precise ages for NGC\,6522, and the multiple stellar populations of NGC\,6522. We conclude that the sample clusters, characterized by a moderate metallicity of [Fe/H]$\sim -1.0$ and enhanced $\alpha$-to-iron ratios, are among the oldest objects in the Galaxy. This confirms that objects of this metallicity could have been formed from material previously enriched as proposed in well-accepted scenarios of bulge formation with fast chemical enrichment \citep{Matteucci+Brocato90,Cescutti+08, Friaca+Barbuy17}. It would be of great interest to have additional high-resolution spectroscopy of stars in these clusters and to have NGC\,6522 observed in UV filters to further probe its multiple stellar populations. \acknowledgments L.K., B.B., and E.B. acknowledge partial financial support from FAPESP, CNPq, and CAPES. D.N. and S.O. acknowledge support by the Universit\`a degli Studi di Padova Progetto di Ateneo CPDA141214, ``Towards Understanding Complex Star Formation in Galactic GCs.'' S.C. acknowledges the financial support by PRIN-INAF2014 (PI: S. Cassisi) and the Economy and Competitiveness Ministry of the Kingdom of Spain (grant AYA2013-42781-P). M.L. recognizes partial support by PRIN-INAF 2014, ``The Kaleidoscope of stellar populations in Galactic GCs with Hubble Space Telescope.''R.G.V. acknowledges the support from FAPESP (grant 2012/20364-4). \vspace{5mm} \facilities{\textit{HST}(ACS,WFPC2).}
\section{Introduction} These days unsupervised learning is very popular due to the amount of available unlabeled data. The general goal in unsupervised learning is to find structure in the data. This `structure' can be the clusters in the data, the principal components of the data, or the intrinsic dimension of the data, and so on. Distribution learning (also known as density estimation) is the task of explicitly estimating the distribution underlying the data, which can then be explored to find the desired structure, or to generate new data. We mention two examples. The first example, taken from~\cite{jordan96neural}, is anomaly detection: interpreting X-ray images (mammograms) for detecting breast cancer. In this case the training data consists of normal (non-cancerous) images; a probability density function $\mu:\mathbb{R}^d\to\mathbb{R}$ is learned from the data. When a new input $x'$ is presented to the system, a high value for $\mu(x')$ indicates a normal image, while a low value indicates a novel input, which might be characteristic of an abnormality; the patient is then referred to a clinician for further examination. The second example, taken from~\cite{deep_learning_book}, is synthesis and sampling, or generative models: in many cases we would like to generate new examples that are similar to those in the training data, e.g., in media applications, where it can be expensive or boring for an artist to generate large volumes of content by hand. Given the training data, the algorithm estimates a probability density function $\mu:\mathbb{R}^d\to\mathbb{R}$ that models the data, and then generates new examples according to this distribution. For example, video games can automatically generate (random but reasonable) textures for large objects or landscapes, rather than requiring an artist to manually colour each pixel. For supervised learning (in particular, classification problems), there are by now a variety of mathematical tools to understand the hardness of the problem (VC-dimension, Rademacher complexity, covering numbers, margins, etc., see~\cite{AB99,Shalev-Shwartz2014}). We lack such a satisfactory mathematical understanding in the case of unsupervised learning (in particular, distribution learning); determining the sample complexity of learning with respect to a general class of distributions is an open problem (see~\cite[Open Problem~15.1]{Diakonikolas2016}). More specifically, distribution learning refers to the following task: given data generated from an unknown target probability distribution $\mu$, find a distribution $\widehat{\mu}$ that is `close' to $\mu$. To define this problem more precisely, one needs to specify: \begin{enumerate} \item What is assumed about the target distribution? This question is more pertinent than ever in this era of large high-dimensional data sets. Typically one assumes the target belongs to some class of distributions, or it is close to some distribution in that class. \item What does `close' mean? There are various statistical measures of closeness, e.g., the Kullback-Leibler divergence, $L_1$ and $L_2$ distances (see~\cite[Chapter~5]{devroye_book} for a discussion). \item How is data sampled from the distribution? One usually assumes access to i.i.d.\ data, but in some settings other models such as Markov Chain-based sampling may be more appropriate. \end{enumerate} Once the above questions are answered, we have a well defined problem, for which we can propose algorithms. Such an algorithm is evaluated using two metrics: (i)~the sample complexity, i.e., the number of samples needed to guarantee a small error, and (ii)~the computational complexity, or the running time of the algorithm. In this survey, we assume the target class consists of mixtures of Gaussians in high dimensions, or is a subclass of this class. We focus on the $L_1$ distance as the measure of closeness, and we assume i.i.d.\ sampling. Our goal is to give bounds for the \emph{sample complexity} for distribution learning, or density estimation. We shall use these two phrases interchangeably here; distribution learning (or PAC-learning of distributions) is usually used in the computer science/machine learning community and is a broader term, whereas density estimation is usually used in the statistics literature (see \cite[Section~2]{Diakonikolas2016} for a discussion). The reason for this choice is that recently this problem has attracted much attention again, and many results have been proved during the last few years (see~\cite{ashtiani2017agnostic,ashtiani2017sample,onedimensional,gaussian_mixture,spherical}). The literature on density estimation is vast and we have not tried to be comprehensive. We shall just review some techniques that have been particularly successful in proving rigorous bounds for sample complexity of learning mixtures of Gaussians. The reader is referred to~\cite{Diakonikolas2016} for a broader, recent survey. For a general, well written introduction to density estimation, read~\cite{devroye_book}. This survey is based on the papers \cite{ashtiani2017agnostic,ashtiani2017sample,onedimensional,spherical}; the reader is referred to the original papers for full proofs. Most of the material in Section~\ref{sec:vc} also appears in~\cite{devroye_book}. In Section~\ref{sec:formal} we set up our notation. In each subsequent section we present one technique and demonstrate it by showing a bound on the sample complexity of learning a particular class of distributions. Concluding remarks appear in Section~\ref{sec:remarks}. \section{The formal framework} \label{sec:formal} A \emph{distribution learning method} or \emph{density estimation method} is an algorithm that takes as input an i.i.d.\ sample generated from a distribution $g$, and outputs (a description) of a distribution $\hat{g}$ as an estimation for $g$. Furthermore, we assume that $g$ belongs to some known class $\mathcal{F}$ of distributions, but $\widehat{g}$ is not required to belong to $\mathcal F$ (if it does, then the method is called a `proper' learner). We only consider continuous distributions in this survey, and so we identify a `probability distribution' by its `probability density function.' Let $Z$ be a Euclidean space, and let $f_1$ and $f_2$ be two distributions defined over the Borel $\sigma$-algebra $\mathcal{B}\subseteq 2^Z$. The total variation distance between $f_1$ and $f_2$ is defined by \[\|f_1- f_2\|_{TV} = \sup_{B\in \mathcal{B}}|f_1(B) - f_2(B)| = \sup_{B\in \mathcal{B}}\left|\int_B f_1 - \int_B f_2\right| = \frac{1}{2}\|f_1 - f_2\|_1 \:, \] where \(\|f\|_1\coloneqq \int_Z |f(x)|\mathrm{d} x\) is the $L_1$ norm of $f$. In the following definitions, $\mathcal{F}$ is a class of probability distributions, and $g$ is an arbitrary distribution. The total variation distance and the $L_1$ distance are within constant factor of each other, and we generally do not worry about constants in this survey, so we will use them interchangeably, except when a confusion might occur. We write $X \sim g$ to denote the random variable (or random vector) $X$ has distribution $g$, and we write $S\sim g^m$ to mean that $S$ is an i.i.d.\ sample of size $m$ generated from $g$. \begin{definition}[$\varepsilon$-approximation, $\varepsilon$-close] A distribution $\hat{g}$ is an \emph{$\varepsilon$-approximation} for $g$, or is \emph{$\varepsilon$-close} to $g$, if $ \|\hat{g}- g\|_1 \leq \varepsilon$. \end{definition} \begin{definition}[density estimation method, sample complexity]\label{def:density_estimation} A \emph{density estimation method} for $\mathcal{F}$ has \emph{sample complexity} $m_{\mathcal{F}}(\varepsilon, \delta)$ if, for any distribution $g\in\mathcal F$ and any $\varepsilon, \delta \in(0,1)$, given $\varepsilon$, $\delta$, and an i.i.d.\ sample of size $m_{\mathcal{F}}(\varepsilon, \delta)$ from $g$, with probability at least $1-\delta$ outputs an $\varepsilon$-approximation of $g$. \end{definition} In the machine learning literature, such a density estimation method for class $\mathcal F$ is called a `PAC distribution learning method for $\mathcal F$ in the realizable setting,' or an `$\mathcal F$-leaner,' with sample complexity $m_{\mathcal{F}}(\varepsilon, \delta)$. We also say we can `learn class $\mathcal F$ with $m_{\mathcal{F}}(\varepsilon, \delta)$ samples'. Typically the dependence on $\delta$ is logarithmic and hence non-crucial, and sometimes we may just say the sample complexity is $m_{\mathcal{F}}(\varepsilon)$, ignoring its dependence on $\delta$ (this means we take, e.g., $\delta=1/3$). Note that the sample complexity should not depend on the specific underlying probability distribution $g$, but should uniformly hold for \emph{all} $g\in \mathcal F$. This uniform notion of learning is sometimes called \emph{minimax} density estimation in the statistics literature. Let \[ \Delta_k \coloneqq \left\{ (w_1,\dots,w_k) : w_i\geq 0, \sum w_i=1\right\} \] denote the $k$-dimensional simplex. \begin{definition}[$k$-mix($\mathcal{F}$)] The class of \emph{$k$-mixtures} of $\mathcal{F}$, written \emph{$k$-mix($\mathcal{F}$)}, is defined as $$k\textnormal{-mix}(\mathcal F) \coloneqq \left\{\sum_{i=1}^{k}w_{i}f_{i}: (w_1,\dots,w_k)\in \Delta_k , f_1,\dots,f_k\in\mathcal F \right\}.$$ \end{definition} A one-dimensional Gaussian random variable with mean $\mu$ and variance $\sigma^2$ is denoted by $N(\mu,\sigma^2)$. Let $d$ be a positive number, denoting the dimension. A $d$-dimensional Gaussian with mean $\mu\in \mathbb{R}^d$ and (positive semidefinite) covariance matrix $\Sigma \in \mathbb{R}^{d\times d}$ is a probability distribution over $\mathbb{R}^d$, denoted $\mathcal N(\mu,\Sigma)$, with probability density function \[ \mathcal N(\mu,\Sigma) (x) \coloneqq \exp ( - (x-\mu)^T \Sigma^{-1} (x-\mu)/2)/\sqrt{2\pi \det \Sigma}. \] A random variable with density $\mathcal N(\mu,\Sigma)$ is denoted by $N(\mu,\Sigma)$. Let $\mathcal G_{d,1}$ denote the class of $d$-dimensional Gaussian distributions, and let $\mathcal G_{d,k}$ denote the class of $k$-mixtures of $d$-dimensional Gaussian distributions: $\mathcal G_{d,k} \coloneqq k\textnormal{-mix}(\mathcal G_{d,1})$. If $\Sigma$ is a diagonal matrix, then $\mathcal N(\mu,\Sigma)$ is called an \emph{axis-aligned} Gaussian, since in this case the eigenspace of $\Sigma$ coincide with the standard basis. Let $\mathcal A_{d,1}$ denote the class of $d$-dimensional axis-aligned Gaussian distributions, and let $\mathcal A_{d,k} \coloneqq k\textnormal{-mix}(\mathcal A_{d,1})$. \renewcommand\arraystretch{1.5} \begin{table} \begin{tabular}{c | c | c | c} Distribution family & Bound on sample complexity & Reference & Section \\\hline $\mathcal G_{d,1}$ & ${O(d^2 / \varepsilon^2)}$ & \cite{ashtiani2017sample} & \ref{sec:vc} \\ $\mathcal A_{d,1}$ & $O(d / \varepsilon^2)$ & \cite{ashtiani2017sample} & \ref{sec:vc} \\ $\mathcal G_{1,k}=\mathcal A_{1,k}$ & $\widetilde{O}(k/\varepsilon^2)$& \cite{onedimensional} & \ref{sec:onedimensional}\\ $\mathcal G_{d,k}$ & $\widetilde{O}(kd^2 / \varepsilon^2)$ & \cite{ashtiani2017agnostic} & \ref{sec:compression} \\ $\mathcal A_{d,k}$ & $\widetilde{O}(kd / \varepsilon^2)$ & \cite{ashtiani2017agnostic} & \ref{sec:compression} \\ \hline $\mathcal G_{d,1}$&$\widetilde\Omega(d^2 / \varepsilon^2)$&\cite{ashtiani2017agnostic}&\ref{sec:lower}\\ $\mathcal A_{d,1}$&$\widetilde\Omega(d / \varepsilon^2)$&\cite{spherical}&\ref{sec:lower}\\ $\mathcal G_{1,k}=\mathcal A_{1,k}$ & $\widetilde\Omega(k/\varepsilon^2)$& \cite{spherical} & \ref{sec:lower}\\ $\mathcal G_{d,k}$&$\widetilde\Omega(kd^2 / \varepsilon^2)$&\cite{ashtiani2017agnostic}&\ref{sec:lower}\\ $\mathcal A_{d,k}$&$\widetilde\Omega(kd / \varepsilon^2)$&\cite{spherical}&\ref{sec:lower}\\ \hline \end{tabular} \vspace{5mm} \caption{Results covered in this survey. The top 5 rows are upper bounds, and the bottom 5 rows are lower bounds.}\label{table} \end{table} We demonstrate some of the techniques used in density estimation by proving the upper and lower bounds in Table~\ref{table}. For proving the upper bounds, we provide a density estimation method. For the lower bounds, we show that \emph{any} density estimation method for the corresponding class must use at least the given number of samples. Throughout the survey, $\widetilde{O}, \widetilde{\Omega}, \widetilde{\Theta}$ allow for polylogarithmic factors, and $[n]\coloneqq\{1,\dots,n\}$. We say a bound is tight if it is tight up to polylogarithmic factors. \section{Sample complexity upper bounds via VC-dimension} \label{sec:vc} The VC-dimension of a set system, first introduced by Vapnik and Chervonenkis, has applications in diverse areas such as graph theory, discrete geometry~\cite{epsnet}, and the theory of empirical processes~\cite{tal}, and is known to precisely capture the sample complexity of learning in the setting of binary classification~\cite{AB99,Shalev-Shwartz2014}. In this section we show it can also be used to give upper bounds for sample complexity of density estimation. The methods of this section have been developed in~\cite{devroye_book}, which is the first place where VC-dimension is used for bounding the sample complexity of density estimation. The main results of this section appear in~\cite{ashtiani2017sample}. We start by defining the Vapnik-Chervonenkis dimension (VC-dimension for short) of a set system. \begin{definition}[VC-dimension] Let $H$ be a family of subsets of a set $Z$. We say a set $A\subseteq Z$ is shattered if, for \emph{any} $B\subseteq A$, there exists some $C\in H$ such that $A \cap C = B$. The \emph{VC-dimension} of $H$, denoted $\vc(H)$, is the size of the largest shattered set. \end{definition} In this section we show an upper bound of $O(d^2/\varepsilon^2)$ for learning $\mathcal G_{d,1}$, and an upper bound of $O(d/\varepsilon^2)$ for learning $\mathcal A_{d,1}$. The plan is to first connect the sample complexity of learning an arbitrary class $\mathcal F$ to the VC-dimension of a class of a related set system, called the Yatracos class of $\mathcal F$ (this is done in Theorem \ref{thm:distributionVC}), and then provide upper bounds on VC-dimension of this set system. Let $Z$ be an arbitrary set, which will be the domain of our probability distributions. \begin{definition}[$\mathcal{A}$-distance] Let $\mathcal{A}\subseteq 2^Z$, and let $p$ and $q$ be two probability distributions over $Z$. The \emph{$\mathcal{A}$-distance} between $p$ and $q$ is defined as $$ \|p-q \|_{\mathcal{A}} \coloneqq \sup_{A\in \mathcal{A}} |p(A) - q(A)|. $$ \end{definition} \begin{definition}[empirical distribution] Let $S = (x_i)_{i=1}^{m}$ be a sequence of members of $Z$. The \emph{empirical distribution} corresponding to this sequence is defined by $\hat{p}_S(A) \coloneqq \frac 1 m |A \cap \{x_1,\dots,x_m\}|$ for any $A\subseteq Z$. \end{definition} The following lemma is a well known refinement of the uniform convergence theorem of~\cite{vc}, due to Talagrand~\cite{tal}; we use the wording of~\cite[Theorem~4.9]{AB99}. \begin{lemma}[uniform convergence theorem]\label{lemma:vc} Let $p$ be a probability distribution over $Z$. Let $\mathcal{A} \subseteq 2^Z$ and let $v$ be the VC-dimension of $\mathcal{A}$. Then, there exist universal positive constants $c_1,c_2,c_3$ such that $$\mathbf{Pr}_{S\sim p^m} \{\|p-\hat{p}_S \|_{\mathcal{A}} \geq \varepsilon \}\leq \exp(c_1 + c_2 v - c_3 m \varepsilon^2)\:.$$ \end{lemma} \begin{definition}[Yatracos class] \label{def_yatrocas} For a class $\mathcal F$ of functions from $Z$ to $\mathbb{R}$, the associated \emph{Yatracos class} is the family of subsets of $Z$ defined as \[ \mathcal{Y}(\mathcal F) \coloneqq \left\{ \{x\in Z : f_1(x)\geq f_2(x)\} \textnormal{ for some } f_1,f_2\in\mathcal F. \right\} \] \end{definition} Observe that if $f,g \in \mathcal F$ then \(\|f - g \|_{TV} = \|f - g \|_{\mathcal{Y}(F)}\). To see this, let $A \coloneqq \{x : f(x) \geq g(x)\}\in\mathcal Y({\mathcal F})$, and observe that \begin{align*} \|f - g \|_{TV} & = \frac 1 2 \|f-g\|_{1} = \frac 1 2 \int |f(x)-g(x)| dx = \int_{A} (f(x) - g(x)) dx \\ &= \int_{A} f(x) dx - \int_{A} g(x) dx = |f(A)-g(A)| \leq \|f - g\|_{\mathcal Y(\mathcal F)} . \end{align*} The other direction, namely $\|f - g \|_{TV} \geq \|f - g\|_{\mathcal Y(\mathcal F)}$, follows from the definition of the total variation distance. \begin{definition}[empirical Yatracos minimizer]\label{eym} Let $\mathcal{F}$ be a class of distributions over domain $Z$. The \emph{empirical Yatracos minimizer} is a function $L^{\mathcal{F}}:\bigcup_{m=1}^{\infty} Z^m \to \mathcal{F}$ defined as $$L^{\mathcal{F}}(S) =\arg\min_{q\in \mathcal{F}} \|q - \hat{p}_S \|_{\mathcal{Y}(\mathcal{F})}.$$ \end{definition} If the argmin is not unique, we may choose one arbitrarily. \begin{theorem}[density estimation via empirical Yatracos minimizer] \label{thm:distributionVC} Let $\mathcal{F}$ be a class of probability distributions, and let $S\sim p^m$, where $p\in \mathcal F$. Then, with probability at least $1 - \delta$ we have $$\|p - L^{\mathcal{F}}(S)\|_{TV} \leq c \sqrt{\frac{v + \log \frac{1}{\delta}}{m}} $$ where $v$ is VC-dimension of $\mathcal{Y}(\mathcal{F})$, and $c$ is a universal constant. \end{theorem} We remark that variants of this result, without explicit dependence on the failure probability, is proved implicitly in \cite{devroye_book} and also appears explicitly in \cite[Lemma~6]{logconcave}. \begin{proof} We have \begin{align*} \| p - L^{\mathcal{F}}(S)\|_{TV} &=\|L^{\mathcal{F}}(S) - p \|_{\mathcal{Y}(\mathcal{F})} \leq \|L^{\mathcal{F}}(S) - \hat{p}_S \|_{\mathcal{Y}(\mathcal{F})} + \|\hat{p}_S - p \|_{\mathcal{Y}(\mathcal{F})} \\ &\leq 2 \|p - \hat{p}_S \|_{\mathcal{Y}(\mathcal{F})} \leq c \sqrt{\frac{v + \log \frac{1}{\delta}}{m}} \:. \end{align*} The equality is because $L^{\mathcal{F}}(S), p\in\mathcal F$. The first inequality is the triangle inequality. The second inequality is because $L^{\mathcal{F}}(S)$ is the empirical minimizer of the $\mathcal{Y}(\mathcal{F})$-distance. The third inequality holds by Lemma~\ref{lemma:vc} with probability $\geq1-\delta$. \end{proof} \begin{corollary}\label{cor:vcsample} For any class $\mathcal F$, the sample complexity for learning $\mathcal F$ is bounded by $O\left( (\vc(\mathcal Y(\mathcal F)) + \log (1/\delta)) /\varepsilon^2 \right)$. \end{corollary} In view of Corollary~\ref{cor:vcsample}, to prove the sample complexity bounds for $\mathcal G_{d,1}$ and $\mathcal A_{d,1}$, it remains to show upper bounds on the VC-dimensions of the Yatracos classes $\mathcal Y(\mathcal G_{d,1})$ and $\mathcal Y(\mathcal A_{d,1})$. We provide the proof for general Gaussians only; the proof for axis-aligned Gaussians is very similar. For classes $\mathcal F$ and $\mathcal G$ of functions from $Z$ to $\mathbb{R}$, let \[\operatorname{NN}(\mathcal{G})\coloneqq \left\{\{x : f(x)\geq0\}\textnormal{ for some }f\in \mathcal{G} \right\} \subseteq 2^Z,\] and \[\Delta \mathcal{F} \coloneqq \{f_1-f_2 : f_1, f_2 \in \mathcal{F} \}\:, \] and notice that \[\mathcal{Y}(\mathcal F) = \operatorname{NN}(\Delta \mathcal F).\] We upper bound the VC-dimension of $\operatorname{NN}(\Delta \mathcal G_{d,1})$ via the following well known result in statistical learning theory, which first appeared in this form in~\cite[Theorem~7.2]{dudley_vectorspace} (see \cite[Lemma~4.2]{devroye_book} for a historical discussion). \begin{theorem}[VC-dimension of vector spaces] \label{dudley} Let ${\mathcal F}$ be an $n$-dimensional vector space of real-valued functions. Then $\vc(\operatorname{NN}(\mathcal F)) = n$. \end{theorem} Now let $h$ be the indicator function for an arbitrary element in $\operatorname{NN}(f_1-f_2)$, where $f_1,f_2 \in \mathcal G_{d,1}$. Then $h$ is a $\{0,1\}$-valued function and we have: \begin{align*} h(x) & = \mathbbm{1}\{\mathcal{N}(\mu_1, \Sigma_1)(x) > \mathcal{N}(\mu_2, \Sigma_2)(x)\}\\ & = \mathbbm{1}\{ \alpha_1 \exp(\frac{-1}{2}(x-\mu_1)^T\Sigma_1^{-1}(x-\mu_1) ) > \alpha_2 \exp(\frac{-1}{2}(x-\mu_2)^T\Sigma_2^{-1}(x-\mu_2) ) \}\\ & = \mathbbm{1}\{ (x-\mu_1)^T\Sigma_1^{-1}(x-\mu_1) -(x-\mu_2)^T\Sigma_2^{-1}(x-\mu_2) - \log \frac{\alpha_2}{\alpha_1} >0 \}\:. \end{align*} The inner expression is a quadratic form, and the linear dimension of all quadratic functions is $O(d^2)$. Hence, by Theorem~\ref{dudley}, we have $\vc(\mathcal Y(\mathcal G_{d,1})) = O(d^2)$. Combined with Corollary~\ref{cor:vcsample}, this gives a sample complexity upper bound of $O(d^2/\varepsilon^2)$ for learning $\mathcal G_{d,1}$, which is the main result of this section. An $O(d/\varepsilon^2)$ upper bound for $\mathcal A_{d,1}$ can be proved similarly. The problem with extending these results to mixtures of Gaussians is that it is not easy to bound the VC-dimension of the Yatrocas class of the family of mixtures of Gaussians. It is an intriguing open problem whether $\vc(\mathcal Y(\mathcal G_{d,k})) = \widetilde{O}(k \vc(\mathcal Y(\mathcal G_{d,1})))$. One can also ask a more ambitious question: is it true that for any class $\mathcal F$ of distributions, $\vc(\mathcal Y(k\textnormal{-mix}(\mathcal F))) =\widetilde{O}(k \vc(\mathcal Y(\mathcal F)))$ ? We believe the answer to this latter question is no, but this is yet to be disproved. The answers to these questions are unknown, so new ideas are required for density estimation of mixtures, described next. First, in Section~\ref{sec:onedimensional} we discuss the 1-dimensional case, and we discuss the high-dimensional case in Sections~\ref{sec:mix} and~\ref{sec:compression}. \section{Sample complexity upper bounds via piecewise polynomials} \label{sec:onedimensional} In this section we give an $\widetilde{O}(k/\varepsilon^2)$ upper bound for learning the class $\mathcal G_{1,k}$. This was proved in~\cite{onedimensional}, which also gives a polynomial time algorithm for density estimation of this class. The main idea is to approximate a Gaussian with a piecewise polynomial function. For positive integers $D,t$, let $\mathcal P_{t,D}$ denote the class of density functions that are piecewise polynomials with at most $t$ pieces, where each piece is a polynomial of degree at most $D$. First, we give a sample complexity upper bound for learning $\mathcal P_{t,D}$ using the ideas from Section~\ref{sec:vc}. We need to bound $\vc(\mathcal Y(\mathcal P_{t,D}))=\vc(\nn(\Delta \mathcal P_{t,D}))$. Note that $\Delta \mathcal P_{t,D} = \mathcal P_{t,D}$. And since any $p \in \mathcal P_{t,D}$ has at most $tD$ roots and is continuous, any element in $\nn(\mathcal P_{t,D})$ is a union of at most $t D$ intervals. The VC-dimension of the class of unions of at most $k$ intervals can be easily seen to be $O(k)$. This gives $\vc(\mathcal Y(\mathcal P_{t,D})) = O( t D)$, hence by Corollary~\ref{cor:vcsample}, the sample complexity of learning $\mathcal P_{t,D}$ is $O(tD/\varepsilon^2)$. For any $g\in \mathcal G_{1,1}$ there exists $p\in \mathcal P_{3,O(\log(1/\varepsilon))}$ with $\|g - p\|_1 \leq \varepsilon$. (This is obtained by taking the Taylor polynomial for the main body of the Gaussian, and taking the zero polynomial for the two tails, see~\cite{onedimensional} for the details.) Also, $k$-mix$(\mathcal P_{t,D}) \subseteq \mathcal P_{kt, D}$. This implies that, for any $g\in \mathcal G_{1,k}$ there exists $p\in \mathcal P_{3k,O(\log(1/\varepsilon))}$ with $\|g - p\|_1 \leq \varepsilon$. Let $g$ be the target distribution. Now, consider the empirical Yatracos minimizer (see Definition~\ref{eym}) for the class $\mathcal P_{3k,O(\log(1/\varepsilon))}$. Given samples from $g$, the minimizer `imagines' the samples are coming from $p$, and after taking $O(k \log (1/\varepsilon)/\varepsilon^2)$ samples, outputs an estimate $\widehat{p}$ such that $\|\widehat{p}-p\|_1 \leq \varepsilon$. Then, the triangle inequality gives \[\|\widehat{p}-g\|_1 \leq \|\widehat{p}-p\|_1 + \|\widehat{p}-g\| \leq 2\varepsilon,\] as required. There is an issue with the above argument; our proof for Theorem~\ref{thm:distributionVC} assumed the samples are from a distribution in the known class of distributions ($\mathcal P_{3k,O(\log(1/\varepsilon))}$ in this case), whereas in this case, they are not. However, one can amend the argument (by applying two careful triangle inequalities) to show that, if the samples are coming from a distribution $g$ that is not necessarily in $\mathcal F$, then with high probability the empirical Yatrocas minimizer outputs a distribution $L^{\mathcal{F}}(S)$ satisfying: \begin{equation}\label{agnostic} \|g - L^{\mathcal{F}}(S)\|_{TV} \leq 3 \inf_{p \in \mathcal F} \|p - g\|_{TV}+ c \sqrt{\frac{v + \log \frac{1}{\delta}}{m}}, \end{equation} which will be $O(\varepsilon)$ in our case, as required (see~\cite{ashtiani2017sample} for the proof of (\ref{agnostic})). Such a result is called \emph{agnostic learning}, since it does not assume the target belongs to the known class, but only assumes it can be approximated well by some element of the class. Unfortunately, the idea of piecewise polynomial approximation cannot be extended to higher dimensions, because to approximate a high-dimensional Gaussians, one needs a piecewise polynomial with either the degree or the number of pieces being exponential in the dimension. The ideas for extending the bounds to higher dimensions are quite different and are described next. \section{A generic upper bound for mixtures} \label{sec:mix} We consider a more general problem in this section. Assume that we have a method to learn an arbitrary class $\mathcal{F}$. Does this mean that we can learn $k$-mix$(\mathcal{F})$? And if so, what is the sample complexity of this task? We give an affirmative answer to the first question, and provide a bound for sample complexity of learning $k$-mix$(\mathcal{F})$. As an application of this general result, we give an upper bound for the case of mixtures of Gaussians in high-dimensions. This section is based on~\cite{ashtiani2017sample}. \begin{theorem}[sample complexity of learning mixtures]\label{thm:mixtures} Assume that $\mathcal{F}$ can be learned with sample complexity $m_{\mathcal{F}}(\varepsilon, \delta) = {\lambda(\mathcal F,\delta)}/{\varepsilon^\alpha}$ for some $\alpha \geq 1$ and some function $\lambda(\mathcal F,\delta) = \Omega(\log(1/\delta))$. Then there exists a density estimation method for $k$-mix($\mathcal{F}$) requiring \(\displaystyle O\left({k\log k \cdot m_{\mathcal F}(\varepsilon, \frac{\delta}{3k}) }\Big/{\varepsilon^{2}}\right) \) samples. \end{theorem} One may wonder about tightness of this theorem. In Theorem~2 in \cite{spherical}, it is shown that if $\mathcal F$ is the class of spherical Gaussians, we have $m_{k\textnormal{-mix}(\mathcal{F})}(\varepsilon, \delta) = \Omega(k m_{\mathcal F}(\varepsilon, \delta) )$, therefore, the factor of $k$ is necessary in general. However, it is not clear whether the additional factor of $\log k /\varepsilon^2$ in the theorem is tight. If we apply this theorem to the class $\mathcal F = \mathcal G_{d,1}$, which has sample complexity $O(d^2/\varepsilon^2)$ as proved in Section~\ref{sec:vc}, we immediately obtain an upper bound of $\widetilde{O}(kd^2/\varepsilon^4)$ for the sample complexity of learning $\mathcal G_{d,k}$, and a sample complexity upper bound of $\widetilde{O}(kd/\varepsilon^4)$ for $\mathcal A_{d,k}$. We now give a sketch of the proof of Theorem~\ref{thm:mixtures}. Suppose the target distribution is $g = \sum_{i=1}^{k} w_i g_i$, where each $g_i \in \mathcal F$. The $w_i$ are called the \emph{mixing weights}, and the $g_i$ are called the \emph{components}. Consider a die with $k$ faces, such that when you roll it, the $i$th face has probability $w_i$ of coming. To generate a point according to $g$, one can roll this die, and if the $i$th face comes, generate a point according to distribution $g_i$. So, any i.i.d.\ sample generated from $g$ can be coloured with $k$ colours, such that almost a $w_i$ fraction of points have colour $i$, and the points with colour $i$ are i.i.d.\ distributed as $g_i$. Now, if the colouring was given to the algorithm, there was a clear way to proceed: estimate each of the $g_i$ using the $\mathcal F$-learner, and estimate $w_i$ by the proportion of points with colour $i$, and then output the resulting mixture. The issue is that the colouring is not given to the algorithm. But, in principle, it can do an exhaustive search over all possible colourings, and `choose the best one.' More precisely, the algorithm has two main steps. In the first step we generate a finite set of `candidate distributions,' such that at least one of them is $\varepsilon$-close to $g$ in $L_1$ distance. These candidates are of the form $\sum_{i=1}^{k} \widehat{w}_i \widehat{G}_i$, where the $\widehat{G}_i$'s are extracted from samples and are estimates for the real components $G_i$, and the $\widehat{w}_i$'s come from a fixed discretization of $\Delta_k$, and are estimates for the real mixing weights $w_i$. In the second step, we take lots of additional samples and use the following result to choose the best one among them, giving a distribution that is $O(\varepsilon)$-close to $g$. The following theorem provides an algorithm that chooses the almost-best one among a finite set of candidate distributions. It follows from \cite[Theorem~6.3]{devroye_book} and a standard Chernoff bound. \begin{theorem}[handpicking from a finite set of candidates] \label{thm:candidates} Suppose we are given $M$ candidate distributions $f_1,\dots,f_M$ and we have access to i.i.d.\ samples from an unknown distribution $g$. Then there exists an algorithm that given the $f_i$'s and $\varepsilon>0$, takes $\log (3M^2/\delta)/2\varepsilon^2$ samples from $g$, and with probability $\geq 1-\delta$ outputs an index $j\in[M]$ such that \[ \|f_j-g\|_1 \leq 3 \min_{i\in[M]} \|f_i-g\|_1 + 4\varepsilon \:. \] \end{theorem} We now analyze the sample complexity of our proposed algorithm. First consider the simpler case that all mixing weights are equal to $1/k$. To estimate $g$ within distance $\varepsilon$, it suffices to estimate each $g_i$ within distance $\varepsilon$. Therefore, we need $ C k m_{\mathcal F}(\varepsilon,\delta/k)$ total data points from $g$, with some large constant $C$, so that we get $ \Omega(m_{\mathcal F}(\varepsilon,\delta/k))$ samples from each $g_i$ with probability $\geq 1-\delta$. For each fixed way of colouring these $ C k m_{\mathcal F}(\varepsilon,\delta/k)$ data points with $k$ colours, we provide the points of each colour to the $\mathcal F$-learner, and get an estimate $\widehat{g_i}$, and then we add $\sum_{i=1}^{k} \frac {1}{k} \widehat{g_i}$ to the set of candidate distributions (recall that we have assumed the mixture weights are $1/k$). Hence, the total number of candidate distributions is $M= k^ {C k m_{\mathcal F}(\varepsilon,\delta/k)} = \exp (C k m_{\mathcal F}(\varepsilon,\delta/k) \log k)$. We now show that at least one of the candidate distributions is $O(\varepsilon)$-close to the target. Consider the colouring that assigns points to components correctly. Then the $\mathcal F$-learner would provide us with $(\widehat{g_i})_{i=1}^k$ that each is $\varepsilon$-close to the corresponding $g_i$ with probability $\geq 1-\delta/k$. So, by the union bound, they are simultaneously close, with probability $\geq 1-\delta$. Thus, when we apply the algorithm of Theorem~\ref{thm:candidates}, with probability $\geq 1-\delta$ it provides us with one of the candidate distributions that is $7\varepsilon$-close to the target. The total sample complexity of the whole algorithm is thus \[ O(k m_{\mathcal F}(\varepsilon,\delta/k)) + O (\log M / \varepsilon^2) =O\left({k\log k \cdot m_{\mathcal F}(\varepsilon, \frac{\delta}{3k}) }\Big/{\varepsilon^{2}}\right), \] as required. The general case of arbitrary mixing weights brings two challenges: first, we do not know the weights, and so we also do an exhaustive search over a finite fine grid on the simplex $\Delta_k$ to make sure that at least one of the candidate distributions also gets the weights right; it turns out that this does not increase the sample complexity by more than a constant factor. The more important problem is that, for components with very small weight, we may not get enough samples if we take a total of $ C k m_{\mathcal F}(\varepsilon,\delta/k)$ samples from the mixture. The solution is to have different precision for different components: from small-weight components we will have fewer data points, so we will estimate them with larger error; this is compensated by the fact that their weight is small, so the effect of this error in the total estimation error can be controlled. Here is the place that, for the error controlling calculations to work out, we need the technical conditions in the theorem, namely that $m_{\mathcal{F}}(\varepsilon, \delta) = {\lambda(\mathcal F,\delta)}/{\varepsilon^\alpha}$ for some $\alpha \geq 1$ and that $\lambda(\mathcal F,\delta) = \Omega(\log(1/\delta))$. See~\cite{ashtiani2017sample} for the details.. \section{Sample complexity upper bounds via compression schemes} \label{sec:compression} The method of previous section would give sample complexity upper bounds of $\widetilde{O}(kd/\varepsilon^4)$ for learning $\mathcal A_{d,k}$, and $\widetilde{O}(kd^2/\varepsilon^4)$ for learning $\mathcal G_{d,k}$. In this section, we show how the work of ~\cite{ashtiani2017agnostic} improves these to $\widetilde{O}(kd/\varepsilon^2)$ and $\widetilde{O}(kd^2/\varepsilon^2)$ using a technique called `compression.' As before, let $\mathcal{F}$ be a class of distributions over a domain $Z$. \begin{definition}[distribution decoder] A \emph{distribution decoder} for $\mathcal{F}$ is a deterministic function $\mathcal{J}:\bigcup_{n=0}^{\infty} Z^n \times \bigcup_{n=0}^{\infty} \{0,1\}^n \rightarrow \mathcal{F}$, which takes a finite sequence of elements of $Z$ and a finite sequence of bits, and outputs a member of $\mathcal{F}$. \end{definition} \begin{definition} [distribution compression scheme]\label{def_compression} Let $\tau,t,m:(0,1)\rightarrow \mathbb{Z}_{\geq0}$ be functions. We say $\mathcal{F}$ admits \emph{$(\tau,t,m)$-compression} if there exists a decoder $\mathcal{J}$ for $\mathcal{F}$ such that for any distribution $g \in \mathcal{F}$ the following holds: \setlength{\leftskip}{0.5cm} \setlength{\rightskip}{0.5cm} For any $\varepsilon \in (0,1)$, if $S\sim g^{m(\varepsilon)}$, then with probability at least $2/3$, there exists a sequence $L$ of at most $\tau(\varepsilon)$ elements of $S$, and a sequence $B$ of at most $t(\varepsilon)$ bits, such that $\|\mathcal{J}(L,B)-g\|_1\leq \varepsilon$. \end{definition} Essentially, the definition asserts that with high probability, there should be a (small) subset of $S$ and some (small number of) additional bits, from which $g$ can be reconstructed, or `decoded.' We say that the distribution $g$ is `encoded' with $L$ and $B$, and in general we would like to have a compression scheme of a small size, for a reason that will be clarified soon. \begin{remark}\label{remark_probability} In the above definition we required the probability of existence of $L$ and $B$ to be at least 2/3, but one can boost this probability to $1-\delta$ by generating a sample of size $m(\varepsilon)\log (1/ \delta)$. \end{remark} We next establish a connection between compression and learning, and also show some properties of compression schemes. The proofs can be found in~\cite{ashtiani2017agnostic}. \begin{lemma}[compression implies learning] \label{thm:compression} Suppose $\mathcal{F}$ admits $(\tau,t,m)$-compression. Let $\tau'(\varepsilon)\coloneqq \tau(\varepsilon/6)+t(\varepsilon/6)$. Then $\mathcal{F}$ can be learned using \begin{align*} O\left( m\left(\frac \varepsilon 6\right) \log \frac{1}{\delta} + \frac{\tau'(\varepsilon) \log (m\left( \frac \varepsilon 6\right) \log(1/\delta)) + \log(1/\delta)}{\varepsilon^2} \right) = \widetilde{O} \left( m\left(\frac \varepsilon 6\right) + \frac{\tau'(\varepsilon)}{\varepsilon^2} \right) \end{align*} samples. \end{lemma} The proof resembles that for Theorem~\ref{thm:mixtures}: perform an exhaustive search over all possibilities for the `defining sequences' $L,B$ to generate some candidates; one of these candidates would give the `correct' $L,B$; then apply Theorem~\ref{thm:candidates} to find the best one among the candidates. Compression schemes have two nice closure properties. First, if a class $\mathcal F$ of distributions can be compressed, then the class of distributions that are formed by taking products of distributions in $\mathcal F$ can also be compressed. For a class $\mathcal F$ of distributions, we define \( \mathcal F^d \coloneqq \left\{ \prod_{i=1}^{d} p_i : p_1,\dots,p_d \in \mathcal F \right\}. \) The proof of the following lemma is not too difficult. \begin{lemma} [compressing product distributions] \label{lem:product_compress} If $\mathcal{F}$ admits $(\tau(\varepsilon),t(\varepsilon), m(\varepsilon))$-compression, then $\mathcal{F}^d$ admits $(d \tau(\varepsilon/d),d t(\varepsilon/d), m(\varepsilon/d)\log (3d))$-compression. \end{lemma} Second, if a class $\mathcal F$ of distributions can be compressed, then the class of mixtures of distributions in $\mathcal F$ can also be compressed. \begin{lemma} [compressing mixtures] \label{lem:compressmixtures} If $\mathcal F$ admits $(\tau(\varepsilon), t(\varepsilon), m(\varepsilon))$-compression, then $\ensuremath{k\textnormal{\normalfont-mix}}(\mathcal F)$ admits $(k\tau(\varepsilon/3), kt(\varepsilon/3) + k \log_2 (4k/\varepsilon)), 48 m(\varepsilon/3) k \log(6k) / \varepsilon)$-compression. \end{lemma} The proof of this lemma also resembles that for Theorem~\ref{thm:mixtures}: just take enough samples so that you have enough samples from each component, and also encode the weights of the mixture using the additional bits. One can easily show that a single 1-dimensional Gaussian can be compressed. \begin{lemma}[compressing 1-dimensional Gaussians] \label{thm:1gaussiancompression} The class $\mathcal G_{1,1}$ admits $(2, 0, O(1/\varepsilon))$-compression. \end{lemma} The proof is simple: given $C/\varepsilon$ i.i.d.\ samples from a Gaussian $\mathcal N(\mu,\sigma^2)$ for a large constant $C$, with high probability there exists two generated points $x_1,x_2$ with $x_1 \in [\mu - (1+\varepsilon)\sigma, \mu - (1-\varepsilon)\sigma]$ and $x_2 \in [\mu + (1-\varepsilon)\sigma, \mu + (1+\varepsilon)\sigma]$. The decoder estimates $\widehat{\mu} = (x_1+x_2)/2$ and $\widehat{\sigma} = (x_2-x_1)/2$. It is not hard to verify that $\|\mathcal N(\widehat{\mu},\widehat{\sigma})-\mathcal N(\mu,\sigma)\|_1=O(\varepsilon)$. Using the above properties, one can show a tight upper bound on the sample complexity of learning mixtures of axis-aligned Gaussians. \begin{theorem}[learning mixtures of axis-aligned Gaussians] \label{maincor} The class $\mathcal A_{d,k}$ of mixtures of $k$ axis-aligned Gaussians in $\mathbb{R}^d$ can be learned using $\widetilde{O}(kd/\varepsilon^2)$ many samples. \end{theorem} \begin{proof} By Lemma~\ref{thm:1gaussiancompression}, $\mathcal G_{1,1}$ admits $(2,0,O(1/\varepsilon))$-compression. By Lemma~\ref{lem:product_compress}, the class $\mathcal A_{d,1}=\mathcal G_{1,1}^d$ admits $(O(d),0,O(d \log (3d)/\varepsilon))$-compression. Then by Lemma~\ref{lem:compressmixtures}, the class $k$-mix($\mathcal A_{d,1}$) $=\mathcal A_{d,k}$ admits $(O(kd), O(k\log(k/\varepsilon)),O(kd \log(6k) \log(3d) / \varepsilon^2)$-compression. Applying Lemma~\ref{thm:compression} gives the theorem. \end{proof} Using more complicated arguments, one can also prove that the class of $d$-dimensional Gaussian distributions admits $\big(O(d\log (2d)), \allowbreak O(d^2 \log (2d) \log(d/\varepsilon)), \allowbreak O(d \log (2d)) \big)$ compression. The high level idea is that by generating $O(d \log (2d)) $ samples from a Gaussian, one gets a rough sketch of the geometry of the Gaussian. In particular, the convex hull of the points drawn from a Gaussian enclose an ellipsoid centred at the mean and whose principal axes are the eigenvectors of the covariance matrix. Using ideas from convex geometry and random matrix theory, one can in fact encode the centre of the ellipsoid \emph{and} the principal axes using a convex combination of these samples. Then we discretize the coefficients and obtain an approximate encoding. See~\cite{ashtiani2017agnostic} for details. \begin{lemma}[compressing high-dimensional Gaussians] \label{lem:coreformixtures} For any positive integer $d$, the class of $d$-dimensional Gaussians admits an $\big(O(d\log (2d)),\allowbreak O(d^2 \log (2d) \log(d/\varepsilon)),\allowbreak O(d \log (2d)) \big)$-compression scheme. \end{lemma} In the next section we will see the following bound is tight up to polylogarithmic factors. \begin{theorem}[learning mixtures of Gaussians] The class of $k$-mixtures of $d$-dimensional Gaussians can be learned using $\widetilde{O}(kd^2/\varepsilon^2)$ samples. \end{theorem} \begin{proof} Combining Lemma~\ref{lem:coreformixtures} and Lemma~\ref{lem:compressmixtures} implies that the class of $k$-mixtures of $d$-dimensional Gaussians admits a $$\big(\, O(kd\log (2d)) ,\, O(kd^2 \log (2d)\log(d/\varepsilon) + k \log (k/\varepsilon)) ,\, O(dk \log k \log(2d)/\varepsilon) \,\big) $$ compression scheme. Applying Lemma~\ref{thm:compression} with $m(\varepsilon)=\widetilde{O}(d k/\varepsilon)$ and $\tau'(\varepsilon)=\widetilde{O}(kd^2 )$ gives the sample complexity of learning this class is $\widetilde{O}(kd^2/\varepsilon^2)$, completing the proof of the theorem. \end{proof} \section{Lower bounds via Fano's inequality} \label{sec:lower} In the previous sections we gave several techniques for upper bounding the sample complexity of density estimation. This survey would feel incomplete if we do not discuss at least one technique for proving lower bounds. Note that each of our upper bounds holds uniformly over a class: the sample complexity does not depend on the specific distribution. Similarly, the lower bounds we discuss in this section also hold for a class of distribution rather than for a specific distribution. Such a bound is called a minimax lower bound in the statistics literature, and a worst-case lower bound in the computer science literature. In this section, which is based on~\cite{spherical,ashtiani2017agnostic}, we give a sample complexity lower bound of $\widetilde\Omega(kd/\varepsilon^2)$ for $\mathcal A_{d,k}$, and a lower bound of $\widetilde\Omega(kd^2/\varepsilon^2)$ for $\mathcal G_{d,k}$. That is, we show that any density estimation method that learns the class $\mathcal G_{d,k}$ uniformly, in the sense of Definition~\ref{def:density_estimation}, must have a sample complexity of $\widetilde\Omega(kd^2/\varepsilon^2)$. This shows the density estimation method described in the previous section has optimal sample complexity, up to polylogarithmic factors. We will need the definition of the Kullback-Leibler divergence (KL-divergence, also called the relative entropy) between two distributions. \begin{definition}[Kullback-Leibler divergence] Let $f$ and $g$ be densities over domain $Z$. Their \emph{KL-divergence} is defined as \[\kl(f \parallel g)= \int_Z f (x) \log \frac{f(x)}{g(x)} \textnormal{ d}x. \] \end{definition} The KL-divergence is a measure of closeness between distributions. It is always non-negative, and is zero if and only if the two distributions are equal almost everywhere. However, it is not a metric, since it is not symmetric, and it can be $+\infty$. The proof of the following lemma, which is called the `generalized Fano's inequality,' uses Fano's inequality from information theory. It was first proved in~\cite[page 77]{devroye_density_estimation_first}. We write here a slightly stronger version, which appears in~\cite[Lemma 3]{bin_yu}. \begin{lemma}[generalized Fano's inequality] Suppose we have $M>1$ distributions $f_1,\dots,f_M$ with \[ \kl(f_i \parallel f_j) \leq \beta \textnormal{ and } \|f_i - f_j\|_1 \geq \alpha \qquad \forall i\neq j\in[M].\] Consider any density estimation method that gets $n$ i.i.d.\ samples from some $f_i$, and outputs an estimate $\widehat{f}$ (the method does not know $i$). For each $i$, define $e_i$ as follows: assume the method receives samples from $f_i$, and outputs $\widehat{f}$. Then $e_i\coloneqq \mathbf{E}\|f_i-\widehat{f}\|_1$. Then, we have \[ \max_i e_i \geq \alpha (\log M - n\beta + \log 2) / (2 \log M) \:.\] \end{lemma} This immediately leads to the following sample complexity lower bound for learning a class $\mathcal F$. \begin{corollary}\label{cor:fano} Suppose for all small enough $\varepsilon>0$ there exist $M$ densities $f_1,\dots,f_M \in \mathcal F$ with \[ \kl(f_i \parallel f_j) =O(\kappa(\varepsilon)) \textnormal{ and } \|f_i - f_j\|_1 =\Omega(\varepsilon) \qquad \forall i\neq j\in[M].\] Then the sample complexity of learning $\mathcal F$ is $\Omega((\log M) / \kappa(\varepsilon) \log(1/\varepsilon) )$. \end{corollary} We start with describing the lower bound construction which gives a sample complexity lower bound of $\widetilde\Omega(kd/\varepsilon^2)$ for $\mathcal A_{d,k}$. This lower bound was proved in~\cite{spherical}. We claim it suffices to give a lower bound of $\Omega(d/\varepsilon^2)$ for $\mathcal A_{d,1}$. For, consider a mixture of axis-aligned Gaussians whose components are extremely far away, such that the total variation distance between any two components is very close to 1. To learn the mixture distribution, one needs to learn each component. But each data point can help in learning \emph{one} of the $k$ components. Since for learning any of the components one needs $\Omega(d/\varepsilon^2)$ samples, one will need $\Omega(kd/\varepsilon^2)$ samples to learn the mixture. Some nontrivial work has to be done to make this intuitive argument rigorous, but we omit that, and focus on proving the lower bound of $\Omega(d/\varepsilon^2)$ for $\mathcal A_{d,1}$. Let $M \coloneqq 2^{d/5}$. To prove a lower bound of $\Omega(d/\varepsilon^2)$ for $\mathcal A_{d,1}$, we will build $M$ densities $f_1,\dots,f_{M} \in \mathcal A_{d,1}$ satisfying the conditions of the corollary. By the Gilbert-Varshamov bound in coding theory, there exists $2^{d/5}$ elements in $\{0,1\}^d$ such that any two of them differ in at least $d/5$ components. (To see this, note that the size of a Hamming ball of radius $d/5$ is $$\sum_{j=0}^{d/5} \binom{d}{j} \leq \left(\frac{ed}{d/5}\right)^{d/5} =(5e)^{d/5} < 2^{4d/5};$$ hence one can start from an empty set $S$, then add elements from $\{0,1\}^d$ one by one to $S$, and delete the Hamming ball of each added element. So long as $S$ has less than $2^{d/5}$ elements, the number of deleted elements is less than $2^{d/5}\times 2^{4d/5} = 2^d$, so there are still undeleted elements in $\{0,1\}^d$, and one still can add more elements to $S$.) Call them $\mu_1,\dots,\mu_M \in \mathbb{R}^d$, and let $f_i \coloneqq \mathcal N(\mu_i \varepsilon / \sqrt d, I_d)$. The densities $f_1,\dots,f_M$ are Gaussians with identity covariance matrix, with their means are chosen carefully at vertices of $d$-dimensional hypercube with side length $\varepsilon/\sqrt d$. The KL-divergence between two general Gaussians $\mathcal N(\mu,\Sigma)$ and $\mathcal N(\mu',\Sigma')$ is given by (see, e.g., \cite[Section~9]{duchi}) \[\kl(\mathcal N(\mu,\Sigma)\parallel\mathcal N(\mu',\Sigma')) ={ \frac{1}{2} \left( \tr(\Sigma^{-1}\Sigma' - I) + (\mu-\mu')^T \Sigma^{-1} (\mu-\mu')^T - \ln \left( \frac {\det (\Sigma')}{\det (\Sigma)}\right) \right)},\] thus, for $i,j\in [M]$ we get \begin{align*} \kl(f_i \parallel f_j) &= \kl(\mathcal N(\mu_i \varepsilon / \sqrt d,I_d),\mathcal N(\mu_j \varepsilon / \sqrt d,I_d)) \\ &={ \frac{1}{2} \left( \|\mu_i-\mu_j\|_2^2 \varepsilon^2 / d \right)} \leq \frac{1}{2} \left( d \varepsilon^2 / d \right) = \varepsilon^2/2, \end{align*} as required. Fix distinct $i$ and $j$. We now lower bound the $L_1$ distance between $f_i$ and $f_j$. Let $X_i \sim f_i$ and $X_j \sim f_j$. Any two $\mu_i$ and $\mu_j$ differ in at least $d/5$ coordinates. Fix such $d/5$ coordinates, and, without loss of generality, assume that in $\mu_i$ these coordinates are 0, and they are 1 in $\mu_j$. If we project $X_i$ onto one such coordinate, we get an $N(0,1)$ random variable, so the sum over these coordinates of $X_i$ has distribution $\mathcal N(0, d/5)$. Similarly, if we project $X_j$ onto one such coordinate, we get an $N(\varepsilon / \sqrt d,1)$ random variable, so the sum over these coordinates of $X_j$ has distribution $\mathcal N(\varepsilon \sqrt d, d/8)$. The total variation distance between $\mathcal N(0, d/8)$ and $\mathcal N(\varepsilon \sqrt d, d/8)$ equals the total variation distance between $\mathcal N(0, 1)$ and $\mathcal N(\sqrt 8 \varepsilon, 1)$, which is $\Omega(\varepsilon)$ (see Lemma~\ref{lem:tvnormals} below). Hence, the total variation distance between $f_i$ and $f_j$ is also $\Omega(\varepsilon)$, as required. \begin{lemma}\label{lem:tvnormals} Let $\varepsilon \in [0,1]$. Then, \[ \| \mathcal N(0,1) - \mathcal N(\varepsilon,1) \|_1 \geq \varepsilon / 5 .\] \end{lemma} \begin{proof} \begin{align*} \| \mathcal N(0,1) - \mathcal N(\varepsilon,1) \|_1 & = \frac{2}{\sqrt{2\pi}} \int_{\varepsilon/2}^{\infty} e^{-(x-\varepsilon)^2/2} - e^{-x^2/2} dx\\ &= \frac{2}{\sqrt{2\pi}} \int_{\varepsilon/2}^{\infty} e^{-x^2/2} \left( e^{-\varepsilon^2/2+x\varepsilon}-1 \right) dx\\ &\geq \frac{2}{\sqrt{2\pi}} \int_{\varepsilon/2}^{\infty} e^{-x^2/2} \left(-\varepsilon^2/2+x\varepsilon \right) dx\\ &= \frac{-\varepsilon^2}{\sqrt{2\pi}} \int_{\varepsilon/2}^{\infty} e^{-x^2/2} dx + \frac{2\varepsilon}{\sqrt{2\pi}} \int_{\varepsilon/2}^{\infty} e^{-x^2/2} x dx\\ & = -\varepsilon^2 \mathbf{Pr}[N(0,1)\geq\varepsilon/2] + \frac{2\varepsilon}{\sqrt{2\pi}} e^{-(\varepsilon/2)^2/2} \\ & = \varepsilon \left( \frac{2 e^{-\varepsilon^2/8} }{\sqrt{2\pi}} - \varepsilon \mathbf{Pr}[N(0,1)\geq\varepsilon/2] \right) \geq \varepsilon/5, \end{align*} since $\mathbf{Pr}[N(0,1)\geq\varepsilon/2] \leq 1/2$ and $\varepsilon\in[0,1]$, completing the proof. \end{proof} We now describe the lower bound construction which gives a sample complexity lower bound of $\widetilde\Omega(kd^2/\varepsilon^2)$ for $\mathcal G_{d,k}$. This lower bound was proved in~\cite{ashtiani2017agnostic}. Again it suffices to give a lower bound of $\Omega(d^2/\varepsilon^2)$ for $\mathcal G_{d,1}$. Let $r = 9$ and $\lambda = \varepsilon \log(1/\varepsilon)/\sqrt{d}$. Guided by Corollary~\ref{cor:fano}, we will build $2^{\Omega(d^2)}$ Gaussian distributions of the form $f_a\coloneqq \mathcal N(0, \Sigma_a)$ where $\Sigma_a = I_d + \lambda U_a U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr$, where each $U_a$ is a $d\times d/r$ matrix with orthonormal columns. To apply Corollary~\ref{cor:fano}, we need to give an upper bound on the KL-divergence between any two $f_a$ and $f_b$, and a lower bound on their total variation distance. Upper bounding the KL divergence is easy: by the KL-divergence formula and since $\|U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr U_b\|_F^2\geq0$, \begin{align*} 2\DKL{f_a}{f_b} &= \tr(\Sigma_a^{-1}\Sigma_b - I) =\tr( (I - \frac{\lambda}{1+\lambda} U_a U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr) (I + \lambda U_b U_b^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr) - I)\\ & = \tr( \lambda U_b U_b^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr - \frac{\lambda}{1+\lambda} U_a U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr - \frac{\lambda^2}{1+\lambda}U_a U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr U_b U_b^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr ) \\ & = \lambda (d/r) - \frac{\lambda}{1+\lambda} (d/r) - \frac{\lambda^2}{1+\lambda} \|U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr U_b\|_F^2 \\ & \leq \frac{\lambda^2 d}{r+r\lambda} \leq \lambda^2 d / (2r)=O(\varepsilon^2 \log^2(1/\varepsilon)), \end{align*} as required. Our next goal is to give a lower bound on the total variation distance between $f_a$ and $f_b$. For this, we would like the matrices $\{U_a\}$ to be ``spread out,'' in the sense that their columns should be nearly orthogonal. It is possible to show that if we choose the $U_a$ randomly, we can achieve $\|U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr U_b \|_F^2 \leq \frac{d}{2r}$ for any $a\neq b$. Then, if $S_a$ is the subspace spanned by the columns of $U_a$, then we expect that a Gaussian drawn from $\mathcal N(0, \Sigma_a)$ should have a slightly larger projection onto $S_a$ then a Gaussian drawn from $\mathcal N(0, \Sigma_b)$. This will then allow us to give a lower bound on the total variation distance between $\mathcal N(0, \Sigma_a)$ and $\mathcal N(0, \Sigma_b)$. More precisely, one can show that $\|U_a^{\mathsf{T}}} %\DeclareMathOperator{\tr}{Tr U_b \|_F^2 \leq \frac{d}{2r}$ implies $\DTV{f_a}{ f_b} = \Omega\left( \frac{\lambda \sqrt{d}}{\log(1 / \lambda\sqrt{d})} \right) = \Omega(\varepsilon)$, completing the proof. We mentioned here just one lower bound technique based on Fano's inequality. There are at least two other methods for proving lower bounds, see~\cite{bin_yu}. \section{Concluding remarks} \label{sec:remarks} \textbf{Characterizing the sample complexity of a class.} An insight from supervised learning theory is that the sample complexity of learning a class (of concepts, functions, or distributions) must be proportional to the intrinsic dimension of the class divided by $\varepsilon^2$, where $\varepsilon$ is the error tolerance. (We would expect this dimension to be equal the number of parameters needed to describe an object in that class using its `natural' parametrization, or the `degrees of freedom' of an object in the class.) One challenge in learning theory is to formally define this dimension. For the case of binary classification, the intrinsic dimension is captured by the VC-dimension of the concept class (see~\cite{vc,Blumer:1989}). In the case of distribution learning/density estimation, a candidate for quantifying the dimension of a class, is the VC-dimension of its Yatrocas class. However, it is not hard to come up with examples where this VC-dimension is infinite while the class can be learned with finite samples. A second candidate is using covering numbers. This method also does not work; for instance, the class of Gaussians do not have a finite covering number, yet its sample complexity is finite. We showed in Section~\ref{sec:compression} that if a class of distribution has a compression scheme of size $D$, then its sample complexity is $D/\varepsilon^2$, up to logarithmic factors. Hence, the size of the smallest compression is one candidate for capturing the intrinsic dimension of a distribution class. As we have shown here, for high-dimensional Gaussians and their mixtures, the smallest compression size captures the sample complexity up to logarithmic factors (and it is also equal to the number of parameters needed to describe a distribution in the class using the mean and the covariance matrix). It is an intriguing open question whether distribution learning and compressibility are equivalent (such a statement has recently been shown to be true in the setting of binary classification~\cite{Moran:2016}). \paragraph{\textbf{Robust density estimation, or agnostic learning}.} We have assumed that the target belongs to the prescribed class of distributions. In practice, this is rarely the case. Fortunately, it turns out that all the methods we discussed here can be extended to the case where the target is not necessarily in the class, but is \emph{close} (in total variation distance) to some member of this class, albeit with some loss in the approximation error. An example of a guarantee that can be given in this setting is Equation~(\ref{agnostic}). We refer the reader to the relevant papers for details. \paragraph{\textbf{Discrete distributions and covering numbers.}} We have focused on continuous distributions in this survey. Learning discrete distributions is a whole other world and many exciting techniques have been developed for those classes. One important technique is finding an $\varepsilon$-net for the target class and then applying Theorem~\ref{thm:candidates}. See~\cite{Diakonikolas2016} and the references therein. \paragraph{\textbf{Kernel density estimation.}} A popular method for density estimation in practice is kernel density estimation (see, e.g., \cite[Chapter~9]{devroye_book}). The few proven convergence rate results for this method, require certain smoothness assumptions on the class of densities (e.g., \cite[Theorem~9.5]{devroye_book}). The class of Gaussians is not universally Lipschitz and do not satisfy these assumptions, so these results do not apply. Indeed we believe that any kernel-based method for learning a high dimensional Gaussian must have sample complexity exponential in the dimension, but this is yet to be proved. \paragraph{\textbf{Variants of the problem.}} There are many natural and important variants of the problems presented above. What if instead of the $L_1$ distance, we consider the KL-divergence, or the $L_2$ distance, as the measure of closeness? The $L_1$ results do not carry over immediately, and several new ideas are needed. Also, in practice the i.i.d.\ assumption is not realistic, and an interesting direction is to extend the above results to settings where some correlation among the input data points is possible. \paragraph{\textbf{Computational complexity.}} Designing efficient algorithms for distribution learning is crucial for practical applications; the sample complexity does not always capture the computational difficulty. While we have totally ignored computational issues in this survey for brevity, a whole complexity theory can be developed around the task of distribution learning: which classes are `easy' to learn, and which ones are hard? We refer the reader to~\cite{gaussian_mixture} and the references therein. \paragraph{\textbf{Parameter estimation.}} In \emph{parameter estimation}, which has been greatly popular in the theoretical computer science community recently (see, e.g.,~\cite{dasgupta1999learning,Belkin,moitravaliant}), the goal is to identify the `parameters' of the target distribution, for example, the mixing weights and the parameters of the Gaussians, up to a desired accuracy. Parameter estimation is a more difficult problem than density estimation, and any algorithm for parameter estimation requires some separability assumptions for the target Gaussians, whereas for density estimation no such assumption is needed. E.g., consider the case that $k = 2$ and the two components are identical; then there is no way to learn their mixing weights.
\section{Introduction} Let $G=(V(G),E(G))$ be a simple connected graph, where $V(G)$ and $E(G)$ represent the sets of vertices and edges, respectively. The Randi\' c index \cite{r} introduced in 1975, is defined as follows: \[R(G)=\sum_{uv\in E(G)}(d(u)d(v))^{-1/2},\] where $d(v)$ is the degree of the vertex $v$ in $G$.\\ Li et al. proposed the general Randi\' c index by replacing the exponent $-1/2$ by an arbitrary real number $\alpha$. This index is defined as \[R_{\alpha}(G)=\sum_{uv\in E(G)}(d(u)d(v))^{\alpha}.\] The zeroth-order Randi\' c index, defined by Kier et al. \cite{kh}, is \[^0R_{-1/2}(G)=\sum_{v\in V(G)}{d(v)}^{-1/2}.\] The first Zagreb index was introduced by Gutman et al. in 1972 \cite{grt} and it is defined as \[^0R_{2}(G)=\sum_{v\in V(G)}{d(v)}^{2}.\] The common generalization of the first Zagreb index and the zeroth-order Randi\' c index was made by Li et al. \cite{lz1}. He proposed the zeroth-order general Randi\' c index $^0R_{\alpha}$ by \[^0R_{\alpha}(G)=\sum_{v\in V(G)}{d(v)}^{\alpha}.\] The above mentioned topological indices have been closely correlated with many physical and chemical properties of the molecules such as boiling point, calculated surface, molecular complexity, heterosystems, chirality, e.g. More information on these indices can be obtained from \cite{gja,hly,hly1,kh1,kh2,pl}.\\ A graph $G$ is called a quasi-tree, if there exists a vertex $z\in V(G)$ such that $G-z$ is a tree and such a vertex is called a quasi vertex. As deletion of any vertex with degree one will deduce another tree it follows that any tree is a quasi tree. A graph $G$ is called $k$-generalized quasi tree if there exists a subset $V_k\subset V(G)$ with cardinality $k$ such that $G-V_k$ is a tree but for any subset $V_{k-1}\subset V(G)$ with cardinality $k-1$, $G-V_{k-1}$ is not a tree. The vertices of $V_k$ are also called quasi vertices (or $k$-quasi vertices). To draw a $k$-generalized quasi tree we need at least $k+2$ vertices. We call any tree a trivial quasi tree and other quasi trees are called non-trivial quasi trees. We denote the class of $k$-generalized quasi trees of order $n$ by $T_k(n)$.\\ All graphs considered in this paper are undirected, finite, simple and connected. For terminology and notation not defined here we refer \cite{bm}. Let $G$ and $H$ be two vertex disjoint graphs. $G+H$ denotes the join graph of $G$ and $H$ with vertex set $V(G+H)=V(G)\cup V(H)$ and the edge set $E(G+H)=E(G)\cup E(H)\cup \{uv|v\in V(G),v\in V(H)\}$. $ S_n$ and $P_n$ represent the star and the path of order $ n $, respectively. $S_{p,q}(u,v)$ denotes the bistar of order $p+q$, which is a tree consisting of two adjacent vertices $u$ and $v$, such that $u$ is adjacent to $p-1$ pendant vertices and $q$ is adjacent to $q-1$ pendant vertices. If $G$ and $H$ are vertex disjoint graphs and $u,v\in V(H)$, $G\bullet _{u,v}H$ represents the graph having vertex set $V(G)\cup V(H)$ obtained by joining every vertex of $G$ to vertices $u$ and $v$ of $H$.\\ Akhter et al. \cite{ajt} found the extremal first and second Zagreb indices of $k$-generalized quasi trees. Qiao \cite{q} determined the extremal $k$-generalized quasi trees, for $k=1$, with the minimum and maximum values of the zeroth-order general Randi\' c index. In this paper, we characterize the extremal $k$-generalized quasi trees of order $n$ with the maximum and minimum values of the zeroth-order general Randi\' c index for $\alpha\neq 0$. Our results extend the results of Akhter and Qiao. \section{Results and Discussion} In this section, first we will discuss some auxiliary lemmas which will be helpful to prove main results. \begin{lemma}{\rm \cite{lz}}\label{z} Among all trees with $n$ vertices, the trees with extremal zeroth-order general Randi\' c index are listed in the following table: \begin{table}[h!] \begin{tabular}{c|c|c} & $\alpha <0$ or $\alpha >1$ &$0< \alpha <1$\\ \hline minimum & the path $P_n$ & the star $S_n$\\ \hline second minimum&trees with $[3,2^{n-4},1^3]$&the double star $S_{n-2,2}$\\ \hline third minimum & trees with $[3^2,2^{n-6},1^4]$& the double star $S_{n-3,3}$\\ \hline maximum& the star $S_n$& the path $P_n$\\ \hline second maximum&the double star $S_{n-2,2}$& trees with $[3,2^{n-4},1^3]$ \\ \hline third maximum& the double star $S_{n-3,3}$& trees with $[3^2,2^{n-6},1^4]$\\ \hline \end{tabular} \end{table} \end{lemma} \begin{lemma}\label{max} If $u,v\in V(G)$ such that $uv\notin E(G)$, then for\\ $\alpha<0$ \[^0R_{\alpha}(G+uv)<{^0R}_{\alpha}(G), \] and for $ \alpha>0$ \[^0R_{\alpha}(G+uv)>{^0R}_{\alpha}(G).\] \end{lemma} \begin{lemma}\label{deg} Let $G\in T_k(n)$. If $^0R_{\alpha}(G)$ is minimum $($maximum$)$ and $z$ is a quasi vertex of G, then $d(z)=n-1$ for $\alpha<0$ $(\alpha>0, respectively)$. \end{lemma} \begin{proof} Let $G\in T_k(n)$, $^0R_{\alpha}(G)$ be minimum (maximum) and $z$ be a quasi vertex of $G$. Suppose on contrary $d(z)<n-1$, then there is a vertex $x\in V(G)$ such that $xz\notin E(G)$. Now $G+xz$ is also in $T_k(n)$ and $^0R_{\alpha}(G+xz)<^0R_{\alpha}(G)$ for $\alpha <0$ ($^0R_{\alpha}(G+xz)>^0R_{\alpha}(G)$ for $\alpha >0$), a contradiction, hence $d(z)=n-1$. \end{proof} \begin{lemma}\label{f} Let $f(x)=x^{\alpha}-(x+1)^{\alpha}$, where $x>0$. $f(x)$ is strictly increasing for $0<\alpha <1$ and strictly decreasing for $\alpha<0$ or $\alpha >1$. \end{lemma} \begin{lemma}\label{trans} Let $G$ be a graph, and $u,v$ and $w$ be three vertices of $G$ such that $uw\notin E(G)$, $vw\in E(G)$ and $d(u)\geq d(v)$. Let $G'=G+uw-vw$. If $\alpha<0$ or $\alpha >1$ then $^0R_{\alpha}(G')>^0R_{\alpha}(G)$ and if $0<\alpha <1$ then $^0R_{\alpha}(G')<^0R_{\alpha}(G).$ \end{lemma} \begin{proof} Let $d(u)=x$ and $d(v)=y$. We obtain $^0R_{\alpha}(G')-^0R_{\alpha}(G)=(x+1)^{\alpha}+(y-1)^{\alpha}-x^{\alpha}-y^{\alpha}=f(y-1)-f(x)$, where $f(x)=x^{\alpha}-(x+1)^{\alpha}$. $f(x)$ is a strictly decreasing function for $x>0$ and $\alpha<0$ or $\alpha >1$. Since $y-1<x$ it follows that $^0R_{\alpha}(G') > ^0R_{\alpha}(G)$. If $0<\alpha <1$ the proof is similar. \end{proof} \begin{lemma}\label{d2} Let $G\in T_k(n)$. If $^0R_{\alpha}(G)$ is maximum $($minimum$)$ then there exists a spanning subgraph $H$ of $G$ such that $^0R_{\alpha}(G)\le ^0R_{\alpha}(H)$ $( ^0R_{\alpha}(G)\ge \\ ^0R_{\alpha}(H))$ and for any quasi vertex $z$ of G we have $d_{G}(z)\ge d_{H}(z)=2$ and $z$ is adjacent in $H$ to other two vertices which are not quasi vertices for $\alpha<0$ $(\alpha>0, respectively)$. \end{lemma} \begin{proof} By definition of a $k$-generalized quasi tree, there exists a subset $X\subset V(G)$ of cardinality $k$ such that $G-X$ is a tree and for any $Y\subset V(G)$ and $|Y|<k$, $G-Y$ is not a tree. It follows that $d(z)\ge 2$ for any vertex $z\in X$. If $m$ denotes the number of edges of $G$, then $m\ge 2k+n-k-1=n+k-1$ and equality holds if and only if $d(z)=2$ for any vertex $z\in X$ and no two vertices in $X$ are adjacent. By Lemma \ref{max}, by deleting some edges it follows the existence of the graph $H$, which is not necessarily in $T_k(n)$. \end{proof} \begin{lemma}\label{aq} Let $n,x_i (1\leq i\leq n),p,m\ge 1$ be integers, $\alpha$ be any real number such that $\alpha\notin \{0,1\}$ and $x_1+x_2+\cdots+x_n=p$. \\ {\rm a)}The function $f(x_1,x_2,\ldots,x_n;p)=\sum_{i=1}^{n}x_i^{\alpha}$ is minimum for $\alpha<0$ or $\alpha >1$ $($maximum for $0<\alpha<1$, respectively$)$ if and only if $x_1,x_2,\ldots,x_n$ are almost equal, or $|x_i-x_j|\le1$ for every $i,j=1,2,\ldots,n$. \\ {\rm b)}If $x_1\geq x_2 \geq m$, the maximum of the function $f(x_1,\ldots ,x_n)$ is reached for $\alpha<0$ or $\alpha >1$ $($minimum for $0<\alpha<1$, respectively$)$ only for $x_1=p-m-n+2, x_2=m,x_3=x_4=\ldots =x_n=1$. The second maximum $($the second minimum, respectively$)$ is attained only for $x_1=p-m-n+1, x_2=m+1,x_3=x_4=\ldots =x_n=1$. \end{lemma} \begin{proof} We shall consider only the case $\alpha <0$ or $\alpha >1$, the proof in the other case being similar.\\ a) The function $f(x)=x^{\alpha}-(1+x)^{\alpha}$ is a strictly decreasing function for $x>0$ and $\alpha>1$ or $\alpha <0$. If $x\geq y+2>0$ we deduce $x-1>y$, which implies $f(x-1)<f(y)$, or $x^{\alpha}+y^{\alpha}>(x-1)^{\alpha}+(y+1)^{\alpha}$. It follows that $f(x_1,x_2,\cdots,x_n;p)=\sum_{i=1}^{n}x_i^{\alpha}$ is minimum if and only if $x_1,x_2,\ldots,x_n$ are almost equal.\\ b) If $x\geq y\geq 2$ then $x>y-1$, which implies $f(y-1)>f(x)$, or $(x+1)^{\alpha}+(y-1)^{\alpha}>x^{\alpha}+y^{\alpha}$. \end{proof} \section{Case $\alpha<0$} \begin{thm} Let $G\in T_k(n)$, where $k\geq 1$ and $n\ge 3$. For $\alpha<0$ we have \[^0R_{\alpha}(G)\ge k(n-1)^{\alpha}+2(k+1)^{\alpha}+(n-k-2)(k+2)^{\alpha}\] and equality holds if and only if $G=K_k+P_{n-k}$. \end{thm} \begin{proof} Suppose that $G\in T_k(n)$ has minimum $^0R_{\alpha}(G)$. Let $V_k\subset V(G)$ be the set of $k$-quasi vertices. As $^0R_{\alpha}(G+uv)<^0R_{\alpha}(G)$ for any $uv\notin E(G)$, this implies that $V_k$ forms a complete graph in $G$. Then by Lemma \ref{deg} we have $G=K_k+T_{n-k}$, where $T_{n-k}$ is a tree of order $n-k$. We can write: \begin{align*} ^0R_{\alpha}(G)&=^0R_{\alpha}(K_k+T_{n-k})\\ &=\sum_{v\in V(K_k)}(d(v)+n-k)^{\alpha}+ \sum_{v\in V(T{n-k})}(d(v)+k)^{\alpha}\\ &=k(n-1)^{\alpha}+ \sum_{v\in V(T_{n-k})}(d(v)+k)^{\alpha}. \end{align*} We get $$\sum_{v\in V(T_{n-k})}(d(v)+k)=2(n-k-1)+k(n-k).$$ By Lemma \ref{aq}, $\sum_{v\in V(T{n-k})}(d(v)+k)^{\alpha}$ is minimum if and only if the degrees of $T_{n-k}$ are almost equal. Since every tree has at least two vertices of degree one, it follows that the minimum of this sum is reached if and only if $T_{n-k}$ has two vertices of degree one and $n-k-2$ vertices of degree 2, or $T_{n-k}=P_{n-k}$. Finally, \[ ^0R_{\alpha}(G) \ge k(n-1)^{\alpha}+2(k+1)^{\alpha}+(n-k-2)(k+2)^{\alpha}.\] Equality holds if and only if $G=K_k+P_{n-k}$. \end{proof} \begin{thm} Let $G\in T_k(n)$, where $n\ge 3$ and $k\geq 1$. If $\alpha<0$ we have:\\ {\rm a)} If $k=1$ then \[^0R_{\alpha}(G)\le (n-1)^{\alpha}+2^{\alpha+1}+n-3\] and equality holds if and only if $G={K_1}\bullet _{u,v}S_{n-1}$, where $u$ is the center of $S_{n-1}$ and $v$ is a pendant vertex of $S_{n-1}$.\\ {\rm b)} If $n\ge 4$ and $k\geq 2$ then \[^0R_{\alpha}(G)\le (n-2)^{\alpha}+k2^{\alpha}+(k+2)^{\alpha}+n-k-2\] and equality holds if and only if $G=\overline{K_k}\bullet _{u,v}S_{n-k-2,2}(u,v)$, where $u$ and $v$ are vertices of degree $n-k-2$ and $2$ of $S_{n-k-2,2}(u,v)$, respectively. \end{thm} \begin{proof} Suppose that $G\in T_k(n)$ has maximum $^0R_{\alpha}(G)$. Let $V_k\subset V(G)$ be the set of $k$-quasi vertices. The graph $G-V_k$ is a tree of order $n-k$, denoted by $T_{n-k}$. As $^0R_{\alpha}(G-uv)>^0R_{\alpha}(G)$ for any $uv\in E(G)$, and by Lemmas \ref{trans} and \ref{d2} we deduce the existence of a graph $F$ with $V(F)=V(G)$, $ ^0R_{\alpha}(G)\le ^0R_{\alpha}(F)$ and such that in $F$ we have: $V_k$ forms an empty graph, i.e., it induces $\overline{K_k}$, every quasi vertex of $G$ has degree 2 and quasi vertices have common neighbors $y_1,y_2\in V(G)$, where $y_1$ is a vertex of maximum degree in $T_{n-k}$ and $y_2$ is a vertex of maximum degree in $T_{n-k}-y_1$. We can represent the graph $F$ as $F=\overline{K_k}\bullet _{y_1,y_2} T_{n-k}$. We deduce: $$^0R_{\alpha}(F)= ^0R_{\alpha}(\overline{K_k}\bullet _{y_1,y_2}T_{n-k})=\sum_{v\in V(\overline{K_k}\bullet _{y_1,y_2}T_{n-k})}d(v)^{\alpha}$$ $$=\sum_{v\in V(\overline{K_k})}d(v)^{\alpha}+ \sum_{v\in V(T{n-k})\hfill \atop v\ne y_1, v\ne y_2 } d(v)^{\alpha}+ (d(y_1)+k)^{\alpha} + (d(y_2)+k)^{\alpha}.$$ We have $$ \sum_{v\in V(T{n-k})\hfill \atop v\ne y_1, v\ne y_2 } d(v)+ d(y_1)+k + d(y_2)+k=2n-2.$$ By Lemma \ref{aq}, the sum \begin{equation} \sum_{v\in V(T{n-k})\hfill \atop v\ne y_1, v\ne y_2 } d(v)^{\alpha}+ (d(y_1)+k)^{\alpha} + (d(y_2)+k)^{\alpha} \end{equation} is maximum only if $T_{n-k}=S_{n-k}$ and $y_1$ and $y_2$ are the center and a pendant vertex of $S_{n-k}$, respectively. For $k=1$ this graph is a $k$-generalized quasi-tree, but for $k\ge 2$ this property is no longer valid. We must consider the second maximum of (1). This time $F\in T_k(n), G=F$ and $T_{n-k}=S_{n-k-2,2}(u,v)$, $y_1=u$ and $y_2=v$. The conclusion follows. \end{proof} \section{Case $\alpha \ge1$} \begin{thm} Let $G\in T_k(n)$, $k\geq 1$ and $n\ge 3$, then for $\alpha =1$ \[2(n+k-1)\le ^0R_{\alpha}(G)\le 2n(k+1)-k(k+3)-2. \] Left equality holds if and only if $G$ consists of $\overline{K_k}$, a tree $T_{n-k}$ of order $n-k$, every vertex of $\overline{K_k}$ being adjacent to two arbitrary vertices of $T_{n-k}$ such that the resulting graph belongs to $T_k(n)$ and the right equality holds if and only if $G=K_k+T_{n-k}$. \end{thm} \begin{proof} For $\alpha=1$ we have $^0R_{\alpha}(G)=\sum_{v\in V(G)}d(v)=2|E(G)|\ge 2(n+k-1)$ and equality holds if and only if the degree of every quasi vertex is two. Hence, the left hand inequality.\\ Similarly, $|E(G)|$ is maximum only if $G=K_k+T_{n-k}$ and the right hand inequality follows. \end{proof} \begin{thm} Let $G\in T_k(n)$ and $k\geq 1$, $n\ge 3$, $\alpha>1$ then \[(n-2k+2)2^{\alpha}+(2k-2)3^{\alpha}\le^0R_{\alpha}(G)\le (k+1)(n-1)^{\alpha}+(n-k-1)(k+1)^{\alpha}.\] The upper bound is an equality if and only if $G=K_k+S_{n-k}$. \end{thm} \begin{proof} Suppose that $G\in T_k(n)$ has maximum $^0R_{\alpha}(G)$. Let $V_k\subset V(G)$ be the set of $k$-quasi vertices. As $^0R_{\alpha}(G+uv)>^0R_{\alpha}(G)$ for any $uv\notin E(G)$, this implies that $V_k$ induces a complete subgraph in $G$. Then by Lemma \ref{deg} we have $G=K_k+T_{n-k}$, where $T_{n-k}$ is a tree of order $n-k$. It follows that: \begin{align*} ^0R_{\alpha}(G)&= {^0}R_{\alpha}(K_k+T_{n-k})\\ &=\sum_{v\in V(K_k)}(d(v)+n-k)^{\alpha}+ \sum_{v\in V(T_{n-k})}(d(v)+k)^{\alpha}\\ &=k(n-1)^{\alpha}+ \sum_{v\in V(T_{n-k})}(d(v)+k)^{\alpha}\\ &\le (k+1)(n-1)^{\alpha}+(n-k-1)(k+1)^{\alpha}. \end{align*} By Lemma \ref{aq} the upper bound is an equality if and only if $T_{n-k}=S_{n-k}$, i.e., $G=K_k+S_{n-k}$. \par Suppose now that $^0R_{\alpha}(G)$ is minimum. By Lemma \ref{d2} there exists a spanning subgraph $H$ of $G$ such that $ ^0R_{\alpha}(G)\ge ^0R_{\alpha}(H)$ and every quasi vertex $z$ has $d_{H}(z)=2$, being adjacent in $H$ to two vertices which are not quasi vertices, which implies that $\sum _{v\in V(G)}d_{H}(v)=2(n+k-1).$ By Lemma \ref{aq} $ ^0R_{\alpha}(H)$ is minimum if the degrees of $H$ are almost equal. We deduce that in this case the degrees of $H$ are equal to 2 or to 3. By denoting $n_i$ the number of vertices having degree $i$ we can write $2n_2+3(n-n_2)=2n+2k-2$, which implies $n_2=n-2k+2$ and $n_3=n-n_2=2k-2$ and yields the lower bound. Consequently, the minimum of $^0R_{\alpha}(G)$ is reached if and only if there exist $n-2k+2$ vertices (including quasi vertices) of degree $2$ and $2k-2$ vertices of degree $3$ (in this case $H=G$). Such a graph is illustrated in Fig. \ref{fig}. Note that for $k=1$ we have $n_2=n$ and $n_3=0$, hence $G=C_n$, the cycle with $n$ vertices. \end{proof} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{fig} \caption{k-generalized quasi tree with almost equal vertices degree.} \label{fig} \end{figure} \section{Case $0<\alpha<1$} By similar methods as in preceding sections we can deduce the extremal values of $^0R_{\alpha}(G)$ for $0<\alpha <1$ as follows: \begin{thm} Let $G\in T_k(n)$, $k\geq 1$ and $n\ge 3$. If $0<\alpha<1$ then \[ ^0R_{\alpha}(G)\le k(n-1)^{\alpha}+2(k+1)^{\alpha}+(n-k-2)(k+2)^{\alpha}.\] Equality holds if and only if $G=K_k+P_{n-k}$. \end{thm} \begin{thm} Let $G\in T_k(n)$, where $n\ge 3$ and $k\geq 1$. If $0<\alpha<1$ we have:\\ {\rm a)} If $k=1$ then \[^0R_{\alpha}(G)\ge (n-1)^{\alpha}+2^{\alpha+1}+n-3\] and equality holds if and only if $G={K_1}\bullet _{u,v}S_{n-1}$, where $u$ is the center of $S_{n-1}$ and $v$ is a pendant vertex of $S_{n-1}$.\\ {\rm b)} If $n\ge 4$ and $k\geq 2$ then \[^0R_{\alpha}(G)\ge (n-2)^{\alpha}+k2^{\alpha}+(k+2)^{\alpha}+n-k-2\] and equality holds if and only if $G=\overline{K_k}\bullet _{u,v}S_{n-k-2,2}(u,v)$, where $u$ and $v$ are vertices of degree $n-k-2$ and $2$ of $S_{n-k-2,2}(u,v)$, respectively. \end{thm} \vspace{1.5cm} {\bf References}
\section{Introduction} Tracing the distribution of dust and volatiles in protoplanetary disks is key for guiding models of planet formation. Disk observations may be useful for constraining the formation locations of planets \citep[e.g.][]{2011ApJ...743L..16O, 2014ApJ...785..122Z, 2015ApJ...809...93D}, the mechanisms by which the dust and gas distributions in disks evolve to form planets and planetesimals \citep[e.g.][]{2012ApJ...760L..17P, 2015ApJ...813L..14B, 2015AA...579A.106V}, and the abundances of volatiles that will eventually be incorporated into planetary atmospheres \citep[e.g.][]{2016MNRAS.461.3274C, 2016AA...595A..83E,2016ApJ...831L..19O}. Millimeter/submillimeter interferometry plays a fundamental role in characterizing disk structures due to the high spatial resolution and sensitivity that can be achieved for observations of both dust and molecular emission. Observations of the millimeter continuum, which is dominated by thermal emission from millimeter-sized grains, can test models of grain growth and transport \citep[e.g.][]{2010AA...516L..14B,2010AA...512A..15R, 2011AA...529A.105G, 2012ApJ...744..162A}. CO is often targeted simultaneously with continuum observations; as an abundant and easily observable molecule, CO is used to infer fundamental properties such as gas masses and temperatures \citep[e.g.][]{2003AA...399..773D, 2013ApJ...774...16R, 2014ApJ...788...59W}. In addition, since CO is the primary gas-phase carbon reservoir in disks, characterizing its distribution is also pertinent to predicting the abundances and distribution of many other species that are major components of the gas and ice incorporated into planets and planetesimals \citep[e.g.][]{1999AA...351..233A, 2015AA...579A..82R}. Due to its proximity, relative isolation, bright emission, and nearly face-on orientation, the TW Hya disk (J2000 R.A. 11h01m51.905s, Decl. -34d42m17.03s) has long served as a template for protoplanetary disks, spurring the development of techniques, models, and lines of inquiry that have since been extended to other sources \citep[e.g.][]{2002ApJ...568.1008C, 2003AA...400L...1V, 2004ApJ...616L..11Q, 2013Sci...341..630Q, 2013Natur.493..644B}. TW Hya is a 10 Myr old K6 star in the TW Hydrae association lying 59.5 pc away from Earth \citep[e.g.][]{1997Sci...277...67K, 1999ApJ...512L..63W, 2006AA...460..695T, 2013ApJ...762..118W, 2016AA...595A...2G}. Intriguingly, recent observations have revealed concentric rings and gaps in millimeter/submillimeter continuum emission tracing the distribution of large dust grains near the midplane \citep{2016ApJ...820L..40A, 2016ApJ...829L..35T}, scattered light observations tracing the distribution of small dust grains in the upper layers of the disk \citep[e.g.][]{2013ApJ...771...45D, 2015ApJ...802L..17A, 2015ApJ...815L..26R, 2017ApJ...837..132V}, and molecular line emission \citep[e.g.][]{2016ApJ...819L...7N, 2016ApJ...823...91S, 2017ApJ...835..228T}. The origins of these features and their relationships to one another are not yet definitively established. Embedded planets, molecular snowlines, structured magnetohydrodynamic turbulence, and photoevaporation are often invoked as hypotheses to explain the types of features observed in the TW Hya disk (see aforementioned references and, e.g., \citealt{2015AA...574A..68F, 2015ApJ...806L...7Z, 2017ApJ...843..127D, 2017MNRAS.464L..95E}). To place additional constraints on the dust and CO distributions in the TW Hya disk, we analyze new high angular resolution ALMA observations of the $^{12}$CO $J=3-2$ transition, as well as a spectral index map produced from archival 1.3 mm and 870 $\mu$m continuum observations. The data reduction is described in Section 2. The observed line and continuum emission are described in Section \ref{sec:results}, and radiative transfer modeling of the $^{12}$CO data is presented in Section \ref{sec:models}. We provide a discussion in Section \ref{sec:discussion} and a summary in Section \ref{sec:summary}. \section{Observations and Data Reduction}\label{sec:observations} \subsection{Continuum Reduction} We reprocessed and combined archival 1.3 mm (Band 6) and 870 $\mu$m (Band 7) continuum data from six ALMA programs. The raw data from programs 2013.1.00114.S, 2013.1.00198.S, and 2015.1.00686.S were calibrated by National Radio Astronomical Observatory (NRAO) staff, and the raw data from programs 2013.1.00387.S, 2015.A.00005.S, and 2013.1.01397.S were downloaded from the ALMA archive and calibrated in \texttt{CASA} \citep{2007ASPC..376..127M} using the accompanying reduction scripts. Table \ref{tab:settings} summarizes the observation setups. Bright quasars were used for bandpass and phase calibration, and either a solar system object (using the Butler-JPL-Horizons 2012 model) or a bright quasar was used for amplitude calibration. Table \ref{tab:fluxcal} lists calibrator details. Additional calibration and imaging were performed with \texttt{CASA 4.5.3}. After flagging channels displaying strong line emission and data with anomalous amplitudes or phases, the line-free channels were spectrally averaged to form continuum visibility datasets. Data from the four programs observed with compact antenna configurations (2013.1.00114.S, 2013.1.00198.S, 2013.1.00387.S, and 2013.1.01397.S) were first individually imaged and phase self-calibrated. The continuum fluxes from the self-calibrated images were within 5\% of one another within each band (measured within a 2\farcs5 diameter region in the images to be $\approx0.58$ and $\approx1.4$ Jy for Bands 6 and 7, respectively), which is compatible with the estimated 10\% systematic flux calibration uncertainty of ALMA in these bands. Since the high-resolution datasets (2015.1.00686.S and 2015.A.00005.S) only had a few baselines at $uv$ distances below 200 k$\lambda$, the amplitudes of these visibilities were compared directly with those from the short-baseline datasets to check for consistency at corresponding $uv$ distances. Because of the relatively large proper motion of TW Hya, the \texttt{fixvis} and \texttt{fixplanets} tasks in \texttt{CASA} were used to shift the datasets to a common phasecenter. A high-resolution 1.3 mm continuum image was produced by combining the data from the three Band 6 programs and applying the multi-scale multi-frequency synthesis algorithm \citep{2008ISTSP...2..793C}, as implemented in the \texttt{clean} task. Briggs weighting (robust $=0.5$) and scales of $0''$, 0$\farcs$06, 0$\farcs$15, 0$\farcs$3, and 0$\farcs$6 were used. This generated a source model used to phase self-calibrate the data together. A similar self-calibration and imaging procedure was applied to the Band 7 data. The self-calibrated 870 $\mu$m and 1.3 mm continuum images were used to check for consistency with the images published in \citet{2016ApJ...820L..40A} and \citet{2016ApJ...829L..35T}, which used the same long-baseline data and some of the same short-baseline data. The two continuum images and the deprojected, azimuthally averaged radial brightness temperature profiles are shown in Appendix B. The self-calibrated 870 $\mu$m and 1.3 mm continuum datasets were then imaged together with the \texttt{clean} task's implementation of multi-term multi-frequency synthesis \citep{2011AA...532A..71R} with $nterms = 2$ and a Briggs robust parameter of 0. In brief, the imaging algorithm uses a first-order Taylor expansion to model the source intensity as a function of frequency, i.e., \begin{equation} I_\nu = I_{\nu_0}\left(\frac{\nu}{\nu_0}\right)^\alpha\approx I_{\nu_0}\left(1+\alpha \left( \frac{\nu-\nu_0}{\nu_0}\right)\right). \end{equation} This procedure takes advantage of the additional $uv$ coverage offered by wide-band imaging to produce a higher-fidelity continuum image compared to imaging the Band 6 or Band 7 data individually. In addition, simultaneously fitting for the spectral index $\alpha$ during the deconvolution process also reduces the influence of imaging artifacts that would arise from computing the spectral index from the Bands 6 and 7 images individually. The combined continuum image is at a frequency of 290 GHz. The synthesized beam is $37\times26$ mas (2.2 $\times$ 1.5 AU), with a position angle of 73$\fdg$7. The rms measured in a signal-free portion of the image is 20 $\mu$Jy beam$^{-1}$. The spectral index is computed only for pixels where the intensity image exceeds 0.1 mJy beam$^{-1}$ (5 $\times$ the rms noise). \begin{deluxetable*}{ccccccccc} \tabletypesize{\scriptsize} \tablecaption{ALMA Observation Summary\label{tab:settings}} \tablehead{ \colhead{Program} &\colhead{P.I.}& \colhead{Ref.}&\colhead{Date} &\colhead{Freq. range}&\colhead{Antennas}&\colhead{Baselines} &\colhead{On-source}&\colhead{Notes}\\ \colhead{}& \colhead{} &\colhead{}&\colhead{}& \colhead{(GHz)}&\colhead{} & \colhead{(m)} &\colhead{time (min)}} \colnumbers \startdata \multicolumn{9}{c}{Band 6 Observations} \\ \hline \dataset[2013.1.00114.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.00114.S}&K. I. \"Oberg&1, 2 &2014 July 19&225.650\textendash242.015&32&34\textendash650&43&Continuum\\ \dataset[2013.1.00387.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.00387.S}&S. Guilloteau&3&2015 May 13 &226.617\textendash244.940& 36 & 21\textendash558 &46& Continuum\\ \dataset[2015.A.00005.S]{https://almascience.nrao.edu/aq/?project\_code=2015.A.00005.S}&T. Tsukagoshi&2&2015 Dec. 1&223.007\textendash242.992&35&17\textendash10804&39& Continuum\\ \hline \multicolumn{9}{c}{Band 7 Observations} \\ \hline \dataset[2012.1.00422.S]{https://almascience.nrao.edu/aq/?project\_code=2012.1.00422.S}& E. A. Bergin &4&2015 May 14&330.304\textendash330.539\tablenotemark{a}& 37 & 21\textendash558&20&$^{13}$CO\\ \dataset[2013.1.00196.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.00196.S}& P. Hily-Blant &-&2014 Dec. 24&330.595\textendash330.653\tablenotemark{a}& 40 & 15\textendash349&38&$^{13}$CO\\ &&&2015 April 04 &330.540\textendash 330.599\tablenotemark{a}&38&15\textendash328&75\\ \dataset[2013.1.00198.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.00198.S}& E. A. Bergin &5, 6&2014 Dec. 31&337.353\textendash352.011& 34 & 15\textendash349&15& Continuum\\ &&&2015 June 15 &337.299\textendash 352.192&36&21\textendash784&30\\ \dataset[2013.1.01397.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.01397.S}&D. Ishimoto&7&2015 May 19&329.236\textendash342.904&35&21\textendash539&27& $^{13}$CO + Continuum\\ &&&2015 May 20&329.236\textendash342.904&39&21\textendash 539&27\\ \dataset[2015.1.00686.S]{https://almascience.nrao.edu/aq/?project\_code=2015.1.00686.S}&S. M. Andrews&8&2015 Nov. 23&345.492\textendash358.057&36&23\textendash8259&41& $^{12}$CO + Continuum\\ &&&2015 Nov. 30&345.494\textendash358.059&31&27\textendash10804&43\\ &&&2015 Dec. 1&345.494\textendash358.059&34&17\textendash10804&43\\ \dataset[2016.1.00629.S]{https://almascience.nrao.edu/aq/?project\_code=2016.1.00629.S}& L. I. Cleeves & - & 2016 Dec. 30&345.780\textendash345.839\tablenotemark{a}&45&15\textendash 460&33 & $^{12}$CO\\ &&&2016 Dec. 30 &345.780\textendash345.839\tablenotemark{a}& 45 & 15\textendash 460 & 18\\ &&&2017 July 4 &345.726\textendash345.785\tablenotemark{a}& 44 & 21\textendash 2600 & 44\\ &&&2017 July 9 &345.726\textendash345.785\tablenotemark{a}& 42 & 17\textendash 2600 & 44\\ &&&2017 July 14 &345.727\textendash345.787\tablenotemark{a}& 42 & 19\textendash 1500 & 44\\ &&&2017 July 20 &345.728\textendash345.787\tablenotemark{a}& 42 & 17\textendash 3700 & 44\\ &&&2017 July 21 &345.728\textendash345.787\tablenotemark{a}& 42 & 17\textendash 3700 & 44\\ \enddata \tablerefs{(1) \citet{2016ApJ...823L..10W}; (2) \citet{2016ApJ...829L..35T}; (3) \citet{2016AA...592A..49T}; (4) \citet{2016ApJ...823...91S}; (5) \citet{2016ApJ...818L..16Z}; (6) \citet{2016ApJ...831..101B}; (7) \citet{2016ApJ...819L...7N}; (8) \citet{2016ApJ...820L..40A}} \tablenotetext{a}{These observations also included additional spectral windows at other frequencies. The line-free channels were not incorporated into the main continuum analysis in this work due to the relatively small continuum bandwidth available.} \end{deluxetable*} \begin{figure*}[htp] \centering \includegraphics[scale = 0.65]{spix.pdf} \caption{\textit{Top left}: 290 GHz continuum image of the TW Hya disk generated from combining Band 6 and Band 7 data. The synthesized beam is shown in the lower left corner. \textit{Top right}: The 290 GHz continuum emission deprojected and replotted as a function of radius and azimuth, with the deprojected, azimuthally averaged radial surface brightness profile shown underneath. The light blue ribbon shows the $1\sigma$ scatter of each radial bin. Gray dashed lines mark the location of the continuum gaps at 25, 41, and 47 AU. The Gaussian profile shows the FWHM of the minor axis of the synthesized beam. \textit{Bottom left}: Spectral index map calculated from Band 6 and Band 7 data. \textit{Bottom right}: The spectral index map deprojected and replotted as a function of radius and azimuth, with its deprojected, azimuthally averaged radial profile shown underneath. The light purple ribbon shows the $1\sigma$ scatter in each radial bin. Values are only shown out to a radius of 55 AU because a substantial fraction of pixels in the continuum image past this radius fall below the signal-to-noise threshold of 5$\sigma$.} \label{fig:spix} \end{figure*} \subsection{$^{12}$CO $J=3-2$ Data Reduction} The $^{12}$CO $J=3-2$ transition in the TW Hya disk was observed with extended array configurations at channel widths of 244 kHz as part of ALMA program 2015.1.00686.S and with more compact configurations at channel widths of 61 kHz as part of ALMA program 2016.1.00629.S. The raw data for both programs were calibrated by NRAO staff. Details of the observation setups are listed in Table \ref{tab:settings}. The phase self-calibration solutions used for the high-resolution 870 $\mu$m continuum imaging were applied to the $^{12}$CO observations from 2015.1.00686.S. The $^{12}$CO observations from 2016.1.00629.S were phase self-calibrated using a continuum model estimated from the line-free channels in the same spectral window. The continuum was then subtracted from the line emission in the visibility plane using the \texttt{uvcontsub} task. Because the two programs were observed with different spectral resolutions, the \texttt{mstransform} task in \texttt{CASA 5.0} was used to regrid and average the visibilities into channels 0.25 km s$^{-1}$ (288 kHz) wide. The $^{12}$CO datasets were then imaged together with the multi-scale CLEAN algorithm (as implemented in the \texttt{tclean} task in \texttt{CASA 5.0}) using scales of 0$''$, 0$\farcs$2, 0$\farcs$4, 0$\farcs$8, 1$\farcs$6, and 3$\farcs$2 and Briggs weighting (robust = 1.0)\footnote{A newer version of \texttt{CASA} was adopted for the line imaging due to a bug in the visibility interpolation of spectral line data in previous versions. See \url{https://casa.nrao.edu/casadocs/casa-5.0.0/introduction/release-notes-50}}. The CLEAN mask was tailored to the emission in individual channels. The resulting image has a synthesized beam with a FWHM of $139 \times131$ mas ($8.3 \times7.8$ AU) at a position angle of $-74\fdg9$. The rms measured in nearby signal-free channels is $\approx$ 1.7 mJy beam$^{-1}$. A primary beam correction was applied to the image cube with the \texttt{impbcor} task. An integrated intensity map was produced by summing emission above the $3\sigma$ level in the velocity range from $-1.91$ to 7.59 km s$^{-1}$. This velocity range was chosen based on where the emission in the line wings exceeded the 3$\sigma$ level, but the map is robust to choice of integration limits\textemdash truncating or extending the integration range by a few channels changed the integrated flux by less than $0.1\%$. \section{Observational results}\label{sec:results} \subsection{The Spectral Index Between 1.3 mm and 870 $\mu$m} The 290 GHz (Band 6 + Band 7) continuum image, spectral index ($\alpha$) map, and deprojected and azimuthally averaged radial profiles are shown in Figure \ref{fig:spix}. The adopted position angle and inclination are 152 and 5 degrees, respectively, based on comparisons between spectral line models and data (see Section \ref{sec:models}). These values are consistent within uncertainties with the orientation derived by \citet{2016ApJ...820L..40A} from the 870 $\mu$m continuum. The inclination is slightly smaller than the commonly used value of 7$^\circ$ from \citet{2004ApJ...616L..11Q}, but \citeauthor{2004ApJ...616L..11Q} also use a lower stellar mass value, which is degenerate with inclination. We favor the higher stellar mass value of 0.88 $M_\odot$ derived in \citet{2012ApJ...744..162A} based on SED modeling. Given the low inclination of the TW Hya disk, the deprojected profiles are insensitive to inclination choices within a few degrees of one another. The continuum emission appears to be azimuthally symmetric and shows prominent gaps at radii of 1, 25, 41, and 47 AU, which is consistent with the Band 6 and Band 7 images published in \citet{2016ApJ...829L..35T} and \citet{2016ApJ...820L..40A}. These and all subsequent measurements quoted from the literature are adjusted for the new \textit{Gaia} distance of 59.5 pc \citep{2016AA...595A...2G}. The spectral index profile is mostly flat at radii coinciding with the bright continuum emission rings; $\alpha$ values range from 1.7 to 2.2, taking the scatter into account. The spectral index drops sharply to values close to 1 interior to a radius of 2 AU, which is an unphysical consequence of the innermost gap only being partly resolved in Band 6. The spectral index profile also has local maxima with $\alpha$ peaking at $\sim2.6-2.7$ near the locations of the continuum emission gaps at 25, 41, and 47 AU. \citet{2016ApJ...829L..35T} measured the spectral index of TW Hya at 190 GHz and also reported a steep increase in $\alpha$ at 25 AU, coincident with the most prominent gap in continuum emission. They tentatively suggested enhancements in $\alpha$ at the 41 and 47 AU continuum gaps. Our 290 GHz spectral index map, which has an angular resolution about a factor of two higher than the map from \citet{2016ApJ...829L..35T}, now confirms the presence of the latter two peaks. While the spectral index radial profiles around 290 GHz and 190 GHz have similar values in the inner 15 AU of the disk, the $\alpha$ value around 290 GHz is consistently lower than that measured for 190 GHz at a given radius in the outer disk. This behavior is expected based on the dust optical depth increasing with frequency. A more striking difference between the 290 GHz spectral index radial profile presented in this work and that at 190 GHz presented in \citet{2016ApJ...829L..35T} is that the former displays more abrupt changes in $\alpha$ with radius, likely because the 290 GHz map is better resolved. We note that the relative shape of the $\alpha$ radial profile at a given frequency can be determined more robustly than the absolute value of $\alpha$, since the systematic flux calibration uncertainty in each band contributes a constant offset to the entire profile. A $\sim10\%$ flux uncertainty in each band would correspond to an uncertainty in the overall offset of $\Delta \alpha\sim0.4$, but the uncertainty in the relative differences in $\alpha$ is governed by the scatter shown in Figure \ref{fig:spix}. \begin{figure*}[htp] \centering \includegraphics[scale = 0.9]{chanmap8AUres.pdf} \caption{Channel maps of the $^{12}$CO $J=3-2$ transition, along with the 870 $\mu$m continuum emission in the upper leftmost panel shown on the same spatial scale. Synthesized beams are drawn in the lower left corner of each panel. The LSR velocity (km s$^{-1}$) is shown in the lower right corner for each $^{12}$CO channel.} \label{fig:chanmap} \end{figure*} \subsection{$^{12}$CO $J=3-2$ Observations}\label{subsec:12COdescription} \subsubsection{$^{12}$CO $J=3-2$ Emission Morphology} The $^{12}$CO channel maps are shown in Figure \ref{fig:chanmap}. $^{12}$CO emission exceeding the $3\sigma$ level extends to a radius of $\approx 3\farcs6$ (215 AU), which is consistent with Submillimeter Array observations reported in \citet{2012ApJ...744..162A}. The CO emission stretches well beyond the submillimeter continuum emission. The channel maps show three key features (see also annotations in Figure \ref{fig:schematic}): \begin{enumerate} \item A bright core of emission extending out to a radius of $\approx25$ AU. \item Emission deficits along the disk major axis and adjacent to the bright emission core in the three central channels at 2.59, 2.84, and 3.09 km s$^{-1}$. \item A break in emission at a radius of $\approx 90$ AU. \end{enumerate} An additional faint dark arc is visible in several channels at a radius of $\sim125$ AU, but it is not clear whether this is simply an imaging artifact (see Section \ref{sec:fiducial}). The emission deficits in the central channels are partly due to the disk inclination (see \citealt{2006AA...448L...5G} and \citealt{2013ApJ...774...16R} for a more detailed discussion). For a geometrically thin disk undergoing Keplerian rotation and being viewed at an inclination angle of $i$, the projected velocity at a point $(r,\theta)$ in the disk is \begin{equation} v_\text{proj}(r,\theta) = v_\text{LSR}+\sqrt{\frac{GM_\ast}{r}}\sin i \cos \theta. \end{equation} Here, $r$ and $\theta$ are in cylindrical coordinates in the frame of the disk, with $\theta=0$ located along the major axis of the disk as seen by an observer. Assuming infinite spatial and spectral resolution and neglecting other line broadening effects, only the region of the disk satisfying \begin{equation}\label{eq:emittingregion} r = GM_\ast \left(\frac{\sin i}{v_\text{proj}-v_\text{LSR}}\right)^2\cos^2\theta. \end{equation} contributes to emission observed in a channel at $v_\text{proj}$. At the systemic velocity of 2.84 km s$^{-1}$, Equation \ref{eq:emittingregion} collapses into a line along the minor axis of the projected disk, which is aligned with the bright ``hourglass" emission core observed in the TW Hya channel maps. Every channel in reality has non-zero spectral resolution, so it incorporates emission from $v_\text{proj}\pm\frac{\Delta v}{2}$, where $\Delta v$ is the channel width (still neglecting other line broadening effects). Then, the channel at the systemic velocity includes emission from disk regions satisfying \begin{equation} r \geq GM_\ast \left(\frac{\sin i}{\frac{\Delta v}{2}}\right)^2\cos^2\theta. \end{equation} This geometry creates emission deficits along the major axis of the disk, near the disk center (see part b of Figure \ref{fig:schematic}), but in Section \ref{sec:models}, we will use radiative transfer models to argue that viewing angle does not wholly account for these features in the TW Hya disk. \begin{figure*}[htp] \centering \includegraphics[scale = 0.9]{keplerianschematic.pdf} \caption{\textit{a)} Annotated maps of the central five channels of $^{12}$CO $J=3-2$ to highlight the key emission features (see Figure \ref{fig:chanmap} for context). \textit{b)} Schematic of the line emission morphology of a Keplerian disk (neglecting thermal and turbulent line broadening and beam smearing). The velocity is listed at the top of each panel. The dotted red ellipse marks the boundary of the projected disk. In the central panel at the systemic velocity, the region of the disk that contributes no emission is marked.} \label{fig:schematic} \end{figure*} The $^{12}$CO integrated intensity map and corresponding deprojected and azimuthally averaged radial profile are shown in Figure \ref{fig:mommap}. The integrated intensity profile is centrally peaked, but rapidly decreases out to a radius of $\approx$ 30 AU, where the slope of the intensity profile abruptly flattens. The profile exhibits a shoulder at a radius of 70 AU, decreases more rapidly out to a radius of 90 AU, then flattens out and tapers off at 215 AU. The integrated flux, measured inside a circular mask with a radius of $4''$, is 42.7$\pm0.2$ Jy km s$^{-1}$. (The integrated flux uncertainty is estimated with $\sqrt{\text{Area of mask}/\text{Area of beam}}\times \sigma$, where $\sigma=3.8\times 10^{-3}$ Jy km s$^{-1}$ is the rms of the unclipped integrated intensity map.) Taking systematic flux uncertainties into account ($\approx 10\%$), the integrated flux is consistent with previous ALMA and SMA measurements of $^{12}$CO $J=3-2$ in the TW Hya disk \citep{2012ApJ...744..162A, 2012ApJ...757..129R}. The shortest projected baseline is 13.1 m, which corresponds to an angular scale of $\approx14''$ and should therefore adequately recover the large-scale structure in the $^{12}$CO emission. We also imaged the line data without continuum subtraction to verify that the key emission features are not artifacts from continuum subtraction, which can create the appearance of line emission substructure if the line optical depth is high enough such that the total outgoing emission has little to no contribution from large dust grains settled near the midplane \citep[e.g.][]{2016PhRvL.117y1101I, 2017ApJ...840...60B}. This effect is not to be confused with optically thick dust absorbing line emission and thereby creating the appearance of molecular emission gaps. In the TW Hya disk, the $^{12}$CO line intensity is substantially larger than that of the dust over many channels, so continuum subtraction does not have a large impact on the observed line emission morphology. \subsubsection{$^{12}$CO $J= 3-2$ Peak Brightness Temperatures} The $^{12}$CO peak brightness temperature map and its deprojected and azimuthally averaged radial profile are also shown in Figure \ref{fig:mommap}. A peak brightness map is computed by taking the maximum value along the frequency axis for each pixel in the image cube and then converting to a brightness temperature using Planck's law (rather than the Rayleigh-Jeans law, which is a poor approximation at these frequencies). Equivalently, \begin{equation} T_\text{B,peak}(x,y) = \max(T_\text{B}(\nu, x,y)), \end{equation} where $x$ and $y$ are spatial coordinates and $\nu$ is the channel frequency. In practice, a peak intensity map produced from a single image cube will have minor artifacts tracing the emission boundaries in individual channels. To mitigate this issue, we follow the example of \citet{2014ApJ...785L..12C} and produce three image cubes with the same channel width (0.25 km s$^{-1}$), but with the starting velocities offset by 0.1 km s$^{-1}$. Each image cube yields a peak brightness temperature map. Since the channelization artifacts are spatially offset from one another from map to map, a map with suppressed artifacts can be produced by taking the median value of each pixel from the individual maps. A peak brightness temperature map for an optically thick line such as $^{12}$CO $J=3-2$ provides an estimate of the gas temperature at the location where the line becomes optically thick, provided that the emission fills the beam. That assumption is valid for most of the disk, which is well-resolved; the exception is the inner 10 AU, where the peak brightness temperature dips. This feature is a consequence of an inclined Keplerian disk being observed at finite angular resolution. Because of the fast rotation of the inner disk, its emission is spread over a large number of channels, with only two narrow wedges contributing to the emission in any given channel (see also \citet{2016ApJ...823...91S} for a related discussion). Referring again to the Keplerian emission schematic in Fig. \ref{fig:schematic}, we see that any Gaussian beam placed over the disk center in a given channel would include regions of the disk contributing no emission. The radial profile of the peak brightness temperature map shows an abrupt slope change at a radius of 25 AU, a shoulder at 70 AU, and another abrupt slope change at 90 AU, corresponding to the features observed directly in the channel maps and integrated intensity map. The peak brightness temperatures between radii of 25 and 90 AU range from $\sim$70 to 35 K, which are about twice the value of the gas temperatures derived by \citet{2016ApJ...823...91S} from multiple transitions of the rarer $^{13}$CO and C$^{18}$O isotopologues. \citet{2017NatAs...1E.130Z} estimate that the C$^{18}$O $J=3-2$ flux contribution largely originates from within two gas scale heights of the midplane, in contrast to three to four scale heights for $^{12}$CO $J=3-2$. The difference in inferred gas temperatures for the isotopologues implies a steep vertical temperature gradient. \begin{figure*}[htp] \centering \includegraphics[scale = 0.65]{mommap8AUres.pdf} \caption{\textit{Top left}: An integrated intensity map of the $^{12}$CO $J=3-2$ line. The synthesized beam is shown in the lower left corner. \textit{Top right}: Deprojected and azimuthally-averaged radial profile of the $^{12}$CO $J=3-2$ integrated intensity. The light blue ribbon shows the $1\sigma$ scatter in each radial bin. The Gaussian profile shows the FWHM of the synthesized beam. \textit{Bottom left}: A peak brightness temperature map of $^{12}$CO $J=3-2$. \textit{Bottom right}: Deprojected and azimuthally-averaged radial profile of the $^{12}$CO $J=3-2$ peak brightness temperature map. The light orange ribbon shows the $1\sigma$ scatter in each radial bin. Vertical gray dashed lines mark the radial break in emission at 25 AU, the shoulder at 70 AU, and the second break at 90 AU. Temperatures between 17 and 27 K are shaded gray to show CO freezeout temperatures that have been estimated for TW Hya (e.g. \citealt{2013Sci...341..630Q} and \citealt{2017NatAs...1E.130Z}).} \label{fig:mommap} \end{figure*} \subsubsection{Comparison to other CO isotopologues} Since CO isotopologues become optically thick at different heights within the disk, they lend insight into the vertical structure. ALMA observations of the C$^{18}$O and $^{13}$CO $J = 3-2$ transitions in the TW Hya disk have been presented in \citet{2016ApJ...823...91S}, \citet{2016ApJ...819L...7N}, and \citet{2017NatAs...1E.130Z} at spatial resolutions ranging from 0$\farcs$3 to 0$\farcs$5. Although these resolutions are coarser than that of the $^{12}$CO data, they are sufficient to reveal substructure. To facilitate comparisons, we reprocessed and combined archival ALMA observations of $^{13}$CO $J=3-2$ in the TW Hya disk. The reduction details and channel maps are provided in Appendix C. Whereas the integrated intensity maps were presented in \citet{2016ApJ...823...91S} and \citet{2016ApJ...819L...7N}, we now show the channel maps because they more clearly display the weak extended emission features. The $^{13}$CO and C$^{18}$O data in \citet{2016ApJ...823...91S}, \citet{2016ApJ...819L...7N}, and \citet{2017NatAs...1E.130Z} show a bright core of emission, an annular gap at $\approx40$ AU, and an outer emission ring peaking at $\approx65$ AU. In the channel maps (see Figure \ref{fig:13COchanmap} for $^{13}$CO and \citet{2017NatAs...1E.130Z} for C$^{18}$O), the annular gap creates central channel emission deficits that coincide spatially with the emission deficits noted for $^{12}$CO. The deficits are more pronounced in $^{13}$CO and C$^{18}$O because they are less optically thick than $^{12}$CO; a similar effect is observed in transition disks, where $^{13}$CO and C$^{18}$O integrated intensity maps have much more prominent central cavities compared to $^{12}$CO \citep[e.g.][]{2015AA...579A.106V, 2016AA...585A..58V}. Like the $^{12}$CO channel maps, the $^{13}$CO channel maps in Figure \ref{fig:13COchanmap} also show a steep dropoff in intensity at a radius of $\approx 90$ AU, followed by very faint emission extending out to $\approx200$ AU, which is slightly less extended than the $^{12}$CO emission. C$^{18}$O exhibits an outer emission ring that sharply drops off within a radius of 100 AU \citep{2017NatAs...1E.130Z}, but no emission is observed beyond this radius. The apparent differences between the isotopologues is likely primarily due to sensitivity limits, but may also be partially due to selective photodissociation in the more tenuous outer disk \citep[e.g.][]{2014AA...572A..96M}. Based on integrated flux ratios, $^{12}$CO and $^{13}$CO $J = 3-2$ are known to have high optical depths in the TW Hya disk \citep{2013Sci...341..630Q}. However, it is also instructive to determine whether $^{12}$CO is still optically thick beyond a radius of 100 AU, where the emission becomes comparatively weak. As a crude check, we measure the $^{12}$CO/$^{13}$CO integrated flux ratio using an annulus with an inner radius of $1\farcs7$ (101 AU) and an outer radius of $3\farcs6$ (214 AU). Inside this annulus, the $^{12}$CO/$^{13}$CO flux ratio is $\approx20$, which is smaller than the interstellar $^{12}$CO/$^{13}$CO abundance ratio of $\approx 69$ \citep[e.g.][]{1999RPPh...62..143W} and suggests that $^{12}$CO remains optically thick in the outer disk. The $^{12}$CO/$^{13}$CO ratio in the outer disk may be even higher than the interstellar medium (ISM) ratio due to less effective $^{13}$CO self-shielding \citep[e.g.][]{2009AA...503..323V, 2014AA...572A..96M}, in which case the flux ratio still implies that $^{12}$CO is optically thick. \begin{figure*}[htp] \centering \includegraphics[scale = 0.6]{structureplots.pdf} \caption{Plots of the four parametric model structures used as radiative transfer inputs. \textit{Left}: $^{12}$CO number density color maps with isotherms overplotted as dashed white lines. \textit{Right}: Corresponding $^{12}$CO gas column densities for each model. } \label{fig:structures} \end{figure*} \section{$^{12}$CO Radiative Transfer Modeling}\label{sec:models} \subsection{Overview} To explore possible origins for the $^{12}$CO emission substructure, we perform radiative transfer calculations based on several sets of parametric structure models. Given the complex details visible at high resolution, as well as the large computational cost of synthesizing the image cubes, our aim in this work is not to present an optimal model, but to provide guidance for which physical and chemical mechanisms would plausibly yield the key emission features noted in Section \ref{sec:results}. Similar modeling approaches have been favored for ALMA observations of molecular line emission in a number of works \citep[e.g.][]{2012ApJ...757..129R, 2013ApJ...774...16R,2016PhRvL.117y1101I, 2017ApJ...839...43O} because of the flexibility offered in directly specifying temperature structures and molecular abundances to explore particular emission features of interest. An alternative approach is thermochemical disk modeling, which computes dust and gas structures and molecular abundances in a physically self-consistent manner via numerical codes such as ProDiMo \citep{2009AA...501..383W} or DALI \citep{2012AA...541A..91B}, although such an approach is also subject to uncertainties in the values adopted for parameters such as dust opacities or reaction rates \citep[e.g.][]{2008ApJ...672..629V, 2017AA...607A..41K}. The parametric and thermochemical approaches are ultimately complementary; physical models guide the setup of parametric models, the results of which then motivate additional physical modeling \citep[e.g.][]{2012ApJ...744..162A, 2013Sci...341..630Q, 2014ApJ...780..153B,2017AA...599A.101V}. Because continuum subtraction did not appear to introduce artifacts to the $^{12}$CO image cubes, we model the continuum-subtracted line emission rather than line+continuum, which would require a number of additional assumptions and free parameters to model the dust. As discussed in \citet{2017ApJ...840...60B}, continuum subtraction tends to remove a larger fraction of $^{13}$CO and C$^{18}$O line emission because these lines are less bright overall but are still optically thick in the inner disk. Since a detailed physical model for the continuum would likely be necessary to construct a CO model consistent with all isotopologue data, we focus on modeling $^{12}$CO $J=3-2$ only in the present paper, and defer dust modeling and multi-line fitting to future work. Perhaps the most straightforward explanation of the $^{12}$CO emission features is that they trace an initial sharp drop in the CO column density, which then rebounds in the outer disk. Such a column density profile has been inferred previously based on observations of less optically thick CO isotopologues in the TW Hya disk \citep{2016ApJ...819L...7N, 2016ApJ...823...91S, 2017NatAs...1E.130Z}. Hence, our fiducial $^{12}$CO model is motivated by the C$^{18}$O $J=3-2$ model presented in \citet{2017NatAs...1E.130Z}. We also construct a model with a monotonically decreasing CO column density profile to demonstrate how its emission features differ from the fiducial model. We then examine the impact of our assumptions about CO freezeout. Finally, we briefly consider how assumptions about the form of the temperature structure affect inferences about the CO column density profile. We make several assumptions common to all models. Because there are no clear azimuthal asymmetries in the ALMA data, all the models are axisymmetric and specified in cylindrical coordinates. After some experimentation, the inclination and position angle were fixed to 5 and 152 degrees, respectively. Local thermal equilibrium is assumed for calculating the intensity of $^{12}$CO $J = 3-2$ because its critical density ($\sim10^4$ cm$^{-3}$) is small relative to typical disk gas densities \citep[e.g.][]{2007ApJ...669.1262P}. To first order, the gas velocity field is that of a thin Keplerian disk in which the stellar mass greatly exceeds the disk mass: \begin{equation} \begin{cases} & v_r = v_z = 0\\ & v_\phi = \sqrt{\frac{GM_\ast}{r}}. \end{cases} \end{equation} As in \citet{2017NatAs...1E.130Z}, we fix the microturbulent line broadening parameter to $a_\text{turb}$ = 0.01 km s$^{-1}$, but we note that this value was motivated by general disk theory rather than from a direct measurement, and in practice this parameter likely varies spatially. The value of this parameter is not well-established\textendash estimates for the TW Hya disk have been disparate due to differences in methodology as well as limitations in instrumental resolution and precision \citep{2011ApJ...727...85H, 2016AA...592A..49T}. The turbulence values that have been estimated for the TW Hya disk are smaller than the spectral resolution of our observations, limiting their utility in constraining turbulence independently. In terms of modeling line emission, turbulence is highly degenerate with the thermal structure (see also \citealt{2015ApJ...808..180S} for a more detailed exploration). Holding all other parameters equal, increasing the turbulent broadening parameter by a factor of 10 (bringing it up to the higher values estimated by \citealt{2016AA...592A..49T}) makes the emission features ``blurrier'' and ``fills in'' the central emission deficits in the channel maps, but the difference is modest and does not qualitatively change our interpretation of the CO observations. The largest projected velocities where $^{12}$CO emission is detected ($\pm4.75$ km s$^{-1}$ from the systemic velocity) suggest that there is gas within at least a few tenths of an AU from the central star, assuming $v_\text{proj} = \sqrt{\frac{GM_\ast}{r}}\sin(i)$. In the absence of more precise information about the gas inner radius, we set $R_\text{in}$ to 0.05 AU, roughly the inferred location of the inner dust rim \citep{2006ApJ...637L.133E}. The outer radius $R_\text{out}$ is set to 215 AU, based on the extent of $^{12}$CO emission above the $3\sigma$ level in the channel maps. Between the inner and outer radii, we assume that the vertical distribution of the gas is approximated by a Gaussian with a standard deviation $H_\text{mid}(r)$, where \begin{equation} H_\text{mid}(r) = \sqrt{\frac{k_B T_\text{mid}(r)r^3}{\mu_\text{gas}m_\text{H} G M_\ast}} \end{equation} is the gas pressure scale height, $T_\text{mid}(r)$ is the midplane temperature, $\mu_\text{gas}=2.37$ is the mean mass for a gas particle, and $m_\text{H}$ is the mass of atomic hydrogen. We therefore express the $^{12}$CO number density as \footnotesize \begin{equation}\label{eq:numdens} n_\text{CO}(r,z) = p(T(r,z))\times \frac{N(r)}{\sqrt{2\pi} H_\text{mid}(r)}\exp\left[-0.5\left(\frac{ z} {H_\text{mid}(r) }\right)^2\right]. \end{equation} \normalsize $N(r)$ is a scaling factor that simplifies to the $^{12}$CO column density profile in the case where $p(T)=1$ everywhere (e.g., in the absence of freezeout). The step function $p(T)$ accounts for CO freezeout, such that $p=1$ for gas temperatures above some freezeout temperature $T_\text{frz}$ and $p = 10^{-6}$ everywhere else. This procedure, similar to the treatment in \citet{2008ApJ...681.1396Q}, divides the disk into a warm molecular layer with abundant CO and a cold midplane layer where freezeout depletes gas-phase CO. In general, UV photodissociation sets the upper boundary of the CO distribution and plays a role in setting the outer boundary \citep[e.g.][]{1999AA...351..233A}. Because ambiguities in the gas and grain size distribution (see Section \ref{sec:discussion}) render explicit calculations of the photodissociation boundary difficult, we elect to parameterize the CO distribution directly. The radiative transfer code RADMC-3D\footnote{\url{http://www.ita.uni-heidelberg.de/~dullemond/software/radmc-3d/}} \citep{2012ascl.soft02015D} is used to compute the $^{12}$CO level populations and perform the raytracing to produce model image cubes. The parametric expressions for the temperature, gas velocity, and $^{12}$CO number density are evaluated at 400 logarithmically spaced radial bins from 0.05 to 400 AU and at 100 logarithmically spaced polar angle bins from 0 to $\pi/2$ in a spherical coordinate system (note that the grid points are converted to cylindrical coordinates before the expressions are evaluated, and mirror symmetry is assumed for the upper and lower halves of the disk). The molecular data inputs for the radiative transfer are obtained from the LAMDA database \citep{2005AA...432..369S}. To account for the effects of non-zero channel widths on the observed spatial distribution of the line emission, the model image cubes are synthesized at a velocity resolution of 0.05 km s$^{-1}$ and subsequently averaged to a resolution of 0.25 km s$^{-1}$ to match the observations. The \texttt{vis\_sample} package\footnote{Version used in this work available at \url{https://github.com/AstroChem/vis_sample/tree/j}. General version available at \url{https://github.com/AstroChem/vis_sample}.} \citep{2015ApJ...806..154C, loomis} is used to sample the radiative transfer images at the same spatial frequencies as the data in order to produce model visibilities, which are then imaged with the same procedure described in Section 2. \begin{deluxetable}{ccccc} \tabletypesize{\scriptsize} \tablecaption{Parameter Values for $^{12}$CO Models\label{tab:models}} \tablehead{\colhead{Parameter}&\colhead{Fiducial}&\colhead{Freezeout}&\colhead{No}&\colhead{Perturbed}\\ &&\colhead{only}&\colhead{freezeout}&\colhead{temperature}} \startdata $R_\text{in}$ (AU) & 0.05& 0.05& 0.05& 0.05\\ $R_\text{out}$ (AU) & 215& 215& 215& 215\\ $\gamma$ &0.9&0.9&0.9&0.9\\ $N_\text{CO}$ (cm$^{-2}$)&$3\times 10^{19}$&$3\times 10^{19}$&$3\times 10^{19}$&$7.5\times 10^{17}$\\ $R_1$ (AU) & 15 & - & 15 & 15\\ $R_2$ (AU) & 70 & - & 70 & 70\\ $A$ & 3 & - & 3 & -\\ $f$ & 0.025 & - & 0.025& -\\ $\sigma_\text{in}$&12&- & 12 & -\\ $\sigma_\text{out}$&6&-& 6 & -\\ $T_{\textup{mid},10}$ (K)&40&40 & 40 & 40 \\ $T_{\textup{atm},10}$ (K) &125&125 & 125 & 125\\ $q$& 0.47 &0.47 & 0.47 & 0.47\\ $\delta T$ & - & - & - & 1.6\\ $B$ & - & - & - & 0.15\\ $\sigma_{T_\text{in}}$&-&-&-&15\\ $\sigma_{T_\text{out}}$&-&-&-&6\\ $T_\text{frz}$ (K) & 27 & 27 & - & -\\ $a_\text{turb}$ (km s$^{-1}$) & 0.01 & 0.01 & 0.01 & 0.01 \enddata \end{deluxetable} The model parameters are listed in Table \ref{tab:models}, and the gas temperatures and $^{12}$CO number and column densities for each model are plotted in Figure \ref{fig:structures}. Channel maps made from the model visibilities are shown in Figure \ref{fig:modelimages}, beneath the corresponding channels from the observations. To highlight some details of the models, insets of the central three channels and radial profiles of the peak brightness temperature maps are shown in Figure \ref{fig:insets}. \begin{figure*}[htp] \begin{center} \includegraphics[scale = 0.57]{comparemodels.pdf} \end{center} \caption{Central channels of the $^{12}$CO $J=3-2$ observations, compared with model channel maps. Synthesized beams are drawn in the lower left corner of each panel. The LSR velocity (km s$^{-1}$) is shown in the lower right corner of each panel in the first row. The offset from phase center is marked in arcseconds in the lower left panel. } \label{fig:modelimages} \end{figure*} \begin{figure*}[htp] \begin{center} \includegraphics[scale = 0.75]{modelinset.pdf} \end{center} \caption{Insets of the three central channels for each model to highlight the substructures, along with the corresponding radial profile of the peak brightness temperature map.} \label{fig:insets} \end{figure*} \subsection{The Fiducial Model\label{sec:fiducial}} The parameterization and values for the fiducial model are motivated by the C$^{18}$O column density profile derived in \citet{2017NatAs...1E.130Z}\textemdash the CO column density decreases sharply in the inner disk, then features a secondary peak in the outer disk. Functionally, this is specified by setting the scaling factor for the number density to be \begin{equation}\label{eq:scaling} N(r) = N_\text{CO}\left(\frac{r}{\text{20 AU}}\right)^{-\gamma}\times f_1(r)\times f_2(r). \end{equation} $f_1(r)$ is a factor setting the radial location and degree of the column density drop in the inner disk: \begin{equation} f_1(r)= \begin{cases} 1, & r< R_1 \\ f, & r\geq R_1. \end{cases} \end{equation} $f_2(r)$ sets the shape of the secondary bump in the $^{12}$CO column density profile such that \begin{equation}\label{eq:f2} f_2(r) = \begin{cases} 1+A\exp{\left( -\frac{(r-R_2)^2}{2\sigma_\text{in}^2}\right)}, & r< R_2 \\ 1+A\exp{\left( -\frac{(r-R_2)^2}{2\sigma_\text{out}^2}\right)}, & r\geq R_2. \end{cases} \end{equation} The asymmetric Gaussian shape of the secondary bump is motivated by the shallow slope of the CO integrated intensity radial profile inward of 70 AU and the much steeper slope outside of 70 AU, although other parameterizations may achieve similar effects. $N_\text{CO}$ is set to $3\times10^{19}$ cm$^{-2}$, assuming that the $^{12}$CO to C$^{18}$O abundance ratio follows the local ISM value of $\sim500$ \citep[e.g.][]{1999RPPh...62..143W}. The model parameter values are listed in Table \ref{tab:models}. Because LTE is assumed, the absolute $^{12}$CO number density distribution is directly input into RADMC-3D without requiring the underlying gas distribution to be specified. The parameterization for $^{12}$CO in Equations \ref{eq:numdens} and \ref{eq:scaling} can therefore be viewed in two equivalent ways: \begin{enumerate} \item The fractional CO abundance, $X_\text{CO}$, is constant in the warm molecular layer, and perturbations in the gas surface density profile govern the radial variation in the $^{12}$CO column density profile. An ``unperturbed'' surface density profile is assumed to follow a power-law, as outlined in \citet{1974MNRAS.168..603L} for a viscous disk. More colloquially, these perturbations might be referred to as an annular gap and ring in the gas distribution. \item The gas surface density profile follows a standard power law, and radially varying CO depletion (i.e. reductions in $X_\text{CO})$ in the warm molecular layer creates the radial variations in the $^{12}$CO column density profile. \end{enumerate} The temperature structure is modeled using the vertical gradient prescription presented in \citet{2003AA...399..773D} and \citet{2012ApJ...744..162A}: \footnotesize \begin{equation} T(r,z) = \begin{cases} T_{\textup{atm}}(r)+(T_{\textup{mid}}(r)-T_{\textup{atm}}(r))\cos^4{\left(\frac{\pi z}{2 z_q}\right)} & z\textless z_q \\ T_{\textup{atm}}(r) & z\geq z_q, \end{cases} \end{equation} \normalsize where \begin{equation} T_\textup{atm}(r) = T_{\textup{atm},10}\left(\frac{r}{\textup{10 AU}}\right)^{-q}, \end{equation} \begin{equation} T_\textup{mid}(r) = T_{\textup{mid},10}\left(\frac{r}{\textup{10 AU}}\right)^{-q}, \end{equation} and \begin{equation} z_q = 4H_\text{mid}(r). \end{equation} \citet{2017NatAs...1E.130Z} employ a vertically isothermal model, assuming that C$^{18}$O emits at the midplane temperature. In contrast, $^{12}$CO becomes optically thick well above the midplane, requiring the adoption of a vertical temperature gradient. We set $T_{\textup{mid},10} = 40$ K and $q = 0.47$ based on the midplane temperature derived in \citet{2017NatAs...1E.130Z}. $T_{\textup{atm},10}$ is less constrained; we choose a value of 125 K such that the spatially integrated fluxes of the channels at the systemic velocity for the observations and fiducial model are within 5$\%$ of one another. This value is broadly in line with the detailed temperature structures computed from fitting the SED \citep[e.g.][]{2015ApJ...799..204C, 2016AA...592A..83K}. The consequences of our assumptions about the temperature structure are discussed later. The fiducial model images, shown in Figures \ref{fig:modelimages} and \ref{fig:insets}, reasonably reproduce the three key features of the observed channel maps\textemdash the sharp drop in the $^{12}$CO column density at $r = 15$ AU creates the bright ``hourglass" emission core as well as the nearby emission deficits in the central channels, and the secondary bump in the column density creates the emission shoulder at $r\approx70$ AU and the radial intensity break at $\approx$ 90 AU. Whereas specifying a sharp drop in the CO column density creates a clear annular gap in models of C$^{18}$O emission \citep{2017NatAs...1E.130Z}, the impact is more subtle in $^{12}$CO emission due to its much higher optical depth. In the optically thin limit, intensity scales almost linearly with column density. In contrast, for optically thick $^{12}$CO, altering the number density changes the height and therefore the temperature of its emitting surface in the disk, which yields emission substructure. It should be noted that the drop in the column density at $r = 15$ AU reproduces the break in the emission profile slope at $r\approx25$ AU because the beam smears out the radial change in intensity. The model slightly underestimates the line intensity in the inner few AU of the disk. This may be due to complexities in the vertical structure that are unaccounted for in the model, deviations from Keplerian rotation in the inner disk \citep{2012ApJ...757..129R}, or the slightly differential rotation associated with a geometrically thick disk \citep[e.g.][]{2013ApJ...774...16R}. While our simple models are aimed at elucidating features 15 AU and beyond, the effect of these secondary considerations on the inner disk would be interesting to explore in future work. In the outer disk past a radius of 90 AU, there are additional faint arcs visible in the central three channels even though the surface density profile is smooth at these radii. These appear to be artifacts from imaging the visibilities with CLEAN. Similar faint arcs appear in the outer disk emission in the $^{12}$CO observations and may be imaging artifacts as well. However, since the arcs in the data persist with different choices of imaging parameters and do not exactly match the artifacts in the model images, it is difficult to say for certain whether there is any genuine physical origin for these features. \subsection{A Freezeout-only Model} While the fiducial model illustrates that substructure in the CO column density profile is compatible with the observed $^{12}$CO emission, it does not by itself demonstrate that substructures are \textit{necessary} to create the observed emission features. Given the high optical depth of $^{12}$CO $J = 3-2$, it is not intuitive that column density substructure would have a visible impact on its emission morphology. It is therefore instructive to compare the fiducial model with a ``freezeout-only" model, where the $^{12}$CO column density profile decreases monotonically from the disk center and no depletion occurs in the warm molecular layer. The $^{12}$CO number density scaling factor is now \begin{equation}\label{eq:smooth} N(r) = N_\text{CO}\left(\frac{r}{\text{20 AU}}\right)^{-\gamma}, \end{equation} i.e., it is an extrapolation of the profile in the inner disk of the fiducial model. The ``freezeout only" model is otherwise specified in the same fashion as the fiducial model. This ``freezeout only" model is similar to the parameterization that has been used to fit CO emission in a number of protoplanetary disks observed at coarser angular resolution \citep[e.g.][]{2012ApJ...744..162A, 2014ApJ...788...59W, 2015ApJ...813...99F}. The resulting model channel maps, shown in Figures \ref{fig:modelimages} and \ref{fig:insets}, differ dramatically from those of the observations and fiducial model. The failure of the ``freezeout-only" model to reproduce the key features of the observations indicates that these features are not artifacts resulting from sparse $uv$ coverage or of the deconvolution algorithm, but reflect the structure of the disk itself. No intensity break appears at a radius of 90 AU, since the surface density profile is smooth there. While a bright emission core is present due to the high temperatures of the inner disk, the core is not as sharply defined as in either the observations or the fiducial model. Though emission deficits near the center of the disk are visible at the systemic velocity, they are substantially smaller than the ones in the observations and fiducial model. As remarked upon in Section 2, emission deficits at those locations are expected for inclined disks in Keplerian rotation, but the discrepancy between the scale of the deficits for the fiducial and ``freezeout-only" models suggests that disk orientation alone does not explain the observed emission morphology\textemdash an abrupt change in the CO column density and/or temperature profile has to occur near $r\approx15$ AU to simultaneously create the bright inner emission core and adjacent emission deficits. \begin{figure}[htp] \centering \includegraphics[scale = 0.4]{depletionfigure.pdf} \caption{Comparison of the central three channels of the RADMC-3D ``freezeout only" images (zoomed in to the inner 2$''$ of the disk) with models where $N_\text{CO}$ is reduced by a factor of 500 and 5000, respectively. Only the model depleted by a factor of 5000 shows a radial intensity break corresponding to the location of the CO snowline.} \label{fig:depletion} \end{figure} For this ``freezeout-only'' model, the midplane CO snowline does not create a marked intensity break because the $^{12}$CO emission is too optically thick. $N_\text{CO}$, which sets the overall scale of the column density profile, has to be reduced by a factor of several thousand for the CO snowline to become visible in the images generated by RADMC-3D, and even then the effect is subtle (see Figure \ref{fig:depletion}). In contrast, the fiducial model only invokes a factor of 40 reduction in the $^{12}$CO column density at a radius of 15 AU to create emission substructure by lowering the CO emitting height. While CO column densities are not well-constrained by $^{12}$CO, the value of $N_\text{CO}$ chosen for the unreduced ``freezeout only'' model is based on column density estimates from observations of C$^{18}$O, which has much lower optical depth \citep{2017NatAs...1E.130Z}. Since it is unlikely that C$^{18}$O column densities have been overestimated by several orders of magnitude for the TW Hya disk, severely reducing $N_\text{CO}$ to decrease the optical depth of $^{12}$CO does not seem to be a viable route for reproducing the observed $^{12}$CO emission morphology. \subsection{A Model With No Freezeout\label{sec:nofreezeout}} While the fiducial model adopts a CO freezeout temperature of 27 K to be consistent with the C$^{18}$O model from \citet{2017NatAs...1E.130Z}, \citet{2013Sci...341..630Q} previously advocated for a freezeout temperature of 17 K in the TW Hya disk. In practice, CO desorption occurs at various temperatures over this range, depending on the substrate \cite[e.g.][]{1988Icar...76..201S, 2003ApJ...583.1058C, 2016ApJ...816L..28F}. Hence, it is worthwhile to examine how the model emission depends on the treatment of CO freezeout. To illustrate how an extreme change in the CO freezeout specification could look, we produce a ``no-freezeout" model by using a CO number density structure in which $p(T) = 1$ everywhere in Equation \ref{eq:numdens}. In all other respects, the ``no-freezeout" model is identical to the fiducial model. The resulting model channel maps are shown in Figure \ref{fig:modelimages}. Past $r\approx150$ AU, the model images overproduce emission in comparison with the observations and the fiducial model, but the key features of the $^{12}$CO emission (i.e., the bright core, the nearby emission deficits in the central channels, and the break in intensity at 90 AU) look similar. This suggests that the $^{12}$CO emission morphology in the inner disk is not sensitive to differences in assumptions about CO freezeout. One could perhaps devise a colder temperature structure that removes so much gas-phase CO that the optical depth of $^{12}$CO is low enough to reveal its midplane snowline. However, this possibility for TW Hya can be ruled out by the $^{12}$CO peak brightness temperature map in Figure \ref{fig:mommap}. Within a radius of 100 AU, the peak brightness temperatures are well above the range of expected CO freezeout temperatures, indicating that the $^{12}$CO emitting surface is at a height much warmer than the snow surface and therefore does not trace the onset of freezeout in the midplane. \subsection{A ``Perturbed Temperature" Model} The models we have presented so far sought to reproduce the observed $^{12}$CO emission morphology by shifting the CO emitting height through surface density substructures. An alternative route is to modify the disk temperature structure directly. The temperature structure used for the previous models has been relatively simple, with the radial temperature dependence following a standard power law for a fixed height. However, models from several works suggest that the TW Hya temperature structure could be much more complex. First, scattered light observations of the TW Hya disk show multiple annular gaps \citep[e.g.][]{2013ApJ...771...45D, 2015ApJ...802L..17A, 2015ApJ...815L..26R, 2017ApJ...837..132V}. Relative to a smooth disk model, the troughs of gaps have lowered temperatures due to shadowing from the interior wall of the gap, while the far walls of gaps receive more stellar radiation and therefore feature elevated temperatures \citep[e.g.][]{2012ApJ...749..153J, 2013ApJ...772...34J}. Additional cooling of the gas may occur within the gap if dust densities decrease to the point where the gas and dust temperatures are no longer coupled via collisions \citep{2017arXiv171004418F}. Second, inward radial drift of larger solids in disks may create radial temperature inversions; \citet{2016ApJ...816L..21C} discusses how radial drift reduces dust optical depths in the outer disk and allows stellar radiation to penetrate deeper in the disk, while \citet{2017AA...605A..16F} suggest that radial drift allows the outer disk to be heated more efficiently because the remaining small grains are lofted upward and receive more stellar illumination. To illustrate how thermal and density variations can create similar emission patterns, we construct a model that has a smooth CO column density profile. The bright inner core of emission and the intensity break at 90 AU seen in the data are then reproduced by increasing the temperatures in these regions relative to the fiducial model. The $^{12}$CO number density scaling factor $N(r)$ is again described by a power law, i.e. Equation \ref{eq:smooth}. $N_\text{CO}$ is set to $7.5\times 10^{17}$ cm$^{-2}$ such that the $^{12}$CO column density profile matches that of the disk outside 15 AU in the ``no-freezeout'' model, excluding the secondary column density bump. In order to keep the column density profile smooth, CO freezeout is ignored in this model. As shown in the ``no-freezeout" model, the treatment of CO freezeout does not have a noticeable effect on the inner 150 AU of the disk, which is where the substructure is observed. The modified temperature structure is \begin{equation} T_\text{perturbed}(r,z) = T_\text{fiducial}\times g_1(r)\times g_2(r). \end{equation} The prescription for $g_1(r)$ creates a hot inner disk, similar to a TW Hya model from \citet{2012ApJ...757..129R} : \begin{equation} g_1(r) = \begin{cases} \delta T & r< R_1 \\ 1 & r\geq R_1. \end{cases} \end{equation} $g_2(r)$ creates a secondary warm region in the outer disk: \begin{equation} g_2(r) = \begin{cases} 1+B\exp{\left( -\frac{(r-R_2)^2}{2\sigma_{T_\text{in}}^2}\right)}, & r< R_2 \\ 1+B\exp{\left( -\frac{(r-R_2)^2}{2\sigma_{T_\text{out}}^2}\right)}, & r\geq R_2. \end{cases}\end{equation} Parameters $g_1(r)$ and $g_2(r)$ are the temperature analogues to $f_1(r)$ and $f_2(r)$, the factors setting the CO column density drop in the inner disk and secondary bump in the outer disk for the fiducial model. While these parameterizations aim to reproduce some of the general characteristics of the thermal variations derived for disk models that incorporate annular gaps or radial drift, simplifications are also made (e.g., the temperature step function in the inner disk) in order to allow for a more direct comparison with the fiducial model. The model parameters are listed in Table \ref{tab:models}. As shown in Figures \ref{fig:modelimages} and \ref{fig:insets}, the emission morphology within a radius of 150 AU is quite similar to the observations. As expected for optically thick CO, the relative variations in the thermal profile necessary to create emission substructure are much smaller than the variations that would be required in the column density profile. Whereas the key observed emission features were reproduced in the fiducial model through a factor of 40 decrease in the CO column density at 15 AU and then a secondary bump by a factor of a few in the outer disk, the ``perturbed temperature" model only boosts temperatures by 60\% ($\delta T = 1.6$) in the inner disk and by 15\% ($B = 0.15$) at the peak of the secondary ring relative to the fiducial model. The width of $g_2(r)$, setting the secondary bump in the temperature profile, is somewhat wider than that of $f_2(r)$, which sets the secondary bump in the CO column density profile in the fiducial model. Since the temperature profile declines more steeply with radius than the CO column density profile, the temperature has to be increased over a wider region to reproduce the same emission bump that is generated by an increase in the CO column density. While a smooth CO surface density profile is used to isolate the effects of temperature in creating emission substructure, this model is not physically self-consistent. Although the ``perturbed temperature" model suggests that the depletion and enhancement factors in the CO surface density profile may be more modest than those used for the fiducial model, the mechanisms that have been proposed for creating localized thermal variations should still yield variations in the CO column density. For example, \citet{2012ApJ...749..153J} find that a disk gap with the surface density reduced by a factor of 6 can yield thermal variations on the order of $25\%$ compared to a smooth disk. For thermal variations mediated by radial drift, heating of the outer disk would promote CO ice desorption, thereby creating a secondary CO column density bump. Hence, while the CO emission substructure may be largely a temperature effect from the radiative transfer point of view, they would still ultimately signify the presence of surface density substructure. \section{Discussion}\label{sec:discussion} \subsection{Possible Origins of the CO Emission Features} Our fiducial model indicates that the emission morphology of $^{12}$CO in the TW Hya disk can be reasonably reproduced with a steep decrease in the $^{12}$CO column density at a radius of $\approx$ 15 AU, followed by a secondary peak at a radius of $\approx$ 70 AU. To evaluate what scenarios are likely to have created these column density variations, we consider the $^{12}$CO results in the context of other observations of the TW Hya disk as well as physical and chemical modeling results from the literature. \subsubsection{Midplane CO freezeout} Estimates for the TW Hya disk's midplane CO snowline location range from 11 to 33 AU \citep{2013Sci...341..630Q, 2016ApJ...819L...7N,2016ApJ...823...91S, 2017ApJ...840...93P, 2017AA...599A.101V,2017NatAs...1E.130Z}, so it is natural to consider whether the apparent steep drop in $^{12}$CO column density at a radius of 15 AU is related. Indeed, several of the aforementioned CO snowline estimates are based on observations of a dip in the C$^{18}$O emission profile at a radius (22 AU) close to where we infer a $^{12}$CO column density drop. As noted in our analysis of the $^{12}$CO brightness temperatures in \ref{sec:nofreezeout}, the $^{12}$CO emission appears to originate well above the CO snow surface, which is in line with typical assumptions about disks. This implies that the inferred column density drop at $r=15$ AU and the bump at $r=70$ AU do not directly trace the onset of CO freezeout in the midplane. Because similar emission features are observed in $^{13}$CO and C$^{18}$O $J=3-2$ \citep{2016ApJ...819L...7N,2016ApJ...823...91S, 2017NatAs...1E.130Z}, which emit from different heights in the disk due to their lower optical depths, we argue that the line observations together likely trace CO depletion or gas density reductions occurring throughout the vertical extent of the warm molecular layer, not just near the midplane. Consequently, while the aggregate evidence indicates that the midplane CO snowline does lie somewhere between 11 and 33 AU in the TW Hya disk, we advise general caution in using CO isotopologue observations to infer the CO snowline location. \subsubsection{Gas surface density substructures\label{sec:depressions}} Optically thick $^{12}$CO emission does not directly constrain the molecular gas distribution of the TW Hya disk, but the distribution of sub-micron-sized dust grains has been used as a proxy because small grains are usually well-coupled to gas \citep{2013ApJ...771...45D, 2015ApJ...802L..17A, 2015ApJ...815L..26R, 2017ApJ...837..132V}. Most recently, \citet{2017ApJ...837..132V} presented SPHERE scattered light observations showing wide radial depressions at $\approx23$ and $\approx94$ AU, which they interpreted as tracing gas surface density variations. These depressions overlap with where we infer steep $^{12}$CO column density decreases in our fiducial model, which may indicate that the $^{12}$CO emission is also following gas surface density variations. Nonetheless, there are at least two apparent discrepancies between the inferred gas surface density profile from \citet{2017ApJ...837..132V} and the inferences we have made regarding the CO distribution in the TW Hya disk. First, their inferred gas surface density profile attains a local maximum just outside $r=100$ AU, whereas none of the CO isotopologue observations show an obvious rise in intensity outside this radius. Complementary chemical modeling of double CS emission rings by \citet{2017ApJ...835..228T} indicates that their observations are best reproduced by a gas surface density depression similar to the one inferred by \citet{2017ApJ...837..132V} at a radius of 94 AU. One possible resolution to this discrepancy is that the small dust grains become less well-coupled to the gas in the more tenuous upper layers of the cold outer disk. Alternatively, CO traces the gas surface density decrease into the 94 AU gap, but does not rise again with the gas surface density due to more substantial CO freezeout in the outer disk. Second, the relative amplitudes of the gas surface density variations inferred by \citet{2017ApJ...837..132V} range roughly from 45 to 80\%. The \citet{2017NatAs...1E.130Z} model, which motivated our fiducial model, derived a C$^{18}$O column density drop by an order of magnitude in the inner disk and then an increase by a factor of a few to create the secondary ring. While our ``perturbed temperature" model provides an example of how the $^{12}$CO column density variations needed to reproduce the observations are sensitive to the prescribed temperature structure, column density estimates from the rarer and therefore less optically thick isotopologues should be more robust. On the other hand, temperature, dust surface density, and dust opacities are degenerate with one another, so more stringent constraints on the temperature structure of the TW Hya disk would be essential to determine whether more extreme gas surface density variations are also compatible with the scattered light data. In the meantime, we do not rule out the possibility that substructure in the underlying gas disk at least partially contributes to the observed CO emission morphology. \subsubsection{CO Depletion in Warm Gas\label{sec:depletion}} Another possibility to consider is that the features are due to spatial variations of $X_\text{CO}$ in warm gas: $X_\text{CO}$ drops by one to two orders of magnitude near 15 AU and then rises by a factor of a few in the outer disk before decreasing again, creating the secondary CO column density bump peaking at $\approx 70$ AU. While several studies have suggested that warm gas in the TW Hya disk is CO-depleted by one to two orders of magnitude relative to the ISM \citep{2013ApJ...776L..38F, 2016AA...592A..83K, 2016ApJ...819L...7N, 2016ApJ...823...91S, 2017ApJ...840...93P}, the new high angular resolution ALMA observations provide additional insight into how the CO distribution varies radially. Destruction of CO by He$^+$ is an oft-proposed mechanism for CO depletion in disks \citep[e.g.][]{2013ApJ...776L..38F, 2016ApJ...819L...7N, 2016ApJ...822...53Y}. Stellar X-rays ionize helium, which then reacts with CO \citep{1973ApJ...185..505H, 2014FaDi..168...61B}: \begin{equation} \text{He}^+ + \text{CO} \rightarrow \text{C}^+ +\text{O} +\text{He}. \end{equation} Much of the C$^+$ is thought to be incorporated back into CO, but alternative pathways incorporating C$^+$ into CO$_2$, hydrocarbons, and complex oxygen-bearing molecules can still lead to significant CO depletion over timescales of several million years \citep[e.g.][]{1997ApJ...486L..51A, 2014FaDi..168...61B, 2016ApJ...822...53Y}. Alternatively, CO depletion in the warm molecular layer could be directly tied to CO freezeout deeper in the disk. \citet{2017ApJ...835..162X} presented ``turbulent-diffusion mediated CO depletion" models demonstrating that if small dust grains are reasonably settled in a disk with weak turbulence, then the fractional abundance of gas-phase CO in the warm molecular layer can eventually be reduced by an order of magnitude as CO diffuses into the cold midplane and then freezes out. However, turbulence limits for the inner disk of TW Hya would have to be obtained to assess the feasibility of this mechanism. Conversely, rather than interpreting the disk outside 15 AU as being CO-depleted in the warm molecular layer, the inner disk may be enhanced in CO if ice-coated particles drift inward and the ice subsequently sublimates \citep[e.g.][]{2004ApJ...614..490C, 2017AA...600A.140S}. The models investigating this effect have so far been one-dimensional. Further study on the heights at which this abundance enhancement occurs would help to determine the impact on CO emission, since enhancement limited to the midplane would not make much difference to optically thick emission. While gas density substructures and CO depletion have heretofore been discussed as separate possibilities, it is worth considering the extent to which they may be coupled. Reduced gas and dust surface densities lead to reduced UV opacities, which may allow UV radiation to dissociate CO more easily within the disk gaps \citep[e.g.][]{2009AA...503..323V}. In addition, bumps and dips in the gas surface density profile can regulate dust transport and growth \citep[e.g.][]{1972fpp..conf..211W, 2012AA...538A.114P}, which in turn may affect the efficiency of the grain surface reactions that serve as carbon sinks. Further chemical modeling would be useful to examine the extent to which CO depletion can be mediated by gas and dust gaps. \subsection{Possible Origins of the Radial Spectral Index Variations} We discuss below potential explanations for the appearance of the TW Hya continuum spectral index map, which shows a striking pattern of low values at the bright emission rings and high values within the emission gaps. \subsubsection{Radial Variation in Grain Sizes} Radial variations in $\alpha$ are often attributed to spatially varying grain size distributions in protoplanetary disks \citep[e.g.][]{2012ApJ...760L..17P, 2014AA...564A..93M, 2016ApJ...829L..35T}. Previous multi-frequency measurements of TW Hya have indicated the presence of centimeter-sized grains inward of $r \sim 15$ AU and the exclusion of such large grains from the 25 AU continuum gap \citep{2005ApJ...626L.109W, 2014AA...564A..93M, 2016ApJ...829L..35T}. With the high angular resolution 290 GHz spectral index map, we can also improve constraints on the grain size distribution in the narrow gaps and bright rings outside 25 AU. Following \citet{2016ApJ...829L..35T}, we estimate the intensity of the submillimeter dust emission as \begin{equation}\label{eq:intensity} I_\nu (r) = B_\nu(T_d(r))(1-\exp[-\tau_\nu(r)]), \end{equation} where $B_\nu$ is the Planck function, $T_\text{d}(r)$ is the dust temperature (assuming that the millimeter dust disk is essentially isothermal vertically), and $\tau_\nu(r)=\tau_\text{290 GHz}(r)(\nu/\text{290 GHz})^\beta$ is the dust optical depth. The spectral index is then \begin{equation}\label{eq:alpha} \alpha(r) = 3-x \frac{\exp{x}}{\exp{x}-1}+\beta(r) \frac{\tau_\nu(r)}{\exp{\tau_\nu(r)}-1}, \end{equation} where $x = \frac{h\nu}{k_B T_\text{d}(r)}$. The three unknowns are $\beta$, $T_d$, and $\tau_\nu$. While there are not sufficient constraints to solve for all three unknowns, useful limits can be placed on $\beta$. Figure \ref{fig:alpha} shows dust temperatures as a function of brightness temperatures for different fixed values of $\tau$, and then $\alpha$ as a function of $\tau$ and $\beta$ for a fixed brightness temperature of 11 K. The value of 11 K is chosen based on the brightness temperatures of the 290 GHz continuum emission rings at 35 and 45 AU. Because $\beta$ decreases as the maximum grain size increases, the upper limit on $\beta$ should be the ISM value of $\approx1.7$ \citep{2006ApJ...636.1114D}, when no grain growth has occurred. Since $\alpha$ decreases when $\tau$ increases and when $\beta$ decreases, placing a lower limit on $\tau$ also places a lower limit on $\beta$ when $\alpha$ is known. The dust temperature is likely no more than 30 K in the gaps and rings beyond a radius of 25 AU in the TW Hya, given that CO freezeout is expected to commence in the midplane somewhere between 11 and 33 AU \citep[e.g.][]{2013Sci...341..630Q, 2016ApJ...819L...7N, 2017NatAs...1E.130Z}. The brightness temperatures at radii from 25 to 50 AU range from 10 to 12 K. Using Equation \ref{eq:intensity}, this suggests that $\tau\gtrapprox 0.25$ at 290 GHz in the gaps and rings outside 25 AU. The peak $\alpha$ values at the 25, 41, and 47 AU continuum emission gaps are between 2.6 and 2.7. A lower bound of $\tau=0.25$ indicates that $\beta\gtrapprox 1$ in order to reproduce these $\alpha$ values, which would allow for grain growth up to a few mm \citep{2006ApJ...636.1114D}. In contrast, the low $\alpha$ values measured at the bright emission rings at 35 and 45 AU are compatible with $\beta\gtrapprox0.4$, which allows for centimer-size grains \citep[e.g.][]{2012ApJ...760L..17P}. \citet{2016ApJ...829L..35T} interpreted the high spectral index value in the 25 AU continuum gap as a signature of an embedded planet creating a pressure gradient that allows small grains to enter the gap but excludes large grains. This mechanism, known as dust filtration, is modeled in detail by \citet{2006MNRAS.373.1619R}, \citet{2006AA...453.1129P}, \citet{2012ApJ...755....6Z}, and \citet{2012AA...545A..81P}, among others. Dust filtration may also explain the gaps at 41 and 47 AU, given their similar spectral index signatures. \subsubsection{Optical Depth Variations} While spatially varying grain size distributions can generate the observed spectral index profile, an alternative scenario worth considering is that the radial spectral index variations are largely tracing optical depth variations instead. Previous analyses of millimeter continuum emission concluded that $\tau\sim1$ at $r<15$ AU in the TW Hya disk, in part based on the low spectral index values measured in the inner disk \citep{2016ApJ...820L..40A, 2016ApJ...829L..35T, 2017NatAs...1E.130Z}. However, the high-resolution 290 GHz spectral index radial profile also reveals low spectral index values of $\alpha\approx 2$ at the locations of the bright emission rings at $r\approx35$ and $r\approx45$ AU, raising the question of whether these are also marginally optically thick. We note that given the systematic uncertainties discussed in Section \ref{sec:results}, it is possible that the true $\alpha$ profile is shifted upward by up to $\Delta\alpha = 0.4$, which would imply that nearly the whole millimeter dust disk is optically thin. For the sake of simply formulating a plausibility argument for the optically thick scenario, though, the remainder of the calculations in this section will take the spectral index profile in Figure \ref{fig:spix} at face value. \begin{figure*}[htp] \centering \includegraphics[scale = 0.8]{alpha.pdf} \caption{\textit{Left}: Plot of the relationship between $T_B$ and $T_d$, computed at $\nu=290$ GHz and for several values of $\tau$. \textit{Right}: Plot of $\alpha$ at $T_B=11$ K as a function of $\tau$ and $\beta$.} \label{fig:alpha} \end{figure*} Referring again to Figure \ref{fig:alpha}, two points are worth emphasizing. First, low brightness temperatures are sometimes taken as prima facie evidence that the dust is optically thin, since the brightness temperature and dust temperature should be equal at large optical depths. The first panel of Figure \ref{fig:alpha} illustrates, though, that even at an optical depth as high as $\tau = 1$, the brightness temperature is $\sim30\%$ lower than the corresponding dust temperature. Thus, while \citet{2017NatAs...1E.130Z} point out that adopting the brightness temperature as the midplane dust temperature would yield an unrealistically cold disk, a value of $\tau = 1$ corresponds to midplane temperatures that are only a few degrees lower than previous TW Hya models \citep[e.g.][]{2013Sci...341..630Q, 2017NatAs...1E.130Z}. Second, $\alpha = 2$ is sometimes quoted as the lower bound set by optically thick emission, but this is specific to the Rayleigh-Jeans limit. The second panel of Figure \ref{fig:alpha} illustrates that at millimeter wavelengths, emission can still be optically thin when $\alpha = 2$, provided that $\beta$ is small (and therefore grain sizes are large). For a dust temperature of 11 K, which can occur in the outer regions of protoplanetary disks, $\alpha$ can be as low as 1.2 in the optically thick limit at 290 GHz. Figure \ref{fig:spix} shows that the azimuthally averaged spectral index values range from roughly 2.1 to 2.3 inside the bright emission rings at 35 and 45 AU. These $\alpha$ values are possible if $\tau\lessapprox1.5$ (see Figure \ref{fig:alpha}), still allowing the rings to be marginally optically thick. Even higher local values of $\tau$ may be compatible with the low brightness temperatures if the bright emission rings at 35 and 45 AU are actually a series of unresolved rings that result in a low beam filling factor \citep[e.g.][]{2012AA...540A...6R}. \citet{2016ApJ...820L..40A} tentatively identified additional emission gaps between 30 and 35 AU, noting that higher angular resolution and sensitivity would be needed to confirm. High dust optical depths imply high surface densities, so the gravitational stability of the potential unresolved narrow rings should be considered. The stability of the rings can be crudely estimated with Toomre's $Q$ parameter \citep{1964ApJ...139.1217T}, where $Q = c_s \Omega /\pi G \Sigma$. (This estimate does require the assumption of a geometrically thin disk, which may not necessarily be true for TW Hya.) Assuming an ISM gas-to-dust ratio of 100, $\Sigma\approx 100 \Sigma_\text{dust} \approx 100 \tau_\text{dust}/\kappa_\text{dust}$. We adopt a dust opacity at 290 GHz of $\kappa = 3.3$ cm$^2$ g$^{-1}$, based on the Mie scattering calculations reported in \citet{2009ApJ...700.1502A} for spherical grains with a minimum radius of $a=0.005$ $\mu$m, a maximum radius of 1 mm, a power-law distribution of $n(a)\propto a^{-3.5}$, silicate and graphite abundances derived in \citet{1977ApJ...217..425M}, and dielectric functions from \citet{1984ApJ...285...89D} and \citet{2001ApJ...548..296W}. For a stellar mass of 0.88 $M_\odot$ and an isothermal sound speed calculated at a temperature of 15 K, $Q>1$ for $\tau_\text{dust}<3.2$ at 35 AU and for $\tau_\text{dust}<2.2$ at 45 AU, suggesting that the rings can be optically thick and remain marginally gravitationally stable. Our calculation for $Q$ scales with the ratio $\kappa_\text{dust}/\tau_\text{dust}$. Based on a distribution-of-hollow-spheres (DHS) calculation for carbonaceous silicates, \citet{2016AA...586A.103W} advocate for the use of higher dust opacity values compared to the typically used Mie scattering values. Such higher opacity values would allow higher dust optical depths while maintaining gravitational stability. While optical depth effects may largely be sufficient to explain the spectral index at the gaps and rings between 25 and 45 AU, the final rise in the spectral index near the 47 AU emission gap is probably at least partially due to radial changes in $\beta$, since the peak in the spectral index profile is shifted slightly outward from the 47 AU gap. The continuum intensity depends on temperature and optical depth, so if the radial temperature gradient is not too steep, the radial locations of the minima in the emission profiles would be close to the locations of the minima in the optical depth profiles. On the other hand, $\alpha$ has an additional dependence on $\beta$. The 47 AU emission gap is not far from the edge of the millimeter dust disk, so the nearby rise in the spectral index may be influenced both by the deficit of material within the gap itself and by the bulk loss of large dust grains in the outer disk. \subsubsection{Comparison to Other Sources} Our calculations raise the possibility that all of the bright rings in the TW Hya millimeter continuum are marginally optically thick. This possibility has been suggested for other disks as well\textemdash to explain the correlation between the continuum luminosity and emitting area for a large disk sample, \citet{2017ApJ...845...44T} proposed that these disks consist of narrow, optically thick rings. Dust masses are often estimated using the \citet{1990AJ.....99..924B} formula assuming optically thin millimeter disk emission. If most disks are made up of optically thick rings, then dust masses have been systematically underestimated. In this case, CO or gas depletion may be even more severe than currently estimated, although large line optical depths may also contribute to underestimates of the amounts of CO or gas \citep[e.g.][]{2016ApJ...828...46A, 2016ApJ...827..142B, 2017ApJ...844...99L}. High-resolution, multi-band ALMA surveys of protoplanetary disks can determine whether other disks have continuum emission and spectral index profiles similar to that of TW Hya. Only one other protoplanetary disk, that of HL Tau, has had its millimeter spectral index mapped at an angular resolution comparable to the TW Hya observations \citep{2015ApJ...808L...3A}. The features are strikingly similar to those of TW Hya\textemdash the bright dust emission rings correspond to low spectral index values of $\alpha\approx2$ and the emission gaps correspond to high values of $\alpha\approx 3$. HL Tau and TW Hya may therefore reflect a common pattern in disks. If this is the case, the abrupt changes in the radial spectral index profiles may correspond to characteristic width scales for disk gaps. Measuring gap widths from intensity profiles is associated with significant ambiguity because an underlying ``unperturbed" profile has to be assumed \citep[e.g.][]{2016ApJ...818..158A, 2016PASJ...68...43K}. Hydrodynamic models of planet-forming disks often predict gap widths as a function of planet mass \citep[e.g.][]{2010AA...518A..16F, 2013ApJ...769...41D, 2013ApJ...768..143Z, 2015ApJ...809...93D, 2016ApJ...818...76J}, so linking gap widths in physical models to the widths of rings in resolved spectral index profiles may be useful for placing upper limits on the masses of potential embedded planets. However, it is currently ambiguous which, if any, features in the TW Hya disk are associated with embedded planets. While recent hydrodynamic simulations suggest that a single low-mass planet can create multiple gaps reminiscent of those observed in the millimeter continuum emission of TW Hya \citep{2017ApJ...835..146D, 2017ApJ...850..201B}, \citet{2017ApJ...837..132V} note that their derived gas surface density profile differs from predictions of gaps opened by planets in \citet{2015ApJ...807L..11D}. \subsection{Improving constraints on the structure of the TW Hya disk} While relatively simple parameterizations of the molecular abundance and temperature structures can reasonably reproduce the radial features observed in the single $^{12}$CO transition available at high resolution, better constraints need to be obtained on the vertical structure. Observing multiple transitions of all the isotopologues at comparably high angular resolution can reduce uncertainties with respect to the vertical distribution of CO. For example, whereas the inner edge of our $^{12}$CO surface density gap lies at a radius of 15 AU, \citet{2017NatAs...1E.130Z} constrained the inner edge of the gap to lie at a radius of 22 AU for C$^{18}$O. This modest difference may be due to the coarser angular resolution of the C$^{18}$O observations, but alternatively it could result from the onset radius of CO or gas depletion varying slightly with height, or from isotope-selective effects. Higher-resolution observations of C$^{18}$O would clarify the nature of this apparent difference. Several works have also suggested that the inner few AU of the TW Hya disk may either be warped or feature deviations from Keplerian rotation \citep[e.g.][]{2005ApJ...622.1171R, 2012ApJ...757..129R, 2017ApJ...835..205D}. These effects alone cannot create the axisymmetric substructures observed in the main CO isotopologues, but they would be worth considering in a more detailed analysis of the disk vertical structure. With the observations currently available, it is not straightforward to distinguish between gas disk substructure and CO depletion as the main explanation for the CO emission morphology. Although the gas surface density profile derived by \citet{2017ApJ...837..132V} appears to disfavor the possibility that CO is closely tracing the gas distribution, they assumed a constant gas-to-small-dust ratio. TW Hya is one of the few sources for which a disk gas mass has been measured without having to assume either an $X_\text{CO}$ value or gas-to-dust ratio, thanks to \textit{Herschel} observations of HD \citep{2013Natur.493..644B}. Although \citet{2015ApJ...799..204C} find that the bulk gas-to-dust ratio of the TW Hya disk is consistent with that of the ISM, the spatially unresolved HD observations do not exclude localized gas depletions. The question of how to reliably distinguish CO and gas depletion in disks has been raised in a number of works aiming to estimate the gas masses of protoplanetary disks from millimeter/submillimeter surveys of CO and dust \citep[e.g.][]{ 2016ApJ...827..142B,2017ApJ...844...99L, 2017AA...599A.113M}. As the nearest disk, TW Hya may be the most important test case for breaking the degeneracy. \citet{2017AA...599A.113M} suggest measuring hydrocarbon abundances to check for evidence of CO depletion, since hydrocarbons are believed to be a carbon sink when CO is destroyed by He$^+$. C$_2$H and $c$-C$_3$H$_2$ have been observed in the TW Hya disk at $\approx0\farcs4$ resolution by \citet{2016ApJ...831..101B}; re-observing at higher resolution to compare to CO emission, accompanied by chemical modeling, may yield additional insight into whether and how $X_\text{CO}$ varies throughout the disk. (Magneto)hydrodynamic simulations tailored to TW Hya would also shed some light on whether the CO emission morphology is tracing gas substructure rather than chemical depletion. While a direct correspondence between the CO and millimeter dust structures is not obvious in the data presented in this work, disk models indicate that embedded planets and dead zones can create gaps and rings in gas and millimeter dust that are offset from one another and differ in depth and width \citep[e.g.][]{2016AA...596A..81P, 2016AA...590A..17R, 2017ApJ...843..127D,2017arXiv171004418F}. A model that simultaneously matches the TW Hya millimeter observations and yields a gas surface density profile similar to that of the inferred CO surface density profile would be compelling evidence for gas substructure. \section{Summary}\label{sec:summary} We presented new ALMA observations of $^{12}$CO $J=3-2$ in the TW Hya disk at a spatial resolution of 8 AU, representing one of the highest resolution images so far of molecular line emission in a protoplanetary disk. We also reprocessed archival 1.3 mm and 870 $\mu$m continuum data to produce a spectral index map at a spatial resolution of 2 AU. Our results and conclusions are as follows: \begin{enumerate} \item The $^{12}$CO images exhibit radial emission breaks coinciding with gaps and rings previously observed in $^{13}$CO and C$^{18}$O emission. We employ LTE radiative transfer modeling to demonstrate that the $^{12}$CO emission morphology can be reasonably reproduced by a sharp drop in the CO column density at $r=15$ AU and a secondary peak at 70 AU. \item Analysis of the $^{12}$CO brightness temperatures and radiative transfer modeling suggest that the inferred CO column density variations are likely not associated with the onset of freezeout in the midplane. We propose instead that the variations in the $^{12}$CO column density arise either from spatial variations in $X_\text{CO}$ or from gas density reductions in the warm molecular layer of the disk. Based on similar features observed in the much lower abundance isotopologues, we further argue that these variations are likely present throughout most of the vertical extent of the warm layer. Distinguishing between CO depletion and gas disk substructures would be facilitated by obtaining more stringent constraints on the temperature structure of the disk and observing complementary molecular tracers of carbon depletion. \item The 290 GHz spectral index map shows a striking contrast between spectral index values of $\sim2$ at the bright continuum emission rings and $\sim2.7$ at the emission gaps. The high spectral index values within the emission gaps suggest that the maximum grain size is limited to a few millimeters. The low spectral index values at the continuum emission rings may be a signature of grain growth to centimer sizes, but a plausible alternative explanation is that the rings are all marginally optically thick. The latter possibility is worth investigating for a larger sample of disks to determine whether disk dust masses are being systematically underestimated. \end{enumerate} \acknowledgments We thank the NAASC staff for their advice on data reduction; Roy van Boekel, Hannah Jang-Condell, and Ke Zhang for their discussions of TW Hya; and the referee for useful comments. This paper makes use of ALMA data \dataset[ADS/JAO.ALMA\#2012.1.00422.S]{https://almascience.nrao.edu/aq/?project\_code=2012.1.00422.S}, \dataset[ADS/JAO.ALMA\#2013.1.00114.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.00114.S}, \dataset[ADS/JAO.ALMA\#2013.1.00196.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.00196.S}, \dataset[ADS/JAO.ALMA\#2013.1.00198.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.00198.S}, \dataset[ADS/JAO.ALMA\#2013.1.00387.S]{https://almascience.nrao.edu/aq/?project\_code=2013.00387.S}, \dataset[ADS/JAO.ALMA\#2013.1.01397.S]{https://almascience.nrao.edu/aq/?project\_code=2013.1.01397.S}, \dataset[ADS/JAO.ALMA\#2015.1.00686.S]{https://almascience.nrao.edu/aq/?project\_code=2015.1.00686.S}, \dataset[ADS/JAO.ALMA\#2015.A.00005.S]{https://almascience.nrao.edu/aq/?project\_code=2015.A.00005S}, and \dataset[ADS/JAO.ALMA\#2016.1.00629.S]{https://almascience.nrao.edu/aq/?project\_code=2016.1.00629.S}. ALMA is a partnership of ESO (representing its member states), NSF (USA) and NINS (Japan), together with NRC (Canada) and NSC and ASIAA (Taiwan), in cooperation with the Republic of Chile. The Joint ALMA Observatory is operated by ESO, AUI/NRAO and NAOJ. The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc. J.H. acknowledges support from the National Science Foundation Graduate Research Fellowship under Grant No. DGE-1144152 and from NRAO Student Observing Support. LIC acknowledges the support of NASA through Hubble Fellowship grant HST-HF2-51356.001-A awarded by the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., for NASA, under contract NAS 5-26555. KI\"O acknowledges funding through a Packard Fellowship for Science and Engineering from the David and Lucile Packard Foundation. T.B. acknowledges funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme under grant agreement No 714769. \software{\texttt{CASA} \citep{2007ASPC..376..127M}, \texttt{AstroPy} \citep{2013AA...558A..33A}, \texttt{analysisUtils} (\url{https://casaguides.nrao.edu/index.php/Analysis_Utilities}), \texttt{RADMC-3D} \citep{2012ascl.soft02015D}, \texttt{radmc3dPy} (\url{http://www.ast.cam.ac.uk/~juhasz/radmc3dPyDoc/index.html}), \texttt{vis\_sample} \citep{2015ApJ...806..154C, loomis}} \facility{ALMA} \bibliographystyle{aasjournal}
\section{Introduction} Very basic finite difference formulas in numerical analysis approximates the derivative $f'\left(x\right)$ using a sequence $h_{n}>0$ such that $h_{n}\to0.$ The two basic formulas are \[ \frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}}\to f'\left(x\right)\text{ and }\frac{f\left(x+h_{n}\right)-f\left(x-h_{n}\right)}{2h_{n}}\to f'\left(x\right). \] The first formula is \emph{Newton's difference quotient} and determines the slope of a secant line of the graph of $f.$ Roughly the Newton difference quotient approximates the slope of the tangent with an error proportional to $h_{n}.$ In Newton's difference quotient we could also use $h_{n}<0.$ The second formula is the \emph{symmetric difference quotient} and determines the slope of a cord of the graph of $f.$ Roughly the symmetric difference quotient approximates the slope of the tangent with an error proportional to $h_{n}^{2}.$ In this note we study the limits of the Newton difference quotients and of the symmetric difference quotients, when the function $f$ is continuous at $x,$ but fails to have a derivative at $x.$ Let $N_{f,x}$ be the set of limits of the Newton difference quotient for all $h_{n}$ such that the limit exists in the extended real numbers. And let $S_{f,x}$ be the set of limits of the difference quotient \[ \frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}} \] for all $h_{n},k_{n}>0$ such that the limit exists in the extended real numbers. When $k_{n}=h_{n}$ this is the symmetric difference quotient. Among our results are (\emph{a}) $N_{f,x}$ and $S_{f,x}$ are closed subsets of the extended real numbers, (\emph{b}) any closed subset of the extended real numbers equals $N_{f,0}$ for some $f,$ (\emph{c}) $N_{f,x}$ is a subset of $S_{f,x},$ and (\emph{d}) if $f$ is continuous on an interval then $N_{f,x}$ and $S_{f,x}$ are intervals. In part of Section \ref{sec:Interactions-Between-Cord} we assume $f$ is defined on a set of the form $\left\{ 0,h_{1},-k_{1},h_{2},-k_{2},\ldots\right\} ,$ $f\left(0\right)=0,$ and we assume the Newton difference quotients \[ \frac{f\left(h_{n}\right)}{h_{n}}\to R\text{ and }\frac{f\left(-k_{n}\right)}{-k_{n}}\to L \] converge to real numbers. We show that the set of limits $S$ of the sequences \[ \frac{f\left(x+h_{i_{n}}\right)-f\left(x-k_{j_{n}}\right)}{h_{i_{n}}+k_{j_{n}}} \] obtained by considering subsequences $h_{i_{n}},k_{j_{n}}$ of the sequences $h_{n},k_{n},$ depends on properties of the sequences $h_{n},k_{n}.$ For example, we show, (\emph{e}) if $h_{n},k_{n}$ both decay to zero at the same polynomial rate, then $S$ is the interval with endpoints $R$ and $L,$ (\emph{f}) if $h_{n},k_{n}$ decay at the same exponetial rate, then $S$ is a discrete set whose only accumulation points are $R$ and $L,$ and (\emph{g}) if $h_{n},k_{n}$ decay at the differten exponetial rates, then whether $S$ is a discrete set or an interval depend on the rates of decay. \section{Sequential Secant Derivatives\label{sec:Sequential-Secant-Derivatives}} We consider derivatives of real valued functions, our derivatives are defined in terms of sequences and we allow them to be infinite. Denote the real line by $\mathbb{R}$ and the \emph{extended real line} $\mathbb{R}\cup\left\{ \pm\infty\right\} $ by $\overline{\mathbb{R}}.$ \begin{defn} Let $f$ be a real valued function defined a the subset $D$ of $\mathbb{R}$ and let $x\in D.$ We say $L$ in $\overline{\mathbb{R}}$ is a \emph{sequential secant derivative of $f$ at $x,$} if there is a sequence $h_{n}\neq0,$ such that $h_{n}\to0,$ $x+h_{n}\in D,$ and \begin{equation} Df\left(x,h_{n}\right):=\frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}}\underset{n\to\infty}{\longrightarrow}L.\label{eq:Def-Sequential-Derivative} \end{equation} We say $L$ is a \emph{right hand sequential secant derivative of $f$ at $x,$} if $h_{n}>0,$ and a \emph{left hand sequential secant derivative of $f$ at $x,$} if $h_{n}<0.$ We will abbreviate $h_{n}>0$ and $h_{n}\to0$ as $n\to\infty$ by writing $h_{n}\searrow0.$ \end{defn} Clearly, $f$ is differentiable at $x$ with derivative $L$ if and only if (\ref{eq:Def-Sequential-Derivative}) holds for every $h_{n}\to0$ with $x+h_{n}\in D.$ The details can be found in any beginning analysis book, e.g., \cite{Str00} or \cite{Ped15}. \begin{rem} \label{sec-1-rem:Weierstrass}The definition of sequential secant derivative is motivated by Weierstrass' proof, see \cite{Wei86} or \cite{Ped15}, that the Weierstrass functions \[ W\left(x\right):=\sum_{k=0}^{\infty}a^{n}\cos\left(b^{n}\pi x\right), \] where $0<a<1$ is a real number, $b$ is an odd integer and $ab>1+\frac{3\pi}{2},$ have $\pm\infty$ (in our terminology) as sequential secant derivatives at any point $x.$ More precisely, Weierstrass showed there are sequences $h_{n}^{\pm}\searrow0,$ such that $\left|DW\left(x,-h_{n}^{-}\right)\right|\to\infty,$ $\left|DW\left(x,h_{n}^{+}\right)\right|\to\infty,$ and $DW\left(x,-h_{n}^{-}\right)$ and $DW\left(x,h_{n}^{+}\right)$ have different signs for all sufficiently large $n.$ \end{rem} To state and prove our results we need some terminology about subsets of the extended real numbers, this terminology is introduced in the following definition. \begin{defn} \label{def:closed-dense-isolated-interval}Let $S$ be a subset of the extended real line $\overline{\mathbb{R}}.$ (\emph{a}) We say $S$ is \emph{closed,} if any $L\in\overline{\mathbb{R}}$ for which there is a sequence of real numbers $L_{n}\in S\cap\mathbb{R}$ such that $L_{n}\to L$ must be in $S.$ (\emph{b}) We say a set of real numbers \emph{$A$ is dense in $S,$} if for any $L$ in $S,$ there is a sequence $a_{k}$ in $A,$ such that $a_{k}\to L.$ (\emph{c}) A point $L$ in $S$ \emph{is isolated in $S,$} if no sequence $a_{k}$ of points in $S$ with $a_{k}\neq L$ satisfies $a_{k}\to L.$ (\emph{d}) A \emph{closed interval in $\overline{\mathbb{R}}$} is a set of the form $\left[a,b\right]:=\left\{ t\in\overline{\mathbb{R}}:a\leq t\leq b\right\} ,$ where $a<b$ are in $\overline{\mathbb{R}}.$ \end{defn} For a bounded set $S$ this notion of ``closed'' agrees with the usual notion of a closed subset of the real line and for unbounded sets $S$ it agrees with the notion of a closed subset of the two-point-compactification of the real line. Similar remarks apply to the other terms in Definition \ref{def:closed-dense-isolated-interval}. We begin by showing that the set of all secant derivatives at a point is a closed subset of the extended real numbers. Conversely, we show that any non-empty closed subset of the extended real numbers is the set of secant derivatives at $0$ of some function defined on the closed interval $\left[0,1\right].$ \begin{thm} \label{thm:Seq-a-closed-set}Let $f$ be a real valued function defined a the subset $D$ of $\mathbb{R}$ and let $x\in D.$ The set of sequential secant derivatives of $f$ at $x$ is a closed subset of $\overline{\mathbb{R}}$. \end{thm} \begin{proof} Suppose the real numbers $L_{n}$ are sequential secant derivatives of $f$ at $x,$ $L\in\overline{\mathbb{R}},$ and $L_{n}\to L.$ We must show $L$ is a secant derivative of $f$ at $x.$ For each $n,$ let $h_{n,m}\neq0$ be such that $h_{n.m}\to0$ as $m\to\infty$ and \[ \frac{f\left(x+h_{n,m}\right)-f\left(x\right)}{h_{n,m}}\underset{m\to\infty}{\longrightarrow}L_{n}. \] Pick $N_{n}$ such that \[ \left|\frac{f\left(x+h_{n,N_{n}}\right)-f\left(x\right)}{h_{n,N_{n}}}-L_{n}\right|<\frac{1}{n}. \] It follows that \[ \frac{f\left(x+h_{n,N_{n}}\right)-f\left(x\right)}{h_{n,N_{n}}}\underset{n\to\infty}{\longrightarrow}L. \] Hence $L$ is sequential secant derivative of $f$ at $x.$ \end{proof} Similarly, the set of right hand (and the set of left hand) sequential secant derivatives of $f$ at a point $x$ are closed subsets of $\overline{\mathbb{R}}.$ In the following we explore the structure of the sets of sequential secant derivatives of functions defined on intervals. For simplicity we state the results for right hand sequential derivatives at $0$ for functions defined on the closed interval $\left[0,1\right].$ \begin{thm} \label{thm:Seq-any-closed-set}Given any non-empty closed subset $S$ of the extended real numbers. there is a real valued function $f$ defined on the closed interval $\left[0,1\right],$ such that the set of right hand sequential secant derivatives of $f$ at $0$ equals the set $A.$ \end{thm} \begin{proof} Let $S$ be a closed subset of the extended real numbers. There are several cases depending on whether or not $\pm\infty$ are in $S$ or are isolated points of $S.$ We will give a proof in case for the situation where $\infty$ is an isolated point of $S$ and either $-\infty$ is not in $S$ or $-\infty$ is not an isolated point of $S.$ The modifications needed for the other cases are left for the reader. Let $a_{1},a_{2},\ldots$ be a countable dense subset of $S\setminus\left\{ \infty\right\} $ consisting of real numbers. Let $f\left(0\right)=0.$ Let $\xi_{n}>0$ be a strictly decreasing sequence such that $\xi_{1}=1$ and $\xi_{n}\to0.$ For each $n,$ partition the interval $\left(\xi_{n+1},\xi_{n}\right]$ into $n+1$ subintervals $\left(\xi_{n,k-1},\xi_{n,k}\right],$ $k=1,2,\ldots,n+1.$ For $x$ in an interval of the form $\left(\xi_{n,k-1},\xi_{n,k}\right]$ with $1\leq k\leq n$ let $f\left(x\right)=a_{k}x,$ for $x$ in an interval of the form $\left(\xi_{n,n},\xi_{n,n+1}\right]$ let $f\left(x\right)=\sqrt{x}$. Then the graph of $f$ contains segments of the graph of the equation $y=a_{k}x$ arbitrarily close to the origin, hence all the numbers $a_{1},a_{2},\ldots$ are right hand sequential secant derivatives of $f$ at $0.$ Similarly, the graph of $f$ contains segments of the graph of $y=\sqrt{x}$ arbitrarily close to the origin, hence $+\infty$ is a right hand sequential secant derivative of $f$ at $0.$ Suppose $L$ is a right hand sequential secant derivative of $f$ at $0.$ Then there is a sequence $h_{m}\searrow0$ such that $\tfrac{f\left(h_{m}\right)}{h_{m}}\to L.$ Now each $h_{m}$ is in one of the intervals in $\left(\xi_{n,k-1},\xi_{n,k}\right].$ If $k\leq n,$ then $\tfrac{f\left(h_{m}\right)}{h_{m}}=a_{k},$ where $k=k\left(m\right)$ depends on $m.$ If $k=n+1,$ then $\tfrac{f\left(h_{m}\right)}{h_{m}}=\frac{1}{\sqrt{h_{m}}}.$ Since $\frac{1}{\sqrt{h_{m}}}\to\infty$ and $\infty$ is isolated in $S,$ it follows that, either $\tfrac{f\left(h_{m}\right)}{h_{m}}=\frac{1}{\sqrt{h_{m}}}$ for all but a finite number of $m$ or $\tfrac{f\left(h_{m}\right)}{h_{m}}=a_{k\left(m\right)}$ for all but a finite number of $m.$ In the first case $L=\infty\in S,$ in the second case $L\in S,$ since $a_{k\left(m\right)}\to L$ as $m\to\infty$ and $S\setminus\left\{ \infty\right\} $ is closed. \end{proof} By Theorem \ref{thm:Seq-any-closed-set} any closed set is the set of sequential derivatives at a point of a real valued function defined on an interval. The following theorem shows that if $f$ is continuous on the interval the conclusion is completely different, in fact, then the set of sequential secant derivates must be a single point or a closed interval. \begin{thm} \label{sec-1-thm:continuous}If $f:\left[0,1\right]\to\mathbb{R}$ is continuous, then the set of right hand sequential secant derivatives of $f$ at $0$ is either a single point or a closed interval in $\overline{\mathbb{R}}$. \end{thm} \begin{proof} Replacing $f$ by $f\left(x\right)-f\left(0\right),$ if necessary, we may assume $f\left(0\right)=0.$ Suppose $L<M$ are right hand derivatives of $f$ at $0.$ Let $L<K<M.$ We must show $K$ is a right hand sequential secant derivative of $f$ at $0.$ Suppose $h_{n}\searrow0,$ $k_{n}\searrow0,$ $\tfrac{f\left(h_{n}\right)}{h_{n}}\to L$ and $\tfrac{f\left(k_{n}\right)}{k_{n}}\to M.$ By passing to subsequences, if necessary, we may assume \[ h_{1}>k_{1}>h_{2}>k_{2}>h_{3}>k_{3}>\cdots \] and \[ \frac{f\left(h_{n}\right)}{h_{n}}<K<\frac{f\left(k_{n}\right)}{k_{n}} \] for all $n.$ Since $\tfrac{f\left(x\right)}{x}$ is continuous on the interval $\left[k_{n},h_{n}\right],$ it follows from the Intermediate Value Theorem, that there are $\ell_{n},$ such that $k_{n}<\ell_{n}<h_{n}$ and $\tfrac{f\left(\ell_{n}\right)}{\ell_{n}}=K.$ This completes the proof. \end{proof} The functions constructed in the proof of Theorem \ref{thm:Seq-any-closed-set} are not continuous. However, we have the following analog of Theorem \ref{thm:Seq-any-closed-set} for continuous functions. \begin{thm} \label{sec-1-thm:sine} Any closed subinterval of the extended real line is the set of right hand sequential secant derivatives at $0$ of some continuous function defined on the closed interval $\left[0,1\right].$ \end{thm} \begin{proof} If $f\left(x\right)=\sqrt{x}\sin\left(\frac{1}{x}\right)$ when $x>0$ and $f\left(0\right)=0,$ then $f$ is continuous and the collection of all right hand secant derivatives equals the extended real line. Suppose $a<b$ are real numbers. If $\left|a\right|\leq\left|b\right|,$ let $f\left(0\right)=0$ and for $x>0$ let \[ f_{a,b}\left(x\right):=\begin{cases} bx\sin\left(\frac{1}{x}\right) & \text{when }b\sin\left(\frac{1}{x}\right)\geq a\\ ax & \text{when }b\sin\left(\frac{1}{x}\right)<a \end{cases}. \] If $\left|b\right|<\left|a\right|,$ let $f\left(0\right)=0$ and for $x>0$ let \[ f_{a,b}\left(x\right):=\begin{cases} ax\sin\left(\frac{1}{x}\right) & \text{when }b\sin\left(\frac{1}{x}\right)\geq a\\ bx & \text{when }b\sin\left(\frac{1}{x}\right)<a \end{cases}. \] In either case, $f$ is continuous on the closed interval $\left[0,1\right]$ and the set of right hand sequential secant derivatives of $f$ at the origin equals the closed interval $\left[a,b\right].$ The cases where one endpoint is infinite and the other endpoint is finite is left for the reader. \end{proof} \section{Sequential Cord Derivatives } In Section \ref{sec:Sequential-Secant-Derivatives} we considered the slopes of secant lines with endpoints $\left(x,f\left(x\right)\right)$ and $\left(x+h_{n},f\left(x+h_{n}\right)\right)$ for sequences $h_{n}\neq0.$ In this section we consider the slopes of cords with endpoints $\left(x-k_{n},f\left(x-k_{n}\right)\right)$ and $\left(x+h_{n},f\left(x+h_{n}\right)\right)$ for sequences $h_{n},k_{n}>0.$ \begin{defn} We say $L\in\overline{\mathbb{R}}$ is a \emph{sequential cord derivative of $f$ at $x,$} if there is are sequences $h_{n}\searrow0,$ and $k_{n}\searrow0,$ such that $x+h_{n}\in D,$ $x-k_{n}\in D,$ and \[ \frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}\underset{n\to\infty}{\longrightarrow}L. \] For the sake of brevity, we will often say \emph{cord derivative} in place of \emph{sequential cord derivative}. \end{defn} We begin by showing that, if $f$ is differentiable at $x,$ then all the sequential cord derivatives of $f$ at $x$ exist and are equal to the derivative $f'\left(x\right)$ of $f$ at the point $x.$ \begin{prop} If $f'\left(x\right)$ exists, $h_{n}\searrow0,$ and $k_{n}\searrow0,$ then \[ \frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}\underset{n\to\infty}{\longrightarrow}f'\left(x\right). \] \end{prop} \begin{proof} \textcolor{black}{Suppose $f'\left(x\right)$ is a real number. Let $\varepsilon>0$ be fixed. Pick $n$ such that $\frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}}$ and $\frac{f\left(x-k_{n}\right)-f\left(x\right)}{-k_{n}}$ both are within $\varepsilon$ of $f'\left(x\right).$ Since } \begin{align*} & \frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}\\ & =\frac{h_{n}}{h_{n}+k_{n}}\frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}}+\frac{k_{n}}{h_{n}+k_{n}}\frac{f\left(x-k_{n}\right)-f\left(x\right)}{-k_{n}}. \end{align*} Combining this with $\frac{h_{n}}{h_{n}+k_{n}}\geq0,$ $\frac{k_{n}}{h_{n}+k_{n}}\geq0,$ and $\frac{h_{n}}{h_{n}+k_{n}}+\frac{k_{n}}{h_{n}+k_{n}}=1$ we see that \begin{align*} & \left|\frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}-f'\left(x\right)\right|\\ & \leq\frac{h_{n}}{h_{n}+k_{n}}\left|\frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}}-f'\left(x\right)\right|+\frac{k_{n}}{h_{n}+k_{n}}\left|\frac{f\left(x-k_{n}\right)-f\left(x\right)}{-k_{n}}-f'\left(x\right)\right|\\ & <\frac{h_{n}}{h_{n}+k_{n}}\varepsilon+\frac{k_{n}}{h_{n}+k_{n}}\varepsilon\\ & =\varepsilon. \end{align*} The cases where $f'\left(x\right)=\pm\infty$ are left for the reader. This completes the proof. \end{proof} The following provides a converse to the previous result, when $f$ is assumed to be continuous at the point of interest. \begin{thm} If $f$ is continuous at $x$ and all the cord derivatives of $f$ at $x$ exists and equals $L\in\overline{\mathbb{R}},$ then $f'\left(x\right)$ exists and equals $L.$ \end{thm} \begin{proof} By assumption \[ \frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}\underset{n\to\infty}{\longrightarrow}L \] for all $h_{n}\searrow0,$ and $k_{n}\searrow0.$ Suppose $h_{n}\searrow0.$ Since $f$ is continuous at $x$ we can pick $k_{n}\searrow0$ such that $k_{n}\leq h_{n}^{2}$ and $\left|f\left(x-k_{n}\right)-f\left(x\right)\right|\leq h_{n}^{2}.$ Using \begin{align*} \frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}} & =\frac{h_{n}+k_{n}}{h_{n}}\cdot\frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}+\frac{f\left(x-k_{n}\right)-f\left(x\right)}{h_{n}} \end{align*} we conclude, $\frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}}\to L.$ Hence, the right hand derivative of $f$ at $x$ exists and equals $L.$ Similarly, the left hand derivative of $f$ at $x$ exists and equals $L.$ \end{proof} Our next result shows that the set of sequential cord derivatives at a point is a closed. It is the analog of Theorem \ref{thm:Seq-a-closed-set} for cord derivatives. \begin{thm} \label{thm:Cord-derivatives-closed}The set of sequential cord derivatives at $x$ is a closed subset of $\overline{\mathbb{R}}.$ \end{thm} \begin{proof} Suppose $L_{n}\in\mathbb{R}$ is a sequence of cord derivatives at $x$ and $L_{n}\to L$ as $n\to\infty.$ We must show $L$ is a cord derivative. For each $n,$ let $h_{n,m}\searrow0$ and $k_{n,m}\searrow0$ be such that \[ \frac{f\left(x+h_{n,m}\right)-f\left(x-k_{n,m}\right)}{h_{n,m}+k_{n,m}}\underset{m\to\infty}{\longrightarrow}L_{n}. \] Pick $N_{n}$ such that \[ \left|\frac{f\left(x+h_{n,N_{n}}\right)-f\left(x-k_{n,N_{n}}\right)}{h_{n,N_{n}}+k_{n,N_{n}}}-L_{n}\right|<\frac{1}{n} \] then \[ \frac{f\left(x+h_{n,N_{n}}\right)-f\left(x-k_{n,N_{n}}\right)}{h_{n,N_{n}}+k_{n,N_{n}}}\underset{n\to\infty}{\longrightarrow}L. \] This completes the proof. \end{proof} In Theorem \ref{sec-1-thm:continuous} we showed that the set of one-sided secant derivatives of a continuous function is a closed interval. Our next result establishes an appropriate version of this for cord derivatives. \begin{thm} \label{sec-2-thm:f-is-continuous}If $f:\left[-1,1\right]\to\mathbb{R}$ is continuous, then the set of sequential cord derivatives of $f$ at $0$ is either the empty set, a single point, or a closed interval in $\overline{\mathbb{R}}$. \end{thm} \begin{proof} Replacing $f$ by $f\left(x\right)-f\left(0\right),$ if necessary, we may assume $f\left(0\right)=0.$ Suppose $L^{-}<L^{+}$ are cord derivatives of $f$ at $0.$ Let $L^{-}<K<L^{+}.$ We must show $K$ is a sequential cord derivative of $f$ at $0.$ Suppose $h_{n}^{\pm}\searrow0,$ $k_{n}^{\pm}\searrow0,$ $\tfrac{f\left(h_{n}^{\alpha}\right)-f\left(-k_{n}^{\alpha}\right)}{h_{n}^{\alpha}+k_{n}^{\alpha}}\to L^{\alpha},$ for $\alpha=\pm.$ Hence for sufficiently large $n$ \[ \tfrac{f\left(h_{n}^{-}\right)-f\left(-k_{n}^{-}\right)}{h_{n}^{-}+k_{n}^{-}}<K<\tfrac{f\left(h_{n}^{+}\right)-f\left(-k_{n}^{+}\right)}{h_{n}^{+}+k_{n}^{+}}. \] Let \[ \phi_{n}\left(t\right)=\tfrac{f\left(th_{n}^{-}+\left(1-t\right)h_{n}^{+}\right)-f\left(-tk_{n}^{-}-\left(1-t\right)k_{n}^{+}\right)}{th_{n}^{-}+\left(1-t\right)h_{n}^{+}+tk_{n}^{-}+\left(1-t\right)k_{n}^{+}}. \] The $\phi_{n}$ is continuous on $\left[0,1\right],$ $\phi_{n}\left(0\right)=\tfrac{f\left(h_{n}^{+}\right)-f\left(-k_{n}^{+}\right)}{h_{n}^{+}+k_{n}^{+}}$ and $\phi_{n}\left(1\right)=\tfrac{f\left(h_{n}^{-}\right)-f\left(-k_{n}^{-}\right)}{h_{n}^{-}+k_{n}^{-}}.$ It follows from the Intermediate Value Theorem, that $\phi_{n}\left(t_{n}\right)=K$ for some $t_{n}$ between $0$ and $1.$ Setting $h_{n}'=t_{n}h_{n}^{-}+\left(1-t_{n}\right)h_{n}^{+}$ and $k_{n}'=tk_{nn}^{-}+\left(1-t_{n}\right)k_{n}^{+}$ it follows that $h_{n}'\searrow0,$$k_{n}'\searrow0$ and $\frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}=K$ for all sufficiently large $n.$ This completes the proof. \end{proof} \section{Interactions Between Cord and Secant Derivatives\label{sec:Interactions-Between-Cord}} In this section we establish some relationships between the cord and secant derivatives. Our first result gives a condition under which the set of secant derivatives at a point $x$ is a subset of the set of cord derivatives at $x.$ We show that it may be a proper subset and apply the inclusion to the Weierstrass function. \begin{thm} \label{sec-3-THM:secant-subset-cord}If $f$ is continuous at $x,$ then the set of secant derivatives of $f$ at $x$ is a subset of the set of cord derivatives of $f$ at $x$. \end{thm} \begin{proof} Let $L$ be a right hand secant derivative of $f.$ By assumption \[ \frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}}\underset{n\to\infty}{\longrightarrow}L \] for some $h_{n}\searrow0.$ Since $f$ is continuous at $x$ we can pick $k_{n}\searrow0$ such that $k_{n}\leq h_{n}^{2}$ and $\left|f\left(x-k_{n}\right)-f\left(x\right)\right|\leq h_{n}^{2}.$ By the choice of $k_{n}$ we have $\frac{h_{n}+k_{n}}{h_{n}}\to1$ and $\frac{f\left(x-k_{n}\right)-f\left(x\right)}{h_{n}}\to0.$ Hence, using \begin{align*} \frac{f\left(x+h_{n}\right)-f\left(x\right)}{h_{n}} & =\frac{h_{n}+k_{n}}{h_{n}}\cdot\frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}+\frac{f\left(x-k_{n}\right)-f\left(x\right)}{h_{n}} \end{align*} we conclude, $\frac{f\left(x+h_{n}\right)-f\left(x-k_{n}\right)}{h_{n}+k_{n}}\to L.$ Hence, a cord derivative of $f$ at $x$ exists and equals $L.$ The case where $L$ is a left hand secant derivative of $f$ is similar. \end{proof} \begin{example} The Weierstrass function revisited. Weierstrass showed that $\pm\infty$ are secant derivatives of $W$ at any point $x.$ By Theorem \ref{sec-3-THM:secant-subset-cord} $\pm\infty$ are also cord derivatives of $W$ at any point $x.$ Since $W$ is continuous on the real line, it follows from Theorem \ref{sec-2-thm:f-is-continuous} that at any point $x,$ the set of cord derivatives of $W$ equals the extended real line $\overline{\mathbb{R}}.$ \end{example} In light of Theorem \ref{sec-3-THM:secant-subset-cord} a natural question is: Can the set of secant derivatives be a proper subset of the set of cord derivates? By considering simple examples it is easy to see that the answer is yes. A simple example is provided by considering $f\left(x\right)=\left|x\right|$ another example is provided in Example \ref{sec-3-exa:intervals}. \begin{example} If $f\left(x\right):=\left|x\right|$ and $-1\leq L\leq1,$ then there exists $h_{n}\searrow0,$ and $k_{n}\searrow0,$ such that \[ \frac{f\left(h_{n}\right)-f\left(-k_{n}\right)}{h_{n}+k_{n}}\underset{n\to\infty}{\longrightarrow}L. \] \end{example} \begin{proof} This follows from Theorem \ref{sec-3-thm:poly}. We provide a simple direct proof, the proof introduces some ideas used below. (\emph{a}) If $L=0,$ let $h_{n}=k_{n}=\frac{1}{n}.$ (\emph{b}) Suppose $0<L<1.$ Consider $h_{n}=\frac{1}{n}$ and $k_{n}=\frac{b}{n},$ then \[ \frac{\frac{1}{n}-\frac{b}{n}}{\frac{1}{n}+\frac{b}{n}}=\frac{1-b}{1+b}=L. \] Solving for $b$ we see $b=\left(1-b\right)/\left(1+L\right)$ does the job. (\emph{c}) If $L=1$ setting $h_{n}=\frac{1}{n}$ and $k_{n}=\frac{1}{n^{2}}$ does the job, since \[ \frac{\frac{1}{n}-\frac{1}{n^{2}}}{\frac{1}{n}+\frac{1}{n^{2}}}=\frac{1-\frac{1}{n}}{1+\frac{1}{n}}\to1. \] This also follows from Proposition \ref{sec-3-THM:secant-subset-cord}. (\emph{d}) We leave the cases $-1\leq L<0$ for the reader. \end{proof} Below we calculate the set of cord derivatives assuming the right hand and left hand secant derivatives exists. To simplify the notation we assume the point of interest is $x=0$ and $f\left(0\right)=0.$ We can always arrange this by considering $g\left(t\right)=f\left(t+x\right)-f\left(x\right)$ in place of $f.$ Suppose $h_{n}\searrow0$ and $k_{n}\searrow0.$ The basis for our calculations is the formula \begin{equation} \frac{f\left(h_{n}\right)-f\left(-k_{n}\right)}{h_{n}+k_{n}}=\frac{h_{n}}{h_{n}+k_{n}}\cdot\frac{f\left(h_{n}\right)}{h_{n}}+\frac{k_{n}}{h_{n}+k_{n}}\cdot\frac{f\left(-k_{n}\right)}{-k_{n}}.\label{sec-3-eq:Basic-Calculation} \end{equation} Suppose \begin{equation} \frac{h_{i_{n}}}{h_{i_{n}}+k_{i_{n}}}\to r,\text{}\frac{f\left(h_{n}\right)}{h_{n}}\to R\text{ and }\frac{f\left(-k_{n}\right)}{-k_{n}}\to L\text{ as }n\to\infty\label{sec-3-eq:Basic-Assumptions} \end{equation} where $R$ and $L$ are real numbers and $h_{i_{n}}$ is a subsequence of $h_{n}$ and $k_{j_{n}}$ is a subsequence of $k_{n},$ then $0\leq r\leq1$ and \begin{equation} \frac{f\left(h_{i_{n}}\right)-f\left(-k_{j_{n}}\right)}{h_{i_{n}}+k_{j_{n}}}\to rR+\left(1-r\right)L\text{ as }n\to\infty.\label{sec-3-eq:Basic-Conclusion} \end{equation} Where Equation (\ref{sec-3-eq:Basic-Conclusion}) follows from (\ref{sec-3-eq:Basic-Assumptions}) by replacing the sequences $h_{n}$ and $k_{n}$ by the appropriate subsequences in (\ref{sec-3-eq:Basic-Calculation}). In particular, \begin{prop} \label{sec-3-prop:Cord-between-Secants}If $h_{n},k_{n}\searrow0,$ $f$ is defined on the set $\left\{ 0,h_{1},-k_{1},h_{2},-k_{2},\ldots\right\} ,$ $L,R$ are real numbers, and \[ \frac{f\left(h_{n}\right)}{h_{n}}\to R\text{ and }\frac{f\left(-k_{n}\right)}{-k_{n}}\to L, \] then any cord derivative of $f$ at $0$ is a real number between $R$ and $L.$ \end{prop} Below we explore the converse of this statement. When $h_{n}$ and $k_{n}$ decay at the same polynomial rate, then any real number between $R$ and $L$ is a cord derivative. When $h_{n}$ and $k_{n}$ decay at the same exponential rate, then the only accumulation points of the set of cord derivatives are $R$ and $L,$ in particular, the set of cord derivatives is not an interval. \begin{thm} \label{sec-3-thm:poly}Let $a,b,m>0$ be real numbers. Suppose $p\left(n\right),q\left(n\right)$ are increasing functions and \[ \frac{p\left(n\right)}{n^{m}}\to a\text{ and }\frac{q\left(n\right)}{n^{m}}\to b. \] Let $h_{n}:=\tfrac{1}{p\left(n\right)}$ and $k_{n}:=\tfrac{1}{q\left(n\right)}.$ Let $f$ be a function defined on $\left\{ 0,h_{1},-k_{1},h_{2},-k_{2},\ldots\right\} $ and let $R,L$ be real numbers. If $f\left(0\right)=0$ and \[ \frac{f\left(h_{n}\right)}{h_{n}}\to R\text{ and }\frac{f\left(-k_{n}\right)}{-k_{n}}\to L \] then every real number between $L$ and $R$ is a cord derivative of $f$ at $0.$ \end{thm} \begin{proof} By Equation (\ref{sec-3-eq:Basic-Conclusion}) and Theorem \ref{thm:Cord-derivatives-closed} it is sufficient to show that given any $0<r<1$ we can find subsequences $h_{i_{n}}$ and $k_{j_{n}}$ such that \[ \frac{h_{i_{n}}}{h_{i_{n}}+k_{j_{n}}}\to r. \] For integers $i,j$ we have \[ \frac{p\left(in\right)}{n^{m}}=i^{m}\frac{p\left(in\right)}{\left(in\right)^{m}}\underset{n\to\infty}{\longrightarrow}i^{m}a\text{ and }\frac{q\left(jn\right)}{n^{m}}\underset{n\to\infty}{\longrightarrow}j^{m}b. \] Hence \[ \frac{h_{in}}{h_{in}+k_{jn}}=\frac{q\left(jn\right)}{q\left(jn\right)+p\left(in\right)}\underset{n\to\infty}{\longrightarrow}\frac{j^{m}b}{j^{m}b+i^{m}a}. \] It remains to show we can pick $i,j$ arbitrarily large such that $\frac{j^{m}b}{j^{m}b+i^{m}a}$ is within $\varepsilon>0$ of $r.$ To this end, let $j'$ be so large that $\tfrac{1}{j'^{m}}<\varepsilon$ and $r<\frac{j'^{m}b}{j'^{m}b+a}.$ Let $i$ be such that $\frac{j'^{m}b}{j'^{m}b+i^{m}a}<r$ and let $j>j'$ be such that \[ \frac{j^{m}b}{j^{m}b+i^{m}a}<r\leq\frac{\left(j+1\right)^{m}b}{\left(j+1\right)^{m}b+i^{m}a}. \] We complete the proof by showing \[ \frac{\left(j+1\right)^{m}b}{\left(j+1\right)^{m}b+i^{m}a}-\frac{j^{m}b}{j^{m}b+i^{m}a}<\varepsilon. \] Let \[ f\left(t\right)=\frac{bt}{bt+i^{m}a}, \] then we must show $f\left(j+1\right)-f\left(j\right)<\varepsilon.$ Now \[ 0<f'\left(t\right)=\frac{bai^{m}}{\left(bt+i^{m}a\right)^{2}}<\frac{bai^{m}}{2bti^{m}a}=\frac{1}{2t} \] uniformly in $i.$ By the Mean Value Theorem \[ f\left(j+1\right)-f\left(j\right)=f'\left(c\right)<\frac{1}{2c}<\frac{1}{2j}<\frac{1}{2j'}<\varepsilon. \] This completes the proof. \end{proof} \begin{example} \label{sec-3-exa:intervals}Let $a<b$ and $c<d$ be real numbers. Let $f_{a,b}$ be as in the proof of Theorem \ref{sec-1-thm:sine}. The the right hand secant derivatives of $f_{a,b}$ at $0$ equals the interval $\left[a,b\right]$ and the set of left hand secant derivatives of $x\to f_{-d,-c}\left(-x\right)=f_{c,d}\left(x\right)$ at $0$ equals the interval $\left[c,d\right].$ Let \[ g\left(x\right):=\begin{cases} f_{a,b}\left(x\right) & \text{when }x\geq0\\ f_{-d,-c}\left(-x\right) & \text{when }x<0 \end{cases}. \] We claim that the set of cord derivatives of $g$ is the the convex hull $\left[\min\left\{ a,c\right\} ,\max\left\{ b,d\right\} \right]$ of the intervals $\left[a,b\right]$ and $\left[c,d\right].$ \end{example} \begin{proof} If one of $\left[a,b\right]$ and $\left[c,d\right]$ is a subinterval, the claim follows from Theorem \ref{sec-3-THM:secant-subset-cord} and Proposition \ref{sec-3-prop:Cord-between-Secants}. Since $\sin\left(\frac{1}{x}\right)=y$ has solutions $x=\frac{1}{\arcsin\left(y\right)+2\pi k}$ where $k$ is an integer, there are harmonic progressions $\alpha_{n}=\frac{1}{p+qn}$ and $\beta_{n}=\frac{1}{r+sn}$ such that $f_{a,b}\left(\alpha_{n}\right)=a\alpha_{n}$ and $f_{a,b}\left(\beta_{n}\right)=b\beta_{n}$ and similarly for $f_{-d,-c}.$ Consequently, the claim follows from Theorem \ref{sec-3-thm:poly}. \end{proof} If follows from Theorem \ref{sec-3-thm:poly} that if $h_{n}$ and $k_{n}$ decay at the same polynomial rate, then the set of cord derivatives is an interval. It follows from our next result that, if the sequences $h_{n}$ and $k_{n}$ decay exponentially, then the set of cord derivatives need not be an interval. \begin{thm} Suppose $a,b>1$ are real numbers. Let $h_{n}:=\tfrac{1}{a^{n}}$ and $k_{n}:=\tfrac{1}{b^{n}}.$ Let $f$ be a function defined on $\left\{ 0,h_{1},-k_{1},h_{2},-k_{2},\ldots\right\} $ and let $R,L$ be real numbers. Assume $f\left(0\right)=0$ and \[ \frac{f\left(h_{n}\right)}{h_{n}}\to R\text{ and }\frac{f\left(-k_{n}\right)}{-k_{n}}\to L. \] \begin{itemize} \item If $\frac{\log\left(a\right)}{\log\left(b\right)}$ is a rational number, then $R$ and $L$ are the only accumulation points of the set of cord derivatives of $f$ at $0.$ \item If $\frac{\log a}{\log b}$ is an irrational number, then every real number between $L$ and $R$ is a cord derivative of $f$ at $0.$ \end{itemize} \end{thm} \begin{proof} Note \[ \frac{h_{i_{n}}}{h_{i_{n}}+k_{i_{n}}}=\frac{b^{j_{n}}}{b^{j_{n}}+a^{i_{n}}}=\frac{1}{1+\frac{a^{i_{n}}}{b^{j_{n}}}}. \] Let $s:=\frac{1-r}{r}.$ Then \begin{equation} \frac{h_{i_{n}}}{h_{i_{n}}+k_{i_{n}}}\to r\quad\text{iff}\quad\frac{a^{i_{n}}}{b^{j_{n}}}\to s\quad\text{iff}\quad i_{n}\frac{\log\left(a\right)}{\log\left(b\right)}-j_{n}\to\frac{\log\left(s\right)}{\log\left(b\right)}.\label{sec-3-eq:r-to-s} \end{equation} If $\frac{\log\left(a\right)}{\log\left(b\right)}$ is an irrational number, then the set \begin{equation} \left\{ i\frac{\log\left(a\right)}{\log\left(b\right)}-j:i,j\in\mathbb{N}\right\} \label{sec-3-eq:rotations} \end{equation} is dense in the real line. On the other hand, if $\frac{\log\left(a\right)}{\log\left(b\right)}=\frac{p}{q}$ is a rational number, then the set in Equation (\ref{sec-3-eq:rotations}) is a subset of the fractions with denominator $q.$ Using (\ref{sec-3-eq:r-to-s}) and that the set of cord derivatives is a closed set (by Theorem \ref{thm:Cord-derivatives-closed}) the result follows. \end{proof} The density of the set in Equation (\ref{sec-3-eq:rotations}) was first proved by Nicole Oresme around $1360$ in his paper \emph{De commensurabilitate vel incommensurabilitate motuum celi}. For an English translation of Oresme's proof see \cite{Gra61}. A detailed analysis of Oresme's proof is in \cite{Pla93}. More contemporary proofs and additional historical discussion can be found in \cite{Pet83}. \bibliographystyle{amsalpha}
\section{\sffamily Introduction} The safe and stable operation of modern low-emission gas turbines and aero-engines crucially depends on the acoustic damping capability of the combustion system components. Hereby, so called bias flow liner -- consisting of a cavity and a perforated face sheet with additional cooling air flow -- play a significant role. Since decades the damping performance prediction of these bias flow liner under all possible flow conditions remains a major challenge. However, due to the higher tendency of low-emission, lean burn combustion concepts for combustion instabilities the prediction of the acoustic bias flow liner impedance and therewith its damping performance is a very important prerequisite for the engine design process. Several analytical and semi-empirical models for the impedance description of bias flow liner were developed in the past (see also~\cite{Lahiri:2014}). This work focuses on the numerical simulation of the acoustic characteristics of bias flow liner applying multi-scale modeling. In principal all theoretical approaches are based on the formulation of the Rayleigh conductivity $K_R$~\cite{rayleigh1871,rayleigh1945} which describes the ratio of the fluctuating volume flow $Q(t)$ through a hole to the driving pressure difference $P^-(t)-P^+(t)$ across the hole: \begin{equation} \label{eq:KR_literature} K_R := \frac{\rho_0 \partial_t Q(t)}{P^-(t)-P^+(t)}, \end{equation} and has the dimensions of length. One major challenge in the model description of the Rayleigh conductivity represents the definition or the specification of the pressure difference since, above and below the perforated liner face-sheet the pressure is not necessarily constant rather a function of the distance from the hole. Here, the present work applying a multiscale asymptotic model will provide an exactly defined solution. More precisely, the Rayleigh conductivity of a single hole in an array of holes is distributed over the whole liner area. In this way the {\em effective Rayleigh conductivity} \begin{align} k_R = \frac{K_R}{A_\delta} \end{align} as quotient of the Rayleigh conductivity of one hole and the area $A_\delta$ of one periodicity cell of the array is introduced that has the dimensions of one over length. Using the effective Rayleigh conductivity the liner impedance can be determined like later shown for example in equation~\eqref{eq:impedance_our_model}. \section{\sffamily Methods} We consider acoustic liner that consist of a wall or part of a wall with a periodic dense array of equisized and equishaped holes with an characteristic periodicity that is proportional to a small parameter $\delta > 0$. The holes may not be of cylindrical shape and even tilted in general. % For sake of simplicity we consider the perforated wall $\Omega_\liner^\delta$ with a circular cross-section of inner radius $R_{\textrm{d}}$, % while noting that the proposed procedure to define the Rayleigh conductivity and impedance conditions do not depend on the choice of the cross-section, but only on the hole pattern and hole shape and can be directly transfered to other cross-sections like rectangular. % To derive the impedance conditions we let the parameter $\delta$ of the hole period tending zero -- so the number holes increases accordingly -- while the inner and outer diameter of the cross section are scaled like $\delta^2$ as well as the thickness of the perforated wall, see Fig.~\ref{fig:liner_geometry}. As $\delta \to 0$, the holes merge and the domain $\Omega^\delta_\liner$ degenerates to an interface $\Gamma_\liner$ on which we will prescibe the impedance conditions representing the correct disspation behaviour of the acoustic liner. For the circular liner the limit interface domain $\Gamma_\liner$ is an cylinder of radius~$R_{\textrm{d}}$. % As it simplifies the derivation and impedance condition greatly we assume that the area of the periodicity cell of the periodic array $A_\delta = \delta^2$. \begin{figure}[!bt] \centering \includegraphics[width=0.95\linewidth]{figure1.pdf} \caption{(a) Simplified geometry of a combustion liner for acoustic studies. (b) flattened liner. (c) view along a cross-section.} \label{fig:liner_geometry} \end{figure} This liner shall be embedded in a duct domain $\Omega$ and the computational domain is $\Omega^\delta := \Omega \setminus \Omega_\liner^\delta$ for every $\delta > 0$, \ie, the duct domain without the multi-perforated wall. On this domain we introduce as viscoacoustic model % the linearized compressible Navier-Stokes equations in frequency domain in a uniform and stagnant media for a source term % ${\mathbf f}(t,x) = \Re({\mathbf f}(x) \exp(-\imath \omega t))$ with an angular frequency $\omega > 0$: \begin{subequations} \label{eq:Navier_Stokes} \begin{align} - \imath \omega {\mathbf v}^\delta + \tfrac{1}{\rho_0} \nabla p^\delta - \nu(\delta) \Laplace {\mathbf v}^\delta - \nu'(\delta) \nabla \Div {\mathbf v}^\delta &= {\mathbf f}, \quad \text{in }\Omega^\delta, \label{eq:Navier_Stokes:C} \\ - \imath \omega p^\delta + \rho_0 c^2 \Div {\mathbf v}^\delta &= 0, \quad \text{in }\Omega^\delta, \label{eq:Navier_Stokes:M} \\ {\mathbf v}^\delta &= \boldsymbol{0} , \quad \text{on } \partial \Omega^\delta, \label{eq:Navier_Stokes:B}\\ \intertext{% with the acoustic velocity ${\mathbf v}^\delta$, the acoustic pressure $p^\delta$, the mean density $\rho_0 > 0$, the speed of sound $c$, the kinematic and secondary viscosities $\nu(\delta), \nu'(\delta) > 0$. % We scale the viscosities for $\delta \to 0$ like $\delta^4$ such that the size of the viscous boundary layers remain asymptotically the same at the scale of a single hole. % If the duct is modelled to be of infinite extend then additional conditions at infinity have to be posed, \eg, for a channel of constant cross section with infinite extend in $z\pm\infty$ these conditions are } \lim_{z \to \pm \infty} p^\delta &=0. \label{eq:Navier_Stokes:I} \end{align} \end{subequations} Moreover, we assume the souce to be located away from the perforated wall such that ${\mathbf f} = 0$ in a neighbourhood. In the following section we study the solution of the viscoacoustic model in three different geometrical scales beginning at the scale of one hole, pursuing with the scale of one period of the hole array and concluding with the macroscopic scale on which the impedance conditions follow. \subsection{\sffamily Microscopic scale: the near field around one hole} \label{sec:near-field-around} \begin{figure}[!bt] \centering \includegraphics[width=0.8\linewidth]{figure4.pdf} \caption{(a) Computational domain for the near field problem around a single hole. (b) The near field pressure (real part) for the liner configuration DC006 (see Table~\ref{tab:liner_configurations}) at $\omega = 2\pi\times 306 \,\text{s}^{-1}$ using $S = 40$. (c),(d) The near field velocity (imaginary part) for the same configuration as (b) and for $\omega=2\pi \times 30\,\text{s}^{-1}$. Here, the color coding corresponds to the amplitude and the arrows to the direction of the velocity. } \label{fig:NNF} \end{figure} In the vicinity of one hole that tends to a point ${\mathbf x}_\Gamma$ on the interface $\Gamma_\liner$ % we use the local coordinate ${\mathfrak X} := ({\mathfrak r},{\mathfrak y},{\mathfrak z}) = ((r-R_{\textrm{d}})/\delta^2,r\theta/\delta^2,z/\delta^2)$. % As $\delta \to 0$, the hole variable ${\mathfrak X}$ occupies the whole unbounded domain $\widehat{\Omega}$ defined by (see Fig.~\ref{fig:NNF}a) \begin{equation} \label{eq:Omegahat} \widehat{\Omega} = \big\lbrace ({\mathfrak r},{\mathfrak y},{\mathfrak z}) \in {\mathbb R}^3 \text{ such that } {\mathfrak r} < 0 \text{ or } {\mathfrak r} > {\mathrm h}_0 \rbrace \cup \widehat{\Omega}_{\hole} \ \end{equation} where $\widehat{\Omega}_{\hole}$ is the scaled domain representing one hole, and we assume $\boldsymbol{0} \in \widehat{\Omega}_{\hole}$. For instance a vertical cylindrical hole of diameter ${\mathrm d}_0\delta^2$ can be represented by $\widehat{\Omega}_{\hole} = \{ ({\mathfrak r},{\mathfrak y},{\mathfrak z}) \in {\mathbb R}^3 \text{ such that } 0 \leq {\mathfrak r} \leq {\mathrm h}_0 \text{ and } {\mathfrak y}^2 + {\mathfrak z}^2 < \frac14 {\mathrm d}_0^2 \}$. Close to one hole of the perforated liner, we represent the solution $({\mathbf v}^\delta,p^\delta)$ of~\eqref{eq:Navier_Stokes}~as \begin{equation} \label{eq:expansion_NNF} \begin{aligned} {\mathbf v}^\delta & = \bm{\mathfrak v}_0({\mathbf x}_\Gamma,{\mathfrak X}) +O(\delta)\ , \\ p^\delta & = {\mathfrak p}_0({\mathbf x}_\Gamma,{\mathfrak X}) + \delta^2 {\mathfrak p}_1({\mathbf x}_\Gamma,{\mathfrak X}) + O(\delta^3)\ , \end{aligned} \end{equation} where the near field corrector terms $(\bm{\mathfrak v}_0,{\mathfrak p}_0,{\mathfrak p}_1)$ do not depend on $\delta$. The scaling of the second corrector for the pressure as $\delta^2$ is due to the associated scaling of the size of the holes. Now, inserting expansion~\eqref{eq:expansion_NNF} into the viscoacoustic model~\eqref{eq:Navier_Stokes} and identifying formally terms of same powers of $\delta$ results first in the fact that ${\mathfrak p}_0({\mathbf x}_\Gamma,{\mathfrak X})$ is a constant function in ${\mathfrak X}$, and then in a product representation of the near-field corrector \begin{equation*} \left(\bm{\mathfrak v}_0({\mathbf x}_\Gamma,{\mathfrak X}),{\mathfrak p}_1({\mathbf x}_\Gamma,{\mathfrak X})\right) = c({\mathbf x}_\Gamma) \left(\tilde{\bm{\mathfrak v}}({\mathfrak X}),\tilde{{\mathfrak p}}({\mathfrak X})\right)\ , \end{equation*} where $c({\mathbf x}_\Gamma)$ allows for a slow variation of near field velocity and pressure along the wall. The near field profiles $(\tilde{\bm{\mathfrak v}},\tilde{{\mathfrak p}})$ are solution of the instationary Stokes problem \begin{subequations} \label{eq:canonical_NNF} \begin{align} - \imath \omega \tilde{\bm{\mathfrak v}} + \tfrac{1}{\rho_0}\nabla \tilde{{\mathfrak p}} - \nu_0 \Laplace \tilde{\bm{\mathfrak v}} & = \boldsymbol{0}, && \quad \text{in } \widehat{\Omega}, \\ \label{eq:canonical_NNF:2} \Div \tilde{\bm{\mathfrak v}} & = 0, && \quad \text{in } \widehat{\Omega}, \\ \tilde{\bm{\mathfrak v}} & = \boldsymbol{0} , && \quad \text{on } \partial \widehat{\Omega}, \label{eq:canonical_NNF:3} \intertext{where $\nabla$, $\Div$ and $\Delta$ are the gradient, divergence and Laplace operator in ${\mathfrak X}$ (cf. \cite[Sec.~2.1.6]{PopieDiss} in time-domain). The near field velocity profile is incompressible on the scale of one hole and fulfills together with the near field pressure profile the Stokes equations with an at the scale of one hole significant viscosity $\nu_0$ and the additional term $-\ensuremath{{\rm i}}\omega\tilde{\bm{\mathfrak v}}$ that reflects a time shift between excitation and excited fields. % These equations are completed by Dirichlet jump conditions at infinity } \label{eq:canonical_NNF_infinity} \lim_{S \to \infty} \tilde{{\mathfrak p}}_{|\Gamma_\pm(S)} &= \pm \tfrac{1}{2}\ , \end{align} \end{subequations} that act as a excitation from far away and will be used for the matching with the mesoscopic scale (see Sec.~\ref{sec:mesoscopic scale}). Here, \begin{equation} \label{eq:SphericalBoundaries} \Gamma_\pm(S) = \left\lbrace ({\mathfrak r},{\mathfrak y},{\mathfrak z}) \in \widehat{\Omega}, \pm {\mathfrak r} > {\mathfrak r}_\pm \text{ and } ({\mathfrak r} - {\mathfrak r}_\pm)^2 + {\mathfrak y}^2 + {\mathfrak z}^2 = S^2 \right\rbrace, \end{equation} with ${\mathfrak r}_-=0$ and ${\mathfrak r}_+ = {\mathrm h}_0$, are the two half-spheres (see Fig.~\ref{fig:NNF}a) that are moved towards infinity. Note that in problem~\eqref{eq:canonical_NNF} the term $-\nu_0' \nabla \Div \tilde{\bm{\mathfrak v}}$ that would appear in the first line cancels out due to the divergence free condition~\eqref{eq:canonical_NNF:2}. Moreover, note that the term $-\nu_0 \Delta \tilde{\bm{\mathfrak v}}$ can be replaced by $\nu_0 \operatorname{{\bf curl}}\Curl \tilde{\bm{\mathfrak v}}$ and so only the vorticity part of the velocity $\tilde{\bm{\mathfrak v}}$ will exhibit a viscosity boundary layer as we will see later. Problem~\eqref{eq:canonical_NNF} is a classical saddle-point problem and admits a unique solution stated by the following \begin{prop} There exists a unique solution $(\tilde{\bm{\mathfrak v}},\tilde{{\mathfrak p}}) \in (\Hone(\widehat{\Omega}))^3 \times \bm{\mathcal V}(\widehat{\Omega})$ of~\eqref{eq:canonical_NNF}, where $\bm{\mathcal V}(\widehat{\Omega}) = \left\lbrace P \in \Honeloc(\widehat{\Omega}) \text{ such that } \xnorm{\nabla P}{\Ltwo(\widehat{\Omega})} < \infty \right\rbrace.$ \end{prop} Note, that the pressure space $\bm{\mathcal V}(\widehat{\Omega})$ allows for a constant behavior towards infinity. With the near field velocity profile $\tilde{\bm{\mathfrak v}}$ defined by~\eqref{eq:canonical_NNF} we can define in analogy to the Rayleigh conductivity {\it a posteriori} the quantity \begin{equation} \label{eq:KR} k_R := \lim_{S \to \infty} \frac{\imath \omega \rho_0}{2} \Big( \int_{\Gamma_+(S)} \tilde{\bm{\mathfrak v}} \cdot {\mathbf n} - \int_{\Gamma_-(S)} \tilde{\bm{\mathfrak v}} \cdot {\mathbf n} \Big) \end{equation} using the volume flux towards infinity in a symmetric way. Here, ${\mathbf n}$ is the outer normal vector. % In this way, the quantity $k_R$ is a mapping of a constant near field pressure at infinity to the flux at infinity. To see the analogy it suffices to consider time harmonic fields varying like $\exp(-\imath \omega t)$, the volume flux $Q(t)$ through the aperture counted positively along the direction of the ${\mathbf e}_{\mathfrak r}$ axis to be the same as the volume flux through the surface $\Gamma_+(S)$ (respectively $\Gamma_-(S)$), counted positively (resp. negatively) along the direction of the normal vector ${\mathbf n}$, and to compare~\eqref{eq:KR_literature} and~\eqref{eq:KR}. Note, that the normal component of the near field velocity profile $\bm{\mathfrak v}$ decays like $1/S^2$ towards infinity and combines different behaviour close to and away from the wall (see Fig.~\ref{fig:NNF}(c) and (d)). This behaviour can be rigorously justified with similar techniques as in~\cite{Nazarov2008,Semin.Delourme.Schmidt:2017}. For the usual definition of the Rayleigh conductivity $K_R$ it is not evident where the difference of the pressure -- as it varies locally -- and the volume flux -- as in the original acoustic equations the fluid is compressible -- shall be evaluated. The quantity $k_R$ is, however, clearly defined by~\eqref{eq:canonical_NNF} and~\eqref{eq:KR} as the near field pressure tends to constant values for $|{\mathfrak X}| \to \infty$ and as the near field velocity is incompressible. % This results from the separation of the effects at the different length scales, namely viscous incompressible behaviour in the vicinity of the holes versus inviscid, compressible behaviour away from them, due to the asymptotic ansatz. % As the near field profiles are defined in local coordinates ${\mathfrak X}$ it has the dimensions of one over length and we denote it as effective Rayleigh conductivity of the liner. % The definition of the effective Rayleigh conductivity $k_R$ can be used for inviscid fluids as well for which $\nu_0 = 0$ if the no-slip boundary conditions~\eqref{eq:canonical_NNF:3} are replaced by $\bm{\mathfrak v}\cdot{\mathbf n} = 0$. \subsection{\sffamily Mesoscopic scale: the hole pattern} \label{sec:mesoscopic scale} \begin{figure}[!bt] \centering \includegraphics[width=0.75\linewidth]{figure3.pdf} \caption{Representation of the periodicity cell ${\mathcal B}^\delta$ associated to the intermediate scale} \label{fig:intermediate_scale} \end{figure} Pursuing with the scale of one period of the hole array and in the vicinity of one hole that tends to ${\mathbf x}_\Gamma$, we use the local coordinate ${\mathbf X} := (R,Y,Z) = ((r-R_{\textrm{d}})/\delta,r\theta/\delta,z/\delta)$. We consider for fixed $\delta > 0$ the infinite periodicity cell \begin{equation} \label{eq:Bdelta} \begin{aligned} {\mathcal B}^\delta &= {\mathcal B}^\delta_+ \cup {\mathcal B}^\delta_- \cup \delta \widehat{\Omega}_\hole \end{aligned} \end{equation} where ${\mathcal B}^\delta_\pm = \big\lbrace (R,Y,Z) \in {\mathbb R}^3 \text{ such that } |Y - bZ| < \tfrac{\sqrt{{\mathrm a}}}{2}, |Z| < \tfrac{1}{2\sqrt{a}}, \pm R > R_\pm^\delta\big\rbrace$ with $R_-^\delta = 0$, $R_+^\delta = {\mathrm h}_0\delta$ are two semi-infinite parallelepipeds whose opposite lateral faces $|Z| = \tfrac{1}{2\sqrt{a}}$ and $|Y - bZ| = \tfrac{\sqrt{{\mathrm a}}}{2}$ are considered to be identified with each other such that ${\mathcal B}^\delta_\pm$ and so ${\mathcal B}^\delta$ are topologically equivalent to a torus. With the cross-section of the periodicity cell \begin{align*} \Gamma(S) = \{(R,Y,Z) \in {\mathbb R}^3 \text{ such that } |Y - bZ| < \tfrac{\sqrt{{\mathrm a}}}{2},|Z| < \tfrac{1}{2\sqrt{a}}, R = S\} \end{align*} the symmetric difference $A \triangle B := (A \cup B) \setminus (A \cap B)$ the boundary of the periodicity cell is given as $ \partial{\mathcal B}^\delta = (\Gamma(h_0\delta) \cup \Gamma(0)) \,\triangle\, \delta \partial\widehat{\Omega}_\hole$. It consists of the wall boundary and the boundary of the hole. The periodicity cell ${\mathcal B}^\delta$ degenerates as $\delta \to 0$ and tends to the union ${\mathcal B}^0$ of two semi-infinite parallelepipeds ${\mathcal B}^0_\pm$ connected by the point~$\boldsymbol{0}$, an infinitely small hole. Inside the periodic array of holes, we represent the solution $({\mathbf v}^\delta,p^\delta)$ of~\eqref{eq:Navier_Stokes} as \begin{equation} \label{eq:expansion_NF} \begin{aligned} {\mathbf v}^\delta & = {\mathbf V}_0^\delta({\mathbf x}_\Gamma,{\mathbf X})+ O(\delta)\ , \\ p^\delta & = P_0^\delta({\mathbf x}_\Gamma,{\mathbf X}) + \delta P_1^\delta({\mathbf x}_\Gamma,{\mathbf X}) + O(\delta^2) \end{aligned} \end{equation} with ${\mathbf X} \in {\mathcal B}^\delta$. Inserting expansion~\eqref{eq:expansion_NF} in problem~\eqref{eq:Navier_Stokes} and identifying formally the terms of same powers of $\delta$ gives that $P_0^\delta({\mathbf x}_\Gamma,{\mathbf X})$ is constant in ${\mathbf X}$ and a separation of variables for the mesoscopic corrector as $\big({\mathbf V}_0^\delta({\mathbf x}_\Gamma,{\mathbf X}),P_1^\delta({\mathbf x}_\Gamma,{\mathbf X})\big) = c({\mathbf x}_\Gamma) \big(\bm{\mathcal V}^\delta({\mathbf X}),{\mathcal P}^\delta({\mathbf X})\big)$ with the mesoscopic profile $(\bm{\mathcal V}^\delta$, ${\mathcal P}^\delta)$ satisfying the Darcy-type problem \begin{equation} \label{eq:nV_nD_delta} \left\lbrace \begin{aligned} - \imath \omega \bm{\mathcal V}^\delta + \tfrac{1}{\rho_0} \nabla {\mathcal P}^\delta & = 0, \quad \text{in }{\mathcal B}^\delta,\\ \Div \bm{\mathcal V}^\delta & = 0, \quad \text{in }{\mathcal B}^\delta, \\ \bm{\mathcal V}^\delta \cdot {\mathbf n} & = 0, \quad \text{on } \partial{\mathcal B}^\delta\ . \end{aligned} \right. \end{equation} Here, $\nabla$ and $\Div$ are the gradient and divergence in ${\mathfrak X}$. The formal identification of terms of same power in $\delta$ can be justified despite the fact that the size of the hole depends on $\delta$ as well. For this an additional scale $\eta$ for the size of one hole has to be introduced that is first considered to be independent of $\delta$ due to its different meaning and later fixed to $\delta^2$. The expansion~\eqref{eq:expansion_NF} is then in $\delta$, where the terms of the expansion depend on $\eta$. For the brevity of the article we have chosen directly $\eta = \delta^2$. Note that~\eqref{eq:nV_nD_delta} is equivalent to an homogeneous Laplace problem with Neumann boundary conditions for the pressure profile ${\mathcal P}^\delta$, where the velocity profile $\bm{\mathcal V}^\delta$ can be computed from. Following~\cite[Proposition~2.2]{Delourme.Schmidt.Semin:2016}, we can therefore state the following \begin{prop} \label{prop:meso_uniqueness} For any fixed $\delta > 0$, the kernel of problem~\eqref{eq:nV_nD_delta} is of dimension~$2$ and spanned by the functions $(\bm{\mathcal V}_{\mathcal N}^\delta,{\mathcal P}_{\mathcal D}^\delta) = (0,1)$ and $(\bm{\mathcal V}_{\mathcal D}^\delta,{\mathcal P}_{\mathcal D}^\delta)$ such that ${\mathcal D}_v^\delta$ is constant as $R \to \pm \infty$. Moreover, there exists ${\mathcal D}_\infty^\delta \in {\mathbb C}$ such that $(\bm{\mathcal V}_{\mathcal D}^\delta,{\mathcal P}_{\mathcal D}^\delta)$ admits the following limit behaviour: \begin{equation} \label{eq:nV_nD_infty_delta} \begin{aligned} \bm{\mathcal V}_{\mathcal D}^\delta &= \tfrac{1}{\imath \omega} {\mathbf e}_R +o(1),&& \quad R \to \pm \infty,\\ {\mathcal P}_{\mathcal D}^\delta & = \rho_0 R \pm {\mathcal D}_\infty^\delta + o(1),&& \quad R \to \pm \infty. \end{aligned} \end{equation} \end{prop} It remains to determine the constant ${\mathcal D}_\infty^\delta$, where we are in particular interested in its asymptotic behaviour for $\delta\to0$. To obtain this behaviour we will match the mesoscopic functions $\bm{\mathcal V}_{\mathcal D}^\delta$ and ${\mathcal P}_{\mathcal D}^\delta$ with the near field profiles $\tilde{\bm{\mathfrak v}}$ and $\tilde{{\mathfrak p}}$ at half-spheres $\Gamma_\pm(s^\delta)$ of radius~$s^\delta$ for $\sqrt{\delta} < s^\delta < 2\sqrt{\delta}$ centered at the aperture $\boldsymbol{0}$. First we note that due to the incompressibility and the limit behaviour of $\bm{\mathcal V}_{\mathcal D}^\delta$ for its volume flux over the half-spheres it holds \begin{equation*} \frac{\imath\omega}{2} \left(\int_{\Gamma_+(s^\delta)} \bm{\mathcal V}_{\mathcal D}^\delta \cdot {\mathbf n} - \int_{\Gamma_-(s^\delta)} \bm{\mathcal V}_{\mathcal D}^\delta \cdot {\mathbf n}\right) = \frac{\imath \omega}{2} \lim_{S\to \infty} \int_{\Gamma(S)} \bm{\mathcal V}_{\mathcal D}^\delta \cdot {\mathbf e}_R + \int_{\Gamma(-S)} \bm{\mathcal V}_{\mathcal D}^\delta \cdot {\mathbf e}_R = 1\ . \end{equation*} Using this equality, definition~\eqref{eq:KR} of the effective Rayleigh conductivity $k_R$, the mesoscopic to microscopic variable change ${\mathfrak X} = {\mathbf X}/\delta$, and matching of the mesoscopic velocity $\bm{\mathcal V}_{\mathcal D}^\delta$ and the near field velocity profile $\tilde{\bm{\mathfrak v}}$ we find that \begin{equation*} \bm{\mathcal V}_{\mathcal D}^\delta({\mathbf X}) \sim \frac{\rho_0}{k_R \delta^2} \tilde{\bm{\mathfrak v}}(\tfrac{{\mathbf X}}{\delta}) \quad \text{ for } \sqrt{\delta} < |{\mathbf X}| < 2\sqrt{\delta} \text{ and } \delta \to 0\ . \end{equation*} By linearity and using definition of problems~\eqref{eq:canonical_NNF} and~\eqref{eq:nV_nD_delta}, the gradient of the mesoscopic pressure ${\mathcal P}_{\mathcal D}^\delta$ can be matched with the gradient of the near field pressure profile as well. Integrating these gradients, using limit~\eqref{eq:canonical_NNF_infinity} and Proposition~\ref{prop:meso_uniqueness} leads to \begin{equation*} {\mathcal P}_{\mathcal D}^\delta({\mathbf X}) \sim \frac{\rho_0}{k_R\delta} \tilde{{\mathfrak p}}(\tfrac{{\mathbf X}}{\delta}) \sim \pm\frac{\rho_0}{2 k_R\delta} \quad \text{ for } \sqrt{\delta}< |{\mathbf X}| < 2\sqrt{\delta}, \pm R > 0 \text{ and } \delta \to 0\ . \end{equation*} As for $\delta \to 0$ the mesoscopic pressure ${\mathcal P}_{\mathcal D}^\delta$ tends to $\rho_0 R \pm {\mathcal D}^\delta_\infty$ if $\delta = o(|{\mathbf X}|)$ we conclude that \begin{align} \label{eq:jump_towards_infinity} {\mathcal D}_\infty^\delta = \frac{\rho_0}{2 k_R\delta} + o(\delta^{-1})\ . \end{align} This blow up of the coefficient ${\mathcal D}_\infty^\delta$ as $\delta \to 0$ in accordance with its numerical computations based on an asymptotic analysis of~\eqref{eq:Navier_Stokes} with only two scales~\cite{Semin.Schmidt:2017}, where the hole size is considered not as a scale but as a parameter. \subsection{\sffamily Macroscopic scale and impedance conditions} Finally, away from a vicinity of the layer, the solution $({\mathbf v}^\delta,p^\delta)$ of~\eqref{eq:Navier_Stokes} is represented~by \begin{equation} \label{eq:expansion_FF} \begin{aligned} {\mathbf v}^\delta({\mathbf x}) & = {\mathbf v}_0({\mathbf x}) + o(1), \\ p^\delta({\mathbf x}) & = p_0({\mathbf x}) + o(1). \end{aligned} \end{equation} Inserting this expansion in problem~\eqref{eq:Navier_Stokes} and making a formal identification in terms of powers of $\delta$ gives that $({\mathbf v}_0,p_0)$ is solution of the classical Helmholtz problem \begin{subequations} \label{eq:Helmholtz} \begin{align} \label{eq:Helmgoltz:C} - \imath \omega {\mathbf v}_0 + \tfrac{1}{\rho_0}\nabla p_0 &={\mathbf f}, \quad \text{in }\Omega \setminus \Gamma_\liner, \\ - \imath \omega p_0 + \rho_0 c^2 \Div {\mathbf v}_0 &=0, \quad \text{in }\Omega \setminus \Gamma_\liner, % \intertext{and a multiscale analysis~\cite{Schmidt.Thoens.Joly:2014} for rigid walls leads to the boundary conditions} % \label{eq:Helmgoltz:B} {\mathbf v}_0 \cdot {\mathbf n} &=0, \quad \text{on }\partial\Omega\ . \end{align} The limit condition~\eqref{eq:Navier_Stokes:I} becomes \begin{equation} \label{eq:Helmholtz:I} \lim_{z \to \pm \infty} {\mathbf v}_0 \cdot (\pm 1,0,0) - T_\pm^1 p_0 = 0, \end{equation} \end{subequations} where $T_\pm^1$ is the Dirichlet-to-Neumann operator based on the projection on the outgoing propagative modes, see~\cite[Eq.~(2.7)]{Goldstein:1982} and~\cite{Semin.Schmidt:2016}. % This problem is completed by jump conditions across the interface $\Gamma_\liner$. % To obtain the conditions we match the macroscopic pressure $p_0$ and flux ${\mathbf v}_0 \cdot{\mathbf n}$ in a matching zone at distance $\sqrt{\delta}$ to the interface $\Gamma_\liner$ to the mesoscopic pressure and velocity functions. % For the pressure we find \begin{multline} \label{eq:p0_matching} p_0({\mathbf x}) = C_{\mathcal N}({\mathbf x}_\Gamma) \, {\mathcal P}_{\mathcal N}^\delta(\tfrac{{\mathbf x} - {\mathbf x}_\Gamma}{\delta}) % + \delta C_{\mathcal D}({\mathbf x}_\Gamma) \, {\mathcal P}_{\mathcal D}^\delta(\tfrac{{\mathbf x} - {\mathbf x}_\Gamma}{\delta}) \\ \text{ for } \sqrt{\delta} \leq |{\mathbf x} - {\mathbf x}_\Gamma| \leq 2\sqrt{\delta} \text{ and } \delta \to 0. \end{multline} with two functions $C_{\mathcal N}$, $C_{\mathcal D}$ that allow for slow variation along the perforated wall. % With the factor $\delta$ the limit $\delta {\mathcal P}^\delta_{\mathcal D}(\frac{{\mathbf x} - {\mathbf x}_\Gamma}{\delta})$ for $\delta\to0$ remains bounded. Subtracting the two limits of~\eqref{eq:p0_matching} for $\delta \to 0$ we obtain \begin{align} \label{eq:jump_p0_CD} \bjump{p_0}({\mathbf x}_\Gamma) &:= % \lim_{\delta\to0} p_0({\mathbf x}_\Gamma + \sqrt{\delta} {\mathbf n}) - p_0({\mathbf x}_\Gamma - \sqrt{\delta} {\mathbf n}) = C_{\mathcal D}({\mathbf x}_\Gamma) \frac{\rho_0}{k_R}\ . \end{align} Taking the gradient in ${\mathbf x}$ on both sides of~\eqref{eq:p0_matching} and using~\eqref{eq:Helmgoltz:C}, the assumption that ${\mathbf f} = 0$ close to the perforated wall and~\eqref{eq:nV_nD_delta} we find \begin{multline} \label{eq:v0_matching} {\mathbf v}_0({\mathbf x})\cdot{\mathbf n} = \frac{\rho_0}{\imath\omega}\nabla p_0({\mathbf x})\cdot{\mathbf n} = \delta C_{\mathcal D}({\mathbf x}_\Gamma) \, \frac{\rho_0}{\imath\omega} \nabla {\mathcal P}_{\mathcal D}^\delta(\tfrac{{\mathbf x} - {\mathbf x}_\Gamma}{\delta}) = C_{\mathcal D}({\mathbf x}_\Gamma) \, \bm{\mathcal V}_{\mathcal D}^\delta(\tfrac{{\mathbf x} - {\mathbf x}_\Gamma}{\delta})\\ \text{ for } \sqrt{\delta} \leq |{\mathbf x} - {\mathbf x}_\Gamma| \leq 2\sqrt{\delta} \text{ and } \delta \to 0\ . \end{multline} As the two limits for $\bm{\mathcal V}^\delta_{\mathcal D}$ for $R\to\pm\infty$ coincide we obtain \begin{subequations} \label{eq:impedance_conditions} \begin{align} \label{eq:impedance_conditions:velocity} \bjump{{\mathbf v}_0 \cdot {\mathbf n}}({\mathbf x}_\Gamma) &= 0, \quad \text{on }\Gamma_\liner\ . % \intertext{ Finally, taking the average of~\eqref{eq:v0_matching} and the limit $\delta\to0$ gives in view of~\eqref{eq:jump_p0_CD} the impedance conditions } % \label{eq:impedance_conditions:pressure} \bjump{p_0}({\mathbf x}_\Gamma) &= \frac{\imath \omega \rho_0}{k_R} \bavrg{{\mathbf v}_0 \cdot {\mathbf n}}({\mathbf x}_\Gamma), \quad \text{on }\Gamma_\liner\ . \end{align} \end{subequations} Note, that the impedance conditions do not depend on the pattern of the holes, more precisely on the values ${\mathrm a}$ and ${\mathrm b}$ (see Fig.~\ref{fig:liner_geometry}), but only on their area $A_\delta$, namely through $\nu_0 = \nu / A_\delta^2$ in the computation of the effective Rayleigh conductivity~$k_R$. \paragraph{\sffamily Distinguished limit} Note, that the nature of the impedance condition~\eqref{eq:impedance_conditions:pressure} is due to the choice of asymptotic scales. % It represents a distinguished limit meaning that different choice would lead to one of the trivial conditions $\bjump{p_0}({\mathbf x}_\Gamma) = 0$ (transparent wall) or $\bavrg{{\mathbf v}_0\cdot{\mathbf n}}({\mathbf x}_\Gamma) = 0$ (rigid wall). If we would scale the diameter of each hole like $\eps(\delta)$ as well as the thickness of the perforated wall such that $\delta^2 = o(\eps(\delta))$ then we would obtain transparent wall conditions in the limit $\delta\to0$. \emph{A contrario}, the impedance conditions become rigid wall conditions if we would use the scaling $\eps(\delta) = o(\delta^2)$. The choice of asymptotic scales was already stated in~\cite{Sanchez.Sanchez:1982} for infinitely thin perforated wall and the Stokes flows. \paragraph{\sffamily Acoustic Impedance} The nature of the impedance conditions is known in the literature: the notion of impedance can be found in the works of Webster in the 1910s~\cite{webster1919acoustical}. More precisely, he defines the normalized specified acoustic impedance $\zeta$ by (note there is a complex conjugate and a different sign due to the different choice of the time-dependency convention) \begin{equation} \label{eq:impedance} \zeta := - \frac{\overline{\bjump{p_0}}}{c \rho_0 \overline{\bavrg{{\mathbf v}_0 \cdot {\mathbf n}}}}\ . \end{equation} For the derived impedance conditions~\eqref{eq:impedance_conditions:pressure} and by identification, the normalized specified acoustic impedance for perforated walls is given by \begin{equation} \label{eq:impedance_our_model} \zeta = \frac{\imath \omega }{c \overline{k_R}} = \frac{\imath \omega k_R}{c |k_R|^2}\ . \end{equation} The resistance $\Re(\zeta)$ and the reactance $\Im(\zeta)$ are positive quantities when $k_R$ has a positive real part and a negative imaginary part. Moreover in the inviscid case $k_R$ is a positive real number, so that the normalized specified acoustic impedance $\zeta$ is purely a reactance. \paragraph{\sffamily Formulation in pressure only} One can also remark that Problem~\eqref{eq:Helmholtz} can be formulated in terms of pressure only: equations~\eqref{eq:Helmgoltz:C}-- \eqref{eq:Helmholtz:I} give \begin{subequations} \begin{equation} \label{eq:Helmholtz:pressure} \begin{aligned} \Delta p_0 + \tfrac{\omega^2}{c^2} p_0 &= \Div {\mathbf f}, && \text{in }\Omega \setminus \Gamma_\liner, \\ \nabla p_0 \cdot {\mathbf n} &= 0, && \text{on }\partial \Omega,\\ \lim_{z \to \pm \infty} \pm\partial_z p_0 - \imath\omega\rho_0 T_\pm^1 p_0 &= 0, \end{aligned} \end{equation} and impedance conditions~\eqref{eq:impedance_conditions:velocity}-% \eqref{eq:impedance_conditions:pressure} are written in terms of the pressure as \begin{equation} \label{eq:impedance_conditions:pressure_only} \bjump{\nabla p_0 \cdot {\mathbf n}}({\mathbf x}_\Gamma) = 0 \quad \text{and} \quad \bavrg{\nabla p_0 \cdot {\mathbf n}}({\mathbf x}_\Gamma) = k_R \bjump{p_0}({\mathbf x}_\Gamma)\ . \end{equation} This kind of conditions were proposed for the inviscid case~\cite{Bendali.Fares.Piot.Tordeux:2012}, where $k_R$ turns out to be the effective plate compliance. \end{subequations} \section{\sffamily Results and discussion} In this section, we are interested by the numerical computation of the effective Rayleigh conductivity $k_R$, the computation of dissipation losses in acoustic ducts with the impedance conditions and comparison with data from experimental measurements. \subsection{\sffamily Numerical computation of $k_R$} The effective Rayleigh conductivity $k_R$ is defined through the solution of the near field velocity and pressure profiles in the unbounded domain $\widehat{\Omega}$ around a single hole. To compute $k_R$ numerically we truncate the unbounded domain, on which we use the finite element method for discretization and propose an extrapolation procedure to increase the accuracy. First, we define the truncated domain \begin{equation} \label{eq:widehat_Omega_set} \widehat{\Omega}(S) = \widehat{\Omega} \cap \big( \max(|{\mathfrak X} - (0,0,0)|, |{\mathfrak X} - ({\mathrm h}_0,0,0)|) < S \big) \end{equation} of $\widehat{\Omega}$ for a given truncation radius $S > 0.5 \sqrt{{\mathrm d}_0^2+{\mathrm h}_0^2}$ (see Fig.~\ref{fig:NNF}(a)). It has two artificial boundaries $\Gamma_\pm(S)$ that are no boundaries of $\widehat{\Omega}$. We restrict the problem~\eqref{eq:canonical_NNF} to $\widehat{\Omega}(S)$ and $\partial \widehat{\Omega}(S) \cap \partial \widehat{\Omega}$, and we approximate the conditions~\eqref{eq:canonical_NNF_infinity} by setting \begin{equation*} \tilde{{\mathfrak p}}_{|\Gamma_\pm(S)} = \pm \tfrac{1}{2}. \end{equation*} From the resolution of the truncated problem we compute the approximated Rayleigh conductivity $k_R(S)$ taking as well an approximation of~\eqref{eq:KR}, namely \begin{equation} \label{eq:KR_truncated} k_R(S) := \frac{\imath \omega\rho_0}{2} \Big( \int_{\Gamma_+(S)} \tilde{\bm{\mathfrak v}} \cdot {\mathbf n} - \int_{\Gamma_-(S)} \tilde{\bm{\mathfrak v}} \cdot {\mathbf n} \Big), \end{equation} Its approximated value $k_R(S)$ tends to the Rayleigh conductivity $k_R$ as $1/S$ as illustrated in Fig.~\ref{fig:GR_vs_S}. This first-order convergence can be explained with a rigorous analysis of the solution of problem~\eqref{eq:canonical_NNF} towards infinity using the Mellin transform~\cite{Kozlov.Mazya.Rossmann:1997} and showing that the solution of this problem on $\Gamma_\pm(S)$ is a superposition of a radial expansion with respect to $1/S$ and of a cartesian expansion with terms decaying exponentially with respect to the distance to the boundary. % Similar analyses were performed for the Poisson and Helmholtz problems in conical domains with a rough periodic boundary~\cite{Nazarov2008} or perforated wall~\cite{Semin.Delourme.Schmidt:2017}. \begin{figure}[!bt] \centering \includegraphics[width=0.65\linewidth]{figure5.pdf} \caption{Convergence of the real and imaginary parts of the approximated Rayleigh conductivity $k_R(S)$ to its limit value $k_R = 4.513-1.210\imath$ in dependence of the truncation radius $S$ for the liner DC006 at frequency $f = 306\,\text{Hz}$ (see Table~\ref{tab:liner_configurations}).} \label{fig:GR_vs_S} \end{figure} As, more precisely, the Rayleigh conductivity $k_R$ can be expanded in powers of~$1/S$ we use an extrapolation in $1/S$ of first order approximations $k_R(S)$ for different truncation radia $S$ to obtain a second or higher order approximation of the limit value $k_R$. For the particular case of a straight cylindrical hole that is without loss of generality centered at ${\mathfrak y}={\mathfrak z}=0$, the domain $\widehat{\Omega}(S)$ is invariant under rotation around the ${\mathfrak r}$ axis as well as the solution of the problem~\eqref{eq:canonical_NNF} for the near field profiles. Hence, the finite element method in two dimensions can be used for the numerical resolution in a 2D axis-symmetry setting. To resolve the boundary layer of size $\sqrt{\nu_0 / \omega}$ on the wall boundary (cf.~\cite[Sec.~3.1]{PopieDiss}) we use the $hp$-adaptive strategy of Schwab and Suri~\cite{Schwab.Suri:1996} (see the mesh shown in Fig.~\ref{fig:NNF}(b)). \begin{table}[!bt] {\scriptsize \begin{tabular}{c|c|c|c|c|c|c} Config. & number of & longitudinal & azimuthal & hole & liner & $\sigma$ \\ & holes (longitudinal, & inter-hole & inter-hole & diameter & thickness & \\ & azimuthal) & distance $\delta / \sqrt{{\mathrm a}}$ (mm) & distance $\sqrt{{\mathrm a}} \delta$ (mm) & ${\mathrm d}_0 \delta^2$ (mm) & ${\mathrm h}_0 \delta^2$ (mm) & \% \\ \hline DC006 & (7,52) & 8.5 & 8.45 & 1 & 1 & 1.1 \\ DC007 & (3,20) & 22 & 21.99 & 2.5 & 1 & 1.0 \\ DC008 & (7,52) & 8.5 & 8.45 & 2.5 & 1 & 6.8 \\ DC009 & (3,20) & 22 & 21.99 & 1 & 1 & 0.2 \\ \end{tabular} } \caption{Liner configurations. The length of the liner is $L=60\,\text{mm}$. The value of the viscosity is $\nu(\delta) = 1.4660 \times 10^{-5} \, \text{m}^2 / \text{s}$. For all these configurations $b=0.5\sqrt{{\mathrm a}}$.} \label{tab:liner_configurations} \end{table} For four liner configurations, see Table~\ref{tab:liner_configurations}, from experimental studies~\cite{Lahiri:2014,lahiri2017a} we have computed the near field velocity and pressure profiles and so the effective Rayleigh conductivity. % The relative kinematic viscosity $\nu_0$ is computed as quotient of the kinematic viscosity $\nu = 1.4660 \times 10^{-5} \, \text{m}^2 / \text{s}$ of air at $15^\circ \mathrm{C}$ divided by the period $\delta$ to the power of four. In Fig.~\ref{fig:NNF}(b) and Fig.~\ref{fig:NNF}(c) we illustrate the near field pressure and velocity profiles $\tilde{{\mathfrak p}}$ and $\tilde{\bm{\mathfrak v}}$ for the liner DC006 at frequency $306\,\text{Hz}$ using a truncation radius $S=40$. % It is visible that the pressure decays almost linearly inside the cylindrical hole, but also the behaviour at distance to the hole. Moreover, the pressure shows close to the rim of the cylinder an edge singularity (\ie a corner singularity for the 2D axis-symmetric problem) that is resolved numerically by the {\em hp}-adaptive refinement strategy. % The near velocity profile shows a flux from all sides to and through the hole. It appears that the outward flux of the imaginary part of $\tilde{\bm{\mathfrak v}}$ over $\Gamma_+(S)$ is negative (resp. positive over $\Gamma_-(S)$) corresponding to a positive real part of the approximate Rayleigh conductivity $k_R(S)$ (see~\eqref{eq:KR_truncated}) and so of the Rayleigh conductivity $k_R$. This is in line with the inviscid case, where $k_R$ is real and positive. Moreover, we see the higher velocity amplitude inside the hole that decays towards its boundaries. This boundary layer phenomena is more visible for lower frequencies (see Fig.~\ref{fig:NNF}(d)), where one also see a local change of the velocity direction on the wall boundary. In Fig.~\ref{fig:GR_vs_freq}, we plot the effective Rayleigh conductivity $k_R$ as a function of the frequency $f := \tfrac{\omega}{2\pi}$ for different liner configurations given in Table~\ref{tab:liner_configurations}. As expected, following the remark on the normalized specified acoustic impedance~$\zeta$, the real part of $k_R$ is positive and its imaginary part is negative. One can also remark that for liner configurations DC006 and DC007, that have a close value of the porosity $\sigma$ but quite different hole repartition and hole diameter, their Rayleigh conductivities differ significantly in both their real and imaginary part. \begin{figure}[!bt] \centering \includegraphics[width=0.95\linewidth]{figure6.pdf} \caption{Real and imaginary parts of $k_R$ in dependence of the frequency $f=\tfrac{\omega}{2\pi}$.} \label{fig:GR_vs_freq} \end{figure} In Fig.~\ref{fig:CR_vs_freq}, we show the computed normalized specific acoustic impedance $\zeta$ for the liner configuration DC006 in comparison with the Melling model (see~\cite{melling1973acoustic} and~\cite[Eq.~(12)]{lahiri2017a}), that is given an analytic formula. For the latter an effective kinematic viscosity $\tilde{\nu}(\delta) := 2.179 \nu(\delta)$ is used that shall incorporate also thermal conductivity losses near a highly conducting wall, see \cite[p.~239]{crandall:1926} and~\cite[p.~62]{Lahiri:2014}. We plotted the Rayleigh conductivities obtained from our model with this effective kinematic viscosity. The reactance predicted by the two models are very close, where the resistence differs by up to $20\%$. The importance of taking the thermal conductivity losses into account will be seen in comparison with the measurements and be discussed later in Sec.~\ref{sec:numerical-results}. \begin{figure}[!bt \centering \includegraphics[width=0.95\linewidth]{figure7.pdf} \caption[Impedance]{% Comparison of the impedance with the normalized specific resistance ({\em left}) and the normalized specific reactance ({\em right}) computed by our model and Melling model as function of the frequency $f=\tfrac{\omega}{2\pi}$ for the liner configuration DC006. As Melling model uses an effective viscosity taking into account thermal conductivity losses we show the impedance for our model with the effective viscosity as well. } \label{fig:CR_vs_freq} \end{figure} \subsection{\sffamily Dissipation losses in acoustic ducts} \subsubsection{\sffamily Experimental Setup and Analysis} \label{sec:experimental-setup} The experimental study is performed in the duct acoustic test rig with a circular cross-section (DUCT-C) at DLR Berlin at ambient conditions. The setup of the test rig is illustrated in Fig.~\ref{fig:test-rig}. It allows high precision acoustic measurements of the damping performance of various liner configurations, including grazing and bias flow. \begin{figure}[!bt] \centering \includegraphics[width=0.95\linewidth]{figure8.pdf} \caption{Schematic setup of the Duct Acoustic Testrig (DUCT-C) with speakers $A$ and $B$, and microphones 1-12. The anechoic terminations at both ends are not shown.} \label{fig:test-rig} \end{figure} The test duct consists of two symmetric measurement sections (section 1 and section 2 in Fig.~\ref{fig:test-rig}) of 1200\,mm length each. They have a circular cross-section with a radius $R_{\textrm{d}}$ of 70\,mm. In order to minimize the reflection of sound at the end of the duct back into the measuring section the test duct is equipped with anechoic terminations at both ends (not shown in Fig.~\ref{fig:test-rig}). Their specifications follow the ISO 5136 standard. The damping module is a chamber of 60\,mm. It has a circular cross-section with a radius of 120\,mm. A total of 12 microphones are mounted flush with the wall of the test duct. They are installed at different axial positions upstream and downstream of the damping module and are distributed exponentially with a higher density towards the damping module. Two microphones are installed opposite of each other at the same axial position close to the signal source. As evanescent modes become more prominent in the vicinity of the source, their influence is reduced significantly by using the average value of these two microphones for the analysis. This technique helps to reduce the errors for frequencies approaching the cut-on frequency of the first higher order mode and thus, extends the frequency range for accurate results. At the end of each section a loudspeaker is mounted at the circumference of the duct ($A$ and $B$ in Fig.~\ref{fig:test-rig}). They deliver the test signal for the damping measurements. The signal used here is a multi-tone sine signal. All tonal components of the signal are in the plane wave range. The signal has been calibrated in a way that the amplitude of each tonal component inside the duct is about 102\,dB. The microphones used in these measurements are 1/4" G.R.A.S. type 40BP condenser microphones. Their signals are recorded with a 16 track OROS OR36 data acquisition system with a sampling frequency of 8192\,Hz. The source signals for the loudspeakers are recorded on the remaining tracks. The test signal is produced by an Agilent 33220A function generator. The signals are fed through a Dynacord L300 amplifier before they power the Monacor KU-516 speakers. For each configuration two different sound fields are excited consecutively in two separate measurements (index a and b). Speaker A is used in the first measurement and in the second measurement the same signal is fed into speaker B. Then, the data of section 1 and section 2 (index 1 and 2) are analyzed separately. This results in four equations for the complex sound pressure amplitudes for each section and measurement for $j=a,b$: \begin{subequations} \begin{align} \hat{p}_{1j}^{}(z)&=\hat{p}_{1j}^{+}e^{\imath \omega z/c}+\hat{p}_{1j}^{-}e^{-\imath \omega z/c}\label{eq:p1a}\\ \hat{p}_{2j}^{}(z)&=\hat{p}_{2j}^{+}e^{\imath \omega(z-L)/c}+\hat{p}_{2j}^{-}e^{-\imath \omega(z-L)/c}\label{eq:p2b} \end{align} \end{subequations} $\hat{p}^{+}$ and $\hat{p}^{-}$ are the complex amplitudes of the downstream and upstream traveling waves. The recorded microphone signals are transformed into the frequency domain using the method presented by Chung~\cite{chung1977}. This method rejects uncorrelated noise, \eg turbulent flow noise, from the coherent sound pressure signals. Therefore, the sound pressure spectrum of one microphone is determined by calculating the cross-spectral densities between three signals, where one signal serves as a phase reference. In our case the phase reference signal is the source signal of the active loudspeaker. As a result we obtain a phase-correlated complex sound pressure spectrum for each microphone signal. According to Eqs.~\eqref{eq:p1a}-\eqref{eq:p2b} the measured acoustic signal is a superposition of two plane waves traveling in opposite direction. In order to determine the downstream and upstream propagating portions of the wave in each section, a mathematical model is fitted to the acoustic microphone data. This model considers viscous and thermal conductivity losses at the duct wall. They are included in the wave number with the following attenuation factor $\alpha$ as proposed by Kirchhoff~\cite{kirchhoff1868}: \begin{equation} \alpha=\frac{1}{c R_{\textrm{d}}}\sqrt{\frac{\nu \omega}{2}}\left(1+\frac{\gamma-1}{\sqrt{Pr}}\right) \end{equation} with the duct radius $r$, the speed of sound $c$, the kinematic viscosity $\nu$, the angular frequency $\omega$ (as in Eq.~\eqref{eq:Navier_Stokes}), the heat capacity ratio $\gamma$, and the Prandtl number $Pr$. As a result of this least-mean-square fit, the four complex sound pressure amplitudes $\hat{p}_{1}^{+}$, $\hat{p}_{1}^{-}$, $\hat{p}_{2}^{+}$ and $\hat{p}_{2}^{-}$ are identified at position $z=0$ for both measurements. These sound pressure amplitudes are related to each other via the reflection and transmission coefficients of the test object. This is illustrated in Fig.~\ref{fig:sound-field} for the two different measurements $A$ and $B$. In order to calculate the reflection and transmission coefficients $r^+$, $r^-$, $t^+$, and $t^-$ from the sound pressure amplitudes the following four relations can be derived for $j=a,b$: \begin{subequations} \begin{align} \hat{p}_{1j}^{-}=r^{+}\hat{p}_{1j}^{+}+t^{-}\hat{p}_{2j}^{-}\\ \hat{p}_{2j}^{+}=r^{-}\hat{p}_{2j}^{-}+t^{+}\hat{p}_{1j}^{+} \end{align} \end{subequations} \begin{figure}[!bt] \centering \includegraphics[width=0.45\linewidth]{figure9.pdf} \caption{Illustration of the sound filed in the duct for measurements $A$ and $B$ by means of the sound pressure amplitudes $\hat{p}$, the reflection coefficient $r$, the transmission coefficient $t$, and the end reflection $r_e$} \label{fig:sound-field} \end{figure} The equations from both measurements are combined and solved for the reflection \begin{equation} r^{+}=\frac{\hat{p}_{1a}^{-}\hat{p}_{2b}^{-}-\hat{p}_{1b}^{-}\hat{p}_{2a}^{-}}{\hat{p}_{1a}^{+}\hat{p}_{2b}^{-}-\hat{p}_{1b}^{+}\hat{p}_{2a}^{-}}\quad\quad r^{-}=\frac{\hat{p}_{2b}^{+}\hat{p}_{1a}^{+}-\hat{p}_{2a}^{+}\hat{p}_{1b}^{+}}{\hat{p}_{1a}^{+}\hat{p}_{2b}^{-}-\hat{p}_{1b}^{+}\hat{p}_{2a}^{-}} \label{eq:ReflectionCoefficients} \end{equation} and transmission coefficients \begin{equation} t^{+}=\frac{\hat{p}_{2a}^{+}\hat{p}_{2b}^{-}-\hat{p}_{2b}^{+}\hat{p}_{2a}^{-}}{\hat{p}_{1a}^{+}\hat{p}_{2b}^{-}-\hat{p}_{1b}^{+}\hat{p}_{2a}^{-}}\quad\quad t^{-}=\frac{\hat{p}_{1a}^{+}\hat{p}_{1b}^{-}-\hat{p}_{1b}^{+}\hat{p}_{1a}^{-}}{\hat{p}_{1a}^{+}\hat{p}_{2b}^{-}-\hat{p}_{1b}^{+}\hat{p}_{2a}^{-}} \label{eq:TransmissionCoefficients} \end{equation} in downstream and upstream direction, respectively. The advantage of combining the two measurements is that the resulting coefficients are independent from the reflection of sound at the duct terminations. These end-reflections are contained in the sound pressure amplitudes, but do not need to be calculated explicitly. Moreover in the case of a uniform and stagnant flow these coefficients do not depend on the direction we consider, \ie $r^-=r^+$ and $t^-=t^+$. The dissipation of acoustic energy is expressed by the dissipation coefficient. The dissipation coefficient $\boldsymbol{\Delta}$ can be calculated directly from the reflection coefficient $R$ and the transmission coefficient $T$ via an energy balance \begin{equation} \label{eq:EnergyConservation} R^{\pm}+T^{\pm}+ \boldsymbol{\Delta}^{\pm}=1. \end{equation} To compute these coefficients, the integration of the acoustic energy flux in a uniform and stagnant flow yields a relation between the acoustic pressure $p$ and acoustic power $P$ quantities(see Blokhintsev~\cite{blokhintsev1946} and Morfey~\cite{morfey1971})~: \begin{equation} \label{eq:Power} P^{\pm}=\frac{\pi R_{\textrm{d}}^2}{2\rho_0 c} \left|\hat{p}^{\pm}\right|^{2} \end{equation} Then, the energy coefficients can be given relative to the pressure coefficients as: \begin{subequations} \label{eq:EnergyReflection} \begin{align} R^{+} &=\tfrac{P_{1}^{-}}{P_{1}^{+}} = \left|r^{+}\right|^{2} \label{eq:EnergyReflectionPlus}\\ R^{-} &=\tfrac{P_{2}^{+}}{P_{2}^{-}} = \left|r^{-}\right|^{2} \label{eq:EnergyReflectionMinus}\\ T^{+} &=\tfrac{P_{2}^{+}}{P_{1}^{+}} = \left|t^{+}\right|^{2} \label{eq:EnergyTransmissionPlus}\\ T^{-} &=\tfrac{P_{1}^{-}}{P_{2}^{-}} = \left|t^{-}\right|^{2} \label{eq:EnergyTransmissionMinus} \end{align} \end{subequations} where the indices $1$ and $2$ refer to section 1 and section 2 of the duct as illustrated in Fig.~\ref{fig:sound-field}. With the energy balance~\eqref{eq:EnergyConservation} follows the definition of the energy dissipation coefficient \begin{equation} \boldsymbol{\Delta} = 1-\left \left|r^{\pm}\right|^{2}+\left|t^{\pm}\right|^{2}\right) \label{eq:dissipation} \end{equation} This is an integral value of the acoustic energy that is absorbed while a sound wave is passing the damping module. The dissipation coefficient is used to evaluate the damping performance of the test object. \subsubsection{\sffamily Numerical simulation of dissipation losses} This setup is also simulated numerically using the equivalent problem~\eqref{eq:Helmholtz:pressure}-\eqref{eq:impedance_conditions:pressure_only} for the pressure with a source term corresponding to an incoming field $p_\inc(r,\theta,z) = \exp(\imath \omega z / c)$ from the left. The scattered field is computed numerically using the mode matching procedure with $N=5$ modes~\cite{Semin.Thoens-Zueva.Schmidt:2017}: we seek for the scattered field $p_0$ under the form (see Fig.~\ref{fig:split}(b)) \begin{subequations} \label{eq:mode_decomp} \begin{align} p_0(r, \theta, z) & = p_\inc(r,\theta,z) + \sum_{j=0}^{N-1} \alpha_j^- \,\psi_j(r)\, \exp(- \imath\, \beta_j\, z), \quad z<0, \\ p_0(r, \theta, z) & = \sum_{j=0}^{N-1} \alpha_j^+ \,\psi_j(r)\, \exp(\imath\, \beta_j\, z), \quad z>L, \end{align} inside the waveguide part, and under the form \begin{equation} \label{eq:mode_decomp_chamber} p_0(r, \theta, z) = \sum_{j=0}^{2N-1} \psi'_j(r)\big( {\alpha'_j}^+ \exp(\imath\, \beta_j'\, z) + {\alpha'_j}^- \exp(\imath\, \beta_j'\, (L-z))\big), \quad 0 < z < L, \end{equation} inside the duct part. The pairs $(\beta_j,\psi_j)$ and $(\beta_j',\psi_j')$ are solution of a ``2D'' transverse eigenvalue problem in the wave-guide and liner parts, using the fact that the source term $p_\inc$ and the geometry are independent of the angle~$\theta$. From the mode matching and assuming that there is only one propagative mode inside the waveguide, \ie $\beta_j \in \imath{\mathbb R}$ for $j \not=0$, the energy dissipation coefficient is computed as \end{subequations} \begin{equation} \label{eq:dissipation_numerical} \boldsymbol{\Delta} := 1 - \left( |\alpha_0^+|^2 + |\alpha_0^-|^2 \right), \end{equation} and corresponds to the energy dissipation coefficient $D^\pm$ (Eq.~\eqref{eq:dissipation}) if both grazing and bias flows are absent. \begin{figure}[!bt] \centering \includegraphics[width=0.95\linewidth]{figure2.pdf} \caption{Split of the domain $\Omega$ into the two semi-infinite waveguides $\Omega_\pm$ and the multi-perforated liner section $\Omega_{\textrm{c}}$. Impedance transmission conditions on the interface $\Gamma_\liner$ approximate the behaviour of the many perforations.} \label{fig:split} \end{figure} \subsection{\sffamily Numerical results and comparison with experimental data} \label{sec:numerical-results} Figure~\ref{fig:CR} shows the average dissipation of the different liner configurations (see table~\ref{tab:liner_configurations}) in the DUCT-C setup (see figure~\ref{fig:sound-field}) as a function of the frequency. The average dissipation represents a mean value of the dissipation results for the upstream and downstream acoustic incidence (see section~\ref{sec:experimental-setup}). In a symmetric setup and without grazing flow this is, of course, equal to the dissipation from either side of excitation. The graphs compare the experimental values (symbols), the former theoretical model from Melling~\cite{melling1973acoustic} (dashed lines) and the here introduced asymptotic model (solid lines). In result, the asymptotic model indicates a better comparison to the experimental values especially for the configurations DC006 (figure~\ref{fig:CR} (a)) and DC008 (figure~\ref{fig:CR} (c)) where the Melling model slightly underestimates the dissipation in the frequency range above approximately 400~Hz. For the configuration DC007 with a porosity of 1.0~\% and a hole diameter of 2.5~mm both models (Melling and asymptotic) underestimate the maximum dissipation of approximately 0.4 around 400~Hz revealed in the experimental studies. \begin{figure}[!bt \centering \includegraphics[width=0.95\linewidth]{figure10.pdf} \caption[Compare dissipation]{% Average dissipation from experiments and numerical modelling plotted over the frequency comparing models for DC006, DC007, DC008, DC009.} \label{fig:CR} \end{figure} \section{\sffamily Conclusions} It has been shown that impedance conditions with one numerically computed parameter -- the effective Rayleigh conductivity -- can predict well the dissipation losses of acoustic liners. % The effective Rayleigh conductivity can be obtained by solving numerically an instationary Stokes problem in frequency domain of one hole with a scaled viscosity in an characteristic infinite domain with prescribed pressure at infinity. % For the computation the infinite domain is truncated, where we propose approximative boundary conditions on the artificial boundaries and an extrapolation procedure to save computation time. % We decoupled in a systematic way the effects at different scales and derived impedance conditions for the macroscopic pressure or velocity based on a proper matching of pressure and velocity at the different scales. In difference to a direct numerical solution for the acoustic liner the overall computation effort is separated into a precomputation of the effective Rayleigh conductivity and a computation of the Helmholtz equation for the pressure with impedance conditions, where no holes have to be resolved anymore by a finite element mesh. The comparison with measurements in the duct acoustic test rig with a circular cross-section at DLR Berlin show that the dissipation losses based on the impedance conditions with effective Rayleigh conductivity are well predicted. The derivation of the impedance conditions do not depend on the cylindrical shape of the liner and can be used for others shapes like rectangular profiles. The procedure for the computation of the effective Rayleigh conductivity can not only be extented to include thermic effects that are currently only heuristically incorporated, but also nonlinear effects inside the hole that lead to an interaction of frequencies. \section*{\sffamily Acknowledgements} The authors would like to thank Claus Lahiri (Rolls-Royce) for fruitful discussions. The research was supported by Einstein Center for Mathematics Berlin via the research center MATHEON, Mathematics for Key Technologies, in Berlin as well as the Brandenburgische Technische Universit{\"a}t Cottbus-Senftenberg through the Early Career Fellowship of the second author. The research was partly conducted during the stay of the first and second author at the TU Berlin and the first author at BTU Cottbus-Senftenberg. \section*{\sffamily References} \begingroup \renewcommand{\section}[2]{}%
\section{Dynamic Discrete Choice Models} Research in, and applications of, Dynamic Discrete Choice Models (DDCMs) has reached some maturity. The history of the research program is well-established, and several surveys exists, see for example \cite{rust1994structural} and \cite{aguirregabiria2010dynamic}. In addition to surveys, the most relevant papers are \cite{rust1987optimal,john1988maximum,norets2010continuity} for information on the \emph{expected value function}, and \cite{aguirregabiria2002swapping, aguirregabiria2010dynamic} for the \emph{integrated value function} formulation. We briefly define relevant objects of interest, as their definitions will be used below. The problem we're trying to solve is \begin{align*} V(s) = \max_{a_0, \ldots a_T} E\left[\sum_{t=0}^T\left(\beta^{t}U(a_t,s_t))\right)|s_0\right] \end{align*} although we will consider the infinite horizon (stationary) dynamic programming formulation \begin{equation} V(s) = \max_{a}\left(U(a,s)+\beta E_{s'}V(s')|s\right) \end{equation} for all purposes below. The choice set, $\mathcal{A}$, is discrete and finite with $J$ elements. The first problem we face is, that the value function depends on the shocks, and that these are typically continuous and unbounded - and unobserved. Then, the usual theorems do not apply. Below, we will use the the fact that the state $s$ consists of the \emph{observed} states $x$ and the shocks $\epsilon$, such that $s=(x,\epsilon)$. We will also assume Conditional Independence (CI), that is $(x, \epsilon)$ follows a (controlled) Markov process according to the following transition density \begin{align*} p(x',\epsilon'|x,\epsilon, i) = q(\epsilon'|x')p(x'|x,i). \end{align*} The shocks enter in a specific way \begin{align*} U(s,a) = u(x, a)+\epsilon, \end{align*} that is they are additive. \subsection{Expected Value Function (EV)} The expected value formulation follows \cite{john1988maximum} and exploits the results the author presented on the the continuity, differentiability, and contraction properties of the expected value function in what \cite{aguirregabiria2010dynamic} called Rust models. \cite{norets2010continuity} showed that the results extend beyond the restrictions in the original formulation, but we will focus on \emph{Rust models} below. The expected value function is \emph{defined} as \begin{align*} EV_a(x) \equiv E_{s'}\left(V(s')|s,a\right) = E_{s'}\left(V(x',\epsilon')|s\right) \end{align*} and leads to the following set of expected Bellman equations \begin{align*} EV_a(x) &= E_{s'}\left(\max_{j}\left[U(j,x',\epsilon')+\beta EV_j(x')\right]|s,a\right),\quad\forall x\in \mathcal{X}, \forall a\in\mathcal{A}\\ EV_a(x) &= \Gamma_{a}(EV,x). \end{align*} It solves two problems of handling $V(s)$ directly: the expected Bellman operator is a contraction even if we have an unbounded (additive) component in $U$, and we do not have to find the solution at each $\epsilon$, only each $x$. If we assume extreme value type I shocks, we can further simplify the expression: \begin{align*} \Gamma_{a}(EV,x) &= E_{x'}\left(\log\left[\sum_{j\in\mathcal{A}}\exp\left\{u(x, j)+\beta EV(x',j)\right\}\right]|x,a\right). \end{align*} We got rid of the numerical integration over shocks, and the maximization step was replaced with the log-sum-exp calculation. The problem is now almost a trivial exercise in root finding once we realize that Newton's method applied to $\Gamma_{EV}(EV)-EV=0$ will give us convergence to some $\varepsilon$ tolerance level in few iterations. \subsubsection{Discrete $\mathcal{X}$} If we assume that $\mathcal{X}$ is discrete and finite, we get \begin{align*} \Gamma(EV, a) &= F(a)\left(\log\left[\sum_{j\in\mathcal{A}}\exp\left\{u(j)+\beta EV(j)\right\}\right]\right) \end{align*} where $F(a)$ is the conditional transition \emph{matrix} of dimension $|\mathcal{X}|\times|\mathcal{X}|$, $\log$ and $\exp$ are applied element-wise, and $EV(j)$, $u(j)$ are (stacked over $x$) vectors of length $|\mathcal{X}|$. \subsection{Integrated Value Function (W)} We saw that \cite{john1988maximum} took the joint expectation over $s$ to get rid of two problems: unboundedness of $U$, and $\epsilon$ as an explicit state variable. Let us now consider an way of simplifying the problem. We consider the formulation in \cite{aguirregabiria2002swapping}. They consider the \emph{integrated} value function as the object of analysis, defined as \begin{align*} W(x)\equiv E_{\epsilon'}\left[V(x,\epsilon')|\epsilon\right] \end{align*} leading to the integrated Bellman equations \begin{align*} W(x) &= E_{\epsilon'}\left[\max_{j}\left\{U(j,x,\epsilon')+\beta E_{x'|x,j}W(x')\right\}|\epsilon\right],\quad\forall x\in \mathcal{X}\\ W(x) &= \Lambda(W, x) \end{align*} which will solve the same problem as $\Gamma$. Again, we get the simplification using extreme value type I shocks that \begin{align*} \Lambda(W, x) = \log\left[\sum_{j\in\mathcal{A}}\exp\left\{u(x, j)+\beta E_{x'}(W(x'),|x,j)\right\}\right] \end{align*} Since we know that $\Gamma$ is continuous and once differentiable, then so will $\Lambda$ be, as it is simply a $\log$ to the sum of exponentials of the sum of a continuous function (utility) and the EVs. They are also both contraction mappings with the same Lipschitz constant ($\beta$). \subsubsection{Discrete $\mathcal{X}$} Again, discrete and finite $\mathcal{X}$ simplifies matters, and we get \begin{align*} \Lambda(W) = \log\left[\sum_{j\in\mathcal{A}}\exp\left\{u(j)+\beta F(a)W\right\}\right]. \end{align*} Dimensions are as before, and all terms are stacked over $x$'s. \section{Solution methods} Since the comparison here is motivated by the solution part of the nested fixed point algorithm in \cite{rust1987optimal}, we'll focus on two methods: value function iterations and Newton steps for fixed point problems. We consider discrete state spaces, although the lessons apply to the continuous state case as well. First consider the cost of \textbf{value function iterations} (VFIs). It is the same for $EV$ and $V$. Consider again the expressions from above \begin{align*} \Gamma(EV, a) &= F(a)\left(\log\left[\sum_{j\in\mathcal{A}}\exp\left\{u(j)+\beta EV(j)\right\}\right]\right)\quad\forall a\in\mathcal{A}\\ \Lambda(W) &= \log\left[\sum_{j\in\mathcal{A}}\exp\left\{u(j)+\beta F(a)W\right\}\right]. \end{align*} as long as we only calculate the log-sum-exp expression in $\Gamma$ once per major VFI iteration, they both require $J$ matrix-vector multiplications, $J$ scalar-vector products, $J$ vector-vector additions, $J$ $\exp$ calls over vectors and one $\log$ call over a vector. This means that really is no reason to choose one over the other. For \textbf{Newton's method} the computational costs differ. Define the conditional choice probabilities as \begin{align*} P(a, x) &= Pr\left(a=\arg \max_{j\in\mathcal{A}} \{u(j, x)+\epsilon(j)+\beta E_{x'}(W(x')|x,j)\}\right)\\ &= \frac{\exp\left(u(a,x)+\beta E_{x'}(W(x'|x,a)\right)}{\sum_{j\in\mathcal{A}}\exp\left(u(j,x)+\beta E_{x'}(W(x)|x,j)\right)} \end{align*} where the last line follows from the conditional independence and i.i.d. extreme value type I assumptions from above. Then, stack the Bellman equations \begin{align*} W &= \Gamma(W),\\ EV &= \{\Gamma(EV, j)\}_{j\in\mathcal{A}}. \end{align*} Rearranging, we get \begin{align*} W -\Gamma(W)&=(I -\Gamma)(W) =0,\\ EV -\Lambda(EV &= (I-\Lambda)(EV) =0, \end{align*} where $I$'s denote the multiplicative identity, and $0$ is the zero element in the Banach spaces where our value functions live. When we say we are using Newton's method, it means applying Newton's method to these equations by use of an inverse function theorem \begin{align*} W_{k+1} &\leftarrow W_{k} + (I-\Lambda')^{-1}(I-\Lambda)W_{k}\\ EV_{k+1} &\leftarrow EV_{k} + (I-\Gamma')^{-1}(I-\Gamma)EV_{k} \end{align*} Looking at the discrete versions of the formul\ae, and calculating the partial derivative state-by-state, we see it is $\beta$ times the controlled transition. That is, for $W$ we get \begin{align*} \Lambda' &= \left(\sum_{i=1}^{J}\beta P(i)*F(i)\right)\\ \end{align*} For the $EV$, the derivative has more elements, and can be calculated as (defining $P$ as the stacked conditional choice probabilities $\{P(j)\}_{j\in\mathcal{A}}$: \begin{align*} \Gamma' &= \beta P*^\top \begin{pmatrix}F(1) & F(1) &\cdots&F(1)\\ F(2) & F(2) &\cdots&F(2)\\ \vdots &\vdots &\ddots&\vdots\\ F(J) & F(J) &\cdots&F(J)\end{pmatrix} \end{align*} where $*^\top$ is the Hadamard product between the vector $P$ and the matrix, but applied down through the rows instead of across the columns as is usually done, such that \begin{align*} p*^\top M = (p*M^\top)^\top \end{align*} for a vector $p$ and matrix $M$. Here we have the problem of using the EV formulation: if we want to use Newton's method (and we really do), then this is now a $J|\mathcal{X}|\times J|\mathcal{X}|$ problem, or $J^2$ as large as the integrated value function problem. Note, that in regenerative models it is possible to use a trick in the style of the original \cite{rust1987optimal}. However, it does require a little care when specifying the transitions, and indeed there is a mistake in the original application, see the appendix for the details. \subsection{Mathematical Programming with Equilibrium Constraints} The solution of the types of model we've considered here, is typically used in NFXP to estimate parameters in a given model based on some data we observe. This is quite naturally formulated as a constrained maximum likelihood problem as mentioned in \cite{RustManual}, but NFXP essentially substitutes the constraints into the likelihood function since the model can be efficiently solved using the methods presented here. The MPEC (Mathematical Programming with Equilibrium Constraints) method in \cite{SuJudd} basically keeps the restrictions on the feasible $EV$'s (the ones that solve $EV=\Gamma(EV)$) in the formulation as equality constraints. They then solve the constrained maximum likelihood problem using an interior point solver. Since each point in the state space has a constraint for each choice, $EV_j(x_k) = \Gamma(EV, j, x_k)$, the considerations mentioned above for Newton's method also applies here. A much more concise specification is available, by simply considering constraints of the form $W(x_k) = \Lambda(W, x_k)$ instead. \section{Numerical results} We present some numerical evidence to support the claims above, and to assess the practical importance of them. First, convergence is the same in the two approaches. Consider \autoref{table:nk} for a sequence of the $\infty$-norm of the differences between the current and previous iterates. \begin{table} \centering \begin{tabular}{lll} \toprule k & W & EV\\ \midrule 1& $2.244 \times 10^1$ & $2.244 \times 10^1$\\ 2& $1.666 \times 10^1$ & $1.666 \times 10^1$\\ 3& $1.292 \times 10^{1}$ & $1.292 \times 10^{1}$\\ 4& $1.091 \times 10^{1}$ & $1.091 \times 10^{1}$\\ 5& $5.535 \times 10^{0}$& $5.531 \times 10^{0}$\\ 6& $2.883 \times 10^{0}$ & $2.879 \times 10^{0}$\\ 7& $3.635 \times 10^{-1}$& $0.363 \times 10^{-1}$\\ 8& $6.553 \times 10^{-3}$ & $0.007 \times 10^{-3}$\\ 9& $1.378 \times 10^{-6}$ & $1.362 \times 10^{-6}$\\ 10& $7.105 \times 10^{-14}$ & $6.928 \times 10^{-14}$\\ \bottomrule \end{tabular} \caption{Convergence of Newton steps in Rust's model ($|\mathcal{X}|=1000$) measured in change in $EV$ for both cases.} \label{table:nk} \end{table} For a given $k$, we see the similar improvements. What about differences in run-times? In \autoref{table:times}, we see the time to perform a Newton step for the $EV$ formulation relative to the $W$ formulation. We solve Rust's model, and what we call Hitsch's model. The latter is a storable goods demand model. For a similar peer reviewed model see \cite{hendel2006measuring}. This simpler version is due to a presentation by G\"{u}nter J. Hitsch. \footnote{See the presentation titled "Single Agent Dynamics: Dynamic Discrete Choice" by G\"{u}nter J. Hitsch, The University of Chicago Booth School of Business, 2013.} The $W$ formulation is faster as expected. We also report the time to calculate the Newton step and add it to the existing iterate. The "total" time also includes calculating choice probabilities, the derivative of the Bellman operators, and so on. \begin{table} \centering \begin{tabular}{lllllll} Rust's model ($J=2$) & && & \\ \toprule $|\mathcal{X}|$& 10 & 100 & 200 & 300 & 500 & 800\\ \midrule Total relative time (EV/W) & 3.94 & 2.80 & 3.64 & 3.93 & 4.26 & 7.16\\ Only $x_{k-1}+(I-M)\backslash(x_k-x_{k-1})$ & 3.90 & 3.56 & 4.78 & 4.94 & 5.47 & 7.24 \\ \bottomrule\\ Hitsch's model ($J=3$)&&&\\ \toprule $|\mathcal{X}|$ & 12 & 102 & 202 & 302 & 502 & 802 \\ \midrule Total relative time (EV/W) & 4.45 & 5.07 & 7.26 & 10.90 & 9.60 & 13.49 \\ Only $x_{k-1}+(I-M)\backslash(x_k-x_{k-1})$ & 3.93 & 8.40 & 13.10 & 16.70 & 15.84 & 16.56 \\ \bottomrule \end{tabular} \caption{Relative run-times of Newton-steps. Times are given as EV formulation relative to W formulation, both total time and the time it takes to calculate the step and take it.} \label{table:times} \end{table} \section{Conclusion} \cite{rust1987optimal,john1988maximum} introduced simplifying assumptions that facilitated solution and estimation of empirically models of dynamic, discrete decision making. The theory and analysis was based on the expected value function. As shown, this is \emph{not} efficient if Newton's method is applied to solve the system. The same information contained in the $EV(a)$'s can be summarized by the lower dimensional $W$. If successive approximations are used, there is no advantage, but if higher order methods are applied, it is inefficient to use $EV$ over $W$. This also applies to the MPEC approach in \cite{SuJudd}, which will have more constraints than necessary. The performance gap increase as the number of choices increases, so especially multinomial problem is many discrete choices should be solved with $W$ instead of $EV$.
\subsection*{Appendix}Below we adopt and use without mention notations from \cite{Tsiokos2}.\begin{lem}\label{lemco} Let $\pi$ and $\F\in\AAA[,n]$ and $\pi\in\Aut{\kkk,n,>}$. Assume that $\Om^\prime(\pi)\in\Om(\F)$ and that an $(\F\rightarrow\Pri[,n],GL_n,\kkk)$-tree has only finitely many, say $k$, output vertices with label in $\Pri[,n][\Om^\prime(\pi)]$. Then there is an $\phi\in\pi$ such that $\F(\phi)$ is the sum of $k$ factorizable functions. \end{lem}\begin{tproof}The proof is obtained directly from the proof of Corollary 5.6 in \cite{Tsiokos2} and the following claim: \vsp \noindent\textbf{Claim.}\textit{ Let $\F\in\AAA[,n]$. Consider operations $\exchange{Y}{X}$ and $\e(V)$ (defined with the current choices of $\kkk$ and $n$), such that $\e(V)(\exchange{Y}{X}(\F))$ is defined. Then, for any AF $\QQ\in\e(V)(\exchange{Y}{X}(\F))$ the integral \begin{equation}\label{rint}\int_{(Y\cap C)(\A)\s Y(\A)}\QQ(\phi)(n)dn \end{equation} is absolutely convergent, where $C$ is as in Definition 2.5.11 in \cite{Tsiokos2} (for the current choices of $X,Y,\F$).} \vsp \noindent\textit{Proof of Claim. }$\F(\phi)(1)=\int_{Y(\kkk)(Y\cap C)(\A)\s Y(\A)}\F|_C(\phi)(y)dy. $ We apply to $F|_C(\phi)$ the Fourier expansion over $X(\kkk)(X\cap C)(\A)\s X(\A)$, and then to each term $\Z$ we apply the Fourier expansion over $vVv^{-1}(\kkk)(v Vv^{-1}\cap XC)(\A)\s vVv^{-1}(\A)$ where $v$ is the element in $Y(\kkk)$ satisfying $v^{-1}\Z =\exchange{X}{Y}(\F)$. Among the terms obtained consider the ones of the form $v\QQ(\phi)$ for any $v$ as previously; then we integrate over $\int_{Y(\kkk)(Y\cap C)(\A)\s Y(\A)}$ the sum of these terms, and by using Fubini's theorem we obtain the absolute convergence of the integral in (\ref{rint}).$\hspace*{134pt}\square$Claim \end{tproof}
\section{Introduction: Top Partners and Naturalness} Together with the Higgs boson, the top quark is one of the main actors in beyond the Standard Model (SM) theories. Its sizable Yukawa coupling, $y_{top}$, generates the largest radiative corrections to the Higgs potential. If these corrections are too large, which is the case if the SM has a large cut-off $\Lambda_{\rm SM}$, a sizable amount of cancellation is required to obtain the correct Higgs mass. This is the origin of the well-known naturalness problem. To be more quantitative we can evaluate the amount of fine-tuning by comparing the physical Higgs mass $m_H \simeq 125\;$GeV with the leading one-loop corrections. In such a way we can estimate the (minimal) amount of fine-tuning to be \begin{equation}\label{eq:tuning} \Delta \geq \frac{\delta_{\rm 1-loop} m_H^2}{m_H^2} = \frac{3 y_{top}^2}{8 \pi^2} \left(\frac{\Lambda_{\rm SM}}{m_H}\right)^2 \simeq \left(\frac{\Lambda_{\rm SM}}{450\;\rm{GeV}}\right)^2\,. \end{equation} It is clear that, in order to obtain a completely natural (i.e.~not fine tuned) theory, the SM cut-off must be close to the electroweak (EW) scale. The UV dynamics, moreover, must be ``connected'' to the top quark, in such a way to ``screen'' its radiative contributions to the Higgs potential. In such models the $\Lambda_{\rm SM}$ scale can be typically identified with the mass of some ``partners'' of the top, which must be below or around the TeV scale to avoid too much tuning. This conclusion proves correct in basically all classical beyond the SM (BSM) theories that aim to solve the naturalness problem. A well known example is low-energy supersymmetry, in which bosonic partners of the top, the `stops', are present, which regulate the quadratic divergence in the radiative top contributions to the Higgs mass. In the following we will focus on another class of theories, in which the Higgs boson is not an elementary state as in the SM, but instead a composite object arising from a new strongly-coupled dynamics. This idea reached nowadays a compelling embodiment, the ``composite Higgs'' (CH) scenario (see~\cite{Contino:2010rs,Panico:2015jxa} for reviews). Its main assumption is the identification of the Higgs with a pseudo-Goldstone boson~\cite{ Kaplan:1983fs}, corresponding to an ${\rm SO}(5)/{\rm SO}(4)$ coset in minimal models~\cite{Agashe:2004rs}. An additional ingredient is the generation of the top mass through the partial-compositeness mechanism~\cite{Kaplan:1991dc} (we will discuss this point in detail in sec.~\ref{sec:flavor}). Under this assumption the SM states, which are external with respect to the composite sector (with the possible exception of the $t_R$ component), are mixed with suitable composite operators. In the low-energy description these couplings can be effectively parametrized through mass mixings of the elementary states with composite fermionic resonances. As can be easily understood, the resonances corresponding to the top quark, the `top partners', play a central role in the EW dynamics. First of all they give rise to the top Yukawa coupling and, second, they control the generation of the Higgs potential and therefore the amount of fine-tuning. Top partners constitute one of the most compelling prediction of CH models and are one of the privileged ways to test directly these scenarios. Higgs and top compositeness have other important implications for phenomenology. One of them is a quite specific pettern of deviations in the Higgs and top couplings, which can be tested in collider experiments. Another interesting aspect is the flavor structure, which is deeply influenced by partial compositeness. We will discuss all these aspects in the following sections. \section{Phenomenology of Top Partners}\label{sec:top_partners} Goldstone symmetry and partial compositeness determine the main properties of top partners. Being part of the composite sector, they necessarily fill extended EW multiplets corresponding to representations of the unbroken custodial group ${\rm SO}(4) \simeq {\rm SU}(2)_L \times {\rm SU}(2)_R$. Since they mix with the top quarks, top partners must be charged under QCD transforming in the fundamental of ${\rm SO}(3)_c$. As we mentioned the top and its partners give rise to the leading contribution to the Higgs potential through radiative effects. The size of the Higgs mass term is controlled by the typical mass of the top partners (roughly coinciding with the mass of the first complete ${\rm SO}(5)$ representation of states). Light top partners are thus needed to reduce the fine tuning~\cite{Matsedonskyi:2012ym,Panico:2012uw}. The amount of tuning can be easily estimated through eq.~(\ref{eq:tuning}) identifying $\Lambda_{\rm IR}$ with the top partners mass. Notice that this is a only a lower bound on the fine-tuning, since in several models peculiarities of the structure of the Higgs potential require additional cancellations~\cite{Panico:2012uw}. Top partners can be copiously produced at hadron colliders since they are colored objects. For low masses the dominant production channel is QCD pair production, whose cross section only depends on the resonance mass. This channel can thus be used to extract model-independent bounds on top partners. An additional production channel is single production in association with a top or a bottom quark. This channel crucially depends on the EW gauge couplings that mix the SM quarks with the composite partners and is thus model-dependent~\cite{DeSimone:2012fs}. It is more relevant for high partner masses, since its cross section decreases more slowly than pair production. To give an idea of the LHC reach on top partners we show in fig.~\ref{fig:bounds} some projections for the bounds on typical top partners multiplets at the $13\;$TeV LHC~\cite{Matsedonskyi:2015dns} (updated bounds can be found in~\cite{Panico:2017vlk}). Current bounds from pair production are of order $1.2\;$TeV, basically independent of the top parter quantum numbers. Single production bounds instead are more sensitive to the details of the model. In the plots we also show the estimates of the minimal amount of fine-tuning obtained from eq.~(\ref{eq:tuning}). One can see that configurations with relatively low tuning ($\sim 10\%$) are still allowed at present, whereas the end of the LHC program will test parameter space points up to $\sim 1\%$ tuning. \begin{figure}[t] \centering \includegraphics[width=.4\textwidth]{4plet-5+5_13TeV_HighLumi} \hspace{2em} \includegraphics[width=.385\textwidth]{Singlet-5+5_13TeV} \vspace{-1em} \caption{Estimate of the LHC direct exclusion bounds on the top partner masses in two simplified effective scenarios with a light ${\rm SO}(4)$ fourplet (left) and a light singlet (right)~\cite{Matsedonskyi:2015dns}. The dashed lines show an estimate of the minimal amount of tuning $\Delta$. The striped region in the right plot corresponds to the indirect bounds from deviations in the $V_{tb}$ matrix element.} \label{fig:bounds} \end{figure} In miminal CH scenarios, such as the holographic MCHM constructions~\cite{Agashe:2004rs}, the mass of the lightest top partners can be directly related to the compositeness scale $f$, corresponding to the Goldstone Higgs decay constant~\cite{Matsedonskyi:2012ym}. In this case the bounds from top partners direct searches can be translated into a lower bound on $f$. Current exclusions correspond to $f \gtrsim 800\;$GeV (or $\xi = v^2/f^2 \lesssim 0.1$, where $v = 246\;$GeV is the Higgs VEV), while the end of the LHC program could push the bound to $f \gtrsim 1.1\;$TeV ($\xi \lesssim 0.05$)~\cite{Matsedonskyi:2015dns}. \section{Top Couplings}\label{sec:top_couplings} The CH set-up gives rise to peculiar deviations in the Higgs and top couplings. The main effects are the modification of Yukawa and gauge interactions and the presence of $4$-top effective operators. All these effects are controlled by the Goldstone symmetry. The couplings to the gauge fields are affected in a universal way. In models based on the ${\rm SO}(5) \rightarrow {\rm SO}(4)$ symmetry structure, the couplings to the $W$ and $Z$ bosons are rescaled by a factor $\kappa_V = \sqrt{1 - \xi}$. The Yukawa couplings, on the other hand, are modified in a way that depends on the quantum numbers of the fermion partners. Popular scenarios are the ones in which the SM fermions are mixed with operators in the fundamental ${\rm SO}(5)$ representation, in which case the top Yukawa is rescaled by a factor $\kappa_F = (1 - 2 \xi)/\sqrt{1-\xi}$, or in the spinorial representation, which gives $\kappa_F = \sqrt{1 - \xi}$. The LHC measurement of the Higgs couplings can be used to derive robust bounds on the value of $\xi$. The current data give a bound $\xi \lesssim 0.1$ (they are derived in scenarios in which the bottom and top Yukawa's are modified in the same way, however similar bounds are typically found in more generic models)~\cite{Aad:2015pla}. The present constraints are roughly a factor of two stronger than the expected ones, due to a positive shift in the central value fit of $\kappa_V$. High-luminosity LHC data are not expected to significantly improve the bounds if the central value will move closer to the SM prediction, whereas the bound could change substantially if some deviation will persist. It is interesting to notice that values $\xi \simeq 0.1$ allow for sizable deviations in the top Yukawa. In models with composite operators in the fundamental ${\rm SO}(5)$ representation corrections $\delta y_{top} \simeq 15 - 20\%$ are still compatible with the experimental data. Such deviations could be tested by the direct determination of the top Yukawa in Higgs associated production with a $t\bar t$ pair. Other interesting modifications arise for the gauge interactions involving the top quark. Viable models typically require a discrete custodial $P_{LR}$ symmetry to keep under control the $Z$ couplings to the bottom field~\cite{Agashe:2006at}, which are tested at the $0.1\%$ level. This symmetry, however, can not protect at the same time the top interactions. Deviations of order $\xi$ are thus generically present, induced both by the mixing if the top with its partners and by the presence of vector resonances that mix with the SM gauge fields. Deviations in the $Z \bar t_L t_L$ coupling are constrained by the EW precision measurement to be $|\delta g_{Zt_L}| \lesssim 8\%$~\cite{Efrati:2015eaa}. The $Zt_R\overline t_R$ interaction, on the other hand, is much more elusive, since its SM value is suppressed, and is basically unconstrained. Another coupling that can receive sizable modifications is $W \overline t_L b_L$, which corresponds to the $V_{tb}$ CKM element. In minimal models with custodial $P_{LR}$, deviations in this coupling are related to the corrections in the $Z \bar t_L t_L$ vertex, namely $\delta g_{Zt_L} = \delta V_{tb}$~\cite{delAguila:2000rc}. The bounds on $\delta V_{tb}$ can imply non-trivial constraints on the top partners parameter space, which can be competitive with direct searches for heavy resonances (see for instance the right panel of fig.~\ref{fig:bounds}). Finally the sizable mixing of the top with its composite partners gives rise to effective $4$-fermion contact interactions of the type ${\cal O} = c/f^2 (\bar t \gamma^\mu t)^2$. The coefficient $c$ parametrizes the amount of mixing of the top with its partners and takes values $c \sim 1$ for sizable top compositeness. Contact $4$-top interactions can be tested in $\bar t t \bar t t$ production at the LHC. The currect bounds are of order $c/f^2 \lesssim 1/(590\;{\rm GeV})^2$~\cite{ATLAS:2016btu}. \section{Flavor Structure}\label{sec:flavor} Let's now discuss the implications for flavor physics. Contrary to models with an elementary Higgs, in which the Yukawa structure can originate in the far UV, in CH models the origin of flavor must be addressed at much lower energies. Since the Higgs is associated with a composite operator ${\cal O}_H$ whose dimension must satisfy $d_H > 2$ to avoid the hierarchy problem, the Yukawa interactions $\overline f_L {\cal O}_H f_R$ have dimension larger than $4$ and are irrelevant operators. If $\bar f_L {\cal O}_H f_R$ is generated at very high energies fermion masses are necessarily too small. To be more quantitative, if $d_H \gtrsim 2$, the maximal energy scale at which a realistic top Yukawa can be generated is $\Lambda_t \lesssim 10\,$TeV. The classical approach to flavor in composite Higgs models is based on the partial compositeness idea, in which the SM fermions get masses by mixing linearly with strong sector operators ${\cal L}_{\rm lin} = \varepsilon_{f_i} \overline f_i {\cal O}_i$. At the strong scale, $\Lambda_{\rm IR} \sim \rm{TeV}$, the fermion Yukawa's are generated with a pattern ${\cal Y}_f \sim g_* \varepsilon_{f_i} \varepsilon_{f_j}$, where $g_*$ is the typical strong-sector coupling. The appealing feature of this scenario, usually dubbed ``anarchic partial compositeness''~\cite{Kaplan:1991dc,anarchic}, is the fact that the smallness of the mixings $\varepsilon_{f_i}$ can simultaneously explain the smallness of the fermion masses and mixing angles. This set-up, however, also predicts sizable flavor-violating effects. Large contributions are expected for the neutron EDM and for $\epsilon_K$, which force the $\Lambda_{\rm IR}$ scale to be of order $10\;$TeV requiring a significant amount of tuning~\cite{anarchic_bounds,Panico:2015jxa}. The situation is even worse if anarchic partial compositeness is naively extended to the lepton sector, in which case corrections to the electron EDM and large $\mu \rightarrow e \gamma$ transitions require $\Lambda_{\rm IR} \gtrsim 100\;$TeV~\cite{Panico:2015jxa}. A possible way to avoid large flavor effects is to introduce flavor symmetries, assuming that the right-handed quarks are fully-composite objects~\cite{Redi:2011zi}. Although these models can pass the flavor bounds for $\Lambda_{\rm IR} \sim {\rm TeV}$, they predict sizable deviations in dijet distributions and large production cross sections for multi-TeV resonances that translate in stringent collider bounds~\cite{Domenech:2012ai}. A recently proposed departure from the classical anarchic paradigm can be used to avoid severe flavor and CP-violating constraints~\cite{Vecchi:2012fv,Panico:2016ull}. The main idea is to assume that the operators ${\cal O}_{f_i}$, that mediate the mixing between the SM fermions and the Higgs, decouple at different energy scales $\Lambda_{f_i} \gg \Lambda_{\rm IR} \sim {\rm TeV}$. This implies that Yukawa-like couplings $\overline f_i {\cal O}_H f_j$ are generated at scales larger than $\Lambda_{\rm IR}$, avoiding sizable flavor and CP-violating effects. The hierarchies in the fermion spectrum and the smallness of the mixing angles is now explained in a ``dynamical'' way by the different $\Lambda_{f_i}$ scales: the larger the decoupling scale, the smaller the Yukawa coupling. In this set-up the only Yukawa that needs to be generated at a low scale is the top one, so that the usual partial compositeness structure will still be valid for the top sector. All the other Yukawa's can be generated at significantly higher scales, up to $\sim 10^7\;$TeV for the first-generation fermions. The structure of the Yukawa matrix for the down quark sector is approximately \begin{equation} {\cal Y}_{\rm down}\simeq \left( \begin{array}{ccccc} \ \ \ Y_d && \alpha_R^{ds} Y_d && \alpha_R^{db} Y_d\\ \rule{0pt}{1.25em} \alpha_L^{ds} Y_d && \ \ \ Y_s && \alpha_R^{sb} Y_s \\ \rule{0pt}{1.25em} \alpha_L^{db} Y_d && \alpha_L^{sb} Y_s && \ \ \ Y_b \end{array} \right)\,, \label{matrixYd} \end{equation} where $Y_i$ denote the SM Yukawa's and $\alpha_{L,R}$ are numerical coefficients typically of order one. An analogous formula holds for the up sector. The off-diagonal terms are much smaller than in the anarchic case (in particular for the up sector), leading to a suppression of flavor-changing effects. In this scenario the leading flavor and CP-violating effects arise from the top partial compositeness~\cite{Panico:2016ull}. Additional contributions originating at the decoupling scale of the other SM fermions are instead well below the current bounds. The leading effects come from the two operators \begin{equation} (1/\Lambda_{\rm IR})\, (\overline Q_{L3} \gamma^\mu Q_{L3})^2\,, \qquad (g_*/\Lambda_{\rm IR}) \overline Q_{L3} \gamma^\mu Q_{L3} i H^\dagger \overleftrightarrow{D}_\mu H\,. \end{equation} After the rotation to the mass eigenstate basis, these two operators give rise to $\Delta F = 2$ and $\Delta F = 1$ transitions respectively. An interesting consequence is the fact that these corrections automatically follow a minimal flavor violation structure, thus significantly ameliorating the compatibility with the experimental data. The current constraints (in particular from $\varepsilon_K$, $\Delta M_B$, $\varepsilon'/\varepsilon$, $K \rightarrow \mu\mu$ and $B \rightarrow (X) \ell \ell$) can be satisfied for $\Lambda_{\rm IR} \sim \textit{few}\;$TeV. Remarkably, the extension of this construction to the lepton sector avoids large corrections to the electron electric dipole moment (EDM) and $\mu \rightarrow e \gamma$, relaxing the strong bounds of anarchic models to the level $\Lambda_{\rm IR} \sim \textit{few}\;$TeV~\cite{Panico:2016ull}. The leading bounds arise from two-loop Barr--Zee contributions to the electron EDM involving a loop of the top and its partners. The present experimental bounds allow to test partner masses of order $\textit{few}\;$TeV, whereas near future experiments will improve the reach by more than one order of magnitude, testing the natural parameter space of these models~\cite{Panico:2017vlk}. \small
\section{Introduction} Integrable quantum mechanical models are special many-body theories, where the eigenvalues and eigenstates of the Hamiltonian are known exactly \cite{korepin-book,sutherland-book}. Moreover, in many cases even thermodynamical properties and correlation functions can be computed \cite{Takahashi-book,kluemper-goehmann-finiteT-review,karol-hab}. There is a vast literature devoted to the study of equilibrium properties of models such as the XXX and XXZ chains, which play a central role due to their relative simplicity despite their interacting nature, and their experimental relevance. Recently an increasing attention has been focused on the study of overlaps. The main question is: how can we compute the overlaps between exact eigenstates of integrable models and certain ``initial states'', and what is the class of states for which exact analytic results are to be expected. The motivation to study this problem comes from (at least) three different areas of research: Quantum Quenches, the AdS/CFT conjecture, and finite temperature problems. First of all, the study of non-equilibrium situations raised the question whether isolated integrable systems equilibrate to Generalized Gibbs Ensembles (GGE's) \cite{rigol-gge,essler-fagotti-quench-review,rigol-quench-review}. One way towards a definite answer is to compute the long time limit of observables from first principles and to compare it to the prediction of the GGE. This approach relies on the knowledge of the overlaps: they are used as an input for the Quench Action (QA) method \cite{quench-action}, which selects those Bethe states that are relevant for the long-time limit of local observables. Thus it was necessary to obtain exact formulas for the overlaps with Bethe states, and this program has been carried out for certain initial states of the spin-1/2 XXZ model \cite{sajat-neel,Caux-Neel-overlap1,Caux-Neel-overlap2,Brockmann-BEC}. These results lead to the understanding that the GGE built from the so-called ultra-local charges is not sufficient to describe the stationary states \cite{JS-oTBA,sajat-oTBA}, but an extended GGE that incorporates all the (recently discovered) quasi-local charges \cite{enej-review} gives correct predictions \cite{JS-CGGE}, at least for the XXZ chain. The Complete GGE specified in \cite{JS-CGGE} (see also \cite{doyon-gge,enej-gge,sajat-eric}) is self-sufficient without the knowledge of the overlaps: it completely determines the relevant Bethe states through certain relations called the ``string-charge duality'' \cite{jacopo-massless-1}. The effectiveness of this approach has been demonstrated for different types of initial states in \cite{JS-CGGE,eric-lorenzo-exact-solutions,sajat-eric}. This raises the question whether the study of overlaps is still relevant for the non-equilibrium problems. We believe the answer is a definite yes. On the one hand, the overlaps are necessary ingredients for certain methods computing the finite time dynamics \cite{finite-qa,vincenzo-QA,vincenzo-renyi2}. On the other hand, in systems with higher rank symmetries the overlaps ``lead the way'' once again: there are cases where the QA method is worked out \cite{nested-quench-1} using exact overlap formulas \cite{ADSMPS2}, but the GGE is not yet established. Also, a different viewpoint was laid out in \cite{sajat-integrable-quenches}, which focused on the question of which initial states can be considered ``integrable'', i.e. when do common features of integrability show up in the overlaps, the time evolution, and the stationary states. It was argued in \cite{sajat-integrable-quenches} that very generally it is the subclass of integrable initial states where exact (factorized) overlap formulas can be expected. Having a precise definition of integrability and different methods to test it, it is now an interesting problem to find exact overlap formulas for integrable initial states, beyond the known cases, both in the spin-1/2 XXZ chain and other models. Closely related questions about overlaps have been investigated in Integrable QFT's in the papers \cite{gabor-boundary-state1,Gabor-initial-states-QFT-quench,gabor-quench-overlaps}. A second motivation to study exact overlap formulas comes from the AdS/CFT conjecture, where the overlaps describe one-point functions of composite operators \cite{zarembo-neel-cite1,zarembo-neel-cite3}. This line of research led to new overlap formulas, which include overlaps with integrable MPS's in the spin-1/2 XXX chain \cite{zarembo-neel-cite1,zarembo-neel-cite2,zarembo-neel-cite3} and the $SU(3)$-symmetric model too \cite{ADSMPS2}. In the XXX chain the MPS's in question were shown to be zero-momentum components of two-site states or finitely entangled states obtained by the action of transfer matrices on two-site states, whereas the interpretation of the MPS of \cite{ADSMPS2} within integrability is not yet known. Finally, the third motivation to study overlaps comes from finite temperature problems: It was shown in \cite{sajat-karol} that the boundary free energy of the XXZ spin chain can be calculated in the Quantum Transfer Matrix (QTM) framework by the Trotter limit of an exact overlap (see also \cite{Goehmann-Bortz-Frahm-boundaries}). The situation is analogous to integrable boundary QFT, where the object in question is the exact overlap between the finite volume ground state and a boundary state \cite{Dorey:1999cj,Dorey:2009vg}, although in QFT this quantity is computed more easily from Thermodynamic Bethe Ansatz \cite{sajat-g,woynarovich-uj}. Regarding the XXZ spin chain, existing overlap formulas \cite{sajat-neel,Caux-Neel-overlap1,Caux-Neel-overlap2,Brockmann-BEC,zarembo-neel-cite2} concern two-site states that are described by the diagonal $K$-matrices (see main text for definitions). The most studied examples are the N\'eel and dimer states. On the other hand, there are exact results available for quenches from other two-site states \cite{sajat-Loschm}, although these results apply to the thermodynamic limit directly. It was shown in \cite{sajat-integrable-quenches} that in the spin-1/2 case all two-site states are integrable, therefore it is natural to expect that there are exact finite volume overlap formulas for arbitrary two-site states. The construction of such formulas is the problem that we investigate in the present work. In the next section we collect a number of existing results for overlaps and quenches, and we point out an important link between the relevant finite volume and infinite volume calculations. This connection is then used in Section \ref{sec:ov} to conjecture an exact overlap formula for generic $K$-matrices. At present we do not have a proof of our result; numerical checks confirm its validity, and it is shown to have the correct thermodynamic limit. In Subsection \ref{sec:ovsumrule} we also point out an interesting relation between the Gaudin-like determinants appearing in the overlaps and the calculation of the overlap sum rule within the Quench Action framework. \section{Overlap formulas -- Ingredients} \label{sec:ingred} \subsection{The model and its Bethe Ansatz solution} We consider the anti-ferromagnetic spin-$1/2$ XXZ Heisenberg model on a chain of length $L$ with periodic boundary conditions. The Hamiltonian is \begin{equation} \label{XXZ-H} H=\sum_{j=1}^{L} (\sigma^x_j\sigma^x_{j+1}+\sigma^y_j\sigma^y_{j+1}+\Delta (\sigma^z_j\sigma^z_{j+1}-1)). \end{equation} Here $\Delta$ is the anisotropy parameter. In this work we will focus on the massive regime ($\Delta>1$), but we expect that our results will be applicable to most states even in the $\Delta<1$ case\footnote{ This follows from the fact that the finite volume overlap formulas arise from a set of algebraic manipulations on the Bethe Ansatz wave function, which has the same functional form for every $\Delta$. The differences between the regimes only show up at the solutions of the Bethe equations (including various types of singular rapidities \cite{baxter-completeness}), and in the thermodynamic limit. However, these issues of the massless regime are not considered here. }. This Hamiltonian can be diagonalized by the Bethe Ansatz \cite{XXX,XXZ1,XXZ2,XXZ3}. The eigenstates are constructed as interacting spin waves over a ferromagnetic reference state and they are characterized by a set of rapidities $\{\lambda\}_N$; for the states we will use the notation $\ket{\{\lambda\}_N}$. In the coordinate Bethe Ansatz representation the un-normalized wave function can be written as \begin{equation} \label{BA2} \Psi_{L}(\lambda_1,\dots,\lambda_N|s_1,\dots,s_N)=\sum_{P\in\sigma_N} \prod_j F(\lambda_{P_j},s_j) \prod_{j>k} \frac{\sin(\lambda_{P_j}-\lambda_{P_k}-i\eta)}{\sin(\lambda_{P_j}-\lambda_{P_k})} \end{equation} with \begin{equation} \label{Fs} F(\lambda,s)=\sinh(\eta) \sin^{s-1}(\lambda+i\eta/2) \sin^{L-s}(\lambda-i\eta/2). \end{equation} Here $s_j$ denote the positions of the down spins over a ferromagnetic reference state with all spins up, and we assume $s_j<s_k$ for $j<k$. The parameter $\eta$ is given by the relation $\Delta=\cosh\eta$ and the rapidities $\{\lambda_j\}$ characterize the spin waves. The Bethe wave function is invariant with respect to a shift $\lambda_j\to\lambda_j+\pi$ for every $j$ (up to an irrelevant phase for odd $L$), therefore we assume $\Re(\lambda_j)\in[-\pi/2,\pi/2]$. The state \eqref{BA2} is an eigenstate if the Bethe equations hold: \begin{equation} \label{BAe} \left( \frac{\sin(\lambda_j-i\eta/2)}{\sin(\lambda_j+i\eta/2)}\right)^{L} \prod_{k\ne j} \frac{\sin(\lambda_j-\lambda_k+i\eta)}{\sin(\lambda_j-\lambda_k-i\eta)}=1. \end{equation} In this case the energy is given by \begin{equation} \label{BAee} E=\sum_j e(\lambda_j),\quad\text{where}\qquad e(u)=\frac{4\sinh^2\eta}{\cos(2u)-\cosh\eta}. \end{equation} In this parametrization in the regime $\Delta>1$ the one-string solutions to the Bethe equations lie on the real axis. The Bethe equation also allows for the so-called $n$-string solutions that are centered on the real axis: \begin{equation} \lambda_k= u+i\eta(n+1-2k)/2+\delta_k\qquad k=1,\dots,n, \end{equation} where $u$ is the string center and $\delta_k$ are the string deviations that become exponentially small in the thermodynamic limit. In the thermodynamic limit the solution to the Bethe equations can be characterized by root and hole densities $\rho_n(\lambda)$, $\rho_n^{(h)}(\lambda)$ for the $n$-strings. It follows from the Bethe equations that these functions satisfy \cite{Takahashi-book} \begin{equation} \label{rhoelso} \rho_{n}+\rho^{(h)}_n= \delta_{k,1}s+ s\star \left( \rho^{(h)}_{n-1}+ \rho^{(h)}_{n+1} \right), \end{equation} where \begin{equation} \label{sdef} s(u)=1+2\sum_{n=1}^\infty \frac{\cos(2n u)}{\cosh(\eta n)}, \end{equation} and the convolution of two functions is defined as \begin{equation} (f\star g)(u)= \int_{-\pi/2}^{\pi/2} \frac{d\omega}{2\pi} f(u-\omega) g(\omega). \end{equation} \subsection{Integrable initial states} Given an initial state $\ket{\Psi_0}$ we are interested in the normalized squared overlaps \begin{equation} \frac{|\skalarszorzat{\{\lambda\}_N}{\Psi_0}|^2} {{\skalarszorzat{\{\lambda\}_N}{\{\lambda\}_N}}}. \end{equation} Before starting any calculations one has to decide which initial states to consider. The choice of $\ket{\Psi_0}$ can be motivated by their experimental relevance, their relation to other problems in mathematical physics \cite{zarembo-neel-cite1,zarembo-neel-cite2,zarembo-neel-cite3}, or their inherent integrability properties. In the present work we follow the latter approach and consider a special class of states that were called ``integrable initial states'' in the recent work \cite{sajat-integrable-quenches}. They include the N\'eel and dimer states, and other finitely entangled Matrix Product States (MPS's). These states are relevant both for an experimental realization and for the AdS/CFT conjecture. Nevertheless we concentrate on their integrability properties. Integrable initial states are defined as states that are annihilated by all odd (with respect to space reflection) conserved charges of the model \cite{sajat-integrable-quenches}: \begin{equation} \label{integrablepsi} Q_{2j+1} \ket{\Psi_0}=0. \end{equation} Here the charges are defined in the usual way from the transfer matrix of the model \cite{sajat-integrable-quenches}, or alternatively, they can be generated in a formal way using the so-called boost operator \cite{GM-higher-conserved-XXZ}. The eigenvalues of the charges on Bethe states are additive: \begin{equation} Q_{2j+1}\ket{\{\lambda_N\}}=\sum_{k=1}^N q_{2j+1}(\lambda_k), \end{equation} where $q_{2j+1}(\lambda)$ are known functions satisfying $q_{2j+1}(\lambda)=-q_{2j+1}(-\lambda)$. It follows from \eqref{integrablepsi} that the only non-vanishing overlaps are those where the Bethe rapidities display the pair structure: \begin{equation} \label{pair1} \{\lambda\}_N=\{\pm\lambda^+\}\cup \{\lambda^{\mathcal{S}}\}, \end{equation} where $\lambda^{\mathcal{S}}$ are special rapidities for which $q_{2j+1}(\lambda^{\mathcal{S}})=0$. For $\Delta>1$ we have $\{\lambda^{\mathcal{S}}\}\subset\{0,\pi/2\}$. It was shown in \cite{sajat-integrable-quenches} that a subclass of integrable states are those two-site states that are generated by local $K$-matrices of the boundary Algebraic Bethe Ansatz. The construction of \cite{sajat-integrable-quenches} can be carried out for an arbitrary integrable spin chain with local dimension $d\ge 2$, if the $R$-matrix admits an appropriate crossing symmetry transformation. Integrable states are given as \begin{equation} \ket{\Psi_0}=\otimes_{j=1}^{L/2} \ket{\psi}, \end{equation} where \begin{equation} \label{localtwosite} \ket{\psi}=\sum_{j_1,j_2=1}^d (K(-\eta/2)V)_{j_1,j_2}\ket{j_1}\otimes\ket{j_2}, \end{equation} where $K(u)$ is a solution to the reflection equations \cite{Cherednik:1985vs,sklyanin-boundary} \begin{equation} R_{1,2}(u-w)K_{1}(u)R_{1,2}(u+w)K_{2}(w)= K_{2}(w)R_{1,2}(u+w)K_{1}(u)R_{1,2}(u-w)\,, \label{eq:reflection_equation} \end{equation} and the matrix $V$ is a similarity transformation describing crossing of the fundamental $R$-matrix: \begin{equation} R^{t_1}_{1,2}(u)=\gamma(u) V^{-1}_1R_{1,2}(-u-\eta)V_1\,, \label{eq:crossin_relation} \end{equation} with $\gamma(u)$ being a known function, which depends on the overall normalization of the $R$-matrix. In the spin-1/2 chain we have $V=\sigma^y$ and the solutions to \eqref{eq:reflection_equation} form a 3-parameter family of matrices \cite{general-K-XXZ}. We use the parametrization \begin{equation} \label{Kparam} \begin{split} K_{11}(u,\alpha,\beta,\theta)=& 2(\sinh(\alpha)\cosh(\beta)\cosh(u)+ \cosh(\alpha)\sinh(\beta)\sinh(u))\\ K_{12}(u,\alpha,\beta,\theta)=& e^\theta \sinh(2u) \\ K_{21}(u,\alpha,\beta,\theta)=& e^{-\theta}\sinh(2u) \\ K_{22}(u,\alpha,\beta,\theta)=& 2(\sinh(\alpha)\cosh(\beta)\cosh(u)- \cosh(\alpha)\sinh(\beta)\sinh(u)). \end{split} \end{equation} It follows that every two-site product state is integrable, because for each $\ket{\psi}$ there are appropriate $(\alpha,\beta,\theta)$ parameters reproducing it (apart from the irrelevant overall phase and normalization)\footnote{It was shown in \cite{sajat-integrable-quenches} that for other models (for example the spin-1 XXZ model) the local $K$-matrices produce only a subclass of two-site states, therefore generally not all two-site product states are integrable.}. For the sake of completeness we give here the explicit formula for the two-site block: \begin{equation} \label{psyparam} \begin{split} \psi_{11}(\alpha,\beta,\theta)=& -e^\theta \sinh(\eta) \\ \psi_{12}(\alpha,\beta,\theta)=& 2(-\sinh(\alpha)\cosh(\beta)\cosh(\eta/2)+ \cosh(\alpha)\sinh(\beta)\sinh(\eta/2))\\ \psi_{21}(\alpha,\beta,\theta)=& 2(\sinh(\alpha)\cosh(\beta)\cosh(\eta/2)+ \cosh(\alpha)\sinh(\beta)\sinh(\eta/2))\\ \psi_{22}(\alpha,\beta,\theta)=&e^{-\theta}\sinh(\eta), \end{split} \end{equation} where we neglected an irrelevant factor of $(i)$. In \cite{sajat-integrable-quenches} it was also shown that a wider class of integrable initial states can be generated by acting with the fundamental or fused transfer matrices on the two-site states. These states can be represented as Matrix Product States (MPS) with finite bond dimension, therefore they have finite entanglement and can approximate ground states of gapped Hamiltonians. However, these states will not be considered here, we will only focus on the local two-site states. \subsection{Previous exact results for the finite volume overlaps} \label{sec:prev} Previous results in the literature concern the N\'eel and Dimer states, where the two-site blocks are given by \begin{equation} \ket{\psi_{\text{N\'eel}}}=\ket{\uparrow\downarrow}\qquad \ket{\psi_{\text{Dimer}}}=\frac{1}{\sqrt{2}} \left(\ket{\uparrow\downarrow}-\ket{\downarrow\uparrow}\right). \end{equation} They belong to the class of generalized dimer states \begin{equation} \label{gendim} \ket{\psi_\gamma}\sim \left(\ket{\uparrow\downarrow}-\gamma\ket{\downarrow\uparrow}\right),\qquad \gamma\in \complex. \end{equation} These states are generated by the diagonal $K$-matrices, which can be obtained from \eqref{Kparam} through the $\beta\to\infty$ limit. Alternatively, they can be described by the parametrization \begin{equation} \label{Kdiag} K(u,\xi)= \begin{pmatrix} \sinh(\xi+u) & 0 \\ 0 & \sinh(\xi-u) \end{pmatrix}. \end{equation} It follows from \eqref{localtwosite} that $\gamma=\frac{\sinh(\xi+\eta/2)}{\sinh(\xi-\eta/2)}$; the N\'eel and Dimer states are obtained by setting $\xi=-\eta/2$ and $\xi=i\pi/2$, respectively. A special property of these states is that every two-site block has exactly one down spin, and so for non-vanishing overlaps the number of particles is always $N=L/2$. Moreover, the structure of the overlaps is essentially the same for arbitrary $\xi$: a simple argument \cite{sajat-neel,sajat-QA-GGE-hosszu-cikk} based on the coordinate Bethe Ansatz wave function shows that for generic $\gamma$ \begin{equation} \label{Kidentity} \skalarszorzat{\Psi_\gamma}{\{\lambda\}_N}= \skalarszorzat{\Psi_{\text{N\'eel}}}{\{\lambda\}_N} \times \prod_{j=1}^N \frac{1+\gamma\frac{\sin(\lambda_j-i\eta/2)}{\sin(\lambda_j+i\eta/2)}}{\sqrt{1+|\gamma|}^2}. \end{equation} Therefore, it is enough to determine the overlaps with the N\'eel state. The first results for this problem appeared in \cite{sajat-neel}, where the following off-shell formula was derived for the un-normalized overlap: \begin{equation} \label{N1} \skalarszorzat{\Psi_{\text{N\'eel}}}{\lambda_1,\dots,\lambda_N}= \frac{\prod_j \sinh^{L}(\lambda_j-\eta/2)\sinh^{L+1}(\lambda_j+\eta/2)} {\prod_j \sinh(2\lambda_j) \prod_{j<k} \sinh(\lambda_j-\lambda_k) \sinh(\lambda_j+\lambda_k)} \times \det L, \end{equation} where $L$ is a $N\times N$ matrix with elements given by \begin{equation} \label{benares4} \begin{split} L_{jk}=q_{2j}(\lambda_k),\quad\text{where}\qquad q_a(u)=\coth^a(u-\eta/2)-\coth^a(u+\eta/2). \end{split} \end{equation} It is important that \eqref{N1} does not make use of the Bethe equations, and it merely represents an algebraic reorganization of the expression that can be obtained directly from the wave function \eqref{BA2}. The idea behind the derivation of \eqref{N1} is that the overlap can be related to a specific partition function of the six-vertex model, where the initial state $\ket{\Psi_0}$ plays the role of a reflecting boundary \cite{sajat-neel}. For diagonal $K$-matrices this partition function was expressed by Tsushiya as a determinant \cite{tsushiya}, and \eqref{N1} is a specific homogeneous limit of the Tsushiya determinant. Despite its compact and explicit form, \eqref{N1} is not convenient for practical purposes. First of all it is not clear how to perform the thermodynamic limit of the determinant, and second, the expression \eqref{N1} becomes singular for the physically relevant cases \eqref{pair1}. A much more useful representation for on-shell states was obtained in \cite{Caux-Neel-overlap1,Caux-Neel-overlap2} based on an intermediate result for the Tsushiya determinant given in \cite{sajat-karol}. It was first shown in the work \cite{Caux-Neel-overlap1} that the overlap is non-vanishing only for states with the pair structure, and for these cases it was found that \begin{equation} \frac{|\langle \Psi_{\text{N\'eel}}|\{\pm\lambda^+\}_{N/2}\rangle|^2} {\langle\{\pm\lambda^+\}_{N/2}|\{\pm\lambda^+\}_{N/2}\rangle} =\prod_{j=1}^{N/2} v_{\text{N\'eel}}(\lambda_j) \times \frac{\det_{N/2}G_{jk}^{+}}{\det_{N/2}G_{jk}^{-}}\,, \label{N2} \end{equation} where \begin{equation} \label{vNeel} v_{\text{N\'eel}}(\lambda)=\frac{{\tan(\lambda_{j}+i\eta/2)\tan(\lambda_{j}-i\eta/2)}} {4\sin^2(2\lambda_{j})} \end{equation} and\footnote{The matrix elements of $G^{\pm}$ include a sign difference as compared to the formulas given in \cite{Caux-Neel-overlap1,Caux-Neel-overlap2}, but they agree with those of \cite{korepin-norms,Korepin-Izergin-XXZ}. This sign does not influence the resulting overlaps. We introduced it in order to have positive elements in the diagonal of the matrix, and to avoid confusion with earlier results when taking the thermodynamic limit. } \begin{equation} \label{gaudins} G_{jk}^{\pm} = \delta_{jk}\left(-L\varphi_{\eta/2}(\lambda^+_{j}) +\sum_{l=1}^{L/4}\varphi_{\eta}^{+}(\lambda^+_{j},\lambda^+_{l})\right) -\varphi^{\pm}_\eta(\lambda^+_{j},\lambda^+_{k}) \end{equation} with \begin{equation} \label{varphix} \begin{split} \varphi^{\pm}_\eta(\lambda,\mu) & = \varphi_\eta(\lambda-\mu)\pm \varphi_\eta(\lambda+\mu)\\ \varphi_x(\lambda) & = \frac{\sinh(2x)}{\sinh(\lambda+ix)\sinh(\lambda-ix)}\,. \end{split} \end{equation} In \eqref{N2} it was assumed that $N$ is even and the Bethe state does not include the special rapidities $\{\lambda^{\mathcal{S}}\}\subset\{0,\pi/2\}$; for those cases different regularized formulas are needed \cite{Caux-Neel-overlap2,finite-qa}. Based on the identity \eqref{Kidentity} it is possible to derive the overlaps with the other states generated by diagonal $K$-matrices, and they all take the form of \eqref{N2} with a different single particle overlap function. For example for the Dimer state we get \cite{sajat-oTBA,sajat-QA-GGE-hosszu-cikk} \begin{equation} v_{\text{Dimer}}(\lambda)=\frac{\sinh^4(\eta/2)\cot^2(\lambda)} {\sin(2\lambda+i\eta)\sin(2\lambda-i\eta)}. \end{equation} Further overlap formulas were computed in the works \cite{zarembo-neel-cite1,zarembo-neel-cite2,zarembo-neel-cite3}. These papers considered certain Matrix Product States (MPS's) in the $SU(N)$ symmetric models, that are relevant for the AdS/CFT conjecture. Regarding the case of the spin-1/2 XXX chain real space calculations were used to derive the overlaps with Bethe states with a low number of particles, and formulas of the form \eqref{N2} were conjectured for higher particle numbers. It was shown in \cite{sajat-integrable-quenches} that the MPS's in question are in fact integrable, and they can be identified either as zero-momentum components of specific two-site states, or they result as action of transfer matrices on such states. Exact overlap formulas were derived in \cite{zarembo-neel-cite2}, which considered overlaps with the so-called partial N\'eel states. They are zero-momentum components of two-site states where $\psi_{11}=0$. According to \eqref{psyparam} they correspond to a special scaling limit, where the $K$-matrix becomes lower diagonal. For these cases an exact off-shell formula was derived, that is closely related to \eqref{N1}, with a modified matrix. However, in the on-shell case an exact result of the form \eqref{N2} was obtained once again. The work \cite{zarembo-neel-cite2} used a slightly modified version of the argument of Tsushiya \cite{tsushiya} to obtain the off-shell result, but it was demonstrated in \cite{calabrese-recursive-overlaps} that it is not evident how to apply this idea to the generic case with $\psi_{11}\ne 0$. The results of \cite{zarembo-neel-cite1,zarembo-neel-cite2,zarembo-neel-cite3} seem to indicate that the on-shell overlaps are always of the form \eqref{N2}, even for off-diagonal $K$-matrices. However, this is somewhat misleading. These works only consider the $SU(2)$ invariant chain, where every $K$ matrix can be rotated to diagonal one. It is known that the Bethe vectors are highest weight states and that the spin lowering operators can be represented with infinite rapidity particles. Therefore, the $SU(2)$ rotations can be evaluated on the Bethe vectors, and overlaps with off-diagonal $K$-matrices can be expressed with those of the known diagonal cases. This procedure is analogous to that used in \cite{Brockmann-BEC} to study $q$-raised N\'eel states in the XXZ model. Nevertheless we believe that the method of \cite{zarembo-neel-cite2} could be applied to lower diagonal $K$-matrices even in the XXZ case, which would then yield genuine new rigorous results. Further results appeared in \cite{ADSMPS2}, which considered MPS's for higher rank models. In the $SU(3)$ case formulas analogous to \eqref{N2} were obtained from coordinate Bethe Ansatz, with the determinants mirroring the nested Bethe Ansatz solution of the model. The resulting overlap formulas were used in \cite{nested-quench-1} to study the corresponding quench situation, and it was later shown in \cite{sajat-integrable-quenches} that the initial state is in fact integrable. On the other hand, the interpretation of these results within Boundary Algebraic Bethe Ansatz is not yet known, and this is an intriguing problem to be investigated in future work. However, in the present paper we content ourselves with the open questions of the spin-1/2 XXZ chain. \subsection{The Quench Action method} \label{sec:QA} The Quench Action (QA) method \cite{quench-action} was devised to determine which Bethe states are relevant for the long-time behavior of physical observables in quantum quenches. The essence is to investigate the overlap sum rule \begin{equation} \label{ovsumrule} 1=\skalarszorzat{\Psi_0}{\Psi_0}= \sum_{\{\lambda\}} \frac{|\langle \Psi_0|\{\lambda\}\rangle|^2} {\langle\{\lambda\}|\{\lambda\}\rangle}, \end{equation} where the summation runs over all eigenstates of a finite volume system, and to select the states that dominate the sum in the thermodynamic limit. It can be argued that the same states determine the long-time averages of local observables \cite{quench-action}. The selection of the relevant states is achieved by transforming the finite sum into a functional integral over root densities, and minimizing the resulting Quench Action, which is defined as the combination of the overlap and entropy of a state with a given root distribution. The QA is completely analogous to the free energy functional of the finite temperature situation, therefore the resulting equations always take the form of (generalized) Thermodynamic Bethe Ansatz (TBA) equations \cite{Takahashi-book}. Before exchanging the summation for a functional integral it is important to remember that for the integrable quenches considered here the non-vanishing terms in the sum \eqref{ovsumrule} are the parity invariant Bethe states. Therefore, these states can be completely determined by listing the positive rapidities (defined either as $\Re(\lambda^+)>0$ for all roots, or $\lambda_n^+>0$ for the string centers), and this affects the entropy associated to a given root configuration. For the $\ordo(L)$ term of the entropy in the QA we get a factor of $1/2$ as compared to the formulas of the usual TBA. In the next subsection we also investigate the $\ordo(1)$ pieces, but first we collect the known formulas for the leading part. In \cite{quench-action} it was shown that the sum \eqref{ovsumrule} leads to the functional integral \begin{equation} \int D\rho_n(\lambda^+) e^{-S_{QA}(\{\rho_n(\lambda)\})} \end{equation} with \begin{equation} \label{QAdef} S_{QA}(\{\rho_n(\lambda)\})= -2\Re\ln\langle\Psi_0| \{\rho_n(\lambda)\} \rangle +\frac{1}{2}S_{YY}(\{\rho_n(\lambda)\}) \end{equation} with $S_{YY}$ being the Yang-Yang entropy \begin{equation} S_{YY}({\rho_n(\lambda)})\equiv L\sum_{n=1}^\infty\int_{-\infty}^{+\infty}d \lambda\Big[\rho_n(\lambda)\ln\Big(1+\frac{\rho_n^h(\lambda)}{\rho_n(\lambda)} \Big)+\rho_n^h(\lambda)\ln\Big(1+\frac{\rho_n(\lambda)}{\rho^h_n(\lambda)}\Big) \Big]. \end{equation} The factor of $1/2$ in front of $S_{YY}$ results from the aforementioned restriction on parity invariant states. In writing down \eqref{QAdef} we assumed that the overlap is a known smooth function of the root densities. In particular, the TBA formalism can be applied if it can be written as \begin{equation} \label{ext} \lim_{L\to\infty} \frac{1}{L} 2\Re\ln\langle\Psi_0| \{\rho_n(\lambda)\}\rangle =\sum_{n=1}^\infty \int d\lambda \rho_n(\lambda) g_n(\lambda), \end{equation} with $g_n(\lambda)$ being the $n$-string overlap functions. If \eqref{ext} holds for most Bethe states in the thermodynamic limit (TDL), then the minimization of the Quench Action leads to the following set of generalized TBA equations \cite{JS-oTBA,enej-gge}: \begin{equation} \label{oTBA} \log Y_j=d_j +s\star \left[ \log(1+Y_{j-1})+\log(1+Y_{j+1}) \right], \end{equation} where $Y_j(\lambda)=\rho^{(h)}_j(\lambda)/\rho_j(\lambda)$ and \begin{equation} \label{dj} d_j =-g_j+s\star(g_{j-1}+g_{j+1}), \text{ with } g_0=0. \end{equation} Supplied with asymptotic conditions on the growth of $Y_j$ as $j\to\infty$ these equations completely determine the root densities. We note that for a generic initial state there would be no guarantee that the overlaps lead to the form \eqref{ext} in the TDL, and even if they do, the $g_n(\lambda)$ functions could be algebraically independent from each other. In fact, it is known that an analogous situation happens for non-integrable states in the framework of GGE \cite{enej-gge}. On the other hand, a relatively simple situation arises if the overlap factorizes in finite volume. We call an overlap factorizable if for on-shell states it can be written as \begin{equation} \label{factorized} \frac{|\langle \Psi_{0}|\{\pm\lambda^+\}_{N/2}\rangle|^2} {\langle\{\pm\lambda^+\}_{N/2}|\{\pm\lambda^+\}_{N/2}\rangle} =A^{L} \prod_{j=1}^{N/2} v(\lambda_j^+) \times C(L,N,\{\lambda\}), \end{equation} where $C(L,N,\{\lambda\})$ is a function that remains $\ordo(L^0)$ in the thermodynamic limit. The known exact results presented in subsection \ref{sec:prev} were all factorizable. The separate pre-factor $A^L$ was not present in previous results, but it can be argued that such a factor necessarily appears for initial states having components with non-zero magnetization, in which cases the particle number is independent of $L$. In \eqref{factorized} we assumed the pair structure; we will argue below that factorizability is a property that indeed only holds for integrable initial states. It is important that the formula \eqref{factorized} represents factorization on the level of the individual rapidities. For the string contributions in \eqref{ext} we obtain \begin{equation} \label{gj} g_n(\lambda)=-\sum_{k=1}^n \log\big(v(\lambda+i\eta(n+1-2k)/2)\big), \end{equation} and this specifies the sources in \eqref{oTBA} through \eqref{dj}. As a consequence, it can be shown that the solutions of the QA-TBA always satisfy the $Y$-system equations \begin{equation} \label{Y} Y_j(\lambda+i\eta/2) Y_j(\lambda-i\eta/2)=(1+ Y_{j-1}(\lambda))(1+ Y_{j+1}(\lambda)), \end{equation} The proof is straightforward by combining \eqref{oTBA}, \eqref{dj} and \eqref{gj} and making use of the relation \begin{equation} \label{identity} \lim_{\delta\to\eta/2}\left[ \int_{-\pi/2}^{\pi/2}\frac{dx}{2\pi} (s(y+i\delta-x)+s(y-i\delta-x)) f(x)\right]= f(y), \end{equation} which follows from the integral representation \eqref{sdef} and is valid for any smooth function $f(x)$. The Y-system is regarded as an important sign of integrability of the initial state, and it was used as a tool for finding exact solution to the TBA \cite{JS-oTBA,jacopo-massless-1}. In the Quench Action framework the Y-system ultimately follows from factorizability of the overlaps, which is expected to be a general property of integrable initial states \cite{sajat-integrable-quenches}. Conversely, in the generic case where the $Y$-system does not hold \cite{JS-CGGE,enej-gge}, the overlaps with the initial state can not have the factorized form. \subsection{The overlap sum rule} \label{sec:ovsumrule} It is worthwhile to investigate the overlap sum rule \eqref{ovsumrule} in more detail, which sheds some light on the role of the Gaudin-like determinants in the overlaps. To this order we give a slightly different definition of the Quench Action. In analogy with the partition functions in thermodynamics we define \begin{equation} \label{QAdef2} S_{QA}=-\log \sum_{\{\pm\lambda^+\}} \frac{|\langle \Psi_0|\{\pm\lambda^+\}_{N/2}\rangle|^2} {\langle\{\pm\lambda^+\}_{N/2}|\{\pm\lambda^+\}_{N/2}\rangle}, \end{equation} with a large volume behavior given by \begin{equation} S_{QA}=s_{QA}L+\Delta S+\ordo(L^{-1}), \end{equation} where $s_{QA}$ is the QA density, and $\Delta S$ is an $\ordo(1)$ piece that has not yet been investigated in the literature. From the definition we have the trivial identity $S_{QA}=0$, and our goal is to derive this within the Quench Action method, both for the leading and the sub-leading part. The extensive part is given by \eqref{QAdef}-\eqref{ext} evaluated at the saddle point solution. It was derived in \cite{sajat-oTBA,sajat-QA-GGE-hosszu-cikk} that \begin{equation} \label{ovsumext} s_{QA}= \int_{-\pi/2}^{\pi/2} \frac{d\lambda}{2\pi} s(\lambda) \left[ \log(1+Y_1(\lambda)) +\log(v(\lambda))\right], \end{equation} where $Y_j(\lambda)$ is the solution of the QA-TBA \eqref{oTBA} and $v(\lambda)$ is the single-particle overlap function. Here it was assumed that the initial state has zero total magnetization\footnote{The generic case was not discussed in \cite{sajat-oTBA,sajat-QA-GGE-hosszu-cikk}, because existing overlap formulas were only available for initial states with zero total magnetization.}; the formula is analogous to the expression of the free energy density within the usual TBA \cite{Takahashi-book}. In \cite{sajat-oTBA,sajat-QA-GGE-hosszu-cikk} the relation $s_{QA}=0$ was used as a consistency condition within the QA; it also served as a test for the accuracy of the numerical solution of the TBA equations. In order to determine the finite term $\Delta S$ we first investigate the thermodynamic limit of the overlap formula \eqref{N2}. Previously we have treated the extensive part, which leads to \eqref{ext} with the $n$-string overlaps given by \eqref{gj}. On the other hand, the ratio of the determinants in \eqref{N2} gives a non-zero $\ordo(1)$ contribution. In order to evaluate this term the first step is to express the ratio of determinants using only the string centers. This task is analogous to finding the norm of Bethe states with strings \cite{kirillov-korepin-norms-strings}, and for the determinants in question it was performed in \cite{finite-qa}. Denoting by $\lambda_{n,a}$ the $n$-string centers with index $a$ we get \begin{equation} \frac{\det G^+}{\det G^-}\quad \to\quad \frac{\det \tilde G^+}{\det \tilde G^-} \end{equation} with \begin{equation} \tilde G_{(n,a),(m,b)}^{\pm} = \delta_{(n,a),(m,b)} \left(-L\varphi_{n\eta/2}(\lambda_{j}) +\sum_{(o,c)}\Theta_{n,o}^{+}(\lambda_{n,a},\lambda_{o,c})\right)- \Theta_{n,m}^{\pm}(\lambda_{n,a},\lambda_{m,b}), \end{equation} where \begin{equation} \Theta_{n,m}^{\pm}(\lambda,\mu) = \Theta_{n,m}(\lambda-\mu)\pm \Theta_{n,m}(\lambda+\mu) \end{equation} \begin{equation} \Theta_{n,m}(\lambda)= \begin{cases} \varphi_{|n-m|\eta/2}(\lambda) +\sum_{j=1}^{(n+m-|n-m|-1)/2} \varphi_{(|n-m|+2j)\eta/2}(\lambda)+ \varphi_{|n+m|\eta/2}(\lambda) & \text{ if } n\ne m\\ \sum_{j=1}^{n-1} 2\varphi_{j\eta}(\lambda)+\varphi_{n\eta}(\lambda) & \text{ if } n=m\\ \end{cases}, \end{equation} and $\varphi_x(\lambda)$ is given in \eqref{varphix}. In the thermodynamic limit the ratio of the two determinants leads to a ratio of two Fredholm determinants. The calculation proceeds through standard steps \cite{korepin-LL1,Korepin-Izergin-XXZ,norms-destri} and here we only give the main result. In the TDL we get \begin{equation} \lim_{L\to\infty} \frac{\det \tilde G^+}{\det \tilde G^-}= \frac{\det \left(1-\hat Q^+\right)}{\det \left(1-\hat Q^-\right)}, \end{equation} where $\hat Q^\pm$ are integral operators that act on functions $f_n(\lambda)$ with a string index $n$ defined for $\lambda\in \valos^+$. The action of the integral operators reads \begin{equation} \label{Q+-} \big(\hat Q^\pm (f)\big)_n(x)=\sum_{m=1}^\infty \int_{0}^\infty\frac{dy}{2\pi} \big(\Theta_{n,m}^\pm(x,y)\big) \frac{1}{1+Y_m(y)} f_m(y). \end{equation} The second step to calculate the $\ordo(1)$ terms in the sum rule is to carefully consider the summation over the eigenstates and the transformation of the sum into a functional integral. It was explained in the papers \cite{sajat-g,woynarovich-uj} (inspired by the earlier work \cite{woynarovich}) that in such situations there are two $\ordo(1)$ contributions: one coming from the density of states in rapidity space (corresponding to the change of variables from the integer momentum quantum numbers to the rapidities) and one from the quadratic fluctuations around the saddle point solution. The two terms depend on the nature of the Bethe equations. In the usual TBA setting with periodic boundary conditions the two contributions just cancel each other, whereas in a system with boundaries they combine to a finite and well defined term. In the overlap sum rule the only allowed states are those with the pair structure, and this corresponds formally to the boundary case, because both the density of states and the variations around the saddle point have to be calculated by varying only half of the rapidities. Therefore, the boundary results of \cite{sajat-g,woynarovich-uj} apply, which read \begin{equation} \sum_{\{\lambda^+,-\lambda^+\}} \quad \to\quad \frac{\det \left(1-\hat Q^-\right)}{\det \left(1-\hat Q^+\right)} \int D\rho_n(\lambda^+), \end{equation} where $\hat Q^\pm$ are the same Fredholm that appeared as the limits of the Gaudin-like determinants. We note that the papers \cite{sajat-g,woynarovich-uj} did not discuss theories with multiple particle species (such as the strings in the XXZ chain), however the generalization of the results given there is straightforward. Combining the previous results we find that \begin{equation} e^{-\Delta S}= \frac{\det \left(1-\hat Q^-\right)}{\det \left(1-\hat Q^+\right)}\times \frac{\det \left(1-\hat Q^+\right)}{\det \left(1-\hat Q^-\right)}=1, \end{equation} as required by definition. Thus the ratio of the two Gaudin-like determinants ensures that the overlaps have the correct normalization in the thermodynamic limit. We believe that this has not been noticed in earlier works. The present result applies to the states \eqref{gendim} generated by the diagonal $K$-matrices, where the overlap of the form \eqref{N2} is rigorously proven. It is remarkable, that the $\ordo(1)$ terms do not depend on the free parameter of the initial state: for the overlap this follows from relation \eqref{Kidentity}, whereas for the normalization of the functional integral it is a result of the pair structure. This leads to the conjecture, that the same Gaudin-like determinants should appear also for the generic $K$-matrices; this conjecture and its tests are presented in Section \ref{sec:ov}. In the Conclusions we discuss further implications of these observations. \subsection{Calculation of the Loschmidt echo} An important property of integrable two-site states is that the extensive part of the Loschmidt amplitude (also called the dynamical free energy) can be computed analytically. The Loschmidt amplitude is defined as the overlap of a time evolved state with the original initial state: \begin{equation} \label{Loschm} L(t)=\bra{\Psi_0}e^{-iHt}\ket{\Psi_0}, \end{equation} and the dynamical free energy is defined as \begin{equation} g(w)=-\lim_{L\to\infty } \frac{1}{L} \log L(-iw). \end{equation} It was shown in \cite{sajat-BQTM,sajat-Loschm} that these quantities can be evaluated by a lattice path integral, where the initial and final states $\bra{\Psi_0}$ and $\ket{\Psi_0}$ play the role of boundary conditions. The corresponding partition function can be evaluated in the rotated channel by the so-called Boundary Quantum Transfer Matrix (QTM), if the two site block $\ket{\psi}$ is identified with two different $K$-matrices $K_{\pm}(u,\alpha_\pm,\beta_\pm,\theta_\pm)$ as \begin{equation} \label{localtwosite2} \ket{\psi}\sim \sum_{j_1,j_2=1}^2 (K_-(-\eta/2)\sigma^y)_{j_1,j_2}\ket{j_1}\otimes\ket{j_2},\qquad (\ket{\psi})^*\sim \sum_{j_1,j_2=1}^2 (\tilde K_+(\eta/2)\sigma^y)_{j_1,j_2}\ket{j_1}\otimes\ket{j_2}, \end{equation} where $\tilde K_+$ denotes transposition. It can be seen from \eqref{Kparam} that the two vectors in \eqref{localtwosite2} can be proportional to each other only if the two sets of parameters satisfy \begin{equation} \alpha_-=-\alpha_+^*\equiv \alpha\qquad \beta_-=\beta_+^*\equiv \beta \qquad \theta_-=-\theta_+^*\equiv \theta. \end{equation} In the thermodynamic limit the amplitude \eqref{Loschm} will be given by the leading eigenavalue of the Boundary QTM, for which the following generalized TBA equations were derived in \cite{sajat-Loschm}\footnote{The formulas here have an additional factor of 4 in front of the energy terms; which originates from a different definition of the Hamiltonian.} \begin{equation} \label{oTBA2} \log \tilde y_j=- 4\sinh(\eta)w\ s\delta_{j,1}+ \tilde d_j +s\star \left[ \log(1+\tilde y_{j-1})+\log(1+\tilde y_{j+1}) \right], \end{equation} such that the dynamical free energy is given by \begin{equation} g(w)=\frac{1}{2}\int_{-\pi/2}^{+\pi/2} \,d\lambda\ s(\lambda)\left\{ w 2\sinh(\eta) a(\lambda)+ \log\left[\frac{1+\tilde{y}_1(\mu)}{ 1+\tilde Y_1(\lambda) }\right]\right\}\,, \label{final_g} \end{equation} where \begin{equation} a(\lambda)=\frac{4\sinh(\eta)}{\cosh(\eta)-\cos(2\lambda)}\,. \label{a_function} \end{equation} and $\tilde Y_j(\lambda)$ is the solution of \eqref{oTBA2} for $w=0$. The source terms $\tilde d_j$ are independent of $w$ and are determined by the parameters of the $K$-matrices. A number of specific cases were discussed in \cite{sajat-Loschm}, but we refrain from repeating the explicit formulas. Equation \eqref{oTBA2} will be called ``Loschmit-TBA'' in the rest of the paper. An important central result of \cite{sajat-Loschm} was that the functions $\tilde Y_j$ satisfy the $Y$-system equations, which follows from the fusion hierarchy of the Boundary QTM. Also, it was shown that the first member is given explicitly by\footnote{The most general case with arbitrary complex $(\alpha,\beta,\theta)$ parameters was not given in \cite{sajat-Loschm}. However, it is straightforward to extract it from the intermediate results given there.} \begin{equation} \label{Y1} 1+Y_1(\lambda)=\frac{\mathcal{N}(\lambda+i\eta/2)\mathcal{N}(\lambda-i\eta/2)} {\chi(\lambda)} \end{equation} where \begin{equation} \mathcal{N}(\lambda)=\text{Tr}\Big[ K_+(\lambda+\eta/2)K_-(\lambda-\eta/2)\Big] \end{equation} and \begin{equation} \label{chidef} \chi=16 \frac{v^s_\eta v^c_\eta}{v^s_{\eta/2}v^c_{\eta/2}} v^s_\alpha v^s_{\alpha^*}v^c_\beta v^c_{\beta^*} \end{equation} where we introduced the short-hand notation \begin{equation} v^s_\kappa(\lambda)=\sin(\lambda+i\kappa)\sin(\lambda-i\kappa)\qquad v^c_\kappa(\lambda)=\cos(\lambda+i\kappa)\cos(\lambda-i\kappa) \end{equation} Note that according to \eqref{localtwosite2} $\mathcal{N}(0)$ describes the norm of the two-site block $\ket{\psi}$. Based on the similarities of the QA formulas \eqref{oTBA} and those obtained for the Loschmidt echo it is very natural to identify \begin{equation} \label{connection} \tilde Y_j(\lambda)=Y_j(\lambda)\qquad \tilde d_j(\lambda)=d_j(\lambda), \end{equation} which was known to hold for the diagonal $K$ matrices \cite{sajat-QA-GGE-hosszu-cikk} and was also checked explicitly for specific off-diagonal cases in \cite{sajat-Loschm}. Eq. \eqref{connection} represents a close connection between the QA and QTM approaches: it implies that the integrability properties of the overlaps (i.e. factorizability) are closely related to the fusion hierarchy of the Boundary QTM. This is the observation that allows us to extract new finite volume overlap formulas from the Loschmidt-TBA. \section{The general overlap formula} \label{sec:ov} In the previous section it was explained that \eqref{oTBA2} is a generalized TBA equation describing the Loschmidt-echo, valid for arbitrary $K$-matrices, such that the solution at $w=0$ (corresponding to the Quench Action point) is exactly known through \eqref{Y1}. If we assume that there exists a factorized overlap of the form \eqref{factorized}, then \eqref{oTBA2} has to coincide with the QA-TBA \eqref{oTBA} for that specific overlap. This is supported by the identification \eqref{connection}. In this case the single-particle overlap function can be ,,reverse engineered'' by computing the overlap sources $d_j(u)$ in \eqref{oTBA} and comparing them to $\tilde d_j(u)$ in \eqref{oTBA2}. Instead of computing the source terms, we choose to operate only with the $Y$-functions and their singularity properties. For example, for the first equation in the TBA we obtain the suggestive formula \begin{equation} \label{Y1v} \begin{split} & \log Y_1(\lambda) -s\star \Big[\log(Y_1(\lambda+i\eta/2))+\log(Y_1(\lambda-i\eta/2))\Big] =\\ & \hspace{2cm}=-\log(v(\lambda))+s\star \Big[\log(v(\lambda+i\eta/2))+\log(v(\lambda-i\eta/2))\Big]. \end{split} \end{equation} Here we used the $Y$-system equations \eqref{Y}, and relations \eqref{dj} and \eqref{gj} for the overlaps. It is tempting to identify $v(\lambda)=C/Y_1(\lambda)$, however, this is misleading. Relation \eqref{Y1v} gives information only about the poles and zeroes of the functions within the physical strip $|\Im{(\lambda)}|\le \eta/2$. This follows from the identity \begin{equation} \label{idill} \int_{-\pi/2}^{\pi/2} \frac{dx}{2\pi} s(y-x) \log(h(x+i\eta/2)h(x-i\eta/2))=\log h(y), \end{equation} which can be obtained from the Fourier representation of $s(\lambda)$ \eqref{sdef}, or alternatively after a contour shift from \eqref{identity}, assuming that there are no singularities of $\log(h(x))$ to be picked up. Therefore, \eqref{Y1v} implies that $v(\lambda)=h(\lambda)/Y_1(\lambda)$, where $h(\lambda)$ is free of poles and zeroes in the physical strip, and the poles (or zeroes) of $Y_1(\lambda)$ within the physical strip correspond to zeroes (or poles) of $v(\lambda)$, respectively. In order to understand the dependence of the overlaps on the $K$-matrices it is useful to study the known cases. For a diagonal $K$-matrix of the form \eqref{Kdiag} the overlap function is \begin{equation} \label{diagv} v(\lambda)= \frac{\sinh^4(\eta)}{16 (\cosh(2\xi)\cosh(\eta)-1)^2} \frac{(v^s_\xi)^2}{v^s_0 v^c_0 v^s_{\eta/2} v^c_{\eta/2}}, \end{equation} which is obtained from the relation \eqref{Kidentity} and the N\'eel overlap function \eqref{vNeel}. For $Y_1(u)$ the following result holds: \begin{equation} \label{xiY} 1+Y_1(\lambda)=(1+\fa(\lambda+i\eta/2)(1+\fa^{-1}(\lambda-i\eta/2)) \end{equation} with \begin{equation} \fa(\lambda)= \frac{\sin(\lambda-i(\xi-\eta/2))}{\sin(\lambda+i(\xi-\eta/2))} \frac{\sin(\lambda+i(\xi+\eta/2))}{\sin(\lambda-i(\xi+\eta/2))} \frac{\sin(2\lambda-i\eta)}{\sin(2\lambda+i\eta)}. \end{equation} Eq. \eqref{xiY} could be obtained by taking the diagonal limit of the general formula \eqref{Y1}, or from earlier results for the diagonal $K$-matrices \cite{sajat-BQTM,sajat-QA-GGE-hosszu-cikk}. It can be seen that the only poles of $Y_1(\lambda)$ within the physical strip can be at $\lambda=\pm \xi$, if $\Re(\xi)<\eta/2$, and these poles are indeed reflected by the zeroes of $v(\lambda)$. In the cases where $\xi$ is outside the physical strip, the two singularities still move together, which is ensured by analytic continuation. The poles of $v(\lambda)$ within the physical strip are the double poles at $\lambda=0,\pi/2$, and direct calculation shows that indeed they correspond to zeroes of $Y_1(\lambda)$. There are additional poles of both $v(u)$ and $Y_1(\lambda)$ at $\lambda=\pm i\eta/2$ and $\lambda=\pi/2 \pm i\eta/2$, but they lie on the boundary of the physical strip, and \eqref{Y1v} does not give any information about them: the contributions of symmetrically located singularities at $\kappa\pm i\eta/2$ cancel each other in \eqref{Y1v} for any $\kappa\in\valos$, but they are relevant for the higher nodes of the TBA. The crucial observation here is that there are some fixed ($\xi$-independent) singularities of both functions, and extra zeroes of $v(\lambda)$ that are determined by the $\xi$-dependent poles of $Y_1(\lambda)$. This is enough to conjecture the overlap function for the general case. For a generic $K$-matrix the poles of $Y_1$ are given by \eqref{chidef}, and comparing to the previous result \eqref{diagv} we arrive at the conjecture \begin{equation} \label{ulambda} v(\lambda)=Cu(\lambda),\qquad u(\lambda)=\frac{ v_{\alpha}^sv_{\alpha^*}^sv_{\beta}^cv_{\beta^*}^c} {v^s_{\eta/2} v^c_{\eta/2}v^s_0v^c_0}, \end{equation} where $C$ is a numerical constant that depends on the parameters $(\alpha,\beta,\theta)$. A detailed analysis of all higher nodes in the TBA reveals that this overlap function indeed reproduces the correct source terms. We note that \eqref{ulambda} does not include any ``minimal analyticity assumption'': any other function $\tilde v(\lambda)$ has to have exactly the same poles and zeroes as $v(\lambda)$ in order to yield the correct Loschmidt-TBA, and combined with the symmetry properties we get $\tilde v(\lambda)=\tilde C v(\lambda)$. The overall normalization plays a similar role as a magnetic field in the thermodynamics: it influences the net magnetization. For states with zero total magnetization the constant $C$ can be fixed by the overlap sum rule. In these cases we expect that $A=1$ in \eqref{factorized}, and the extensive part of the overlap sum rule \eqref{ovsumext} gives \begin{equation} \int_{-\pi/2}^{\pi/2} \frac{d\lambda}{2\pi} s(\lambda) \log\left[ \mathcal{N}(\lambda+i\eta/2)\mathcal{N}(\lambda-i\eta/2) \frac{C(\alpha,\xi)} {16v^s_\eta(\lambda) v^c_\eta(\lambda) v^s_0(\lambda)v^c_0(\lambda)} \right]=0. \end{equation} Substituting $h(\lambda)=\sin(2\lambda+i\eta)\sin(2\lambda-i\eta)$ into \eqref{idill} we get \begin{equation} \int_{-\pi/2}^{\pi/2} \frac{d\lambda}{2\pi} s(\lambda) \log \frac{1}{16v^s_\eta(\lambda) v^c_\eta(\lambda) v^s_0(\lambda)v^c_0(\lambda)} =-\log \sinh^2(\eta). \end{equation} It can be checked that there are no zeros of $\mathcal{N}$ within the physical strip (this is most easily checked for the diagonal case \eqref{Kdiag}), which implies \begin{equation} \int_{-\pi/2}^{\pi/2} \frac{d\lambda}{2\pi} s(\lambda) \log ( \mathcal{N}(\lambda+i\eta/2)\mathcal{N}(\lambda-i\eta/2))= \log \mathcal{N}(0). \end{equation} From this we get the result \begin{equation} \label{leoszt} C(\alpha,\beta,\theta)=\frac{\sinh^4(\eta)}{\mathcal{N}^2(0)}. \end{equation} It is important that the previous arguments only fix the thermodynamic part of the overlap. On the other hand, Section \ref{sec:ovsumrule} showed that the two Gaudin-like determinants produce just the correct normalization in order to satisfy the overlap sum rule, and the $\ordo(1)$ terms do not depend on the extensive part, they are fixed simply by the pair structure. Therefore it is tempting to assume that the finite part is always given by the ratio of the same Gaudin-like determinants. This leads to the general finite volume conjecture \begin{equation} \frac{|\langle\Psi_{0}|\{\pm\lambda^+\}_{N/2}\rangle|^2} {\langle\{\pm\lambda^+\}_{N/2}|\{\pm\lambda^+\}_{N/2}\rangle} =\tilde A^{L-2N}\prod_{j=1}^{N/2} v(\lambda^+_j) \times \frac{\det_{N/2}G_{jk}^{+}}{\det_{N/2}G_{jk}^{-}}\,, \label{OVERLAPS} \end{equation} with the matrices given by \eqref{gaudins}. As remarked in Sec. \ref{sec:QA}, the pre-factor $\tilde A^{L-2N}$ can be present for states with non-zero total magnetization. If formula \eqref{OVERLAPS} is correct, then it should also apply to the zero particle case, which fixes $\tilde A$: \begin{equation} \tilde A= \frac{|\psi_{11}|}{|\psi|}= \frac{|K^-_{12}(-\eta/2)|}{\sqrt{|\mathcal{N}(0)|}}. \end{equation} Combined with \eqref{psyparam} this gives the remarkably simple formula \begin{equation} \frac{|\langle\Psi_{0}|\{\pm\lambda^+\}_{N/2}\rangle|^2} {\langle\{\pm\lambda^+\}_{N/2}|\{\pm\lambda^+\}_{N/2}\rangle} = \frac{|e^{\theta(L-2N)}|\sinh^{L}(\eta)}{|\mathcal{N}(0)|^{L/2}} \prod_{j=1}^{N/2} u(\lambda_j) \times \frac{\det_{N/2}G_{jk}^{+}}{\det_{N/2}G_{jk}^{-}}\,, \label{OVERLAPS2} \end{equation} with $u(\lambda)$ given by \eqref{ulambda}. It is useful to give a few comments about the formula \eqref{OVERLAPS2}. The denominator $|\mathcal{N}(0)|^{L/2}$ can be interpreted as an overall normalization factor coming from the norm of a single two-site block $\ket{\psi}$, as given by \eqref{localtwosite}. The $\theta$ parameter of the $K$-matrix does not appear in the function $u(\lambda)$, but it affects the norm $\mathcal{N}(0)$ and it appears in a separate pre-factor. This factor can be easily understood from the coordinate Bethe Ansatz: it can be seen from \eqref{psyparam} that in the un-normalized vector $\ket{\Psi_0}$ the up/down spin components carry factors of $e^{\pm\theta/2}$, respectively; the Bethe vectors have fixed magnetization, therefore these factors multiply to the common pre-factor in \eqref{OVERLAPS2}. It is also useful to investigate the diagonal limit of \eqref{OVERLAPS2}, which is reached by sending $\beta\to\infty$. In this limit both $\mathcal{N}(0)$ and $u(\lambda)$ diverge. It can be seen that the overlap scales to zero unless $N=L/2$, in which case the previous results are reproduced. We have tested the conjectured formula numerically and found convincing agreement in all cases. A short discussion of the numerical results is presented in the Appendix. In the remainder of the section we compute a few specific cases for the overlap. The first example is the tilted ferromagnetic state defined as \begin{equation} \ket{\Psi(F,\theta)}=\prod_{j=1}^L \frac{1}{\sqrt{2\cosh(\theta)}} \begin{pmatrix} ie^{\theta/2} \\ e^{-\theta/2} \end{pmatrix}. \end{equation} Here $\theta=\log(\cot(\vartheta/2))$ with $\vartheta$ being the tilting angle from the $z$-axis. This state is obtained from \eqref{psyparam} by setting \begin{equation} \alpha=0\qquad \beta=\eta/2+i\pi/2. \end{equation} In this case \begin{equation} \mathcal{N}(0)= -4\sinh^2(\eta)\cosh^2(\theta). \end{equation} Thus we get \begin{equation} \label{XFov} \frac{|\langle\Psi(F,\theta)|\{\pm\lambda^+\}_{N/2}\rangle|^2} {\langle\{\pm\lambda^+\}_{N/2}|\{\pm\lambda^+\}_{N/2}\rangle} = \frac{|e^{\theta(L-2N)|}}{|2\cosh(\theta)|^{L}} \prod_{j=1}^{N/2} u_F(\lambda_j) \times \frac{\det_{N/2}G_{jk}^{+}}{\det_{N/2}G_{jk}^{-}}\,, \end{equation} with \begin{equation} u_F(\lambda)= \tan^2(\lambda)\tan(\lambda+i\eta/2)\tan(\lambda-i\eta/2). \end{equation} It is an interesting idea to consider the tilted ferromagnetic states in spin chains with an odd number of sites. In these cases the integrability properties (or possible off-shell formulas) can not follow from Boundary Bethe Ansatz methods, because those imply an even number of sites. However, these one-site states are integrable even in odd volumes: they are annihilated by all odd charges, which follows simply from the additivity of the charges and the fact that the states are integrable in even volumes. Therefore, the overlaps satisfy the pair structure also in odd volumes. We have tested the formula \eqref{XFov} in odd volumes and found that it is indeed correct. This points to the possibility of a derivation that is independent of the Boundary BA techniques. Our second example is the tilted N\'eel state $\ket{\Psi(N,\vartheta)}$ given by the two-site block \begin{equation} \ket{\psi}\sim \begin{pmatrix} - \cos(\vartheta/2)\sin(\vartheta/2) & \cos^2(\vartheta/2)\\ - \sin^2(\vartheta/2) & \cos(\vartheta/2)\sin(\vartheta/2) \end{pmatrix}, \end{equation} where $\vartheta$ is the tilting angle. This is obtained from \eqref{psyparam} by setting \begin{equation} \alpha=-\eta/2\qquad e^{-\beta}=\tan(\vartheta/2)\qquad \theta=0. \end{equation} Now \begin{equation} \mathcal{N}(0)=-4\sinh^2(\eta) \cosh^2(\beta), \end{equation} and for the overlap we get \begin{equation} \frac{|\langle\Psi(N,\vartheta)|\{\pm\lambda^+\}_{N/2}\rangle|^2} {\langle\{\pm\lambda^+\}_{N/2}|\{\pm\lambda^+\}_{N/2}\rangle} = \frac{1}{(2\cosh(\beta))^{L}} \prod_{j=1}^{N/2} u_{N,\vartheta}(\lambda_j) \times \frac{\det_{N/2}G_{jk}^{+}}{\det_{N/2}G_{jk}^{-}}\,, \end{equation} with \begin{equation} u_{N,\vartheta}(\lambda)=\frac{v_{\eta/2}^s(v_{\beta}^c)^2} {v^c_{\eta/2}v^s_0v^c_0}. \end{equation} It can be seen immediately that in the $\beta\to\infty$ limit the overlaps with $N=L/2$ converge to those of the original N\'eel state, whereas for $N<L/2$ they scale to zero. \section{Conclusions} In this work we conjectured the formula \eqref{OVERLAPS2} for exact overlaps with arbitrary two-site states. The conjecture was confirmed by numerical tests, and we have shown that it produces the correct Quench Action TBA in the thermodynamic limit. It is quite intriguing that the new exact formula involves the same ratio of two Gaudin-like determinants, that were derived originally for the N\'eel state in \cite{Caux-Neel-overlap1}. For the generalized dimer states given by \eqref{gendim} this can be understood through the relation \eqref{Kidentity} which relates the overlaps with them directly to the N\'eel case. On the other hand, in the generic case we do not know of such a simple relation which would follow immediately from the coordinate Bethe Ansatz wave function. It might be that for generic two-site states it is only the on-shell case where such a simple final formula can be derived. The result of \cite{zarembo-neel-cite2} point towards this possibility: for states corresponding to the special case of lower diagonal $K$-matrices the off-shell formula differs from that of the N\'eel state, but the on-shell case already takes the same form. The recursion relations derived in \cite{calabrese-recursive-overlaps} also confirm this scenario, because they show that the generic off-shell case has to have different structure from the original off-shell formula for N\'eel \eqref{N1}. In the present work we have shown that the Gaudin-like determinants play a special role in the overlap sum rule \eqref{ovsumrule} in the thermodynamic limit: their ratio tends to a finite number which cancels two other $\ordo(1)$ contributions to the Quench Action. These additional contributions come from the modified density of states due to the pair structure, and from the fluctuations around the saddle point solution, in complete analogy with the $\ordo(1)$ terms in the free energy of a boundary system \cite{sajat-g,woynarovich-uj}. The cancellation in the $L\to\infty$ limit is necessary for the consistency of the Quench Action method, but it is not enough to prove the finite volume formulas. It is worth noting again, that the same determinants already appeared in a specific overlap in the Lieb-Liniger model \cite{caux-stb-LL-BEC-quench,Caux-Neel-overlap2,Brockmann-BEC}, and analogous determinants were found for overlaps in the $SU(3)$-symmetric model too \cite{ADSMPS2}. Thus they might be generally present in overlaps with integrable initial states. Future tasks include the construction of a proof of our conjectured formulas, including the result \eqref{XFov} for one-site states in chains with odd length. We stress again that the existing methods in the literature were based on the Boundary Algebraic Bethe Ansatz, and this only applies to even volumes. Coordinate Bethe Ansatz calculations don't distinguish between the odd and even cases, thus they could confirm \eqref{XFov} for low particle numbers. Alternatively, the recursion relations of \cite{calabrese-recursive-overlaps} could be adapted to the odd length case to find a general off-shell formula. Also, it would be desirable to develop methods for overlaps in other models. In this work we have argued that factorized overlaps can be found only for integrable initial states. Therefore, in each model the first task is to characterize the integrable states (by integrable $K$-matrices or other tools), such that the overlap calculations can be carried out. An interesting example would be the spin-1 XXZ chain, where the integrable states are given in \cite{sajat-integrable-quenches}, but the exact overlaps are not yet known. An other example is the $SU(3)$-symmetric chain: the results of \cite{ADSMPS2} for an integrable MPS are obtained from coordinate Bethe Ansatz for small particle numbers, and it is desirable to find a general proof in this case too. We hope to return to these questions in future research. \vspace{1cm} {\bf Acknowledgments} We would like to thank M\'arton Mesty\'an, Yunfeng Jiang, Lorenzo Piroli, and Eric Vernier for inspiring discussions, and we acknowledge support from the ``Premium'' Postdoctoral Program of the Hungarian Academy of Sciences, the K2016 grant no. 119204 and the KH-17 grant no. 125567 of the research agency NKFIH. This work was partially supported also within the Quantum Technology National Excellence Program (Project No. 2017-1.2.1-NKP-2017-00001).
\section{\@startsection{section}{1}{\z@}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}{\large\bf}} \defAppendix \Alph{section}{\arabic{section}} \def\Alph{section}.\arabic{subsection}{\arabic{section}.\arabic{subsection}} \def\arabic{subsubsection}{\arabic{subsubsection}} \def
\section{introduction} Over the last decade, several variants of the cooperative data exchange (CDE) problem have been studied in the literature, see, e.g.,~\cite{RCS:2007,RSS:2010,CW:2010,SSBR:2010,SSBR2:2010,GL:2012,YSZ:2014,CW:2014,CH:2014, MPRGR:2016, CAZDLS:2016}. The original setting of this problem considers a peer-to-peer data exchange scenario over a lossless broadcast channel. There is a group $N$ of users and a ground set $X$ of packets. Each user knows a subset of packets in $X$, and wants to learn the rest of packets in $X$. The users exchange their packets by broadcasting coded or uncoded versions of their packets, and the problem is to find a solution (i.e., the transmission rate of each user and the set of packets transmitted by each user) such that all users achieve omniscience with minimum total sum-rate. In this work, we revisit the CDE problem from a game-theoretic perspective where all users are selfish. In this setting, there can be a monetary transaction between any pair of users, and the utility function of each user is defined as the sum of two sub-utility functions as follows: (i) the difference between the total payment the user receives from other users and its transmission rate, and (ii) the difference between the total number of packets the user wants and the total payment it makes to other users. Thinking of the sum of the transmission rate and the total payment being made by each user as its \emph{cost} for participating in the exchange session, and thinking of the sum of the number of packets each user learns and the total payment being received by the user as its \emph{gain} due to its participation in the exchange session, the utility function of each user is the surplus of the user. The problem is to find a rate schedule $\{r_i\}_{i\in N}$ and a payment schedule $\{p_{i,j}\}_{i,j\in N}$ for the \emph{grand coalition} (i.e., the set of all users) to achieve omniscience all together that is Pareto optimal, with respect to the utility function, over all \emph{minor coalitions} (i.e., any proper subset of users who collectively know all packets in $X$). That is, a pair $(\{r_i\}_{i\in N},\{p_{i,j}\}_{i,j\in N})$ is a \emph{solution} if there is no pair $(\{\tilde{r}_i\}_{i\in S},\{\tilde{p}_{i,j}\}_{i,j\in S})$ for any minor coalition $S$ to achieve omniscience together such that the utility of some user(s) in $S$ is strictly greater, and the utility of no user in $S$ is less. Note that a solution \emph{stabilizes} the grand coalition in that no minor coalition has incentive to break the grand coalition. The goal is to find a solution that minimizes the total sum-rate and the total sum-payment simultaneously. In this work, we propose two algorithms, each of which finds a solution for any problem instance. Moreover, we show that both algorithms maximize the sum of utility of all users (over all solutions), and one of the algorithms also maximizes the minimum utility among all users (over all solutions). \subsection{Related Work} A different coalition-game model for the CDE problem was recently proposed in~\cite{DCLKS:16}. This model, however, differs from our work in two aspects: (i) the utility function under the consideration is different from ours, and (ii) the criteria for the stability of the grand coalition is different from the Pareto optimality being considered here. Very recently, in~\cite{HS3:2016}, we also studied a related problem, where each user has two utility functions: its rate and its delay. Defining the stability of the grand coalition via the Pareto optimality, with respect to both the rate and delay functions simultaneously, over all minor coalitions, we showed that there does not exist any \emph{non-monetary} mechanism (without the peer-to-peer payments) that stabilizes the grand coalition for all problem instances. This result is the motivation of this work on the design of a \emph{monetary} mechanism for stabilizing the grand coalition for any problem instance. \section{Problem Setup} We consider the original setting of the cooperative data exchange (CDE) problem as follows. Consider a group of $n$ users and a set of $k$ packets ${X}\triangleq \{x_1,\dots,x_{k}\}$. Let $N\triangleq\{1,\dots,n\}$ and $K\triangleq\{1,\dots,k\}$. Initially, each user $i\in N$ has a subset ${X}_i$ of the packets in ${X}$, and ultimately, the user $i$ wants the rest of the packets $\overline{{X}}_i\triangleq {X}\setminus {X}_i$. The index set of packets in $X_i$ for each user $i$ is known by all other users. Also, without loss of generality, we assume that ${X}=\cup_{i\in N} {X}_i$. The objective of all users is to \emph{achieve omniscience}, i.e., to learn all packets in ${X}$, via exchanging their packets by broadcasting (coded or uncoded) packets. A subset $S$ of users in $N$ is a \emph{coalition} if $\cup_{i\in S} X_i=X$. We refer to any coalition $S\subset N$ as a \emph{minor coalition}, and refer to the coalition $N$ as the \emph{grand coalition}. Whenever we use the notation $S$ for a subset of users, we assume that $S$ is a coalition, unless explicitly noted otherwise. Let $\mathbb{Z}_{+}$ be the set of non-negative integers. For any $S\subseteq N$, a rate vector $r\triangleq [r_1,\dots,r_n]\in \mathbb{Z}_{+}^{n}$ is \emph{$S$-omniscience-achieving} if there exists a transmission scheme with each user $i\in S$ transmitting $r_{i}$ (coded or uncoded) packets such that all users in $S$ achieve omniscience, regardless of transmissions of the rest of the users. Note that, for any $S$-omniscience-achieving rate vector, random linear network coding (over a sufficiently large finite field) suffices as a transmission scheme for all users in $S$ to achieve omniscience (with any arbitrarily high probability)~\cite{CW:2014}. For any $S\subseteq N$, we denote by $\mathcal{R}_{S}$ the set of all $S$-omniscience-achieving rate vectors $r$ such that $r_i=0$ for all $i\not\in S$. For any arbitrary subset $S\subseteq N$ and any rate vector $r$, we define the sum-rate $r_S\triangleq \sum_{i\in S} r_i$ and $r_{\emptyset}\triangleq 0$. By a standard network coding argument~\cite{CW:2014}, for any $S\subseteq N$, $r\in\mathcal{R}_S$ iff $r_{\tilde{S}}\geq |\cap_{j\in S\setminus \tilde{S}} \overline{{X}}_j|$, for every (non-empty) $\tilde{S}\subset S$. We consider CDE under a monetary mechanism where there can be a payment from any user to any other user. For all $i,j\in N$, let ${p_{i,j}\geq 0}$ be the total payment from the user $i$ to the user $j$, and let $p_{i,i} = 0$. For a payment matrix $p\triangleq [p_{i,j}]$, let $p^{+}_i\triangleq \sum_{j\in N\setminus \{i\}} p_{j,i}$ and $p^{-}_i\triangleq \sum_{j\in N\setminus \{i\}} p_{i,j}$ be the total incoming payment of the user $i$ and the total outgoing payment of the user $i$, respectively. For any $S\subseteq N$, we denote by $\mathcal{P}_S$ the set of all payment matrices $p$ such that $p_{i,j}=0$ and $p_{j,i}=0$ for all $i\in S$, $j\not\in S$, i.e., there is no incoming payment to any user in $S$ from any user out of $S$ and there is no outgoing payment from any user in $S$ to any user out of $S$. For any $S\subseteq N$, we define the sum-payment $p_S\triangleq \sum_{i,j\in S} p_{i,j}$. Note that $\sum_{i\in S} p^{+}_i = \sum_{i\in S} p^{-}_i=p_S$ for all $p\in \mathcal{P}_S$. \begin{definition}[Utility] For any $S\subseteq N$, any $r\in \mathcal{R}_S$, and any $p\in\mathcal{P}_S$, the utility of each user $i\in S$ is given by \[u_i(r,p)\triangleq (p^{+}_i-r_i)+(|\overline{X}_i|-p^{-}_i),\] where $u_i^{+}(r,p)\triangleq p^{+}_i-r_i$ is the net utility due to the user $i$'s contribution to the system, and $u_i^{-}(r,p)\triangleq |\overline{X}_i|-p^{-}_i$ is the net utility due to the system's contribution to the user $i$. \end{definition} Note that the cost per transmission and the value per packet are assumed to be unity for all users. The two functions $u_i^{+}(r,p)$ and $u_i^{-}(r,p)$ motivate the notion of rationality defined as follows. \begin{definition}[Rationality] For any $S\subseteq N$, any $r\in \mathcal{R}_S$ and any $p\in \mathcal{P}_S$, the rate-payment pair $(r,p)$ is \emph{rational} if $u_i^{+}(r,p)\geq 0$ and $u_i^{-}(r,p)\geq 0$ for all $i\in S$. \end{definition} Hereafter, we focus on the rational rate-payment pairs only, and omit the term ``rational'' for brevity. We assume that all the users are \emph{selfish}, i.e., each user may or may not agree with its rate specified by a rate vector or its payments specified by a payment matrix. The goal is to find a rate-payment pair $(r,p)$, $r\in\mathcal{R}_{N}$ and $p\in \mathcal{P}_N$, under which $N$ is \emph{stable}. We formally define the notion of stability based on the utility function as follows. \begin{definition}[Stability] For any rate-payment pair $(r,p)$, $r\in\mathcal{R}_N$ and $p\in\mathcal{P}_N$, $N$ is \emph{$(r,p)$-stable} if there is not a rate-payment pair $(\tilde{r},\tilde{p})$, $\tilde{r}\in\mathcal{R}_S$, and $\tilde{p}\in\mathcal{P}_S$, for some $S\subset N$, such that \begin{itemize} \item $u_i(r,p)\leq u_i(\tilde{r},\tilde{p})$ for all $i\in S$, and \item $u_i(r,p)< u_i(\tilde{r},\tilde{p})$ for some $i\in S$. \end{itemize} \end{definition} The $(r,p)$-stability of the grand coalition is equivalent to the Pareto optimality of $(r,p)$ over all minor coalitions \begin{definition}[Feasibility] A rate-payment pair $(r,p)$ is \emph{feasible} if $N$ is $(r,p)$-stable. \end{definition} Note that a feasible solution guarantees that no minor coalition of users has incentive to break the grand coalition \begin{definition}[Optimality] A feasible $(r,p)$ is \emph{optimal} if there is not a feasible $(\tilde{r},\tilde{p})$ such that $r_N>\tilde{r}_N$ or $p_N>\tilde{p}_N$. \end{definition} Note that, for an optimal solution, the sum-rate and the sum-payment are minimum among all feasible solutions. The problem is to determine if an optimal solution exists for any given instance, and if so, to find such a solution. {\SetAlgoNoLine \begin{algorithm}[t!] \caption{Algo1($n$, $k$, $\{\mathrm{U}_i\}_{i=1}^{n}$, $\mathbb{F}_q$)} $N\leftarrow \{1,\dots,n\}$, $K\leftarrow\{1,\dots,k\}$\\ ${r}_i\leftarrow 0$ $\forall i\in N$, $p_{i,j}\leftarrow 0$ $\forall i,j\in N$\\ $l\leftarrow 1$, $\mathrm{V}_0\leftarrow \emptyset$\\ \While{$\dim(\mathrm{U}_i\cup \mathrm{V}_{l-1})< k$ \emph{for some} $i\in N$}{ $T_l\leftarrow \{i\in N: \dim(\mathrm{U}_i\cup \mathrm{V}_{l-1})=\max_{i\in N} \dim(\mathrm{U}_i\cup \mathrm{V}_{l-1})\}$\\ Select an arbitrary user $t\in T_l$\\ $R_l\leftarrow \{i\in N: \mathrm{U}_{t}\not\subseteq \mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_{l-1})\}$\\ Select an encoding vector $v_{l}\in\mathbb{F}_q^{k}$ such that $v^{i}_{l}=0$ $\forall \{i\in K: u_i\not\in \mathrm{U}_{t}\}$ and $v_{l}\not\in \mathrm{span} (\cup_{i\in R_l}\mathrm{U}_i\cup\mathrm{V}_{l-1})$\\ Have the user $t$ transmit the packet $y_{l}=\sum_{i\in K} v_{l}^{i} x_i$\\ ${r}_{t}\leftarrow {r}_{t}+1$\\ $p_{i,t}\leftarrow p_{i,t}+1/|R_l|$ $\forall i\in R_l$\\ $\mathrm{V}_{l}\leftarrow \mathrm{V}_{l-1}\cup v_{l}$\\ $l\leftarrow l+1$ } \Return ${r} = [{r}_i]_{i\in N}$ and $p = [p_{i,j}]_{i,j\in N}$ \end{algorithm} } \section{Proposed Algorithms} \subsection{Algorithm~1} In this section, we present an algorithm that, for any given instance, finds an optimal solution. The algorithm begins with an all-zero rate vector $r = [r_i]_{i\in N}$ and an all-zero payment matrix $p = [p_{i,j}]_{i,j\in N}$, operates in rounds, and updates $r$ and $p$ over the rounds. For any (uncoded) packet $x_i$, $i\in K$, denote the (unit) encoding vector of $x_i$ by $u_{i}\triangleq [u^{1}_{i},\dots,u^{k}_{i}]$, where $u^{i}_{i}=1$ and $u^{j}_{i}=0$ for all $j\neq i$. For any (linearly coded) packet $y_j \triangleq \sum_{i\in K} v^{i}_{j} x_i$, where $v^{i}_{j}\in\mathbb{F}_q$ (for some finite field $\mathbb{F}_q$), denote the encoding vector of $y_j$ by $v_{j} \triangleq [v_{j}^{1},\dots,v_{j}^{k}]$. Let $\mathrm{U}_i$ be the set of (unit) encoding vectors of packets in $X_i$, and $\mathrm{V}_l$ be the set of encoding vectors of all packets being transmitted by the end of the round $l$. Let $\mathrm{V}_{0}\triangleq\emptyset$. We refer to $\mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_l)$ and $\dim(\mathrm{U}_i\cup \mathrm{V}_l)$ as the \emph{knowledge} and the \emph{size of knowledge} of the user $i$ at the end of the round $l$, respectively, where $\mathrm{span}(\mathrm{V})$ and $\dim(\mathrm{V})$ denote the vector space of (linear) span (over $\mathbb{F}_q$) of a collection $\mathrm{V}$ of vectors in $\mathbb{F}_q^{k}$ and the dimension of $\mathrm{span}(\mathrm{V})$, respectively. Consider an arbitrary round $l>0$. Let $T_l$ be the set of all users $i$ with maximum $\dim(\mathrm{U}_i \cup \mathrm{V}_{l-1})$. In the round $l$, the algorithm first selects an arbitrary user $t\in T_l$, and then the user $t$ constructs (using its uncoded packets) and broadcasts a (coded) packet $y_{l}$ (with encoding vector $v_l$). Let $R_l$ be the set of all users $i$ such that $\mathrm{U}_{t}\not\subseteq\mathrm{span}(\mathrm{U}_i\cup\mathrm{V}_{l-1})$. The encoding vector $v_{l}$ of the packet $y_{l}$ satisfies two conditions: (i) $v_{l}^{i}=0$ $\forall \{i\in K: u_{i}\not\in \mathrm{U}_{t}\}$, and (ii) $v_{l}\not\in \mathrm{span}(\cup_{i\in R_l}\mathrm{U}_i\cup \mathrm{V}_{l-1})$. (Such a vector $v_{l}\in\mathbb{F}_q^k$ always exists and it can be found in polynomial time using a randomized or a deterministic algorithm so long as $q\geq n \cdot k$ or $q\geq n$, respectively~\cite{SSBR:2010}.) Note that $R_l$ is the set of all users $i$ whose knowledge at the beginning of the round $l$ is not a superset of (initial) knowledge of the transmitting user $t$, and the encoding vector $v_l$ of the packet $y_l$ being transmitted by the user $t$ in the round $l$ is not known to any user $i\in R_l$ at the beginning of the round $l$. Thus, the transmission of the packet $y_l$ increases the size of knowledge of any user $i\in R_l$ by one, and it does not change that of any user $i\not\in R_l$. Next, the algorithm increments ${r}_{t}$ by $1$ and increments $p_{i,t}$ by $1/|R_l|$ for all $i\in R_l$. At the end of the round $l$, the algorithm augments $\mathrm{V}_{l-1}$ by $v_{l}$, and constructs $\mathrm{V}_{l}$, i.e., $\mathrm{V}_l = \mathrm{V}_{l-1}\cup \{v_l\}$. The rounds continue until the size of knowledge all users is $k$. Once the algorithm terminates, it returns the rate vector $r$ and the payment matrix $p$. \begin{theorem}\label{thm:Solution} The output of Algorithm~1 is optimal. \end{theorem} \subsection{Algorithm~2} In this section, we present an algorithm that for any given instance provides an optimal solution with maximum sum-utility and maximum min-utility among all optimal solutions. Algorithm~2 is similar to Algorithm~1, and the only difference is in the set of users that make payments and the update rule of the payments in each round. We assume that there is a \emph{broker} that collects the payment $p^{-}_i$ by each user $i$, and returns the payment $p^{+}_i$ to each user $i$. The algorithm begins with all-zero payment vectors $p^{+}$ and $p^{-}$, and updates these vectors over the rounds as follows. Consider an arbitrary round $l>0$. Let $P_l$ be the set of users with maximum $|\overline{X}_i|-p^{-}_i$. Assuming that the user $t$ transmits in the round $l$, the algorithm increments $p^{+}_t$ by $1$ and increments $p^{-}_i$ by $1/|P_l|$ for all $i\in P_l$. {\SetAlgoNoLine \begin{algorithm}[t] \caption{Algo2($n$, $k$, $\{\mathrm{U}_i\}_{i=1}^{n}$, $\mathbb{F}_q$)} $N\leftarrow \{1,\dots,n\}$, $K\leftarrow\{1,\dots,k\}$\\ ${r}_i\leftarrow 0$, $p^{+}_{i}\leftarrow 0$, $p^{-}_{i}\leftarrow 0$ $\forall i\in N$\\ $l\leftarrow 1$, $\mathrm{V}_0\leftarrow \emptyset$\\ \While{$\dim(\mathrm{U}_i\cup \mathrm{V}_{l-1})< k$ \emph{for some} $i\in N$}{ $T_l\leftarrow \{i\in N: \dim(\mathrm{U}_i\cup \mathrm{V}_{l-1})=\max_{i\in N} \dim(\mathrm{U}_i\cup \mathrm{V}_{l-1})\}$\\ $P_l\leftarrow \{i\in N: |\overline{X}_i|-p^{-}_i = \max_{i\in N} (|\overline{X}_i|-p^{-}_i)\}$\\ Select an arbitrary user $t\in T_l$\\ $R_l\leftarrow \{i\in N: \mathrm{U}_{t}\not\subseteq \mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_{l-1})\}$\\ Select an encoding vector $v_{l}\in\mathbb{F}_q^{k}$ such that $v^{i}_{l}=0$ $\forall \{i\in K: u_i\not\in \mathrm{U}_{t}\}$ and $v_{l}\not\in \mathrm{span} (\cup_{i\in R_l}\mathrm{U}_i\cup\mathrm{V}_{l-1})$\\ Have the user $t$ transmit the packet $y_{l}=\sum_{i\in K} v_{l}^{i} x_i$\\ ${r}_{t}\leftarrow {r}_{t}+1$\\ $p^{+}_{t}\leftarrow p^{+}_{t}+1$\\ $p^{-}_{i}\leftarrow p^{-}_{i}+1/|P_l|$ $\forall i\in P_l$\\ $\mathrm{V}_{l}\leftarrow \mathrm{V}_{l-1}\cup v_{l}$\\ $l\leftarrow l+1$ } \Return ${r} = [{r}_i]_{i\in N}$ and $p = [p^{+}_{i},p^{-}_i]_{i\in N}$ \end{algorithm} } \begin{theorem}\label{thm:Solution2} The output of Algorithm~2 is optimal. Moreover, the output of Algorithm~2 has maximum sum-utility and maximum min-utility among all optimal solutions. \end{theorem} \section{Proofs of Theorems} \subsection{Proof of Theorem~\ref{thm:Solution}} In this section, we reserve the notations $r$ and $p$ for the outputs of Algorithm~1. \begin{lemma} $(r,p)$ is rational (i.e., $p^{+}_i\geq r_i$ and $|\overline{X}_i|\geq p^{-}_i$ for all $i\in N$). \end{lemma} \begin{proof} By the procedure of Algorithm~1, $p^{+}_i=r_i$ since the user $i$ receives one unit of payment for each transmission it makes, and $|\overline{X}_i|\geq p^{-}_i$ since the user $i$ pays at most one unit for each transmission that increases its size of knowledge, and it does not pay for any other transmission. \end{proof} Let $N_s$ be the $s$th subset of users that achieve omniscience simultaneously, and let $l_s$ be the round at which the users in $N_s$ achieve omniscience. Note that the sets $N_s$ are disjoint. Denote by $N^{(s)}$ the set of all users in $N_1,\dots,N_{s}$. Let $m$ be such that $N^{(m)}= N$. By using similar ideas as in the proof of~\cite[Lemma~4]{HS3:2016}, the following result can be shown. \begin{lemma}\label{lem:key1} For any $s\in [m]$ and any $S\subseteq N^{(s)}$ such that $S\cap N_s\neq \emptyset$, we have $l_s\leq \tilde{r}_S$ for all $\tilde{r}\in \mathcal{R}_S$. \end{lemma} \begin{proof} Fix an arbitrary $s\in [m]$. Fix an arbitrary ${S\subseteq N^{(s)}}$ such that ${S\cap N_s\neq \emptyset}$, and an arbitrary ${\tilde{r}\in\mathcal{R}_S}$. Let ${\{y_l\}_{1\leq l\leq l_s}}$ be the set of the algorithm's choice of packets being transmitted from the round $1$ to the round $l_s$, and let ${\{v_l\}_{1\leq l\leq l_s}}$ be the set of encoding vectors of these packets. For any $S\subseteq N$, we say that a set of packets is \emph{$S$-transmittable} if the encoding vector of each packet in the set lies in $\mathrm{span}(\mathrm{U}_i)$ for some $i\in S$. Let ${\ell\triangleq\min(\tilde{r}_S,l_s)}$. We prove by induction (on $l$) that, for every $1\leq l\leq \ell$, there exists an $S$-transmittable set of $\tilde{r}_S-l+1$ packets such that if they were transmitted after the transmission of all the packets in the set $\{y_1,\dots,y_{l-1}\}$, then $S$ achieves omniscience. For the base case of $l=1$, there exists an $S$-transmittable set of $\tilde{r}_S$ packets such that if they were transmitted, then $S$ achieves omniscience (since $\tilde{r}\in\mathcal{R}_S$). Next, consider an arbitrary round $l$, $1<l\leq \ell$. Fix the set of packets $Y=\{y_1,\dots,y_{l-1}\}$. By the induction hypothesis, there exists an $S$-transmittable set of $\tilde{r}_S-l+1$ packets such that if they were transmitted after the transmission of $Y$, then $S$ achieves omniscience. Let $\tilde{{Y}}\triangleq \{\tilde{y}_{l},\dots,\tilde{y}_{\tilde{r}_S}\}$ and $\tilde{V} \triangleq \{\tilde{v}_{l},\dots,\tilde{v}_{\tilde{r}_S}\}$ be such a set of packets and the set of their encoding vectors, respectively. Assume that the algorithm selects the user $t$, which may or may not be in $S$, to transmit in the round $l$. Since \[\dim(\mathrm{U}_i\cup\mathrm{V}_{l-1})\geq k-\tilde{r}_S+l-1\] for all $i\in S$ (noting that, after the transmission of $Y\cup\tilde{Y}$, $S$ achieves omniscience), and \[\dim(\mathrm{U}_t\cup\mathrm{V}_{l-1})\geq \dim(\mathrm{U}_i\cup\mathrm{V}_{l-1})\] for all $i\in N$ (noting that, in the round $l$, the size of the knowledge of the user $t$ is greater than or equal to that of any other user $i\in N$), then \[\dim(\mathrm{U}_t\cup\mathrm{V}_{l-1})\geq k-\tilde{r}_S+l-1.\] If \[\dim(\mathrm{U}_t\cup\mathrm{V}_{l-1})= k-\tilde{r}_S+l-1,\] then the user $t$ cannot transmit in the round $l$ since the user $t$ needs the set of all the packets in $\tilde{Y}$ so as to achieve omniscience. This is, however, a contradiction (by assumption). Thus, \[\dim(\mathrm{U}_t\cup\mathrm{V}_{l-1})>k-\tilde{r}_S+l-1,\] and consequently, $\tilde{{Y}}$ contains some packet $\tilde{y}$ such that its encoding vector $\tilde{v}\in\mathrm{span}(\mathrm{U}_t\cup\mathrm{V}_{l-1})$. Fix such a packet $\tilde{y}$ and its encoding vector $\tilde{v}$. Note that, after the transmission of $Y\cup \tilde{Y}\setminus \{\tilde{y}\}$, the user $t$ achieves omniscience (i.e., $\dim(\mathrm{U}_t\cup \mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})=k$), and any user $i\in S$, $i\neq t$, needs no more than one packet so as to achieve omniscience (i.e., $\dim(\mathrm{U}_i\cup \mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})\geq k-1$ for all $i\in S$, $i\neq t$). (The deletion of one packet decreases the size of knowledge of any user by at most one.) Consider an arbitrary $i\in S$, $i\neq t$. We consider two cases: (i) ${v_l\in \mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})}$, and (ii) ${v_l\not\in \mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})}$. In the case (i), since \[v_l\in \mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})\] and \[v_l\in \mathrm{span}(\mathrm{U}_t\cup \mathrm{V}_{l-1}),\] then \[\mathrm{span}(\mathrm{U}_t\cup\mathrm{V}_{l-1})\subseteq \mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\}),\] or equivalently, \[\mathrm{span}(\mathrm{U}_t\cup\mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})\subseteq \mathrm{span}(\mathrm{U}_i\cup\mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\}).\] Thus, \[\dim(\mathrm{U}_t\cup\mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})\leq \dim(\mathrm{U}_i\cup\mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\}),\] or equivalently, \[\dim(\mathrm{U}_i\cup\mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\}) = k\] since \[\dim(\mathrm{U}_t\cup\mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})=k.\] Thus, after the transmission of $Y\cup \tilde{Y}\setminus \{\tilde{y}\}$, the user $i$ achieves omniscience. In the case (ii), since \[v_l\not\in \mathrm{span}(\mathrm{U}_i\cup \mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\})\] and \[\dim(\mathrm{U}_i\cup\mathrm{V}_{l-1}\cup \tilde{V}\setminus \{\tilde{v}\}) \geq k-1,\] then \[\dim(\mathrm{U}_i\cup\mathrm{V}_{l-1}\cup \{v_l\}\cup \tilde{V}\setminus \{\tilde{v}\}) = k.\] Thus, after the transmission of $Y\cup \{y_l\}\cup\tilde{Y}\setminus \{\tilde{y}\}$, the user $i$ achieves omniscience. By (i) and (ii), it follows that $S$ achieves omniscience after the transmission of $Y\cup\{y_l\}\cup\tilde{{Y}}\setminus \tilde{y}$. Thus, there exists an $S$-transmittable set of $\tilde{r}_S-l$ packets $\tilde{Y}\setminus \tilde{y}$ such that if they were transmitted after the transmission of $Y\cup y_l$, then $S$ achieves omniscience. This completes the inductive proof. From the above result, it follows that $S$ achieves omniscience by the algorithm's choice of packets $\{y_l\}_{1\leq l\leq \ell}$ being transmitted from the round $1$ to the round $\ell$. Now there are two cases: (i) $l_s>\tilde{r}_S$, and (ii) $l_s\leq \tilde{r}_S$. In the case (i), $\ell=\tilde{r}_S$, and hence, all users in $S$ must achieve omniscience by the round $\ell$ ($=\tilde{r}_S$). This is, however, a contradiction since some user(s) in $S$, particularly any user in $S\cap N_s$, achieves omniscience in the round $l_s$ ($>\ell$) (by definition). Note that $S\cap N_s\neq \emptyset$ (by assumption). In the case (ii), $\ell=l_s$, and the lemma follows directly. This completes the proof. \end{proof} \begin{lemma}\label{lem:feasibility1} $(r,p)$ is feasible (i.e., $N$ is $(r,p)$-stable). \end{lemma} \begin{proof} The proof follows by contradiction. Suppose that $(r,p)$ is not feasible (i.e., $N$ is not $(r,p)$-stable). Thus, there exists $\tilde{r}\in \mathcal{R}_S$ and $\tilde{p}\in \mathcal{P}_S$ for some $S\subset N$ such that $u_i(r,p)\leq u_i(\tilde{r},\tilde{p})$ for all $i\in S$, and $u_i(r,p)<u_i(\tilde{r},\tilde{p})$ for some $i\in S$. Thus, \[\sum_{i\in S} u_i(\tilde{r},\tilde{p})>\sum_{i\in S} u_i(r,p).\] Note that \[\sum_{i\in S} u_i(\tilde{r},\tilde{p}) = \sum_{i\in S} p^{+}_i - \sum_{i\in S} \tilde{r}_i +\sum_{i\in S} |\overline{X}_i|-\sum_{i\in S} p^{-}_i.\] Since $\sum_{i\in S} p^{+}_i = \sum_{i\in S} p^{-}_i$ for all $p\in \mathcal{P}_S$, then \[\sum_{i\in S} u_i(\tilde{r},\tilde{p}) = \sum_{i\in S} |\overline{X}_i| - \sum_{i\in S} \tilde{r}_i.\] Since $r_i = p^{+}_i$ for all $i\in N$, then $\sum_{i\in S} r_i = \sum_{i\in S} p^{+}_i$. Thus, \[\sum_{i\in S} u_i(r,p) = \sum_{i\in S} |\overline{X}_i| - \sum_{i\in S} p^{-}_i.\] Putting these arguments together, we get \begin{equation}\label{eq:Eq4} \sum_{i\in S} p^{-}_i>\sum_{i\in S} \tilde{r}_i. \end{equation} Let $s\in [m]$ be such that $S\subseteq N^{(s)}$ and $S\cap N_s\neq \emptyset$. Note that all the users in $S$ achieve omniscience by the round $l_s$. By the structure of the proposed algorithm, one unit of payment is made in each round (each user in $R_l$ pays $1/|R_l|$ units of payment in the round $l$), and no user pays in any round after it achieves omniscience (if the user $i$ is complete at the beginning of the round $l$, then $i\not\in R_l$). Thus, it is easy to see that \[\sum_{i\in S} p^{-}_i\leq l_s.\] Moreover, by the result of Lemma~\ref{lem:key1}, it follows that \[ l_s\leq \sum_{i\in S} \tilde{r}_i\] for all $\tilde{r}\in \mathcal{R}_S$. By combining these two inequalities, we get \begin{equation}\label{eq:Eq7} \sum_{i\in S} p^{-}_i \leq \sum_{i\in S} \tilde{r}_i. \end{equation} By comparing~\eqref{eq:Eq4} and~\eqref{eq:Eq7}, we arrive at a contradiction. Thus, $N$ is $(r,p)$-stable, as was to be shown. \end{proof} \begin{lemma}[\cite{SSBR:2010}]\label{lem:sumratemin} For any $\tilde{r}\in \mathcal{R}_N$, we have $\tilde{r}_N\geq r_N$. \end{lemma} \begin{proof} The proof can be found in \cite{SSBR:2010}. \end{proof} \begin{lemma}\label{lem:optimality1} $(r,p)$ is optimal (i.e., there is not a feasible $(\tilde{r},\tilde{p})$ such that $r_N>\tilde{r}_N$ or $p_N>\tilde{p}_N$). \end{lemma} \begin{proof} Consider an arbitrary feasible $(\tilde{r},\tilde{p})$, $\tilde{r}\in \mathcal{R}_N$ and $\tilde{p}\in \mathcal{P}_N$. We shall show that $\tilde{r}_N\geq r_N$ and $\tilde{p}_N\geq p_N$. By Lemma~\ref{lem:sumratemin}, $\tilde{r}_N\geq r_N$ for all $\tilde{r}\in \mathcal{R}_N$. Since $(\tilde{r},\tilde{p})$ is feasible, then $(\tilde{r},\tilde{p})$ is rational. Thus, $\tilde{p}^{+}_i\geq \tilde{r}_i$ for all $i\in N$, and consequently, $\tilde{p}_N\geq \tilde{r}_N$. Note that $p_N = r_N$ since $p^{+}_i = r_i$. Thus, $\tilde{p}_N\geq \tilde{r}_N\geq r_N = p_N$. This completes the proof. \end{proof} \subsection{Proof of Theorem~\ref{thm:Solution2}} In this section, we reserve the notations $r$ and $p$ for the outputs of Algorithm~2. \begin{lemma}\label{lem:rationalityAlgo2} $(r,p)$ is rational. \end{lemma} \begin{proof} Let $r_i(l)$, $p^{+}_i(l)$, and $p^{-}_i(l)$ be $r_i$, $p^{+}_i$, and $p^{-}_i$ at the end of the round $l-1$, respectively. Note that $r_i = r_i(l_m+1)$, $p^{+}_i = p^{+}_i(l_m+1)$, and $p^{-}_i = p^{-}_i(l_m+1)$. We will show that $p^{+}_i(l)\geq r_i(l)$ and $|\overline{X}_i|\geq p^{-}_i(l)$ for all $i\in N$ and all $l\in [l_m+1]$. Fix an arbitrary $l\in [l_m+1]$. By the procedure of Algorithm~2, $p^{+}_i(l) = r_i(l)$, and particularly, $p^{+}_i = r_i$. We next show that $|\overline{X}_i|\geq p^{-}_i(l)$. The proof follows by contradiction. Suppose that $|\overline{X}_i|< p^{-}_i(l)$ for some $i$. Note that \[\max_{i\in N} |\overline{X}_i| - p^{-}_i(l) = k - \min_{i\in N} (|X_i|+p^{-}_i(l)).\] Thus, \[P_l = \{i\in N: |X_i|+p^{-}_i(l) = \min_{i\in N} (|X_i|+p^{-}_i(l))\}.\] By the procedure of Algorithm~2, $|X_i|+p^{-}_i(l)$ are the same for all $i$ such that $p^{-}_i(l)>0$, and $|X_i|+p^{-}_i(l) = |X_i|\leq k$ for all $i$ such that $p^{-}_i(l) = 0$. Since $|X_i|+p^{-}_i(l)>k$ for some $i$ (by assumption), then $|X_i|+p^{-}_i(l)>k$ for all $i$, and consequently, $p^{-}_i(l)>0$ for all $i$ (since $|X_i|\leq k$ for all $i$). Since $p^{-}_i(l)$ is non-decreasing in $l$ for all $i$, then $|X_i|+p^{-}_i>k$ for all $i$, or equivalently, $p^{-}_i>|\overline{X}_i|$ for all $i$. Thus, \[\sum_{i\in N} p^{-}_i>\sum_{i\in N} |\overline{X}_i|,\] and consequently, \[r_N>\sum_{i\in N} |\overline{X}_i|\] since \[\sum_{i\in N} p^{-}_i = \sum_{i\in N} p^{+}_i = r_N.\] This is, however, a contradiction since \[r_N\leq \min_{i\in N} |\overline{X}_i|+\max_{i\in N} |\overline{X}_i|\] (by the result of \cite[Lemma~3]{RSS:2010}), and consequently, \[r_N\leq \sum_{i\in N} |\overline{X}_i|.\] Thus, $|\overline{X}_i|\geq p^{-}_i(l)$ for all $i$ and all $l$, and particularly, $|\overline{X}_i|\geq p^{-}_i$ for all $i$. This completes the proof. \end{proof} \begin{lemma} $(r,p)$ is feasible. \end{lemma} \begin{proof} Take an arbitrary $S$ such that $\mathcal{R}_S\neq \emptyset$ (i.e., all users in $S$ can achieve omniscience together). By the same argument as in the proof of Lemma~\ref{lem:feasibility1}, it suffices to show that \[\sum_{i\in S} p^{-}_i\leq \tilde{r}_S\] for all $\tilde{r}\in\mathcal{R}_S$. Run Algorithm~2 over the set $S$, and denote by $(\tilde{r},\tilde{p})$ the output. Let $\tilde{Y}=\{\tilde{y}_1,\dots,\tilde{y}_{\tilde{r}_S}\}$ and $\tilde{V}=\{\tilde{v}_1,\dots,\tilde{v}_{\tilde{r}_S}\}$ be the set of all packets being transmitted from the round $1$ to the round $\tilde{r}_S$ and their encoding vectors, respectively. Note that $\tilde{r}_S$ is the minimum sum-rate that all users in $S$ can achieve omniscience (by Lemma~\ref{lem:sumratemin}). Assume, without loss of generality, that $|X_1|\leq |X_2|\leq \dots\leq |X_n|$. Define $i^{\star} \triangleq \min_{i\in S} i$, and $S^{\star}\triangleq \{i^{\star},\dots,n\}$. Since $S\subseteq S^{\star}$, then $\mathcal{R}_{S^{\star}}\neq \emptyset$ (i.e., all users in $S^{\star}$ can achieve omniscience together). Moreover, run Algorithm~2 over the set $S^{\star}$, and denote by $(r^{\star},p^{\star})$ the output. Note that $p^{\star}_{S^{\star}} = r^{\star}_{S^{\star}}$ (by the result of Lemma~\ref{lem:rationalityAlgo2}). Let $Y^{\star}=\{y^{\star}_1,\dots,y^{\star}_{r^{\star}_{S^{\star}}}\}$ and $V^{\star}=\{v^{\star}_1,\dots,v^{\star}_{r^{\star}_{S^{\star}}}\}$ be the set of all packets being transmitted from the round $1$ to the round $r^{\star}_{S^{\star}}$ and their encoding vectors, respectively. First, we show that \[r^{\star}_{S^{\star}}\leq \tilde{r}_S.\] To do so, it suffices to show that all users in $S^{\star}\setminus S$ achieve omniscience after the reception of all packets in $\tilde{Y}$. The proof follows by contradiction. Consider an arbitrary user $i\in S^{\star}\setminus S$. Suppose that the user $i$ does not achieve omniscience after the reception of all packets in $\tilde{Y}$, i.e., $\dim(\mathrm{U}_i \cup \tilde{V})<k$. Since $\dim(\mathrm{U}_i) \geq \dim(\mathrm{U}_{i^{\star}})$ and $\dim(\mathrm{U}_{i^{\star}})\geq k-\tilde{r}_S$, then $\dim(\mathrm{U}_i)\geq k-\tilde{r}_S$. Thus, there exists some round $l$ such that the encoding vector $\tilde{v}_l$ of the packet $\tilde{y}_l$ being transmitted by some user $t\in S$ is in the knowledge set of the user $i$ prior to the round $l$, i.e., \[\mathrm{span}(\mathrm{U}_{t}) \subseteq \mathrm{span}(\mathrm{U}_i\cup \{\tilde{v}_{1},\dots,\tilde{v}_{l-1}\}),\] and consequently, \[\mathrm{span}(\mathrm{U}_{t}\cup \{\tilde{v}_{1},\dots,\tilde{v}_{l-1}\}) \subseteq \mathrm{span}(\mathrm{U}_i\cup \{\tilde{v}_{1},\dots,\tilde{v}_{l-1}\}).\] Thus, \[\mathrm{span}(\mathrm{U}_{t}\cup \tilde{V}) \subseteq \mathrm{span}(\mathrm{U}_i\cup \tilde{V}).\] Since $\dim(\mathrm{U}_{t}\cup \tilde{V})=k$ and $\dim(\mathrm{U}_{i}\cup \tilde{V})\geq \dim(\mathrm{U}_{t}\cup \tilde{V})$, then $\dim(\mathrm{U}_{i}\cup \tilde{V})=k$. This is, however, a contradiction since $\dim(\mathrm{U}_{i}\cup \tilde{V})<k$ (by assumption). Thus, all users in $S^{\star}\setminus S$ achieve omniscience after the reception of all packets in $\tilde{Y}$, and so, $r^{\star}_{S^{\star}}\leq \tilde{r}_S$. Next, we show that \[\sum_{i\in S^{\star}} p^{-}_i \leq p^{\star}_{S^{\star}}.\] If $S^{\star} = N$, then \[\sum_{i\in S^{\star}} p^{-}_i = p_N = r_N = r^{\star}_N= p^{\star}_N = p^{\star}_{S^{\star}}.\] Now assume that $S^{\star}\neq N$. If for some $l$, the packet $y^{\star}_l$ being transmitted by the user $t\in S^{\star}$ does not increase the size of knowledge of the user $i\in N\setminus S^{\star}$ such that $\dim(\mathrm{U}_{i}\cup V^{\star})<k$, then \[\mathrm{span}(\mathrm{U}_t)\subseteq \mathrm{span}(\mathrm{U}_i\cup \{v^{\star}_1,\dots,v^{\star}_{l-1}\}),\] and consequently, \[\mathrm{span}(\mathrm{U}_t\cup \{v^{\star}_1,\dots,v^{\star}_{l-1}\})\subseteq \mathrm{span}(\mathrm{U}_i\cup \{v^{\star}_1,\dots,v^{\star}_{l-1}\}).\] Thus, \[\mathrm{span}(\mathrm{U}_t\cup V^{\star})\subseteq \mathrm{span}(\mathrm{U}_i\cup V^{\star}).\] Since $\dim(\mathrm{U}_{t}\cup V^{\star})=k$ and $\dim(\mathrm{U}_{i}\cup V^{\star})\geq \dim(\mathrm{U}_{t}\cup V^{\star})$, then $\dim(\mathrm{U}_{i}\cup V^{\star})=k$. This yields a contradiction since $\dim(\mathrm{U}_{i}\cup V^{\star})<k$ (by assumption). Thus, the packet $y^{\star}_l$ (for any $l$) increases the size of knowledge of all users in $N\setminus S^{\star}$ that do not achieve omniscience after the reception of all packets $y^{\star}_1,\dots,y^{\star}_{r^{\star}_{S^{\star}}}$. Since the size of knowledge of each user $i\in N\setminus S^{\star}$ after the reception of all packets in $Y^{\star}$ is $\min\{|X_i|+r^{\star}_{S^{\star}},k\}$, then the user $i$ needs $k-\min\{|X_i|+r^{\star}_{S^{\star}},k\}$ ($\leq k-\min\{|X_1|+r^{\star}_{S^{\star}},k\}$) more packets to achieve omniscience. Thus, if the users in $S^{\star}$ continue to make transmissions after they all achieve omniscience, all users in $N\setminus S^{\star}$ achieve omniscience after the reception of at most $k-\min\{|X_1|+r^{\star}_{S^{\star}},k\}$ more packets. Thus, all users in $N$ achieve omniscience with at most $r^{\star}_{S^{\star}}+k-\min\{|X_1|+r^{\star}_{S^{\star}},k\}$ total transmissions. Since $r_N$ is the minimum sum-rate for all users in $N$ to achieve omniscience, then \[r^{\star}_{S^{\star}}+k-\min\{|X_1|+r^{\star}_{S^{\star}},k\}\geq r_N.\] We consider two cases: (i) $|X_1|+r^{\star}_{S^{\star}}\geq k$, and (ii) $|X_1|+r^{\star}_{S^{\star}}< k$. In the case~(i), we have \[r^{\star}_{S^{\star}}\geq r_N=p_N\geq \sum_{i\in S^{\star}} p^{-}_i.\] In the case~(ii), we have \[r^{\star}_{S^{\star}}+k-|X_1|-r^{\star}_{S^{\star}} = k-|X_1|\geq r_N.\] Since $r_N\geq k-|X_1|$ (otherwise, the user $1$ cannot achieve omniscience), then $r_N = k-|X_1|$. Let $c \triangleq \min_{i\in N} (|X_i|+p^{-}_i)$. If $c<|X_{i^{\star}}|$, then \[\sum_{i\in S^{\star}} p^{-}_i\leq p^{\star}_{S^{\star}}\] since $\sum_{i\in S^{\star}} p^{-}_i=0$. Now, assume that $c\geq |X_{i^{\star}}|$. Recall that $|X_1|\leq |X_2|\leq \dots\leq |X_{i^{\star}}|\leq \dots\leq |X_n|$ (by assumption). Thus, $c\geq |X_i|$ for all $i\in N\setminus S^{\star}$. Note that \[\sum_{i\in S^{\star}} p^{-}_i = r_N-\sum_{i\in N\setminus S^{\star}} (c-|X_i|)\] and \[p^{\star}_{S^{\star}}=r^{\star}_{S^{\star}}.\] We need to show that \[\sum_{i\in S^{\star}} p^{-}_i\leq p^{\star}_{S^{\star}}.\] Thus it suffices to show that \[r_N-\sum_{i\in N\setminus S^{\star}} (c-|X_i|)\leq r^{\star}_{S^{\star}}.\] The proof follows by contradiction. Suppose that \[r_N-\sum_{i\in N\setminus S^{\star}} (c-|X_i|)> r^{\star}_{S^{\star}}.\] Since $r_N = k-|X_1|$ and $r^{\star}_{S^{\star}}\geq k-|X_{i^{\star}}|$ (otherwise, the user $i^{\star}$ cannot achieve omniscience), then \[k-|X_1|-\sum_{i\in N\setminus S^{\star}} (c-|X_i|)> r^{\star}_{S^{\star}}\geq k-|X_{i^{\star}}|,\] and consequently, \[|X_{i^{\star}}|>|X_1|+\sum_{i\in N\setminus S^{\star}} (c-|X_i|).\] Since \[\sum_{i\in N\setminus S^{\star}} (c-|X_i|) = (i^{\star}-1)c-(|X_1|+\dots+|X_{i^{\star}-1}|),\] then \[|X_2|+\dots+|X_{i^{\star}}|>(i^{\star}-1)c.\] This is, however, a contradiction since $c\geq |X_i|$ for all $i\in [i^{\star}]$ (by assumption), and so, \[(i^{\star}-1)c\geq |X_2|+\dots+|X_{i^{\star}}|.\] Thus, \[\sum_{i\in S^{\star}} p^{-}_i \leq p^{\star}_{S^{\star}}.\] Moreover, \[\sum_{i\in S} p^{-}_i \leq \sum_{i\in S^{\star}} p^{-}_i\] since $S\subseteq S^{\star}$ (by definition). By combining the above arguments, it then follows that \[\sum_{i\in S} p^{-}_i \leq \tilde{r}_S,\] as was to be shown. \end{proof} \begin{lemma}\label{lem:feasibilityoptimality2} $(r,p)$ is optimal. \end{lemma} \begin{proof} The proof follows from the same argument as in the proof of Lemma~\ref{lem:optimality1}, and hence omitted to avoid repetition. \end{proof} \begin{lemma} For any optimal $(\tilde{r},\tilde{p})$, we have $\sum_{i\in N} u_i(r,p)= \sum_{i\in N} u_i(\tilde{r},\tilde{p})$ and $\min_{i\in N} u_i(r,p)\geq \min_{i\in N} u_i(\tilde{r},\tilde{p})$. \end{lemma} \begin{proof} The proof of the first part (i.e., maximum sum-utility) is straightforward. Take an arbitrary optimal $(\tilde{r},\tilde{p})$. Since $\tilde{r}_N = r_N$ and $p,\tilde{p}\in \mathcal{P}_N$, then \[\sum_{i\in N} u_i(\tilde{r},\tilde{p})=\sum_{i\in N} |\overline{X}_i|-\tilde{r}_N= \sum_{i\in N} |\overline{X}_i|-r_N = \sum_{i\in N} u_i(r,p).\] For the proof of the second part (i.e., maximum min-utility), we need to show that \[\min_{i\in N} u_i(\tilde{r},\tilde{p})\leq \min_{i\in N} u_i(r,p)\] for any optimal $(\tilde{r},\tilde{p})$. Take an arbitrary optimal $(\tilde{r},\tilde{p})$. Since $\tilde{p}^{+}_i = \tilde{r}_i$ (otherwise, $\tilde{p}_N>r_N=p_N$ since $\tilde{p}^{+}_i\geq \tilde{r}_i$ (by rationality of $(\tilde{r},\tilde{p})$), and so, $(\tilde{r},\tilde{p})$ cannot be optimal), then $u_i(\tilde{r},\tilde{p}) = |\overline{X}_i|-\tilde{p}^{-}_i$. Note that $\tilde{p}_N=p_N$. Let $c \triangleq \min_{i\in N} (|X_i|+p^{-}_i)$. Note that $|\overline{X}_i|-p^{-}_i=k-c$ if $c\geq |X_i|$, and $|\overline{X}_i|-p^{-}_i=|\overline{X}_i|=k-|X_i|$ if $c< |X_i|$. Thus, $u_i(r,p)=k-\max\{c,|X_i|\}$ for all $i\in N$. Since $|X_n|\geq |X_i|$ for all $i\in N$ (by assumption), then it follows that \[\min_{i\in N} u_i(r,p)=k-\max\{c,|X_n|\}.\] We consider two cases: (i) $c<|X_n|$, and (ii) $c\geq |X_n|$. In the case (i), $\min_{i\in N} u_i(r,p)=k-|X_n|=|\overline{X}_n|$. If $\tilde{p}^{-}_n>0$, then \[u_n(\tilde{r},\tilde{p})=|\overline{X}_n|-\tilde{p}^{-}_n<|\overline{X}_n|=\min_{i\in N} u_i(r,p).\] If $\tilde{p}^{-}_n=0$, then $u_n(\tilde{r},\tilde{p})=|\overline{X}_n|$, and consequently, \[\min_{i\in N} u_i(\tilde{r},\tilde{p})\leq u_n(\tilde{r},\tilde{p})=\min_{i\in N} u_i(r,p)=k-c.\] In the case (ii), $\min_{i\in N} u_i(r,p)=k-c$. Suppose that $\min_{i\in N} u_i(\tilde{r},\tilde{p})>\min_{i\in N} u_i(r,p)$. Let $j\in N$ be such that $|\overline{X}_{j}|-\tilde{p}^{-}_{j}=\min_{i\in N} u_i(\tilde{r},\tilde{p})$. Thus, $|\overline{X}_{j}|-\tilde{p}^{-}_{j}>k-c$. Since $|\overline{X}_i|-\tilde{p}^{-}_i\geq |\overline{X}_{j}|-\tilde{p}^{-}_{j}$ for all $i\in N$, then $|\overline{X}_i|-\tilde{p}^{-}_i>k-c$. Thus, \begin{eqnarray*} \sum_{i\in N} |\overline{X}_i|-\sum_{i\in N} \tilde{p}^{-}_i &=& \sum_{i\in N} |\overline{X}_i|-\tilde{p}_N\\ &=& \sum_{i\in N} |\overline{X}_i|-\tilde{r}_N\\ &=& \sum_{i\in N} |\overline{X}_i|-r_N\\ &=& nk-\sum_{i\in N} |X_i|-r_N\\ &>& nk-nc, \end{eqnarray*} or equivalently, $(\sum_{i\in N} |X_i|+r_N)/n<c$. Since $c=\min_{i\in N} (|X_i|+p^{-}_i)$ (by definition) and $c\geq |X_n|$ (by assumption), then it is easy to see that $c=(\sum_{i\in N} |X_i|+r_N)/n$. This is a contradiction since $(\sum_{i\in N} |X_i|+r_N)/n<c$. Thus, $\min_{i\in N} u_i(\tilde{r},\tilde{p})\leq\min_{i\in N} u_i(r,p)$. This completes the proof. \end{proof} \bibliographystyle{IEEEtran}
\section{Acknowledgments} This work was supported in part by the National Science Foundation (DIBBs 1443054, CAREER IIS-1253549), and used the Romeo cluster, supported by Indiana University and NSF RaPyDLI 1439007. We acknowledge the use of data from CReSIS with support from the University of Kansas and Operation IceBridge (NNX16AH54G). CF was supported by a Paul Purdom Fellowship. We thank Katherine Spoon, as well as the anonymous reviewers, for helpful comments and suggestions on our paper drafts. \section{Conclusion} We have presented an effective and efficient framework for reconstructing smoothed and structured 3D surfaces from sequences of tomographic images using deep networks. Our approach shows significant improvements over existing techniques: (1) extracts and reconstructs different material boundaries simultaneously; (2) avoids the need for extra evidence from other instruments or human experts; and (3) improves the feasibility of analyzing large-scale datasets by significantly decreasing the running time. \section{Experiments} \begin{figure*}[] \centerline{\includegraphics[width=17.5cm]{figures/bed.jpg}} \caption{Sample results of extracted ice-bed surfaces from a sequence of about 330 tomographic images. The x-axis corresponds to distance along the flight path, the y axis is the width of the tomographic images ($W$), and the color is the height dimension (max height is $H$), which also represents the depth from the radar. } \label{fig:ice_bed} \vspace{-5pt} \end{figure*} \begin{table}[t]\centering \vspace{12pt} {\footnotesize{ \ra{1.2} \begin{tabular}{@{}lccc@{}} \toprule & \textbf{Averaged Mean Error} (pixels) & \textbf{Time} (sec) \\ \midrule Xu et al. \cite{icesurface2017icip} & 11.9 & 306.0 \\ Ours (C3D + RNN) & 10.6 & 51.6 \\ \bottomrule \end{tabular} }} \vspace{-4pt} \caption{Performance evaluation compared to the state of the art. The accuracy of our approach is computed on the average of the ice-air and ice-bed surfaces {and the accuracy of~\cite{icesurface2017icip} is computed only on the ice-bed surfaces.} The running time is measured by processing a sequence of 330 tomographic images. \vspace{10pt} } \label{tab:speed} \end{table} \begin{table}[t]\centering {\footnotesize{ \ra{1.2} \begin{tabular}{@{}lccc@{}} \toprule & \multicolumn{2}{c}{Mean Error} \\ \cmidrule{2-3} & \textbf{Ice-air surface} & \textbf{Ice-bed surface} \\ \midrule Crandall \cite{crandall2012layer} & --- & 101.6 \\ Lee \cite{lee2014estimating} & --- & 35.6 \\ Xu et al. (w/o ice mask) \cite{icesurface2017icip} & --- & 30.7 \\ Xu et al. \cite{icesurface2017icip} & --- & 11.9 \\ \midrule Ours (RNN) & 10.1 & 21.4 \\ Ours (C2D) & 8.8 & 15.2 \\ Ours (C3D) & 9.4 & 13.9 \\ Ours (C2D + RNN) & 8.4 & 14.3 \\ Ours (C3D + RNN) & 8.1 & 13.1 \\ \bottomrule \end{tabular} }} \vspace{-4pt} \caption{Error in terms of the mean absolute column-wise difference compared to ground truth, in pixels.} \label{tab:accuracy} \end{table} \subsection{Dataset} We use a dataset of the basal topography of the Canadian Arctic Archipelago (CAA) ice sheets, collected by the Multichannel Coherent Radar Depth Sounder (MCoRDS) instrument \cite{rodriguez2014advanced}. It contains a total of 8 tomographic sequences, each with over 3,300 radar images corresponding to about 50km of flight data per sequence. For training and testing, we also have ground truth that identifies the positions of two layers of interest (the ice-air and ice-bed, i.e., $K=2$). Several examples of these tomographic images and their annotations are shown in Figure~\ref{fig:slices}. To evaluate our model, we split the data into training and testing sets (60\% as training images, 40\% as testing images) and learn the model parameters from the training images. More formally, we wish to detect the ice-air and ice-bed layers in each image, then reconstruct their corresponding 3D surfaces from a sequence of tomographic slices. We assume the tomographic sequence has size $C \times D \times H \times W$, where $C$ denotes the number of image channels (which is $1$ for our data), $D$ is the number of slices in the sequence, and $W$ and $H$ are the dimensions of each slice. We also parameterize the output surfaces as sequences, $S^k = \{S^k_1, S^k_2, \cdots, S^k_D\}$, and $S^k_{d} = \{s^k_{d,1}, s^k_{d,2}, \cdots, s^k_{d,W}\}$, where $s^k_{d,w}$ indicates the row coordinate of the surface position for column $w$ of slice $d$, and $s^k_{d,w} \in [1, H]$ since the boundary can occur anywhere within a column. In our case, $k \in \{0, 1\}$ represents the ice-air and ice-bed surfaces, respectively. \vspace{6pt} \noindent \textbf{Normalization.} Since images from different sequences have different sizes (from $824 \times 64$ pixels to $2000 \times 64$ pixels), we resize all input images to $64 \times 64$ by using bicubic interpolation. For each image, we also normalize their pixel values to the interval $[-1, 1]$ and subtract the mean value computed from the training images. Further, since the coordinates of the ground truth labels $G^k_d = \{g^k_{d,1}, g^k_{d,2}, \cdots, g^k_{d,W}\}$ in each image $I_d$ are in absolute coordinates, we follow \cite{toshev2014deeppose} to normalize them to relative positions in each image. Formally, each ground truth label is normalized as, \begin{equation} N(g^k_{d,w}) = 2 (g^k_{d,w} - H/2) / H, \end{equation} and we predict the absolute image coordinates $s^k_{d,w}$ as, \begin{equation} s^k_{d,w} = N^{-1}(\textrm{M}_{\theta}(I_d)), \end{equation} where $\textrm{M}_{\theta}$ denotes our model with learnable parameters $\theta$. \subsection{Implementation Details} We use PyTorch \cite{pytorch} to implement our model, and do the training and all experiments on a system with Pascal Nvidia Titan X graphics cards. Each tomographic sequence is divided into 10 sub-sequences on average, and we randomly choose $60\%$ of them as training data and the remaining $40\%$ for evaluation. We repeat this training process (each time from scratch) three times and report the average statistics for evaluation. For C3D training, we use the Adam \cite{kingma2014adam} optimizer to learn the network parameters with batch size of 128, each containing 5 consecutive radar images. The training process is stopped after 20 epochs, starting with a learning rate of $10^{-4}$ and reducing it in half every 5 epochs. The RNN training is applied with the same update rule and batch size, but uses learning rate $10^{-3}$ multiplied by $0.1$ every 10 epochs. \subsection{Evaluation} We evaluate our model on estimating the ice-air and ice-bed surfaces from tomographic sequences of noisy radar images. We run inference on the testing sub-sequences and calculate the pixel-level errors with respect to the human-labeled ground truth. We report the results with two summary statistics: mean deviation and running time. As shown in Table~\ref{tab:speed}, the mean error averaged across the two different surfaces is about 10.6 pixels (where the mean ice-air surface error is 8.1 pixels and mean ice-bed surface error is 13.1 pixels), and the running time of processing a topographic sequence with 330 images is about 51.6 seconds. Figure~\ref{fig:ice_air} and~\ref{fig:ice_bed} show some example results of the ice-air and ice-bed surfaces, respectively. To give some context, we compare our results to previous state of the art techniques as baselines, and results are presented in Table~\ref{tab:accuracy}. Our first two baselines are Crandall et al.~\cite{crandall2012layer}, which detects the ice-air and ice-bed layers by incorporating a template model with vertical profile and a smoothness prior into a Hidden Markov Model, and Lee et al.~\cite{lee2014estimating}, who use Markov-Chain Monte Carlo (MCMC) to sample from the joint distribution over all possible layers conditioned on radar images. These techniques were designed for 2D echogram segmentation and do not include cross-slice constraints, so they perform poorly on this problem. Xu et al.~\cite{icesurface2017icip} does use information between adjacent images and achieves slightly better results than our technique (11.9 vs 13.1 mean pixel error), but that technique also uses more information. In particular, they incorporate additional non-visual metadata from external sources, such as the ``ice mask'' which gives prior weak information about anticipated ice thickness (e.g., derived from satellite maps or other prior data). When we removed the ice mask cue from their technique to make the comparison fair, our technique beat theirs by a significant margin (13.1 vs 30.7 mean pixel error). Our approach has two additional advantages: (1) it is able to jointly estimate both the ice-air and ice-bed surfaces simultaneously, so it can incorporate constraints on the similarity of these boundaries, and (2) it requires less than one minute to process an entire sequence of slices, instead of over 5 minutes for~\cite{icesurface2017icip}. In addition to published methods, we also implemented several baselines to evaluate each component of our deep architecture. Specifically, we implemented: (a) a basic C2D network using the same architecture with the 3D network but with 2D convolution and pooling operations; (b) the RNN network using the extracted features from the C2D as the initial hidden state; (c) the C3D network alone without the RNN; and (d) the RNN network alone without the C3D network. The results of these baselines are also shown in Table~\ref{tab:accuracy}. The results show that all components of the model are important for achieving good performance, and that the best accuracy is achieved by our full model. \section{Introduction} Three-dimensional imaging is widely used in scientific research domains (e.g., biology, geology, medicine, and astronomy) to characterize the structure of objects and how they change over time. Although the exact techniques differ depending on the problem and materials involved, the common idea is that electromagnetic waves (e.g., X-ray, radar, etc.) are sent into an object, and signal returns in the form of sequences of tomographic images are then analyzed to estimate the object's 3D structure. However, analysis of these image sequences can be difficult even for humans, since they are often noisy and require integrating evidence from multiple sources simultaneously. \begin{figure} \begin{center} \includegraphics[width=1\columnwidth]{figures/teaser.jpg} \end{center} \vspace{-5pt} \caption{ Illustration of our task. A ground-penetrating radar system flies over a polar ice sheet, yielding a sequence of 2D tomographic slices (e.g. Sample (a) with the black dashed bounding box). Each slice captures a vertical cross-section of the ice, where two material boundaries (the ice-air and ice-bed layer) are visible as bright curves in the radar echogram. Given such a sequence of tomographic slices, our goal is to reconstruct the 3D surfaces for each material boundary (e.g. a sample ice-bed surface~\cite{icesurface2017icip} is shown in the figure). } \label{fig:teaser} \end{figure} As a particular example, an important part of modeling and forecasting the effects of global climate change is to understand polar ice. Hidden beneath the ice of the poles is a rich and complex structure: the ice consists of multiple layers that have accumulated over many thousands of years, and the base is bedrock that has a complicated topography just like any other place on Earth (with mountains, valleys, and other features). Moreover, the ice sheets move over time, and their movement is determined by a variety of factors, including temperature changes, flows underneath the surface, and the topography of the bedrock below and nearby. Accurately estimating all of this rich structure is crucial for understanding how ice will change over time, which in turn is important for predicting the effects of melting ice associated with climate change. Glaciologists traditionally had to drill ice cores to probe the subsurface structure of polar ice, but advances in ground-penetrating radar technology have revolutionized this data collection process. But while these radar observations can now be collected over very large areas, actually analyzing the radar data to determine the structure of subsurface ice is typically done by hand~\cite{macgregor}. This is because the radar echograms produced by the data collection process are very noisy: thermal radiation, electromagnetic interference, complex ice composition, and signal attenuation in ice, etc.\ affect radar signal returns in complex ways. Relying on humans to interpret data not only limits the rate at which datasets can be processed, but also limits the type of analysis that can be performed: while a human expert can readily mark ice sheet boundaries in a single 2D radar echogram, doing this simultaneously over thousands of echograms to produce a 3D model of an ice bed, for example, is simply not feasible. While several recent papers have proposed automated techniques for segmenting layer boundaries in ice~\cite{freeman2010automated, ilisei2012technique, ferro2013automatic, mitchell2013semi,crandall2012layer, lee2014estimating, carrer2017automatic, icesurface2017icip, panton}, none have approached the accuracy of even an undergraduate student annotator~\cite{macgregor}, much less an expert. However, these techniques have all relied on traditional image processing and computer vision techniques, like edge detection, pixel template models, active contour models, etc. Most of these techniques also rely on numerous parameters and thresholds that must be tuned by hand. Some recent work reduces the number of free parameters through graphical models that explicitly model noise and uncertainty~\cite{icesurface2017icip, lee2014estimating, crandall2012layer, panton} but still rely on simple features. In this paper, we apply deep networks to the problem of ice boundary reconstruction in polar radar data. Deep networks have become the \textit{de facto} standard technique across a wide range of vision tasks, including pixel labeling problems. The majority of these successes have been on consumer-style images, where there is substantial tolerance for incorrect predictions. In contrast, for problems involving scientific datasets like ice layer finding, there is typically only one ``correct'' answer, and it is important that the algorithm's output be as accurate as possible. Here we propose a technique for combining 3D convolutions and Recurrent Neural Networks (RNNs) to perform segmentation in 3D, borrowing techniques usually used for video analysis to instead characterize sequences of tomographic slice images. In particular, since small pixel value changes only affect a few adjacent images, we apply 3D convolutional neural networks to efficiently capture cross-slice features. We extract these spatial and temporal features for small neighborhoods of slices, and then apply an RNN for detailed structure labeling across the entire 2D image. Finally, layers from multiple images are concatenated to generate a 3D surface estimate. We test our model on extracting 3D ice subsurfaces from sequences of radar tomographic images, and achieve the state-of-the-art results in both accuracy and speed. \section{Technical Approach} Three-dimensional imaging typically involves sending electromagnetic radiation (e.g., radar, X-ray, etc.) into a material and collecting a sequence of cross-sectional tomographic slices $I = \{I_1, I_2, \cdots, I_D\}$ that characterize returned signals along the path. Each slice $I_d$ is a 2D tomographic image of size $H \times W$ pixels. In the particular case of ice segmentation, we are interested in locating $K$ \textit{layer surface boundaries} between different materials. Our output surfaces are highly structured, since there should be exactly $K$ surface pixels within any column of a given tomographic image. We thus need to estimate the layer boundaries in each individual slice, while incorporating evidence from all slices jointly in order to overcome noise and resolve ambiguities. Layer boundaries within each slice can then be concatenated across slices to produce a 3D surface. In this section, we describe the two important components of our network framework: our multi-task 3D Convolutional (C3D) Network that captures within-slice features as well as evidence from nearby slices, and our Recurrent Neural Network (RNN) which incorporates longer-range cross-slice constraints. The overall architecture is shown in Figure~\ref{fig:overall}. \begin{figure*} \begin{center} \includegraphics[width=17.5cm]{figures/c3d.jpg} \end{center} \vspace{-10pt} \caption{Illustration of our C3D architecture in a special case of two layers ($K = 2$). All 3D convolution kernels are $3 \times 5 \times 3$ with stride $1$ in each dimension and the 3D pooling kernels are $1 \times 2 \times 1$ with stride $2$ in the height dimension of each image. } \label{fig:c3d} \end{figure*} \subsection{A Multi-task C3D Architecture} Traditional convolutional networks for tasks like object classification and recognition lack the ability to model spatiotemporal features in 3D space. More importantly, their use of max or average pooling operations makes it impractical to preserve temporal information within the sequential inputs. To address these problems, we use C3D networks to capture local spatiotemporal features in our sequence of input images. C3D has typically been used for video, but our dataset has very similar characteristics: we have a sequence of tomographic slices taken in consecutive (discrete) positions along the path of a penetrating wave source (a moving airplane, in the case of our ice application). Physical constraints on layer boundaries (e.g., that they should be continuous and generally smooth) mean that integrating information across adjacent images improves accuracy, especially when data within any give slice is particularly noisy or weak. Figure~\ref{fig:c3d} illustrates details of our C3D architecture, which is based on Tran et al.~\cite{tran2015learning} but with several important modifications. Since the features of these structured layers in tomographic images are typically less complicated than consumer photos, we use a simpler network architecture, as follows. For the input, our model takes $L$ consecutive images, where $L$ is a small odd number; we have tried $L = 1, 3, 5, \cdots, 11$, and choose $5$ as the best empirical balance between running time and accuracy. Then, we use two shared convolutional layers, each of which is followed by rectifier (ReLU) units and max pooling operations, to extract low-level features for all layers. The key idea is that different kinds of layer boundaries usually share similar detailed patterns, although they have different high-level features, e.g., shapes. Inspired by the template model used in Crandall et al.~\cite{crandall2012layer} and Xu et al.~\cite{icesurface2017icip}, our model uses rectangular convolutional filters with a size of $3\times5\times3$, since the important features lie along the vertical dimension. Afterwards, the framework is divided into $K$ branches, each with 6 convolutional layers for modeling features specific to each type of ice layer boundary. The filter size is the same as with the shared layers. Two fully-connected layers are appended to the network for each ice layer, where the $k$-th ice layer has $W$ outputs $S^k_d = \{s^k_{d,1}, s^k_{d,2}, \cdots, s^k_{d,W}\}$, each corresponding to a column of the tomographic slice $I_d$, representing the row coordinate of the $k$-th ice layer boundary within that column. All training images have been labeled with ground truth vectors, $G^k_d = \{g^k_{d,1}, g^k_{d,2}, \cdots, g^k_{d,W}\}$ to indicate the correct position of these output layers in each image. \begin{figure} \begin{center} \includegraphics[width=8.5cm]{figures/gru.jpg} \end{center} \vspace{-12pt} \caption{ Visualization of the $k$-th GRU at iteration $w$. } \label{fig:gru} \end{figure} We train the C3D network using the L2 Euclidean loss $L_{elu}$ to encourage the model to predict correct labelings according to human-labeled ground truth, \begin{equation} L_{elu} = \frac{1}{2} \sum_{k=1}^K \sum_{w=1}^W (s^k_{d,w} - g^k_{d,w})^2. \end{equation} We note that this formulation differs from most semantic and instance segmentation work which typically uses Softmax and Cross-entropy as the target function. This is because we are not assigning each pixel to a categorical label (e.g., cat, dog, etc.), but instead assigning each column of the image with a row index. Since these labels are ordinal and continuous, it makes sense to directly compare them and minimize a Euclidean loss. \begin{figure*} \begin{center} \begin{tabular}{@{}p{12pt}@{}l} \rotatebox{90}{\textbf{\hspace{35pt}Ours \hspace{50pt} Human-labeled}} & \includegraphics[width=17cm]{figures/sample_slices.jpg}\\ \end{tabular} \end{center} \vspace{-10pt} \caption{ Visualization of sample tomographic images with height $H$ and width $W$. The first row shows the ice-air (red) and ice-bed (green) layers labeled by human annotator, while the second row shows the predicted layers by our model. In general, our predictions not only capture the precise location of each ice layer, but are also smoother than human labels. } \label{fig:slices} \end{figure*} \subsection{A Multi-task RNN Architecture} \label{sec:rnn} The C3D networks discussed above model features both in the temporal and spatial dimensions, but only in very small neighborhoods. For example, they can model the fact that adjacent pixels within the same layer should have similar grayscale value, but not that the layer boundaries themselves (which are usually separated by dozens of pixels at least) are often roughly parallel to one another. Similarly, C3D models some cross-slice constraints but only in a few slices in either direction. We thus also include an RNN that incorporates longer-range cross-slice evidence. Because of the limited training data, we use Gated Recurrent Units (GRUs)~\cite{chung2015gated} since they have fewer learnable parameters than other popular networks like Long Short-Term Memories (LSTMs)~\cite{hochreiter1997long}. \xhdr{GRU Training and Testing.} The multi-task GRU framework is shown in Figure~\ref{fig:overall}. Our model for each individual slice consists of $K$ GRU cells, each responsible for predicting the $k$-th layer in each image. Each GRU cell takes a tomographic slice $I_d$ and the output of the previous GRU layer as inputs, and produces $W$ real value numbers indicating the predicted positions of the layer within each column of the image. Each GRU also takes as input the output from the GRU corresponding to the same ice layer in the \textit{previous} slice, since these layer boundaries should be continuous and roughly smooth. In previous work~\cite{crandall2012layer, lee2014estimating, icesurface2017icip}, this prior knowledge was explicitly enforced by pairwise interaction potentials, which were manually tuned by human experts. Here we train RNNs to be able to model more general relationships in a fully learnable way. We split each tomographic input image $I_{d}$ into separate column vectors $I_{d,w}$, $w = 1, 2, \cdots, W$, each with width $1$ and height $H$. Each column vector is projected to the length of the GRU hidden state with a fully-connected layer. During training time, the $k$-th GRU cell is operated for $W$ iterations, where each iteration $w$ predicts the $k$-th layer position in image column $I_{d,w}$. Then in a given iteration $w$, the $k$-th GRU takes the fused features (e.g., using sum or max fusion) of the (resized) image column $I_{d,w}$ and the hidden state $h^{k-1}_{d,w}$ as the input. It also receives the hidden states $h^{k}_{d, w-1}$ of itself in iteration $w-1$ as contextual information. More formally, the $k$-th GRU cell outputs a sequence of hidden states $h^{k}_{d,1}, h^{k}_{d,2}, \cdots, h^{k}_{d,W}$ with iteration $w = 1, 2, \cdots, W$, and each hidden state $h^{k}_{d,w}$ is followed by a fully-connected layer to predict the actual layer position $s^{k}_{d,w}$ as shown in Figure~\ref{fig:gru}. Since each GRU has the same operation for each 2D image $I_d$, we drop $d$ subscript for simplicity, and compute, \begin{equation*} \begin{split} &z_w = \textrm{sigmoid} (U_{iz} \mathcal{F}(I_{w},h^{k-1}_{w}) + U_{hz} h_{w-1} + b_{z}), \\ &r_w = \textrm{sigmoid} (U_{iz} \mathcal{F}(I_{w},h^{k-1}_{w}) + U_{hz} h_{w-1} + b_{r}), \\ &n_w = \textrm{tanh} (U_{in} \mathcal{F}(I_{w},h^{k-1}_{w}) + U_{hn} (r_{w} \circ h_{w-1}) + b_{n}), \\ &h_w = z_{w} \circ h_{w-1} + (1 - z_{w}) \circ n_{w}, \, \textrm{and} \\ &s_w = U_{y} h_{w} + b_{y}, \end{split} \end{equation*} where $\circ$ is the Hadamard product, $z_{w}$, $r_{w}$, $n_{w}$, $h_{w}$, and $s_{w}$ are the reset, input, new gate, hidden state, and output layer position at time $w$, respectively. We use 512 neurons in the hidden layer of the GRU. We train the GRU network with the same L2 Euclidean loss $L_{elu}$ as discussed in the previous section. \begin{figure*}[] \centerline{\includegraphics[width=17.5cm]{figures/air.jpg}} \vspace{-8pt} \caption{ Results of the extracted ice-air surfaces based on about 330 tomographic images. The x-axis corresponds to distance along the flight path, the y axis is the width of the tomographic images ($W$), and the color is the height dimension (max height is $H$), which also represents the depth from the radar.} \label{fig:ice_air} \end{figure*} \subsection{Combination} We combine our proposed C3D model and GRU model for efficiently encoding spatiotemporal information into explicit structured layer predictions. We use the C3D features $\textrm{C3D}^{k}_{\theta}(I_{d,k})$ (where $\textrm{C3D}^{k}_{\theta}$ denotes the features with model parameters $\theta$ for the $k$-th ice layer) to initialize the $k$-th GRU's hidden state $h_{1}$, as shown in Figure~\ref{fig:overall}. In the figure, $I_d$ is marked in red; this is the frame currently under consideration, which is divided into columns which are then provided to the GRU cells one at a time. \section{Related Work} A number of methods have been developed for detecting layers or surfaces of material boundaries from sequential noisy radar images. For example, in echograms from Mars, Freeman et al.~\cite{freeman2010automated} find layer boundaries by applying band-pass filters and thresholds to find linear subsurface structures, while Ferro and Bruzzone \cite{ferro2011novel} identify subterranean features using iterative region-growing. Crandall et al.~\cite{crandall2012layer} detect the ice-air and ice-bed layers in individual radar echograms by combining a pre-trained template model and a smoothness prior in a probabilistic graphical model. In order to achieve more accurate and efficient results, Lee et al.~\cite{lee2014estimating} utilize Gibbs sampling from a joint distribution over all candidate layers, while Carrer and Bruzzone~\cite{carrer2017automatic} reduce the computational complexity with a divide-and-conquer strategy. Xu et al.~\cite{icesurface2017icip} extend the work to the 3D domain to reconstruct 3D subsurfaces using a Markov Random Field (MRF). In contrast, we are not aware of any work that has studied this application using deep neural networks. In the case of segmenting single radar echograms, perhaps the closest analogue is segmentation in consumer images~\cite{tseng2017joint}. Most of this work differs from the segmentation problem we consider here, however, because our data is much noisier, our ``objects'' are much harder to characterize (e.g., two layers of ice look virtually identical except for some subtle changes in texture or intensity), our labeling problem has greater structure, and our tolerance for errors in the output is lower. \begin{figure*} \begin{center} \includegraphics[width=17.5cm]{figures/overall.jpg} \end{center} \vspace{-10pt} \caption{Architecture of our model for predicting multiple ice layers in tomographic images. We extract and reconstruct structured 3D surfaces from sequential data by combining C3D and RNN networks. A C3D network serves as a robust feature extractor to capture both local within-slice and between-slice features in 3D space, and an RNN serves to capture longer-range structure both within individual images and across the entire sequence.} \label{fig:overall} \end{figure*} For segmenting 3D regions, perhaps the closest related work is in deep networks for video analysis, where the frames of video can be viewed as similar to our tomographic slices. Papers that apply deep networks to video applications focus on efficient ways to combine spatial and temporal information, and can be roughly categorized into three classes: (1) combining both RGB frames for spatial features and optical flow images for temporal features in two-stream networks~\cite{simonyan2014very}, (2) explicitly learning 3D spatiotemporal filters on image spaces through techniques such as C3D~\cite{tran2015learning}, and (3) various combinations of both \cite{carreira2017quo}. In order to obtain video representations from per-frame or per-video-segment features, it is a common practice to apply temporal pooling to abstract into fixed-length per-video features~\cite{karpathy2014large,simonyan2014very}. These approaches achieve significantly better classification accuracy on video classification compared to traditional approaches using hand-crafted features. Recurrent Neural Networks (RNNs) and the specific version we consider here -- Gated Recurrent Units (GRUs) -- have been proposed for learning sequential data, such as natural language sentences~\cite{elman1990finding, graves2013generating}, programming language syntax~\cite{karpathy2015visualizing}, and video frames~\cite{yue2015beyond}. A popular application of RNNs recently~\cite{vinyals2014show, karpathy2014deep} is to generate image captions in combination with CNNs. In this case, CNNs are used to recognize image content while RNNs are used as language models to generate new sentences. Video can also be thought of as sequential data, since adjacent frames share similar content while differences reveal motion and other changes over time. A large variety of studies~\cite{yue2015beyond,donahue2015long, piergiovanni2017learning} share the common idea of applying RNNs on deep features for each video frame and pooling or summing over them to create a video descriptor. Other successful applications of RNNs to interesting vision and natural language tasks include recognizing multiple objects by making guided glimpses in different parts of images~\cite{ba2014multiple}, answering visual questions~\cite{andreas2016learning,weston2015towards,kumar2016ask}, generating new images with variations~\cite{gregor2015draw,yu2017seqgan}, reading lips~\cite{chung2016lip}, etc. We build on this existing work but apply to the novel domain of extracting and reconstructing structured 3D surfaces from sequential data by combining C3D and RNN networks. In particular, we use the C3D network as a robust feature extractor to capture local-scale within-slice and between-slice features in 3D space, and use the RNN to capture longer-range structure both within single slices and across the entire image sequence.
\section{Introduction} \label{sec:obssys:introduction} Galaxies have evolved in size, shape, kinematic properties, and star formation rate (SFR) over the past few billion years \citep{Bell:2004foa,Faber:2007btb,Brown:2007ca}, and galaxy mergers may have played a significant role in this evolution \citep{Toomre:1972jia,Narayanan:2008hc,Lotz:2011bua,RodriguezGomez:2016im}. In most galaxy mergers, the gravitational tidal force between interacting galaxies and the orbital energy that is converted into internal energy of the remnant can redistribute stars, gas, and dark matter particles in the phase space, leading to the transformation of the shape and kinematic properties of galaxies over time \citep{Toomre:1977un}. Moreover, interaction affects the star formation rate (SFR) both in the core and in the outskirts of gas rich galaxies \citep{Barnes:1996bna,Sanders:1996cd,Mihos:1996boa,deGrijs:2003jr,Cox:2008jj}. In case of certain encounter geometries, gas clouds of two or more interacting galaxies directly collide, and due to ram pressure and tidal stripping and shock-heating, the fraction, temperature, and density of the gas in the remnant are affected \citep{Cox:2004hp,Soto:2012hm,Vollmer:2012gr}. Studying properties of gas in interacting galaxies allows us to evaluate the comparative significance of each process in the overall evolution of galaxies. A case study can be the evolution of the sources of nebular emission as a merger proceeds, particularly the evolution of the fraction of shock-heated gas. Merger induced shocks in nearby tidally interacting galaxies are not only observed, but also predicted by hydrodynamical simulations of binary galaxy mergers (e.g. see \citealt{MonrealIbero:2010ko,Rich:2011is,Belfiore:2016dv} for observations and \citealt{Cox:2004hp} for simulations). As we get closer to coalescence, we expect significant shock heating to take place as a result of the mixing and collision of random gas orbits as well as the return of gas removed previously through tidal striping \citep{Cox2004GeneratingMergers}. Though, shocks have also been observed in early stage mergers \citep{Soto:2012hm}. In the earlier stages, shocks may be produced through different modes. In one mode, each of the interacting discs experiences a strong tidal force during the first passage. The maximum of this tidal force on each galaxy depends on their separation at pericenter, as well as the mass of the companion(s). Tidal force results in a gas flow toward the center of each disc \citep{Mihos1994TriggeringMergers,Barnes:1996bna}. The inflowing gas may collide with the gas at lower radii at a high enough velocity to induce shocks. The inflowing gas may also reach the core and trigger (or enhance) starburst or Active Galactic Nucleus (AGN) generating strong outflows \citep{Ellison:2011fp,Scudder2012GalaxyKpc}. These outflows produce shocks as they blow into the interstellar medium (ISM). In this mode, more shocks are expected if the tidal force is stronger, so we anticipate to find higher shock emission when either the companion is more massive or the pericentric separation is smaller. In a different mode, collision of galaxies with certain geometries can result in a fast direct encounter of gaseous clouds of the ISM in the two discs, creating widespread shocks \citep{Vollmer:2012gr,Medling:2015eh}. For both of these modes, The chain of events would begin after the first passage, but the timeline would depend on the mode. In the first mode, a merger-driven central starburst or AGN would produce shocks a few hundreds of Myrs after the first passage \citep{Ellison:2011fp,Scudder2012GalaxyKpc}. In the second mode, in which shock are due to the collision of gas clouds in head-on encounters (e.g. in UGC 12914/5), shock production would be immediate. Observing a sample of interacting galaxies and inspecting the relationship between encounter parameters and shock fraction would put new observational constraints on these speculations. For example, \cite{Rich:2015kf} used galaxy-wide H$\alpha$\ emission in a sample of 17 (U)LIRGS to show the relation of shock fraction and merger stage. They binned galaxies (mergers) into four groups based on their separation: isolated galaxies, wide pairs with separation between 10-100 kpc, close pairs with separation$<$10 kpc, and coalesced mergers. Removing unambiguous AGN hosts from their sample, they found that going along the sequence from isolated galaxies to coalesced mergers, an increasing fraction of H$\alpha$\ is emitted from shock-heated sources, which must be a result of increasing turbulence as merger proceeds. However, the projected separation of interacting galaxies does not necessarily represent the merger stage. An interacting pair of galaxies just after the first passage are as close to each other as a pair near coalescence. Also, two galaxies at large separation appear to be a close pair from certain viewing angles. In order to properly constrain the merger stage, and other possible encounter parameters affecting shocks, we need a dynamical model of the merger system. Dynamical modeling constrains merger stage and other encounter parameters (e.g. pericentric distance, eccentricity, etc.) utilizing simulations that best reproduce tidal tails and bridges. Simulations that are used for this purpose are usually collisionless N-body simulations, because incorporating gas physics extensively increases the computational demand \citep{Barnes:2009fh,Holincheck:2016fy}. We often need to measure and model the line of sight velocity of tidal features, in addition to their apparent shape, to ensure the uniqueness of the model \citep{Barnes:2011kb}. As a kinematic tracer, H$\alpha$\ emission is relatively easy to measure for star-forming galaxies even in low surface brightness regions. Galaxy mergers often induce star formation both in the center and in the tidal tails \citep{Jog:1992ct,Hattori:2004ic,Whitmore:1995fh,deGrijs:2003jr,Scudder2012GalaxyKpc}. If we can separate H$\alpha$\ emission originating at star-forming regions from shocked gas, H$\alpha$\ observations may be used not only to measure the velocity of baryons in tidal features but also to detect shocks and their distribution throughout a merger. \cite{Mortazavi2018HMice} proposed a method for separating shocks from star-forming regions, which only uses the kinematics and ratio of [N II]\ and H$\alpha$\ emission lines, for their data did not include [OIII] and H$\beta$ lines. By separating star-forming regions from shocks, they found an excellent match between the velocity of star-forming H$\alpha$\ and cold HI gas in the Mice galaxy merger. They used the automated dynamical modeling method developed in \cite{Mortazavi:2016hv} to model the Mice using both H$\alpha$\ and HI kinematics, finding consistent results. Also, they showed that the properties of shocked H$\alpha$\ emission obtained from their method is consistent with the data from CALIFA galaxy survey, which includes [OIII] and H$\beta$ lines \citep{Wild:2014do,SanchezMenguiano:2016uw}. Galaxy-wide nebular emission in a sample of tidally interacting galaxies can be used to improve our understanding of the physical processes during the merger. In order to find the encounter parameters of galaxy mergers, the easiest kinematic tracer is the H$\alpha$\ emission line. Additionally, the H$\alpha$\ and [N II]\ emission lines contain valuable information about the source of ionization, especially shocks. We can measure what fraction of H$\alpha$\ flux is emitted from shock-ionized gas, and where the shocks are spatially located. We may use the reconstructed encounter parameters and the measured shocks to investigate how shocks evolve with different merger parameters. Statistical approach would help us to isolate the effect of each parameter on shocks production mechanisms. In this work, we present H$\alpha$\ observations of a modest sample of 22 galaxy mergers using the SparsePak Integral Field Unit (IFU; \citealt{Bershady:2004gp}) on the WYIN telescope at Kitt Peak National Observatory (KPNO). Observations of 21 systems are new to this work, while the data for the Mice galaxy merger was presented before in \cite{Mortazavi2018HMice}. We present the analysis of emission lines and shock detection for all of the observed systems and a new dynamical model for one of them. We examine correlation between encounter parameters and shocks. In \S \ref{sec:obssys:obs} we describe the observational setup, the instrument, and the target selection. In \S \ref{sec:obssys:analysis} we present the analysis of emission lines including fitting multiple kinematic components and an MCMC code to measure the error of the fit parameters. In \S \ref{sec:obssys:ionization} we discuss how to separate emission originating at shocked gas from that arising out of star-forming regions, and we inspect the relationship between H$\alpha$\ shock fraction and encounter parameters. In \S \ref{sec:obssys:model} we present our attempts to model the dynamics of equal mass mergers in our sample, and in \S \ref{sec:obssys:fshockvsparams} we inspect the correlations between shock fraction and some of the encounter parameters. In \S \ref{sec:obssys:discussion} we discuss our results and implications about how merger encounter parameters affect merger-induced shocks. We present some notes on a couple of observed systems in the Appendix. \section{Observations} \label{sec:obssys:obs} We observed 22 galaxy merger systems using the SparsePak IFU on the WIYN telescope at KPNO. The observations took place from March 2008 to May 2013 in five observing runs consisting of a total of 14 nights, with the dome being closed three full nights and parts of some other nights due to weather conditions. Our primary goal was to measure the kinematics of H$\alpha$\ and [N II]\ emission lines, so we kept observing in non-photometric conditions, and occasionally thin clouds were covering our targets during the observation. Resultingly, we did not attempt to flux calibrate our data. \subsection{The Instrument} \label{sec:obssys:obs:inst} The WIYN SparsePak IFU consists of a grid of 82 sparsely packed fibers each 4.687'' in diameter, covering a Field of View (FoV) of 72''$\times$71.3''. Seven sky fibers are placed at $\approx 25''$ distance from the science grid on the north and east sides \citep{Bershady:2004gp}. The bench spectrograph and 860 lines/mm grating blazed at 30.9$^{\circ}$ in order 2 was used, obtaining a dispersion of 0.69 \AA/pixel (FWHM) in the wavelength range of 6050-7000\AA. (R$ \sim $4500, and velocity resolution $\sim $30 km/s near the H$\alpha$\ line) Our spectral coverage is less than current and ongoing galaxy surveys such as CALIFA \citep{Sanchez:2012ku}, MaNGA \citep{Bundy:2015ft} and SAMI \citep{Croom:2012fo}. Our spectral resolution, however, is higher than CALIFA and MaNGA. In red band, CALIFA, and MaNGA surveys have spectral resolution, R, of 850 and 2000, respectively. Higher spectral resolution enables us to resolve multiple emission line components, usually appearing in the central regions of galaxies where multiple gaseous components overlap. SparsePak is especially suitable for the purpose of finding velocity maps for dynamical modeling of galaxy mergers, as it has a sparsely packed grid that covers a relatively large FoV. Modeling the dynamics of interacting galaxies does not require a uniform velocity coverage on the system. Rather, velocity information that reveals the direction of rotation near the center and the large scale velocity gradient across the tidal tails and bridges is enough for dynamical modeling. Previous dynamical models of interacting galaxy pairs have used HI velocity maps with lower spatial resolution than is available with SparsePak \citep{Hibbard:1995iz,Privon:2013fs}. In this work, in order to observe each part of the targets, we mostly pointed SparsePak only once with no dithering.\footnote{In some of the coalesced systems we dithered in order to find a better coverage and better handle on the spatial distribution of outflows.} The slightly denser grid in the center of the SparsePak footprint helps to better constrain the rotation near the cores of the galaxies. SparsePak, however, is not ideal for inspecting shocks in galaxies. For studying shocks, full coverage is more desirable as we may miss regions with extensive shocks between the sparsely placed fibers. In addition, by pointing the denser center of SparsePak toward the center of galaxies, in most systems, we introduce a bias in the galaxy-wide shock fraction toward the value near the center. \subsection{Target Selection} \label{sec:obssys:obs:tgtsel} Primarily, we selected binary systems of interacting galaxies with strong tidal features. In addition, our sample includes three coalesced systems with strong tidal features, suggesting that they have also experienced a recent major merger. Tidal features are one of the best indicators of a recent merger event of rotation-supported disc galaxies. These features would not have survived if the interacting galaxies were dispersion-supported. Besides, these features can be reproduced by test particle simulations \citep{Toomre:1972jia,Dubinski:1999jg}, and their shape and velocity is sensitive to the encounter parameters, so they are utilized for reconstructing encounter parameters \citep{Barnes:2009fh,Barnes:2011kb,Mortazavi:2016hv,Holincheck:2016fy}. However, requiring strong tidal features introduces a selection bias to our galaxy merger sample. A prograde merger, for which the initial angular momentum of the discs are aligned with the orbital angular momentum, makes stronger tidal effects compared to a retrograde (polar) merger ,where discs are initially anti-aligned with (perpendicular to) the orbital angular momentum. As a result, the prograde mergers are more likely to appear in our sample. All but one of the observed systems were in the footprint of Sloan Digital Sky Survey (SDSS \citealt{York:2000gn})\footnote{Arp 273, also known as the Rose Galaxies, is not in SDSS footprint. However, the Hubble space telescope (HST) image taken in 2010 resolves individual HII regions in both galaxies.}. We required both galaxies in each system to have SDSS spectroscopic data near the center showing H$\alpha$\ emission. We also required the rest of the galaxies to have blue color, so they were likely to host star-forming regions. This introduces another selection bias in our sample toward star-forming galaxies. \begin{figure*} \begin{center} \includegraphics[width=1.0\textwidth]{collage.pdf} \caption[A collage of systems observed and analyzed with SparsePak]{ A collage of systems observed with SparsePak. SparsePak pointings used are displayed on each image with x marks showing the fiber positions. Images are scaled to fit the tiles. They are obtained from r-band SDSS, except for Arp 273 which is from the Digitized Sky Survey (DSS).} \label{fig:obssys:collage} \end{center} \end{figure*} We used three different catalogs to find the merger systems that match our requirements. Our targets are chosen from the catalog of isolated pairs of galaxies in the northern hemisphere \citep{1985BICDS..29...87K}, the Arp atlas of peculiar galaxies \citep{1966ApJS...14....1A}, and the \textit{Galaxy Zoo} morphological classification catalog \citep{Lintott:2010gb}. In the \textit{Galaxy Zoo} catalog, we visually inspected galaxies with merger probability $>$0.5 and selected proper candidates. Targets are selected to have a field of view (FoV) similar to that of SparsePak science grid (72''$\times$71.3''). Most of the observed systems and their tidal tails fit in two SparsePak pointings, one for each galaxy. Some smaller systems fit in one pointing, and some larger ones require three or four pointings. All of the systems analyzed in this work are shown in Figure \ref{fig:obssys:collage} along with the SparsePak grid pointings. Table \ref{tab:obssys:date} shows the sky position of the targets, observation date, redshift, number of SparsePak pointings, and exposure time on each pointing. \begin{table*} \centering \begin{tabular}{l|llllll} system & RA & DEC & observation & redshift & \# of & exposure \\ name & & & date & & pointings & time (mins) \\ \hline UGC 12914 & 0.4171 & 23.4898 & Oct 2012 & 0.0146 & 3 & 65, 30, 125 \\ Arp 256 & 4.7104 & -10.3693 & Oct 2012 & 0.0272 & 2 & 40, 65 \\ VV 433 & 9.8322 & 13.1064 & Oct 2012 & 0.0353 & 2 & 60, 105 \\ UGC 480 & 11.6472 & 36.3286 & Oct 2012 & 0.0374 & 2 & 97, 90 \\ UGC 1063 & 22.2881 & 11.1360 & Oct 2012 & 0.0193 & 2 & 65, 65 \\ Arp 273 & 35.3778 & 39.3660 & Oct 2012 & 0.0251 & 3 & 37, 50, 32 \\ NGC 1207 & 47.0034 & 38.3769 & Oct 2012 & 0.0160 & 2 & 50, 25 \\ NGC 2623 & 129.6001 & 25.7545 & Mar 2008 & 0.0185 & 3 & 185, 86, 90 \\ Arp 283 & 139.3624 & 41.9970 & Oct 2012 & 0.0060 & 3 & 55, 65, 95 \\ Arp 181 & 157.1193 & 79.8182 & May 2013 & 0.0326 & 1 & 30, 82 \\ NGC 3509 & 166.0981 & 4.8286 & Mar 2008 & 0.0257 & 1 & 110 \\ Arp 87 & 175.1850 & 22.4379 & May 2013 & 0.0237 & 2 & 25, 58 \\ NGC 3921 & 177.7786 & 55.0788 & Mar 2008 & 0.0197 & 3 & 120, 120, 120 \\ UGC 07593 & 187.0612 & 44.4532 & Apr 2012 & 0.0230 & 1 & 95 \\ NGC 4676 & 191.5443 & 30.7271 & Mar 2008 & 0.0220 & 4 & 150, 120, 120, 120 \\ Arp 238 & 198.8870 & 62.1269 & May 2013 & 0.0308 & 2 & 25, 35 \\ NGC 5257/8 & 204.9805 & 0.8354 & Apr 2012 & 0.0227 & 2 & 85, 90 \\ NGC 5278/9 & 205.4237 & 55.6722 & Apr 2012 & 0.0252 & 2 & 65, 65 \\ Arp 84 & 209.6492 & 37.4391 & May 2013 & 0.0116 & 4 & 105, 30, 35, 30 \\ UGC 11695 & 318.0418 & -1.4857 & Oct 2012 & 0.0323 & 2 & 65, 125 \\ UGC 12589 & 351.2615 & 0.0096 & Oct 2012 & 0.0338 & 2 & 45, 125 \\ Arp 284 & 354.0750 & 2.1557 & Oct 2012 & 0.0093 & 4 & 39, 35, 55, 121 \\ \end{tabular} \caption[list of observed systems and their characteristics] {List of observed systems sorted by the date of observation. Redshifts are measured in this work. The number of pointings indicates how many times we had to move the SparsePak IFU to cover both galaxies and their tidal tails. Exposure time is provided for each pointing in the time order. At first, we planned to reach continuum S/N$\approx$5 based on SDSS r-band image, but as part of the observing nights were lost due to weather conditions, in favor of observing more systems, we reduced the exposure times when strong emission lines were seen in the first few exposures.} \label{tab:obssys:date} \end{table*} \subsection{Observation Setup} \label{sec:obssys:obs:setup} In order to determine the exposure time required at each pointing, we estimated the continuum flux density near the H$\alpha$\ ($\lambda 6563$ \AA) line using the SDSS r-band images. The surface brightness in the faint tidal features of our systems ranged from 8.4$\times10^{-19}$ to 3.8$\times10^{-18}$ erg s$^{-1}\text{cm}^{-2}\text{\AA}^{-1}\text{arcsec}^{-2}$. We planned to have exposure time required to achieve S/N$\approx$5 in the continuum in fibers placed on the tails. However, we lost part of our observing time due to bad weather conditions, so in order to observe more systems, we reduced the exposure time when we could see strong H$\alpha$\ lines in outskirt fibers in the first couple of exposures. Table \ref{tab:obssys:date} shows the number of pointings and the exposure time applied on each pointing. For accurate wavelength calibration, CuAr and ThAr calibration lamps were used either before or after the science exposures on most pointings. We made three or more science exposures at each pointing to correct for the night sky lines and the cosmic rays. We took dome and twilight flats and zero exposures at the beginning/end of the night. Sky spectra was obtained simultaneously with either the seven SparsePak sky fibers or science fibers placed on blank sky. If the outskirts of the galaxies were far so that they covered the sky fibers, we oriented the IFU to put some of the science fibers on blank sky. \section{Emission Line Analysis} \label{sec:obssys:analysis} We did not make any attempt to fit the stellar model to the continuum because the tidal tails are usually too faint. The goal of theses observations were to obtain the kinematics of H$\alpha$\ and [N II]\ emission lines throughout the systems, including the faint tidal tails. Thus, we only fit emission line models to the H$\alpha$[$\lambda6563$]-[N II][$\lambda6583$, $\lambda6548$] triplet. The absence of stellar model affects the H$\alpha$\ line flux measurements because we do not take the underlying H$\alpha$\ absorption into account. Our measurement of H$\alpha$\ flux is underestimated, so our [N II]/H$\alpha$\ is overestimated. We will discuss the effect of this in \S \ref{sec:obssys:analysis:absorption}. The relatively high spectral resolution of our data allows us to explore fitting more than one emission line component. This step is essential for separating the shocks using the velocity dispersion of emission lines. Sometimes, two gaseous components with different line of sight velocities lay on the same fiber, and their emission line profiles blend. One-component fit may measure a velocity that is offset from the velocity of both components. It may also measure a velocity dispersion that is broader than the velocity dispersion of individual blending components. In the following sections we describe the method we used for fitting one and two velocity components and estimating the errors of the fit parameters. We also address the issue of the underlying H$\alpha$\ absorption. \subsection{One-Component Fit} \label{sec:obssys:analysis:one} We first fit a triple Gaussian (three Gaussian functions with the same free velocity and velocity dispersion, $\sigma$, and free normalization factor, H$\alpha$\ flux and [N II]\ fluxes, with centers separated by the wavelength difference between [N II]$\lambda$6549, H$\alpha$$\lambda$6563, and [N II]$\lambda$6585) and a straight line with a free slope representing the background. We use the theoretical value of 2.95 for [N II]$\lambda6583.46$/[N II]$\lambda6548.05$ ratio \citep{Acker:1989vj}. Along with the slope and the offset of the background we fit a total of 6 parameters. The fit range is from 6518\AA\ to 6608\AA\ in the target rest frame. For velocity dispersion measurement, we subtract the intrinsic FWHM of our SparsePak observations (1.5 \AA) from the fit FWHM of the lines in quadrature. We use a Markov Chain Monte-Carlo (MCMC) method to estimate the uncertainty of the fit parameters. The initial MCMC step is determined with the least square minimization. We use the \textsc{emcee} \textsc{python} package, varying the the 6-dimensional parameter with the following prior constraints. \begin{equation} \begin{split} 1.5 \leq \text{slope} \geq -1.5 \\ \text{H}\alpha\text{ flux} \geq 0 \\ \text{[N II]}\lambda6583.46\text{ flux} \geq 0 \\ 600\text{ km/s}\geq\text{velocity}\geq-600\text{ km/s} \\ 14 \text{\AA} \geq \text{FWHM}\geq 1 \text{\AA} \label{eq:obssys:prior} \end{split} \end{equation} The velocity here is with respect to the reported redshift for each system. The log of the likelihood function is \begin{equation} \ln{p(y_i|x_i,\sigma_i,\text{model})}=\sum \left[\frac{(\text{model}(x_i)-y_i)^2}{\sigma_i^2}+\log{\frac{1}{2\pi\sigma_i^2}}\right]\text{,} \label{eq:obssys:likelihood} \end{equation} where $y_i$ and $x_i$ are the spectrum data points, and $\sigma_i$ is the error of the flux density measurement. After we reach the equilibrium distribution, we use the 16 and 84 percentile values of a 2000-step MCMC sample for the low and high error limits. \subsection{Two-Component Fit} \label{sec:obssys:analysis:two} Visual inspection of our one-component fits makes it clear that in some of the fibers the emission lines have a more complicated profile than a simple Gaussian. Sometimes the three emission lines in the H$\alpha$-[N II]\ triplet show a consistent deviation from a single Gaussian profile, indicating that the emitting gas projected into the fiber has more than one kinematic components. Figure \ref{fig:obssys:onecomp} shows an example of a fiber for which one-component triple Gaussian cannot well-describe the shape of the emission line triplet. \begin{figure} \centering \subfloat[]{\label{fig:obssys:onecomp}\includegraphics[width=0.45\textwidth]{0020HaNII1comp.pdf}}\\ \subfloat[]{\label{fig:obssys:twocomp}\includegraphics[width=0.45\textwidth]{0020HaNII2comp.pdf}} \caption[Comparison of single and double component fits to an emission line]{Comparison of single and double component fits to an emission line. (a) One triple-Gaussian and a background line fit to the spectrum of a fiber in the system UGC 12914. (b) Two triple-Gaussians and a background line fit to the same fiber. The parameters of the triple-Gaussian function and their MCMC-derived uncertainties are shown in the text box(es) in the upper left (and upper right) corner(s). It is clear that the one-component fit can not capture all the information available in the emission line profile.} \label{fig:obssys:one_twocomp} \end{figure} In order to model two-component emission lines, we fit two triple-Gaussian functions and a background line to the H$\alpha$-[N II]\ triplet. This is, basically, an extra triple-Gaussian added to the one-component model. Again, we perform MCMC to estimate the error of the fit parameters. We only attempt to fit the second component when we find H$\alpha$\ flux S/N$>$3 in the one-component fit. The same prior constraints of Equation \ref{eq:obssys:prior} are used for both components. However, we add the following constraints to make sure that the two components have either different redshift or different FWHM. Without these constraints, two components with the same kinematic properties can share the flux arbitrary between each other, reproducing a fit that is similar to a single component fit and providing no new information about the line profile. In order to prevent MCMC walkers from wasting time in these answers, we exclude them in the prior: \begin{equation} \begin{split} &\text{H}\alpha\text{ flux}_1 \geq \text{H}\alpha\text{ flux}_2 \\ &\text{ and} \\ &\text{velocity}_1\geq\text{velocity}_2+45\text{ km/s} \\ &\text{or } \text{velocity}_1\leq\text{velocity}_2-45\text{ km/s} \\ &\text{or}\\ &\text{FWHM}_1\geq\text{FWHM}_2+1.5 \text{\AA} \\ &\text{or } \text{FWHM}_1\leq\text{FWHM}_2-1.5 \text{\AA} \\ \end{split} \label{eq:obssys:prior2} \end{equation} The likelihood function is the same as Equation \ref{eq:obssys:likelihood}. Fitting two components involves 10 parameters, so more MCMC time steps are required to achieve an equilibrium distribution. Similar to the one-component fit, after reaching equilibrium, we used the 16 and 84 percentile values of a 2000-step MCMC sample for the low and high error limits. We use an F-test \citep{Lomax:AMzxl9ax} to determine whether a two-component model is preferred over the one-component one. In general, increasing the number of parameters improves the $\chi^2$ statistics because with more parameters the model can reproduce more subtle features in data, even if they are statistically insignificant. The F-test utilizes both the increase in the number of free parameters and the improvement in the $\chi^2$ to determine which model is preferable. As an example, for the fit in Figure \ref{fig:obssys:one_twocomp} the F-test prefers the two-component fit, because the second component significantly improves the $\chi^2$. We perform the F-test only when the H$\alpha$\ flux of the second component has a S/N larger than 3, otherwise the one-component fit is preferred without performing the F-test. \subsection{Underlying H$\alpha$\ absorption} \label{sec:obssys:analysis:absorption} By taking a straight line as the background, we are ignoring the underlaying stellar H$\alpha$\ absorption. Therefore, our measurement of H$\alpha$\ flux is higher than the actual value, and our [N II]/H$\alpha$\ is a higher limit. In \cite{Mortazavi2018HMice} we discussed this effect for the SparsePak spectra of the Mice galaxies (NGC 4676). For the Mice galaxies CALIFA data with a stellar continuum model is available \citep{SanchezMenguiano:2016uw}. Using CALIFA line ratios, we showed that the underlying H$\alpha$\ absorption only decrease the log$_{10}$(\nii/\ha)\ by less than 0.2 dex (See Figure 5a of \citealt{Mortazavi2018HMice}). We showed that even with this overestimation we find shocks in the same regions of the Mice system as they were found in the CALIFA data \citep{Wild:2014do}. As it will be discussed in \S \ref{sec:obssys:ionization:shocks}, we use log$_{10}$(\nii/\ha)\ for shock detection, so we want to minimize the effect of the underlying H$\alpha$\ absorption on our measurement of log$_{10}$(\nii/\ha). In order to do so, for the purpose of our shock analysis, we remove fibers with H$\alpha$\ EW$<7$ \AA\footnote{We keep these fibers for velocity measurements as the underlying absorption does not significantly affect the velocity of the emission lines.}. Assuming that the typical underlaying H$\alpha$\ absorption EW is $\sim$ 2 \AA, for fibers with measured H$\alpha$\ emission line EW $>7$ \AA, the log$_{10}$(\nii/\ha)\ is only overestimated by less $<$ 0.15 dex. This is within the typical error of log$_{10}$(\nii/\ha)\ in faint components. As a result, by removing fibers with H$\alpha$\ EW $<7$ \AA, we put an approximate higher limit of 0.15 dex on the overestimation of log$_{10}$(\nii/\ha), which is less than the maximum overestimation of log$_{10}$(\nii/\ha)\ in the Mice system. Removing the fibers with low H$\alpha$\ EW takes out a significant number of detected components with S/N $>3$ ($\approx 30\%$); however, most of the H$\alpha$\ flux in these galaxies come from the luminous fibers with high H$\alpha$\ EW, so the flux in the removed fibers are not significant, and they do not much affect the measurements of shocked H$\alpha$\ fraction. In order to demonstrate this, in Figure \ref{fig:obssys:EWhist} we show the both unweighted and H$\alpha$\ flux weighted histograms of H$\alpha$\ EW for all of the 22 observed systems. In this Figure, the cut of EW=7\AA\ is shown with the vertical red dashed line. Even though a significant fraction of unweighted histogram (blue) is to the left of the EW cut, the weighted histogram (green) clearly displays that most of the flux belongs to the fibers with EW$>$7\AA. Note that our data is not flux calibrated, so for weighting this histogram we took the total H$\alpha$\ flux in electron counts and weighted them by the exposure time. We realize that this is not a proper flux calibration method because of CCD variations and non-photometric observing conditions. We only use method for qualitative estimates similar to Figure \ref{fig:obssys:EWhist}. \begin{figure} \begin{center} \includegraphics[width=0.45\textwidth]{HaEWhistall.pdf} \caption[Histogram of H$\alpha$\ EW from one-component fits]{Histogram of H$\alpha$\ EW from one-component fits. Blue and green lines show the unweighted and H$\alpha$\ flux weighted histograms, respectively. The dashed red vertical line displays the EW limit of 7\AA. This plot demonstrates that even though a large number of fibers have low H$\alpha$\ EW, most of the H$\alpha$\ flux is coming from high-H$\alpha$-EW fibers, which are not much affected by the underlying H$\alpha$\ absorption.} \label{fig:obssys:EWhist} \end{center} \end{figure} \section{Source of Ionization} \label{sec:obssys:ionization} H$\alpha$\ is emitted from ionized hydrogen gas, and ionization can be the result of various processes. The most common source of ionization is star formation. In star-forming regions gas is photo-ionized by the UV light from young O and B stars with energies $>$ 13.6 eV. The photons from these stars are typically not energetic enough to ionize metals (e.g. N and O). Moreover, If the star formation is not happening in a turbulent region of the ISM, the velocity dispersion of this photo-ionized gas is only a few tens of kilometers per second. The H$\alpha$\ emission from star-forming regions provide a proper kinematic tracers for dynamical modeling of disc galaxy mergers. The process of photo-ionization does not affect the kinematics of the gas significantly. If the gas was moving with the bulk of the old stars before photo-ionization, we can safely assume that it would continue to do so after photo-ionization. Consequently, the star-forming H$\alpha$\ velocity would provide the velocity of the bulk of the baryons. In rare situations, when the gas was already displaced from the bulk of old stars before forming new stars, the star-forming H$\alpha$\ velocity would not match the velocity of stars. We find evidence for this phenomenon in UGC 12914 (See Figure \ref{fig:appendix:ugc12914maps}) . Other forms of photo-ionization such as post-Asymptotic Giant Branch (post-AGB) stars and AGNs also ionize metals along with the neutral hydrogen. The diffuse radiation of post-AGB stars can be responsible for low-ionization emission lines like [N II]$\lambda6583$, [S II]$\lambda6717,6731$, and [O I]$\lambda 6300$ \citep{Belfiore:2016dv}. The hard UV and/or X-ray radiation from AGN with energies of up to a few keVs may also produce high-ionization emission lines, such as [O III]$\lambda5003$. Ionization can also be the result of conversion of kinetic energy into heat rather than photo-ionization. The kinetic energy originating from the colliding gas flows produce shocks. Shocks are disturbances that move faster that the speed of sound in the ambient medium. Shock fronts dissipate the kinetic energy and convert it into heat. The shock-heated gas cools via radiation which is itself a powerful source of ionizing photons. Photons from the post-shocked gas may travel upstream and photo-ionize the pre-shock material known as the precursor. The emission from the shock and the precursor results in high emission line ratios, particularly among the low-ionization species, such as [N II]. Brightness of the radiative shocks and its precursor scales with the rate of dissipation of kinetic energy; resultingly, one expects to see higher velocity dispersion in the emission lines from brighter shocks \citep{Dopita:1995km}. Unlike photo-ionized regions around young stars, shocked gas is not a good kinematic tracer for dynamical modeling of the gravitational features like tidal tails. Processes like high speed stellar wind, supernova (SN) feedback, and AGN-driven outflows, produce shock-heated ionized gas with velocities that can significantly differ from the stars and rest of baryons in their vicinity. The H$\alpha$\ velocity of shocks is not suitable for modeling the dynamics of tidal tails, especially with collisionless N-body simulations, in which gravity is the only player in the formation of tidal tails. Hence, we need to separate shocks from the photo-ionized gas near young stars. In this section, we describe our method for doing so. We investigate the how the fraction of shock-ionized gas evolve with merger stage. We also explore the correlation of shock fraction with merger mass ratio and the mass of the companion. \subsection{Separating Shocked and Star-Forming Regions} \label{sec:obssys:ionization:shocks} The diagrams first proposed by \citealt{Baldwin1981ClassificationObjects}, known as Baldwin, Phillips \& Terlevich (BPT) diagram, are used to separate nuclear star formation from AGNs/Seyferts and low-ionization nuclear emission line regions (LINERs, \citealt{Kauffmann:2003dg,Kewley:2006ib}). In some galaxies, the emission line ratios are consistent with a combination of ionization by star formation and AGN, so they are called the composite galaxies. Integral Field Spectroscopy (IFS) has made it possible to investigate emission line ratios not only in the center but also throughout the galaxies. IFS observations have shown that high low-ionization line ratios such as [N II]/H$\alpha$\ may be found in extra-nuclear regions. Using the data from MaNGA IFU survey \citep{Bundy:2015ft}, \cite{Belfiore:2016dv} argued that most of the extra-nuclear LINER-like emission is due to ionization by post-AGB stars in old stellar populations. Post-AGB ionized gas typically has low H$\alpha$\ EW ($<$3\AA). In this work, however, we disregard all components with emission lines $<$7\AA\ in order to alleviate the issue of the underlying H$\alpha$\ absorption (see \S \ref{sec:obssys:analysis:absorption}), so it is less likely to find post-AGB ionized gas in our systems. Besides, \cite{Belfiore:2016dv} showed that high [N II]/H$\alpha$\ is also indicative of shocks, and in order to distinguish them from other sources of ionization we need to look at the velocity dispersion of emission lines. It has been shown that given high enough velocity resolution, the velocity dispersion of emission lines is also indicative of the source of ionization, particularly of shocks. \cite{MonrealIbero:2006fi} showed that in a shock-heated gas, the velocity dispersion of emission lines is correlated with low-ionization line ratios particularly with [O I]/H$\alpha$\ and [N II]/H$\alpha$. \cite{MonrealIbero:2010ko} and \cite{Rich:2011is} confirmed these results, arguing that velocity dispersion can be used as an independent indicator of shocks. \cite{Rich:2011is} showed that the flux weighted histogram of velocity dispersion of emission lines in their high spectral resolution IFU data of LIRGs reveal a bi-modality. It displays a peak at low velocity dispersion of a few kilometers per second corresponding to photo-ionization by stars, and a bump at velocity dispersions higher that 100 km/s. \cite{Rich:2014ib} showed that composite emission in the extra-nuclear regions of galaxies may originate from the combination of shocks and star formation rather than AGN and star formation. Based on these observations, \cite{Rich:2015kf} proposed a limit of $\sigma<90$ km/s for velocity dispersion of emission from star-forming regions. They suggested that components with $\sigma>90$ km/s are emitted from low velocity shocks. As described in \S \ref{sec:obssys:obs} our observations were carried out in the wavelength range 6050-7000\AA\ and did not include H$\beta$ and [O III] emission lines, so we can not use the BPT diagnostic diagrams to separate the emission lines. On the other hand, our SparsePak observations have a relatively high velocity resolution of $\sim$ 30 km s$^{-1}$, making it possible to use the width of emission lines to separate star formation and shocks. In the top plot of Figure \ref{fig:obssys:allniihasigwithhist} we show the H$\alpha$\ flux weighted histogram of velocity dispersion for all 956 high-S/N ($>$3) components in high EW fibers ($>$7\AA) in all of the observed systems. Most of the H$\alpha$\ flux from our sample is emitted at velocity dispersions below 90 km/s, which has two peaks that may correspond to normal and turbulent star formation. There is also a small bump in the H$\alpha$\ flux around the velocity dispersion of $\sim 160$ km/s. \begin{figure} \begin{center} \includegraphics[width=0.45\textwidth]{all_sigma_vs_nII_Ha_withhist_EW7.pdf} \caption[Plot of log$_{10}$(\nii/\ha)\ vs. velocity dispersion along with the flux-weighted histogram of velocity dispersion for all components in all systems.] {Plot of log$_{10}$(\nii/\ha)\ vs. velocity dispersion for all 956 components in all galaxies in our sample. These are the components with S/N$>$3 in fibers with H$\alpha$\ EW $>7$\AA. The concentration of points around 30 km/s is probably due to velocity resolution of our observations. Red lines are taken from \cite{Mortazavi2018HMice} and show how we determine the source of ionization. The blue dashed vertical (horizontal) line shows the limit of $\sigma=90$ km/s (log$_{10}$(\nii/\ha)=-0.2). In this work, we take Group 1 as star-forming regions, and Groups 2 and 3 as shocks. The panel on top shows the H$\alpha$\ flux weighted histogram of all components. Similar to some systems in \cite{Rich:2011is} and \cite{Rich:2015kf} we find a significant bumps in the H$\alpha$\ flux at high velocity dispersion ($\sim$ 160 km/s).} \label{fig:obssys:allniihasigwithhist} \end{center} \end{figure} Combining the available information of [N II]/H$\alpha$\ and width of emission line, we use plots of log$_{10}$(\nii/\ha)\ vs. velocity dispersion to separate the shocked regions from the star-forming ones. Based on the curve suggested by \cite{Kewley:2006ib} for separating star-forming galaxies from composites, spectra with log$_{10}$(\nii/\ha)$<$-0.2 are more likely to be star-forming, and spectra with log$_{10}$(\nii/\ha)$>$-0.2 are more likely to be composite or AGN. \cite{Rich:2014ib} argued that extra-nuclear composite-like spectra may be due to shocks. On the other hand, for velocity dispersion, \cite{Rich:2015kf} proposed a limit of 90 km/s to separate star formation and shocks. Like the limit of line-ratio, this limit is not rigid. On the low end, components are more likely to be star-forming, and on the high end the opposite is true. In \cite{Mortazavi2018HMice}, we used the plot of log$_{10}$(\nii/\ha)\ vs. velocity dispersion for separating emission lines observed in the Mice galaxies. We divided the emission line components visually into three groups. The lines separating these groups are plotted in the lower panel of Figures \ref{fig:obssys:allniihasigwithhist}, as well as Figures \ref{fig:obssys:sep_sig_NHa} and \ref{fig:obssys:lratio_sig_NHa}. Group 1 has low [N II]/H$\alpha$\ and low velocity dispersion. Both criteria indicate that Group 1 components are likely to be emitted from the star-forming regions. In \cite{Mortazavi2018HMice}, we used these components to produce the H$\alpha$\ velocity map that was in excellent agreement with HI velocity map of the Mice galaxies. Also, using the [O III] and H$\beta$ lines obtained from the CALIFA data of the Mice \citep{Sanchez2016CALIFASurvey} we showed that these components are indeed in the star-forming regions of the BPT diagram \citep{Kewley:2006ib}. Group 2 components have both higher [N II]/H$\alpha$\ and velocity dispersion, suggesting that shocks are their likely source of ionization. Again, In \cite{Mortazavi2018HMice}, we used CALIFA data to show that the components of this group are more likely to be in the composite and AGN regions of [N II] BPT diagram. Group 3 components have high velocity dispersion, but relatively lower [N II]/H$\alpha$. In \cite{Mortazavi2018HMice}, we took them as overlapping unresolved components of Groups 1 and 2. In this work, however, we consider Group 3 components as shocks along with Group 2. In most of the maps of [N II]/H$\alpha$\ in Figure \ref{fig:obssys:niihacollage}, we find Group 3 components in extra-nuclear regions, where it is less likely that they originate from multiple unresolved velocity components. Moreover, by visually inspecting the emission lines, we confirm that most of them are indeed single high velocity dispersion components originated at shocks. We take Group 1 as star-forming regions and Groups 2 and 3 as shocked gas. Selection of star-forming regions is fairly conservative, but for shocks one should keep in mind that high low-ionization line ratio or broad emission line can be the result of other ionizing processes such as hard AGN UV/X-ray emission and post-AGB stars \citep{Belfiore:2016dv}. In \S \ref{sec:obssys:ionization:niihamaps} we will discuss how shocks are established as the source of ionization using the [N II]/H$\alpha$\ maps of Group 2 and 3 components. Table \ref{tab:obssys:results} shows some of the quantities measured for the observed systems. The light ratios are mostly obtained from the K-band magnitudes of 2MASS survey \citep{Skrutskie:2006hl}. The projected separation between the cores of the two galaxies is measured using the redshift distance and the angular separation. In this table, we also present the minimum H$\alpha$\ EW among fibers with H$\alpha$\ S/N$>$3. We use an EW low cut of 7 \AA\ in all systems as discussed in \S \ref{sec:obssys:analysis:absorption}. In addition, we present H$\alpha$\ shock fraction ,$\text{f}_\text{shocked}$. For each system, this value is obtained by dividing the sum of the H$\alpha$\ flux of Groups 2 and 3 by the total H$\alpha$\ flux of all fibers. This measurement of $\text{f}_\text{shocked}$ is an approximate estimate as the dividing lines between the groups are not rigid. Moreover, our spatial coverage is not complete, and we may have missed regions with effectively high or low shock fraction laying in between the sparsely positioned fibers. Furthermore, SparsePak has a denser grid in the center which is usually placed on the cores of the galaxies, so our measurement of H$\alpha$\ shock fraction is biased toward its value near the cores of galaxies, though most of the H$\alpha$\ flux is usually coming from the core anyway. We estimate the uncertainty of $\text{f}_\text{shocked}$ ($\sigma\ {\text{f}}_{\text{shocked}}$) by bootstrap sampling of data points in the log$_{10}$(\nii/\ha)-velocity dispersion space, based on the measured uncertainty of log$_{10}$(\nii/\ha)\ and velocity dispersion. For each sample, we add up the H$\alpha$\ flux of Groups 2 and 3 and divide by the total H$\alpha$\ flux. The standard deviation of the H$\alpha$\ shock fraction in 100 samplings is reported as $\sigma\ {\text{f}}_{\text{shocked}}$ . \begin{table*} \begin{tabular}{l|lllllll} system name & light ratio & separation (kpc) & minimum H$\alpha$\ EW(\AA) & $\text{f}_\text{shocked}$ & $\sigma\ \text{f}_\text{shocked}$ \\ \hline NGC 1207 & 8.34 & 113.7 & 1.0 & 0.034 & 0.059 \\ UGC 480 & 2.70 & 63.9 & 1.4 & 0.213 & 0.030 \\ UGC 11695 & 8.00 & 51.5 & 4.6 & 0.239 & 0.028 \\ UGC 12589 & 3.64 & 51.4 & 2.0 & 0.239 & 0.018 \\ VV 433 & 3.12 & 50.5 & 4.1 & 0.126 & 0.058 \\ Arp 181 & 1.98 & 49.2 & 1.4 & 0.004 & 0.005 \\ Arp 273 & 2.84 & 41.7 & 0.6 & 0.304 & 0.079 \\ NGC 5257/8 & 1.17 & 37.4 & 1.5 & 0.151 & 0.023 \\ Arp 256 & 1.90 & 31.3 & 5.6 & 0.134 & 0.024 \\ Arp 87 & 1.27 & 30.8 & 1.6 & 0.412 & 0.014 \\ Arp 84 & 5.00 & 28.9 & 0.4 & 0.101 & 0.005 \\ UGC 1063 & 9.44 & 26.7 & 6.3 & 0.002 & 0.003 \\ \hline Arp 238 & 1.51 & 22.4 & 7.0 & 0.722 & 0.073 \\ Arp 284 & 8.81 & 22.4 & 1.0 & 0.392 & 0.008 \\ UGC 12914 & 1.61 & 20.2 & 1.8 & 0.378 & 0.036 \\ NGC 5278/9 & 3.19 & 19.7 & 1.5 & 0.250 & 0.031 \\ NGC 4676 & 1.25$^*$ & 16.1 & 1.0 & 0.257 & 0.024 \\ Arp 283 & 8.43 & 11.5 & 0.7 & 0.232 & 0.059 \\ UGC 07593 & 1.81$^{**}$ & 5.6 & 0.8 & 0.401 & 0.001 \\ \hline NGC 3509 & - & 0.0 & 3.4 & 0.012 & 0.012 \\ NGC 2623 & - & 0.0 & 0.3 & 0.895 & 0.050 \\ NGC 3921 & - & 0.0 & 1.0 & 0.702 & 0.064 \\ \end{tabular} \caption[List of some of the measured quantities for each system.] {List of some of the measured quantities for each system. This is sorted based on the projected separation of the the centers of each pair. Horizontal lines indicate where we divide the sample into bins of wide pairs, close pairs, and coalesced systems. The projected separations are measured using the angular separation and the redshift distance. For each system, the minimum H$\alpha$\ EW in fibers with S/N $>3$ is presented. The highest value of the minimum EW is 7.0\AA\ (Arp 283). In order to measure a consistent shock fraction among all systems and to minimize the effect of the underlying H$\alpha$\ absorption, we remove fibers with EW $<7$\AA\ from our shock analysis. Shocked H$\alpha$\ fraction and error are shown in the last two columns. For most systems the light ratio is obtained from the 2MASS Ks-band magnitudes. $^*$ For NGC4676, no measurements were found in the 2MASS catalogue. Instead we used the stellar mass ratio from \cite{Wild:2014do}. $^{**}$ The UGC 07593 pair is not resolved in 2MASS, so the SDSS r-band photometry is used in this table.} \label{tab:obssys:results} \end{table*} \subsection{Velocity Maps} \label{sec:obssys:ionization:velocity} Figure \ref{fig:obssys:velcollage} shows maps of the velocity of star-forming components in all of the observed systems. Velocity of H$\alpha$\ emission is not much affected by the underlying absorption, so we plot these velocity maps for all components with with S/N$>3$ without the H$\alpha$\ EW cut. In 13 out of 19 separate pairs we find smooth rotation in both galaxies confirming that these components move with the bulk of the baryon in their vicinity and can be used to trace velocity of material governed by gravity. Four systems only show rotation in one galaxy. The secondary companion in UGC 480, Arp 273, and Arp 181 do not display many star-forming regions. In Arp 283 the primary galaxy shows no H$\alpha$\ emission in the outskirts, and has a disturbed velocity field in the center. NGC 5278/9 shows a disturbed rotation, and UGC 12914 displays a messy velocity field in a bridge of star-forming regions between the two galaxies, consistent with HI and CO observations. We will discuss some interesting features observed in two of the observed systems in the Appendix. \begin{figure*}[htbp] \begin{center} \includegraphics[width=1.0\textwidth]{collage_vel.pdf} \caption[Collage of velocity maps of the observed systems]{Collage of velocity maps of Group 1 (star-forming) components in the observed systems. The scales of velocity gradients are shown next to each panel. Most of the galaxies display smooth rotation new the core, confirming that Group 1 components are originate at HII regions that are moving along with the bulk of the nearby baryons and are proper kinematics tracers for dynamical modeling with N-body simulations.} \label{fig:obssys:velcollage} \end{center} \end{figure*} In some of the velocity fields one can see a void in the center of the galaxy. This can be due to high velocity dispersion, or [N II]/H$\alpha$\ of components near the center that has classified them in Groups 2 or 3. Also low H$\alpha$\ EW in the center of some of the galaxies indicate an old or post-starburst stellar population. Among the three coalesced systems, we only see smooth rotation in NGC 3509. This system has a tiny H$\alpha$\ shock fraction. In contrast, the other coalesced systems, NGC 2623 and NGC 3921, display very high shock fraction, few star-forming components, and no clear rotation. \subsection{Indications for Galaxy-Wide Shocks from [N II]/H$\alpha$\ Maps} \label{sec:obssys:ionization:niihamaps} IFS observations of systems with unambiguous AGN usually display a gradient of emission line ratios from center to edge. Hard ionizing radiation from AGN affects the gas in its vicinity more than the gas that is kpcs away in the disc or above it. In the presence of an AGN in the center one expects to find higher [N II]/H$\alpha$\ near the center than in the outskirts \citep{Davies:2014co,Leslie:2014dj}. In case of shocks, on the other hand, depending on the shock producing mechanism the regions of high velocity dispersion and [N II]/H$\alpha$\ are not necessarily near the center, but can be anywhere in the galaxy. Resultingly, if we see no gradient of [N II]/H$\alpha$\ toward the center, we can argue that the source of ionization is likely to be shocks. Nevertheless, even if we find a gradient of [N II]/H$\alpha$\ toward the center, it is not inevitably due to hard ionizing radiation from an AGN. If the source of shocks are the superwinds or outflows from a central processes such as starbursts or AGNs, they can also produce a gradients in the observed [N II]/H$\alpha$. The mere existence of a gradient in [N II]/H$\alpha$\ is not an indication of an AGN. \begin{figure*}[htbp] \begin{center} \includegraphics[width=1.0\textwidth]{collage_g23NII_Ha.pdf} \caption[Collage of [N II]/H$\alpha$\ maps of the observed systems]{Collage of [N II]/H$\alpha$ maps of Group 2 and 3 components (likely to be emitted from shock-heated gas) in all of the the observed systems. Group 2 components are shown with circles and group 3 components are shown with squares. The spatial distribution of [N II]/H$\alpha$\ in most of the systems suggest that these components are produced by shocks.} \label{fig:obssys:niihacollage} \end{center} \end{figure*} Based on the arguments above, we look for indications of shocks in [N II]/H$\alpha$\ maps. None of these systems are unambiguous AGNs according to the literature.\footnote{Some galaxies like NGC 2623 are AGN candidates, but for all of them the controversy stays.} Figure \ref{fig:obssys:niihacollage} shows a collage of [N II]/H$\alpha$\ maps of Group 2 and 3 components. For these maps we have implemented the H$\alpha$\ EW limit to reduce the effect of the underlying H$\alpha$\ absorption. This removed about 30\% of the components, most of them with high [N II]/H$\alpha$, but they contained less that 5\% of the total H$\alpha$\ flux (Figure \ref{fig:obssys:EWhist}). In the maps of the remaining components in Figure \ref{fig:obssys:niihacollage}, we find that four systems display no Group 2 and 3 components. In 12 out of the remaining 18 systems, indications from the spatial distribution of Group 2 and 3 components and the gradient of [N II]/H$\alpha$\ suggest that these components are most likely emitted from shocked gas. For example, in UGC 12914 (shocked gas fraction, $f_{\text{shocked}}$ = 37\%) these components all lie in the bridge between the galaxies, and are more likely to be the result of collision of gas clouds during the head-on encounter between the two discs. In Arp 284, UGC 480, and NGC 3921 we see a cone-like structure toward the center, though the gradient of [N II]/H$\alpha$\ does not suggest a central hard ionizing source. In the remaining six systems (UGC 07593, UGC 12589, Arp 273, VV 433, Arp 84, and NGC 2623), we only find one or two Group 2 and 3 components near the center. While AGN is a candidate for the source of ionization, it could be the result of shocks from central gas inflows and outflows, therefore the source is ambiguous in these systems. \subsection{Shocked Gas and Merger Sequence} \label{sec:obssys:ionization:sequence} Figure \ref{fig:obssys:fshockseparaion_nobin} shows the plot of H$\alpha$\ shock fraction versus projected separation between galaxies in each pair. Assuming that the separation is an indication of merger stage, close pairs are at a later stage, closer to coalescence. One may recognize the general trend of increasing shock fraction with decreasing projected separation. Similar to \cite{Rich:2015kf} we bin our systems into close pairs, wide pairs, and coalesced mergers. The close (wide) pairs are non-coalesced systems with projected separations less (more) than 25 kpc. We select the 25 kpc limit to have significant statistics in both bins. Figure \ref{fig:obssys:fshockseparaion_binned} shows the trend in these bins. In the bins of close and wide pairs, we also separate systems based on their stellar mass ratio (K-bank light ratio). We can see that not only are the close pairs more shocked than the wide pairs, but also more equal mass mergers reveal a higher fraction of shocks altogether. Similar to \cite{Rich:2015kf} we find the highest shock fraction in the coalesced systems. \begin{figure} \centering \subfloat[]{\label{fig:obssys:fshockseparaion_nobin}\includegraphics[width=0.45\textwidth]{shocked_frac_separation.pdf}}\\ \subfloat[]{\label{fig:obssys:fshockseparaion_binned}\includegraphics[width=0.45\textwidth]{fshock_separationbinned7.pdf}} \caption[plot of shock fraction vs. projected separation: binned and un-binned]{(a)Plot of shock fraction vs. projected separation between the two galaxies color coded with difference between the velocities in the core. One can see an anti-correlation. Close pairs display more shock fraction and wide pairs show less. two of the coalesced systems show shock fraction higher than $>$ 80\% and one has a shock fraction of $<$ 10 \%. Vertical dashed lines show the separation used for binning in (b). Close pairs are the ones with separation $<$25 kpc. The rest are considered as wide pair. The anti-correlation is clear and significant across all mass ratios. Also note that more equal mass merger tend to have higher shock fraction. Next to each point we have written the number of systems in that bin. } \label{fig:obssys:fshockseparaion} \end{figure} This trend is consistent with the flux-weighted histograms of velocity dispersions presented in Figure \ref{fig:obssys:allsigmahistseparation}. The coalesced systems show the highest bump at high velocity dispersion, and the close pairs emit more high velocity dispersion H$\alpha$\ flux compared to the wide pairs. \begin{figure*} \begin{center} \subfloat[]{\label{fig:obssys:allsigmahistseparation}\includegraphics[width=0.45\textwidth]{all_sigmahist_separationEW7.pdf}} \subfloat[]{\label{fig:obssys:allsighistdisc}\includegraphics[width=0.45\textwidth]{all_sigmahist_dflagEW7.pdf}} \caption[Histogram of velocity dispersion for all components in all systems] {(a)H$\alpha$\ flux weighted histogram of velocity dispersion for 956 components in all galaxies in our sample separated into coalesced and non-coalesced systems. The non-coalesced systems are also separated into close and wide pairs. Only components with H$\alpha$\ S/N$>$3 in fibers with H$\alpha$\ EW $>7$\AA are considered. The limit of 90 km/s is shown by the blue dashed vertical line. The bi-modality is evident in coalesced systems as well as in close pairs. Coalesced systems show a bigger bump at high velocity dispersion compared to close pairs. (b) The same histogram as (a) with the non-coalesced systems separated into the primary (more massive) and secondary (less massive) companions. Similar to (a) the primary companions display more flux at high velocity dispersion compared to the secondary ones, but not as much as the coalesced systems.} \label{fig:obssys:allsighist} \end{center} \end{figure*} Another way to see this phenomenon is to look at the plot of log$_{10}$(\nii/\ha)\ vs. velocity dispersion, separating components from the close and wide pairs as in Figure \ref{fig:obssys:sep_sig_NHa}. We see a significant increase in the fraction of components in the regions of Groups 2 and 3 in the close pairs compared to the wide pairs, a signature of enhanced shock ionization, which confirms the results of Figure \ref{fig:obssys:fshockseparaion_binned}. However, this plot provides extra information; we see that compared to the wide pairs in the close pairs not only is the percentage of components in Groups 2 and 3 higher, but also the components in Group 1 generally reveal a higher log$_{10}$(\nii/\ha)\ and velocity dispersion, indicating that the environment of the ionized gas in the close pairs is more turbulent even in star-forming regions. Different light ratio bins are also separated in Figure\ref{fig:obssys:sep_sig_NHa} with red, orange, and yellow points referring to equal-mass, non-equal-mass major, and minor mergers, respectively. One can see that particularly in the close pairs more equal mass components (red points) occupy a slightly higher region compared to the other two light ratio bins. This will be discussed in \S \ref{sec:obssys:ionization:massratio} \begin{figure*} \centering \includegraphics[width=0.70\textwidth]{separation_sigma_vs_nII_Ha_EW7.pdf} \caption[Plot of [N II]/H$\alpha$\ vs. velocity dispersion for different separations.] {Plot of [N II]/H$\alpha$\ vs. velocity dispersion for all components in wide pairs (right) close pairs (left). The number of galaxies in each bin is shown on the lower left corner of each panel. We see that in the close pairs, especially in more equal mass mergers ($\mu_L<1.85$; red points) there is a higher fraction of components in Groups 2 and 3 confirming the results of Figure \ref{fig:obssys:fshockseparaion_binned}. Even in the Group 1 section which corresponds to star-forming regions one can see that components generally have higher log$_{10}$(\nii/\ha)\ and velocity dispersion in the close pairs, indicating that the environment of star formation is also more turbulent. For the close and wide pairs, components of systems with different mass ratio bins are plotted with different colors. In close pairs more equal mass merger components have a significantly higher [N II]/H$\alpha$. We will discuss this in \S \ref{sec:obssys:ionization:massratio}.} \label{fig:obssys:sep_sig_NHa} \end{figure*} We should keep in mind that a small projected separation does not necessarily imply a late stage merger. There are other factors than can affect the projected separation. One is the geometry of observation, for we may find a pair of widely separated galaxies that appear to be close to each other because of the geometry of our line of sight. In addition, two interacting galaxies just after the first passage look as close to each other as a pair that is about to coalesce. Moreover, distance between two interacting galaxies at the pericenter of their orbit, $\text{R}_\text{peri}$, affects how much separated they appear to an observer. For better constraints on the actual merger stage we need to model the dynamics of the merger. We will discuss this in \S \ref{sec:obssys:discussion}. \subsection{Shocked Gas and Merger Mass Ratio} \label{sec:obssys:ionization:massratio} One of the benefits of having a sample of early stage mergers before coalescence is that we can explore how properties of the companion affect the other galaxy. We can find out about the properties of isolated galaxies from their cores which, supposedly, have not lost much of its stellar mass, morphology, and kinematics after the first passage. One of the properties that is relatively easy to measure for non-coalesced mergers is mass ratio. The mass ratio of a galaxy merger can be estimated from the stellar mass ratio, assuming that the halo mass grows with stellar mass. This assumption is not accurate all the time \citep{Behroozi:2013fg}, but for the sake of simplicity we hold on to it throughout this paper. We use the Ks-band magnitude from 2MASS survey to estimate stellar mass ratio between the galaxies of each pair, so in this paper, we use the terms light ratio and mass ratio interchangeably. Figure \ref{fig:obssys:fshocklratio_nobin} displays the plot of shock fraction vs. light ratio, $\mu_L$, in the non-coalesced pairs of our sample. Similar to projected separation, we separate galaxies into 3 bins of light ratio shown by vertical dashed lines: $\mu_L<1.85$ representing the equal mass mergers, $1.85<\mu_L<4$ representing major galaxy merger of non-equal mass, and $4<\mu_L$ representing minor galaxy mergers. The dividing values are chosen to have a significant number of galaxies in each bin. Figure \ref{fig:obssys:fshocklratio_binned} shows the average shock fraction in each bin. Average shock fraction in both galaxies as well as in the primary and the secondary galaxies are shown separately. It is slightly but significantly enhanced in more equal mass mergers; though, we should be cautious about this interpretation as in such low statistics either removing one or two systems or slightly changing the limits of the bins could affect the results. Furthermore, in Figure \ref{fig:obssys:fshocklratio_binned} the error-bars are too large to provide a robust Conclusion about the difference of shock fraction in the primary (more massive) vs. secondary (less massive) companions. Though it appears that in minor mergers the shock fraction in the primary galaxies are significantly higher than the secondary ones. Figure \ref{fig:obssys:lratio_sig_NHa} shows the components in light ratio bins on plots of [N II]/H$\alpha$\ vs. velocity dispersion. Similar to Figure \ref{fig:obssys:sep_sig_NHa}, as we go from right to left not only does the fraction of points in Groups 2 and 3 increase but also the points in Group 1 reveal a slightly higher log$_{10}$(\nii/\ha)\ and velocity dispersion. This suggests that the environment of more equal mass mergers is, on average, more turbulent even in star forming regions. Comparing the panels of Figure \ref{fig:obssys:sep_sig_NHa} we find that this effect is stronger in the close pairs compared to the wide pairs, for in the panel of close pairs, more equal mass mergers (red points) reveal a significantly higher log$_{10}$(\nii/\ha)\ and velocity dispersion. In Figure \ref{fig:obssys:lratio_sig_NHa} black and cyan points display the components of the primary and secondary companions, respectively. In the minor merger (right panel) the black points appear to spread significantly higher than the cyan points even in the Group 1 region, revealing a slightly higher log$_{10}$(\nii/\ha). Consistent with Figure \ref{fig:obssys:fshocklratio_binned}. This suggests that the environment of the primary companions are more violent that the secondary ones in minor mergers. We will discuss these results in \S \ref{sec:obssys:discussion}. \begin{figure} \centering \subfloat[]{\label{fig:obssys:fshocklratio_nobin}\includegraphics[width=0.45\textwidth]{shocked_frac_lratio.pdf}}\\ \subfloat[]{\label{fig:obssys:fshocklratio_binned}\includegraphics[width=0.45\textwidth]{fshock_lratiobinnedEW7.pdf}} \caption[Plot of shock fraction vs. light ratio: binned and unbinned] {(a) Plot of shock fraction vs. light ratio in the non-coalesced systems of our sample. Vertical dashed lines show the light ratio bins used for binning systems in (b). (b) The trend of average shock fraction in light ratio bins. The trend for the primary, secondary, and both galaxies are shown separately. Equal mass mergers have a higher overall ionization fraction compared to the other two bins. However one should be cautious about these results because of low statistics. The difference between shock fraction in the primary and secondary galaxies is not significant in these bins.} \label{fig:obssys:fshock_lratio} \end{figure} \begin{figure*} \centering \includegraphics[width=1.0\textwidth]{lratio_sigma_vs_nII_Ha_EW7.pdf} \caption[Plots of [N II]/H$\alpha$\ vs. velocity dispersion for different mass ratio bins] {Plots log$_{10}$(\nii/\ha)\ vs. velocity dispersion for components in different mass ratio bins: equal mass mergers (left) $\mu_L<1.85$, non-equal major mergers (middle) $1.85<\mu_L<4.0$, and minor majors (right) $\mu_L>4.0$. The number of systems in the bins is written in lower right corner of each panel. As we we go from right to left, one can see that not only is the fraction of points in Groups 2 and 3 increasing, but also the points in Group 1 reveal a generally higher log$_{10}$(\nii/\ha)\ and velocity dispersion. The components of the primary and secondary galaxies are plotted with black and cyan points, respectively. In the minor mergers (right panel), on average, the components of the primary galaxies have a significantly higher log$_{10}$(\nii/\ha)\ compared to the secondary ones. } \label{fig:obssys:lratio_sig_NHa} \end{figure*} \section{Encounter Parameters of Equal Mass Mergers} \label{sec:obssys:model} The morphology of the observed systems provides some insights for their encounter parameters. All of these mergers are the result of interaction between rotation-supported disc-dominated galaxies, for all of them display strong elongated tidal features. These features would not have survived if the interacting galaxies were dispersion-supported. We take all pairs in our sample as being observed after the first passage, because tidal features seen in these systems must have been produced by the tidal impulsive force that the galaxies experienced during a close passage. Tidal forces produce deformations that grow with time. Mass striping by tidal features and dynamical friction remove angular momentum from the orbit, causing it to decay rapidly. The galaxies coalesce in a much shorter time after the second passage, compared to the time between the first and second passages. As a result, we can confidently argue that most of the non-coalesced pairs in our sample are between the first and the second passages. We use the method described in \cite{Mortazavi:2016hv} for measuring the encounter parameter of galaxy mergers. This method uses \textsc{identikit} \citep{Barnes:2009fh,Barnes:2011kb}, which is a software package for modeling the dynamics of interacting pairs of disc galaxies. \textsc{identikit} models of isolated galaxies contain a spherically symmetric distribution of massive collisionless particles that reproduces the potential of dark matter halo, and stellar bulge and disc. In addition, in order to represent the visible morphology and kinematics of the discs, the models include massless test particles initially in circular orbits. As the galaxies interact massless test particles move through the potential made by the massive particles. Test particles have been shown to be successful in producing the large scale tidal features in the disc-disc galaxy merger \citep{Dubinski:1999jg}. Since they are massless, multiple discs in a single galaxy will not affect each other, so we can model different disc orientations in a single simulation run. This facilitates a relatively rapid exploration of encounter parameter space to find the best model that matches the data. \cite{Mortazavi:2016hv} only tested equal mass \textsc{identikit} models, so in this work we only apply this method on the systems in the first light ratio bin in \S \ref{sec:obssys:ionization:massratio} with Ks-band light ratio $\mu_L\leq$ 1.85. We often need to measure and model the line of sight velocity of these tidal features, in addition to their apparent shape, to ensure the uniqueness of the model \citep{Barnes:2011kb}. Collisionless stars are the ideal components to match with collisionless N-body simulations such as \textsc{identikit}. Nevertheless, velocity of stars are hard to measure in the faint tidal tails, as they require high continuum S/N. Another option is cold neutral gas, which is usually more extended in the discs of isolated galaxies and produce stronger tidal features in interactions. However, detecting cold gas through HI 21 cm emission line at high enough resolution requires long exposure times on large interferometers like JVLA, which is also expensive. Nebular emission, on the other hand, is relatively easy to measure for star-forming galaxies even in low surface brightness regions, and galaxy mergers usually enhance star formation in both the center and the tidal features \citep{Jog:1992ct,Hattori:2004ic,Whitmore:1995fh,deGrijs:2003jr}. \cite{Mortazavi2018HMice} obtained consistent results with velocities derived from H$\alpha$\ and HI emission lines for the dynamical modeling of the Mice merger system. However, it is important to separate star-forming regions from shocks before using the H$\alpha$\ derived velocities. Velocity of H$\alpha$\ emission originating in star-forming regions is more suitable for dynamical modeling compared to the velocity of shocks. The baryons in the tidal features of interacting galaxies are mainly affected by the gravitational forces within and between the two galaxies. For dynamical modeling using collisionless N-body simulations, we need to match our model with the velocity of the bulk of the baryons, which are usually the collisionless stars. H$\alpha$, however, traces the ionized gas. Assuming that the original neutral gas had been moving along with the stars before ionization, the ionization process determines weather or not the ionized gas is still at the same velocity as the stars. In normal star-forming regions, the velocity of the ionized gas is not much affected by the ionization process, for UV emission from young and hot stars photo-ionize the surrounding ISM, making the HII regions. So, most of the time, H$\alpha$ emission from star-forming regions should be a proper kinematic tracer for dynamical modeling with N-body simulations. On the other hand, shock-ionization usually changes the velocity of neutral gas significantly. Starbursts and SNe produce winds that heat up the ISM with shocks and produce H$\alpha$\ emission at velocities different from the bulk of the baryons in their vicinity \citep{Sharp:2010jl}. Moreover, colliding gaseous clouds of merging galaxies induce shocks in the ISM \citep{Soto:2012hm}. Galaxy mergers can also trigger or enhance AGNs \citep{Ellison:2011fp}, which produce outflows and spread shocks \citep{Wild:2014do}. Shock excitation results in a motion of the ionized gas that is not exclusively gained by gravitational forces, and we can not model the velocity of shocked gas with simple N-body simulations. Consequently, we only use the velocity of star-forming regions presented in Figure \ref{fig:obssys:velcollage} for dynamical modeling. \textsc{identikit} evaluates the match between model and data by calculating a parameter called ``score''. In order to calculate the score we place phase space boxes on the tidal features of the interacting galaxies. \textsc{identikit} calculates the score for each model based on the number of test particles that populate these boxes. In this work, we use the same algorithm as in \cite{Mortazavi2018HMice} for placing the boxes, and their size are determined by the diameter of the SparsePak fibers ($\approx 5''$). \cite{Mortazavi:2016hv} tested their modeling method against a set of hydrodynamical simulations of isolated galaxy mergers with known encounter parameters \citep{Cox:2008jj}. The test results were classified into three levels of convergence based on the distribution of reconstructed parameters. In some tests the reconstructed encounter parameters had either little or controllable systematics and were reliable (good convergence). However, some other tests resulted in either large or unpredictable systematics, and unreliable reconstructed model parameters were obtained (fair and poor convergences). The quality of convergence was determined by the distribution of the reconstructed initial orientations of the discs. When this distribution is a narrow, it is concluded that a subset of \textsc{identikit} models with close initial orientations have resulted in the best scores. On the other hand, a flat distributions of reconstructed disc orientations suggests that models with different disc orientations have all resulted in good scores, and consequently, the reconstructed encounter parameters are not unique. \cite{Mortazavi:2016hv} found good convergence in most of the tests on discs that were almost in a prograde orbit. In contrast, they found poor and fair convergence when any of the two interacting discs were in a retrograde or polar orbit. \begin{table} \begin{tabular}{l|lll} system name & light & separation & previous models \\ & ratio & (kpc) & \\\hline UGC 07593 & 1.81 & 5.6 & --- \\ NGC 5257/8 & 1.17 & 33.8 & \text{\cite{Privon:2013fs}}\\ UGC 12914 & 1.61 & 14.8 & \text{\cite{Vollmer:2012gr}}\\ Arp 238 & 1.51 & 19.7 & --- \\ Arp 87 & 1.27 & 2.5 & --- \\ \end{tabular} \caption[List of the systems we attempted to model using our method] {List of the systems we attempted to model using our method. The light ratios are obtained from 2MASS Ks band, except for UGC 07593 which is not resolved in the 2MASS Ks survey, and we used SDSS r-band light ratio instead.} \label{tab:obssys:model} \end{table} Table \ref{tab:obssys:model} shows the systems we selected for dynamical modeling. Here we exclude NGC 4676, the Mice, which we modeled and discussed extensively in \cite{Mortazavi2018HMice}. The systems in Table \ref{tab:obssys:model} are the most equal mass systems based on their 2MASS K-band magnitude \citep{Skrutskie:2006hl}, which is used as a crude estimate of stellar mass. We select the galaxies with a light ratio less that 1.85, and make an attempt to model them with equal mass \textsc{identikit} models. For two of these systems we found prior dynamical models in the literature, which are mentioned in Table \ref{tab:obssys:model}. \subsection{Results} \label{sec:obssys:model:results} We found a first ever model for UGC 07593, though the dynamical modeling method we used did not well converge for the other systems. Here we present the encounter parameters we found for UGC 07593 and discuss briefly the possible reasons for the failure of our method for some of the other systems. \begin{figure*} \centering \includegraphics[width=1.0\textwidth]{bestfitcut_all004_008.pdf} \caption[Three slices of the score map for UGC 07593] {Three slices of the score map across pericentric distance, eccentricity, and time for the modeling of UGC 07593. Pericentric distance is in units of the virial radius of the individual galaxy halo, and time is presented as the fraction of time since pericenter over time between the first and second passage. The slices are taken at the best-fit parameter point, shown by the cyan box. the gray scale shows the goodness of the fit from black (the best-fit model) to white (models with scores that are $5\sigma$ or more lower than the score of the best-fit model).} \label{fig:obssys:ugc07593scoremap} \end{figure*} \subsubsection{UGC 07593} \label{sec:obssys:model:results:ugc07593} Figure \ref{fig:obssys:ugc07593scoremap} shows slices of the map of scores across three encounter parameters, eccentricity, pericentric distance, and time since pericenter. The slices are taken at the best-fit parameters shown by the cyan box. This system is in a relatively late stage at $0.68\pm^{0.08}_{0.01}$ of the time between the first and the second passages. The reconstructed pericentric distance and eccentricity are $0.50\pm^{0.16}_{0.16}R_{vir}$ and $0.8\pm^{0.05}_{0.05}$, respectively. Taking the physical length and velocity scaling into account we derive the encounter parameters with physical units (See \citealt{Mortazavi:2016hv}). The reconstructed time since the first passage is $27\pm^{30}_{3}$ Myr. The physical pericentric distance is $2.5\pm^{0.6}_{0.7}$ kpc. Both galaxies are almost half-way between a prograde and a polar orbit with the inclinations being at about $45^\circ\pm 20^\circ$ from the orbital plane. \subsubsection{Unsuccessful Attempts} \label{sec:obssys:model:results:unsuccessful} \textbf{UGC 12914:} The velocity map of this system, shown in Figure \ref{fig:obssys:velcollage}, point in the direction of why our method cannot reconstruct the observed features. Fibers with strong H$\alpha$\ line emission are scattered in the region between the two galaxies, and the velocity of Group 1 components do not show an smooth rotation. The gas in the bridge contains a significant amount of shocks. In addition, powerful HI, CO, radio continuum, and X-ray emission is detected in the bridge, suggesting that the gas originally in the two discs have been stripped off as a result of a virtually head on encounter \citep{Condon:1993ea,Braine:2003cu,2003AJ....126.2171G,Vollmer:2012gr,Appleton:2015ew}. It does not accompany the rest of the baryons, particularly the collisionless stars, anymore and it can not be reconstructed by \textsc{identikit} test particles. \textbf{NGC 5257/8:} NGC 5257 has a prominent tail in HI that is absent in the optical image. This tail played an important role in the modeling by \cite{Privon:2013fs}. Without the information in the extended tail we do not have the same constraints to pin down the encounter parameters. Furthermore, the model presented by \cite{Privon:2013fs} indicates that NGC 5258 is in a nearly polar orbit. According to \cite{Mortazavi:2016hv}, the modeling method we used does not result in a good convergence when any of the galaxies is in a polar or retrograde orbit, so assuming that the model of \cite{Privon:2013fs} is correct we should have expected a similar failure. \textbf{Arp 87:} This system consists of an edge-on and a nearly face-on galaxy, so even without a reconstructed model of the orbit, we can be certain that one of the galaxies is closer to a polar or retrograde orbit rather than a prograde one, and the limitation of our method in modeling mergers with polar and retrograde orbits applies. Moreover, even though we find a smooth rotation in the H$\alpha$\ velocity near the center of both discs, the tidal tails do not display any detectable H$\alpha$\ emission. Lack of velocity information in the tails introduces more degeneracy to the reconstructed dynamical models. \section{Shock Fraction vs. Reconstructed Encounter Parameters} \label{sec:obssys:fshockvsparams} \begin{table*} \caption[List of systems with available dynamical models] {List of systems with available dynamical models. The source of the model, time since pericenter, time left to coalescence ($\Delta$t), pericentric separation ($\text{R}_\text{peri}$), and fraction of shocked H$\alpha$\ emission ($\text{f}_\text{shocked}$), are shown. All of these systems except UGC 12914 have been modeled with equal mass galaxies. Mass ratio of the model of UGC 12914 is 3. \text{\cite{Vollmer:2012gr}} and \text{\cite{Struck:2003kr}} do no provide the time left to coalescence in their models. The table is sorted by shock fraction.} \begin{center} \begin{tabular}{l|l|llll} system name & source & time (Myr) & $\Delta$t (Myr) & $\text{R}_\text{peri}$ (kpc) & $\text{f}_\text{shocked}$ \\\hline NGC 5257/8 &\text{\cite{Privon:2013fs}} & 230.0 & 1200.0 & 21.0 & 0.15 \\ NGC 4676 & \text{\cite{Mortazavi2018HMice}} & 190.0 & 775.0 & 18.0 & 0.26 \\ UGC 12914 & \text{\cite{Vollmer:2012gr}} & 26.0 & - & 1.2 & 0.37 \\ Arp 284 & \text{\cite{Struck:2003kr}} & 170.0 & - & 6.5 & 0.39 \\ UGC 07593 & this work & 27.0 & 12.0 & 2.5 & 0.40 \\ NGC 2623 & \text{\cite{Privon:2013fs}} & 220.0 & -80.0 & 1.0 & 0.90 \\ \end{tabular} \end{center} \label{tab:obssys:modeled} \end{table*} \begin{figure*} \begin{center} \includegraphics[width=0.7\textwidth]{modeledsys.pdf} \caption[Trends of shock fraction in models with available dynamical model] {Trends of shock fraction in models with available dynamical model. The left panel shows how shocked H$\alpha$\ emission changes with time until the galaxies coalesce in the four systems for which dynamical model provides this information. The red dashed line is the time of coalescence. The right panel shows the trend with pericentric separation.} \label{fig:obssys:modeltrend} \end{center} \end{figure*} In this work, we measured the H$\alpha$\ kinematics of a sample of 22 galaxy mergers. Nineteen of these mergers are in the stage between the first passage and the coalescence, and the other three are already coalesced. We examine the source of ionization in these mergers using the kinematics and flux ratio of H$\alpha$\ and [N II]\ emission lines. We find that the close pairs with projected separation $<25$km/s have a higher H$\alpha$\ shock fraction compared to the wide pairs with projected separation $>25$km/s. The average of the shock fraction in the coalesced systems is even higher; shocks are responsible for an average of about 50\% of H$\alpha$\ emission in these systems. These results are consistent with results of \cite{Rich:2015kf} suggesting that if the sequence of wide pairs, close pairs, and coalesced mergers is a time sequence, then the shock fraction is growing as the merger proceeds. However, dynamical modeling, which incorporates the complex morphology and kinematics of tidal features, is required to constrain encounter parameters in most galaxy mergers. Determining merger stage only using the separation between the pairs is not alway correct. The geometry of the encounter and observer can result in a close projected separation for a physically wide pair. A pair right after the first passage appears as close as one near coalescence. The impact parameter of the encounter also affects the appearance of projected separation during the encounter. In order to obtain a robust correlation between shock fraction and merger stage we need reconstructed dynamical models of galaxy mergers. In addition to the model of UGC 07593 from this work, we can find the dynamical models of five other systems in our sample. The Mice galaxies (NGC 4676) are extensively modeled in the literature \citep{Toomre:1972jia,Barnes:2004kp,Privon:2013fs,Mortazavi2018HMice}. NGC 5257/8 and NGC 2623 are among the four systems modeled in \cite{Privon:2013fs}. We also find a dynamical model of UGC 12914 and Arp 284 in \cite{Vollmer:2012gr} and \cite{Struck:2003kr}, respectively. The reconstructed time since the first passage, time left to coalescence, and pericentric separation of these models are shown in Table \ref{tab:obssys:modeled} along with the measured shocked H$\alpha$\ fraction from this work. Table \ref{tab:obssys:modeled} is sorted by shock fraction. One can see that time since pericenter varies with no obvious trend, but time till coalescence, $\Delta$t, displays a trend; systems with long times until coalescence have smaller shock fraction compared to the systems near coalescence or after coalescence. \cite{Vollmer:2012gr} and \cite{Struck:2003kr} do not provide $\Delta$t in their model. Pericentric separation is also almost sorted in Table \ref{tab:obssys:modeled}. Systems with wide pericentric distance have less fraction of shocked H$\alpha$\ than systems with small pericentric distance. This trend and the trend of time till coalescence can be seen in Figure \ref{fig:obssys:modeltrend}. \section{Discussion} \label{sec:obssys:discussion} Production of shocks is the result of complex processes and can not be reduced to simple correlations like the ones in Figure \ref{fig:obssys:modeltrend}. In particular, during the coalescence, violent relaxation, random orbital crossings, and the return of tidally striped material may agitate the ISM so much that the shocked gas in the remnant loses memory of the orbit of merging galaxies. However, before coalescence, between the first and second passages, the processes that produce shocks can generally be categorized into two modes \citep{Cox2004GeneratingMergers,Soto:2012hm}. The first mode is initiated by a tidal impulse. The tidal impulse at the time of the first pericenter derives the rotating gas in the discs to flow in toward the center of the interacting galaxies \citep{Mihos1994TriggeringMergers,Barnes:1996bna}. The inflowing gas may collide with the gas at lower orbits, and if the collision is fast enough, shocks can be produced. The inflowing gas may also reach the core of the galaxies and trigger or enhance starbursts or AGN, which produce fast outflowing material that can collide with the ISM on their way out and produce shocks. In this mode shocks are produced a few dynamical times after the tidal impulse kicks in. This mode is a side effect of the gravitational tidal impulse during a close passage, so factors that affect the strength of the tidal force should affect the shock production through this mode. In this mode of shock production, pericentric distance and initial disc orientation should strongly affect the amount shocks. We know that the tidal response is proportional to the inverse cube of the distance to the perturber, so a factor of two in pericentric separation changes the tidal impulse by a factor of eight. In prograde encounters tidally induced inflows are even more prominent, because the tidal force pushes or pulls the rotating material in the same direction during the pericentric passage, and the resulting effect of tides is maximized. Therefore, in prograde mergers with small pericentric separation, we expect to find stronger shocks produced through the first mode, and the amount of shock should increase with time since pericenter. In a second mode, sometimes, the geometry of galactic encounter allows the ISM of the two gas rich discs to directly collide with each other. For this to take place, the two discs should have small enough distance at the pericenter, so that the discs and not just the dark matter halos cross during the first passage. The shocks are produced immediately, and decay as they cool down through radiation. Unlike the other mode of shock production, this one is less likely to happen in prograde discs, because the overlapping rotating material moves in the same direction in prograde discs. Therefore, In this mode of shock production, one expects to find more shocks in retrograde and polar discs interacting with small pericentric separation, and these shocks should become less prominent with time since pericenter. \subsection{Shock Production and Encounter Parameters} Our sample in this work was selected based on the visibility of strong tidal features (see \S \ref{sec:obssys:obs:tgtsel}), so it should be biased toward prograde mergers, and the first mode of shock production should be dominant. We predict higher shock fraction in systems that are closer to coalescence, because not only is there more time for the gas inflows to enhance central starbursts/AGNs and produce shocks through outflows, but also violent relaxation, random orbital crossings, and the return of tidally striped material during coalescence may generate shocks. This trend can be seen in the left panel of Figure \ref{fig:obssys:modeltrend}. Notice that in this panel we do not have the data for UGC 12914 and Arp 284. From the spacial distribution of the H$\alpha$\ emission, it seems that in UGC 12914 shocks are produced through the second mode. The presence of the continuous gaseous bridge observed on different bands \citep{Condon:1993ea,Braine:2003cu,2003AJ....126.2171G,Vollmer:2012gr,Appleton:2015ew} implies that gas has been striped from the two galaxies because of a recent head-on encounter. According to the model presented by \cite{Vollmer:2012gr}, the relative velocity of galaxies at the time of the encounter was $\approx$ 1000 km/s. The gas clouds in the ISM of the two discs have collided at this speed and dragged themselves away from the stars toward the bridge. If \cite{Vollmer:2012gr} had provided the time until final coalescence, we would expect it to be a long time, for the galaxies are still receding from each other. This would be inconsistent with the trend in the left panel of Figure \ref{fig:obssys:modeltrend} between shock fraction and time left to coalescence, and it is an additional evidence that the shocks in this galaxy are produced through a fundamentally different procedure. In both proposed modes of shock production, pericentric separation affects the shock fraction in the same way. The smaller the pericentric separation is, the stronger the induced tidal forces are, and the more shocks via the first mode are expected. Similarly, a small enough pericentric separation results in direct collision of gas in the ISM of the two discs, producing shock. Both of these are consistent with the trend seen in the right panel of Figure \ref{fig:obssys:modeltrend}. We should keep in mind that this description only applies to the time between the first and the second passages. During coalescence, shock production is more complicated and may not be characterized by these simplified modes. In fact, strong shocks may be found in the remnant of a recent coalesced merger, even if it had a large separation at the first passage. \subsection{The Effect of Mass Ratio} Assuming that the first mode of shock production is dominant in our sample, the shocks should have been created mostly as a result of the mass flows generated by tidal forces during the first passage; consequently, we should find stronger shocks in a galaxy for which the companion is more massive, for tidal force depends on the mass of the perturber. Disregarding other factors, this leads to two predictions about the effect of mass ratio on shock fraction in binary galaxy mergers: First, when galaxies have comparable mass, tidal force on both galaxies should be relatively strong compared to the the self-gravity of individual galaxies. In comparison, when one of the companions is much less massive, it may not induce a strong enough tidal force to overcome the self-gravity of its companion and affect the orbit of rotating disc particles, so only one of the companions (the secondary) would experience strong enough tides to create shocks. Therefore, more equal mass mergers are expected to have a higher overall shock fraction. Second, with a similar argument for non-equal mass mergers, we should have seen a higher shock fraction in the smaller companion as it experiences a larger tidal impulse from a more massive perturber. The results of \S \ref{sec:obssys:ionization:massratio} confirms the first prediction, but for the second prediction, the evidence points to the contrary. It is important to note that the predictions above would have been valid only if all other factors affecting the amount of shocks were the same for all galaxies, and all shocks were created from the first mode. However, as discussed earlier, at least for UGC 12914 most of the shocks are not likely to be the consequence of a tidal impulse. Besides, there are other important factors such as gas content and its gravitational stability that may affect the fraction of shocks produced by tidal forces. Without an independent measurement of the gas content of each galaxy we cannot evaluate the effect of these other factors. From a statistical point of view, the scaling relationship between the size, baryonic mass, and gas fraction of nearby spiral galaxies suggest that those with a total baryonic mass $\sim 10^{10.6}\text{M}_\odot$ have the most gas mass reservoir of all star-forming disc galaxies \citep{Wu2018TheGalaxies}. On the other hand, gravitational instability of the gas disc may be a critical player in shock production when the tidal impulse kicks in. According to the Toomre's stability criterion, disc stability against collapse is inversely proportional to gas surface density \citep{Safronov1960OnRotation,Toomre1964OnStars}, and in the nearby Universe, gas surface density is generally maximum for discs with total baryonic mass $\sim 10^{9.7}\text{M}_\odot$ \citep{Wu2018TheGalaxies}. The total baryonic masses of our galaxies are likely to be on either side of these maximum values, so without an accurate constraint on the mass of each galaxy, we cannot evaluate if the effects of gas content explain the low shock fraction of the secondary companions in our minor mergers. Measuring the baryonic mass of the observed galaxies is out of the scope of this work. It is important to emphasize that in this work, all of the relationships between shock fraction and encounter parameters are based on either a small sample of 22 observed systems or an even smaller sample of 6 systems with available dynamical models. In order to independently investigate the effect of each parameter and possibly find more complicated relations, we need a larger statistical sample of galaxy mergers observed with optical IFU instruments. Such observations could be used to understand the possible role of merger-induced shocks in the overall quenching of star formation in the Universe. Both modes of shock production discussed here, remove or heat up the cold gas reservoir in the discs which is the fuel for star formation. Hence, in a simplified picture, we expect galaxies to quench star formation after a period of spreading shocks throughout their gas content. Whether shocks are made by strong galactic winds or by the direct collision of gas in the discs, they drag the cold gas away into the halo \citep{Cox:2006kba,Oppenheimer:2010ic}. This gas may not be able to return to its cold state due to the gravitational shock heating \citep{Birnboim:2011cb}. Ongoing and future IFU galaxy surveys (e.g. SAMI: \citealt{Croom:2012fo}, MaNGA: \citealt{Bundy:2015ft}, etc.) provide a promising area for further investigation in near future. \section*{Summary} In this work we observed 22 galaxy mergers with strong tidal features, using the SparsePak IFU on the WIYN telescope at KPNO. We reduce the data and analyze the emission lines with one- and two-component Gaussians. We use an MCMC code to estimate the uncertainty of fit parameters, and select the best number of components using the F-test. Relatively high spectral resolution of our data allows us to use velocity dispersion of emission lines along with [N II]/H$\alpha$\ line ratios to separate H$\alpha$\ originating at star-forming regions from that arising from shocked gas. We use emission line maps to confirm that most of high velocity dispersion and high [N II]/H$\alpha$\ components are galaxy wide shocks, likely to be induced as a result of interaction. We found that the fraction of H$\alpha$\ emission from shocked gas is correlated with the separation of galaxies in pairs. Close pairs have higher shock fraction than wide pairs. The three coalesced systems show the highest average shocked H$\alpha$\ fraction. We use the modeling method developed in \cite{Mortazavi:2016hv} along with the velocity maps of star-forming regions to model the dynamics of equal mass pairs in our sample. We find the first ever constraints on the encounter parameters of UGC 07593, but obtain poor convergence in the other four attempts. We find dynamical model of five other systems in our sample from the literature, and explore the correlations between some encounter parameters and shock fraction. In these systems time left to coalescence and pericentric separation appear to be correlated with the fraction of shocked H$\alpha$. We suggest two modes of shock production that are responsible for most of the shocks in the early stages of a merger, after the first passage and before the coalescence. \section*{Acknowledgement} The authors would like to thank Colin Norman, Joshua Barnes, David Law, Gregory Snyder, Susan Kassin, Ron Allen, and Luciana Bianchi for valuable discussions throughout this work. This project was supported in part by the Space Telescope Science Institute (STScI) Director's Discretionary Research Fund (DDRF). This work used the Extreme Science and Engineering Discovery Environment (XSEDE), which is supported by National Science Foundation grant number ACI-1053575 (see \citealt{Towns2014XSEDE:Discovery}). We used the DSS scan of Arp 273 in this work. The DSS was produced at the STScI under U.S. Government grant NAG W-2166. The images of these surveys are based on photographic data obtained using the Oschin Schmidt Telescope on Palomar Mountain and the UK Schmidt Telescope. The plates were processed into the present compressed digital form with the permission of these institutions. \bibliographystyle{mnras}
\section{\label{sec:level1}First-level heading:\protect\\ The line \section{ The external field approximation} \label{1} Symmetry breaking in quantum many-body systems gives rise to macroscopic objects like vortices in superconductors, dislocations in crystals and domain walls in ferromagnets. These structures normally appear in a quantum context, but behave classically. They are properties of matter, in the form other than particles, that emerge from a quantum background when quantum fluctuations become negligible. Here we consider the possibility that similar phenomena occur in quantum gravity, still far from the essential quantum regime that is supposed to take over at Planck's length. The suggestion comes from studies of covariant wave equations \cite{PAP0,PAP1,PAP2,PAP3,PAP4} that can be solved exactly to first order in the metric deviation $ \gamma_{\mu\nu}=g_{\mu\nu}-\eta_{\mu\nu}$, where $\eta_{\mu\nu}$ is the Minkowski metric and whose solutions are a useful tool in the study of the interaction of gravity with quantum systems \cite{PASP,PAP5,LAMB,PAP6,PAP8,PAP9,PAP7}. In the EFA context, gravity is represented exclusively by a two-point vector $K_{\lambda}(z,x)$ \cite{Ruse,Synge} that is known only if $\gamma_{\mu\nu}$ and its derivatives are known. In what follows the coordinates $z_{\mu}$ refer to a frame that is moved by parallel displacement along a particle path and $x_{\mu }$ to a particle local inertial frame. Though the essential steps of the discussion apply to any wave equation, spin is an unnecessary complication and is momentarily ignored. A brief discussion of fermions is given in section 4. Without loss of generality, we can therefore consider the Klein-Gordon equation that, in its minimal coupling form and after applying the Lanczos-DeDonder condition $\gamma_{\alpha\nu},^{\nu}-1/2 \gamma_{\sigma}^{\sigma},_{\alpha}=0$, becomes \begin{equation}\label{KG} \left(\nabla_{\mu}\nabla^{\mu}+m^2\right)\phi(x)\simeq\left[\eta_{\mu\nu}\partial^{\mu}\partial^{\nu}+m^2 +\gamma_{\mu\nu}\partial^{\mu}\partial^{\nu} \right]\phi(x)=0\,. \end{equation} We use units $\hbar=c=1$ and the notations are as in \cite{PAP7}. In particular, $\nabla_\mu$ is the covariant derivative and partial derivatives with respect to a variable $y_{\mu}$ are interchangeably indicated by $\partial_{\mu}$, or by a comma followed by $\mu$. The first order solution of (\ref{KG}) is \begin{equation}\label{PHA} \phi(x)=\left(1-i\hat{\Phi}_{G}(x)\right)\phi_{0}(x)\,, \end{equation} where $\hat{\Phi}_{G}$ is the operator \begin{equation}\label{PHI} \hat{\Phi}_{G}(x)=-\frac{1}{2}\int_P^x dz^{\lambda}\left(\gamma_{\alpha\lambda,\beta}(z)-\gamma_{\beta\lambda,\alpha}(z)\right) \left(x^{\alpha}-z^{\alpha}\right)\hat{k}^{\beta} \end{equation} \[+\frac{1}{2}\int_P^x dz^{\lambda}\gamma_{\alpha\lambda}(z)\hat{k}^{\alpha}=\int_{P}^{x}dz^{\lambda}\hat{K}_{\lambda}(z,x)\,,\] where $P$ is an arbitrary point, henceforth dropped, and $\phi_{0}(x)$ is a wave packet solution of the free Klein-Gordon equation \begin{equation}\label{KG0} \left(\partial_{\mu}\partial^{\mu}+m^2\right)\phi_{0}(x)=0 \,. \end{equation} The transformation (\ref{PHA}) that makes the ground state of the system space-time dependent, results in a breakdown of symmetry. This is essentially produced by EFA because it is this approximation that generates the solution $(\ref{PHA})$ and preserves its structure even at higher order iterations according to the relation $\phi(x)=\Sigma_{n}\phi_{(n)}(x)=\Sigma_{n}e^{-i\Phi_{G}}\phi_{(n-1)}$. For simplicity we choose a plane wave for $\phi_{0}$. We also write $\hat{\Phi}_{G}(x)\phi_{0}(x)\equiv \Phi_{G}(x)\phi_{0}(x)$ where $\hat{k}_{\alpha}\phi_{0}=i\partial^{\alpha}\phi_{0}=k^{\alpha}\phi_{0}$, the wave vector $k_{\alpha}$ satisfies the condition $k_{\alpha}k^{\alpha}=m^2$ and \begin{equation}\label{K} K_{\lambda}(z,x)=-\frac{1}{2}\left[\left(\gamma_{\alpha\lambda,\beta}(z) -\gamma_{\beta\lambda,\alpha}(z)\right)\left(x^{\alpha}-z^{\alpha}\right)-\gamma_{\beta\lambda}(z)\right]k^{\beta}\,. \end{equation} Notice that $K_{\lambda}$ contains information about the particles with which gravity interacts through the momentum $k_{\alpha}$ of $\phi_{0}$. The quanta of $K_{\lambda}$ can be called quasiparticles this being the notion that explains the properties of fields and particles that are affected by the interaction with other particles and media. The appearance of $K_{\lambda}$ and the transformation (\ref{PHI}) are distinctive features of EFA. As the free particles therefore feel the gravitational field, the system ground state changes and evolves toward a lower equilibrium configuration. In quantum field theory the process is known as boson condensation \cite{ITZ}. By differentiating (\ref{K}) with respect to $z^{\alpha}$, we find \cite{PAP10} \begin{equation}\label{FT} \tilde{F}_{\mu\lambda}(z,x)\equiv K_{\lambda,\mu}(z,x)-K_{\mu,\lambda}(z,x)=R_{\mu\lambda\alpha\beta}(z) J^{\alpha\beta}\,, \end{equation} where $R_{\alpha\beta\lambda\mu}(z)=-\frac{1}{2}\left(\gamma_{\alpha\lambda,\beta\mu} +\gamma_{\beta\mu,\alpha\lambda}-\gamma_{\alpha\mu,\beta\lambda}-\gamma_{\beta\lambda,\alpha\mu}\right)$ is the linearized Riemann tensor satisfying the identity $R_{\mu\nu\sigma\tau}+R_{\nu\sigma\mu\tau}+R_{\sigma\mu\nu\tau}=0$ and $J^{\alpha\beta}=\frac{1}{2}\left[\left(x^{\alpha}-z^{\alpha}\right)k^\beta-k^\alpha \left(x^\beta-z^\beta\right)\right]$ is the angular momentum about the base point $x^\alpha$. The Maxwell-type equations \begin{equation}\label{ME1} \tilde{F}_{\mu\lambda,\sigma}+\tilde{F}_{\lambda\sigma,\mu}+\tilde{F}_{\sigma\mu,\lambda}=0 \end{equation} and \begin{equation}\label{ME2} \tilde{F}^{\mu\lambda}_{\,\,\,\,\,\,\,,\lambda}\equiv -j^{\mu}= \left(R^{\mu\lambda}_{\,\,\,\,\,\,\,\alpha\beta}J^{\alpha\beta}\right),_{\lambda} =R^{\mu\lambda}_{\,\,\,\,\,\,\,\alpha\beta,\lambda}\left(x^\alpha -z^\alpha\right)k^\beta +R^{\mu}_{\,\,\,\,\beta}k^{\beta}\,, \end{equation} can be obtained from (\ref{FT}) using the Bianchi identities $R_{\mu\nu\sigma\tau,\rho} +R_{\mu\nu\tau\rho,\sigma}+R_{\mu\nu\rho\sigma,\tau}=0$. The current $j^{\mu}$ satisfies the conservation law $j^{\mu}_{\,\,\,,\mu}=0$. Equations (\ref{ME1}) and (\ref{ME2}) are identities and do not represent additional constraints on $\gamma_{\mu\nu}$. They hold true, in EFA, for any metrical field theory. \section{ Vortices} The vector $K_\lambda$ is non-vanishing only on surfaces $\tilde{F}_{\mu\nu}$ that satisfy (\ref{ME1}) and (\ref{ME2}) and represent the vortical structures generated by $\Phi_{G}$. At a point $z_{\alpha}$ along the path \begin{equation}\label{PD} \frac{\partial \Phi_{G}(z)}{\partial z^{\sigma}}=-\frac{1}{2}\left[\left(\gamma_{\alpha\sigma,\beta}(z)-\gamma_{\beta\sigma,\alpha}(z)\right) \left(x^{\alpha}-z^{\alpha}\right)-\gamma_{\beta\sigma}(z)\right]k^{\beta}=K_{\sigma}(z)\,, \end{equation} and \begin{equation}\label{PD2} \frac{\partial^{2}\Phi_{G}(z)}{\partial z^{\tau}\partial z^{\sigma}}-\frac{\partial^{2}\Phi_{G}(z)}{\partial z^{\sigma}\partial z^{\tau}}=R_{\alpha\beta\sigma\tau}\left(x^{\alpha}-z^{\alpha}\right)k^{\beta}\equiv\left[\partial z_{\tau},\partial z_{\sigma}\right]\Phi_{G}(z)= \tilde{F}_{\tau\sigma}(z)\,. \end{equation} It follows from (\ref{PD2}) that $\Phi_{G}$ is not single-valued and that, after a gauge transformation, $K_{\alpha}$ satisfies the equations \begin{equation}\label{DIV} \partial_{\alpha}K^{\alpha}=\frac{\partial^{2}\Phi_{G}}{\partial z_{\sigma}\partial z^{\sigma}}=0 \end{equation} and \begin{equation}\label{2der} \partial^2 K_{\lambda}=-\frac{k^{\beta}}{2}\left[\left(\partial^2 (\gamma_{\alpha\lambda,\beta})-\partial^2(\gamma_{\beta\lambda,\alpha})\right)\left(x^\alpha -z^\alpha\right)+ \partial^2 \gamma_{\beta\lambda}\right] \end{equation} identically, while the equation \begin{equation}\label{PD3} \left[\partial z_{\mu},\partial z_{\nu}\right]\partial z_{\alpha}\Phi_{G}=-\left(\tilde{F}_{\mu\nu,\alpha}+\tilde{F}_{\alpha\mu,\nu}+\tilde{F}_{\mu\alpha,\nu}\right)=0\,, \end{equation} holds everywhere. Therefore, the potential $K_{\alpha}$ is regular everywhere, which is physically desirable, but $\Phi_{G}$ is singular. There may then be closed paths embracing the singularities along which the particle wave function must be made single-valued by means of appropriate quantization conditions \cite{PAP12}. It also follows from (\ref{PD2}) that $\tilde{F}_{\mu\nu}$ is a vortex along which the scalar particles are dragged with acceleration \begin{equation}\label{GE} \frac{d^{2}z_{\mu}}{ds^{2}}=u^{\nu}\left(u_{\mu,\nu}-u_{\nu,\mu}-R_{\mu\nu\alpha\beta}\left(x^{\alpha}-z^{\alpha}\right)u^{\beta}\right)\,, \end{equation} and relative acceleration \begin{equation}\label{GD} \frac{d^{2}(x_{\mu}-z_{\mu})}{ds^{2}}=\tilde{F}_{\mu\lambda}u^{\lambda}=R_{\mu\beta\lambda\alpha}\left(x^{\alpha}-z^{\alpha}\right)u^{\beta}u^{\lambda}\,, \end{equation} in agreement with the equation of geodesic deviation \cite{PAP12}. Notice that in (\ref{GE}) the vorticity is entirely due to $R_{\mu\nu\alpha\beta}J^{\alpha\beta}$ and that $\frac{d^{2}z_{\mu}}{ds^{2}}=0$ when the motion is irrotational. This also applies when $R_{\mu\nu\alpha\beta}=0$, in which case the vortices do not develop. Similarly, vortices do not form if $k^{\alpha}=0$. Each gravitational field produces a distinct vortex whose equations are (\ref{ME1}) and (\ref{ME2}), the vortex dynamics is given by (\ref{GE}) and (\ref{GD}) and the topology of the object is supplied by $\Phi_{G}$. Though we started from a quantum wave equation, the vortices generated are purely classical because $\gamma_{\mu\nu}, K_{\lambda}$ and $\tilde{F}_{\alpha\beta}$ are classical and the particles interact with gravity as classical particles do. In addition, $\phi$ and $\phi_{0}$ coexist with the vortices generated by $\Phi_{G}$ in the ground state. The field $\tilde{F}_{\mu\nu}$ emerges as a property of gravitation when this interacts with particles described by wave equations in EFA. Its range is that of $\gamma_{\mu\nu}$. $\tilde{F}_{\alpha\beta}$ vanishes on the line $x^{\alpha}-z^{\alpha}=0$ along which $K_{\lambda}$ can also be eliminated by a gauge transformation. In this case we can say that the line is entirely occupied by $\phi_{0}$. Obviously $\Phi_{G}=0$ on the nodal lines of $\phi$ where it looses its meaning. Notice that the left hand side of (\ref{FT}) can also be replaced by its dual. This is equivalent to interchanging the "magnetic" with the "electric" components of $R_{\mu\nu\alpha\beta}$ and the corresponding vortex types. \section{ A minimal Lagrangian} The simplest possible Lagrangian in which the features discussed in the previous sections can be accomodated is \cite{ITZ} \begin{equation}\label{L} \mathcal{L}=-\frac{1}{4}\tilde{F}_{\alpha\beta}\tilde{F}^{\alpha\beta}+\left[\left(\partial _{\mu}-iK_{\mu}\right)\phi\right]^{*}\left[\left(\partial^{\mu}+iK^{\mu}\right)\phi\right]- \mu^{2}\phi^{*}\phi\,, \end{equation} where $\mu^{2}<0$. The second term of $\mathcal{L}$ contains the first order gravitational interaction $\gamma_{\mu\nu}[(\partial ^{\mu}-iK^{\mu})\phi]^{*}[(\partial ^{\nu}+iK^{\nu})\phi]\sim -\gamma_{\mu\nu}\partial^{\mu}\partial^{\nu}\phi_{0}$ met above. By varying $\mathcal{L}$ with respect to $\phi^{*}$ and by applying a gauge transformation to $K_{\alpha}$, we find, to $\mathcal{O(\gamma_{\mu\nu})}$, \begin{equation}\label{EQS} \left[\partial^{2}+m^2 +\gamma_{\mu\nu}\partial^{\mu}\partial^{\nu}\right]\phi(x)\simeq 0\,, \end{equation} and $-\mu^{2}$ has now been changed into $m^{2}>0$ because the Goldstone boson has disappeared, the remaining boson is real \cite{ITZ} and so must be its mass. Equation (\ref{EQS}) is identical to (\ref{KG}) and its solution is still represented by the boson transformation (\ref{PHA}). However, a variation of $\mathcal{L}$ with respect to $K_{\alpha}$ now gives \begin{equation}\label{CU} \partial_{\nu}\tilde{F}^{\mu\nu}=\tilde{J}^{\mu}=i\left[\left(\phi^{*}\partial^{\mu}\phi\right)-\left(\partial^{\mu}\phi^{*}\right)\phi\right]-2K^{\mu}\phi^{*}\phi\, \end{equation} from which we find, on using (\ref{PHA}) and a gauge transformation, the field equation \begin{equation}\label{MK} \partial^{2}K_{\mu}+2K_{\mu}\phi^{2}=0\,, \end{equation} that shows that $K_{\mu}$ has acquired a mass. By expanding $\phi=v+\rho(x)/\sqrt{2}$, we find that the mass of $K_{\mu}$ is $v$ and its range $\sim v^{-1}$. Any metrical theory of gravity selected remains valid at distances greater than $ v^{-1} $, but not so near, or below $v^{-1}$. The shielding current in (\ref{MK}) determines a situation analogous to that of vortices of normal electrons inside type-II superconductors where the electron normal phase is surrounded by the condensed, superconducting phase. The fundamental difference from the approach followed in the first two sections is represented by (\ref{MK}) that now becomes a constraint on $K_{\lambda}$. It can be satisfied by requiring that $(\partial^{2}+v^{2})\gamma_{\alpha\beta}=0$. No other changes are necessary. On the other hand this condition can be applied directly in sections 1 and 2 without making use of $\mathcal{L}$. $\tilde{F}_{\mu\nu}$ again vanishes when $z^{\alpha}-x^{\alpha}=0$, which indicates that the line $z^{\alpha}-x^{\alpha}=0$ can only be occupied by the normal phase. As before, the field $\tilde{F}_{\mu\nu}$ is classical and emerges as a property of gravitation when it interacts with quantum matter. The range of interaction can obviously be very short if $v$ is large. \section{ Spin-$1/2$ fermions} The EFA solution of the covariant Dirac equation $[i\gamma^\mu(x){\cal D}_\mu-m]\Psi(x)=0 $ can be written in the form \cite{PAP2,PAP5} \begin{equation}\label{PsiSolution2} \Psi(x)=-\frac{1}{2m}\left(-i\gamma^\mu(x){\cal D}_\mu-m\right)e^{-i\Phi_T}\Psi_0(x)\,, \end{equation} where ${\cal D}_\mu=\nabla_\mu+i\Gamma_\mu (x)$, $\Gamma_{\mu}(x)$ represents the spin connection and the matrices $\gamma^{\mu}(x)$ satisfy the relations $\{\gamma^\mu(x), \gamma^\nu(x)\}=2g^{\mu\nu}$. In addition $\Phi_T=\Phi_s+\Phi_G+\Phi_{A}$ is of first order in $\gamma_{\alpha\beta}(x)$, $\Phi_s(x)=\int^x dz^\lambda \Gamma_\lambda (z) $, $\Phi_{A}=e\int^{x}dz^{\lambda}A_{\lambda}(z)$, where $A_{\lambda}$ is the electromagnetic potential and $\Psi_0(x)$ is a solution of the free Dirac equation. It is shown in \cite{PAP2,PAP5} that (\ref{PsiSolution2}) requires that (\ref{KG}) be also solved. This accounts for the presence of $\Phi_{G}$ in (\ref{PsiSolution2}). We consider the question whether vortices can be created by rotation either in laboratory conditions, or in the vicinity of an astrophysical source. In the first instance we introduce rotation by means of the Thirring metric \cite{Thirr} that describes the field of a shell of mass $M$ and radius $R$ rotating with angular velocity $\omega$ about the $z$-axis. The components of interest are $J_{12}$, $R_{1212}$ and $\gamma_{12}= 16\pi G M\omega^{2}xy/5R$. We then take the limit $2GM/R \approx 1$ which is considered appropriate when the spherical shell refers to the whole universe. This is in fact equivalent to assuming that the universe is rotating relative to the particles, which is consistent with Mach views. The limit can be also derived from an exact solution of Einstein equations \cite{Ein}. Neglecting $\Phi_{A}$ for simplicity, we find $\Phi_{T}=(1/2) \oint_{\sigma}R_{1212}J^{12} d\sigma^{12}=(\omega^{2}/5)\oint_{\sigma}J^{12}d\sigma^{12}$, where $\sigma$ is the surface bounded by the particle path and $J^{12}$ also contains the spin contribution because the spin connection satisfies the equation \cite{PAP2,PAP6} \begin{equation}\label{relation1} \nabla_\mu\Gamma_\nu(x)-\nabla_\nu\Gamma_\mu(x)+i[\Gamma_\mu(x), \Gamma_\nu(x)]=-\frac{1}{4}\sigma^{\alpha\beta}(x)R_{\alpha\beta\mu\nu}\,, \end{equation} and \begin{equation}\label{relation2} [{\cal D}_\mu, {\cal D}_\nu]=-\frac{i}{4}\, \sigma^{\alpha\beta}(x)R_{\alpha\beta\mu\nu}\,, \end{equation} where $\sigma^{\alpha\beta}(x)=i/2 [\gamma^{\alpha}(x),\gamma^{\beta}(x)]$. In the case of rotating astrophysical sources, we can use the Lens-Thirring metric \cite{Lense}. The components of interest are again $J_{12}$ and $R_{1210}, R_{1220}, R_{1230}$ and the metric components to consider are $\gamma_{0i}=(4\alpha R^{3}\omega/5r^3) (y,-x,0)$, where $\alpha=GM/R$. When, close to the source, $r\approx R$, we find $R_{1210}=-\alpha\omega x/R^{2}$, $R_{1220}=\alpha\omega y/R^{2}$ and $R_{1230}=\alpha\omega(-3z/R^{2}+5z^{3}/R^{4})$ from which, ignoring $\Phi_{A}$, we can calculate $\Phi_{T}=\oint_{\sigma}R_{12\alpha\beta}J^{12}d\sigma_{\alpha\beta}$ and, as above, $J^{12}$ also contains the spin contribution to the total angular momentum. The presence of $\Phi_{G}$ in (\ref{PsiSolution2}) ensures, in principle, the formation of relativistic fermion vortices in laboratory and astrophysical conditions. \section{ Summary}. In EFA gravity is represented by a two-point vector that satisfies Maxwell-type equations. The solution of the Klein-Gordon equation is obtained by using the transformation (\ref{PHA}) which breaks the symmetry. These features produce vortical structures in which the particles are subjected to acceleration and relative acceleration that are classical and of known form \cite{PAP10,PAP12}. The components of $\gamma_{\mu\nu}$ are not determined by any particular theory. The equations are identities and can be applied to general relativity, to theories in which acceleration has an upper limit \cite{CAI1,CAI2,CAI3,BRA,MASH1,MASH2,MASH3,TOLL,SCHW,PU} and that allow for the resolution of astrophysical and cosmological singularities in quantum gravity \cite{ROV,BRU} and to those theories of asymptotically safe gravity that can be expressed as Einstein gravity coupled to a scalar field \cite{CA}. We have then re-derived some of the results by means of a minimal Lagrangian that describes symmetry breaking. The model is akin to relativistic superconductivity except that the electromagnetic vector potential is here substituted by the vector $K_{\lambda}$ that accounts for gravity. The Lagrangian $\mathcal{L}$ does produce a mass for the quanta of $K_{\lambda}$ and consequently a finite interaction range $\sim v^{-1}$, where $v$ is the ground state value of the order parameter. The vortical structures still exist, but $K_{\lambda}$ is no longer an identity. It must also satisfy (\ref{MK}) and a theory of gravity must be supplied for the range $\leq v^{-1}$. Shielding now produces vortices in which the normal phase is trapped, very much like normal electrons in type-II superconductors. The screening length $\sim v^{-1}$ must be small in order to prevent macroscopic violations of gravity's universal law of attraction and the instability of any particle, or system of particles, whose internal mechanical behaviour involves inertial forces. The only known scalar particles fitting the requirements belong to the Higgs boson family, or to new undiscovered particles. The models of sections 2 and 3 can conceal matter in vortical structures that interact only gravitationally with the rest of the universe over long, or short range distances, or both. They may be of interest in the study of dark matter. We have finally shown in section 4 that, by applying EFA to the covariant Dirac equation and by using the Thirring and Lense-Thirring metrics, relativistic fermion vortices can in principle be produced by rotation in laboratory and astrophysical conditions. \vspace{0.5in}