diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzzdqol" "b/data_all_eng_slimpj/shuffled/split2/finalzzdqol" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzzdqol" @@ -0,0 +1,5 @@ +{"text":"\\section{Introduction}\n\nThe notion of a microset is due to F\\\"{u}rstenberg \\cite{Furst}, it was introduced to understand the infinitesimal structure of a compact set $K\\subset \\mathbb{R}^d$. Microsets are obtained by `zooming' in on $K$ and taking the Hausdorff limit of what we see. For the definition of Hausdorff metric and other notions see the Preliminaries section. \n\n\\begin{definition} Let $d\\geq 1$ be a positive integer and let $K\\subset \\mathbb{R}^d$ be compact. We say that $E$ is a \\emph{microset} of $K$ if $E \\cap (0, 1)^d \\neq \\emptyset$ and there exist homotheties $S_n\\colon \\mathbb{R}^d\\to \\mathbb{R}^d$ defined as $S_n(z)=\\lambda_n z+u_n$ with $\\lambda_n\\geq 1$ and $u_n\\in \\mathbb{R}^d$ such that $S_n(K)\\cap [0,1]^d$ converges to $E$ in the Hausdorff metric. Then $\\{\\lambda_n\\}_{n\\geq 1}$ is called a \\emph{scaling sequence} of $E$. \n\\end{definition} \n\nIn order not to lose information about the `thinnest' part of our set $K$, we added the non-standard assumption $E\\cap (0,1)^d \\neq \\emptyset$ to the definition. Without this property $\\{0\\}$ would be a microset of every Cantor set $K\\subset \\mathbb{R}$. Besides this, the definition also varies across different sources. F\\\"{u}rstenberg \\cite{Furst} allows to converge to $E$ by subsets of $S_n(K)\\cap [0,1]^d$, which approach only provides information about the `thickest' part of $K$. Bishop and Peres \\cite{BP} assumes that $\\lambda_n\\to \\infty$. Fraser, Howroyd, K\\\"aenm\\\"aki, and Yu \\cite{microsets} define microsets without the restriction $E\\cap (0,1)^d\\neq \\emptyset$, they only add this extra condition to the notion of gallery. Some authors also consider weak tangents, which means that $S_n$ might be arbitrary expanding similarities in the definition instead of homotheties. As the orthogonal group of $\\mathbb{R}^d$ is compact, this concept would not significantly differ from ours.\n\n\\begin{notation} For a compact set $K\\subset \\mathbb{R}^d$ define \n\\begin{equation*} \\mathcal{M}_K=\\{E: E \\text{ is a microset of } K \\}.\n\\end{equation*}\n\\end{notation}\t\n\nLet $\\dim_H$, $\\underline{\\dim}_B$, $\\overline{\\dim}_B$, and $\\dim_P$ denote the Hausdorff, lower box, upper box, and packing dimensions, respectively. For the following inequalities see \\cite[Page~82]{Ma}.\n\\begin{fact} \\label{f:ineq} For any set $E\\subset \\mathbb{R}^d$ we have \n\\begin{equation*} \n\\dim_H E\\leq \\underline{\\dim}_B \\, E\\leq \\overline{\\dim}_B \\, E \\quad \\text{and} \\quad \n\\dim_H E\\leq \\dim_P E\\leq \\overline{\\dim}_B \\, E.\n\\end{equation*}\n\\end{fact}\n\nThe infimum part of the following theorem was proved by Fraser, Howroyd, K\u00e4enm\u00e4ki, and Yu \\cite[Theorem~1.1]{microsets}, while the supremum part is basically due to Furstenberg \\cite[Theorem~5.1]{Furst}, see also \\cite[Theorem~2.4]{microsets}. \n\n\\begin{theorem}[Fraser--Howroyd--K\\\"aenm\\\"aki--Yu and F\\\"urstenberg] \\label{t:Fu}\nLet $\\dim$ be one of $\\dim_H$, $\\underline{\\dim}_B$, $\\overline{\\dim}_B$, or $\\dim_P$. Assume that $d\\geq 1$ and $K\\subset \\mathbb{R}^d$ is a non-empty compact set. Then $\\{\\dim E: E\\in \\mathcal{M}_K\\}$ contains its infimum and supremum. \n\\end{theorem}\n\nFraser, Howroyd, K\u00e4enm\u00e4ki, and Yu \\cite[Theorem~1.3]{microsets} proved the following. Recall that a set is $F_\\sigma$ if it is a countable union of closed sets.\n\n\\begin{theorem}[Fraser--Howroyd--K\\\"aenm\\\"aki--Yu] \nLet $d\\geq 1$ and let $A\\subset [0,d]$ be an $F_{\\sigma}$ set which contains its infimum and supremum. Then there exists a compact set $K\\subset \\mathbb{R}^d$ such that \n\\begin{equation*} \\{\\dim_H E: E\\in \\mathcal{M}_K\\}=A.\n\\end{equation*} \n\\end{theorem}\n\nThey asked the following question \\cite[Question~7.4]{microsets}, see also \\cite[Question~17.3.2]{F}.\n\n\\begin{question}[Fraser--Howroyd--K\\\"aenm\\\"aki--Yu] If $K\\subset \\mathbb{R}^d$ is compact, then is $\\{\\dim_H E: E\\in \\mathcal{M}_K\\}$ an $F_{\\sigma}$ set? If not, does it belong to a finite Borel class? \n\\end{question}\n\nAs the main result of this paper, in Section~\\ref{s:character} we answer the above questions in the negative. In fact, we prove a complete characterization as follows. \n\n\\begin{ch}[Main Theorem] Let $\\dim$ be one of $\\dim_H$, $\\underline{\\dim}_B$, or $\\overline{\\dim}_B$.\nLet $d\\geq 1$ and let $A \\subset [0, d]$ be a non-empty set. Then the following are equivalent:\n\\begin{enumerate}\n\\item There exists a compact set $K \\subset \\mathbb{R}^d$ such that $\\{\\dim E : E \\in \\mathcal{M}_K\\} = A$;\n\\item $A$ is an analytic set which contains its infimum and supremum;\n\\item There exists a compact set $K \\subset \\mathbb{R}^d$ such that $\\dim_H E=\\overline{\\dim}_B \\, E$ for all $E\\in \\mathcal{M}_K$ and $\\{\\dim_H E : E \\in \\mathcal{M}_K\\} = A$.\n\\end{enumerate} \n\\end{ch}\nFor packing dimension we can only prove one direction due to measurability problems, see Problem~\\ref{p:meas}. The following corollary is immediate. \n\\begin{corollary}\nLet $d\\geq 1$ and let $A \\subset [0, d]$ be a non-empty analytic \nset which contains its infimum and supremum. Then there exists a compact set $K \\subset \\mathbb{R}^d$ with \n\\begin{equation*}\n\\{\\dim_P E : E \\in \\mathcal{M}_K\\} = A.\n\\end{equation*}\n\\end{corollary}\n\nIn Section~\\ref{s:K} we consider the range of dimensions of compact families of compact subsets of a given compact set $K\\subset \\mathbb{R}^d$. Let $\\mathcal{K}(K)$ denote the set of non-empty compact subsets of $K$ endowed with the Hausdorff metric. Subsection~\\ref{ss:Haus} is dedicated to the proof of the following theorem, which relies on the stochastic co-dimension method applied to suitable fractal percolations. \n\n\\begin{co}\nLet $K \\subset \\mathbb{R}^d$ be a non-empty compact set and let $A \\subset [0, \\dim_H K]$. Then the following are equivalent: \n\\begin{enumerate}\n\\item There is a compact set $\\mathcal{C} \\subset \\mathcal{K}(K)$ with $\\{\\dim_H C : C \\in \\mathcal{C}\\} = A$;\n\\item $A$ is an analytic set. \n\\end{enumerate} \n\\end{co}\n\nIn Subsection~\\ref{ss:box} we consider the analogous problems for box and packing dimensions. In case of lower box dimension the analogue of Theorem~\\ref{t:compact family} does not hold. The following theorem of Feng, Wen, and Wu \\cite[Theorem~3]{FWW} demonstrates that $\\underline{\\dim}_B$ even fails to satisfy the Darboux property. \n\n\\begin{theorem}[Feng--Wen--Wu] There exists a compact set $K\\subset [0,1]$ such that $\\underline{\\dim}_B \\, K=1$ and any set $E\\subset K$ satisfies $\\underline{\\dim}_B \\, E\\in \\{0,1\\}$. \n\\end{theorem}\n\nFor upper box dimension an analogous version of Theorem~\\ref{t:compact family} holds. \n\n\\begin{cbox} Let $K$ be a non-empty compact metric space and $A \\subset [0, \\overline{\\dim}_B \\, K]$. The following statements are equivalent: \n\\begin{enumerate}\n\\item There is a compact set $\\mathcal{C} \\subset \\mathcal{K}(K)$ with $\\{\\overline{\\dim}_B \\, C : C \\in \\mathcal{C}\\} = A$;\n\\item $A$ is an analytic set. \n\\end{enumerate} \n\\end{cbox}\n\nFor packing dimension we will show the following.\n\n\\begin{pack}\nLet $K$ be a non-empty compact metric space and let $A \\subset [0, \\dim_P K]$ be analytic. Then there is a compact set $\\mathcal{C} \\subset \\mathcal{K}(K)$ with $\\{\\dim_P C : C \\in \\mathcal{C}\\} = A$.\n\\end{pack}\n\nFinally, we collect the open problems in Section~\\ref{s:open}.\n\n\\section{Preliminaries} \nLet $d\\geq 1$ be an integer. A set $A\\subset \\mathbb{R}^d$ is \\emph{analytic} if there exist a Polish space $X$ and a continuous onto map $f\\colon X\\to A$. Let $(X,\\rho)$ be a Polish space or compact metric space. Let $(\\mathcal{K}(X),d_{H})$ be the set of non-empty compact subsets of\n$X$ endowed with the \\emph{Hausdorff metric}, that is, for each $K_1,K_2\\in \\mathcal{K}(X)$ we have\n\\begin{equation*} \nd_{H}(K_1,K_2)=\\min \\left\\{r: K_1\\subset B(K_2,r) \\textrm{ and } K_2\\subset B(K_1,r)\\right\\},\n\\end{equation*}\nwhere $B(A,r)=\\{x\\in X: \\exists y\\in A \\textrm{ such that } \\rho(x,y)|\\leq r\\}$.\nThen $(\\mathcal{K}(X),d_{H})$ is a Polish space, and it is compact when $X$ is compact, see \\cite[Theorems~4.25,~4.26]{Ke}.\n\nLet $X$ be a metric space. For $x\\in X$ and $r>0$ let $B(x,r)$ be the closed ball of radius $r$ centered at $x$. For every $s\\geq 0$ the \\emph{$s$-Hausdorff content} of $X$ is defined as\n\\begin{equation*} \\mathcal{H}^{s}_{\\infty}(X)=\\inf \\left\\{ \\sum_{i=1}^\\infty (\\diam\nE_{i})^{s} : X \\subset \\bigcup_{i=1}^{\\infty} E_{i} \\right\\},\n\\end{equation*}\nwhere $\\diam E_i$ denotes the diameter of $E_i$. The \\emph{Hausdorff dimension} of $X$ is\n\\begin{equation*} \\dim_{H} X = \\inf\\{s \\ge 0: \\mathcal{H}_{\\infty}^{s}(X) =0\\}.\n\\end{equation*}\nLet $N_n(X)$ be the minimal number of closed balls of radius at most $2^{-n}$ needed to cover $X$. The \\emph{lower box dimension} and \\emph{upper box dimension} of $E$ are defined as\n\\begin{equation*} \\underline{\\dim}_{B}\\, X=\\liminf_{n \\to \\infty} \\frac{\\log N_{n}(X)}{n\\log 2} \\quad \\text{and} \\quad \\overline{\\dim}_{B} \\, X=\\limsup_{n\\to \\infty} \\frac{\\log N_{n}(X)}{n\\log 2},\n\\end{equation*} \nrespectively. The \\emph{packing dimension} of $X$ is defined by\n\\begin{equation*} \\dim_P X=\\inf \\left\\{\\sup_{i} \\overline{\\dim}_{B} \\, E_i: X\\subset \\bigcup_{i=1}^{\\infty} E_i\\right\\}.\n\\end{equation*}\nFor the following lemma see \\cite[Lemma~2.8.1]{BP}.\n\\begin{lemma} \\label{l:packing}\nLet $X$ be a separable metric space. \n\\begin{enumerate}[(i)]\n\\item \\label{i:i} If $X$ is complete and $\\overline{\\dim}_B \\, U\\geq \\alpha$ for each open set $U\\subset X$, then $\\dim_P X\\geq \\alpha$.\n\\item \\label{i:ii} If $\\dim_P X>\\alpha$ then there is a closed subset $F\\subset X$ such that $\\dim_P (F\\cap U)>\\alpha$ for each open set $U$ intersecting $F$.\n\\end{enumerate}\n\\end{lemma}\n\nThe following fact easily follows from the finite stability of the dimensions in question. \n\n\\begin{fact} \\label{f:dimK}\nLet $\\dim$ be one of $\\dim_H$, $\\overline{\\dim}_B$, or $\\dim_P$. Let $K$ be a non-empty compact metric space. Then there exists $y\\in K$ such that $\\dim B(y,r)=\\dim K$ for all $r>0$. \n\\end{fact}\n\n\n\nFor the next claim see \\cite[Product formulas 7.2 and 7.5]{Fa}.\n\\begin{claim} \\label{c:product}\nLet $A\\subset \\mathbb{R}^d$ and $B\\subset \\mathbb{R}^m$ be compact sets. Then \n\\begin{equation*} \\dim_H A+\\dim_H B\\leq \\dim_H(A\\times B)\\leq \\overline{\\dim}_B \\, (A\\times B) \\leq \\overline{\\dim}_B \\, A+\\overline{\\dim}_B \\, B.\n\\end{equation*} \n\\end{claim}\n\\noindent Consult~\\cite{Fa} or \\cite{Ma} for more on these concepts.\n\n\\bigskip\n\nFor any $x\\in 2^{\\omega}$ define a compact set $K(x)\\subset [0,1]$ as\n\\begin{equation*} \nK(x)=\\left\\{\\sum_{i=0}^{\\infty} a_i 2^{-i-1}: a_i=0 \\text{ if } x(i)=0 \\text{ and } a_i\\in \\{0,1\\} \\text{ if } x(i)=1\\right\\}.\n\\end{equation*}\nFor $n\\in \\omega$ let $x\\restriction n$ be the restriction of $x$ to its first $n$ coordinates. We endow $2^{\\omega}$ with a metric $d$ compatible with the product topology defined as \n\\begin{equation*} d(x,y)=2^{-\\min\\{i: x(i)\\neq y(i)\\}} \\quad \\text{for all } x,y\\in 2^{\\omega}.\n\\end{equation*}\nThe following fact is straightforward. \n\\begin{fact} \\label{f:cont} \nThe map $K\\colon 2^{\\omega}\\to \\mathcal{K}([0,1])$ mapping $x$ to $K(x)$ is continuous, more precisely, \n\\begin{equation*} d_H(K(x),K(y))\\leq d(x,y) \\quad \\text{for all } x,y\\in 2^{\\omega}.\n\\end{equation*}\n\\end{fact} \nDefine the left shift $T\\colon 2^{\\omega} \\to 2^{\\omega}$ such that \n\\begin{equation*} \nT(x)(n)=x(n+1) \\text{ for all } n\\in \\omega.\n\\end{equation*} \nWe define the \\emph{lower density} and \\emph{upper density of $x$} by\n\\begin{equation*} \n\\underline{\\varrho}(x)=\\liminf_{n \\to \\infty} \\frac{\\sum_{i=0}^{n-1} x(i)}{n} \\quad \\text{and} \\quad \\overline{\\varrho}(x)=\\limsup_{n \\to \\infty} \\frac{\\sum_{i=0}^{n-1} x(i)}{n},\n\\end{equation*} \nrespectively. If $\\underline{\\varrho}(x)=\\overline{\\varrho}(x)$ then the common value $\\varrho(x)$ is called the \\emph{density of $x$}. For the following claim see e.g.~\\cite[Example~3.2.3]{BP}.\n\\begin{claim} \\label{cl:1}\nFor any $x\\in 2^{\\omega}$ we have \n\\begin{equation*} \n\\dim_H K(x)=\\underline{\\dim}_B \\, K(x)=\\underline{\\varrho}(x) \\quad \\text{and} \\quad \\dim_P K(x)=\\overline{\\dim}_B \\, K(x)=\\overline{\\varrho}(x).\n\\end{equation*}\n\\end{claim}\nClaims~\\ref{c:product} and \\ref{cl:1} allow us to calculate the dimensions of the Cartesian product $K(x)^d$ as follows. \n\\begin{fact} \\label{f:dim}\nLet $\\dim$ be one of $\\dim_H$, $\\underline{\\dim}_B$, $\\overline{\\dim}_B$ or $\\dim_P$. Assume that $d\\in \\mathbb{N}^+$ and $x\\in 2^{\\omega}$ are given such that $\\varrho(x)$ exists. Then \n\\begin{equation*} \\dim K(x)^d=d\\varrho(x). \n\\end{equation*} \n\\end{fact}\n\nFor $s,t\\in 2^{<\\omega}$ let $s^\\frown t\\in 2^{<\\omega}$ denote the concatenation of $s$ and $t$.\n\n\n\n\n\n\t\n\\section{Range of dimensions of microsets} \\label{s:character}\n\nThe goal of this section is to prove Theorem~\\ref{t:characterization} after some preparation. \n\n\\subsection{A description of the microsets of $K(x)^d$} The goal of this subsection is to prove Theorem~\\ref{t:Cx}, which provides us with a good tool to work with the microsets of $K(x)^d$. For technical reasons we generalize $\\mathcal{M}_K$ as follows. \n\n\\begin{definition}\n\tFor $d\\geq 1$ and $\\mathcal{F}\\subset \\mathcal{K}(\\mathbb{R}^d)$ define $\\mathcal{M}(\\mathcal{F})$ as the set of compact sets $K\\subset [0,1]^d$ for which $K\\cap (0,1)^d\\neq \\emptyset$ and there exist $K_n\\in \\mathcal{F}$, $\\lambda_n\\geq 1$, and $u_n\\in \\mathbb{R}^d$ such that $(\\lambda_n K_n+u_n)\\cap [0,1]^d\\to K$. \n\\end{definition}\t\n\n\\begin{fact} \\label{f:subset} Let $d\\geq 1$ and assume that $C_n\\subset K_n\\subset \\mathbb{R}^d$ are compact sets such that $C_n\\to C$ and $K_n\\to K$. Then $C\\subset K$.\n\\end{fact}\n\n\\begin{definition}\n\tFor $x\\in 2^{\\omega}$ and $n\\in \\omega$ define the finite set\n\t\\begin{equation*} \n\tF_n(x)=\\left\\{\\sum_{i=0}^{n-1} a_i 2^{-i-1}: a_i=0 \\text{ if } x(i)=0 \\text{ and } a_i\\in \\{0,1\\} \\text{ if } x(i)=1\\right\\}\n\t\\end{equation*}\n\tand let\n\t\\begin{equation*} \n\t\\mathcal{D}_n(x)=\\{2^{-n}K(T^n(x))+u: u\\in F_n(x)\\}.\n\t\\end{equation*}\n\tClearly, $\\bigcup \\mathcal{D}_n(x)=K(x)$ and elements of $\\mathcal{D}_n(x)$ have pairwise non-overlapping convex hulls.\n\\end{definition}\n\n\\begin{lemma} \\label{l:main} \n\tLet $E\\in \\mathcal{M}(\\{K(x): x\\in 2^{\\omega}\\})$. Assume $(\\lambda_n K(x_n)+u_n)\\cap [0,1]\\to E$ for some $\\lambda_n\\geq 1$, $x_n\\in 2^{\\omega}$, and $u_n\\in \\mathbb{R}$. Then there exist $x\\in 2^{\\omega}$, $c\\in \\mathbb{R}^+$, $m_n\\in \\omega$ for all $n$, a subsequence of positive integers $k_n\\uparrow \\infty$, a similar copy $C(x)$ of $K(x)$, $w_0=0$ and $w_1,w_2,w_3\\in \\mathbb{R}$ such that \n\t\\begin{enumerate} \n\t\t\\item \\label{e:T1} $T^{m_n}(x_{k_n})\\to x$, \n\t\t\\item \\label{e:T2} $\\lambda_{k_n}2^{-m_n}\\to c$, \n\t\t\\item \\label{e:T3} $C(x)\\subset E\\subset \\bigcup_{i=0}^3 (C(x)+w_i)$.\n\t\\end{enumerate}\n\\end{lemma}\n\\begin{proof}\n\tDefine $C^i_n=2^{-i} K(T^i(x_n))$ for all $i,n\\in \\omega$. Let $\\varepsilon\\in (0,1\/2)$ such that $E\\cap (\\varepsilon,1-\\varepsilon)\\neq \\emptyset$. For all $n$ let $\\varphi_n \\colon \\mathbb{R} \\to \\mathbb{R}$ be defined as $\\varphi_n(z)=\\lambda_n z+u_n$ and let $p_n\\in \\omega$ be the minimal number such that there is a $v^0_n\\in F_{p_n}(x_n)$ such that \n\t\\begin{equation} \\label{e:vn} \\varphi_n (C_n^{p_n}+v^0_n) \\subset [0,1].\n\t\\end{equation} \n\tBy the minimality of $p_n$ for all $n$ there are at most $4$ translations $v\\in F_{p_n}(x_n)$ satisfying \n\t\\[\\varphi_n(C_n^{p_n}+v)\\cap [0,1] \\neq \\emptyset,\\] \n\tassume that they are $v^0_n,\\dots,v_n^{\\ell_n}$ for some $\\ell_n\\in\\{0,1,2,3\\}$. \n\t\n\tFirst we show $\\lambda_n 2^{-p_n}\\geq \\varepsilon\/2$ for all $n$ large enough. Indeed, if $n$ is large enough then $\\varphi_n (K(x_n))\\cap (\\varepsilon,1-\\varepsilon)\\neq \\emptyset$. Thus for $k=p_n-1$ there is a $D\\in \\mathcal{D}_{k}(K(x_n))$ with $\\varphi_n(D)\\cap (\\varepsilon,1-\\varepsilon)\\neq \\emptyset$. Assume to the contrary that $\\lambda_n 2^{-p_n}<\\varepsilon\/2$. Then $\\diam \\varphi_n(D)\\leq \\lambda_n 2^{-k}<\\varepsilon$, so $\\varphi_n(D)\\subset [0,1]$, contradicting the minimality of $p_n$.\n\t\n\tNow let $q_n\\geq p_n$ be the minimal integer for which $\\lambda_n 2^{-q_n}\\leq 2$. We prove $x_n(i)=0$ for all $i\\in \\{p_n,\\dots,q_n-1\\}$. Assume to the contrary that this is not the case, and take the minimal $i$ such that $p_n\\leq i\\ell$. The proof is complete.\n\\end{proof}\n\n\\begin{theorem} \\label{t:Cx}\n\tLet $d\\geq 1$ and let $E\\in \\mathcal{M}(\\{K(x)^d: x\\in 2^{\\omega}\\})$. Assume that $(\\lambda_n K(x_n)^d+u_n)\\cap [0,1]^d \\to E$ for some $\\lambda_n\\geq 1$, $x_n\\in 2^{\\omega}$, and $u_n\\in \\mathbb{R}^d$. Then there exist $x\\in 2^{\\omega}$, $m_n\\in \\omega$ for all $n$, a subsequence of positive integers $k_n\\uparrow \\infty$, a similar copy $C(x)$ of $K(x)$, and $v_1,\\dots,v_\\ell\\in \\mathbb{R}^d$ such that \n\t\\begin{enumerate}[(i)]\n\t\t\\item \\label{e:d1} $T^{m_n}(x_{k_n})\\to x$,\n\t\t\\item \\label{e:d2} $C(x)^d+v_1\\subset E\\subset \\bigcup_{i=1}^\\ell (C(x)^d+v_i)$. \n\t\\end{enumerate}\n\\end{theorem}\n\\begin{proof} Let $u_n=(u_n^1,\\dots, u_n^d)$ for all $n$. It easily follows that $E=E_1\\times\\dots \\times E_d$, where $E_i\\subset [0,1]$ are compact sets such that $E_i\\cap (0,1)\\neq \\emptyset$ and \n\t\\begin{equation*} \n\t(\\lambda_n K(x_n)+u^i_n)\\cap [0,1] \\to E_i \\text{ as } n\\to \\infty\n\t\\end{equation*}\n\tfor all $1\\leq i\\leq d$. Applying Lemma~\\ref{l:main} for all $1\\leq i\\leq d$ successively implies that there exist $z_i\\in 2^{\\omega}$, $c_i\\in \\mathbb{R}^+$, $m_{i,n}\\in \\omega$ for all $n$, a subsequence of positive integers $k_{n}\\uparrow \\infty$ (note that this does not depend on $i$), a similar copy $C(z_i)$ of $K(z_i)$, and $w_{i,j}\\in \\mathbb{R}$ for $0\\leq j\\leq 3$ such that \n\t\\begin{enumerate} \n\t\t\\item \\label{e:dd1} $T^{m_{i,n}}(x_{k_n})\\to z_i$, \n\t\t\\item \\label{e:dd2} $\\lambda_{k_n}2^{-m_{i,n}}\\to c_i$, \n\t\t\\item \\label{e:dd3} $C(z_i)\\subset E_i\\subset \\bigcup_{j=0}^3 (C(z_i)+w_{i,j})$. \n\t\\end{enumerate}\n\tBy \\eqref{e:dd2} for large enough $n$ and for all $1\\leq i\\leq j\\leq d$ we obtain that $m_{i,n}-m_{j,n}$ is independent of $n$. We may assume that $m_{1,n}-m_{i,n}=\\ell_i\\in \\mathbb{N}$ for any $1\\leq i\\leq d$ and any large enough $n$. Let $m_n=m_{1,n}$ and $x=z_1$, then clearly \\eqref{e:d1} holds. By \\eqref{e:dd1} we obtain $x=T^{\\ell_i}(z_i)$ for all $1\\leq i\\leq d$. Therefore, $C(z_i)$ is a union of at most $2^{\\ell_i}$ many translates of $C(x)$ for all $1\\leq i\\leq d$, so taking the product of \\eqref{e:dd3} for all $i\\in \\{1,\\dots,d\\}$ implies \\eqref{e:d2} with $\\ell= \\prod_{i=1}^d 2^{\\ell_i+2}$, which finishes the proof.\n\\end{proof}\n\n\n\\subsection{Useful lemmas for analytic sets and balanced sequences} The goal of this subsection is to prove Lemmas~\\ref{l:varphi existence} and \\ref{l:balanced}.\n\n\\begin{fact} \\label{f:Gd}\nLet $A \\subset [0,\\infty)$ be a non-empty analytic set. Then there exist a $G_\\delta$ set $G \\subset 2^\\omega$ and a continuous map $f \\colon G \\to [0,\\infty)$ such that $f(G) = A$.\n\\end{fact} \n\\begin{proof} \nLet $g \\colon 2^\\omega \\to [0,1]$ be a continuous surjection, and let $\\psi \\colon [0, 1) \\to [0, \\infty)$ be a homeomorphism. Since $g^{-1}(\\psi^{-1}(A)) \\subset 2^\\omega$ is analytic, by \\cite[Exercise~14.3]{Ke} we can find a $G_\\delta$ set $H \\subset 2^\\omega \\times 2^\\omega$ such that $\\pi_1(H) = g^{-1}(\\psi^{-1}(A))$, where $\\pi_1$ denotes the projection onto the first coordinate. Let $h\\colon 2^{\\omega } \\to 2^\\omega \\times 2^\\omega$ be a homeomorphism. As $g(g^{-1}(\\psi^{-1}(A))) = \\psi^{-1}(A)$, taking $G=h^{-1}(H)$ and $f=\\psi \\circ g \\circ \\pi_1\\circ h|_{G}$ finishes the proof. \n\\end{proof} \n\n\\begin{definition} \nFor $s\\in 2^{<\\omega}$ we denote by $\\length(s)$ the number of coordinates of $s$, where $\\length(\\emptyset)=0$. Define \n\\begin{equation*} \n[s]=\\{x\\in 2^{\\omega}: x\\restriction \\length(s)=s\\}.\n\\end{equation*} \n\\end{definition} \n\n\\begin{lemma}\n\\label{l:varphi existence}\nLet $A \\subset [0,\\infty)$ be a non-empty analytic set. Then there exists a map $\\varphi \\colon 2^{<\\omega} \\to [0, \\infty)$ such that\n\\begin{equation*} \n\\overline{\\varphi}(x) = \\lim_{n \\to \\infty} \\varphi(x \\restriction n)\n\\end{equation*} \nexists for each $x \\in 2^\\omega$, and the resulting function $\\overline{\\varphi}$ satisfies $\\overline{\\varphi}(2^\\omega) = A$. \n\\end{lemma}\n\\begin{proof}\nAccording to Fact~\\ref{f:Gd} we can choose a $G_\\delta$ set $G \\subset 2^\\omega$ and a continuous map $f \\colon G \\to [0, \\infty)$ such that $f(G) = A$. The set $F = 2^\\omega \\setminus G$ is $F_{\\sigma}$, so it can be written as $F = \\bigcup_{n=1}^{\\infty} F_n$ where $F_n\\subset 2^{\\omega}$ are closed and $F_n \\subset F_{n+1}$ for all $n\\geq 1$. We define $\\varphi$ on an element $s \\in 2^{<\\omega}$ by induction on the length of $s$. \nFix $a_0\\in A$ arbitrarily and define $\\varphi(\\emptyset) = a_0$. Now suppose that $\\varphi$ is already defined on $s \\in 2^{<\\omega}$, our task is to define it on $s^\\frown c$ where $c \\in \\{0, 1\\}$. \nIf $[s^\\frown c] \\cap F = \\emptyset$ then let $\\varphi(s^\\frown c)$ be an arbitrary element of $f([s^\\frown c])$. If $[s^\\frown c] \\cap G = \\emptyset$ then let $\\varphi(s^\\frown c) = \\varphi(s)$. \n\t\nIt remains to define $\\varphi(s^\\frown c)$ if $[s^\\frown c]$ intersects both $G$ and $F$. Let $m(s^\\frown c)$ and $m(s)$ be the smallest indices with $[s^\\frown c] \\cap F_{m(s^\\frown c)} \\neq \\emptyset$ and $[s] \\cap F_{m(s)} \\neq \\emptyset$, respectively. If $m(s^\\frown c) = m(s)$ then let $\\varphi(s^\\frown c) = \\varphi(s)$. Otherwise, let $\\varphi(s^\\frown c)$ be an arbitrary element of $f([s^\\frown c] \\cap G)$, concluding the definition of $\\varphi$. \n\t\nIt remains to check that $\\varphi$ satisfies the conditions of the lemma. First note that \n\\begin{equation} \\label{e:varphi s in A}\n\\varphi(s) \\in A \\text{ for each } s \\in 2^{<\\omega},\n\\end{equation}\na fact that can be quickly checked by induction. Let $x \\in 2^\\omega$ be fixed. It is enough to show that $\\overline{\\varphi} (x) = \\lim_{n \\to \\infty} \\varphi(x \\restriction n)$ exists, $\\overline{\\varphi}(x) \\in A$, and if $x \\in G$ then $\\overline{\\varphi}(x) = f(x)$. \n\t\nFirst assume that $[x \\restriction m] \\cap F = \\emptyset$ for some $m$. Then $\\varphi(x \\restriction n)$ is an element of $f([x \\restriction n])$ for each $n \\ge m$. Hence, using the continuity of $f$ and the fact that $x \\in G$, we obtain $\\varphi(x\\restriction n) \\to f(x) \\in A$. \n\t\nNow suppose that $[x \\restriction m] \\cap G = \\emptyset$ for some $m$. The definition of $\\varphi$ and \\eqref{e:varphi s in A} imply that there exists $a \\in A$ such that $\\varphi(x \\restriction n) = a$ for all $n\\geq m$. It follows that $\\varphi(x \\restriction n) \\to a \\in A$. Note that in this case $x \\in F$, so we do not have to check that $\\overline{\\varphi}(x) = f(x)$.\n\t\nFinally, assume that $[x \\restriction n]$ intersects both $G$ and $F$ for each $n$. Clearly $m(x \\restriction n)$ increases as $n \\to \\infty$. Suppose first that $m(x \\restriction n) \\to \\infty$. Then $x \\not \\in F_n$ for each $n$, hence $x \\in G$. Also, for infinitely many $n$, the value of $\\varphi(x \\restriction n)$ is chosen from $f([x \\restriction n])$, and when it is not, then $\\varphi(x \\restriction n) = \\varphi(x \\restriction (n - 1))$. It follows that $\\varphi(x \\restriction n) \\to f(x) \\in A$. Finally, assume that $m(x \\restriction n) $ converges, that is, there exists $m$ such that $m(x \\restriction n)= m$ for all large enough $n$. Then $[x \\restriction n] \\cap F_m \\neq \\emptyset$ for each $n$, hence $x \\in F_m \\subset F$, so we do not need to check $\\overline{\\varphi}(x) = f(x)$. Using \\eqref{e:varphi s in A} it also follows that there exists $a \\in A$ such that $\\varphi(x \\restriction n) = a$ if $n$ is large enough. The proof is complete.\n\\end{proof}\n\n\\begin{definition}\n We call $s\\in 2^{<\\omega}$ a \\emph{subsequence} of $x\\in 2^{\\omega}$ if \\begin{equation*} \n s = (x(k), x(k+1), \\dots, x(k+n-1))\n \\end{equation*} \nfor some $k, n\\in \\omega$. Such a relation is denoted by $s \\in x$. Let $I\\subset \\omega$ be a \\emph{discrete interval} if $I=\\{k,\\dots,k+n-1\\}$ for some $k,n\\in \\omega$, then define $x\\restriction I=(x(k),\\dots,x(k+n-1))$. For two discrete intervals $I,J\\subset \\omega$ we write $Ik$. Then clearly $x_n \\restriction I_1 \\in s_n^0$ and $x_n \\restriction I_2 \\in s_n^0$, or $x_n\\restriction I_3 \\in s_n^1$ and $x_n\\restriction I_4 \\in s_n^1$. Using that both $s_n^0$ and $s_n^1$ are subsequences of $\\alpha$ or $\\beta$, and the fact that $x$ and $x_n$ coincide on these intervals, we obtain a contradiction.\n\\end{proof}\n\t\n\\subsection{The proof of the Main Theorem} Finally, in this subsection we are ready to prove Theorem~\\ref{t:characterization}. We need the following technical lemma which is implicitly contained in \\cite{microsets}.\n\n\\begin{lemma}\n\\label{l:building K}\nLet $K_n \\subset [0, 1]^d$ be compact sets such that $\\dim_H E=\\overline{\\dim}_B \\, E$ for all $E\\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1})$ and let $\\gamma=\\sup\\{ \\dim_H K_n: n\\geq 1\\}$. Then there exists a compact set $K\\subset [0,1]^d$ such that \n\\begin{equation*}\n\\dim_H E=\\overline{\\dim}_B \\, E \\text{ for all } E\\in \\mathcal{M}_K \n\\end{equation*}\nand \n\\begin{equation*} \\{\\dim_H E : E \\in \\mathcal{M}_K\\} =\\left\\{\\dim_H E : E \\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1})\\right\\} \\cup \\{\\gamma\\}.\n\\end{equation*} \n\\end{lemma}\n\\begin{proof}\nApply the proof of \\cite[Theorem~1.3]{microsets} to the multiset $\\Omega^0=\\{Q_i\\}_{i\\geq 1}$, where $\\Omega^0$ is an enumeration of $\\{K_n\\}_{n\\geq 1}$ such that each set $K_n$ is repeated infinitely often. \n\\end{proof}\n\t\n\\begin{theorem}[Main Theorem]\n\\label{t:characterization}\nLet $\\dim$ be one of $\\dim_H$, $\\underline{\\dim}_B$, or $\\overline{\\dim}_B$.\nLet $d\\geq 1$ and let $A \\subset [0, d]$ be a non-empty set. Then the following are equivalent:\n\\begin{enumerate}\n\\item \\label{i2} There exists a compact set $K \\subset \\mathbb{R}^d$ such that $\\{\\dim E : E \\in \\mathcal{M}_K\\} = A$;\n\\item \\label{i3} $A$ is an analytic set which contains its infimum and supremum;\n\\item \\label{i1} There exists a compact set $K \\subset \\mathbb{R}^d$ such that $\\dim_H E=\\overline{\\dim}_B \\, E$ for all $E\\in \\mathcal{M}_K$ and $\\{\\dim_H E : E \\in \\mathcal{M}_K\\} = A$.\n\\end{enumerate} \n\\end{theorem}\n\n\\begin{proof} \nThe direction $\\eqref{i1} \\Rightarrow \\eqref{i2}$ is straightforward by Fact~\\ref{f:ineq}.\n\nNow we prove $\\eqref{i2} \\Rightarrow \\eqref{i3}$. Assume that $A = \\{\\dim E : E \\in \\mathcal{M}_K\\}$ for some compact set $K \\in \\mathcal{K}(\\mathbb{R}^d)$. Theorem~\\ref{t:Fu} yields that $A$ contains its infimum and supremum as well. To see that $A$ is analytic, note that the set $\\mathcal{M}_K$ is $F_\\sigma$, since the set $\\{E \\in \\mathcal{M}_K : E \\cap [\\varepsilon, 1 - \\varepsilon]^d \\neq \\emptyset\\}$ is closed for any $\\varepsilon \\in (0,1\/2)$. Mattila and Mauldin \\cite{MM} proved that the mapping $\\dim \\colon \\mathcal{K}(\\mathbb{R}^d)\\to [0,d]$ is Borel measurable. Therefore, we obtain that $A$ is the image of a Borel set under a Borel map, hence it is analytic by \\cite[Proposition~14.4]{Ke}. \n\t\nFinally, we show $\\eqref{i3} \\Rightarrow \\eqref{i1}$. Fix an analytic set $A \\subset [0, d]$ which contains its infimum and supremum. Define $B=\\{z\/d: z\\in A\\}$, then $B\\subset [0,1]$ is analytic, and set $a = \\min B$ and $b = \\max B$. If $a = b = 0$, then $K$ can be a singleton. Hence we may assume that $b > 0$. Applying Lemma \\ref{l:varphi existence} for the analytic set $B$ yields a map $\\varphi \\colon 2^{<\\omega} \\to [0,\\infty)$ such that $\\overline{\\varphi}(x) = \\lim_{n \\to \\infty} \\varphi(x \\restriction n)$ exists for all $x\\in 2^{\\omega}$ and $\\overline{\\varphi}(2^{\\omega})=B$. We may assume that \n\\begin{equation}\n\\label{e:q3 a <= varphi <= b}\na \\le \\varphi(s) \\le b \\text{ for each $s \\in 2^{<\\omega}$.}\n\\end{equation}\nIndeed, let us replace a value $\\varphi(s)$ by $a$ if $\\varphi(s) < a$, and replace $\\varphi(s)$ by $b$ if $\\varphi(s) > b$. As $\\overline{\\varphi}(x) \\in B \\subset [a, b]$ for each $x \\in 2^\\omega$, the values of $\\overline{\\varphi}$ do not change by modifying $\\varphi$ in this way. \n\t\nWe now construct a continuous map $\\psi \\colon 2^\\omega \\to 2^\\omega$ and then use compact sets of the form $(K(\\psi(x)))^d$ to construct $K$. Let $\\alpha$ and $\\beta$ be the sequences provided by Lemma~\\ref{l:balanced} for $a$ and $b$. To construct $\\psi$, first we specify a mapping $\\phi \\colon 2^{<\\omega} \\to 2^{<\\omega}$ such that $\\phi(s)$ is a subsequence of either $\\alpha$ or $\\beta$ for all $s\\in 2^{<\\omega}$. Let $\\phi(\\emptyset) = \\emptyset$. For $s \\in 2^{<\\omega}$ with $\\length(s)=n\\geq 1$ define $\\phi(s) = (\\alpha \\restriction n) ^\\frown (\\beta \\restriction k)$, where $k=k(s)$ is a positive integer such that $ \\sqrt{n}-10$ and $\\beta$ is balanced with $\\varrho(\\beta)=b>0$, we obtain that $\\psi(x)\\neq \\mathbf{0}$ for all $x\\in 2^{\\omega}$, where $\\mathbf{0}\\in 2^{\\omega}$ is the zero sequence. We now claim that $\\psi$ satisfies \n\\begin{equation} \\label{e:dvarphi}\n\\varrho(\\psi(x)) = \\overline{\\varphi}(x)\\text{ for each $x \\in 2^\\omega$.} \n\\end{equation}\nLet us fix $x \\in 2^\\omega$, and let \n\\begin{equation*} \n\\psi_n(x) = \\phi(x \\restriction 0) ^\\frown \\phi(x \\restriction 1) ^\\frown \\dots ^\\frown \\phi(x \\restriction n).\n\\end{equation*} \nAn elementary calculation using $k(s)=o(n^2)$ as $\\length(s)=n\\to \\infty$ shows that \n\\begin{equation*} \n\\frac{\\length(\\phi(x \\restriction n))}{\\length(\\psi_n(x))} \\to 0 \\text{ as } n \\to \\infty,\n\\end{equation*} \nhence it is enough to show that $\\varrho(\\psi_n(x)) \\to \\overline{\\varphi}(x)$. Therefore, it is enough to show that $\\varrho(\\phi(x \\restriction n)) \\to \\overline{\\varphi}(x)$. Since $\\alpha$ and $\\beta$ are balanced, for $k=k(x \\restriction n)$ we obtain \n\\begin{equation} \\label{e:nk}\n|\\varrho(\\alpha \\restriction n) - a| \\le \\frac{1}{n} \\quad \\text{and} \\quad \n|\\varrho(\\beta \\restriction k) - b| \\le \\frac{1}{k}.\n\\end{equation} \nThen \\eqref{e:q3 lambda close to varphi} and \\eqref{e:nk} imply that \n\\begin{align*} \n|\\varrho(\\phi(x \\restriction n)) - \\varphi(x \\restriction n) |&= \\left|\\frac{n \\varrho(\\alpha \\restriction n) +k \\varrho(\\beta \\restriction k)}{n + k} - \\varphi(x \\restriction n)\\right| \\\\\n&\\le \\frac{2}{n + k} + \\frac{2}{\\sqrt{n}},\n\\end{align*}\nwhich tends to $0$. This implies that $\\varrho(\\phi(x \\restriction n)) \\to \\overline{\\varphi}(x)$, so the proof of \\eqref{e:dvarphi} is complete.\n\t\nFinally, we can construct $K$. As $\\psi$ is continuous, Fact~\\ref{f:cont} implies that the map\n\\begin{equation} \\label{e:K_x}\nx \\mapsto K(\\psi(x)) \\text{ is also continuous.}\n\\end{equation}\nLet $\\{x_n\\}_{n\\geq 1}$ be a dense subset of $2^\\omega$ with $\\overline{\\varphi}(x_1) = b$. Let $K_n = K(\\psi(x_n))^d$ for all $n\\geq 1$. First we show that \n\\begin{equation} \\label{e:subs} A\\subset \\{\\dim_H E : E \\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1})\\}.\n\\end{equation} \nLet $z \\in A$ be arbitrary. By the definition of $\\varphi$ there exists $x \\in 2^\\omega$ such that $\\overline{\\varphi}(x) = z\/d\\in B$. Fact~\\ref{f:dim} and \\eqref{e:dvarphi} imply\n\\begin{equation*} \n\\dim_H (K(\\psi(x))^d)=d \\varrho(\\psi(x))=z.\n\\end{equation*} \nAs $\\{x_n\\}_{n\\geq 1}$ is dense in $2^{\\omega}$, we can find a sequence $k_n$ such that $x_{k_n} \\to x$. By \\eqref{e:K_x} we obtain that \n\\begin{equation*} \nK_{k_n}=K(\\psi(x_{k_n}))^d \\to K(\\psi(x))^d \\quad \\text{as} \\quad n\\to \\infty.\n\\end{equation*} \nAs $\\psi(x)\\neq \\mathbf{0}$, we obtain $K(\\psi(x))\\cap (0,1)\\neq \\emptyset$, hence $K(\\psi(x))^d\\cap (0,1)^d\\neq \\emptyset$. Thus $K(\\psi(x))^d \\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1})$, so $z\\in \\{\\dim_H E : E \\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1})\\}$ proving \\eqref{e:subs}.\n\nNow it is enough to prove that \n\\begin{equation} \\label{e:EiG} \n\\dim_H E=\\overline{\\dim}_B \\, E\\in A \\text{ for all } \nE \\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1}).\n\\end{equation} \nIndeed, note that $\\sup\\{ \\dim_H K_n: n\\geq 1\\}=\\dim_H K_1$ and $K_1\\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1})$. Then \\eqref{e:subs}, \\eqref{e:EiG}, and Lemma~\\ref{l:building K} will immediately imply \\eqref{i1}. \n\nFinally, we prove \\eqref{e:EiG}. Let $E \\in \\mathcal{M}(\\{K_n\\}_{n\\geq 1})$ and let $\\dim$ be one of $\\dim_H$ or $\\overline{\\dim}_B$, we will calculate $\\dim E$ independently of the choice of the dimension. Since we are only interested in $\\dim E$, by Theorem~\\ref{t:Cx} we may suppose that $E=K(y)^d$ for some $y\\in 2^{\\omega}$ for which there exists a subsequence of positive integers $k_n\\uparrow \\infty$ and $m_n\\in \\omega$ such that $T^{m_n}(\\psi(x_{k_n}))\\to y$. We may assume by choosing a subsequence that $x_{k_n}\\to x$ for some $x \\in 2^\\omega$. \n\nFirst suppose that $\\{m_n\\}_{n\\geq 1}$ is bounded. By choosing a subsequence we may assume that $m_n=m$ for all $n$. The continuity of $\\psi$ implies $y=T^m(\\psi(x))$. As $\\varrho(T^m(\\psi(x)))=\\varrho(\\psi(x))$, using \\eqref{e:dvarphi} and $\\overline{\\varphi}(x)\\in B$ we obtain \n\\begin{equation*} \\dim E=\\dim (K(y)^d)=\\dim (K(\\psi(x))^d)=d\\varrho(\\psi(x))=d\\overline{\\varphi}(x)\\in A,\n\\end{equation*} \nand we are done. \n\nFinally, assume that $\\{m_n\\}_{n\\geq 1}$ is not bounded. We may suppose by choosing a subsequence that $m_n\\to \\infty$. Applying Lemma \\ref{l:balanced} for $T^{m_n}(\\psi(x_{k_n}))\\in 2^{\\omega}$ implies that $\\varrho(y)=a$ or $\\varrho(y)=b$, so \n\\begin{equation*}\n\\dim E=\\dim (K(y)^d)=d\\varrho(y)\\in \\{\\min A, \\max A\\}, \n\\end{equation*} \nwhich finishes the proof of \\eqref{e:EiG}. The proof of the theorem is complete.\n\\end{proof}\n\n\n\n\n\n\\section{Compact families of compact sets} \\label{s:K}\n\n\\subsection{The case of Hausdorff dimension} \\label{ss:Haus}\nThe goal of this subsection is to prove Theorem~\\ref{t:compact family} after some preparation. We define parametrized fractal percolations in axis parallel cubes $Q\\subset \\mathbb{R}^d$ as follows.\n\n\n\\begin{definition} \\label{d:p}\nLet $Q\\subset \\mathbb{R}^d$ be an axis parallel cube with side length $r$. For all $n\\in \\mathbb{N}^+$ we denote by $\\mathcal{D}_n$ the collection of compact dyadic subcubes of $Q$ of side length $r2^{-n}$. Given $\\alpha_n\\in [0,d]$ for all $n\\geq 1$, we construct a random compact set $\\Gamma(\\{\\alpha_n\\}_{n\\geq 1})\\subset Q$ as follows. We keep each of the $2^d$ cubes in $\\mathcal{D}_1$ with probability $2^{-\\alpha_1}$. Let $\\Delta_1\\subset \\mathcal{D}_1$ be the collection of kept cubes and let $S_1=\\bigcup \\Delta_1$ be their union. If $\\Delta_{n-1}\\subset \\mathcal{D}_{n-1}$ and $S_{n-1}=\\bigcup \\Delta_{n-1}$ are already defined, then we keep each cube in $D\\in \\mathcal{D}_{n}$ for which $D\\subset S_{n-1}$ independently with probability $2^{-\\alpha_{n}}$. Denote by $\\Delta_{n}\\subset \\mathcal{D}_{n}$ the collection of kept cubes and by $S_{n}=\\bigcup \\Delta_{n}$ their union. Define our \\emph{percolation limit set with generation dependent retention probabilities $2^{-\\alpha_n}$} as\n\\begin{equation*} \n\\Gamma(\\{\\alpha_n\\}_{n\\geq 1})=\\bigcap_{n=1}^{\\infty} S_n.\n\\end{equation*}\nIf $\\alpha_n=\\alpha$ for all $n\\geq 1$ then we simply use the notation $\\Gamma(\\alpha)$ instead of $\\Gamma(\\{\\alpha_n\\}_{n\\geq 1})$.\n\nWe say that a random set $X$ \\emph{stochastically dominates} $Y$ if they can be defined on a common probability space (coupled) such that $Y\\subset X$ almost surely. For two sets $A,B$ we write $A\\subset^{\\star} B$ if $A\\setminus B$ is countable. \n\\end{definition}\n\nThe following theorem is due to Hawkes \\cite[Theorem~6]{H} in the context of trees, see also \\cite[Theorem~9.5]{MP}.\n\n\\begin{theorem}[Hawkes] \\label{t:H} For every $\\beta\\in [0,d]$ and every compact set $K\\subset Q$ the following properties hold\n\\begin{enumerate}\n\\item \\label{e:H1} if $\\dim_H K<\\beta$, then almost surely, $K\\cap \\Gamma(\\beta)=\\emptyset$,\n\\item \\label{e:H2} if $\\dim_H K>\\beta$, then $K\\cap \\Gamma(\\beta)\\neq \\emptyset$ with positive probability,\n\\item \\label{e:H3} if $\\dim_H K>\\beta$, then almost surely, $\\dim_H(K\\cap \\Gamma(\\beta))\\leq \\dim_H K-\\beta$.\n\\end{enumerate} \n\\end{theorem}\n\n\\begin{lemma} \\label{l:H}\nLet $K\\subset Q$ be compact with $\\dim_H K=\\gamma$ and let $0<\\beta <\\gamma$. Then there exists a constant $c=c(Q,K,\\beta)>0$ such that the following holds. If $\\alpha_n \\in [0,\\beta]$ for all $n\\geq 1$ and $\\alpha_n\\to \\alpha $, then \n\\begin{equation} \\label{e:Kc}\n\\P(\\dim_H ( K\\cap \\Gamma(\\{ \\alpha_n \\}_{n\\geq 1}))\\geq \\beta-\\alpha)\\geq c.\n\\end{equation}\n\\end{lemma}\n\\begin{proof} Define $c=\\P(K\\cap \\Gamma(\\beta)\\neq \\emptyset)$, we have $c>0$ by Theorem~\\ref{t:H}~\\eqref{e:H2}. For all $n\\geq 1$ let $\\delta_n=\\beta-\\alpha_n\\geq 0$ and consider $K\\cap \\Gamma(\\{\\alpha_n\\}_{n\\geq 1})\\cap \\Gamma(\\{\\delta_n\\}_{n\\geq 1})$, where $\\Gamma(\\{\\alpha_n\\}_{n\\geq 1})$ and $\\Gamma(\\{\\delta_n\\}_{n\\geq 1})$ are independent. Since $\\Gamma(\\{\\alpha_n\\}_{n\\geq 1})\\cap \\Gamma(\\{\\delta_n\\}_{n\\geq 1})$ stochastically dominates $\\Gamma(\\beta)$, we obtain\n\t\\begin{equation} \\label{e:gamma1} \n\t\\P(K\\cap \\Gamma(\\{\\alpha_n\\}_{n\\geq 1})\\cap \\Gamma(\\{\\delta_n\\}_{n\\geq 1})\\neq \\emptyset)\\geq c.\n\t\\end{equation} \nAs $\\Gamma(\\{\\delta_n\\}_{n\\geq 1})$ is stochastically dominated by the union of finitely many affine copies of $\\Gamma(\\delta)$ for any given $\\delta<\\beta-\\alpha$, Theorem~\\ref{t:H}~\\eqref{e:H1}, the independence of $\\Gamma(\\{\\alpha_n\\}_{n\\geq 1})$ and $\\Gamma(\\{\\delta_n\\}_{n\\geq 1})$, and Fubini's theorem imply \n\t\\begin{equation*} \n\t\\P(K\\cap \\Gamma(\\{\\alpha_n\\}_{n\\geq 1})\\cap \\Gamma(\\{\\delta_n\\}_{n\\geq 1})\\neq \\emptyset \\text{ and } \\dim_H(K\\cap \\Gamma(\\{\\alpha_n\\}_{n\\geq 1}))<\\beta-\\alpha)=0.\n\t\\end{equation*}\nThis and \\eqref{e:gamma1} imply \\eqref{e:Kc}, and the proof is complete.\n\\end{proof}\n\n\n\n\\begin{theorem}\n\\label{t:compact family}\nLet $K \\subset \\mathbb{R}^d$ be a non-empty compact set and let $A \\subset [0, \\dim_H K]$. The following statements are equivalent: \n\\begin{enumerate}\n\\item \\label{ic1} There is a compact set $\\mathcal{C} \\subset \\mathcal{K}(K)$ with $\\{\\dim_H C : C \\in \\mathcal{C}\\} = A$;\n\\item \\label{ic2} $A$ is an analytic set. \n\\end{enumerate} \n\\end{theorem}\n\n\\begin{proof} \nFirst we prove $\\eqref{ic1} \\Rightarrow \\eqref{ic2}$. Since $\\dim_H \\colon \\mathcal{K}(\\mathbb{R}^d)\\to [0,d]$ is Borel measurable by \\cite[Theorem 2.1]{MM}, if $\\{\\dim_H C : C \\in \\mathcal{C}\\} = A$ then $A$ must be analytic as the image of a compact set under a Borel map, see e.g.~\\cite[Proposition~14.4]{Ke}. \t\n\t\nNow we show $\\eqref{ic2} \\Rightarrow \\eqref{ic1}$. If $A=\\emptyset$ then $\\mathcal{C}=\\emptyset$ works, so we may suppose that $A\\subset [0,\\dim_H K]$ is non-empty and analytic. Let $\\gamma=\\dim_H K$. We may assume that $A \\subset(0, \\gamma]$, since if an appropriate family $\\mathcal{C}$ for $A \\cap (0, \\dim_H K]$ is constructed, then $\\mathcal{C}\\cup\\{\\{ y \\}\\}$ works for $A$ for any $y\\in K$. By Fact~\\ref{f:dimK} we can fix $y_0 \\in K$ such that $\\dim_H (K \\cap U)= \\dim_H K $ for any open neighborhood $U$ of $y_0$. \n\t\nFix a sequence of positive numbers $\\beta_k \\uparrow \\dim_H K $, and for all $k\\geq 1$ let $Q_k$ be a cube around $y_0$ of side length $1\/k$. Fix $k\\geq 1$ arbitrarily, and let $c_k>0$ be the constant we obtain by applying Lemma~\\ref{l:H} for $K\\cap Q_k\\subset Q_k$ and $\\beta_k$. Choose $i_k\\in \\mathbb{N}^+$ large enough so that \n\\begin{equation}\n\\label{e:choice of i_k}\n(1-c_k)^{i_k} < \\frac 12.\n\\end{equation}\nWe will run $i_k$ independent, parameterized family of percolations inside $Q_k$. For all $n\\geq 0$ let $\\mathcal{D}_n^k$ denote the collection of dyadic subcubes of $Q_k$ with side length $(1\/k)2^{-n}$ and let $\\mathcal{D}^k=\\bigcup_{n=1}^{\\infty} \\mathcal{D}_n^k$. For any $D\\in \\mathcal{D}^k$ let $u^k_i(D)$ be a random variable uniformly distributed in $[0, 1]$ such that the family $\\{u^k_i(D): k \\ge 1, \\, i \\leq i_k, \\, D \\in \\mathcal{D}^k\\}$ is independent. Assume that a sequence $\\{\\alpha_n\\}_{n\\geq 1}$ is given such that $\\alpha_n\\in [0,\\gamma)$ for all $n\\geq 1$ and $\\alpha_n \\to \\alpha \\in [0,\\gamma)$. We define $\\Gamma_i^k(\\{ \\alpha_n \\}_{n\\geq 1})$ as follows. Let $S_0=Q_k$ and $\\mathcal{D}^k_0=\\{Q_k\\}$, and for each $1\\leq i\\leq i_k$ let \n\\begin{align*} \n&\\Delta_1=\\Delta_{i,1}^k(\\{\\alpha_n\\}_{n\\geq 1})=\\{D\\in \\mathcal{D}_1^k: u_i^k(D)\\leq 2^{-\\alpha_1} \\}, \\\\\n&S_1=S_{i,1}^k(\\{\\alpha_n\\}_{n\\geq 1})=\\bigcup \\Delta_1.\n\\end{align*} \nIf $\\Delta_{m-1}$ and $S_{m-1}$ are already defined, let \n\\begin{align*} \n&\\Delta_{m}=\\Delta_{i,m}^k(\\{\\alpha_n\\}_{n\\geq 1})=\\{D\\in \\mathcal{D}_m^k: D\\subset S_{m-1} \\text{ and } u_i^k(D)\\leq 2^{-\\alpha_m} \\}, \\\\\n&S_m=S_{i,m}^k(\\{\\alpha_n\\}_{n\\geq 1})=\\bigcup \\Delta_m.\n\\end{align*} \nFinally, we define \n\\begin{equation*} \n\\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1}) = \\bigcap_{m=0}^{\\infty} S_m.\n\\end{equation*} \nSince for any $\\delta < \\alpha$ the percolation $\\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1})$ is stochastically dominated by the union of finitely many affine copies of $\\Gamma(\\delta)$, by Theorem~\\ref{t:H}~\\eqref{e:H3} for all $1\\leq i\\leq i_k$ we obtain\n\\begin{equation}\n\\label{e:percolation probability}\n\\P\\left(\\dim_H \\left(K \\cap \\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1})\\right) \n\\le \\gamma- \\alpha\\right) = 1.\n\\end{equation}\nMoreover, if $\\alpha_n \\in [0,\\beta_k]$ for all $n\\geq 1$, then Lemma~\\ref{l:H}, \\eqref{e:choice of i_k}, and the independence of the processes $\\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1})$ for $1\\leq i\\leq i_k$ imply \n\\begin{equation}\n\\label{e:percolation probability 2}\n\\P\\left(\\dim_H \\left(K \\cap \\left(\\bigcup_{i=1 }^{i_k}\\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1})\\right)\\right) \\ge \\beta_k - \\alpha \\right) \\geq \\frac 12.\n\\end{equation}\nFor each $k \\ge 1$ from each cube $D \\in \\mathcal{D}^k$ satisfying $D \\cap K \\neq \\emptyset$ we choose a point $z_D \\in D \\cap K$. For all \n$n\\geq 0$ let \n\\begin{equation*} \n\\mathcal{C}^k_n=\\{D\\in \\mathcal{D}^k_n: D\\cap K\\neq \\emptyset\\},\n\\end{equation*}\t\nand define the countable random set\n\\begin{equation*}\nF^k_i(\\{\\alpha_n\\}_{n \\geq 1}) = \\bigcup_{n=0}^{\\infty} \\big\\{z_D : D \\in \\mathcal{C}^k_n, \\, D \\subset S_n,\\text{ and } \\nexists C\\in \\mathcal{C}^k_{n+1} \\text{ with } C\\subset S_{n+1} \\cap D \\big\\}.\n\\end{equation*}\nWe now claim that \n\\begin{equation}\\label{e:set is compact}\nF^k_i(\\{\\alpha_n\\}_{n \\geq 1}) \\cup \\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1}) \\text{ is compact for each $k \\ge 1$ and $1\\leq i \\leq i_k$}.\n\\end{equation} \nIndeed, $F^k_i(\\{\\alpha_n\\}_{n \\geq 1}) \\setminus S_m$ is finite for all $m\\geq 1$, hence $S_m^* = S_m \\cup F^k_i(\\{\\alpha_n\\}_{n \\geq 1})$ is compact. Therefore $F^k_i(\\{\\alpha_n\\}_{n \\geq 1}) \\cup \\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1}) = \\bigcap_{m=1}^{\\infty} S_m^*$ is compact as well, which completes the proof of \\eqref{e:set is compact}. \n\t\nFor all $1\\leq i\\leq i_k$ let \n\\begin{equation*} \n\\Gamma^{*}_{k,i}(\\{\\alpha_n\\}_{n \\geq 1})=F^k_i(\\{\\alpha_n\\}_{n \\geq 1}) \\cup \\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1}), \n\\end{equation*}\nand define\n\\begin{equation*} \n\\Gamma^*(\\{\\alpha_n\\}_{n \\geq 1}) = \\{x \\} \\cup \\bigcup_{k=1}^{\\infty} \\bigcup_{i=1}^{i_k} \\Gamma^{*}_{k,i}(\\{\\alpha_n\\}_{n \\geq 1}).\n\\end{equation*} \nUsing \\eqref{e:set is compact} and the fact that $\\Gamma^{*}_{k,i}(\\{\\alpha_n\\}_{n \\geq 1}) \\subset Q_k$ and $Q_k\\to \\{x\\}$ as $k\\to \\infty$, it is clear that $\\Gamma^*(\\{\\alpha_n\\}_{n \\geq 1})$ is compact. As $\\alpha<\\gamma$ and $\\alpha_n<\\gamma$ for all $n\\geq 1$, we have $\\sup \\{\\alpha_n: n\\geq 1\\}\\leq \\beta_k$ for all large enough $k$, so we can apply \\eqref{e:percolation probability 2} for large values of $k$. Therefore \\eqref{e:percolation probability}, \\eqref{e:percolation probability 2}, and the independence of the processes defining each $\\Gamma^k_i(\\{\\alpha_n\\}_{n \\geq 1})$ yield\n\\begin{equation*}\n\\P\\left(\\dim_H \\left(K \\cap \\Gamma^*(\\{\\alpha_n\\}_{n \\geq 1})\\right) = \\gamma - \\alpha\\right) = 1.\n\\end{equation*}\nOur coupling of percolations clearly implies the following monotonicity: Almost surely, for all sequences $\\{\\alpha_n\\}_{n \\geq 1}$ and $\\{ \\alpha'_n\\}_{n\\geq 1}$ we have\n\t\\begin{equation}\n\t\\label{e:monotonicity}\n\t\\Gamma^*(\\{\\alpha_n\\}_{n \\geq 1}) \\subset^{\\star} \\Gamma^*(\\{\\alpha'_n\\}_{n\\geq 1}) \\text{ if $\\alpha_n \\ge \\alpha'_n$ for each $n$}.\n\t\\end{equation}\nLet $Q =\\mathbb{Q} \\cap [0, \\gamma)$, and define the set \n\\begin{equation*} \nQ^* = \\{\\{\\alpha_n\\}_{n \\geq 1} : \\alpha_n\\in Q \\text{ for all $n$ and $\\alpha_n$ is eventually constant}\\}.\n\\end{equation*} \nClearly, $Q^*$ is countable, therefore, with probability $1$ we have \n\\begin{equation}\n\\label{e:dimension prob for Q}\n\\dim_H (K \\cap \\Gamma^*(\\{\\alpha_n\\}_{n \\geq 1})) = \\gamma - \\alpha \\text{ for all $\\{\\alpha_n\\}_{n \\geq 1} \\in Q^*$ with $\\alpha_n \\to \\alpha$}.\n\\end{equation}\n\t\nNow we are ready to define our family of compact sets $\\mathcal{C}$. By Lemma~\\ref{l:varphi existence} there exists a map $\\varphi \\colon 2^{<\\omega} \\to [0,\\infty)$ such that $\\overline{\\varphi}(x) = \\lim_{n \\to \\infty} \\varphi(x \\restriction n)$ exists for all $x \\in 2^\\omega$ and $\\overline{\\varphi}(2^\\omega) = A$. Since $A \\subset (0, \\gamma]$, we may assume that \n\\begin{equation} \\label{e:0gamma}\n0<\\varphi(s)\\leq \\gamma \\text{ for all } s\\in 2^{<\\omega}.\n\\end{equation} \nIndeed, otherwise for all $s\\in 2^n$ we can replace $\\varphi(s)$ by $\\gamma 2^{-n}$ if $\\varphi(s)\\leq 0$ and by $\\gamma$ if $\\varphi(s)>\\gamma$, which modifications do not change the limit $\\overline{\\varphi}$. For each $x \\in 2^\\omega$ let $\\alpha(x)=\\{\\alpha(x)_n: n\\geq 1\\}$ such that\n\\begin{equation*} \n\\alpha(x)_n=\\gamma-\\varphi(x\\restriction n) \\text{ for all } n\\geq 1. \n\\end{equation*} \nLet us define $\\mathcal{C}$ as \n\\begin{equation*} \n\\mathcal{C} = \\{K \\cap \\Gamma^*(\\alpha(x)) : x \\in 2^\\omega\\}.\n\\end{equation*}\nIt is clear that $\\mathcal{C}$ is a random family of compact sets. Now we prove that, almost surely, $\\{\\dim_H C : C \\in \\mathcal{C}\\} = A$. Assume that the event of \\eqref{e:dimension prob for Q} holds, it is enough to show that $\\dim_H (K \\cap \\Gamma^*(\\alpha(x))) = \\overline{\\varphi}(x)$ for all $x \\in 2^\\omega$. Let $x \\in 2^\\omega$ be fixed. The definition of $\\varphi$ and \\eqref{e:0gamma} imply that $\\alpha(x)_n\\in [0,\\gamma)$ for all $n$, and $\\alpha(x)_n$ converges to $\\alpha_x=\\gamma-\\overline{\\varphi}(x)\\in [0,\\gamma)$. Hence for any $\\varepsilon > 0$, we can find sequences $\\{\\alpha'_n\\}_{n \\geq 1}, \\{\\alpha''_n\\}_{n \\geq 1} \\in Q^*$ such that \n\\begin{equation*} \n\\alpha'_n \\le \\alpha(x)_n \\le \\alpha''_n \\text{ and } \\alpha''_n-\\alpha'_n\\leq \\varepsilon \\text{ for each } n.\n\\end{equation*} \nThen $\\alpha'_n\\to \\alpha'$ and $\\alpha''_n\\to \\alpha''$ such that \n\\begin{equation} \\label{e:alpha'} \n\\alpha'\\leq \\alpha_x\\leq \\alpha'' \\text{ and } \\alpha''-\\alpha'\\leq \\varepsilon.\n\\end{equation} \nBy \\eqref{e:dimension prob for Q} we have \n\\begin{equation} \\label{e:dimg}\n\\dim_H (K \\cap \\Gamma^*(\\{\\alpha'_n\\}_{n \\geq 1})) = \\gamma - \\alpha' \\text{ and } \\dim_H(K \\cap \\Gamma^*(\\{\\alpha''_n\\}_{n \\geq 1})) = \\gamma - \\alpha''.\n\\end{equation}\nMonotonicity \\eqref{e:monotonicity} yields \n\\begin{equation} \\label{e:mon}\n\\Gamma^{*} (\\{\\alpha''_n\\}_{n\\geq 1} )\\subset^{\\star} \\Gamma^{*}(\\alpha(x)) \\subset^{\\star} \n\\Gamma^{*} (\\{\\alpha'_n\\}_{n\\geq 1}).\n\\end{equation}\nAs $\\varepsilon>0$ was arbitrary, \\eqref{e:alpha'}, \\eqref{e:dimg}, and \\eqref{e:mon} imply that \n\\begin{equation*}\n\\dim_H(K \\cap \\Gamma^*(\\alpha(x))) =\\gamma-\\alpha_x=\\overline{\\varphi}(x),\n\\end{equation*}\nwhich proves that $\\{\\dim_H C : C \\in \\mathcal{C}\\} = A$ almost surely.\n\n\nFinally, we check that $\\mathcal{C}$ is compact with probability $1$. Since $2^\\omega$ is compact and $Q_k\\to \\{y_0\\}$ as $k\\to \\infty$, it is enough to prove that for an arbitrarily given $k\\geq 1$ and $1\\leq i\\leq i_k$ the map $x \\mapsto C_x\\stackrel{\\text{def}}{=} K\\cap \\Gamma_{k,i}^*(\\alpha(x))$ is continuous. Assume that $x$ and $y$ are two sequences with $x \\restriction n= y \\restriction n$ for some $n\\geq 1$, it is enough to show that \n\\begin{equation} \\label{e:dH} \nd_H(C_x, C_y)\\leq 2^{-n}\\diam Q_k.\n\\end{equation} \nThe construction implies that $S^k_{i,n}(\\alpha(x))=S^k_{i,n}(\\alpha(y))\\stackrel{\\text{def}}{=} S_n$ coincide, and also $C_x \\setminus S_n=C_y\\setminus S_n$. Therefore, \n\\begin{equation} \\label{e:dH1}\nd_H(C_x, C_y)\\le d_H(C_x\\cap S_n, C_y\\cap S_n).\n\\end{equation} \nLet $D\\in \\mathcal{D}^k_n$ be arbitrary such that $D\\subset S_n$. By the construction we obtain that $C_x\\cap D\\neq \\emptyset$ iff $D\\in \\mathcal{C}^k_n$ iff $C_y\\cap D\\neq \\emptyset$, so $\\diam D=2^{-n}\\diam Q_k$ yields \n\\begin{equation} \\label{e:dH2}\nd_H(C_x\\cap S_n, C_y\\cap S_n)\\leq 2^{-n}\\diam Q_k.\n\\end{equation}\nSince \\eqref{e:dH1} and \\eqref{e:dH2} imply \\eqref{e:dH}, the proof is complete. \n\\end{proof}\n\n\\subsection{Packing and box dimensions} \\label{ss:box}\nWe prove Theorems~\\ref{t:compbox} and \\ref{t:comppack} in this subsection. For the following equivalent version of the upper box dimension and for more alternative definitions see \\cite[Chapter~3]{Fa}.\n\n\\begin{definition}\nIn a metric space $(X,\\rho)$ we say that $S\\subset X$ is a \\emph{$\\delta$-packing} if $\\rho(x,y)>\\delta$ for all distinct $x,y\\in S$. Let $P_n(X)$ be the cardinality of a maximal $2^{-n}$-packing in $X$. \n\\end{definition}\n\n\\begin{fact} \\label{f:equiv} \n\tFor any metric space $X$ we have $N_n(X)\\leq P_n(X)\\leq N_{n+1}(X)$, so \n\t\\begin{equation*}\n\t\\overline{\\dim}_B \\, X=\\limsup_{n \\to \\infty} \\frac{\\log P_n(X)}{n\\log 2}.\n\t\\end{equation*} \n\\end{fact} \n\n\n\n\\begin{theorem} \\label{t:compbox}\nLet $K$ be a non-empty compact metric space and $A \\subset [0, \\overline{\\dim}_B \\, K]$. The following statements are equivalent: \n\\begin{enumerate}\n\\item \\label{i01} There is a compact set $\\mathcal{C} \\subset \\mathcal{K}(K)$ with $\\{\\overline{\\dim}_B \\, C : C \\in \\mathcal{C}\\} = A$;\n\\item \\label{i02} $A$ is an analytic set. \n\\end{enumerate} \n\\end{theorem}\n\\begin{proof} \n\tThe direction $\\eqref{i01} \\Rightarrow \\eqref{i02}$ is analogous to the one in Theorem~\\ref{t:compact family}.\n\t\n\tNow we prove $\\eqref{i02} \\Rightarrow \\eqref{i01}$. We may assume that $A\\neq \\emptyset$, otherwise $\\mathcal{C}=\\emptyset$ works. Let $\\alpha=\\overline{\\dim}_B \\, K$. Choose a sequence $\\alpha_n \\uparrow \\alpha$. By Fact~\\ref{f:dimK} we can fix $y_0\\in K$ such that \n\\begin{equation*}\n\\overline{\\dim}_B \\, B(y_0,r)=\\alpha \\text{ for all } r>0.\n\\end{equation*}\nLet $g(n)=\\max\\{n+1,P_n(K)\\}$ for all $n\\in \\mathbb{N}$. We can choose a sequence $k_n\\uparrow \\infty$ with $k_0=0$ and a positive integer $j=j(n)$ such that $g(k_n)\\leq j\\leq k_{n+1}-3$ and\n\\begin{equation} \\label{e:alpha} P_{j}(B(y_0,2^{-g(k_n)}))\\geq 2^{\\alpha_n j}. \n\\end{equation}\nBy Lemma~\\ref{l:varphi existence} there is a map $\\varphi \\colon 2^{<\\omega} \\to [0, \\infty)$ such that\n\\begin{equation*} \n\\overline{\\varphi}(x) = \\lim_{n \\to \\infty} \\varphi(x \\restriction n) \n\\end{equation*} \n\texists for each $x \\in 2^\\omega$, and the resulting function $\\overline{\\varphi}$ satisfies $\\overline{\\varphi}(2^\\omega) = A$. We may assume that $\\varphi(s)\\leq \\alpha_n$ for all $s\\in 2^n$ and $n\\in \\mathbb{N}$, otherwise we can replace $\\varphi(s)$ by $\\alpha_n$ without changing $\\overline{\\varphi}$.\n\n\tLet $m(\\emptyset)=1$, $y_{\\emptyset}=y_0$, and $C(\\emptyset)=B(y_0,1)$. Assume that $s\\in 2^n$, a positive integer $m(s)$, and points $y_i(s)\\in K$ are given such that $y_0(s)=y_0$ and their pairwise distance is more than $2^{2-k_n}$, and \n\t\\begin{equation*} \n\tC(s)=\\bigcup_{i=1}^{m(s)} B(y_i(s), 2^{-k_n}),\n\t\\end{equation*} \n\tso the distance between distinct balls of the form $B(y_i(s), 2^{-k_n})$ is bigger than $2^{-k_n}$.\n\t\n\tLet $c\\in \\{0,1\\}$ and $t=s^\\frown c$. Let $\\ell(t)$ be the minimal positive integer such that $g(k_n) \\leq \\ell(t) \\leq k_{n+1}-3$ and \n\t\\begin{equation} \n\tP_{\\ell(t)}(B(y_0,2^{-g(k_n)}))\\geq 2^{\\varphi(t)\\ell(t)},\n\t\\end{equation} \n\tby \\eqref{e:alpha} the number $\\ell(t)$ is well-defined. Then we can choose a $2^{-\\ell_i}$-packing $S$ of size exactly $\\lfloor 2^{\\varphi(t)\\ell(t)} \\rfloor$ in $B(y_i(s),2^{-g(k_n)})$, where $\\lfloor \\cdot \\rfloor$ denotes the integer part. By replacing a suitable element of $S$ with $y_0$ we can obtain a $2^{-\\ell(t)-1}$-packing $T$ in $B(y_i(s),2^{-g(k_n)})$ such that $y_0\\in T$ and $\\#T=\\#S$. Indeed, this is straightforward if $S\\cup\\{y_0\\}$ is a $2^{-\\ell_i-1}$-packing. Otherwise $y_0\\in B(y,2^{-\\ell_i-1})$ for some $y\\in S$, and replacing $y$ with $y_0$ provides a suitable $T$. Let $m(t)=m(s)+(\\#T)-1$ and let \n\t\\begin{equation*} \n\ty_i(t)=y_i(s) \\text{ if } 1\\leq i\\leq m(s) \\quad \\text{and} \\quad \\{y_i(t)\\}_{m(s)\\overline{\\varphi}(x)$ be arbitrary, we use that $\\{y_i(x\\restriction n)\\}_{1\\leq i\\leq m(x\\restriction n)}$ forms a $2^{-k_n}$-packing in $K$, so $m(x\\restriction n)\\leq g(k_n)$. Then for all large enough $n$ and $g(k_n)\\leq \\ell \\leq k_{n+1}-3$ by Fact~\\ref{f:equiv} we have\n\t\\begin{align*}\n\tN_{\\ell}(C(x))&\\leq m(x\\restriction n)+N_{\\ell}\\left(C(x)\\cap B\\left(y_0, 2^{-g(k_n)}\\right)\\right) \\\\\n\t&\\leq g(k_n)+ P_{\\ell}\\left(C(x)\\cap B\\left(y_0, 2^{-g(k_n)}\\right)\\right) \\\\\n\t&\\leq \\ell+2^{\\varphi(x\\restriction (n+1))\\ell } \\leq 2^{\\gamma \\ell}.\n\t\\end{align*} \n\tFor all large enough $n$ and $k_n-3< \\ell < g(k_n)$ the inequality \n\t$N_{\\ell}(C(x))\\leq 2^{\\gamma \\ell}$ clearly holds. As $\\gamma>\\overline{\\varphi}(x)$ was arbitrary, we obtain \\eqref{e:upper}. Then \\eqref{e:lower} and \\eqref{e:upper} imply \\eqref{e:BC}, so the proof is of the theorem is complete.\n\\end{proof} \n\n\nFor the packing dimension we prove the following theorem.\n\n\\begin{theorem} \\label{t:comppack}\n\tLet $K$ be a non-empty compact metric space and let $A \\subset [0, \\dim_P K]$ be analytic. Then there is a compact set $\\mathcal{C} \\subset \\mathcal{K}(K)$ with $\\{\\dim_P C : C \\in \\mathcal{C}\\} = A$.\n\\end{theorem}\n\n\\begin{proof}\n\tWe may assume that $A\\neq \\emptyset$, otherwise $\\mathcal{C}=\\emptyset$ works. Let $\\dim_P K=\\alpha$. First suppose that $A\\subset [0,\\beta]$ for some $\\beta<\\alpha$. By Lemma~\\ref{l:packing}~\\eqref{i:ii} we may assume by shrinking $K$ if necessary that $\\overline{\\dim}_B \\, U>\\beta$ for any non-empty open set $U\\subset K$. By Lemma~\\ref{l:varphi existence} there exists a map $\\varphi \\colon 2^{<\\omega} \\to [0, \\infty)$ such that\n\t\\begin{equation*} \\overline{\\varphi}(x) = \\lim_{n \\to \\infty} \\varphi(x \\restriction n)\n\t\\end{equation*} \n\texists for each $s \\in 2^\\omega$, and the resulting function $\\overline{\\varphi}$ satisfies $\\overline{\\varphi}(2^\\omega) = A$. We may assume that $\\varphi(s)\\leq \\beta$ for all $s\\in 2^{<\\omega}$. Let $g(n)=\\max\\{n+1,P_n(K)\\}$ for all $n\\in \\mathbb{N}$. \n\tBy compactness we can choose a sequence $k_n\\uparrow \\infty$ with $k_0=0$ such that for all $y\\in K$ and $n\\in \\mathbb{N}$ there exists a positive integer $j=j(n,y)$ such that $g(k_n)\\leq j\\leq k_{n+1}-2$ and\n\t\\begin{equation} \\label{e:Pj} P_{j}(B(y,2^{-g(k_n)}))\\geq 2^{\\beta j}. \n\t\\end{equation}\n\tLet $m(\\emptyset)=1$, $y_{\\emptyset}\\in K$ be arbitrary, and $C(\\emptyset)=B(y_{\\emptyset},1)$. Assume that $s\\in 2^n$ and a positive integer $m(s)$, points $y_i(s)\\in K$ with pairwise distance more than $2^{2-k_n}$ are given, and \n\t\\begin{equation*} \n\tC(s)=\\bigcup_{i=1}^{m(s)} B(y_i(s), 2^{-k_n}),\n\t\\end{equation*} \n\tso the distance between distinct balls of the form $B(y_i(s), 2^{-k_n})$ is bigger than $2^{-k_n}$.\n\t\n\tLet $c\\in \\{0,1\\}$ and $t=s^\\frown c$. For all $1\\leq i\\leq m(s)$ let $\\ell_i=\\ell_i(t)$ be the minimal number such that $g(k_n) \\leq \\ell_i \\leq k_{n+1}-2$ and \n\t\\begin{equation} \\label{e:PL}\n\tP_{\\ell_i}(B(y_i(s),2^{-g(k_n)}))\\geq 2^{\\varphi(t)\\ell_i},\n\t\\end{equation} \n\tby \\eqref{e:Pj} the number $\\ell_i$ are well-defined.\n\tFor all $1\\leq i\\leq m(s)$ let us choose a $2^{-\\ell_i}$-packing $S_i$ of size exactly $\\lfloor 2^{\\varphi(t)\\ell_i} \\rfloor$ in $B(y_i(s),2^{-g(k_n)})$, where $\\lfloor \\cdot \\rfloor$ denotes the integer part.\n\tLet $S=\\bigcup_{i=1}^{m(s)} S_i$ and $m(t)=\\#S$, and let us define $y_i(t)\\in K$ such that $S=\\{y_i(t)\\}_{1\\leq i\\leq m(t)}$. Let \t\n\t\\begin{equation*} C(t)=\\bigcup_{i=1}^{m(t)} B(y_i(t), 2^{-k_{n+1}}),\n\t\\end{equation*}\n\tso the distance between distinct balls $B(y_i(t), 2^{-k_{n+1}})$ is bigger than $2^{-k_{n+1}}$, and clearly $C(t)\\subset C(s)$. Thus we defined $C(s)$ for all $s\\in 2^{<\\omega}$. For $x\\in 2^{\\omega}$ let \n\t\\begin{equation*}\n\tC(x)=\\bigcap_{n=1}^{\\infty} C(x\\restriction n).\n\t\\end{equation*}\n\tThe construction clearly implies that $C(x)\\subset K$ is compact. If $x\\restriction n=y\\restriction n$, then $C(x)$ and $C(y)$ are covered by the same balls of radius $2^{-k_n}$ which they both intersect, so the map $x\\mapsto C(x)$ is continuous. Therefore, the definition \n\t\\begin{equation*} \\mathcal{C}=\\{C(x): x\\in 2^{\\omega}\\}\n\t\\end{equation*}\n\tyields a compact set $\\mathcal{C}\\subset \\mathcal{K}(K)$. In order to prove $\\{\\dim_P C: C\\in \\mathcal{C}\\}=A$ let $x\\in 2^{\\omega}$ be arbitrarily fixed, it is enough to show that \n\t\\begin{equation} \\label{e:PC}\n\t\\dim_P C(x)=\\overline{\\varphi}(x).\n\t\\end{equation} \n\tFirst we prove \n\t\\begin{equation} \\label{e:P>}\n\t\\dim_P C(x)\\geq \\overline{\\varphi}(x).\n\t\\end{equation}\n\tLet $U\\subset K$ be an arbitrary open set intersecting $C(x)$, by Lemma~\\ref{l:packing}~\\eqref{i:i} it is enough to show that $\\overline{\\dim}_B \\, (C(x)\\cap U)\\geq \\overline{\\varphi}(x)$. For all large enough $n$ we can fix $1\\leq i\\leq m(s)$ such that $B=B(y_i(x\\restriction n),2^{-k_n})\\subset U$. Let $\\ell(n)=\\ell_i(x\\restriction (n+1))$, by the construction and \\eqref{e:PL} the ball $B$ contains $\\lfloor 2^{\\varphi(x\\restriction (n+1))\\ell(n)} \\rfloor$ balls with pairwise distance greater than $2^{-\\ell(n)}$ such that all of them intersect $C(x)\\cap U$. Thus \n\t\\begin{equation*} P_{\\ell(n)}(C(x)\\cap U)\\geq \\lfloor 2^{\\varphi(x\\restriction (n+1))\\ell(n)}\\rfloor,\n\t\\end{equation*} \n\timplying \n\t\\begin{equation*}\n\t\\overline{\\dim}_B \\, (C(x)\\cap U)\\geq \\overline{\\varphi}(x).\n\t\\end{equation*}\n\tHence \\eqref{e:P>} holds. For the other direction it is enough to prove that\n\t\\begin{equation} \\label{e:PP}\n\t\\overline{\\dim}_B \\, C(x)\\leq \\overline{\\varphi}(x).\n\t\\end{equation}\n\tLet $\\gamma>\\overline{\\varphi}(x)$ be arbitrary, we use that $\\{y_i(x\\restriction n)\\}_{1\\leq i\\leq m(x\\restriction n)}$ form a $2^{-k_n}$-packing in $K$, so $m(x\\restriction n)\\leq g(k_n)$. Then for all large enough $n$ and $g(k_n)\\leq \\ell \\leq k_{n+1}-2$ by Fact~\\ref{f:equiv} we have\n\t\\begin{align*}\n\tN_{\\ell}(C(x))&\\leq \\sum_{i=1}^{m(x\\restriction n)} N_{\\ell}\\left(C(x)\\cap B\\left(y_i(s), 2^{-g(k_n)}\\right)\\right) \\\\\n\t&\\leq \\sum_{i=1}^{m(x\\restriction n)} P_{\\ell}\\left(C(x)\\cap B\\left(y_i(s), 2^{-g(k_n)}\\right)\\right) \\\\\n\t&\\leq g(k_n) 2^{\\varphi(x\\restriction (n+1))\\ell } \\leq 2^{\\gamma \\ell}.\n\t\\end{align*} \n\tFor all large enough $n$ and $k_n-2< \\ell < g(k_n)$ the inequality \n\t$N_{\\ell}(C(x))\\leq 2^{\\gamma \\ell}$ clearly holds. As $\\gamma>\\overline{\\varphi}(x)$ was arbitrary, we obtain \\eqref{e:PP}. Inequalities \\eqref{e:P>} and \\eqref{e:PP} imply \\eqref{e:PC}, and the proof is complete if $A\\subset [0,\\beta]$ for some $\\beta<\\alpha$. \n\t\nFinally, we prove the theorem in case of $A\\subset [0,\\alpha]$. If $A=\\{\\alpha\\}$ then $\\mathcal{C}=\\{K\\}$ works, so we may assume that there exists $\\beta_0\\in A\\cap [0,\\alpha)$. Take a sequence $\\beta_n\\uparrow \\alpha$, and define $A_n=A\\cap [0,\\beta_n]$ for all $n\\geq 0$. By Fact~\\ref{f:dimK} we can choose $y_0\\in K$ such that $\\dim_P B(y_0,r)=\\alpha$ for all $r>0$. By the first part we can choose a compact set $K_0\\subset K$ with $\\dim_P K_0=\\beta_0$ and we may assume that $y_0\\in K_0$. By the first part we can also choose compact sets $\\mathcal{C}_n\\subset \\mathcal{K}(B(y_0,1\/n))$ such that \n\t\\begin{equation*}\n\t\\{\\dim_P C: C\\in \\mathcal{C}_n\\}=A_n \\text{ for all } n\\geq 0.\n\t\\end{equation*} \n\tDefine\n\t\\begin{equation*}\n\t\\mathcal{C}=\\mathcal{C}_0\\cup \\{K\\} \\cup \\{K_0\\cup C: C\\in \\mathcal{C}_n,~n\\geq 1\\}.\n\t\\end{equation*}\t\n\tIt is easy to see that $\\mathcal{C}\\subset \\mathcal{K}(K)$ is compact and satisfies $\\{ \\dim_P C: C\\in \\mathcal{C}\\}=A$, and the proof of the theorem is complete.\t\n\\end{proof}\n\n\n\\section{Open problems} \\label{s:open}\n\nOur first problem is the most ambitious one. For the sake of simplicity we only formalize it in case of the Hausdorff dimension.\n\n\\begin{problem} \\label{p:K} \nLet $K\\subset \\mathbb{R}^d$ be compact. Characterize the sets $A\\subset [0,\\dim_H K]$ for which there exists a compact set $C\\subset K$ such that $\\{\\dim_H E: E\\in \\mathcal{M}_C\\}=A$.\n\\end{problem}\n\n\nJ\\\"arvenp\\\"a\\\"a, J\\\"arvenp\\\"a\\\"a, Koivusalo, Li, Suomala, and Xiao \\cite[Lemma~2.3]{JJKLSX} proved an analogue of Hawkes' theorem in complete metric spaces satisfying a mild doubling condition. Therefore, the proof of Theorem~\\ref{t:compact family} possibly works in compact metric spaces with a suitable doubling condition as well. As the case of arbitrary compact metric spaces can be out of reach with this method, we ask the following.\n\n\\begin{problem}\nLet $K$ be a non-empty compact metric space and let $A \\subset [0, \\dim_H K]$ be an analytic set. Is there a compact set $\\mathcal{C} \\subset \\mathcal{K}(K)$ with $\\{\\dim_H C : C \\in \\mathcal{C}\\} = A$?\n\\end{problem}\n\nAs Mattila and Mauldin \\cite[Theorem~7.5]{MM} proved that the packing dimension $\\dim_P \\colon \\mathcal{K}(\\mathbb{R}^d)\\to [0,d]$ is not Borel measurable, we do not know whether analogue versions of Theorems~\\ref{t:characterization} and~\\ref{t:compact family} hold for the packing dimension. We state the measurability problems as follows. \n\n\\begin{problem} \\label{p:meas} If $K\\subset \\mathbb{R}^d$ is a compact set, is the set $\\{\\dim_P E: E\\in \\mathcal{M}_K\\}$ analytic? If $\\mathcal{C} \\subset \\mathcal{K}(\\mathbb{R}^d)$ is compact, is the set $\\{\\dim_P E: E\\in \\mathcal{C}\\}$ analytic?\n\\end{problem}\n\nIf the answer to the above problem is negative, we can ask for a characterization. \n\\begin{problem} \\label{p:1} Let $d\\geq 1$. Characterize the sets $A \\subset [0, d]$ for which there exists a compact set $K \\subset \\mathbb{R}^d$ with $\\{\\dim_P E : E \\in \\mathcal{M}_K\\} = A$.\n\\end{problem}\n\n\\begin{problem} \\label{p:2} Let $K\\subset \\mathbb{R}^d$ be compact. Characterize the sets $A \\subset [0, \\dim_P K]$ for which there exists a compact set $\\mathcal{C}\\subset \\mathcal{K}(K)$ with $\\{\\dim_P C: C\\in \\mathcal{C}\\}=A$.\n\\end{problem}\n\n\\subsection*{Acknowledgments}\nWe are indebted to Jonathan M.~Fraser for some illuminating conversations and for providing us with the reference \\cite{FWW}. We thank Ville Suomala for pointing our attention to the paper \\cite{JJKLSX}. We also thank Ignacio Garc\\'ia for pointing out that a result stated in an earlier version of the manuscript was already known.\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\n\nAccording to the AdS\/CFT correspondence \\cite{Maldacena:1997re}, $\\mathcal{N}=4$ super Yang-Mills (SYM) theory on $\\mathbb{R} \\times S^3$ is dual to type IIB string theory on $\\mbox{AdS}_5\\times S^5$. This duality should in particular relate the phase transitions, critical behavior and thermal physics of the theories. \n\nOne interesting example of a critical behavior is the Hagedorn temperature. In the planar limit of $\\mathcal{N}=4$ SYM theory on $\\mathbb{R} \\times S^3$, the origin of the Hagedorn temperature $T_{\\text{H}}$ is the confinement of the color degrees of freedom due to the theory being on a three-sphere. This enables the theory to have a phase transition that bears resemblance to the confinement\/deconfinement phase transition in QCD or pure Yang-Mills theory \\cite{Atick:1988si,Aharony:2003sx}.\n\nThe Hagedorn temperature is the lowest temperature for which the planar partition function $\\mathcal{Z}(T)$\ndiverges. Via the state\/operator correspondence, the partition function can be re-expressed in terms of the dilatation operator $D$ of $\\mathcal{N}=4$ SYM theory on $\\mathbb{R}^4$:\n\\begin{equation}\n \\mathcal{Z}(T)=\\tr_{\\mathbb{R}\\times S^3}[\\operatorname{e}^{-H\/T}]=\\tr_{\\mathbb{R}^4}[\\operatorname{e}^{-D\/T}]\\, , \n\\end{equation}\nwhere we have set the radius of $S^3$ to $1$.\nStates correspond to gauge-invariant operators consisting of one or more trace factors.\nThe energies correspond to the scaling dimensions of the operators, as measured by the dilatation operator.\nIn the planar limit, the scaling dimensions of multi-trace operators are entirely determined by those of their single-trace factors, and the latter can be enumerated via P\\'{o}lya theory to determine the partition function and thus the Hagedorn temperature in the free theory \\cite{Sundborg:1999ue}.\nThis procedure was later generalized to one-loop order and to the case of non-zero chemical potentials \\cite{Spradlin:2004pp,Yamada:2006rx,Harmark:2006di,Suzuki:2017ipd,GomezReino:2005bq}.\n\nOn the string-theory side, the Hagedorn temperature occurs due to the exponential growth of string states with the energy present in tree-level string theory. For interacting string theory, it is connected to the Hawking-Page phase transition \\cite{Witten:1998zw}. This suggests that the confinement\/deconfinement transition on the gauge-theory side is mapped on the string-theory side to a transition from a gas of gravitons (closed strings) for low temperatures to a black hole for high temperatures.\nIn particular, also the Hagedorn temperature on the gauge-theory and string-theory sides of the AdS\/CFT correspondence should be connected \n \\cite{Sundborg:1999ue,Aharony:2003sx}. \n \nOn the string-theory side, the Hagedorn temperature has been computed in pp-wave limits \\cite{PandoZayas:2002hh,Greene:2002cd,Brower:2002zx,Grignani:2003cs}. In \\cite{Harmark:2006ta}, the first quantitative interpolation of the Hagedorn temperature from the gauge-theory side to the string-theory side was made, exploiting a limit towards a critical point in the grand canonical ensemble \\cite{Harmark:2014mpa}.\nThis limit effectively reduces the gauge-theory side to the $\\mathfrak{su}(2)$ sector with only the one-loop dilatation operator surviving, which enables one to match the Hagedorn temperature of the gauge-theory side to that of string theory on a pp-wave background via the continuum limit of the free energy of the Heisenberg spin chain. \n\nA hitherto unrelated but very powerful property of planar $\\mathcal{N}=4$ SYM theory is integrability, see \\cite{Beisert:2010jr,Bombardelli:2016rwb} for reviews. It amounts to the existence of an underlying two-dimensional exactly solvable model, which reduces to an integrable sigma model at strong coupling and to an integrable spin chain at weak coupling. \nVia integrability, the planar scaling dimensions of all single-trace operators can in principle be calculated at any value of the 't Hooft coupling $\\lambda=g_{\\mathrm{\\scriptscriptstyle YM}}^2N$, allowing for a smooth interpolation between weak and strong coupling results.\nIn practice, however, the calculation for each operator is so involved that summing the results for all operators to obtain the partition function $\\mathcal{Z}(T)$ seems prohibitive.\n\nIn this letter, we show how to use integrability to compute the Hagedorn temperature at any value of the 't Hooft coupling.\nIn the spectral problem, the integrable model is solved \non a cylinder of finite circumference $L$, which accounts for wrapping contributions to the scaling dimension due to the finite length of the spin chain.\nIn order to calculate the partition function $\\mathcal{Z}(T)$, we would need to solve this model on the torus with circumferences $L$ and $1\/T$, an endeavor that has not been successful yet even for the Heisenberg spin chain.\nThe Hagedorn singularity, however, is driven by the contributions of spin chains with very high $L$, or rather very high classical scaling dimension, \nwhere the finite-size corrections play no role \\footnote{The fact that finite-size corrections are suppressed in $L$ is manifest. The suppression in the classical scaling dimension can for example be seen for so-called twist operators. Up to corrections in the classical scaling dimension, these operators are dual to Wilson loops, for which no finite-size effects occur \\cite{Korchemsky:1988si,Belitsky:2003ys}.}. \nThus, we can calculate it by solving the integrable model on a cylinder of circumference $1\/T$, a situation that is related to the one in the spectral problem via a double Wick rotation.\nIndeed, we find a direct relation between the continuum limit of the free energy of the spin chain associated with planar $\\mathcal{N}=4$ SYM theory and the Hagedorn temperature.\nUsing the integrability of the model, we derive thermodynamic Bethe ansatz (TBA) equations which determine the Hagedorn temperature at any value of the 't Hooft coupling. We present them in the form of a Y-system in \\eqref{eq: general Y system}--\\eqref{eq: theta n}.\nAs a first application, we solve them in the constant case as well as perturbatively at weak coupling, confirming the known tree-level and one-loop Hagedorn temperature. Moreover, we determine the previously unknown two-loop Hagedorn temperature:\n\\begin{equation}\n\\begin{aligned}\n T_{\\text{H}}&=\\frac{1}{2\\log(2+\\sqrt{3})}+\\frac{1}{\\log(2+\\sqrt{3})}g^2 \\\\\n &\\phaneq+\n \\left( -\\frac{86}{ \\sqrt{3}} + \\frac{24 \\log(12)}{\\log(2+\\sqrt{3})}\\right)\n g^4+\\mathcal{O}(g^6)\\,,\n \\end{aligned}\n\\end{equation}\nwhere $g^2=\\frac{\\lambda}{16\\pi^2}$.\n\n\\section{TBA equations for the Hagedorn temperature}\n\nIn the following, we relate the Hagedorn temperature to the spin-chain free energy and derive TBA equations for the latter. \n\n\\paragraph{The Hagedorn temperature from the free energy of the spin chain}\n\nIn the planar limit, the scaling dimensions of multi-trace operators are completely determined by the scaling dimensions of their single-trace factors. The partition function $\\mathcal{Z}(T)$ is then entirely determined by the single-trace partition function $Z(T)$.\nSplitting the dilatation operator into a classical and an anomalous part as $D=D_0+\\delta D$, \nwe can write \n\\begin{equation}\n Z(T)=\\sum_{m=2}^\\infty\\operatorname{e}^{-\\frac{m}{2}\\frac{1}{T}(1 + F_m(T))}\\, , \n\\end{equation}\nwhere \n\\begin{equation}\n\\label{eq: spin_chain_Z}\n F_m(T)=-T\\frac{2}{m}\\log \\left( \\tr_{\\text{spin-chain},D_0=\\frac{m}{2}}[\\operatorname{e}^{-\\delta D\/T}] \\right) \n \\end{equation}\nis the spin-chain free energy per unit classical scaling dimension for fixed $D_0=\\frac{m}{2}$. \nThe multi-trace partition function $\\mathcal{Z}(T)$ is then given by \n\\begin{equation}\n\\label{eq: relation between partition function and free energy}\n \\mathcal{Z}(T)=\\exp\\sum_{n=1}^\\infty\\frac{1}{n}\\sum_{m=2}^\\infty(-1)^{m(n+1)}\\operatorname{e}^{-\\frac{m}{2T} (n + F_m(T\/n))}\\, , \n\\end{equation}\nwhere the alternating sign takes care of the correct statistics.\nThe Hagedorn singularity is the first singularity of $\\mathcal{Z}(T)$ encountered raising the temperature from zero.\nIt arises from the $n=1$ contribution to the sum over $n$, i.e.\\ from the infinite series\n\\begin{equation}\n\\label{n1contr}\n\\sum_{m=2}^\\infty \\operatorname{e}^{-\\frac{m}{2T} (1 + F_m(T))}\\, , \n\\end{equation}\nwhere each term in the series is finite as $F_m(T)$ only includes a finite number of states.\nWe can use Cauchy's root test to assess when this series diverges. To this end, we compute the $m$th root of the absolute value of the $m$th term and take the large $m$ limit, giving\n\\begin{equation}\nr = \\lim_{m\\rightarrow \\infty} \\operatorname{e}^{-\\frac{1}{2T}(1+F_m(T))} = \\operatorname{e}^{-\\frac{1}{2T} ( 1+ F(T))} \\, , \n\\end{equation}\nwhere\n\\begin{equation}\n F(T)= \\lim_{m\\rightarrow \\infty} F_m(T)\n\\end{equation}\nis the thermodynamic limit of the free energy.\nThe root test states that the series is convergent for $r<1$ and divergent for $r>1$. Thus, the Hagedorn temperature is determined from $r=1$ or, equivalently, from\n\\begin{equation}\n\\label{eq: hagedorn temperature via F}\nF(T_{\\text{H}})=-1\\, . \n\\end{equation}\n\n\n\n\n\\paragraph{TBA equations}\n\nThe free energy $F$ of the spin chain can be calculated via the thermodynamic Bethe ansatz (TBA). The TBA equations for the Hagedorn temperature of $\\mathcal{N}=4$ SYM theory can be derived in analogy to the case of the spectral problem \\cite{Arutyunov:2009zu,Bombardelli:2009ns,Gromov:2009bc,Arutyunov:2009ur,Gromov:2009tv,Cavaglia:2010nm}.\nThe starting point are the all-loop asymptotic Bethe equations \\cite{Beisert:2004hm,Beisert:2006ez} for the \n$\\mathfrak{psu}(2,2|4)$ spin chain found in the spectral problem,\nwhich are written in terms of the length $L$ of the spin chain as well as the seven excitation numbers corresponding to the roots in the Dynkin diagram of $\\mathfrak{psu}(2,2|4)$. We then rewrite the Bethe equation so that the middle, momentum-carrying root is written in terms of $D_0$ instead of $L$, since it is $D_0$ that we keep fixed when calculating the free energy \\eqref{eq: spin_chain_Z}. We proceed by employing the string hypothesis, which enables us to write the Bethe equations for many magnons. The next step is the continuum limit $D_0 \\rightarrow \\infty$, in which we can write the TBA equations in terms of the Y-functions defined from the densities of the strings. In particular, it allows us to write down the free energy. \nThe main difference compared to the TBA equations of the spectral problem is that we do not make a double Wick rotation i.e.\\ we consider the so-called direct theory and not the mirror theory. This means we use the Zhukovsky variable $x(u)$ with a short cut: \n\\begin{equation}\nx(u)=\\frac{u}{2}\\left(1+\\sqrt{1-\\frac{4g^2}{u^2}}\\right)\\, . \n\\end{equation}\nNote that TBA equations for the direct theory were also considered in \\cite{Cavaglia:2010nm,Arutynov:2014ota} but in different thermodynamic limits.\n\n\n\\paragraph{Y-system}\nThe TBA equations can be rephrased in terms of a Y-system consisting of the functions $\\mathcal{Y}_{a,s}$, where $(a,s)\\in M=\\{(a,s)\\in\\mathbb{N}_{\\geq0}\\times\\mathbb{N} \\,|\\,a=1 \\vee |s|\\leq 2 \\vee \\pm s=a=2\\}$.\nWith some exceptions, they satisfy the equations\n\\begin{equation}\n\\label{eq: general Y system}\n \\log\\mathcal{Y}_{a,s}=\\log\\frac{(1+\\mathcal{Y}_{a,s-1})(1+\\mathcal{Y}_{a,s+1})}{(1+\\mathcal{Y}_{a-1,s}^{-1})(1+\\mathcal{Y}_{a+1,s}^{-1})}\\star s\\, , \n\\end{equation}\nwhere $\\star$ denotes the convolution with $s(u)=(2 \\cosh \\pi u)^{-1}$ on $\\mathbb{R}$ and the (inverse) Y-functions with shifted indices are assumed to be zero when the shifted indices are not in $M$.\nThe Y-functions are analytic in the strip with $|\\Im(u)|<\\frac{1}{2}|a-|s||$.\nFor the purpose of this letter, the chemical potentials are set to zero. Hence, the Y-system is symmetric, $\\mathcal{Y}_{a,s}=\\mathcal{Y}_{a,-s}$, with boundary conditions \n\\begin{equation}\n\\label{eq: Ybcs}\n\\lim_{a\\rightarrow \\infty} \\frac{\\mathcal{Y}_{a+1,s}}{\\mathcal{Y}_{a,s}} = 1 \\, , \\quad \\lim_{n\\rightarrow \\infty} \\frac{\\mathcal{Y}_{1,n+1}}{\\mathcal{Y}_{1,n}} = 1 \\, , \n\\end{equation}\nfor $s=0,\\pm 1$.\nThe first of the aforementioned exceptions to the equations \\eqref{eq: general Y system} then is \n\\begin{equation}\n\\label{eq: CY_10}\n \\log \\mathcal{Y}_{1,0} = - \\rho\\hatstar s + 2\\log (1+\\mathcal{Y}_{1,1})\\checkstar s-\\log(1+\\mathcal{Y}_{2,0}^{-1})\\star s\\,,\n\\end{equation}\nwhere we have defined $\\hatstar$ and $\\checkstar$ as the convolutions on $(-2g,2g)$ and $\\mathbb{R}\\setminus(-2g,2g)$, respectively.\nSimilarly, the convolution with $\\mathcal{Y}_{1,1}$ and $\\mathcal{Y}_{2,2}$ in \\eqref{eq: general Y system} for $(a,s)=(2,1),(1,2)$ is also understood to be $\\checkstar$.\nThe source term $\\rho(u)$ is defined as \n\\begin{equation}\n \\begin{aligned}\n\\rho &= \\frac{\\epsilon_0}{T} + 2 \\log (1+\\mathcal{Y}_{1,1}) (1+\\mathcal{Y}_{2,2}^{-1}) \\checkstar H_0 \\\\ &\\phaneq + 2 \\sum_{m=1}^\\infty \\log (1+\\mathcal{Y}_{m+1,1})\\star \n\\Big(H_m +H_{-m}\\Big) \\\\&\\phaneq+ \\sum_{m=1}^\\infty \\log (1+\\mathcal{Y}_{m,0} ) \\star \\Sigma^{m} \\,,\n \\end{aligned}\n\\label{eq: rho}\n\\end{equation}\nwhere \n\\begin{equation}\n H_m(v,u) =\\frac{i}{2\\pi}\\partial_v\\log \\frac{x(u-i0)-\\frac{g^2}{x(v+\\frac{i}{2}m)}}{x(u+i0)-\\frac{g^2}{ x(v+\\frac{i}{2}m)}}\\,,\n\\end{equation}\n\\begin{equation}\n\\label{epsilon0}\n\\epsilon_0 (u) = \\begin{cases}\n 0 &\\mbox{for } | u | \\geq 2 g\\,,\\\\\n 2\\sqrt{4g^2-u^2} & \\mbox{for } |u| < 2g\\,,\n \\end{cases}\n\\end{equation}\nand the kernel\n\\begin{equation}\n\\begin{aligned}\n\\Sigma^{m} (v,u) =& \\frac{i}{2\\pi} \\partial_v \\left( \\log \\frac{R^2(x(v+ \\frac{im}{2}),x(u+i0))}{R^2(x(v+ \\frac{im}{2}),x(u-i0))} \\right. \\\\ &+ \\left. \\log \\frac{R^2(x(v- \\frac{im}{2}),x(u-i0))}{R^2(x(v- \\frac{im}{2}),x(u+i0))} \\right) \n\\end{aligned}\n\\end{equation}\nis given in terms of the dressing factor \\cite{Beisert:2006ez}\n\\begin{equation}\n\\begin{aligned}\n\\sigma^2 (u,v) =& \\frac{R^2(x^+(u),x^+(v))R^2(x^-(u),x^-(v))}{R^2(x^+(u),x^-(v))R^2(x^-(u),x^+(v))} \\,,\n\\end{aligned}\n\\end{equation}\nwith $x^\\pm(u) = x(u\\pm \\frac{i}{2})$.\nWhen applied to a function of two arguments such as $H_m(v,u)$, $\\star$, $\\hatstar$ and $\\checkstar$ are moreover understood as integrals over the respective intervals.\nThe other exceptions to the equations \\eqref{eq: general Y system}\nare the non-local equations\n\\begin{equation}\n\\label{eq: Y11_times_Y22}\n\\log \\mathcal{Y}_{1, 1}\\mathcal{Y}_{2,2} (u) = \\sum_{m=1}^\\infty \\log (1+\\mathcal{Y}_{m,0} (v) ) \\star \\Theta_{m} (v,u) \n\\end{equation}\nwith\n\\begin{equation}\n\\Theta_{m} (v,u) =\\frac{i}{2\\pi}\\partial_v\\log \\frac{x(u)-\\frac{g^2}{ x(v-\\frac{i m}{2})}}{x(u)-\\frac{g^2}{ x(v+\\frac{i m}{2})}}\\frac{x(u)-x(v+\\frac{i m}{2})}{x(u)-x\\left(v-\\frac{i m}{2}\\right)}\n\\end{equation}\nand\n\\begin{equation}\n\\label{eq: Y11_divide_Y22}\n\\log \\frac{\\mathcal{Y}_{2, 2}}{\\mathcal{Y}_{1,1}} = \\sum_{m=1}^\\infty a_m \\star \\log \\frac{ (1+ \\mathcal{Y}_{m+1, 1} )^2}{( 1+ \\mathcal{Y}_{1,m+1}^{-1} )^2(1+\\mathcal{Y}_{m,0} )} \n\\end{equation}\nwith $a_n(u)=\\frac{n}{2\\pi(u^2+\\frac{n^2}{4})}$.\n\n\nThe free energy per unit scaling dimension is given by \n\\begin{equation}\n\\label{eq: free energy}\nF(T)= - T \\sum_{n=1}^\\infty \\int_{-\\infty}^\\infty \\operatorname{d}\\! u \\, \\theta_n (u) \\log ( 1 + \\mathcal{Y}_{n,0} (u) )\\, , \n\\end{equation}\nwhere\n\\begin{equation}\n\\label{eq: theta n}\n\\theta_n(u) = \\frac{i}{2\\pi} \\partial_u \\log \\frac{x(u+\\frac{in}{2})}{x(u-\\frac{in}{2})}\\, . \n\\end{equation}\nThus, the TBA equations \\eqref{eq: general Y system}--\\eqref{eq: theta n} determine the Hagedorn temperature at any value of the 't Hooft coupling via \\eqref{eq: hagedorn temperature via F}.\n\n\n\\section{Solving the TBA equations}\n\nLet us now solve the TBA equations in the form of the Y-system.\n\n\\paragraph{Constant solution via T-system}\n\nAt large spectral parameter $u$, the Y-system approaches a constant value. This means we can find a constant Y-system that solves \\eqref{eq: general Y system} for all $(a,s)\\in M\\setminus \\{(1,1),(2,2)\\}$ as well as \\eqref{eq: Y11_divide_Y22}. \nNote that we cannot impose \\eqref{eq: Y11_times_Y22} as it relates the behavior at finite and large $u$. \nThus, we find a one-parameter family of solutions with parameter $z$.\nThis solution is most easily expressed in terms of a T-system consisting of the functions $T_{a,s}$ with $(a,s)\\in \\hat{M}=\\{(a,s)\\in\\mathbb{Z}_{\\geq0}\\times\\mathbb{Z} \\,|\\,\\min(a,|s|)\\leq 2\\}$ and $T_{a,s}=0$ for $(a,s)\\notin \\hat{M}$.\nThe Y-functions are expressed in terms of the T-functions as\n\\begin{equation}\n \\mathcal{Y}_{a,s}=\\frac{T_{a,s+1}T_{a,s-1}}{T_{a+1,s}T_{a-1,s}}\\,.\n\\end{equation}\nIn the constant case, the equations \\eqref{eq: general Y system} imply the following T-system (Hirota) equations for all $(a,s)\\in \\hat{M}$:\n\\begin{equation}\n\\label{eq: T-system equations}\n T_{a,s}^2 = T_{a+1,s} T_{a-1,s} + T_{a,s+1} T_{a,s-1}\\,.\n\\end{equation}\nThe latter are solved by\n\\begin{equation}\n\\label{consTbfgen1}\n\\begin{aligned}\nT_{a,0} &= \\left(\\frac{1-\\noty}{1+\\noty}\\right)^{2a} \\frac{a + 2\\noty}{12 \\noty^4} \\big( a^3 + 6 \\noty a^2 \\\\\n&\\hphantom{= \\left(\\frac{1-\\noty}{1+\\noty}\\right)^{2a} \\frac{a + 2\\noty}{12 \\noty^4} \\big(}+ ( 12\\noty^2-1) a + 6\\noty^3 \\big) \\,,\n\\\\\nT_{a,\\pm 1} &= (-1)^{a} \\left(\\frac{1-\\noty}{1+\\noty}\\right)^{2a} \\frac{a+3\\noty}{6\\noty^4} (a^2+3a\\noty + 3\\noty^2-1) \\,,\n\\\\\nT_{a,\\pm 2} &= \\frac{1}{\\noty^4} \\left(\\frac{1-\\noty}{1+\\noty}\\right)^{2a}\\,,\n\\end{aligned}\n\\end{equation}\nfor $a \\geq |s|$, and\n\\begin{equation}\n\\label{consTbfgen2}\n\\begin{aligned}\nT_{0,s}&=1\\,,\\\\\nT_{1,s} &= \\frac{(-1)^s}{\\noty^2} \\left[ |s| + \\frac{1-3\\noty^2}{2\\noty} \\right] \\left(\\frac{1-\\noty}{1+\\noty}\\right)^{|s|} \\,,\\\\\nT_{2,s} &= \\frac{1}{\\noty^4} \\left(\\frac{1-\\noty}{1+\\noty}\\right)^{2|s|}\\,,\n\\end{aligned}\n\\end{equation}\nfor $|s| \\geq a$. \nThis solution is a special case of the most general, $\\mathfrak{psu}(2,2|4)$ character solution of \\eqref{eq: T-system equations} in \\cite{Gromov:2010vb}.\n\n\\paragraph{Solution at zero coupling}\n\nIn the limit of zero coupling, $g^2=0$, the source term $\\rho(u)$ in \\eqref{eq: CY_10} vanishes \\footnote{In particular, $\\text{constant}\\star H_m=\\text{constant}\\star\\Theta_m=0$.}, such that the functions $\\mathcal{Y}_{a,s}$ are constant for all $u$. Hence, the non-local equation \\eqref{eq: Y11_times_Y22} implies $\\mathcal{Y}_{1,1}\\mathcal{Y}_{2,2}=T_{1,0}=1$. We can use this to determine the parameter $z$ in the constant solution for the T-system above \nand thereby find the Y-system at zero coupling. Imposing $T_{1,0}=1$ is equivalent to $z = \\pm 1\/\\sqrt{3}$. The negative solution has to be discarded as it leads to a negative Hagedorn temperature. Thus, we conclude that to zeroth order $z = 1\/\\sqrt{3}$. Using \\eqref{eq: hagedorn temperature via F} and \\eqref{eq: free energy}, we find the zeroth-order Hagedorn temperature \n\\begin{equation}\n T_{\\text{H}}^{(0)}=\\frac{1}{2\\log(2+\\sqrt{3})}\\,,\n\\end{equation}\nwhich is in perfect agreement with \\cite{Sundborg:1999ue}.\n\n\\paragraph{Perturbative solution}\n\nWe can also solve the TBA equations in a perturbative expansion at weak coupling, expanding the Y-functions as\n\\begin{equation}\n\\mathcal{Y}_{a,s} (u) = \\mathcal{Y}_{a,s}^{(0)} \\left( 1+ \\sum_{\\ell=1}^\\infty g^{2\\ell} y_{a,s}^{(\\ell)} (u)\\right) \\,.\n\\end{equation}\n\nAt one-loop order, the solution takes the form\n\\begin{equation}\n\\label{eq: one-loop form}\ny_{a,s}^{(1)}(u) = \\tilde{y}_{a,s}^{(1)}+ \\sum_{k=0}^\\infty c^{(1)}_{a,s,k} a_{2k+a+s}(u) \\,,\n\\end{equation}\nwhere $\\tilde{y}_{a,s}^{(1)}$ as well as $c^{(1)}_{a,s,k}$ are constants.\nThis follows from the expansions\n\\begin{equation}\n\\label{eq: expansions of kernels}\n \\begin{aligned}\n \\epsilon_0\\hatstar s(u)&=4\\pi g^2 s(u) + 2\\pi g^4 s''(u)+ \\mathcal{O}(g^6)\\,,\\\\\n s(u)&=\\sum_{m=0}^\\infty (-1)^{m}a_{1+2m}(u)\\,, \\\\\n \\theta_n(u)&=a_n(u)+g^2 a_n''(u)+\\mathcal{O}(g^4)\\,,\\\\\n \\Theta_m(v,u)&=a_m(u-v)-a_m(v)\\\\&\\phaneq+g^2\\left(\\frac{2}{u}a_m'(v)-a_m''(v)\\right)+\\mathcal{O}(g^4)\n \\end{aligned}\n\\end{equation}\nin combination with the convolution identity $a_n\\star a_m=a_{n+m}$ and the structure of the TBA equations. Inserting \\eqref{eq: one-loop form} into the expansion of the TBA equations, we can solve for the coefficients $c^{(1)}_{a,s,k}$.\nThe remaining one-loop parameter in the constant solution can be fixed from \n$\\left(\\mathcal{Y}_{1,1}\\mathcal{Y}_{2,2}\\right)^{(1)} (0)=0$, which follows from \\eqref{eq: Y11_times_Y22} and the last expansion in \\eqref{eq: expansions of kernels}.\nWe find for the one-loop Hagedorn temperature\n\\begin{equation}\n T_{\\text{H}}^{(1)}=\\frac{1}{\\log(2+\\sqrt{3})}\\,,\n\\end{equation}\nwhich perfectly agrees with the result of \\cite{Spradlin:2004pp}.\n\nAt two-loop order, $\\rho \\hatstar s$ in \\eqref{eq: CY_10} receives contributions from the one-loop solution\n$y_{a,s}^{(1)}(u)$ from the second and third term in \\eqref{eq: rho}. They can be calculated using \n\\begin{equation}\n (a_n\\star H_{m} \\hatstar s)(u) = g^2 \\frac{4}{(n+|m|)^2} s(u) + \\mathcal{O}(g^4)\\,.\n\\end{equation}\nNote that the dressing kernel in the fourth term of \\eqref{eq: rho} vanishes at this loop order. The two-loop solution takes the form\n\\begin{equation}\n\\label{eq: two-loop form}\n\\begin{aligned}\ny_{a,s}^{(2)}(u) &= \\tilde{y}_{a,s}^{(2)} + \\sum_{k=0}^\\infty c^{(2)}_{a,s,k,1} a_{2k+a+s}(u)\\\\ &\\phaneq+ \\sum_{k=0}^\\infty c^{(2)}_{a,s,k,2} a^2_{2k+a+s}(u) \\\\ &\\phaneq+ \\sum_{k=0}^\\infty c^{(2)}_{a,s,k,3} a^3_{2k+a+s}(u) \\,,\n\\end{aligned}\n\\end{equation}\nas follows from simple reasoning paralleling the one at one-loop order.\nSolving for the coefficients $c^{(2)}_{a,s,k,1}$, $c^{(2)}_{a,s,k,2}$ and $c^{(2)}_{a,s,k,3}$ and fixing the two-loop parameter in the constant solution via \\eqref{eq: Y11_times_Y22}, we find the previously unknown two-loop Hagedorn temperature\n\\begin{equation}\n\\begin{aligned}\n T_{\\text{H}}^{(2)}= \n -\\frac{86}{\\sqrt{3}} + \\frac{24\\log(12)}{\\log(2+\\sqrt{3})}\\,.\n\\end{aligned}\n\\end{equation}\n\n\n\\paragraph{Solution at finite coupling}\n\nAt finite coupling, the infinite set of non-linear integral equations \\eqref{eq: general Y system}--\\eqref{eq: theta n} can be solved numerically \nby iterating the equations and truncating to $a,s\\leq n_{\\max}$.\nThe convolutions are calculated for a finite number of sampling points from which the functions are recovered by interpolation and extrapolation at small and large $u$, respectively.\nWe have implemented this procedure in Mathematica following the strategy of \\cite{Bajnok:2013wsa}, where also \n$T_{\\text{H}}$ has to be iterated.\nWe will report on the resulting solution at finite coupling in our future publication \\cite{HW}.\n\n\\section{Outlook}\n\nIn this letter, we have derived integrability-based TBA equations \\eqref{eq: general Y system}--\\eqref{eq: theta n} that determine the Hagedorn temperature of planar $\\mathcal{N}=4$ SYM theory at any value of the 't Hooft coupling.\nAs an application, we have solved these equations perturbatively up to two-loop order.\nOur TBA equation can also be solved numerically at finite coupling, as was briefly discussed here but will be detailed on in a future publication \\cite{HW}.\nThus, they open up the door for an exact interpolation from weak to strong coupling, which, with the exception of \\cite{Harmark:2006ta}, \nwould be the first time for the case of thermal physics.\nPotentially, this could allow us to develop a better understanding of the phase structure of gauge theories and their dual gravitational theories in general.\n\nFor the spectral problem, the TBA equations have been recast into the form of the quantum spectral curve \\cite{Gromov:2013pga}, which allows to generate precision data at weak coupling \\cite{Marboe:2014gma} as well as at finite coupling \\cite{Gromov:2015wca}.\nWe will report on a similar reformulation of our equations in a future publication \\cite{HW}.\nMoreover, one can study the case of non-zero chemical potentials. We have generalized our method to this case as well, and we have solved the zeroth-order TBA equations for the case with chemical potentials turned on but corresponding still to a symmetric Y-system. We will report on this in a future publication as well \\cite{HW}.\n\nIn this letter, we have used the fact \\eqref{eq: hagedorn temperature via F} that the spin-chain free energy determines the Hagedorn temperature $T_{\\text{H}}$ at which the partition function diverges. The spin-chain free energy should however also determine the partition function in the vicinity of $T_{\\text{H}}$, which should allow to extract e.g.\\ critical exponents.\n\nThe partition function and Hagedorn temperature have also been studied in integrable deformations of $\\mathcal{N}=4$ SYM theory up to one-loop order \\cite{Fokken:2014moa}, where it was found that although $\\mathcal{Z}(T)$ is different, $T_{\\text{H}}$ is unchanged.\nIt would be interesting to see whether this statement continues to hold at higher loop orders. \nSimilarly, one might apply our framework to the three-dimensional $\\mathcal{N}=6$ superconformal Chern-Simons theory, which is known to be integrable as well.\n\n\n\\begin{acknowledgments}\n\\paragraph{Acknowledgements.}\nIt is a pleasure to thank Marta Orselli for collaboration in an earlier stage of the project.\nWe thank\nZoltan Bajnok,\nJohannes Br\\\"{o}del,\nSimon Caron-Huot,\nMarius de Leeuw,\nSergey Frolov,\nNikolay Gromov,\nSebastien Leurent,\nFedor Levkovich-Maslyuk,\nChristian Marboe,\nDavid McGady,\nRyo Suzuki,\nDmytro Volin\nand Konstantin Zarembo\nfor very useful discussions and \nRyo Suzuki for sharing his Mathematica implementation of the TBA equations used in \\cite{Bajnok:2013wsa}. \nT.H.\\ acknowledges support from FNU grant number DFF-6108-00340 and the Marie-Curie-CIG grant number 618284.\nM.W.\\ was supported in part by FNU through grants number DFF-4002-00037 and by the ERC advance grant 291092.\nM.W.\\ further acknowledges the kind hospitality of NORDITA during the program ``Holography and Dualities,'' where parts of this work were carried out.\n\\end{acknowledgments}\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\nThe non-empty set $G$ together with an $n$-ary operation $f:G^n\\to\nG$ is called an {\\it $n$-ary groupoid} (or an {\\it $n$-ary\noperative} -- in the Gluskin terminology, cf. \\cite{glu65}) and\nis denoted by $(G;f)$. We will assume that $n>2$.\n\nAccording to the general convention similar to that introduced in\nthe theory of $n$-ary systems by G. \\v{C}upona (cf. \\cite{Cup})\nthe sequence of elements $x_i,x_{i+1},\\ldots,x_j$ is denoted by\n$x_i^j$. In the case $j2$ there are\n$n$-ary groups which are not of this form. $n$-ary groups of the\nfirst form are called {\\it reducible} to the group $(G;\\circ )$ or\n{\\it derived} from the group $(G;\\circ )$, the second one are\ncalled {\\it irreducible}. Moreover, in some $n$-ary groups there\nexists an element $e$ (called an {\\it $n$-ary identity} or {\\it\nneutral element}) such that\n \\begin{equation} \\label{n-id}\n f(\\stackrel{(i-1)}{e},x,\\stackrel{(n-i)}{e})=x\n \\end{equation}\nholds for all $x\\in G$ and for all $i=1,\\ldots,n$. It is\ninteresting that $n$-ary groups containing a neutral element are\nreducible (cf. \\cite{dor}). Irreducible $n$-ary groups do not\ncontain such elements. On the other hand, there are $n$-ary groups\nwith two, three and more neutral elements. The set\n$\\mathbb{Z}_{n-1}=\\{0,1,\\ldots,n-2\\}$ with the operation\n$f(x_1^{n})=(x_1+x_2+\\ldots +x_{n})({\\rm mod}\\,(n-1))$ is a simple\nexample of an $n$-ary group in which every element is neutral. All\n$n$-ary groups with this property are derived from the commutative\ngroup of the exponent $k|(n-1)$.\n\nIt is worthwhile to note that in the definition of an $n$-ary\ngroup, under the assumption of the associativity of $f$, it\nsuffices only to postulate the existence of a solution of\n(\\ref{solv}) at the places $i=1$ and $i=n$ or at one place $i$\nother than $1$ and $n$. Then one can prove the uniqueness of the\nsolution of (\\ref{solv}) for all $i=1,\\ldots,n$ (cf. \\cite{post},\np. $213^{17}$).\n\nThe above definition of $n$-ary groups is a generalization of the\nWeber's and Huntington formulation of axioms of a group as a\nsemigroup in which the equations $xa=b$, $ya=b$ have solutions.\nMany authors used the notion of $n$-ary groups as a generalization\nof Pierpont's definition of groups as a semigroup with neutral and\ninverse elements. Unfortunately, in this case we obtain only\n$n$-ary groups derived from groups.\n\nE.I. Sokolov proved in \\cite{sok} that in the case of $n$-ary\nquasigroups (i.e. in the case of the existence of a unique\nsolution of (\\ref{solv}) at any place $i=1,\\ldots,n$) it is\nsufficient to postulate the $(j,j+1)$-associativity for some fixed\n$j=1,\\ldots,n-1$.\n\nUsing the same method as Sokolov we can prove the following\nproposition (for details see \\cite{DGG}):\n\n\\begin{proposition}\\label{DGG1}\nAn $n$-ary groupoid $(G;f)$ is an $n$-ary group if and only if\n$($at least$)$ one of the following conditions is satisfied:\n\\begin{enumerate}\n\\item [$(a)$] the $(1,2)$-associative law holds and the\nequation $(\\ref{solv})$ is solvable for $\\,i=n\\,$ and uniquely\nsolvable for $\\,i=1$,\n\\item [$(b)$] the $(n-1,n)$-associative law holds and the\nequation $(\\ref{solv})$ is solvable for $\\,i=1\\,$ and uniquely\nsolvable for $\\,i=n$,\n\\item [$(c)$] the $(i,i+1)$-associative law holds for some\n$\\,i\\in \\{2,...,n-2\\}\\,$ and the equation $(\\ref{solv})$ is\nuniquely solvable for $\\,i\\,$ and some $j>i$.\n\\end{enumerate}\n\\end{proposition}\n\n\\medskip\n\nIn \\cite{DD80} (see also \\cite{cel77}) the following\ncharacterization of $n$-ary groups is given:\n\n\\begin{proposition}\nAn $n$-ary semigroup $(G;f)$ is an $n$-ary group if and only if\nfor some $k\\in\\{1,2,\\ldots,n-2\\}$ and all $a_1^k\\in G$ there are\nelements $x_{k+1}^{n-1},\\,y_{k+1}^{n-1}\\in G\\,$ such that\n\\begin{equation}\nf(a_1^k,x_{k+1}^{n-1},b)=f(b,y_{k+1}^{n-1},a_1^k)=b\\label{DG-80}\n\\end{equation}\nfor all $\\,b\\in G$.\n\\end{proposition}\n\n\n\\medskip\n\n\\begin{proposition}\nAn $n$-ary semigroup $(G;f)$ is an $n$-ary group if and only if\nfor some $i,j\\in\\{1,2,\\ldots,n-1\\}$ and all $a,b\\in G$ there are\n$x,y\\in G\\,$ such that\n\\begin{equation}\nf(x,\\stackrel{(i-1)}{b},\\stackrel{(n-i)}{a})=f(\\stackrel{(n-j)}{a},\\stackrel{(j-1)}{b},y)=b.\n\\label{gal-r1}\n\\end{equation}\n\\end{proposition}\n\n\n\\medskip\nPutting in the above proposition $i=j=1$ we obtain the following\nmain result of \\cite{Tyu85}.\n\n\\begin{corollary}\n{\\em An $n$-ary semigroup $(G;f)$ is an $n$-ary group if and only\nif for all $a,b\\in G$ there are $x,y\\in G\\,$ such that}\n\\[\nf(x,\\stackrel{(n-1)}{a})=f(\\stackrel{(n-1)}{a},y)=b.\n\\]\n\\end{corollary}\n\n\\bigskip\n\nFrom the definition of an $n$-ary group $(G;f)$ we can directly\nsee that for every $x\\in G$ there exists only one $z\\in G$\nsatisfying the equation\n \\begin{equation} \\label{skew}\nf(\\stackrel{(n-1)}{x},z)=x .\n \\end{equation}\nThis element is called {\\it skew} to $x$ and is denoted by\n$\\overline{x}$. In a ternary group ($n=3$) derived from the binary\ngroup $(G;\\circ)$ the skew element coincides with the inverse\nelement in $(G;\\circ)$. Thus, in some sense, the skew element is a\ngeneralization of the inverse element in binary groups. This\nsuggests that for $n\\geqslant 3$ any $n$-ary group $(G;f)$ can be\nconsidered as an algebra $(G;f,\\bar{\\,}\\;)$ with two operations:\none $n$-ary $\\,f:G^n\\to G$ and one unary $\\;\\bar{\\,} :\nx\\to\\overline{x}$. D\\\"ornte proved (see \\cite{dor}) that in\nternary groups for all $x\\in G$ we have\n$\\overline{\\overline{x}}=x$, but for $n>3$ this is not true. For\n$n>3$ there are $n$-ary groups in which one fixed element is skew\nto all elements (cf. \\cite{D90}) and $n$-ary groups in which any\nelement is skew to itself. Then, in the second case, of course the\n$n$-ary group operation $f$ is idempotent. An $n$-ary group in\nwhich $f(\\stackrel{(n)}{x})=x$ for every $x\\in G$ is called {\\it\nidempotent}.\n\nNevertheless, the concept of skew elements plays a crucial role in\nthe theory of $n$-ary groups. Namely, as D\\\"ornte proved, the\nfollowing theorem is true.\n\n\\begin{theorem}\\label{dor-th}\n In any $n$-ary group $(G;f)$ the following identities:\n \\begin{eqnarray}\n f(\\stackrel{(i-2)}{x},\\overline{x},\\stackrel{(n-i)}{x},y)=y, \\label{dor-r}\\\\\n f(y,\\stackrel{(n-j)}{x},\\overline{x},\\stackrel{(j-2)}{x})=y, \\label{dor-l}\\\\\n f(\\stackrel{(k-1)}{x},\\overline{x},\\stackrel{(n-k)}{x})=x\n \\label{skew2}\n \\end{eqnarray}\nhold for all $\\,x,y\\in G$, $\\,2\\leqslant i,j\\leqslant n\\,$ and\n$\\,1\\leqslant k\\leqslant n$.\n\\end{theorem}\n\n\n\\medskip\n\nThe first two identities, called now {\\it D\\\"ornte's identities},\nare used by many authors to describe the class of $n$-ary groups.\nFor example, in 1967 B. Gleichgewicht and K. G{\\l}azek proved in\n\\cite{GG67} (see also \\cite{Sio67}) that for fixed $n\\geqslant 3$\nthe class of all $n$-ary groups, considered as algebras of type\n$(n,1)$, forms a Mal'cev variety and found the system of\nidentities defining this variety. This means that all congruences\nof a given $n$-ary group commute and that the lattice of all\ncongruences of a fixed $n$-ary group is modular. But, as was\nobserved many years later, from the theorem on page 448 in\nGluskin's paper \\cite{glu65} it follows that the system of\nidentities given by B. Gleichgewicht and K. G\\l azek is not\nindependent. For similar axiom considerations, see also\n\\cite{cel77}, \\cite{rus79} and \\cite{rus81} (for other systems of\naxioms, see, e.g., \\cite{monk2}). The first independent system of\nidentities defining this variety was given in our paper\n\\cite{DGG}. Now we give the minimal system of such identities.\nThis is the main result of \\cite{Rem}.\n\n\\begin{theorem}\\label{DGG}\nThe class of $n$-ary groups coincides with the variety of $n$-ary\ngroupoids $(G;f,\\bar{}\\;)$ with a unary operation\n$\\,\\bar{}:x\\to\\overline{x}$ satisfying for some fixed\n$i,j\\in\\{2,\\ldots,n\\}$ the D\\\"ornte identities $(\\ref{dor-r})$,\n$(\\ref{dor-l})$ and the identity\n\\[\n f(f(x_1^{n}),x_{n+1}^{2n-1})=f(x_1,f(x_2^{n+1}),x_{n+2}^{2n-1}).\n \\]\n\\end{theorem}\n\n\\medskip\n\nTheorem \\ref{DGG} gives the minimal system of identities defining\n$n$-ary groups. In fact, for $n>3$ the set $Z$ of all integers\nwith the operation $f(x_1^n)=x_{n-1}+x_n$ is an example of a\n$(1,2)$-associative $n$-ary groupoid in which (\\ref{dor-r}) holds\nfor $\\overline{x}=0$ but (\\ref{dor-l}) is not satisfied.\nSimilarly, $(Z;f)$ with $f(x_1^n)=x_1$ is an example of a\n$(1,2)$-associative $n$-ary groupoid satisfying (\\ref{dor-l}) but\nnot (\\ref{dor-r}). It is clear that the $(1,2)$-associativity\ncannot be deleted.\n\nNote by the way that in some papers there are investigated\nso-called {\\it infinitary} semigroups and quasigroups, i.e.\ngroupoids $(G;f)$, where the number of variables in the operation\n$f:G^{\\infty}\\to G$ is infinite, but countable. Infinitary\nsemigroups are the infinitary groupoids $(G;f)$, where for all\nnatural $\\,i, j\\,$ the operation $f$ satisfies the identity\n \\[\nf(x_1^{i-1},f(x_i^{\\infty}),y_1^{\\infty})=\nf(x_1^{j-1},f(x_j^{\\infty}),y_1^{\\infty}).\n \\]\nInfinitary quasigroups are infinitary groupoids $(G;f)$ in which\nthe equation $\\,f(x_1^{k-1},z_k,x_{k+1}^{\\infty})=x_0\\,$ has a\nunique solution $z_k$ at any place $k$.\n\nFrom the general results obtained in \\cite{belz} and \\cite{MTC}\none can deduce that infinitary groups have only one element. Below\nwe present a simple proof of this fact.\n\nIf $(G;f)$ is an infinitary group, then, according to the\ndefinition, for any $y,z\\in G$ and $u=f(\\stackrel{(\\infty)}{y})$\nthere exists $x\\in G$ such that\n$z=f(u,y,x,\\stackrel{(\\infty)}{y})$. Thus\n\\[\\arraycolsep.5mm\n \\begin{array}{rl}\nf(z,\\stackrel{(\\infty)}{y})=&f(f(u,y,x,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{y})=\n f(u,y,f(x,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{y})\\\\[6pt]\n=&f(f(\\stackrel{(\\infty)}{y}),y,f(x,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{y})\n=f(y,f(\\stackrel{(\\infty)}{y}),y,f(x,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{y})\\\\[6pt]\n=&f(y,u,y,f(x,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{y})\n=f(y,f(u,y,x,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{y})=f(y,z,\\stackrel{(\\infty)}{y}),\n \\end{array}\n \\]\ni.e. for all $y,z\\in G\\,$ we have\n\\[\nf(z,\\stackrel{(\\infty)}{y})=f(y,z,\\stackrel{(\\infty)}{y}).\n\\]\nUsing this identity and the fact that for all $\\,x,y\\in G$ there\nexists $z\\in G$ such that $\\,x=f(z,\\stackrel{(\\infty)}{y}),\\,$ we\nobtain\n\\[\\arraycolsep.5mm\n \\begin{array}{rl}\nf(\\stackrel{(\\infty)}{x})=&f(x,f(z,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{x})=\n f(x,f(y,z,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{x})\\\\[6pt]\n=&f(x,y,f(z,\\stackrel{(\\infty)}{y}),\\stackrel{(\\infty)}{x})\n=f(x,y,\\stackrel{(\\infty)}{x}),\n \\end{array}\n \\]\nwhich together with the existence of only one solution at the\nsecond place implies $x=y$. Hence $G$ has only one element.\n\n\\medskip\n\nAccording to Theorem~\\ref{DGG}, the class of all $n$-groups (for\n$n>2$) can be considered as a variety of algebras\n$(G;f,\\bar{\\,}\\;)$ with one $n$-ary operation $f$ and one unary\n$\\,\\bar{}:x\\to\\overline{x}$. The class of $n$-ary groups can be\nalso considered as a variety of algebras of different types (cf.\n\\cite{filomat} and \\cite{jus'03}).\n\nTheorem~\\ref{DGG} is valid for $n>2$, but, as it was observed in\n\\cite{Rem}, this theorem can be extended to the case $n=2$.\nNamely, let \\ $\\hat{\\,}:x\\to\\hat{x}$ be a unary operation, where\n$\\hat{x}$ is defined as a solution of the equation\n$f_{(2)}(\\stackrel{(2n-2)}{x},\\hat{x})=x$. Then using the same\nmethod as in the proof of Theorem 2 in \\cite{DGG} we can prove:\n\n\\begin{theorem}\nLet $(G;f)$ be an $n$-ary $(n\\geqslant 2)$ semigroup with a unary\noperation $\\hat{}:x\\to\\hat{x}$. Then $(G;f,\\,\\hat{\\,}\\,)$ is an\n$n$-ary group if and only if for some $i,j\\in\\{2,\\ldots,2n-1\\}$\nthe following identities\n\\[\nf_{(2)}(y,\\stackrel{(i-2)}{x},\\hat{x},\\stackrel{(2n-1-i)}{x})=y=\nf_{(2)}(\\stackrel{(2n-1-j)}{x},\\hat{x},\\stackrel{(j-2)}{x},y)\n\\]\nhold.\n\\end{theorem}\n\nFrom this theorem we can deduce other definitions of $n$-ary\n$(n\\geqslant 2)$ groups presented in \\cite{Gal'95}, \\cite{Gal'03},\n\\cite{rus79} and \\cite{Sio67}.\n\n\\medskip\n\nAn $n$-ary group is said to be {\\em semiabelian} if the following\nidentity\n\\begin{equation}\nf(x_1^n)=f(x_n,x_2^{n-1},x_1)\n\\end{equation}\nis satisfied. In this case the operation $\\,\\bar{\\,}:x\\to\n\\overline{x}\\,$ is a homomorphism (cf. \\cite{GG'77}). Note by the\nway that the class of all semiabelian $n$-ary groups coincides\nwith the class of {\\it medial} $n$-ary groups (cf. \\cite{medial},\n[29]). (Some authors used also the name {\\it abelian} instead of\n{\\it semiabelian} (see, e.g., \\cite{Sio67}, [29]).) Such $n$-ary\ngroups are a special case of {\\it $\\sigma$-permutable} $n$-ary\ngroups (cf. \\cite{St-D'86}), i.e. $n$-ary groups in which\n$f(x_1^n)=f(x_{\\sigma(1)},x_{\\sigma(2)},\\ldots,x_{\\sigma(n)})$ for\nfixed $\\sigma\\in S_n$. An $n$-ary group which is\n$\\sigma$-permutable for every $\\sigma\\in S_n$ is usually called\n{\\it commutative}.\n\nAn {\\it $n$-ary power} of $x$ in an $n$-ary group $(G;f)$ is\ndefined in the following way: $x^{<0>}=x$, \\\n$x^{<1>}=f(\\stackrel{(n)}{x})\\;$ and\n$x^{}=f(\\stackrel{(n-1)}{x},x^{})\\;$ for all $k>0$. In\nthis convention $x^{<-k>}$ means an element $z$ such that\n$f(x^{},\\stackrel{(n-2)}{x},z)=x^{<0>}=x$. Then\n$\\overline{x}=x^{<-1>}$ and\n\\[\n\\begin{array}{l}\nf(x^{},\\ldots,x^{})=x^{}\\\\[4pt]\n(x^{})^{}=x^{}\n\\end{array}\n\\]\n(cf. \\cite{post}, \\cite{Gl'82} or \\cite{auto}).\n\nNow, putting $x^{\\!\\!\\!\\!-(0)}=x$ and denoting by\n$x^{\\!\\!\\!\\!-(m+1)}$ the skew element to $x^{\\!\\!\\!\\!-(m)}$, from\nthe above two identities and results obtained by W. A. Dudek in\n\\cite{auto} and \\cite{medial} we deduce the following proposition.\n\\begin{proposition}\nIn any $n$-ary group \\ $x^{\\!\\!\\!\\!-(m)}=x^{}$, where\n$S_m=\\frac{(2-n)^m-1}{n-1}$.\n\\end{proposition}\n\nThis means that for every $n>2$ we have\n$\\overline{\\overline{x}}=x^{}$. In particular,\n$\\overline{\\overline{x}}=x^{<1>}$ in all $4$-ary groups, and\n$\\overline{\\overline{x}}=x^{<2>}$ in all $5$-ary groups (cf. \\cite{Gl'82})\n\n\\section{Hossz\\'u-Gluskin algebras}\n\nLet $(G;f)$ be an $n$-ary group. Fixing in $f(x_1^n)$ some $m2$, is an $n$-ary group if and\nonly if\n\\begin{enumerate}\n\\item[$(i)$] on $G$ one can define a binary operation $\\cdot$ such\nthat $(G;\\cdot)$ is a group,\n\\item[$(ii)$] there exist an automorphism $\\varphi$ of $(G;\\cdot)$ and\n$b\\in G$ such that $\\varphi(b)=b$,\n\\item[$(iii)$] $\\varphi^{n-1}(x)=b\\cdot x\\cdot b^{-1}$ holds for every\n$x\\in G$,\n\\item[$(iv)$] $f(x_1^n)=x_1\\cdot\\varphi(x_2)\\cdot\\varphi^2(x_3)\\cdot\\varphi^3(x_4)\\cdot\\ldots\n\\cdot\\varphi^{n-1}(x_n)\\cdot b$ for all $x_1,\\ldots,x_n\\in G$.\n\\end{enumerate}\n\\end{theorem}\n\nTwo years later, this theorem was proved by L. M. Gluskin (see\n\\cite{glu65}) in a more general form (for so-called positional\noperatives). For a generalization to $n$-ary semigroups, see also\n\\cite{Monk} and \\cite{Zup}. In another version this theorem was\nalso formulated by E. L. Post (cf. \\cite{post}, p. 246). An\nelegant short proof was given by E. I. Sokolov in \\cite{sok}. His\nproof is based on the observation that $(G;\\cdot)=ret_a(G;f)$.\nThen we have:\n \\begin{equation}\n\\varphi(x)=f(\\overline{a},x,\\stackrel{(n-2)}{a})\\label{autom}\n \\end{equation}\nand\n \\begin{equation}\n b=f(\\stackrel{(n)}{\\overline{a}}).\\label{b}\n \\end{equation}\nFrom (14) and (7) or (8), we can deduce that commutative $n$-ary group\noperations have the form $f(x_1^n)=x_1\\cdot x_2\\cdot\\ldots\\cdot x_n\\cdot b$,\nwhere $(G;\\cdot)$ is a commutative group.\n\nNote that the last condition of Theorem~\\ref{thGH} can be\nrewritten in the form\n\\begin{equation}\nf(x_1^n)=x_1\\cdot\\varphi(x_2)\\cdot\\varphi^2(x_3)\\cdot\\varphi^3(x_4)\\cdot\\ldots\n\\cdot\\varphi^{n-2}(x_{n-1})\\cdot b\\cdot x_n. \\label{e10}\n\\end{equation}\n\nThe above theorem has the following generalization (cf.\n\\cite{DM1}):\n\\begin{theorem}\\label{genGH}\nAn $n$-ary groupoid $(G;f)$, $n>2$, is an $n$-ary group if and\nonly if\n\\begin{enumerate}\n\\item[$(i)$] on $G$ one can define a $k$-ary operation $g$ such\nthat $(G;g)$ is a $k$-ary group and $k-1$ divides $n-1$,\n\\item[$(ii)$] there exist an automorphism $\\varphi$ of $(G;g)$\nand elements $b_2,\\ldots,b_k\\in G$ such that $\\varphi(b_i)=b_i$\nfor $i=2,\\ldots,k$,\n\\item[$(iii)$] $g(\\varphi^{n-1}(x),b_2^k)=g(b_2^k,x)$ holds for every\n$x\\in G$,\n\\item[$(iv)$]\n$f(x_1^n)=g_{(\\cdot)}(x_1,\\varphi(x_2),\\varphi^2(x_3),\\ldots,\n\\varphi^{n-1}(x_n),b_2^k)$ for all $x_1,\\ldots,x_n\\in G$.\n\\end{enumerate}\n\\end{theorem}\n\nIn this theorem $(G;g)=ret_{a_1^r}(G;f)$, where $a_1=\\ldots=a_r=a$.\nIn this case, we get:\n\\begin{equation}\n\\varphi(x)=f(\\overline{a},\\stackrel{(n-r-2)}{a},x,\\stackrel{(r)}{a}),\n\\label{k-fi}\n\\end{equation}\n\\begin{equation}\nb_2=\nf_{(\\cdot)}(\\stackrel{(n-r-2)n}{a},\\stackrel{(n)}{\\overline{a}},\\stackrel{(k-2)(n-r-2)}{a}),\n \\ \\ b_3=\\ldots=b_k=\\overline{a}.\\label{b_2}\n\\end{equation}\n\nOther important generalizations can be found in \\cite{Hosszu2}\n(for heaps), \\cite{Mar-Jan} (for vector valued groups),\n\\cite{Sokh} (for partially associative $n$-ary quasigroups).\n\n\\medskip\n\nFollowing E. L. Post (see \\cite{post}, cf. [4], p. 36--40, and\n[28]) a binary group \\ $\\mathfrak{G}^{\\ast }=\\left(G^{\\ast };\\circ\n\\right)$ is said to be a {\\it covering group} for the $n$-ary\ngroup $(G;f)$ if there exists an embedding $\\tau :G\\rightarrow\nG^{\\ast }$ such that $\\tau(G)$ is a generating set of $G^{\\ast }$\nand \\ $\\tau (f(x_1^n)) = \\tau\n(x_1)\\circ\\tau(x_2)\\circ\\ldots\\circ\\tau(x_n)$ for every\n$x_1,\\ldots,x_n\\in G.$ \\ $\\mathfrak{G}^{\\ast }$ is a\n\\textit{universal covering group} (or a \\textit{free covering\ngroup}) if for any covering group $\\mathfrak{G}_{1}^{\\ast }$\\\nthere exists a homomorphism from $G^*$ onto $G^*_1$ such that the\nfollowing diagram is commutative (or compatible -- in another\nterminology):\n\n\\begin{center}\n\\begin{minipage}{6cm}\n\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ $G$\n\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ { \\ }$\\swarrow ${ \\ }$\n\\circlearrowleft ${ \\ }$\\searrow $\n\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ $G^{\\ast}--\\rightarrow \\ G_{1}^{\\ast}$\n\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ {\\footnotesize onto}\n\\end{minipage}\n\\end{center}\n\nPost proved in \\cite{post} that for every $n$-ary group $(G;f)$\nthere exist a covering group $(G^{\\ast};\\circ)$ and its normal\nsubgroup $G_0$ such that $G^{\\ast}\\diagup G_0$ is a cyclic group\nof order $n-1$ and $f(x_1^n)=x_1\\circ x_2\\circ\\ldots\\circ x_n$ for\nall $x_1,\\ldots,x_n\\in G$. So, the theory of $n$-ary groups is\nclosely related to the theory of {\\it cyclic extensions of\ngroups}, but these theories are not equivalent.\n\nIndeed, the above theorems show that for any $n$-ary group $(G;f)$\nwe have the sequence\n$$\nO\\rightarrow (G_0;\\circ)\\rightarrow (G^{\\ast};\\circ )\n\\stackrel{\\zeta }{\\longrightarrow }\\mathcal{C}\\left( n\\right)\n\\rightarrow O,\n $$\nwhere $(G^{\\ast };\\circ)$ is the free covering group of $(G;f)$\nwith $G=\\zeta^{-1}\\left( 1\\right)$, and $1$ is a generator of the\ncyclic (additively writing) group $\\mathcal{C}\\left( n\\right)\n=(C_{n};+_{n}).$\n\nWe have\n\\[\n\\begin{array}{ccccc}\n& & ( G_{1}^{\\ast };\\circ) & & \\\\\n& \\nearrow & \\uparrow & \\searrow & \\\\\n(G_0;\\circ ) & & \\circlearrowright \\;\\;\\; {\\vert}\n\\circlearrowleft\\circlearrowright & & C\\left( n\\right) \\\\\n& \\searrow &\\downarrow & \\nearrow & \\\\\n& & (G_2^{\\ast};\\circ)& &\n\\end{array}\n\\]\nwhere we use\n\n$\\circlearrowright $ \\ for the equivalence of extensions,\n\n$\\circlearrowleft $ \\ for the isomorphism of suitable $n$-ary\ngroups.\n\n\\medskip\n\nOf course, two $n$-ary groups determined in the above-mentioned\nsense by two equivalent cyclic extensions are isomorphic. However,\ntwo non-equivalent cyclic extensions can determine two isomorphic\n$n$-ary groups.\n\n\\begin{example} Consider two cyclic extensions of the cyclic group $%\n\\mathcal{C}(3)$ by $\\mathcal{C}(3)$:\n$$\n0\\rightarrow \\mathcal{C}(3)\\stackrel{\\alpha }{\\rightarrow\n}\\mathcal{C}(9)\\stackrel{\\beta _{1}}{\\rightarrow\n}\\mathcal{C}(3)\\rightarrow 0\n$$\nand\n$$\n0\\rightarrow \\mathcal{C}(3)\\stackrel{\\alpha }{\\rightarrow\n}\\mathcal{C}(9)\\stackrel{\\beta _{2}}{\\rightarrow\n}\\mathcal{C}(3)\\rightarrow 0,\n$$\nwhere the homomorphisms $\\alpha $, $\\beta _{1}$ and $\\beta _{2}$\nare given by:\n\\[\n\\begin{array}{lcl}\n\\;\\alpha (x)=3x&{\\rm for}& x\\in C_{3},\\\\[4pt]\n\\beta_{1}(x)\\equiv x({\\rm mod}\\,3)&{\\rm for}&x\\in C_{9},\\\\[4pt]\n\\beta_{2}(x)\\equiv 2x({\\rm mod}\\,3)&{\\rm for}&x\\in C_{9}.\n\\end{array}\n\\]\n\nIt is easy to verify that if $g(x,y,z,v)=(x+y+z+v)({\\rm mod}\\,9),$\nthen the $4$-ary groups $(\\beta _{1}^{-1}(1);g)$ and $(\\beta\n_{2}^{-1}(2);g)$, corresponding to those extensions are isomorphic\nto the $4$-ary groups $(C_{3};f_{1})$, $(C_{3};f_{2})$,\nrespectively, where\n $$\nf_{1}(x,y,z,v)\\equiv (x+y+z+v+1)({\\rm mod}\\,3)\n $$\nand\n$$\nf_{2}(x,y,z,v)\\equiv (x+y+z+v+2)({\\rm mod}\\,3).\n$$\nThese 4-groups are isomorphic. The isomorphism\n$\\varphi:(C_{3};f_{1})\\to(C_{3};f_{2})$ has the form\n$\\varphi(x)\\equiv 2x({\\rm mod}\\,3)$. Nevertheless, the\nabove-mentioned extensions are not equivalent (because there is no\nautomorphism $\\lambda $ of $\\mathcal{C}(9)$ such that $\\lambda\n\\circ \\alpha =\\alpha $ and \\ $\\beta _{2}\\circ \\lambda =\\beta\n_{1}$).\n\\end{example}\n\nThe algebra $(G;\\cdot,\\varphi,b)$ of the type $(2,1,0)$, where\n$(G;\\cdot)$ is a (binary) group, $b\\in G$ is fixed, $\\varphi\\in\nAut(G;\\cdot)$, $\\varphi(b)=b$ and $\\varphi^{n-1}(x)=b\\cdot x\\cdot\nb^{-1}$ for every $x\\in G$ is called a {\\it Hossz\\'u-Gluskin\nalgebra} (briefly: an {\\it $HG$-algebra}). We say that an\n$HG$-algebra $(G;\\cdot,\\varphi,b)$ is {\\it associated} with an\n$n$-group $(G;f)$ if the identity (\\ref{e10}) is satisfied. In\nthis case we say also that an $n$-ary group $(G;f)$ is {\\it\n$\\langle\\varphi,b\\rangle$-derived} from the group $(G;\\cdot)$. A\n$k$-ary $HG$-algebra $(G;g,\\varphi,b_2^k)$ can be defined\nsimilarly. Binary $HG$-algebras are studied in \\cite{jus'95a},\n\\cite{jus'95b} and \\cite{jus'03}.\n\nTheorems~\\ref{thGH} and \\ref{genGH} state that every $k$-ary\n$HG$-algebra is associated with some $n$-ary group. Any $n$-ary\ngroup is $\\langle\\varphi,b\\rangle$-derived from some binary group\nand $\\langle\\varphi,b_2^k\\rangle$-derived from some $k$-ary group.\n\n\\section{Calculation of $n$-ary groups on small sets}\n\nResults presented in the previous section give the possibility to\nevaluate the number of non-isomorphic $n$-ary groups. To calculate\nthese groups we must use the following result proved in\n\\cite{DM2}.\n\n\\begin{theorem}\\label{izoth}\nTwo $n$-ary groups $(G_1;f_1)$, $(G_2;f_2)$ are isomorphic if and\nonly if for every $c\\in G_1$ there exists an isomorphism\n$h:ret_c(G_1;f_1)\\to ret_d(G_2;f_2)$ such that $d=h(c)$, \\\n$h(f_1({\\overline{c}},\\ldots,{\\overline{c}}))=\nf_2(\\overline{d},\\ldots,\\overline{d}) $ and\n$h(f_1(\\overline{c},x,\\!\\stackrel{(n-2)}{c}))=\nf_2(\\overline{d},h(x),\\!\\stackrel{(n-2)}{d}).$\n\\end{theorem}\n\n\\begin{corollary}\\label{izoth2}\n{\\it Two commutative $n$-ary groups $(G_1;f_1)$, $(G_2;f_2)$ are\nisomorphic if and only if for every $c\\in G_1$ there exists an\nisomorphism $h:ret_c(G_1;f_1)\\to ret_d(G_2;f_2)$ such that\n$d=h(c)$ and $h(f_1({\\overline{c}},\\ldots,{\\overline{c}}))=\nf_2(\\overline{d},\\ldots,\\overline{d})$.}\n\\end{corollary}\n\nIf $(G,\\cdot)$ is an abelian group, then, of course, we can\nconsider the automorphism of the form $\\alpha(x)=x^{-1}$. Then $G$\nwith the operation\n\\begin{equation}\nf(x_1^n)=x_1\\cdot x_2^{-1}\\cdot x_3\\cdot\\ldots\\cdot\nx^{-1}_{n-1}\\cdot x_n\\label{-1}\n\\end{equation}\nis an $n$-ary group if $n$ is odd. Such $n$-ary groups are\ncharacterized by the following theorem proved in \\cite{Gl-Mi'84}.\n\n\\begin{theorem} Let $m$ be odd and let $(G;f)$ be an\n$n$-ary group. Then the operation $f$ has the form $(\\ref{-1})$,\nwhere $(G;\\cdot)$ is an abelian group, if and only if\n\\begin{enumerate}\n\\item[$(i)$] \\ $f\\left( x,\\ldots,x\\right) =x$,\n\\item[$(ii)$] \\ $f\\left(x_1^{i},y,y,x_{i+3}^{n}\\right)=\nf\\left(x_1^{i},z,z,x_{i+3}^{n}\\right)$ for all $\\;0\\leqslant\ni\\leqslant n-2.$\n\\end{enumerate}\nIn this case $(G;\\cdot)=ret_a(G;f)$ for some $a\\in G$.\n\\end{theorem}\n\nConsider an abelian group $(G;+)$. Then, as a special case of an $n$-ary\ngroup operation of form (19), one can obtain the ternary term operation\n$$\nf(x,y,z)=x-y+z\n$$\nwhich is a so-called Mal'tsev term in the group $G$. Of course, it is\nidempotent and medial ({\\it entropic} -- in another terminology). Such\nternary operations appear in several branches of mathematics. For example,\nthey play very important role in affine geometry and the theory of modes\n(because of idempotency and mediality), in the theory of congruences\nin general algebras (because existence of a Mal'tsev term in general algebras\nimplies permutability of congruences and then modularity of lattices of\ncongruences) and also in the theory of clones which is important in\nUniversal Algebra and as well in Multiple-valued Logics.\n\n\\medskip\nFrom results obtained in \\cite{Gl-Mi'84} (cf. also \\cite{Tim'72})\nwe can deduce:\n\n\\begin{proposition} Let $(G;\\cdot)$ be a group and let $t_1,\\ldots,t_n$\nbe fixed integers. Then $G$ with the operation\n\\[\nf(x_1^{m})=(x_1)^{t_{1}}\\cdot(x_{2})^{t_{2}}\\cdot\\ldots \\cdot\n(x_{n-1})^{t_{n-1}}\\cdot(x_{n})^{t_{n}},\n\\]\nis an $n$-ary group if and only if\n\\begin{enumerate}\n\\item \\ $x^{t_1}=x=x^{t_n}$,\n\\item \\ $t_j=k^{j}$ \\ for some integer $k$ and all $j=2,\\ldots,n-1$,\n\\item \\ $(x\\cdot y)^k=x^k\\cdot y^k.$\n\\end{enumerate}\n\\end{proposition}\n\nIn this case we say that $(G;f)$ is {\\em derived from the\n$k$-exponential group}.\n\\begin{proposition}\nAn $n$-ary group $(G;f)$ is derived from the $k$-exponential\n$(k>0)$ group $(G;\\cdot)$ if and only if there exists $a\\in G$\nsuch that\n\\begin{enumerate}\n\\item \\ $f(a,\\ldots,a)=a$,\n\\item \\ $f_{(k)}(\\stackrel{(n-2)}{a},x,\\stackrel{(n-2)}{a},x,\n\\ldots,\\stackrel{(n-2)}{a},x,a)=x$.\n\\end{enumerate}\nMoreover, $(G;\\cdot)=ret_a(G;f)$.\n\\end{proposition}\n\nUsing the above results we can describe all non-isomorphic $n$-ary\ngroups with small numbers of elements.\n\nFor this let $(\\mathbb{Z}_k;+)$ be the cyclic group modulo $k$.\nConsider the following $n$-ary operation:\n \\[\\arraycolsep=.5mm\n \\begin{array}{rl}\nf_{a}( x_1^n) &\\equiv (x_{1}+\\ldots+x_{n}+a)\\,({\\rm mod}\\,k) ,\\\\[4pt]\ng_{d}(x_1^n)&\\equiv (x_1+dx_2+\\ldots+d^{n-2}x_{n-1}+x_n)\\,({\\rm mod}\\,k),\\\\[4pt]\ng_{d,c}(x_1^n)&\\equiv\n(x_1+dx_2+\\ldots+d^{n-2}x_{n-1}+x_n+c)\\,({\\rm mod}\\,k),\n\\end{array}\n \\]\nwhere $a\\in\\mathbb{Z}_k$, \\ $c,d\\in\\mathbb{Z}_k\\setminus\\{0,1\\},$\n\\ $d^{\\,n-1}\\equiv 1\\,({\\rm mod}\\,k).$ Additionally, for the\noperation $g_{d,c}$ we assume that $dc\\equiv c\\,({\\rm mod}\\,k)$\nholds. By Theorem~\\ref{thGH}, $(\\mathbb{Z}_{k};f_{a})$,\n$(\\mathbb{Z}_{k};g_{d})$ and $(\\mathbb{Z}_{k};g_{d,c})$ are\n$n$-ary groups.\n\n\\bigskip\n\nIn \\cite{Gl-Mi-S} the following theorem is proved:\n\\begin{theorem} A $k$-element $n$-ary group $(G;f)$ is\n$\\langle\\varphi,b\\rangle$-derived from the cyclic group of order\n$k$ if and only if it is isomorphic to exactly one $n$-ary group\nof the form $(\\mathbb{Z}_{k};f_{a})$, $(\\mathbb{Z}_{k};g_{d})$ or\n$(\\mathbb{Z}_{k};g_{d,c})$, where $d|gcd(k,n-1)$ and $c|k.$\n\\end{theorem}\n\nAn infinite cyclic group can be identified with the group\n$(\\mathbb{Z};+)$. This group has only two automorphisms:\n$\\varphi(x)=x$ and $\\varphi(x)=-x$. So, according to\nTheorem~\\ref{thGH}, $n$-ary groups defined on $\\mathbb{Z}$ have\nthe form $(\\mathbb{Z};f_a)$ or $(\\mathbb{Z};g_{-1})$, where\n$$\ng_{-1}(x_1^n)=x_1-x_2+x_3-x_4+\\ldots+x_n, $$ and $n$ is odd. Since\n$\\varphi_k(x)=x+k$ is an isomorphism of $n$-ary groups\n$(\\mathbb{Z};f_a)$ and $(\\mathbb{Z};f_b)$, where $a=b+(n-1)k$, the\ncalculation of non-isomorphic $n$-ary groups of the form\n$(\\mathbb{Z};f_a)$ can be reduced to the case when\n$a=0,1,\\ldots,n-2$. From Corollary~\\ref{izoth2} it follows that\nthese $n$-ary groups are non-isomorphic.\n\nSo, we have proved\n\\begin{theorem}\nAn $n$-ary group $\\langle\\varphi,b\\rangle$-derived from the\ninfinite cyclic group $(\\mathbb{Z};+)$ is isomorphic to an $n$-ary\ngroup $(\\mathbb{Z};f_a)$, where $0\\leqslant a\\leqslant (n-2)$, or\nto $(\\mathbb{Z};g_{-1})$, where $n$ is odd.\n\\end{theorem}\n\nDenote by $Inn\\left(G;\\cdot\\right)$ the group of all inner\nautomorphisms of $(G;\\cdot)$, by $Out\\left( G;\\cdot \\right)$ the\nfactor group of $Aut\\left(G;\\cdot\\right)$ by\n$Inn\\left(G;\\cdot\\right)$, and by $Out_{n}\\left( G;\\cdot \\right) $\nthe set of all cosets $\\overline{\\gamma}\\in\nOut\\left(G;\\cdot\\right)$ containing $\\gamma$ such that\n$\\gamma^{n-1}\\in Inn\\left(G;\\cdot\\right)$. Then, as it is proved\nin \\cite{Gl-Mi-S}, for centerless groups, i.e. groups for which\n$\\,card(Cent\\left(G;\\cdot\\right))=1$, the following theorem is\ntrue.\n\n\\begin{theorem} Let $\\left( G;\\cdot \\right)$ be a centerless group such that\n$Out_{n}\\left(G;\\cdot\\right)$ is abelian, and let\n$\\left(G;f\\right)$ be $\\langle\\alpha,a\\rangle$-derived, and\n$\\left(G;g\\right)$ be $\\langle\\beta,b\\rangle$-derived from\n$\\left(G;\\cdot\\right)$. Then $\\left(G;f\\right)$ is isomorphic to\n$\\left( G;g\\right)$ if and only if $\\,\\alpha\\circ\\beta^{-1}\\in\nInn\\left( G;\\cdot\\right)$.\n\\end{theorem}\n\nThe number of pairwise non-isomorphic $n$-ary groups\n$\\langle\\varphi,b\\rangle$-derived from a centerless group\n$(G;\\cdot)$ is smaller or equal to $s=card(\nOut_{n}\\left(G;\\cdot\\right))$. It is equal to $s$ if and only if\n$Out\\left(G;\\cdot\\right)$ is abelian.\n\nFor every $n$ and $k\\neq 2,6$, there exists exactly one $n$-ary\ngroup which is $\\langle\\varphi,b\\rangle$-derived from $S_{k}$ (for\n$k=2$ and $k=6$ we have one or two such $n$-ary groups relatively\nto evenness of $n$).\n\nLet now $(G;\\cdot)$ be an arbitrary group, $c\\in G,$ $\\varphi \\in\nAut\\left(G;\\cdot \\right) $. Let us put\n\\[\n\\arraycolsep=.5mm \\begin{array}{rl}\n f_{c}^{(\\cdot)}(x_1^n)&=x_1\\cdot x_2\\cdot\\ldots\\cdot x_n\\cdot\n c,\\\\[4pt]\ng_{\\varphi }^{(\\cdot)}(x_1^n)& =x_1\\cdot\\varphi\\left(x_{1}\\right)\n\\cdot\\ldots\\cdot\\varphi^{n-1}( x_n) ,\\\\[4pt]\ng_{\\varphi ,c}^{( \\cdot)}(x_1^n)& =x_1\\cdot\\varphi\\left(\nx_{2}\\right)\\cdot\\ldots\\cdot\\varphi^{n-1}(x_n)\\cdot c.\n\\end{array}\n\\]\n\nFor example (for details see \\cite{Gl-Mi'87}), we have the\nfollowing:\n\n\\begin{theorem} Let $l=gcd\\left(n-1,12\\right),$ \\ $\\left(G_{4};\\ast\\right)$\nbe the Klein four-group $($with $0$ as the neutral element$)$, let\n$\\gamma ,\\varepsilon \\in Aut\\left( G_{4};\\ast \\right),$ where\n$\\gamma $ is of order $2$ and $\\varepsilon $ of order $3$, and let\n$c\\in G_{4}\\backslash \\{0\\}$ be the fix point of $\\gamma $. Then\nevery $n$-ary group $\\langle\\varphi,b\\rangle$-derived from\n$(G_{4};\\ast)$ is isomorphic to exactly one $(G_{4};f)$, where $f$\nis one of the following $n$-ary group operations:\n\\begin{enumerate}\n\\item[$(a)$] \\ $f_{0}^{\\left( \\ast \\right) },$ $f^{\\left( \\ast\n\\right) },g_{\\ \\gamma }^{\\left( \\ast \\right) },g_{\\ \\gamma\n,c}^{\\left( \\ast \\right) } $ or $g_{\\ \\varepsilon }^{\\left( \\ast\n\\right) }$ \\ \\ for \\ $l=12$,\n\\item[$(b)$] \\ $f_{0}^{\\left( \\ast \\right) },$ $f_{1}^{\\left(\n\\ast \\right) },g_{\\ \\gamma }^{\\left( \\ast \\right) }$ or $g_{\\\n\\varepsilon }^{\\left( \\ast \\right) }$ \\ \\ for \\ $l=6$,\n\\item[$(c)$] \\ $f_{0}^{\\left( \\ast \\right) },$ $f_{1}^{\\left( \\ast\n\\right) },g_{\\ \\gamma }^{\\left( \\ast \\right) }$ or $g_{\\ \\gamma\n,c}^{\\left( \\ast \\right) }$ \\ \\ for \\ $l=4$,\n\\item[$(d)$] \\ $f_{0}^{\\left( \\ast \\right) }$ or $g_{\\ \\varepsilon\n}^{\\left( \\ast \\right) }$ \\ \\ for \\ $l=3$,\n\\item[$(e)$] \\ $f_{0}^{\\left( \\ast \\right) },$ $f_{1}^{\\left( \\ast\n\\right) }$ or $g_{\\ \\gamma }^{\\left( \\ast \\right) }$ \\ \\ for \\\n$l=2$, \\item[$(f)$] \\ $f_{0}^{\\left( \\ast \\right) }$ \\ \\ for \\\n$l=1.$\n\\end{enumerate}\n\\end{theorem}\n\nComparing our results with results obtained in \\cite{Gl-Mi'87},\n\\cite{Gl-Mi'88} and \\cite{Gl-Mi-S} (cf. also \\cite{post} for\n$k=2,3$) we can tabularize the numbers of $n$-ary groups on\n$k$-element sets with $k<8$ in the following way (we use the\nabbreviations: commut. = commutative, idem. = idempotent):\n\n\\bigskip {\\small\\noindent\n\\begin{tabular}{|l|c|c|}\n\\hline $k=2$, \\ $l=gcd\\,(n-1,2)$ & $l=2$& $l=1\\rule{0mm}{3mm}$\n\\\\ \\hline\n$n\\equiv t({\\rm mod}\\,2)$&$t=1$&$t=0\\rule{0mm}{3mm}$\\\\\n\\hline all &2& 1\\\\ \\hline\n commutative&2 & 1 \\\\ \\hline\n commutative, idempotent & 1 & 0 \\\\ \\hline\n\\end{tabular}\n\n\\bigskip\\noindent\n\\begin{tabular}{|l|c|c|c|c|}\n\\hline $k=3$, \\ $l=gcd\\,(n-1,6)$ &$l=6$ &$l=3$&$l=2$&$l=1\\rule{0mm}{3mm}$ \\\\\n\\hline $n\\equiv t\\,({\\rm mod}\\,6)$&$t=1$\n&$t=4$&$t=3,\\,5$&$t=0,\\,2\\rule{0mm}{3mm}$\\\\ \\hline\n {all} &3&2&2&1\\\\ \\hline\n{commutative} &2&2&1&1 \\\\ \\hline\n commutative, idempotent &1&1&0&0\\\\ \\hline\nnon-commut., medial, idempotent &1&0&1&0 \\\\ \\hline\n\\end{tabular}\n\n\\bigskip\\noindent\n\\begin{tabular}{|l|c|c|c|c|c|c|}\n\\hline $k=4$, \\ $l=gcd\\,(n-1,12)$ &$l=12$&$l=6$&$l=4$&$l=3$&$l=2$&$l=1\\rule{0mm}{3mm}$ \\\\\n\\hline $n\\equiv t\\,({\\rm mod}\\,12)$ & $t=1$\n&$t=7$&$t=5,\\,9$&$t=4,\\,10$&$t=3,11$&$t=t_0\\rule{0mm}{3mm}$\\\\\n\\hline {all} &10&8&9&3&7&2 \\\\ \\hline\n commutative &5&4&5&2&4&2 \\\\ \\hline\n {commutative, idempotent} &2&1&2&0&1&0 \\\\ \\hline\n non-commut., medial, idem. &3&2&1&1&1&0 \\\\ \\hline\n {non-commut., medial}, non-idem., &2&2&3&0&2&0 \\\\ \\hline\n\\end{tabular}\n\n\\smallskip $t_0=0,\\,2,\\,6,\\,8$.\n\n\\bigskip\\noindent\n\\begin{tabular}{|l|c|c|c|c|c|c|}\n\\hline $k=5$, \\ $l=gcd\\,(n-1,20)$ &$l=20$&$l=10$&$l=5$&$l=4$&$l=2$\n&$l=1\\rule{0mm}{3mm}$\n\\\\ \\hline $n\\equiv t\\,({\\rm mod}\\, 20)$&$t=1$ &$t=11$&$t=6,16$&$t=t_1$\n& $t=t_2$ & $t=t_3\\rule{0mm}{3mm}$\\\\ \\hline\n {all}&5&3&2&4&2&1 \\\\ \\hline\n {commutative}&2&2&2&1&1&1 \\\\ \\hline\n {commutative, idempotent} &1&1&1&0&0&0 \\\\ \\hline\n non-commut., idem., medial &3&1&0&3&1&0 \\\\ \\hline\n non-commut., non-idem., medial &0&0&0&0&0&0 \\\\ \\hline\n\\end{tabular}\n\n\\smallskip $t_1=5,9,13,17$, \\ \\\n\n$t_2=3,7,15,19$, \\ \\\n\n$t_3=0,2,4,8,10,12,14,18$.\n\n\\bigskip\\noindent\n\\begin{tabular}{|l|c|c|c|c|}\n\\hline $k=6$, \\ $l=gcd\\,(n-1,6)$\n&$l=6$&$l=3$&$l=2$&$l=1\\rule{0mm}{3mm}$\n\\\\ \\hline\n$n\\equiv t\\,({\\rm mod}\\,6)$&$t=1$\n&$t=4$&$t=3$&$t=0,\\,2\\rule{0mm}{3mm}$\n\\\\ \\hline all&7&3&5&2\\\\ \\hline\ncommutative&4&2&2&1 \\\\\n\\hline {commutative, idempotent}&1&0&0&0\\\\ \\hline {medial,\nidempotent, non-commut.}&1&0&1&0 \\\\ \\hline\n non-commut., medial, non-idem.,&1&0&1&0 \\\\ \\hline\nnon-medial &1&1&1&1 \\\\\n\\hline\n\\end{tabular}\n\n\\bigskip\\noindent\n\\begin{tabular}{|l|c|c|c|c|c|c|c|c|}\\hline\n$k=7$, \\ $l=gcd\\,(n-1,42)$ &$l=42$&$l=21$&$l=14$&$l=7$ &$l=6$ &\n$l=3$&$l=2$ &$l=1\\rule{0mm}{3mm}$ \\\\\n\\hline $n\\equiv t\\,({\\rm mod}\\,42)$&$t=1$&$t=22$&$t=t_4$ &$t=t_5$ & $t=t_6$\n&$t=t_7$&$t=t_8$&$t=t_9\\rule{0mm}{3mm}$ \\\\\n\\hline all&7&4&3&2&6&3&2&1 \\\\\n\\hline {commutative}&2&2&2&2&1&1&1&1\\\\ \\hline\nnon-com., medial, idem.,& 5&2&1&0&5&2&1&0\\\\\n\\hline commutative, idempotent&1&1&1&1&0&0&0&0\\\\\n\\hline\n\\end{tabular}\n\n\\smallskip\n\n$t_4= 15, 29$,\n\n$t_5=8, 36$,\n\n$t_6=7,13,19,25,31,37$,\n\n$t_7=4,10,16,28,34,40$,\n\n$t_8= 3,5,9,11,17,21,23,33,35,39,41$,\n\n$t_9=0,2,6,12,14,18,20,24,26,30,32,38$.\n}\n\n\\section{Term equivalence of $n$-ary groups}\n\nFor any general algebra $\\frak{A}=(A;\\mathbb{F})$ one can define\nthe set $\\mathbb{T}^{(n)}(\\frak{A})$ of all {\\it $n$-ary term\noperations} as the smallest set of $n$-ary operations on $A$\ncontaining $n$-ary projections (or $n$-ary trivial operations, in\nanother terminology) and closed under compositions with\nfundamental operations. Then the set\n$\\mathbb{T}(\\frak{A})=\\bigcup\\limits_{n=1}^{\\infty}\\mathbb{T}(\\frak{A})$\nof all {\\it term operations} is the smallest set of operations on\nthe set $A$ containing the set $\\mathbb{F}$ of fundamental\noperations and all projections $e_i^{(n)}(x_1^n)=x_i$,\n($i=1,2,\\ldots,n$, $n=1,2,\\ldots$), and closed under (direct)\ncompositions. Of course, $\\mathbb{T}(\\frak{A})$ is a {\\it clone}\nin the sense of Ph. Hall (see, e.g., \\cite{Cohn}). It is worth\nmentioning that the term operations were also called {\\it\nalgebraic operations} by several authors (see, e.g.,\n\\cite{Mar'61}). Two algebras $\\frak{A}_1=(A;\\mathbb{F})$ and\n$\\frak{A}_2=(A;\\mathbb{G})$ are called {\\it term equivalent} if\n$\\mathbb{T}(\\frak{A}_1)=\\mathbb{T}(\\frak{A}_2)$ (see, e.g.,\n\\cite{Gb}, p. 32, 56). If elements from some subsets $A_1$ and\n$A_2$ of $A$ are treated as constant elements of algebras\n$\\frak{A}_1=(A;\\mathbb{F}\\cup A_1)$ and\n$\\frak{A}_2=(A;\\mathbb{G}\\cup A_2)$, respectively, and\n$\\mathbb{T}(\\frak{A}_1)=\\mathbb{T}(\\frak{A}_2)$, then $\\frak{A}_1$\nand $\\frak{A}_2$ are {\\it polynomially equivalent}. Two varieties\n$\\mathcal{V}_1$ and $\\mathcal{V}_2$ of algebras (perhaps of\ndifferent types) are term equivalent (polynomially equivalent,\nrespectively) if for every algebra $\\frak{A}_1\\in\\mathcal{V}_1$\nthere exists an algebra $\\frak{A}_2\\in\\mathcal{V}_2$ term\nequivalent (polynomially equivalent, resp.) to $\\frak{A}_1$, and\nvice versa.\n\n\\medskip\n\nUsing Theorem~\\ref{genGH} and taking into account formulas\n(\\ref{k-fi}) and (\\ref{b_2}), we have\n\n\\begin{theorem}\\label{teq}\nLet $\\mathfrak{G}=(G;f,\\bar{}\\;)$ be an $n$-ary group for a fixed\n$n>2$, an element $a$ belong to $G$, and let $k$ be such a natural\nnumber that $(k-1)$ divide $(n-1)$. Then the algebra\n$\\mathfrak{G}_a=(G;f,\\bar{}\\; ,a)$, with the additional constant\n$a\\in G$ is term equivalent to the algebra $(G;g,\\varphi,b_2^k)$,\nwhere $\\varphi$ is an automorphism of a $k$-ary group $(G;g)$,\n$(k-1)$ divides $(n-1)$, and $b_2,\\ldots,b_k$ are constant\nelements in $G$ such that $\\varphi(b_i)=b_i$ for $i=2,\\ldots,k$\nand $g(\\varphi^{n-1}(x),b_2^k)=g(b_2^k,x)$ for all $x\\in G $.\n\\end{theorem}\n\nIndeed, $f$ is determined by $g$, $\\varphi$ and $b_2,\\ldots,b_k$\nby the formula $(iv)$ from Theorem~\\ref{genGH}. The function \\\n$\\bar{}:x\\to\\overline{x}$ can be easily expressed by the operation\n$g$. Namely, if $f=g_{(t)}$, then $\\overline{x}=x^{<-t>}$, where\n$x^{}$ is a $k$-ary power of $x$. According to\nTheorem~\\ref{genGH}, the element $\\overline{x}$ also can be\nexpressed by $g$, $\\varphi$ and $b_2,\\ldots,b_n$ as a solution $z$\nof the equation\n$$\nx=f(\\stackrel{(n-1)}{x},z)=g_{(\\cdot)}(x,\\varphi(x),\\varphi^2(x),\\ldots,\n\\varphi(x)^{n-2},b_2^k,z).\n$$\n\nConversely, the operations of $(G;g,\\varphi,b_2^k)$ are term\nderived from the operations of $(G;f,\\bar{}\\;)$ by (\\ref{k-fi})\nand (\\ref{b_2}). $(G;g)=ret_{a_1^r}(G;f)$, where\n$a_1=\\ldots=a_r=a$, which completes the proof of\nTheorem~\\ref{teq}.\n\n\\medskip\n\nBy Theorem~\\ref{thGH} and formulas (\\ref{autom}) and (\\ref{b}), we\nhave the following corollaries.\n\n\\begin{corollary}\\label{term1}{\\em\nLet $\\mathfrak{G}=(G;f,\\bar{}\\;)$ be an $n$-ary group for a fixed\n$n>2$, and let an element $a$ belong to $G$. Then the algebra\n$\\mathfrak{G}_a=(G;f,\\bar{}\\; ,a)$ is term equivalent to the\n$HG$-algebra $(G;\\cdot,\\varphi,b)$, where $(G;\\cdot)$ is a group,\n$\\varphi\\in Aut(G;\\cdot)$, $b\\in G$, $\\varphi(b)=b$,\n$\\varphi^{n-1}(x)=b\\cdot x\\cdot b^{-1}$ for all $x\\in G$.}\n\\end{corollary}\n\n\\begin{corollary}\\label{term2}\n{\\em For fixed $n>2$, the variety of $n$-ary groups $($as algebras\nof type $(n,1)\\,)$ is polynomially equivalent to the variety of the\ncorresponding $HG$-algebras $($as algebras of type $(2,1,1,0)\\,)$.\n}\n\\end{corollary}\n\nLet now $\\mathfrak{G}=(G;f,\\bar{}\\;)$ be a semiabelian $n$-ary\ngroup $(n>2)$. \\linebreak Then the $HG$-algebra associated with\n$\\mathfrak{G}$ has a commutative group operation denoted by $+$.\nLet $\\mathfrak{H}=(G;+,\\varphi,b)$ be associated with\n$\\mathfrak{G}$ and $\\mathfrak{G}_a=(G;f,\\bar{}\\;,a)$. Then\n$\\mathfrak{H}$ and $\\mathfrak{G}_a$ are term equivalent (see\nTheorems \\ref{thGH} and \\ref{genGH}, Corollary~\\ref{term1}, and\nformulas (\\ref{inv}) -- (\\ref{b_2})). In this case we have\n\\[\n\\arraycolsep=.5mm\n\\begin{array}{rl}\n-y&=f(\\overline{a},\\stackrel{(n-3)}{x},\\overline{x},\\overline{a}\\,),\\\\[4pt]\nx+y&=f(x,\\stackrel{(n-3)}{(-y)},\\overline{(-y)},\\overline{a}\\,),\\\\[4pt]\n\\varphi(x)&=f(\\overline{a},x,\\stackrel{(n-2)}{a}),\\\\[4pt]\n{\\rm and } \\ \\ \\ \\ b&=f(\\stackrel{(n)}{\\overline{a}}).\n\\end{array}\n\\]\n\nWe can describe of all term operations of $\\mathfrak{G}_a$ by using\nthe language of $HG$-algebras.\n\nAt first, we consider unary term operations. Denote by $g_i(x)$\nthe following operation\n\\begin{equation}\\label{g_i}\ng_i(x)=k_{i1}\\varphi^{l_{i1}}(x)+k_{i2}\\varphi^{l_{i2}}(x)+\\ldots\n+k_{it}\\varphi^{l_{it}}(x)\n\\end{equation}\nfor some $t,l_{i1},\\ldots,l_{it}$ non-negative integers and some\n$k_{i1},\\ldots,k_{it}\\in\\mathbb{Z}$. Then it is easily to verify\n\n\\begin{lemma}\nLet $\\,\\mathfrak{H}=(G;+,\\varphi,b)$ be the $HG$-algebra\nassociated with a semiabelian $n$-ary group $\\mathfrak{G}$. Then\nall unary term operations of $\\mathfrak{H}$ $($and of\n$\\;\\mathfrak{G}_a\\,)$ are of the form\n\\begin{equation}\\label{g}\ng(x)=g_i(x)+k_g b\n\\end{equation}\nfor some $g_i$ of the form $(\\ref{g_i})$ and $k_g\\in\\mathbb{Z}$.\n\\end{lemma}\n\nIndeed, it is enough to observe that\n$g\\in\\mathbb{T}^{(1)}(\\mathfrak{H})$, $\\varphi(g(x))$ is again of\nthe form (\\ref{g}), and the set of all such operations is closed\nunder addition.\n\n\\begin{theorem}\nLet $\\,\\mathfrak{H}=(G;+,\\varphi,b)$ be the $HG$-algebra\nassociated with a semiabelian $n$-ary group $\\mathfrak{G}$. Then\nall $m$-ary term operations of $\\mathfrak{H}$ $($and of\n$\\;\\mathfrak{G}_a\\,)$ are of the form\n\\begin{equation}\\label{sum}\nF(x_1,\\ldots,x_m)=\\sum\\limits_{i=1}^{m}g_i(x_i)+k_F b\n\\end{equation}\nfor some $g_i(x)$ of the form $(\\ref{g_i})$ and\n$k_F\\in\\mathbb{Z}$.\n\\end{theorem}\n\nA verification of this theorem can be done by induction with\nrespect to the complexity of term operations and we left it to\nreaders.\n\n\\section{$\\mathcal{Q}$-independent sets in $HG$-algebras}\n\nE. Marczewski observed at the end of the 1950s that there are\ncommon features of linear independence of vectors and\nset-theoretical independence, and proposed a general scheme of\nindependence called here {\\em $\\mathcal{M}$-independence}. Recall\nthat the notion of set-theoretical independence (or, more\ngenerally, independence in Boolean algebras, see, e.g.,\n\\cite{BalF82}, \\cite{BrRu81}, \\cite{Gla71}, \\cite{Mar60}) was\nintroduced at the mid-1930s by G. Fichtenholz and L. Kantorovich\n\\cite{FiKa34} and also, independently, by E. Marczewski himself,\nand this notion is very important in Measure Theory (see, e.g.,\n\\cite{FiKa34}, \\cite{Mar38}, \\cite{Mar48a}, \\cite {Myc68},\n\\linebreak and \\cite{Sik64}).\n\nLet $\\mathfrak{A}=(A;\\mathbb{F})$ be an algebra $\\emptyset \\neq\nX\\subseteq A$. The set $X$ is said to be $\\mathcal{M}$\\textit{-independent}\n(see \\cite{Mar'58}, \\cite{Mar'61}) $(X\\in Ind(\\mathfrak{A};\\mathcal{M})$,\nfor short$)$ if\n\n\\begin{enumerate}\n\\item[(a) ] $(\\forall n\\in \\mathbb{N}$, $n\\leqslant card(X))$\n$(\\forall f,g\\in\\mathbb{T}^{(n)}(\\mathfrak{A}))$\n($\\forall\\underset{\\neq }{\\underbrace{a_{1},\\ldots ,a_{n}}}\\in X$)\n\n\\hspace*{3mm}$\\big[f(a_{1}^{n})=g(a_{1}^{n})\\Longrightarrow f=g \\\n({\\rm in }\\ A)\\big]$.\n\n\\bigskip\n\nThis condition is equivalent to each of the following ones\n\\medskip\n\n\\item[(b)] $(\\forall n\\in \\mathbb{N}$, $n\\leqslant card(X))$\n$(\\forall f,g\\in\\mathbb{T}^{(n)}(\\mathfrak{A}))$ $(\\forall p:\nX\\rightarrow A)$ $(\\forall a_{1},\\ldots ,a_{n}\\in X)$\n$$\n\\big[f(a_{1}^{n})=g(a_{1}^{n})\\Longrightarrow f(p(a_{1}),\\ldots\n,p(a_{n}))=g(p(a_{1}),\\ldots ,p(a_{n}))\\big],\n$$\n\n\\item[(c)] $(\\forall p\\in A^{X}) \\ (\\exists\\bar{p}\\in Hom(\\langle\nX\\rangle_{\\mathfrak{A}},\\mathfrak{A})) \\ \\bar{p}|_{X}=p$, where\n$\\langle X\\rangle_{\\mathfrak{A}}$ is a subalgebra of\n$\\mathfrak{A}$ generated by $X$,\n\n\\item[(d)] $\\langle X\\rangle _{\\mathfrak{A}}$ is a $\\mathbb{K}$-{\\em free\nalgebra $\\mathbb{K}$-freely generated by} $X$, where\n$\\mathbb{K}=\\{\\mathfrak{A}\\}$ (or, by Birkhoff Theorem,\n$\\mathbb{K}=\\mathcal{H}\\mathcal{S}\\mathcal{P}\\{\\mathfrak{A}\\}$, a variety gene\\-rated\nby $\\mathfrak{A}$).\n\\end{enumerate}\n\n\\medskip\n\nBasic properties of $\\mathcal{M}$-independence are the following\nones:\n\\begin{itemize}\n\\item (``\\textit{hereditarity}'') $X\\in Ind\\;(\\mathfrak{A},\\mathcal{M})$, \\\n$Y\\subseteq X\\Longrightarrow Y\\in\nInd\\;(\\mathfrak{A},\\mathcal{M})$,\\vspace{5pt}\n\n\\item $(\\forall X\\subseteq A)$ $(\\forall\\,{\\rm finite} \\ Y\\subseteq\nX)\\;\\big( Y\\in Ind(\\mathfrak{A},\\mathcal{M})\\Longrightarrow X\\in\nInd(\\mathfrak{A},\\mathcal{M})\\big)$\\\\\n(i.e. the family $\\mathbb{J}=Ind(\\mathfrak{A},\\mathcal{M})$ is of finite\ncharacter).\n\\end{itemize}\n\nThe notion of $\\mathcal{M}$-independence is stronger than that of\nindependence with respect to the closure operator of such a kind\n$X\\mapsto\\langle X\\rangle_{\\mathfrak{A}}$ (for $X\\subseteq A$).\n\nThere are some notions of independence which are not special cases\nof $\\mathcal{M}$-independence, such as:\n\n\\noindent\n\\begin{tabular}{rl}\n$\\bullet $ & linear independence in abelian groups, \\\\\n$\\bullet $ & independence with respect to a closure operator\n$\\mathcal{C}$\n(i.e. $\\mathcal{C}$-independence), \\\\\n$\\bullet $ & stochastic independence, \\\\\n$\\bullet $ & ``independence-in-itself'' defined by J.~Schmidt (in 1962), \\\\\n$\\bullet $ & ``weak independence'' used by S.~\\thinspace\n\\'{S}wierczkowski (in 1964).\n\\end{tabular}\n\nFor this reason, a general notion of independence with respect to\na family of mappings was proposed by E.~Marczewski in 1966 (and\nstudied in \\cite{Mar'69} and \\cite{Gla71}). This notion is general\nenough to cover the above-mentioned kinds of independences.\n\nLet $\\emptyset\\neq X\\subseteq A$ and\n$$\n\\mathcal{Q}_X\\subseteq A^X=\\mathcal{M}_X=\\{p\\;|\\;p:X\\rightarrow A\\},\n$$\n$$\n\\mathcal{Q}(A)=\\mathcal{Q}=\\bigcup\\{\\mathcal{Q}_X \\;|\\;X\\subseteq A \\},\n$$\n$$\n\\mathcal{M}(A)=\\mathcal{M}=\\bigcup\\{A^X \\;|\\;X\\subseteq A\\}.\n$$\n\nFor an algebra $\\mathfrak{A} = (A, \\mathbb{F})$, a mapping \\ $p:X\n\\rightarrow A$ belongs to $\\mathcal{H}_X (\\mathfrak{A})$ if and only if\nthere exists a homomorphism \\ $\\bar{p}:\\langle X\\rangle\n_{\\mathfrak{A}}\\rightarrow A$ such that $\\bar{p}|_{X}=p$.\n\nThe set $X$ is said to be $\\mathcal{Q}$-{\\it independent} ($X\\in\nInd(\\mathfrak{A},\\mathcal{Q})$, for short) if\n\n\\begin{center}\n$\\mathcal{Q}_X \\subseteq \\mathcal{H}_X (\\mathfrak{A})$\n\\end{center}\n\n\\noindent or, equivalently,\n$$\n(\\forall p\\in \\mathcal{Q}_{X})\\;(\\forall\\;{\\rm finite }\\; n\\leqslant\ncard(X))\\;(\\forall f,g\\in \\mathbb{T}^{(n)}(\\mathfrak{A}))\\;\n(\\forall a_{1},\\ldots ,a_{n}\\in X)\\;$$\n$$\\big[f(a_{1}^{n})=g(a_{1}^{n})\\Longrightarrow f(p(a_{1}),\\ldots\n,p(a_{n}))=g(p(a_{1}),\\ldots ,p(a_{n}))\\big].$$\n\n\\medskip\n\\noindent{\\bf Examples.} (In the following examples we will use a\nterminology which differs from the original one.)\n\n\\begin{enumerate}\n\\item[1)] $\\mathcal{Q}=\\mathcal{M}=\\bigcup \\{A^{X}\\;|\\;X\\subseteq A\\};$ $\\mathcal{M}$-\\textit{independence}\n(E.~Marczewski: \\textit{general algebraic independence},\n\\cite{Mar'58}),\n\n\\item[2)] $\\mathcal{Q}=\\mathcal{G}=\\bigcup \\{p|_{X}\\;|\\;p\\in A^{A}$ is \\ diminishing,\n$X\\subseteq A\\};\\;\\mathcal{G}$-{\\it independence }(G.~Gr\\\"{a}tzer:\n\\textit{weak independence}, \\cite{Grat67}), where a mapping $p$ is\ncalled \\textit{diminishing} if\n$$\n(\\forall f,g\\in \\mathbb{T}^{(1)}(\\mathfrak{A}))\\;(\\forall a\\in A)\n\\;\\big[f(a)=g(a)\\Longrightarrow f(p(a))=g(p(a))\\big].$$\n\\end{enumerate}\nFor abelian groups, the notion of $\\mathcal{G}$-independence gives\nus the well-known \\textit{linear independence}.\n\nNow we can able to obtain some results on $\\mathcal{Q}$-independence (for\nspecial families $\\mathcal{Q}$ of mappings, e.g., for $\\mathcal{Q}=\\mathcal{M}$ and $\\mathcal{G}$ ) in\n$HG$-algebras of type $\\mathfrak{H}=(G;+,\\varphi,b)$, where $(G;+)$\nis an abelian group.\n\nIn this case, the equality\n\\begin{equation}\\label{F=G}\nF_1(x_1,\\ldots,x_m)=F_2(x_1,\\ldots,x_m)\n\\end{equation}\n(for two term operations of the form (\\ref{sum}) in $\\mathfrak{H}$)\nis equivalent to the equality\n\\begin{equation}\\label{H=0}\nH(x_1,\\ldots,x_m)=0,\n\\end{equation}\nwhere $H\\in\\mathbb{T}^{(m)}(\\mathfrak{H})$, i.e.\n$H(x_1,\\ldots,x_m)=\\sum\\limits_{i=1}^{m}h_i(x_i)+k_{_H} b$, and\n$0$ denotes the zero of the group $(G;+)$.\n\nConsider a subset $X$ of $G$. Let for $a_1,\\ldots,a_m\\in X$ the\nequality\n\\begin{equation}\\label{H_a}\nH(a_1,\\ldots,a_m)=0,\n\\end{equation}\nhold. Taking into account the mapping $p:X\\to\\langle\nX\\rangle_{\\mathfrak{A}}$ defined by $p(a_i)=0$ and $p(x)=x$ for\n$x\\in X\\setminus\\{a_1,\\ldots,a_m\\}$, we get $k_{_H}b=0$. (We\nobserve that such mapping $p$ belongs to families $\\mathcal{M}$ and $\\mathcal{G}$ .)\nTherefore we have\n$$\n\\sum\\limits_{i=1}^{m} h_i(a_i)=0.\n$$\nConsider the mapping $q_j:X\\to \\langle X\\rangle_{\\mathfrak{A}}$\ndefined for fixed $j\\in\\{1,\\ldots,m\\}$ as follows:\n\\[\nq_j(x)=\\left\\{\\begin{array}{ccl} a_j&{\\rm if }&x=a_j ,\\\\[4pt]\n0&{\\rm if }&x\\ne a_j.\\end{array}\\right.\n\\]\nWe obtain $h_j(a_j)=0$ for all $j=1,2,\\ldots,m$. (In the\nconsidered case all $q_j$ belong to $\\mathcal{M}$ and $\\mathcal{G}$ .)\n\nIn particular, we can easily observe, by similar considerations,\nthat the following result holds:\n\n\\begin{theorem}\nLet $X\\subseteq G$ be a subset of the $HG$-algebra\n$\\mathfrak{H}=(G;+,\\varphi,b)$. Then $X\\in Ind(\\mathfrak{H},\\mathcal{G})$ if and only if\nfor any $m\\leqslant card(X)$ for all $a_1,\\ldots,a_m\\in X$ and\nevery term operation\n$H(x_1,\\ldots,x_m)=\\sum\\limits_{i=1}^{m}h_i(x_i)+k_{_H}b$ the\nequality\n\\begin{equation}\n\\sum\\limits_{i=1}^{m}h_i(a_i)+k_{_H}b=0\n\\end{equation}\nis equivalent with\n\\[\n\\left(\\forall i\\in\\{1,\\ldots,m\\}\\right)\\,\\left(h_i(a)=0\\;\\&\\;\nk_{_H}b=0\\right).\n\\]\n\nMoreover, $X$ is $\\mathcal{M}$-independent in this $HG$-algebra\niff for all pairwise different elements $a_1,\\ldots,a_m$ from $X$\nequality $(26)$ implies $h_i(x)=0$ for all $i=1,2,\\ldots,m$ and\n$\\,k_Hb=0$.\n\\end{theorem}\n\n\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section*{Introduction}\n\nThe evaluation of the exponential of a square matrix $\\e^{\\bf A}$ is a classic problem of computational linear algebra.[1] A large number of methods have\nbeen proposed and used for its evaluation. None of these methods have produced a generally applicable method which is sufficiently accurate as well as being reasonably fast.\nThus this problem might be considered unsolved. It is clearly an important and pervasive problem which arises in a wide variety of contexts.[2,3] A method which is capable of producing\na solution to essentially arbitrary precision would thus be of great importance. The present work uses a variant of a method described in Ref. 1, namely the introduction of an\nartificial time-parameter\nwhich produces an initial-value problem. Instead of calling a \\lq canned\\rq \\ solver, the present work uses a method introduced by several of the present authors [4] to solve quantum mechanical\ninitial-value problems. In this method, a finite element technique is used to propagate from an initial condition at $t=0$, which is the unit matrix, to the desired result at $t=1$. The time axis\nis broken up into an arbitrary number of time elements and the solution is propagated from element to element, using a special basis in time introduced here for the first time. \n\nThe next section presents the analysis of the problem and describes the solution algorithm. Then the algorithm is applied to evaluate the exponential of a number of test matrices. Finally, the\nconclusions are presented.\n\n\\section*{Analysis and Solution Algorithm}\n\nThe problem at hand is the evaluation of the exponential of a square (generally complex) matrix $e^{\\bf A}$. The present method introduces an\nartificial time parameter so as to transform the evaluation into the solution of an initial-value problem. For a given $n\\times n$ square matrix $\\mathbf A$, consider the following parametrized function definition:\n\n\\begin{equation} \n \\mathbf{\\Psi}(t) \\equiv \\rme^{\\mathbf{A}t}, \\\\\n\\end{equation}\n\n\\noindent\nwhere $\\bf \\Psi$ is also an $n\\times n$ square matrix and the desired solution is $\\mathbf{\\Psi}(1)=\\rme^{\\mathbf{A}}$ which evolves\nfrom the initial value given by $\\mathbf{\\Psi}(0)=\\mathbf{1}$ ($\\mathbf{1}$ is the diagonal unit matrix). This is a solution of the following linear ordinary differential equation, written for each matrix element,\n\\begin{equation}\n\\dot{\\Psi}_{ij}(t)=\\sum_{k=1}^{n}A_{ik}\\Psi_{kj}(t),\n\\end{equation}\n\n\\noindent\nwhere the over-dot stands for the time-derivative. The time axis extends over the interval $[0, 1]$. Now break the time axis\nup into elements that extend between nodes $t_{\\rm{i}}$ and $t_{\\rm{i+1}}$, and define a local time $\\tau$ that spans $[-1, 1]$.\nThe local time transformation is defined by the relation, \n\\begin{equation}\n\\tau =qt -p,\n\\end{equation}\n\n\\noindent\nwhere, $q = 2\/(t_{\\rm{i+1}} - t_{\\rm{i}}) $ and $p= (t_{\\rm{i+1}} + t_{\\rm{i}})\/(t_{\\rm{i+1}} - t_{\\rm{i}})$.\nThus, for an arbitrary time element $e$, Eq. $(2)$ can be written in terms of local time $\\tau$ as\n\n\\begin{equation}\nq\\dot{\\Psi}^{(e)}_{ij}(\\tau)=\\sum_{k=1}^{n}A^{(e)}_{ik}\\Psi^{(e)}_{kj}(\\tau).\n\\end{equation}\n\nAt this point, we will use the following \\emph{ansatz} for $\\bf \\Psi^{(e)}$ to enforce continuity between two consecutive finite elements\n\n\\begin{equation}\n\\Psi^{(e)}_{ij}(\\tau) = f^{(e)}_{ij}(\\tau)+\\Psi^{(e-1)}_{ij}(+1), \\qquad f^{(e)}_{ij}(-1) = 0\n\\end{equation}\n\n\\noindent\nand expand $f^{(e)}_{ij}(\\tau)$ as\n\n\\begin{equation}\nf^{(e)}_{ij}(\\tau) = \\sum_{\\mu=0}^{m-1} B_{\\mu}^{ij(e)} s_\\mu (\\tau)\n\\end{equation}\n\n\\noindent\nin a basis we define by\n\n\\begin{equation}\ns_{\\mu}(\\tau) = \\int_{-1}^\\tau T_{\\mu}(\\tau) \\, \\rm{d}\\tau\n\\end{equation}\n\n\\noindent\nwhere $T_{\\mu}(\\tau)$ are Chebyshev Polynomials of the first kind.[5] Note that these basis functions enforce the\ninitial condition on the $f$'s given in Eq. (5) since $s_{\\mu}(-1)=0$. The result for the decomposition of $f$ in $m$ basis functions is\n\n\\begin{eqnarray}\n\\Psi^{(e)}_{ij}(\\tau) = \\sum_{\\mu=0}^{m-1} B_{\\mu}^{ij(e)} s_\\mu (\\tau) +\\Psi_{ij}^{(e-1)}(+1) \\\\\n\\dot{\\Psi}^{(e)}_{ij} (\\tau) = \\sum_{\\mu=0}^{m-1} B_{\\mu}^{ij(e)} T_\\mu (\\tau).\n\\end{eqnarray}\n\n\\noindent\nNow, insert (8) and (9) into Eq. (4), and multiply from the left by $w(\\tau) s_{\\mu'}(\\tau)$ and integrate from $-1$ to $+1$\n(note that $w(\\tau) = (1- \\tau^2)^{-1\/2}$ is the weighting function for Chebyshev polynomials). Rearranging terms we get,\n\n\\begin{equation}\n\\fl \\eqalign {q\\sum_{\\mu} [\\int_{-1}^{1} s_{\\mu'}(\\tau) \\omega (\\tau) T_{\\mu}(\\tau) \\, \\rm{d} \\tau] B_{\\mu}^{ij(e)} =\n\\sum_{k\\mu} A^{(e)}_{ik} [\\int_{-1}^{1} s_{\\mu'}(\\tau) \\omega (\\tau) s_{\\mu}(\\tau) \\, \\rm{d} \\tau] B_{\\mu}^{kj(e)} \\cr\n+ \\sum_{k} A^{(e)}_{ik} [\\int_{-1}^{1} s_{\\mu'}(\\tau) \\omega (\\tau) T_{0}(\\tau) \\, \\rm{d} \\tau] \\Psi_{kj}^{(e-1)}(+1)}\n\\end{equation}\n\n\\noindent\nwhere, $T_{0}(\\tau) = 1$. Defining, the integrals in the above equation as\n\n\\begin{eqnarray}\nC_{\\mu' \\mu} &\\equiv \\int_{-1}^{1} s_{\\mu'}(\\tau) \\omega (\\tau) T_{\\mu}(\\tau) \\, \\rm{d} \\tau \\\\\nD_{\\mu' \\mu} &\\equiv \\int_{-1}^{1} s_{\\mu'}(\\tau) \\omega (\\tau) s_{\\mu}(\\tau) \\, \\rm{d} \\tau \\\\\ng_{\\mu'} &\\equiv \\int_{-1}^{1} s_{\\mu'}(\\tau) \\omega (\\tau) T_{0}(\\tau) \\, \\rm{d} \\tau\n\\end{eqnarray}.\n\n\\noindent\nand substituting Eqs. (11-13) into Eq. (10) gives,\n\n\\begin{equation}\n{q\\sum_{\\mu} C_{\\mu' \\mu} B_{\\mu}^{ij(e)} =\n\\sum_{k\\mu} A^{(e)}_{ik} D_{\\mu' \\mu} B_{\\mu}^{kj(e)}\n+ g_{\\mu'} \\sum_{k} A^{(e)}_{ik} \\Psi_{kj}^{(e-1)}(+1)}\n\\end{equation}\n\n\\noindent\nor, rearranging\n\n\\begin{equation}\n\\sum_{\\mu k} (q C_{\\mu' \\mu} \\delta_{ik} - A^{(e)}_{ik} D_{\\mu' \\mu} )B_{\\mu}^{kj(e)}\n= g_{\\mu'} \\sum_{k} A^{(e)}_{ik} \\Psi_{kj}^{(e-1)}(+1)\n\\end{equation}\n\n\\noindent\nwhere $\\delta_{ik}$ is the usual Kronecker delta function. Then rewrite Eq. (15) as\n\n\\begin{equation}\n\\sum_{\\mu k} \\Omega^{(e)}_{(\\mu' i)(\\mu k)}B_{\\mu}^{kj(e)}\n= \\Gamma_{\\mu'}^{ij(e,e-1)}\n\\end{equation}\n\n\\noindent\nwhere\n\n\\begin{eqnarray}\n\\Omega^{(e)}_{(\\mu' i)(\\mu k)} &\\equiv (q C_{\\mu' \\mu} \\delta_{ik} - A^{(e)}_{ik} D_{\\mu' \\mu} ) \\\\\n\\Gamma_{\\mu'}^{ij(e,e-1)} &\\equiv g_{\\mu'} \\sum_{k} A^{(e)}_{ik} \\Phi_{kj}^{(e-1)}(+1).\n\\end{eqnarray}\n\nEquation (16) is a set of simultaneous equations of size $(n \\times m)$, which can be written in matrix form as, \n\n\\begin{equation}\n\\mathbf{\\Omega^{(e)} B}^{j (e)}= \\mathbf{\\Gamma}^{j(e,e-1)}\\qquad j = 1, 2,..., n.\n\\end{equation}\n\n\\noindent\nHere, $\\mathbf{\\Omega^{(e)}}$ is a (complex) matrix and for each $j$, $\\mathbf{\\Gamma^{j(e,e-1)}}$ and $\\mathbf{B^{j(e)}}$ are vectors. \nEq. (19) applies for each time element $e$. The solution is propagated from element to element, from $t=0$ to $t=1$. \nThe above equation can be solved numerically in many ways, but we have chosen the method of LU decomposition.[6]\nThe present method is ideally suited to high-performance computers where the solver of choice would probably\nbe iterative. In the present case, we\napply LU decomposition to \n$\\mathbf{\\Omega^{(e)}}$ and back substituting all of the $\\mathbf{\\Gamma}^{j(e,e-1)}$'s, we will have all the elements for the matrix (which can also be viewed as three dimensional) $\\mathbf{B^{j(e)}}$. This LU decomposition only needs to be done once since $\\mathbf{\\Omega^{(e)}}$ is independent of time. Thus, the propagation\njust involves a matrix vector multiply.\nThen, we employ Eq. $(8)$ to solve for $\\mathbf{\\Psi^{(e)}}(\\tau = 1)$ for the element e, which, in turn, will be used as $\\mathbf{\\Psi^{(e + 1)}}(\\tau = -1)$ for the next element e + 1. Starting off with a unit matrix for $\\mathbf{\\Psi^{(1)}}(t = 0)$, we continue this process till we calculate $ \\mathbf{\\Psi(t = 1)}$ at the last node, which is the exponential of the given matrix $\\mathbf{A}$.\n\n\\section*{Results}\n\nThe calculations presented below were done on a Macintosh Intel laptop using Gnu C++ which has machine accuracy limit of $2.22045\\times 10^{-16} $.\nAs an illustration, let's borrow a 'pathological' matrix from [1], which we have modified slightly to make it even worse. Consider a matrix $\\mathbf{M1}$ given by,\n\n\n\\begin{eqnarray}\n\\eqalign{\\mathbf{M1} &= \\left[\\begin{array}{cc}-73 & 36 \\\\-96 & 47\\end{array}\\right] \\\\\n&=\\left[\\begin{array}{cc}1 & 3 \\\\2 & 4\\end{array}\\right] \\left[\\begin{array}{cc}-1 & 0 \\\\0 & -25\\end{array}\\right] {\\left[\\begin{array}{cc}1 & 3 \\\\2 & 4\\end{array}\\right]}^{-1}.}\n\\end{eqnarray}\n\n\\noindent\nThe exponent of $\\mathbf{M1}$ can be easily calculated as,\n\\begin{eqnarray*}\ne^\\mathbf{M1} &= \\left[\\begin{array}{cc}1 & 3 \\\\2 & 4\\end{array}\\right] \\left[\\begin{array}{cc}e^{-1} & 0 \\\\0 & e^{-25}\\end{array}\\right] \\left[\\begin{array}{cc}-2 & 3\/2 \\\\1 & -1\/2\\end{array}\\right] \\\\\n&= \\left[\\begin{array}{cc}{-2e^{-1}+3e^{-25}} & {(3\/2)(e^{-1}-e^{-25})} \\\\{-4e^{-1}+4e^{-25}} & {3e^{-1}-2e^{-25}}\\end{array}\\right].\n\\end{eqnarray*}\n\n\\noindent\nThe above matrix, exact to $16$ decimal places, is given by\n\n\\begin{equation}\ne^\\mathbf{M1}\\cong \\left[\\begin{array}{cc}-0.7357588823012208 & 0.5518191617363316 \\\\-1.4715177646302175 & 1.1036383234865511\\end{array}\\right].\n\\end{equation}\n\n\\noindent\nThe result of our program is displayed below and we run it by using just $8$ time steps and $8$ basis functions. The result is accurate to $13$ decimal places already.\n\n\\begin{equation}\ne^\\mathbf{M1}\\cong \\left[\\begin{array}{cc}-0.7357588823012(181) & 0.5518191617363(358) \\\\-1.4715177646302(120) & 1.1036383234865(592)\\end{array}\\right].\n\\end{equation}\n\nAs an example of a non - diagonalizable matrix, consider the following matrix $\\mathbf{M2}$, with complex eigenvalues\n\n\\begin{equation}\n\\mathbf{M2} = \\left[\\begin{array}{cc}0 & -1 \\\\1 & 0\\end{array}\\right]\n\\end{equation}\n\n\\noindent\nIt can be shown that,\n\n\\begin{equation}\ne^\\mathbf{M2} = \\left[\\begin{array}{cc}cos(1) & -sin(1) \\\\sin(1) & cos(1)\\end{array}\\right]\n\\end{equation}\n\n\\noindent\nWe are able to achieve $14$ decimal digit accuracy with $8$ time steps and $8$ basis functions.\n\n\\begin{equation}\ne^\\mathbf{M2} \\cong \\left[\\begin{array}{cc} 0.54030230586814 & -0.84147098480790 \\\\ 0.84147098480790 & 0.54030230586814\\end{array}\\right]\n\\end{equation}\n\n\\noindent\n Table 1 shows the minimum number of basis functions, for a given number of time steps, which were required to achieve a precision of $\\pm 1\\times 10^{-14}$ on matrices whose exponential is known exactly. The matrices chosen are: the simplest possible matrix - a $2 \\times 2$ real unit matrix, for which the result is the constant $e$ on the diagonals, and the matrices $\\mathbf {M1}$ and $\\mathbf {M2}$.\n\nLet's check our program on matrices, which we picked randomly and for which we had no $\\it apriori$ knowledge as to the result of their exponentiation. We fixed 8 time steps and\/or 8 basis functions, and varied the other corresponding parameter from 5 to 40 and checked how the results of the program varied in accuracy. For the sake of saving space, we only displayed the result of the last element--the other elements of the matrix exponential behaved similarly. \nThe matrices chosen are a $5 \\times 5$ real matrix $\\mathbf{M3}$,\n\n\\begin{equation}\n\\mathbf{M3} = \\left[\\begin{array}{ccccc}-0.1 & -0.2 & -0.3 & -0.4 & -0.5 \\\\-0.6 & -0.7 & -0.8 & -0.9 & -1 \\\\0.1 & 0.2 & 0.3 & 0.4 & 0.5 \\\\0.6 & 0.7 & 0.8 & 0.9 & 1 \\\\1 & 2 & 3 & 4 & 0\\end{array}\\right]\n\\end{equation}\n\n\\noindent\nand a $3 \\times 3$ complex matrix $\\mathbf{M4}$\n\n\\begin{equation}\n\\mathbf{M4} = \\left[\\begin{array}{ccc}1+i & 1-i & i \\\\1 & 2i & 0 \\\\1+2i & -1+i & -1-i\\end{array}\\right].\n\\end{equation}\n\n\nFrom Table 2, one can see that the numbers up to $12$ decimal digits have saturated after $5$ time steps and\/or basis functions. Similarly, Table 3 shows $13$ digits of accuracy as we switch the two parameters from $5$ to $40$, except for the case of $5$ basis functions, which only shows $8$ accurate significant digits. This shows that for complex matrices, there is inherently more work for the program to handle because of the imaginary part of the matrix elements and there is apparently more sensitivity to the number of basis functions used than to the number of time steps.\n\n\n\\Table{\\label{tone}Minimum number of basis functions and time steps required for a precision of $\\pm 1\\times 10^{-14}$ for a $2 \\times 2$ unit matrix, $\\mathbf{M1}$ and $\\mathbf{M2}$.}\n\\br\n\\centre{2}{$2\\times 2$ unit matrix}&\\centre{2}{$\\mathbf{M1}$}&\\centre{2}{$\\mathbf{M2}$}\\\\\n\n\\crule{2}&\\crule{2}&\\crule{2}\\\\\nTime steps & Basis functions& Time steps & Basis functions& Time steps & Basis functions\\\\\n\\mr\n\\01&\t11&\t\\0\\005&\t\t-&\t\t\\01&\t\t11\\\\\n\\02&\t\\09&\t\\0\\008&\t\t7&\t\\02&\t\t\\09\\\\\n\\04&\t\\08&\t\\016&\t\t6&\t\\04&\t\t\\08\\\\\n\\08&\t\\07&\t\\050&\t\t5&\t\\08&\t\t\\07\\\\\n16&\t\\06&\t256&\t\t\t4&\t15&\t\t\\06\\\\\n58&\t\\05&\t\\0\\0-&\t\t-&\t\t40&\t\t\\05\\\\\n\\br\n\\end{tabular}\n\\end{indented}\n\\end{table}\n\n\\Table{\\label{ttwo}Results of matrix $e^{M3}_{5 5}$ for typical runs of 8 time steps and 8 basis functions.}\n\\br\nResult& Time steps & Basis functions\\\\\n\\mr\n\\underline{3.210309305973}118 &\t\t\\05&\t\t\\08\\\\\n\\underline{3.210309305973}288 &\t\t40&\t\t\\08\\\\\n\\underline{3.210309315373}377&\t\t\\08&\t\t\\05\\\\\n\\underline{3.210309305973}281&\t\t\\08&\t\t40\\\\\n\\br\n\\end{tabular}\n\\end{indented}\n\\end{table}\n\n\\Table{\\label{tthree}Results of matrix $e^{M4}_{3 3}$ for typical runs of 8 time steps and 8 basis functions.}\n\\br\nResult& Time steps & Basis functions\\\\\n\\mr\n\\underline{-0.5119771222980}63 - i \\underline{0.0897728113135}12 &\t\t\\05&\t\t\\08\\\\\n\\underline{-0.5119771222980}81 - i \\underline{0.0897728113135}26 &\t\t40&\t\t\\08\\\\\n\\underline{-0.51197712}1264660 - i \\underline{0.08977281}0979965&\t\t\\08&\t\t\\05\\\\\n\\underline{-0.5119771222980}82 - i \\underline{0.0897728113135}26&\t\t\\08&\t\t40\\\\\n\\br\n\\end{tabular}\n\\end{indented}\n\\end{table}\n\n\\section*{Conclusion}\n\nWe have presented a robust, easily used, and accurate algorithm for the evaluation of the exponential of a matrix. We did this by introducing an\nartificial time parameter and evaluating the matrix exponential as the solution of an initial-value problem in this artificial time. We solved the initial-value problem\nby using finite elements in time with a new time basis which we defined here so as to enforce the initial conditions on the solution at the beginning of each time finite element. This resulted in set of simultaneous equations for the expansion coefficients. \nThe actual algorithm employed here was an LU decomposition which was very fast and efficient. The relative efficiency of the method should be most\napparent when implemented on high-performance computers since the algorithm is highly parallel.\nThe method was applied to several matrices as a proof of the validity of the algorithm. \nThe results of our calculations show that we only need about $8$ basis functions and $8$ time steps for the matrices considered for accuracies as great as $13$ significant digits. We trust that this method of numerically calculating the exponential of a matrix will be recognized to be a \\emph{nondubious} one! \\\\\n\n\\section*{Acknowlegements}\nThis work was supported by the NSF CREST Center for Astrophysical Science and Technology under Cooperative Agreement \nHRD-0630370.\n\n\\section*{References}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section*{Acknowledgment}\n\n\n\\ifCLASSOPTIONcaptionsoff\n \\newpage\n\\fi\n\n\n\n\n\n\n\n\\bibliographystyle{IEEEtran}\n\n\\section{Introduction} \\label{sec:intro}\n\n\\IEEEPARstart{D} {ynamic} systems which exhibit both continuous state evolution and discrete state transitions can typically be modeled as {\\em hybrid automata (HA)} (\\cite{henzinger:96, lynch:03}).\nComputing the reach set of a hybrid automaton from a given set of initial states is a problem of fundamental importance as it is related to safety verification and automated controller synthesis.\nEven though many systems can be so modeled, it is in general undecidable to compute the exact reach set \\cite{henzinger:95} except for classes of hybrid automata whose continuous dynamics are fairly simple, such as timed automata (TA) \\cite{alur:94} and initialized rectangular hybrid automata (IRHA) \\cite{henzinger:95}.\nNeither of these automata allow the standard linear systems dynamics which is widely used for control systems. \nTo broaden the class of systems that can be addressed, research in hybrid system verification in the recent years has focused on algorithms computing over-approximations of the reach set for various classes of hybrid automata (\\cite{henzinger:97, frehse:08, chutinan:03, girard:05, asarin:00, kurzh:00, clarke:03, tiwari:02}).\nHowever, even with this relaxation from exact reach set to over-approximations, it is still a challenging problem to compute an over-approximation of the reach set of hybrid automata with linear dynamics with arbitrarily small approximation error and a termination guarantee for the computation.\n\n\n\\subsection{Related Work}\nFor the computation of reach set of hybrid automata with linear dynamics, several tools and approaches have been proposed in the literature.\nAs an example, HyTech \\cite{henzinger:97} computes the reach set of hybrid automata whose continuous dynamics are more general than those of IRHA by translating the original model into an IRHA if the model is {\\em clock translatable}.\nOtherwise, an over-approximate reach set is computed through an approach, called {\\em linear phase-portrait approximation}, which approximates the original hybrid automaton by relaxing the continuous dynamics of the original automaton.\nPHAVer \\cite{frehse:08} can handle a class of systems called linear hybrid automata that have affine dynamics. \nIt computes a conservative over-approximation of the reach set of such hybrid automata through on-the-fly over-approximation of the phase portrait, which is a variation of the phase-portrait approximation in \\cite{henzinger:97}.\nRecently, another tool, SpaceEx, has been developed based on the algorithm called LeGuernic-Girard (LGG) algorithm \\cite{guernic:10} which allows the handling of hybrid automata with linear differential equations with a larger number of continuous variables compared to other approaches.\n\nIn \\cite{chutinan:03}, a class of hybrid automata, called {\\em polyhedral-invariant hybrid automata (PIHA)}, is defined and an algorithm is proposed to construct a finite state transition system, which is a conservative approximation of the original PIHA. \nDetermining a polyhedral approximation of each sampled segment of the continuous state evolution between switching planes is the underlying fundamental technique in the algorithm that is used.\nAnother approach proposed in \\cite{asarin:00} is also based on the idea of sampling and polyhedral over-approximation of continuous state evolution of a continuous linear dynamics. \nOn the other hand, in \\cite{kurzh:00} and \\cite{girard:05}, ellipsoids and zonotopes are used respectively for approximating continuous state evolution.\n\nHowever, while these algorithms and tools compute some over-approximation of the reach set of hybrid systems with linear dynamics, computation of an over-approximate reach set which is arbitrarily close to the exact reach set of such hybrid systems with guaranteed termination remains an open issue for further research. \n\n\n\n\\subsection{Challenges and Contributions}\nIn general, the key challenges in reach set computation of HA are \n\\begin{inparaenum}[(i)] \n\t\\item to over-approximate the exact continuous flow with arbitrarily small approximation error,\n\t\\item to determine when and where a discrete transition occurs, and\n\t\\item to develop a reach set computation algorithm with termination guarantee. \n\\end{inparaenum}\nIn this paper, we address the problem of computing an over-approximation of the reach set of a special class of hybrid automata, called {\\em Deterministic and Transversal Linear Hybrid Automaton (DTLHA)}, starting from an initial state over a finite time interval.\nWe call such an over-approximate reach set as a {\\em bounded $\\epsilon$-reach set}.\nOur approach can be related to other approaches that use sampling and polyhedral over-approximation as in \\cite{chutinan:03, asarin:00}.\nThe main contributions of our approach are as follows: \n\\begin{inparaenum}[(i)]\n\t\\item We show that an over-approximation of the reach set of a DTLHA can be computed arbitrarily closely to the exact reach set.\n\t\\item We also show that such computation is guaranteed to terminate under a deterministic and transversal restriction on the discrete dynamics. \n\t\\item Furthermore, to facilitate practical computation, we extend these theoretical results to consider the numerical calculation errors caused by finite precision calculation capabilities. \n\\end{inparaenum}\nBased on the theoretical results, we propose an algorithm to compute a bounded $\\epsilon$-reach set of a DTLHA, as well as a software architecture that is designed to improve the flexibility and the efficiency in computing such an over-approximation.\n\nThe paper is organized as follows.\nIn Section \\ref{sec:pre}, we introduce definitions and notations that are used throughout this paper.\nIn Section \\ref{sec:theory}, we show that, for arbitrarily small $\\epsilon > 0$, a bounded $\\epsilon$-reach set of a DTLHA starting from an initial state can be computed under the assumption of infinite precision numerical calculation capabilities. \nIn Section \\ref{sec:cond}, we first derive a set of conditions for computation of a bounded $\\epsilon$-reach set, and then extend these conditions to consider errors caused by finite precision numerical calculation capabilities.\nIn Section \\ref{sec:design}, we propose an algorithm for a bounded $\\epsilon$-reach set computation, as well as an architecture for software implementation of the proposed algorithm.\nFinally, we illustrate an example of bounded $\\epsilon$-reach set computation in Section \\ref{sec:imp}, followed by concluding remarks in Section \\ref{sec:con}.\n\n\n\n\n\n\\section{Preliminaries} \\label{sec:pre}\n\n\nLet $\\mathcal{X} \\subset \\mathbb{R}^n$ be a continuous state space over which a hybrid automaton is defined.\nFor a polyhedron $\\C \\subseteq \\mathbb{R}^n$, we denote its interior by $\\C^{\\circ}$, and its boundary by $\\partial \\C$.\nWe will also use the notation $\\B_r(x)$ to denote a closed ball of radius $r$ with center $x$, i.e., $\\B_r(x) := \\lbrace y \\in \\mathbb{R}^n : \\Vert y - x \\Vert \\leq r \\}$. \nThe specific norm that we use in the definition of $\\B_r(x)$ as well as the sequel is the $\\ell_{\\infty}$-norm. \nSince we are using the $\\ell_{\\infty}$-norm, $\\B_r(x)$ is a hypercubic neighborhood of $x$.\nOne of the advantages of using the $\\ell_{\\infty}$-norm is that the induced hypercubic neighborhood is easily computed. \nMore generally, a hypercube is a special case of a polyhedron, which is important since it is easy to propagate the image of this set under linear dynamics.\nThis is useful in Section \\ref{sec:theory} when we describe our approach for bounded $\\epsilon$-reach set computation.\n\n\nWe now describe the class of hybrid automata considered.\nWe assume that $\\mathcal{X}$ is a closed and bounded subset of Euclidean space, and is partitioned into a collection of polyhedral regions $\\mathcal{C} := \\{\\mathcal{C}_1, \\cdots, \\mathcal{C}_m \\}$ such that $\\C^{\\circ}_i \\ne \\emptyset$ for each $i \\in \\{1, \\cdots, m\\}$ and \n\n\n\\begin{equation}\\label{eq:pre:tess}\n\t\\bigcup_{i=1}^{m} \\mathcal{C}_{i} = \\mathcal{X}, \\quad \\mathcal{C}_{i}^{\\circ} \\cap \\mathcal{C}_{j}^{\\circ} = \\emptyset \\quad for~i \\ne j,\n\\end{equation}\nwhere $m$ is the size of the partition, and each $\\C_i$ is a polyhedron, called \\emph{cell}. \nTwo cells $\\C_i$ and $\\C_j$ are said to be \\emph{adjacent} if the affine dimension of $\\partial \\mathcal{C}_i \\cap \\partial \\mathcal{C}_j$ is $(n-1)$, or, equivalently, cells $\\C_i$ and $\\C_j$ intersect in an $(n-1)$-dimensional facet. \nTwo cells $\\C_i$ and $\\C_j$ are said to be \\emph{connected} if there exists a sequence of adjacent cells between $\\C_i$ and $\\C_j$.\n\n\n\\begin{defn} \\label{def:lha}\nAn $n$-dimensional \\emph{Linear Hybrid Automaton (LHA)},\\footnote{In the hybrid system literature \\cite{henzinger:97, alur:93} the word ``linear automaton'' has been used to denote a system where the differential equations and inequalities involved have constant right hand sides. This does not conform to the standard notion of linearity where the right hand side is allowed to be a function of state. In particular, it does not include the standard class of linear time-invariant systems that is of central interest in control systems design and analysis. We use the term ``linear'' in this latter more mathematically standard way that therefore encompasses a larger class of systems, and, more importantly, encompasses classes of switched linear systems that are of much interest.} \nis a tuple $(\\mathbb{L}, Inv, A, u, \\xrightarrow{G})$ satisfying the following properties: \n\\begin{enumerate}[(a)]\n\t\\item $\\mathbb{L}$ is a finite set of \\emph{locations} or \\emph{discrete states}. The state space is $\\mathbb{L} \\times \\mathbb{R}^n$, and an element $(l, x) \\in \\mathbb{L} \\times \\mathbb{R}^n$ is called a \\emph{state}.\n\t%\n\t\\item[(b)] $Inv: \\mathbb{L} \\rightarrow 2^{\\C}$ is a function that maps each location to a set of cells, called an \\emph{invariant set} of a location, such that \n\t \\begin{inparaenum}[(i)]\n\t\t\\item for each $l \\in \\mathbb{L}$, all the cells in $Inv(l)$ are connected, \n\t\t\\item for any two locations $l, l' \\in \\mathbb{L}$, $Inv(l)^{\\circ} \\cap Inv(l')^{\\circ} = \\emptyset$, and \n\t\t\\item $\\bigcup_{l \\in \\mathbb{L}} Inv(l) = \\X$.\n\t\\end{inparaenum}\n\t%\n\t\\item[(c)] $A: \\mathbb{L} \\rightarrow \\mathbb{R}^{n \\times n}$ is a function that maps each location to an $n \\times n$ real-valued matrix, and \n\t%\n\t\\item[(d)] $u: \\mathbb{L} \\rightarrow \\mathbb{R}^n$ is a function that maps each location to an $n$-dimensional real-valued vector.\n\t%\n\t\\item[(e)] $\\xrightarrow{G}: (\\mathbb{R}^n, \\mathbb{L}) \\times (\\mathbb{R}^n, \\mathbb{L})$ is a binary relation which defines a \\emph{discrete transition} from one state $(x_1, l_1)$ to another state $(x_2, l_2)$ such that $(x_1, l_1) \\xrightarrow{G} (x_2, l_2)$ when $G$ is satisfied and $x_2$ is set to $x_1$ after a discrete transition.\n\\end{enumerate}\n\\end{defn}\nIn the sequel, for each $l_i \\in \\mathbb{L}$, we use $A_i$, $u_i$, $Inv_i$ to denote $A(l_i)$, $u(l_i)$, and $Inv(l_i)$, respectively.\n\nAn example LHA which satisfies Definition \\ref{def:lha} is shown in Section \\ref{sec:imp:example}.\nNext, we define the behavior of LHA.\n\\begin{defn} \\label{def:traj}\nFor a location $l_i \\in \\mathbb{L}$, a \\emph{trajectory} of duration $t \\in \\mathbb{R}^{+}$ for an $n$-dimensional LHA $\\A$ is a continuous map $\\eta$ from $[0,t]$ to $\\mathbb{R}^n$, such that\n\\begin{enumerate}[(a)]\n \\item $\\eta(\\tau)$ satisfies the differential equation\n \\begin{equation}\\label{eq:pre:lti}\n \\dot{\\eta}(\\tau) = A_i \\eta(\\tau) + u_i ,\n \\end{equation}\n \\item $\\eta(\\tau) \\in Inv_i$ for every $\\tau \\in [0,t]$.\n\\end{enumerate}\n\\end{defn}\n\n\n\\begin{defn} \\label{def:exec\nAn \\emph{execution} $\\alpha$ of an LHA $\\A$ from a starting state $(l_0, x_0) \\in \\mathbb{L} \\times \\mathbb{R}^n$ is defined to be the concatenation of a finite or infinite sequence of trajectories $\\alpha = \\eta_0 \\eta_1 \\eta_2 \\ldots$, such that\n\\begin{enumerate}[(a)]\n \\item $\\eta_0(0) = x_0$,\n \\item $\\eta_{k}(0) = \\eta_{k-1}(\\eta_{k-1}.dur)$ for $k \\ge 1$, \n\\end{enumerate}\nwhere $\\eta_k$ represents a trajectory defined at some location $l \\in \\mathbb{L}$ and $\\eta_k.dur$ denotes the duration of $\\eta_k$.\nWe also define $\\alpha.dur := \\sum_k \\eta_k.dur$ where $\\alpha.dur$ denotes the duration of an execution $\\alpha$.\n\\end{defn}\n\n\nWe can represent an execution $\\alpha$ of an LHA $\\A$ from an initial condition $(l_0, x_0) \\in \\mathbb{L} \\times \\mathbb{R}^n$ for time $[0,t]$ as a continuous map $x:[0,t] \\rightarrow \\mathbb{R}^n$ such that\n\\begin{inparaenum}[(a)]\n \\item $t = \\alpha.dur$,\n \\item $x(0) = x_0 \\in Inv_0$,\n \\item $x(\\tau_k) = \\eta_{k}(0)$, and\n \\item $x(\\tau) = \\eta_{k-1}(\\tau - \\tau_{k-1})$ for $\\tau \\in [\\tau_{k-1}, \\tau_k]$,\n\\end{inparaenum}\nwhere $\\tau_0 = 0$, and $\\tau_k = \\sum_{i=0}^{k-1} \\eta_i.dur$ for $k \\ge 1$.\nNote that $\\tau_k$ for $k \\ge 1$ represents the time at the $k$-th discrete transition between locations and the continuous state is not reset during discrete transitions.\n\n\\begin{defn} \\label{def:trans}\nFor an execution $x(t)$ of an LHA, a discrete transition $(x_i, l_i) \\xrightarrow{G} (x_j, l_j)$ occurs if $x_i = x(\\tau')$ for some time $\\tau'$, \n$x(\\tau') \\in Inv_i \\cap Inv_j$ and $x(\\tau') = \\lim_{\\tau \\nearrow \\tau'} x(\\tau)$ where $x(\\tau) \\in (Inv_i)^{\\circ}$ for $\\tau \\in (\\tau'-\\delta,\\tau')$ for some $\\delta > 0$.\n\n\\end{defn}\n\\begin{defn} \\label{def:transversal} \nA discrete transition is called \\emph{deterministic} if there is only one location $l_j \\in \\mathbb{L}$ to which a discrete transition state $x(\\tau_k)$ can make a discrete transition from $l_i$. \nWe call a discrete transition a \\emph{transversal discrete transition} if there exists $\\epsilon > 0$ such that\n\\begin{equation}\\label{eq:pre:trans}\n \\langle \\dot{x}_{i}(\\tau_k), \\vec{n}_i \\rangle \\ge \\epsilon ~~\\land~~ \\langle \\dot{x}_{j}(\\tau_k), \\vec{n}_i \\rangle \\ge \\epsilon ,\n\\end{equation}\nwhere $\\langle x, y \\rangle$ denotes the inner product between $x$ and $y$, $\\vec{n}_i$ is an outward normal vector of $\\partial Inv_i$ at $x(\\tau_k)$, and $\\dot{x}_{i}(\\tau_k) = A_i x(\\tau_k) + u_i$, and $\\dot{x}_{j}(\\tau_k) = A_j x(\\tau_k) + u_j$ are the vector fields at $x(\\tau_k)$ evaluated with respect to the continuous dynamics of location $l_i$ and $l_j$, respectively. \n\\end{defn}\nFig. \\ref{fig:transition} illustrates a case where $x(\\tau_k)$ satisfies such a deterministic and transversal discrete transition condition.\nNote that if $x(\\tau_k)$ satisfies a deterministic and transversal discrete transition condition, then $x(\\tau_k)$ must make a discrete transition from a location $l_i$ to the other location $l_j$, and $l_j$ has to be unique. \nFurthermore, the \\emph{Zeno behavior}, an infinite number of discrete transitions within a finite amount of time, does not occur if a discrete transition is a transversal discrete transition.\n\\begin{figure}\n\\begin{center}\n \\includegraphics[width=7cm]{transition.png}\n\\caption{A deterministic and transversal discrete transition from a location $l_i$ to a location $l_j$ occurring at $x(\\tau_k) \\in \\partial Inv(l_i) \\cap \\partial Inv(l_j)$.}\n\\label{fig:transition}\n\\end{center}\n\\end{figure}\n\n\nWe now define a special class of LHA whose every discrete transition satisfies the deterministic and transversality conditions defined in Definition \\ref{def:transversal} as follows:\n\n\\begin{defn} \\label{pre:def:dtlha}\nGiven an LHA $\\mathcal{A}$, a starting state $(l_0, x_0) \\in \\mathbb{L} \\times \\X$, a time bound $T$, and a jump bound $N$, we call an LHA $\\mathcal{A}$ as a \\emph{Deterministic and Transversal Linear Hybrid Automaton (DTLHA)} if all discrete transitions in the execution starting from $x_0$ up to time $t_f := \\min \\{T, \\tau_N \\}$ are deterministic and transversal, where $\\tau_N$ is the time at the N-th discrete transition.\n\\end{defn}\n\n\nNext, we define the bounded reach set of a DTLHA and its over-approximation as follows:\n\n\\begin{defn}\nA continuous state in $\\X$ is \\emph{reachable} if there exists some time $t$ at which it is reached by some execution $x$.\n\\end{defn}\n\\begin{defn} \\label{def:pre:reach}\nGiven a state $x_0$ and a time $t$, the \\emph{bounded reach set} up to time $t$, denoted as $\\R_t(x_0)$, of a DTLHA $\\A$ is defined to be the set of continuous states that are reachable for some time $\\tau \\in [0, t]$ by some execution $x$ starting from $x_0 \\in Inv_0$.\n\\end{defn}\n\\begin{defn} \\label{def:pre:ereach}\nGiven $\\epsilon > 0$, a set of continuous states $S$ is called a \\emph{bounded $\\epsilon$-reach set} of a DTLHA $\\A$ over a time interval $[0,t]$ from an initial state $x_0$ if $\\R_t(x_0) \\subseteq S$ and\n\\begin{equation}\\label{eq:pre:ereach}\n\td_H(\\R_t(x_0), S) \\le \\epsilon,\n\\end{equation}\nwhere $d_H(\\P, \\Q)$ denotes the Hausdorff distance \nbetween two sets $\\P$ and $\\Q$\nthat is defined as $d_H(\\P, \\Q) := \\max \\{ \\sup_{p \\in \\P} \\inf_{q \\in \\Q} d(p, q), \\sup_{q \\in \\Q} \\inf_{p \\in \\P} d(p, q) \\}$ where $d(p,q) := \\Vert p - q \\Vert$.\n\\end{defn}\n\n\nIn the sequel, we use $\\D_t(\\P)$ to denote the set of states reached at time $t$ from a set $\\P$ at time $0$.\nSimilarly, for the set of reached states over a time interval $[t_1, t_2)$ from $\\P$, we use $\\D_{[t_1, t_2)}(\\P)$.\nWe also use $\\D_t(\\P, \\gamma)$ to denote an over-approximation of $\\D_t(\\P)$ with an approximation parameter $\\gamma > 0$, calling it a $\\gamma$-approximation of $\\D_t(\\P)$ if it satisfies \n\\begin{inparaenum}[(i)]\n\\item $\\D_t(\\P) \\subset \\D_t(\\P, \\gamma)$ and\n\\item $d_H(\\D_t(\\P),$ $\\D_t(\\P, \\gamma)) \\le \\gamma$.\n\\end{inparaenum}\nNote that $\\D_0(\\P, \\gamma)$ is simply a $\\gamma$-approximation of the set $\\P$.\n\n\n\n\\section{Bounded $\\epsilon$-Reachability of a DTLHA} \\label{sec:theory}\n\nIn this section, we consider the problem of a bounded $\\epsilon$-reach set computation of a DTLHA starting from an initial state over a finite time interval.\nMore precisely, we show that, for any given $\\epsilon > 0$, a DTLHA $\\A$, an initial condition $(l_0, x_0) \\in \\mathbb{L} \\times \\X$, a time upper bound $T \\in \\mathbb{R}^+$, and a discrete transition upper bound $N \\in \\mathbb{N}$, it is possible to compute a bounded $\\epsilon$-reach set of $\\A$ over a finite time interval $[0, t_f]$ under the assumptions that the following computations can be performed exactly:\n\\begin{inparaenum}[(i)]\n\t\\item $x(t) = e^{At} x_0 + \\int_0^t e^{A(t-s)} u ds$,\n\t\\item the convex hull of a set of finite points in $\\mathbb{R}^n$, and\n\t\\item the intersection between a polyhedron and a hyperplane,\n\\end{inparaenum}\nwhere $t_f$ is as defined in Definition \\ref{pre:def:dtlha}, $A \\in \\mathbb{R}^{n \\times n}$, and $u \\in \\mathbb{R}^n$.\n\n\n\n\\subsection{Bounded $\\epsilon$-Reach Set of a DTLHA at Initial Location} \\label{sec:theory:l0}\n\nWe first show how a trajectory of a DTLHA can be over-approximated through sampling and polyhedral over-approximation of each sampled state.\nThe basic approach for such over-approximation is shown in Fig. \\ref{fig:traj}. \nIt is necessary that, for a given size of over-approximation of each sampled state, a sampling period $h$ has to ensure that a trajectory $x(t)$ is contained in the computed set of polyhedra.\nFor a given value of $\\epsilon > 0$, we now show how we can determine a sampling period $h$ which guarantees that.\n\\begin{equation}\\label{eq:hcond}\n \\max_{\\tau \\in [0, h]} \\Vert x(t+\\tau) - x(t) \\Vert < \\epsilon \\qquad \\forall x(t) \\in \\mathcal{X}.\n\\end{equation}\n\nTo determine a suitable value of $h$ which results in (\\ref{eq:hcond}), we suppose $x(s) \\in (Inv_i)^{\\circ}$ for all $s \\in [t, t+h]$ for some location $l_i \\in \\mathbb{L}$.\nThen for a given $\\Sigma_i$, $\\X$, and $x(s) \\in \\X$, we have \n\n\\begin{eqnarray} \\nonumber\n\\max_{s \\in [t, t+\\tau]} \\Vert \\dot{x}(s) \\Vert &=& \\max_{s \\in [t, t+ \\tau]} \\Vert A_i x(s) + u_i \\Vert \\\\ \\nonumber\n&\\le& \\max_{s \\in [t, t+\\tau]} \\{ \\Vert A_i \\Vert \\Vert x(s) \\Vert+ \\Vert u_i \\Vert \\} \\\\ \n&\\le& \\Vert A_i \\Vert \\bar{x}+ \\Vert u_i \\Vert,\n\\end{eqnarray}\nwhere $\\bar{x} = \\max_{x \\in \\mathcal{X}} \\Vert x \\Vert$. \n\nFor a fixed $\\tau \\in [0, h]$, we can compute an upper bound on $\\Vert x(t+\\tau) - x(t) \\Vert$ as follows:\n\\begin{eqnarray} \\label{eq:h:ineq:0} \\nonumber\n\\Vert x(t+\\tau) - x(t) \\Vert &\\le& \\int^{t+\\tau}_{t} \\Vert \\dot{x}(s) \\Vert ds \\nonumber \\\\\n&\\le& \\int^{t+\\tau}_{t} \\max_{s \\in [t, t+ \\tau]} \\Vert \\dot{x}(s) \\Vert ds \\nonumber \\\\\n&\\le& \\int^{t+\\tau}_{t} (\\Vert A_i \\Vert\\bar{x} + \\Vert u_i \\Vert) ds \\nonumber \\\\\n&=& (\\Vert A_i \\Vert \\bar{x} + \\Vert u_i \\Vert) \\tau.\n\\end{eqnarray}\n\nMaximization of both sides of (\\ref{eq:h:ineq:0}) over $\\tau \\in [0, h]$ gives us \n\\begin{eqnarray} \\label{eq:h:ineq:1} \\nonumber\n\t\\max_{\\tau \\in [0,h]} \\Vert x(t+\\tau) - x(t) \\Vert &\\le& (\\Vert A_i \\Vert \\bar{x} + \\Vert u_i \\Vert) h \\\\\n\t&\\le& \\max_{l_i \\in \\mathbb{L}} (\\Vert A_i \\Vert \\bar{x} + \\Vert u_i \\Vert) h.\n\\end{eqnarray}\n\nIf we upper bound the right hand side by $\\epsilon > 0$, then we can choose \n\\begin{equation} \\label{eq:h:ineq}\n\th < \\frac{\\epsilon}{\\bar{v}}.\n\\end{equation}\nwhere $\\bar{v} := \\max_{l_i \\in \\mathbb{L}} (\\Vert A_i \\Vert \\bar{x} + \\Vert u_i \\Vert)$.\n\nSo, if we choose $h$ as \n\\begin{equation} \\label{eq:h:eq}\n h = \\frac{\\epsilon\/2}{\\bar{v}} ,\n\\end{equation}\nthen it is clear that we can ensure (\\ref{eq:hcond}). \n\nWe now show that, for a given $\\epsilon > 0$, if a sampling period $h$ satisfies (\\ref{eq:h:eq}), then a set constructed as a union of $\\epsilon$-neighborhood of each sampled state along a trajectory is indeed a bounded $\\epsilon$-reach set at an initial location. \nMoreover, such a bounded $\\epsilon$-reach set contains the bounded reach set not only from the initial state but also from the $(\\epsilon\/2)$-neighborhood of the initial state.\n\n\\begin{figure}\n\\begin{center}\n\t\\includegraphics[width=8cm]{traj.png}\n\t\\caption{An over-approximation of a trajectory $x(t)$ through sampling.}\\label{fig:traj}\n\\end{center}\n\\end{figure}\n\n\n\n\\begin{lem} \\label{lem:theory:l0}\nGiven $\\epsilon > 0$ and a time bound $T > 0$, a bounded $\\epsilon$-reach set $\\R_{t_f}(x_0, \\epsilon)$ of a DTLHA $\\A$ from an initial state $(x_0, l_0)$ can be determined as follows:\n\\begin{equation} \\label{eq:lem:theory:l0}\n \\R_{t_f}(x_0, \\epsilon) := \\bigcup_{k=0}^{m-1} \\B_{\\epsilon}(x(k h)) ,\n\\end{equation}\nwhere $t_f := \\min \\{\\tau_1, T \\}$, $\\tau_1 := \\inf \\{ t \\in (0, T] : x(t) \\not\\in Inv_0 \\land x(0) = x_0 \\}$, $m := \\lceil t_f\/h \\rceil$ and $h = (\\epsilon\/2)\/\\max_{l_i \\in \\mathbb{L}} (\\Vert A_i \\Vert \\bar{x} + \\Vert u_i \\Vert)$.\nMoreover, this set has two additional properties:\n\\begin{enumerate}[(i)]\n \\item $\\lim_{\\epsilon \\rightarrow 0} \\R_{t_f}(x_0, \\epsilon) = \\R_{t_f}(x_0)$, and\n \\item It contains an $\\epsilon\/2$ neighborhood of $\\R_{t_f}(x_0)$, i.e.,\n \\begin{equation}\\nonumber\n \\bigcup_{z \\in \\R_{t_f}(x_0)} \\B_{\\epsilon\/2}(z) \\subseteq \\R_{t_f}(x_0, \\epsilon).\n \\end{equation}\n\\end{enumerate}\n\\end{lem}\n\\begin{proof}\nSince $h$ satisfies (\\ref{eq:h:ineq}), it is easy to see that $\\R_{t_f}(x_0) \\subset \\R_{t_f}(x_0, \\epsilon)$ from the construction of $\\R_{t_f}(x_0, \\epsilon)$.\nNext, by the relation between $\\epsilon$ and $h$ in (\\ref{eq:h:eq}), it is clear that $h \\rightarrow 0$ as $\\epsilon \\rightarrow 0$. \nThis implies that $\\R_{t_f}(x_0, \\epsilon) \\rightarrow \\R_{t_f}(x_0)$ as $\\epsilon \\rightarrow 0$, establishing (i). \nFor (ii), as noted above, (\\ref{eq:h:eq}) actually chooses half the sampling period that would have sufficed to make it a bounded $\\epsilon$-reach set over $[0,t_f]$. \nHence, replacing $\\epsilon$ by $\\epsilon\/2$ in the right hand side of (\\ref{eq:lem:theory:l0}) still yields a bounded $\\epsilon$-reach set. \nThus the over stringent choice of $h$ contains not just $\\R_{t_f}(x_0)$ but actually all points that are within a distance $\\epsilon\/2$ from it.\n\\end{proof}\n\n\n\n\n\\subsection{Continuity Property of DTLHA} \\label{sec:theory:cont}\n\nNow let us consider the problem of computing a bounded $\\epsilon$-reach set of a DTLHA $\\A$ not from an initial state $x_0$ but from a $\\delta$-neighborhood of $x_0$.\nWe first show that there exists a $\\delta > 0$ such that the bounded reach set of a DTLHA $\\A$ from a set $\\B_{\\delta}(x_0)$ at an initial location $l_0$ is contained in a bounded $\\epsilon$-reach set of $\\A$ from $x_0$ defined in (\\ref{eq:lem:theory:l0}).\n\n\n\\begin{lem} \\label{lem:theory:cont:1}\nGiven $\\epsilon > 0$, a time bound $T > 0$, an initial state $x_0$, and a DTLHA $\\A$, there exists a $\\delta > 0$ such that \n\\begin{equation}\n \\R_{t_f}(\\B_{\\delta}(x_0)) \\subseteq \\R_{t_f}(x_0,\\epsilon) ,\n\\end{equation}\nwhere $\\B_{\\delta}(x_0)$ is a $\\delta$-neighborhood around $x_0$ and $\\R_{t_f}(\\B_{\\delta}(x_0))$ is the bounded reach set of $\\A$ from $\\B_{\\delta}(x_0)$ up to time $t_f$ and $t_f$ is as defined in Lemma \\ref{lem:theory:l0}. \nIn particular, $\\R_{t_f}(\\B_{\\epsilon \/(2C)}(x_0)) \\subseteq \\R_{t_f}(x_0, \\epsilon)$ for an appropriate $C$.\n\\end{lem}\n\\begin{proof}\nNotice that $x(t) = e^{A_0t} x_0 + \\int_0^t e^{A_0(t-s)} u_0 ds$, where $A_0$ and $u_0$ define the linear dynamics in an initial location $l_0$.\nIf we consider two different initial states $x_0$ and $y_0$ in $\\B_{\\delta}(x_0)$, then their trajectories $x(t)$ and $y(t)$ satisfy $x(t) - y(t) = e^{At} (x_0 - y_0)$.\nHence $\\Vert x(t) - y(t) \\Vert \\leq c e^{\\lambda t} \\Vert x_0 - y_0 \\Vert$ for some positive constant $c$ and some constant $\\lambda$.\n\nLet $C := c \\cdot \\max_{0 \\leq t \\leq {t_f}}\\lbrace e^{\\lambda t}\\rbrace$.\nThen\n\\begin{equation} \\label{eq:cont:1}\n \\Vert x(t) - y(t) \\Vert \\leq C \\Vert x_0 - y_0 \\Vert \\qquad \\mbox{for} \\quad t \\in [0, {t_f}].\n\\end{equation}\nSince $\\Vert x_0 - y_0 \\Vert \\leq \\delta$, $\\Vert x(t) - y(t) \\Vert \\leq C \\delta$ for all $t \\in [0, {t_f}]$.\nThis implies that any initial condition $y_0$ in $\\B_\\delta(x_0)$ results in a $y(t)$ that lies in a $C \\delta$ neighborhood of $\\R_{t_f}(x_0)$ for all $t \\in [0,{t_f}]$. \nIn particular, from property (ii) of Lemma \\ref{lem:theory:l0}, it also follows that $\\R_{t_f}(\\B_{\\delta}(x_0)) \\subseteq \\R_{t_f}(x_0, 2 C \\delta)$.\nIf we set $\\delta = \\epsilon \/(2C)$, then it is clear that $\\R_{t_f}(\\B_{\\delta}(x_0)) \\subseteq \\R_{t_f}(x_0,\\epsilon)$.\n\\end{proof}\n\n\nNext we extend the result in Lemma \\ref{lem:theory:cont:1} to show that there exist a $\\delta > 0$ and a $\\gamma > 0$ such that an over-approximation of the bounded reach set $\\R_{t_f}(\\B_{\\delta}(x_0))$, denoted as $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$, is also contained in $\\R_{t_f}(x_0,\\epsilon)$ that is defined in (\\ref{eq:lem:theory:l0}).\n\n\n\\begin{lem} \\label{lem:theory:cont:2}\nGiven $\\epsilon > 0$, a time bound $T > 0$, an initial state $x_0$, and a DTLHA $\\A$, there exist $\\delta > 0$ and $\\gamma > 0$ such that \n\\begin{equation}\n\t\\R_{t_f}(\\B_{\\delta}(x_0),\\gamma) \\subseteq \\R_{t_f}(x_0,\\epsilon),\n\\end{equation}\nwhere $\\R_{t_f}(\\B_{\\delta}(x_0),\\gamma)$ is a $\\gamma$-approximation of $\\R_{t_f}(\\B_{\\delta}(x_0))$, and $t_f$ is as defined in Lemma \\ref{lem:theory:l0}.\nIn particular, $\\R_{t_f}(x_0) \\subseteq \\R_{t_f}(\\B_{\\epsilon\/(4C)}(x_0), \\epsilon\/4) \\subseteq \\R_{t_f}(x_0, \\epsilon)$.\n\\end{lem}\n\\begin{proof}\nLet $x(t;z)$ denote the solution at time $t$ of the differential equation $\\dot{x}(t) = Ax(t)+u$ with initial condition $x(0) = z \\in \\B_\\delta(x_0)$.\nNow consider $w \\in \\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$. \nThen, by the definition of $\\R_{t_f}(\\B_{\\delta}(x_0))$ and $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$, \n\\[ \\Vert w - x(t;z) \\Vert < \\gamma\\] \nfor some $t \\in [0,t_f]$ and $z \\in \\B_{\\delta}(x_0)$. \nHence\n\\begin{eqnarray} \\nonumber\n \\Vert w - x(t;x_0) \\Vert &=& \\Vert w - x(t;z) + x(t;z) - x(t;x_0) \\Vert \\\\ \\nonumber\n &\\le& \\Vert w - x(t;z) \\Vert + \\Vert x(t;z) - x(t;x_0) \\Vert \\\\ \\nonumber\n &\\le& \\gamma + \\Vert x(t;z) - x(t;x_0) \\Vert . \\nonumber\n\\end{eqnarray}\nFrom (\\ref{eq:cont:1}), we know that \n\\[\n\t\\Vert x(t;z) - x(t;x_0) \\Vert \\le C \\Vert z - x_0 \\Vert \\le C \\delta.\n\\]\nHence \n\\[\n\t\\Vert w - x(t;x_0) \\Vert \\le \\gamma + C \\delta\n\\]\nwhich implies that $w$ lies in a $(\\gamma + C \\delta)$-neighborhood of $\\R_{t_f}(x_0)$.\nFrom the property (ii) in Lemma \\ref{lem:theory:l0}, if we replace $\\epsilon\/2$ with $(\\gamma + C \\delta)$, then we have $w \\in \\R_{t_f}(x_0, 2(\\gamma + C \\delta))$ which in turn implies that $\\R_{t_f}(\\B_{\\delta}(x_0),\\gamma) \\subseteq \\R_{t_f}(x_0, 2(\\gamma + C \\delta))$.\nSo, given $\\epsilon > 0$, we can choose $\\gamma = \\epsilon\/4$ and $\\delta = \\epsilon\/(4C)$, and then $\\R_{t_f}(\\B_{\\delta}(x_0),\\gamma) \\subseteq \\R_{t_f}(x_0, \\epsilon)$.\n\\end{proof}\n\n\n\n\n\\subsection{Decidability of Discrete Transition Event} \\label{sec:theory:trans}\n\nRecall that $\\tau_1$ is the time $t$ when a reached state $x(t)$ of a DTLHA starting from an initial state first exits the invariant set of an initial location.\nWe now show that, for a given $T$, even though it is not known to be decidable to determine $\\tau_1$ exactly, we can still determine the event of exit of a reached state $x(t)$ from the invariant set of an initial location if $\\tau_1 < T$.\n\n\n\\begin{lem} \\label{lem:theory:trans:exit}\nGiven a time bound $T > 0$, an initial condition $(l_0, x_0) \\in \\mathbb{L} \\times \\mathbb{R}^n$, and a DTLHA $\\A$, if $\\tau_1 < T$, then for all small enough $\\delta > 0$ and for some small enough $h > 0$, $\\B_{\\delta}(x(nh)) \\subset (Inv_0)^{c}$ for some $n \\in \\mathbb{N}$ satisfying $nh \\le T$.\n\\end{lem}\n\\begin{proof}\nLet $\\vec{n}_1$ be an outward normal vector of $\\partial Inv_0$ at $x(\\tau_1)$.\nSince $\\langle \\dot{x}(\\tau_1), \\vec{n}_1 \\rangle > 0$ by assumption, then by the continuity of the vector field of a linear dynamics in $l_0$, there exists an $r > 0$ such that for all $z \\in \\B_{3 r}(x(\\tau_1)) \\cap \\partial Inv_0$, $\\langle \\dot{z}, \\vec{n}_1 \\rangle > 0$ where $\\dot{z} := A_0 z + u_0$.\nNotice that $\\Vert \\dot{z} \\Vert \\le \\bar{v}$ by the definition of $\\bar{v}$ in (\\ref{eq:h:ineq}).\nLet $x(t;z)$ denotes the solution at time $t$ of the differential equation $\\dot{x}(t) = A_0 x(t)+u_0$ with initial condition $x(0) = z$.\nThen for any $z \\in \\B_{r}(x(\\tau_1)) \\cap \\partial Inv_0$, it is guaranteed that $x(t;z) \\in (Inv_0)^C$ for $t \\in (0, 2 h)$ for any $h > 0$ satisfying $h < r \/ \\bar{v}$.\nThis implies that $x(nh) \\in (Inv_0)^{c}$ for some $n \\in \\mathbb{N}$.\nMoreover by compactness of $Inv_0$, there exists a $\\delta > 0$ such that $\\B_{\\delta}(x(nh)) \\subset (Inv_0)^C$.\n\\end{proof}\n\n\nNow suppose that $x(t) \\in Inv_0$ for all $0 \\le t \\le T+\\theta$ for some $\\theta > 0$.\nThen this fact can also be determined.\n\n\n\\begin{lem} \\label{lem:theory:trans:noexit}\nSuppose $x(t) \\in Inv_0$ for all $0 \\le t \\le T+\\theta$ for some $\\theta > 0$. \nThen for all small enough $\\delta > 0$ and $\\gamma > 0$,\n\\begin{equation}\n \\R_{t_f}(\\B_{\\delta}(x_0), \\gamma) \\subseteq (Inv_0)^{\\circ}.\n\\end{equation}\nwhere $t_f := \\min \\{ \\tau_1, T \\} = T$.\n\\end{lem}\n\\begin{proof}\nSince $x(t) \\in (Inv_0)^{\\circ}$ for all $0 \\le t \\le T$, the result immediately follows from Lemma \\ref{lem:theory:cont:2}.\n\\end{proof}\n\n\n\n\\subsection{Over-approximation of Discrete Transition State} \\label{sec:theory:over}\n\nFor a given time bound $T$, suppose that the event $\\tau_1 < T$ is determined for some $\\delta$ and $h$ as shown in Lemma \\ref{lem:theory:trans:exit}.\nThen, to continue to compute a bounded $\\epsilon$-reach set beyond an initial location, we need to determine \n\\begin{inparaenum}[(i)]\n\t\\item a new location to which a discrete transition is made from an initial location, and also\n\t\\item an over-approximation of a discrete transition state from which the bounded $\\epsilon$-reach set computation can be continued.\n\\end{inparaenum}\nWe now show that these can be determined, if a discrete transition state $x(\\tau_1)$ is deterministic and, more importantly, transversal, as defined in Definition \\ref{def:transversal}.\n\n\n\\begin{lem} \\label{lem:theory:over}\nGiven $\\tau_1 < T$, if $x(\\tau_1) \\in \\partial Inv_0$ satisfies a deterministic and transversal discrete transition condition, then there exists a $\\delta > 0$ such that $\\B_{2\\delta}(x(\\tau_1)) \\subset (Inv_0 \\cup Inv_1)$ for some location $l_1$. Furthermore, there exists a $\\Delta > 0$ such that\n\\begin{enumerate}[(i)]\n \\item $x(t) \\in (Inv_1)^{\\circ}$ for $t \\in (\\tau_1, \\tau_1 + \\Delta)$ , and\n \\item\n \\begin{equation} \\label{eq:lem:lha:6}\n \\bigcup_{y \\in \\mathcal{J}_{0,1}} x(\\tau;y) \\subset (Inv_1)^{\\circ} \\quad \\mbox{for } \\tau \\in (0, \\Delta),\n \\end{equation}\n\\end{enumerate}\nwhere $x(\\tau;y)$ is the solution at time $\\tau$ of an LTI system for the location $l_1$ with an initial state $y$ and $\\mathcal{J}_{0,1} := \\B_{\\delta}(x(\\tau_1)) \\cap Inv_0 \\cap Inv_1$. \n\\end{lem}\n\\begin{proof}\nLet $Inv_1, Inv_2$ be invariant sets for some locations $l_1$ and $l_2$ such that $Inv_0 \\cap Inv_1 \\cap Inv_2 \\ne \\emptyset$.\nSince $x(\\tau_1)$ satisfies a deterministic discrete transition condition, if $x(\\tau_1) \\in Inv_0 \\cap Inv_1$, then $x(\\tau_1) \\notin Inv_0 \\cap Inv_2$.\nThis implies that $x(\\tau_1) \\not\\in Inv_2$.\nThen by compactness of $Inv_2$, we know that there exists a $\\delta' > 0$ such that $\\B_{\\delta'}(x(\\tau_1)) \\cap Inv_2 = \\emptyset$. Therefore, we conclude that $\\B_{\\delta'}(x(\\tau_1)) \\subset Inv_0 \\cup Inv_1$.\n\nLet $\\vec{n}_1$ be an outward normal vector of $\\partial Inv_0$ at $x(\\tau_1)$.\nSince $x(\\tau_1)$ satisfies a transversal discrete transition condition from the location $l_0$ to the other location $l_1$, we know that there exists a $\\delta'' > 0$ such that for all $x(t) \\in \\B_{\\delta''}(x(\\tau_1)) \\cap Inv_0 \\cap Inv_1$, $\\langle \\dot{x}(t), \\vec{n}_1 \\rangle > 0$, where $\\dot{x}(t)$ is taken as either $A_0 x(t) + u_0$ or as $A_1 x(t) + u_1$, by the continuity of vector fields of the LTI dynamics for $l_0$ and $l_1$.\n\nLet $\\delta = \\min \\lbrace \\delta'\/2, \\delta''\/2\\rbrace$, and $\\Delta := \\delta\/(2 \\bar{v})$ where $\\bar{v}$ is as defined in (\\ref{eq:h:ineq}).\nThen by the definition of $\\delta$ and $\\bar{v}$, it is clear that (i) and (ii) hold for these choices of $\\delta$ and $\\Delta$.\n\\end{proof}\n\n\n\nIn Lemma \\ref{lem:theory:over}, $\\mathcal{J}_{0,1}$ is an over-approximation of $x(\\tau_1)$ that is determined by taking a $\\delta$-ball around $x(\\tau_1)$ for suitably small $\\delta > 0$, and intersecting it with $Inv_0$ and $Inv_1$. Once such a suitably small $\\delta$ is known, then the following lemma shows that it is also possible to determine a $\\delta_0$-neighborhood of an initial state $x_0$ such that the reach set at time $\\tau_1$ of a DTLHA $\\A$ from $\\B_{\\delta_0}(x_0)$ is contained in $\\B_{\\delta}(x(\\tau_1))$.\n\n\\begin{lem} \\label{lem:theory:over:cont:1}\nGiven $\\delta$ determined by Lemma \\ref{lem:theory:over}, there exists a $\\delta_0$ such that\n\\begin{equation}\n \\D_{\\tau_1}(\\B_{\\delta_0}(x_0)) \\subseteq \\B_{\\delta}(x(\\tau_1)),\n\\end{equation}\nand $\\D_{\\tau_1}(\\B_{\\delta_0}(x_0)) \\cap Inv_0 \\cap Inv_1$ is an over-approximation of $x(\\tau_1)$ determined by $\\delta_0$.\n\\end{lem}\n\\begin{proof}\nThis follows from the same argument used in the proof of Lemma \\ref{lem:theory:cont:1}, by choosing $\\delta_0 = \\delta\/C$.\n\\end{proof}\n\nThe next lemma shows that $\\delta_0$ for $\\B_{\\delta_0}(x_0)$ can be determined at each discrete transition time $\\tau_k$ for $k \\ge 1$.\n\n\\begin{lem} \\label{lem:theory:over:cont:2}\nLet $\\delta_{k}$ be the radius of a ball centered at $x(\\tau_k)$ intersecting only $Inv_{k-1}$ and $Inv_k$, where $\\tau_k$ is the $k$-th discrete transition time and $l_k$ is the location after the $k$-th discrete transition. Then for any $x(\\tau_k)$ satisfying a deterministic and transversal discrete transition condition, there exists a $\\delta_0$ such that\n\\begin{equation}\n \\D_{\\tau_k}(\\B_{\\delta_0}(x_0)) \\subseteq \\B_{\\delta_{k}}(x(\\tau_k)) ,\n\\end{equation}\nwhere $\\D_{\\tau_k}(\\B_{\\delta_0}(x_0))$ is the reached states of a given DTLHA $\\A$ from $\\B_{\\delta_0}(x_0)$ at time $\\tau_k$.\n\\end{lem}\n\\begin{proof}\nFrom the continuity property shown in Lemma \\ref{lem:theory:cont:1}, there is a $\\delta_{k-1} > 0$ such that $\\D_{[0, \\tau_k - \\tau_{k-1}]}(\\B_{\\delta_{k-1}}(x(\\tau_{k-1})))$ $\\subseteq$ $\\D_{[0, \\tau_k - \\tau_{k-1}]}(x(\\tau_{k-1}), \\delta_{k})$ for a given $\\delta_{k}$ where $\\D_{[0, \\tau_k - \\tau_{k-1}]}(x(\\tau_{k-1}), \\delta_{k})$ denotes a $\\delta_k$-approximation of $\\D_{[0, \\tau_k - \\tau_{k-1}]}(x(\\tau_{k-1}))$.\nThen for this $\\delta_{k-1}$, it is clear that $\\D_{\\tau_k}(\\B_{\\delta_{k-1}}(x(\\tau_{k-1})))$ $\\subseteq$ $\\B_{\\delta_{k}}(x(\\tau_k))$.\nUsing the same argument, we can find $\\delta_{k-2}, \\delta_{k-3}, \\cdots, \\delta_1$.\nThen from Lemma \\ref{lem:theory:over:cont:1}, we know that there exists a $\\delta_0 > 0$ such that $\\D_{\\tau_1}(\\B_{\\delta_0}(x_0))$ $\\subseteq$ $\\B_{\\delta_1}(x(\\tau_1))$.\nSince $\\D_{\\tau_2 - \\tau_1}(\\B_{\\delta_1}(x(\\tau_1)))$ $\\subseteq$ $\\B_{\\delta_2}(x(\\tau_2))$, we have $\\D_{\\tau_2}(\\B_{\\delta_0}(x_0))$ $\\subseteq$ $\\B_{\\delta_2}(x(\\tau_2))$.\nThis relation holds for each $\\tau_i$ where $i = 1, 2, \\cdots, k$.\nTherefore, $\\D_{\\tau_k}(\\B_{\\delta_0}(x_0))$ $\\subseteq$ $\\B_{\\delta_k}(x(\\tau_k))$. \n\\end{proof}\n\n\nWe now present our main result for the bounded $\\epsilon$-reachability of a DTLHA.\n\n\\begin{thm} \\label{thm:theory:thm}\nGiven $\\epsilon > 0$, a time bound $T > 0$, a discrete transition bound $N \\in \\mathbb{N}$, and a DTLHA $\\A$ starting from an initial condition $(l_0, x_0) \\in \\mathbb{L} \\times \\mathbb{R}^n$, there exist $\\delta > 0$, $\\gamma > 0$, and a sampling period $h > 0$ satisfying $h < \\gamma\/\\bar{v}$ such that \n\\begin{equation} \\label{eq:theory:thm}\n\t\\R_{t_f}(x_0) \\subseteq \\R_{t_f}(\\B_{\\delta}(x_0), \\gamma) \\subseteq \\R_{t_f}(x_0, \\epsilon),\n\\end{equation}\nwhere $t_f := \\min \\{\\tau_N, T\\}$ and $\\tau_N$ is the time at the N-th discrete transition. \n\\end{thm}\n\\begin{proof}\nLet $C_i := \\max_{0 \\le t \\le t_f} \\{ e^{\\Vert A_i \\Vert t}\\}$ for a location $l_i \\in \\mathbb{L}$ and $C := \\max_{l_i \\in \\mathbb{L}} \\{ C_i \\}$.\nFor a given $\\epsilon > 0$, suppose $\\delta_k < \\epsilon\/(4 C)$ at each $\\tau_k$ up to $t_f$ where $\\delta_k$ is as defined in Lemma \\ref{lem:theory:over:cont:2}.\nThen, from Lemmas \\ref{lem:theory:over}, \\ref{lem:theory:over:cont:1}, and \\ref{lem:theory:over:cont:2}, we know that there exist a $\\delta' > 0$ such that $\\D_{\\tau_k}(\\B_{\\delta'}(x_0)) \\subseteq \\B_{\\delta_{k}}(x(\\tau_k))$ where $x(t)$ is the execution of a DTLHA $\\A$ starting from $x_0$ at time zero.\nFurthermore, from Lemmas \\ref{lem:theory:trans:exit} and \\ref{lem:theory:over}, there also exists $h > 0$ and $\\delta'' > 0$ such that \n\\begin{inparaenum}[(i)]\n\t\\item $h < \\Delta_k$ and\n\t\\item $h$ and $\\delta''$ satisfy Lemma \\ref{lem:theory:trans:exit}\n\\end{inparaenum}\nat every $\\tau_k$ up to $t_f$, where $\\Delta_k$ is the $\\Delta$ that is defined in Lemma \\ref{lem:theory:over} for the $k$-th deterministic and transversal discrete transition.\n\nLet $\\hat{\\delta} := \\min \\{ \\delta', \\delta'' \\}$.\nThen, with $\\hat{\\delta}$ and $h$, we can determine every discrete transition event and also construct an over-approximation of the discrete transition state as long as it is deterministic and transversal.\nSince $\\hat{\\delta} \\le \\delta'$, $\\D_{\\tau_k}(\\B_{\\hat{\\delta}}(x_0)) \\subseteq \\B_{\\delta_{k}}(x(\\tau_k))$ at each $\\tau_k$ up to $t_f$.\nThus, for any $\\gamma > 0$, \n\\[ \n\t\\D_{[0, \\tau_k^{k+1}]}(\\D_{\\tau_k}(\\B_{\\hat{\\delta}}(x_0)), \\gamma) \\subseteq \\D_{[0, \\tau_k^{k+1}]}(\\B_{\\delta_k}(x_{\\tau_k}), \\gamma)\n\\]\nwhere $ \\tau_k^{k+1} := \\tau_{k+1} - \\tau_k$.\n\nNow, we notice that if $\\gamma < \\epsilon\/4$, then from Lemma \\ref{lem:theory:cont:2},\n\\[\n\t\\D_{[0, \\tau_k^{k+1}]}(\\D_{\\tau_k}(\\B_{\\hat{\\delta}}(x_0)), \\gamma) \\subseteq \\D_{[0, \\tau_k^{k+1}]}(x(\\tau_k), \\epsilon),\n\\]\nfor each $\\tau_k$ up to $t_f$, where the left hand side is a segment of $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$ for $[\\tau_k, \\tau_{k+1}]$, and the right hand side is a segment of $\\R_{t_f}(x_0, \\epsilon)$ for $[\\tau_k, \\tau_{k+1}]$ that is defined as $\\bigcup_{n = 0}^{N_k -1} \\B_{\\epsilon}(x(\\tau_k + n h))$ where $N_k := \\lceil (\\tau_{k+1} - \\tau_k)\/h\\rceil$.\n\nFurthermore, if $h < \\gamma\/\\bar{v}$, then from (\\ref{eq:h:ineq}) replaced with $\\epsilon$ by $\\gamma$, it is clear that \n\\[\n\t\\D_{[0, \\tau_k^{k+1}]}(\\D_{\\tau_k}(x_0)) \\subseteq \\D_{[0, \\tau_k^{k+1}]}(\\D_{\\tau_k}(\\B_{\\hat{\\delta}}(x_0)), \\gamma),\n\\]\nwhere the left hand side is a segment of $\\R_{t_f}(x_0)$ for $[\\tau_k, \\tau_{k+1}]$.\nTherefore, the result holds.\n\\end{proof}\n\n\n\n\n\n\n\\section{Computing a Bounded $\\epsilon$-Reach Set of a DTLHA} \\label{sec:cond}\n\nFrom Theorem \\ref{thm:theory:thm}, we know that a set $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$, a bounded $\\epsilon$-reach set of a DTLHA, can be computed for some $\\delta, \\gamma$, and $h$. \nIn this section, we discuss how to compute $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$.\nMore precisely, we derive a set of conditions, based on the results in Section \\ref{sec:theory}, that are needed to correctly detect a deterministic and transversal discrete state transition event and also to determine whether the values for the parameters $\\delta, \\gamma$, and $h$ are appropriate so as to ensure that $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$ is a correct bounded $\\epsilon$-reach set.\nFurthermore, later in this section, we extend these conditions to incorporate the numerical calculation errors caused by the finite precision numerical calculations capabilities. \n\n\n\n\\subsection{Conditions for Bounded $\\epsilon$-Reach Set Computation} \\label{sec:cond:exact}\n\nWe first note some properties that a set $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$ needs to satisfy so that it can be considered as a bounded $\\epsilon$-reach set of a DTLHA.\n\n\\begin{rem} \\label{rem:cond:exact}\nNotice that any $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$ that can be determined by $\\delta, \\gamma$, and $h$ in Theorem \\ref{thm:theory:thm} for a given $\\epsilon > 0$ needs to satisfy the following properties.\n\\begin{enumerate}[(i)]\n\t\\item $d_H(\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma), \\R_{t_f}(x_0)) \\le \\epsilon$, \n\t\\item $\\R_{t_f}(\\B_{\\delta}(x_0))) \\subset \\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$, and\n\t\\item $d_H(\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma), \\R_{t_f}(\\B_{\\delta}(x_0))) \\le \\gamma$.\t\n\\end{enumerate}\n\\end{rem}\n\n\nFor given $\\delta$ and $h$, the following lemma shows how we can detect a discrete state transition event if there is one.\n\n\n\\begin{lem} \\label{lem:cond:exact:trans}\nGiven a location $l_c$ and a DTLHA $\\A$, \nif $\\D_{t-h}(\\B_{\\delta}(x_0)) \\subset (Inv_c)^{\\circ}$ and $\\D_t(\\B_{\\delta}(x_0)) \\subset Inv_c^C$ for some $\\delta > 0$ and $h > 0$, where $\\B_{\\delta}(x_0)$ is a $\\delta$-neighborhood of the initial state $x_0$, then there is a discrete transition from the location $l_c$ to some other locations at some time in $(t-h, t)$.\n\\end{lem}\n\\begin{proof}\nRecall that $\\D_t(x_0)$ denotes the reached state of $\\A$ at time $t$ from $x_0$.\nThen it is clear that $\\D_t(x_0) \\in \\D_t(\\B_{\\delta}(x_0))$. \nSimilarly, $\\D_{t-h}(x_0) \\in \\D_{t-h}(\\B_{\\delta}(x_0))$. \nHence, from the hypothesis, $\\D_t(x_0) \\in Inv_c^C$ and $\\D_{t-h}(x_0) \\in (Inv_c)^{\\circ}$.\nThis implies that there exists $\\tau \\in (t-h ,t)$ such that $\\D_{s}(x_0) \\in Inv_c^{\\circ}$ for $s \\in [t-h, \\tau)$ and $\\D_{s}(x_0) \\in Inv_c^C$ for $s \\in (\\tau, t]$.\nTherefore, there is a discrete transition at some time $\\tau \\in (t-h, t)$.\n\\end{proof}\n\n\nOnce a discrete state transition is detected, then, by Lemma \\ref{lem:cond:exact:det}, we can check if it is deterministic or not.\n\n\n\\begin{lem} \\label{lem:cond:exact:det}\nGiven an initial state $x_0$ and a DTLHA $\\A$,\nsuppose that there is a discrete transition from a location $l_c$ to some other locations at time $t$, i.e., $\\D_{t-h}(\\B_{\\delta}(x_0)) \\subset (Inv_c)^{\\circ}$ and $\\D_t(\\B_{\\delta}(x_0)) \\subset Inv_c^C$ for some $\\delta > 0$ and $h > 0$. \nThen the discrete transition is deterministic if there exists a location $l_n$ such that $l_n \\ne l_c$ and $\\D_t(\\B_{\\delta}(x_0)) \\subset (Inv_n)^{\\circ}$.\n\\end{lem}%\n\\begin{proof}\nThis follows from the definition of a deterministic discrete transition in Definition \\ref{def:transversal}.\n\\end{proof}\n\n\nWe now present conditions to determine the transversality of a discrete state transition; this is more complicated than those in previous two lemmas.\nThe main idea of the conditions in the following Lemma \\ref{lem:cond:exact:transv} is that \n\\begin{inparaenum}[(i)]\n\t\\item $\\delta$ and $\\gamma$ have to be small enough so that every state in an over-approximation of a deterministic and transversal discrete transition state, which can be computed by $\\delta$ and $\\gamma$, is also deterministic and transversal, and also\n\t\\item the sampling period $h$ should be small enough so that any reached states right after a discrete state transition can be captured correctly. \n\\end{inparaenum}\n\n\n\\begin{lem} \\label{lem:cond:exact:transv}\nGiven $\\gamma > 0$ and $h > 0$ satisfying $h < \\gamma\/\\bar{v}$,\nsuppose that there is a deterministic discrete transition from a location $l_c$ to another location $l_n$ at time $t$, i.e., $\\D_{t-h}(\\B_{\\delta}(x_0)) \\subset (Inv_c)^{\\circ}$ and $\\D_t(\\B_{\\delta}(x_0)) \\subset (Inv_n)^{\\circ}$ for some $\\delta > 0$ and $h > 0$. \nThen for any $\\epsilon > 0$, the discrete transition is transversal if the following conditions hold:\n\\begin{itemize}\n\\item[(i)] $h < (dia(\\mathcal{J}_{c,n})\/2)\/(2 \\bar{v})$, \n\\item[(ii)] $\\D_0(\\mathcal{J}_{c,n}, dia(\\mathcal{J}_{c,n})\/2) \\subset (Inv_c \\cup Inv_n)$, and\n\\item[(iii)] $\\langle \\dot{x}_c, \\vec{n}_c \\rangle \\ge \\epsilon \\land \\langle \\dot{x}_n, \\vec{n}_c \\rangle \\ge \\epsilon, ~~\\forall x \\in \\V(\\mathcal{J}_{c,n}')$,\n\\end{itemize}\nwhere $\\mathcal{J}_{c,n} := \\D_t(\\B_{\\delta}(x_0), \\gamma) \\cap Inv_c \\cap Inv_n$, $\\mathcal{J}_{c,n}' := \\D_0(\\mathcal{J}_{c,n},$ $dia(\\mathcal{J}_{c,n})\/2) \\cap Inv_c \\cap Inv_n$, $\\bar{v}$ is as defined in (\\ref{eq:h:ineq}), $\\V(\\P)$ is a set of vertices of a polyhedron $\\P$, $\\vec{n}_c$ is an outward normal vector of $\\partial Inv_c$, and $\\dot{x}_i$ is the vector flow evaluated with respect to the LTI dynamics of location $l_i \\in \\mathbb{L}$.\n\\end{lem}\n\\begin{proof}\nNotice that $\\D_{t-h}(\\B_{\\delta}(x_0)) \\subset \\D_t(\\B_{\\delta}(x_0), \\gamma)$ since $\\gamma$ and $h$ satisfy $h < \\gamma\/\\bar{v}$.\nIn fact, $\\bigcup_{z \\in \\D_{t-h}(\\B_{\\delta}(x_0))} x(\\tau;z) \\subset \\D_{t}(\\B_{\\delta}(x_0), \\gamma)$ for $\\tau \\in [0, h]$ where $x(\\tau;z) := e^{A_c \\tau} z + \\int_{0}^{\\tau} e^{A_c s} u_c ds$ under the LTI dynamics of the location $l_c$.\nSince $\\D_{t-h}(x_0) \\in \\D_{t-h}(\\B_{\\delta}(x_0))$ and $\\D_t(x_0) \\in \\D_{t}(\\B_{\\delta}(x_0))$, $\\D_{\\tau'}(x_0) \\in \\mathcal{J}_{c,n}$ for some $\\tau' \\in (t-h, t)$ where $\\D_{\\tau'}(x_0)$ is a discrete transition state from $l_c$ to $l_n$ at time $\\tau'$.\nThus $\\mathcal{J}_{c,n} \\ne \\emptyset$ (more precisely, $\\mathcal{J}_{c,n}^{\\circ} \\ne \\emptyset$) and it is in fact an over-approximation of the deterministic discrete transition state $x_{\\tau'} \\in Inv_c \\cap Inv_n$.\n\nIf (ii) and (iii) hold, then it is easy to see that $z'$ satisfies the deterministic and transversal discrete transition condition in Definition \\ref{def:transversal} for any $z' \\in \\mathcal{J}'_{c,n}$.\nNow we suppose (i) holds \nand let $x(h;z)$ is the state reached from $z$ at time $h$ under the LTI dynamics of the location $l_n$, then, for any $z \\in \\mathcal{J}_{c,n}$, \n\\[\n\t\\Vert x(h;z) - z \\Vert \\le \\bar{v}h < dia(\\mathcal{J}_{c,n})\/2.\n\\] \n\nIf we now consider the fact that $dia(\\mathcal{J}'_{c,n}) \\ge 2 \\cdot dia(\\mathcal{J}_{c,n})$, then it is easy to see that $x(\\tau;z) \\in Inv_n^{\\circ}$ for $\\tau \\in (0, h)$.\nSince $z \\in \\mathcal{J}_{c,n}$ is arbitrary, we conclude that \n\\[\n\t\\D_{\\tau}(\\mathcal{J}_{c,n}) \\in Inv_n^{\\circ}\n\\]\nfor all $\\tau \\in (0, h)$.\nThus, the discrete transition state $\\D_t(x_0) \\in \\mathcal{J}_{c,n}$ is transversal and it can be determined through $\\mathcal{J}_{c,n}$ with $h$ satisfying (i).\n\\end{proof}\n\n\n\n\\subsection{Finite Precision Basic Calculations} \\label{sec:cond:basic}\n\nNotice that the results in Section \\ref{sec:cond:exact} are based on the assumption that the following quantities can be computed exactly:\n\\begin{itemize}\n\\item $x(t;x_0) = e^{At}x_0 + \\int_0^t e^{As} u ds$.\n\\item $\\H \\cap \\P$, where $\\H$ is a hyperplane and $\\P$ is a polyhedron.\n\\item $hull(\\mathcal{V})$, where $hull(\\mathcal{V})$ is the convex hull of $\\mathcal{V}$ that is a finite set of points in $\\mathbb{R}^n$.\n\\end{itemize}\nHowever, these exact computation assumptions cannot be satisfied in practice and we can only compute each of these with possibly arbitrarily small computation error. \nTherefore, instead of assuming exact computation capabilities for $x(t;x_0)$, $\\H \\cap \\P$, and $hull(\\mathcal{V})$, we now assume that the following basic calculation capabilities are available for approximately computing these quantities, and it only these that we can use to compute a bounded $\\epsilon$-reach set. \nMore precisely, we assume that for given $\\mu_c > 0$ and $\\mu_h > 0$, \n\\begin{itemize}\n\t\\item $a(\\mathcal{H} \\cap \\mathcal{P}, \\mu_c)$ and $a(hull(\\mathcal{V}), \\mu_h)$\n\\end{itemize}\nare available such that $d_H(x, a(x,y)) \\le y$, where $a(x, y)$ denotes an approximate computation of $x$, with $y > 0$ as an upper bound on the approximation error.\nWe also assume that for given $\\sigma_e > 0$ and $\\sigma_i > 0$,\n\\begin{itemize}\n\t\\item $a(e^{At}, \\sigma_e)$, and $a(\\int_0^t e^{A \\tau} d\\tau, \\sigma_i)$\n\\end{itemize}\nare available as an approximate computation of $x(t;x_0)$ such that $\\Vert x - a(x,y) \\Vert \\le y$.\nNotice that from these basic calculation capabilities for $x(t;x_0)$, we can compute $a(x(t;x_0), \\mu_x)$ with an approximation error denoted as $\\mu_x$, which is upper bounded by a finite value as shown below.\n\n\nWe first note that, for all approximate computations $a(x,y)$ that are used for computing $x(t;x_0)$, we have \n\\begin{equation}\nx - y \\cdot {\\bf{1}}_{n \\times m} \\le a(x, y) \\le x + y \\cdot {\\bf{1}}_{n \\times m},\n\\end{equation}\nwhere $x \\in \\mathbb{R}^{n \\times m}$ and ${\\bf{1}}_{n \\times m}$ is an $n$ by $m$ matrix whose every element is $1$, and the inequalities hold elementwise.\nWith this, an upper bound of $\\mu_x$ can be derived as follows:\n\\begin{equation} \\nonumber\ne^{At} -\\sigma_e \\cdot {\\bf{1}}_{n \\times n} \\le a( e^{At}, \\sigma_e) \\le e^{At} + \\sigma_e \\cdot {\\bf{1}}_{n \\times n}.\n\\end{equation}\nSimilarly, \n\\begin{eqnarray} \\nonumber\n\\int_0^t e^{As}ds - \\sigma_i \\cdot {\\bf{1}}_{n \\times n} \\le a(\\int_0^t e^{As}ds, \\sigma_i) \\\\ \\nonumber\n\\le \\int_0^t e^{As}ds + \\sigma_i \\cdot {\\bf{1}}_{n \\times n}.\n\\end{eqnarray}\nHence, we have \n\\begin{equation} \\nonumber\nx(t;x_0) - \\delta_x \\le a(x(t;x_0), \\delta_x) \\le x(t;x_0) + \\delta_x,\n\\end{equation}\nwhere $\\delta_x := (\\sigma_e \\vert x_0 \\vert + \\sigma_i \\vert u \\vert) \\cdot {\\bf{1}}_{n \\times 1}$.\n\nNow, we know that $\\mu_x$ is upper bounded by the maximum of $\\vert \\delta_x \\vert$ over the continuous state space $\\X$ and the control input domain $\\U$,\n\\begin{equation} \\label{eq:mux}\n\t\\mu_x \\le \\max_{x \\in \\X, u \\in \\U} \\vert \\delta_x \\vert.\n\\end{equation}\n\n\n\n\\subsection{Conditions for Computation under Finite Precision Calculations} \\label{sec:cond:inexact}\n\nIn this section, we extend the results in Section \\ref{sec:cond:exact} to derive a set of conditions for a bounded $\\epsilon$-reach set computation of the DTLHA under finite precision numerical calculation capabilities.\nThe following remark is an immediate extension of Remark \\ref{rem:cond:exact} in Section \\ref{sec:cond:exact}.\n\nIn the sequel, for simplicity of notation, we use $\\hat{x}$ to denote $a(x,\\rho)$ for a given approximation error bound $\\rho > 0$.\n\n\\begin{rem} \\label{rem:cond:inexact}\nLet $\\hat{\\R}_{t_f}(\\B_{\\delta}(x_0), \\gamma)$ be an approximation of $\\R_{t_f}(\\B_{\\delta}(x_0), \\gamma)$ that is determined by $\\delta, \\gamma$, and $h$ in Theorem \\ref{thm:theory:thm} and approximate calculations for $x(t;x_0)$, $\\H \\cap \\P$, and $hull(\\mathcal{V})$ defined in Section \\ref{sec:cond:basic}.\nThen, for a given $\\epsilon > 0$, it is sufficient for $\\hat{\\R}_{t_f}(\\B_{\\delta}(x_0), \\gamma)$ to be a bounded $\\epsilon$-reach set of a DTLHA $\\A$ if the following properties hold.\n\\begin{enumerate}[(i)]\n\t\\item $d_H(\\hat{\\R}_{t_f}(\\B_{\\delta}(x_0), \\gamma), \\R_{t_f}(x_0)) \\le \\epsilon$, \n\t\\item $\\R_{t_f}(\\B_{\\delta}(x_0))) \\subset \\hat{\\R}_{t_f}(\\B_{\\delta}(x_0), \\gamma)$, and\n\t\\item $d_H(\\hat{\\R}_{t_f}(\\B_{\\delta}(x_0), \\gamma), \\R_{t_f}(\\B_{\\delta}(x_0))) \\le \\gamma$.\t\n\\end{enumerate}\n\\end{rem}\n\n\nNext, we discuss how the relation between $h$ and $\\gamma$ can be modified so as to satisfy (ii) and (iii) in Remark \\ref{rem:cond:inexact} when there is numerical calculation error in computing $x(t;x_0)$. \n\n\n\\begin{lem} \\label{lem:cond:inexact:isover}\nGiven a DTLHA $\\A$ and its reached state $x(t)$ at time $t$ starting from an initial condition $x(0)$, \nlet $\\rho > 0$ be an upper bound on the approximation errors such that $\\Vert x(t) - \\hat{x}(t) \\Vert \\le \\rho$.\nIf a given sampling period $h$ satisfies $h < (\\gamma - \\rho)\/\\bar{v}$ for a given $\\gamma$ satisfying $\\gamma > \\rho$, where $\\bar{v}$ is as defined in (\\ref{eq:h:ineq}), then the following property holds at any location $l_i \\in \\mathbb{L}$ of $\\A$:\n\\begin{equation}\n\tx(t+\\tau) \\subset \\B_{\\gamma}(\\hat{x}(t)), ~~ \\forall \\tau \\in [0, h],\n\\end{equation}\nwhere $x(t+\\tau) = e^{A_i \\tau} x(t) + \\int_0^{\\tau} e^{A_i s} u_i ds$.\n\\end{lem}\n\\begin{proof}\nSince $\\Vert x(t) - \\hat{x}(t) \\Vert \\le \\rho$, $x(t) \\in \\B_{\\rho}(\\hat{x}(t))$.\nMoreover, from (\\ref{eq:h:ineq:1}), we know that for any $x(t) \\in \\X$,\n\\begin{eqnarray} \\nonumber\n\t\\max_{\\tau \\in [0,h]} \\Vert x(t+\\tau) - x(t) \\Vert &\\le& \\max_{\\tau \\in [0,h]} \\int_t^{t+\\tau} \\Vert \\dot{x}(s) \\Vert ds \\\\ \\nonumber\n\t &\\le& \\bar{v} h. \n\\end{eqnarray}\nHence, if $h < (\\gamma - \\rho)\/\\bar{v}$, then, for any $x(t) \\in \\X$, \n\\[\n\t\\max_{\\tau \\in [0,h]} \\Vert x(t+\\tau) - x(t) \\Vert < \\gamma - \\rho. \n\\] \nThis means that $x(t+\\tau) \\in \\B_{\\gamma - \\rho}(x(t))$ for $\\tau \\in [0, h]$.\nTherefore, for $\\tau \\in [0, h]$, \n\\begin{eqnarray} \\nonumber\n\t\\Vert \\hat{x}(t) - x(t+\\tau)\\Vert &\\le& \\Vert \\hat{x}(t) - x(t) \\Vert + \\Vert x(t) -x(t+\\tau) \\Vert \\\\ \\nonumber\n\t&\\le& \\rho + (\\gamma -\\rho).\n\\end{eqnarray}\nThus $\\Vert \\hat{x}(t) - x(t+\\tau)\\Vert \\le \\gamma$.\n\\end{proof}\n\nNotice that Lemma \\ref{lem:cond:inexact:isover} says that if $h < (\\gamma - \\rho)\/\\bar{v}$ for a given $\\rho > 0$, then a $\\gamma$-neighborhood of a sampled state is indeed an over-approximation of a trajectory over the time interval $h$.\nWe now extend the result in Lemma \\ref{lem:cond:inexact:isover} to the case where we need to compute a $\\gamma$-approximation of a polyhedron.\n\n\\begin{lem} \\label{lem:cond:inexact:over}\nGiven a DTLHA $\\A$ and its reached states $\\D_t(\\B_{\\delta}(x_0))$ at some time $t$ from initial states in $\\B_{\\delta}(x_0)$, \nlet $\\rho > 0$ be an upper bound on the approximation errors such that $d_H(\\D_t(\\B_{\\delta}(x_0)), \\hat{\\D}_t(\\B_{\\delta}(x_0))) \\le \\rho$.\nIf a given sampling period $h$ satisfies the following inequality \n\\begin{equation} \\label{eq:lem:cond:inexact:over}\nh < \\frac{\\gamma - \\rho}{\\bar{v}} ,\n\\end{equation}\nthen, for a given $\\gamma$ satisfying $\\gamma > \\rho$, \n\\begin{equation}\n\t\\D_{t+ \\tau}(\\B_{\\delta}(x_0)) \\subset \\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma), \\quad \\forall \\tau \\in [0, h], \n\\end{equation}\n where $\\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma)$ is a $\\gamma$-approximation of $\\hat{\\D}_{t}(\\B_{\\delta}(x_0))$ that is constructed as the convex hull of the set of extreme points of a polyhedral $\\gamma$-neighborhood of all vertices of $\\hat{\\D}_{t}(\\B_{\\delta}(x_0))$ and $\\bar{v}$ is as defined in (\\ref{eq:h:ineq}).\n\\end{lem}\n\\begin{proof}\nLet $\\V$ and $\\hat{\\V}$ be the set of extreme points of $\\D_t(\\B_{\\delta}(x_0))$ and $\\hat{\\D}_t(\\B_{\\delta}(x_0))$, respectively. \nSince $d_H(\\D_t(\\B_{\\delta}(x_0)), \\hat{\\D}_t(\\B_{\\delta}(x_0))) \\le \\rho$ and $\\gamma > \\rho$, it is clear that $\\D_{t}(\\B_{\\delta}(x_0)) \\subset \\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)$.\nFrom Lemma \\ref{lem:cond:inexact:isover}, we know that for each $x(t) \\in \\V$, $x(t+\\tau) \\subset \\B_{\\gamma}(\\hat{x})$ for all $\\tau \\in [0, h]$ where $\\hat{x} \\in \\hat{\\V}$ corresponding to $x(t)$.\nLet $\\V_{t+\\tau}$ be the set of extreme points of $\\D_{t+ \\tau}(\\B_{\\delta}(x_0))$. \nThen $\\V_{t+\\tau} \\subset \\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)$ for all $\\tau \\in [0, h]$ since \n\\begin{inparaenum}[(i)]\n\t\\item for each $x(t) \\in \\V$, $x(t+\\tau) \\subset \\B_{\\gamma}(\\hat{x})$ for all $\\tau \\in [0, h]$ and \n\t\\item from the construction of $\\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)$, $\\B_{\\gamma}(\\hat{x}) \\subset \\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)$ for each $\\hat{x} \\in \\hat{\\V}$.\n\\end{inparaenum}\nTherefore, the convex hull of $\\V_{t+\\tau}$, which is $\\D_{t+ \\tau}(\\B_{\\delta}(x_0))$, has to be contained in $\\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)$ for all $\\tau \\in [0,h]$ since $\\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)$ is convex and $\\V_{t+\\tau} \\subset \\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)$ for all $\\tau \\in [0, h]$.\n\\end{proof}\n\n\nFor (i) in Remark \\ref{rem:cond:inexact}, Lemma \\ref{lem:cond:inexact:eps} below shows that the diameter of a set $\\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma)$ has to be smaller than a given $\\epsilon > 0$.\n\n\n\n\\begin{lem} \\label{lem:cond:inexact:eps}\nGiven $\\epsilon > 0$, $\\delta > 0$, $\\gamma >0$, $\\rho > 0$, and a DTLHA $\\A$, \nsuppose a given sampling period $h > 0$ satisfies the inequality (\\ref{eq:lem:cond:inexact:over}).\nThen $\\D_{[t, t+h]}(x_0) \\subset \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma)$ and $d_H(\\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma), \\D_{[t, t+h]}(x_0)) \\le \\epsilon$, if the following hold:\n\\begin{equation} \\label{eq:lem:cond:inexact:eps}\n\tdia(\\hat{\\D}_t(\\B_{\\delta}(x_0), \\gamma)) \\le \\epsilon,\n\\end{equation}\nwhere $\\D_{[t, t+h]}(x_0)$ is the set of reached states of $\\A$ starting from $x_0$ during the time interval $[t, t+h]$. \n\\end{lem}\n\\begin{proof}\nSince $h$ satisfies (\\ref{eq:lem:cond:inexact:over}), it is trivial to see that $\\D_{[t, t+h]}(x_0) \\subset \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma)$ holds from Lemma \\ref{lem:cond:inexact:over}.\nMoreover, if (\\ref{eq:lem:cond:inexact:eps}) is also true, then for any $z \\in \\D_{[t, t+h]}(x_0)$, $\\max_{y \\in \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma)} \\Vert y - z \\Vert \\le \\epsilon$ since $z \\in \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma)$.\nTherefore, it is clear that $d_H(\\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma), \\D_{[t, t+h]}(x_0)) \\le \\epsilon$ if (\\ref{eq:lem:cond:inexact:over}) and (\\ref{eq:lem:cond:inexact:eps}) hold.\n\\end{proof}\n\nNow we can extend the results of Lemmas \\ref{lem:cond:exact:trans}, \\ref{lem:cond:exact:det}, and \\ref{lem:cond:exact:transv} to incorporate a numerical calculation error $\\rho > 0$.\n\n\\begin{lem} \\label{lem:cond:inexact:istrans}\nGiven $\\rho > 0$, a location $l_c$, and $\\hat{\\D}_t(\\B_{\\delta}(x_0))$ at time $t$,\nif\n\\begin{enumerate}[(i)]\n\\item $\\hat{\\D}_{t-h}(\\B_{\\delta}(x_0),$ $\\rho) \\subset (Inv_c)^{\\circ}$, and\n\\item $\\hat{\\D}_t(\\B_{\\delta}(x_0), \\rho) \\subset Inv_c^C$ \n\\end{enumerate} \nfor some $\\delta > 0$ and $h > 0$, then there is a discrete transition from the location $l_c$ to some other locations.\n\\end{lem}\n\\begin{proof}\nNotice that $d_H(\\D_t(\\B_{\\delta}(x_0)), \\hat{\\D}_t(\\B_{\\delta}(x_0))) \\le \\rho$, which implies $\\D_t(\\B_{\\delta}(x_0)) \\subset \\hat{\\D}_t(\\B_{\\delta}(x_0), \\rho)$.\nSimilarly, $\\D_{t-h}(\\B_{\\delta}(x_0))$ $\\subset \\hat{\\D}_{t-h}(\\B_{\\delta}(x_0), \\rho)$.\nHence if (i) and (ii) hold, then it is clear that $\\D_t(\\B_{\\delta}(x_0)) \\subset Inv_c^C$ and $\\D_{t-h}(\\B_{\\delta}(x_0)) \\subset (Inv_c)^{\\circ}$.\nThen the result follows from Lemma \\ref{lem:cond:exact:trans}. \n\\end{proof}\n\n\\begin{lem} \\label{lem:cond:inexact:det}\nGiven $\\rho > 0$, a location $l_c$, and $\\hat{\\D}_t(\\B_{\\delta}(x_0))$ at time $t$, suppose that a discrete transition from a location $l_c$ to some other locations is determined as in Lemma \\ref{lem:cond:inexact:istrans}.\nThen the discrete transition is a deterministic discrete transition from $l_c$ to $l_n$ if there exists a location $l_n$ such that $l_n \\ne l_c$ and $\\hat{\\D}_t(\\B_{\\delta}(x_0), \\rho) \\subset (Inv_n)^{\\circ}$.\n\\end{lem}\n\\begin{proof}\nNotice that $\\D_{t-h}(\\B_{\\delta}(x_0)) \\subset (Inv_c)^{\\circ}$ from the result in Lemma \\ref{lem:cond:inexact:istrans}.\nSince $\\D_t(\\B_{\\delta}(x_0)) \\subset \\hat{\\D}_t(\\B_{\\delta}(x_0), \\rho)$, if $\\hat{\\D}_t(\\B_{\\delta}(x_0), \\rho) \\subset (Inv_n)^{\\circ}$, then $\\D_t(\\B_{\\delta}(x_0)) \\subset (Inv_n)^{\\circ}$.\nThus by Lemma \\ref{lem:cond:exact:det}, the conclusion holds.\n\\end{proof}\n\n\n\n\n\\begin{lem} \\label{lem:cond:inexact:transv}\nGiven $\\rho > 0$, $\\gamma > 0$ and $h > 0$ satisfying (\\ref{eq:lem:cond:inexact:over}), suppose that a deterministic discrete transition from a location $l_c$ to another location $l_n$ is determined as in Lemma \\ref{lem:cond:inexact:istrans} and Lemma \\ref{lem:cond:inexact:det}, i.e., $\\hat{\\D}_{t-h}(\\B_{\\delta}(x_0), \\rho) \\subset (Inv_c)^{\\circ}$ and $\\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\rho) \\subset (Inv_n)^{\\circ}$.\nThen, for any $\\epsilon > 0$, the discrete transition is transversal if the following conditions hold:\n\\begin{itemize}\n\\item[(i)] $h < (dia(\\hat{\\mathcal{J}}_{c,n})\/2)\/(2 \\bar{v})$, \n \\item[(ii)] $\\D_0(\\hat{\\mathcal{J}}_{c,n}, dia(\\hat{\\mathcal{J}}_{c,n})\/2 + \\rho) \\subset (Inv_c \\cup Inv_n)$, and \n \\item[(iii)] $\\langle \\dot{x}_c, \\vec{n}_c \\rangle \\ge \\epsilon \\land \\langle \\dot{x}_n, \\vec{n}_c \\rangle \\ge \\epsilon,~~\\forall x \\in \\V(\\hat{\\mathcal{J}}_{c,n}')$,\n \\end{itemize}\n %\n where $\\hat{\\mathcal{J}}_{c,n} := \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma + \\rho) \\cap Inv_c \\cap Inv_n$, $\\hat{\\mathcal{J}}_{c,n}' := \\D_0(\\hat{\\mathcal{J}}_{c,n},$ $dia(\\hat{\\mathcal{J}}_{c,n})\/2 + \\rho) \\cap Inv_c \\cap Inv_n$, $ \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma + \\rho)$ is a $(\\gamma + \\rho)$-approximation of $ \\hat{\\D}_{t}(\\B_{\\delta}(x_0))$, and $\\dot{x}_i$ and $\\vec{n}_c$ are as defined in Lemma \\ref{lem:cond:exact:transv}. \n\\end{lem}\n\\begin{proof}\nNotice that $\\D_{t}(\\B_{\\delta}(x_0), \\gamma) \\subset \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\gamma + \\rho)$.\nThen, by the definition of $\\mathcal{J}_{c,n}$ given in Lemma \\ref{lem:cond:exact:transv} and $\\hat{\\mathcal{J}}_{c,n}$, we know $\\mathcal{J}_{c,n} \\subset \\hat{\\mathcal{J}}_{c,n}$.\nHence, $\\hat{\\mathcal{J}}_{c,n} \\ne \\emptyset$ since $\\mathcal{J}_{c,n} \\ne \\emptyset$ by the construction of $\\mathcal{J}_{c,n}$.\nNow if (i) holds, then it is easy to see that $\\D_{\\tau}(\\hat{\\mathcal{J}}_{c,n}) \\subset \\D_0(\\hat{\\mathcal{J}}_{c,n}, dia(\\hat{\\mathcal{J}}_{c,n})\/2)$ for $\\tau \\in (0, h)$.\nMoreover, (ii) and (iii) imply that $\\D_{\\tau}(\\hat{\\mathcal{J}}_{c,n})$ is in fact contained in $Inv_n^{\\circ}$ for $\\tau \\in (0, h)$.\n\\end{proof}\n\n\n\n\n\n\\section{Architecture and Algorithm for Bounded $\\epsilon$-Reach Set Computation of a DTLHA} \\label{sec:design}\n\nWe are now in a position to propose an algorithm for bounded $\\epsilon$-reach set computation of a DTLHA.\nBefore proving its correctness, we first describe its architecture.\n\n\n\nFor \\emph{flexibility}, we decouple the higher levels of the algorithm, called \\emph{Policy}, from the component, called \\emph{Mechanisms}, where specific steps of calculations are performed through some numerical routines.\nThe proposed architecture of the algorithm, shown in Fig. \\ref{fig:arch}, consists of roughly five different components \\emph{Policy}, \\emph{Mechanism}, \\emph{System Description}, \\emph{Data}, and \\emph{Numerics}.\nA more detailed explanation of each of these modules is given below. \n\n\n\\begin{figure}\n\\begin{center}\n\\includegraphics[width = 9cm]{arch4algo.png} \n\\caption{An architecture for bounded $\\epsilon$-reach set computation.}\n\\label{fig:arch}\n\\end{center}\n\\end{figure}\n\n\nThe System Description contains all information describing a problem of a bounded $\\epsilon$-reach set computation of a DTLHA.\nThis consists of $\\X$, the domain of continuous state space, a DTLHA $\\A$, and an initial condition $(l_0, x_0) \\in \\mathbb{L} \\times \\X$. \nAlso, an upper bound $T \\in \\mathbb{R}^+$ on terminal time, an upper bound $N \\in \\mathbb{N}$ on the total number of discrete transitions, and an approximation parameter $\\epsilon > 0$, are described.\nA bounded $\\epsilon$-reach set of a DTLHA $\\A$ is computed in the Mechanism component based on a given set of numerical calculation algorithms in Numerics, as well as a given Policy, which captures some of the higher level choices of the algorithm's outer loops. \nIn the Data component, all computation data that is relevant to a computed bounded $\\epsilon$-reach set, generated on-the-fly in the Mechanism part, are stored. \nEach of the functions in Numerics is in fact an implementation of some numerical computation algorithms. \nAs an example, $e^{At}$ can be computed in many different ways as shown in \\cite{moler:78} and each of the different algorithms can compute the value with a certain accuracy. \nHere we assume that a set of such numerical computation algorithms for basic calculations are given\\footnote{In this way, we decouple the low-level numerical calculations from our bounded $\\epsilon$-reach set algorithm. This is the reason why the Numerics component is represented separately from the Mechanism component.} \nand the corresponding approximation error bounds, i.e., $\\sigma_e, \\sigma_i, \\mu_c$, and $\\mu_h$, are known a priori.\nThe Policy component represents a user-defined rules that choose appropriate values of the parameters, especially $\\delta > 0$, $\\gamma > 0$, and $h > 0$, which are needed to continue to compute a bounded $\\epsilon$-reach set of a DTLHA, when a bounded $\\epsilon$-reach set algorithm in Mechanism fails to determine some events or to satisfy some required properties, during its computation.\nThe Mechanism component represents the core of the bounded $\\epsilon$-reach set algorithm based on the theoretical results in Section \\ref{sec:theory} and \\ref{sec:cond}, and is detailed in Section \\ref{sec:design:algo}. \nGiven values for parameters $\\delta > 0$, $\\gamma > 0$, and $h > 0$, it computes a bounded $\\epsilon$-reach set of a DTLHA $\\A$ until it either successfully finishes its computation or cannot make further progress, which happens when some required conditions or properties are not met.\nNotice that, as stated in Section \\ref{sec:cond}, there are a set of conditions and properties that a computed set needs to satisfy to be a correct bounded $\\epsilon$-reach set.\nIf the algorithm fails to resolve a computation, then it returns to Policy indicating the problems so that a user-defined rule in Policy can choose another set of values for the parameters to resolve the problems.\nEvery computation result is stored in the Data component to be possibly used later in Policy and Mechanism.\n\n\n\n\n\\subsection{Core Algorithm for Bounded $\\epsilon$-Reach Set of a DTLHA} \\label{sec:design:algo}\n\n\n\n\n\nAn algorithm to compute a bounded $\\epsilon$-reach set of a DTLHA is proposed and shown in Algorithm \\ref{alg:main}.\nLet $k$ indicate a computation step of the algorithm from which the proposed algorithm starts its bounded $\\epsilon$-reach set computation.\nAll computation history up to the $(k-1)$-th computation step is stored as data, called {\\tt Reached}, in Data part.\nThen, given an input $(k, \\delta_k, \\gamma_k, h_k)$ from Policy, the algorithm first retrieves the computation data at the $(k-1)$-th computation step from {\\tt Reached} and starts its $k$-th computation step using this data.\nAs shown in Algorithm \\ref{alg:main}, the algorithm continues its computation until it either\n\\begin{inparaenum}[(i)]\n\t\\item returns {\\tt done} when it successfully finished to compute a bounded $\\epsilon$-reach set or\n\t\\item returns {\\tt error} when it encounters some erroneous situations during the execution of a function, called {\\tt Post()}.\n\\end{inparaenum}\nIf the algorithm returns an {\\tt error}, it also indicates the cause of the {\\tt error} so that a user-defined rule in Policy can choose appropriate values for the input parameters.\n\n\n\\begin{algorithm} \n\\SetAlgoLined \n\\BlankLine\n\\KwIn{$k, \\delta_k, \\gamma_k, h_k$ from Policy} \n\\BlankLine\n\\Compute $\\mu_x$ from $(\\sigma_e, \\sigma_i)$\\\\\n\\BlankLine\n\\While{\\True} {\n\\Get data at $(k-1)$-th step from \\Reached \\\\\n\\If{$\\delta_k \\ne \\delta_{k-1}$} {\n\t\\Compute $\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$\\\\\n\t\\Update $\\rho_{k-1}$\n}\n$t_k \\leftarrow t_{k-1}+h_k$\\\\\n\\Call \\Post \\\\\n\\Store $k$-th computation data into \\Reached \\\\\n$k \\leftarrow k+1$\\\\\n\\lIf{$(t_k \\ge T) \\lor (\\Jump \\ge N)$}{\\Return \\Done}\n}\n\\BlankLine\n\\caption{An algorithm for bounded $\\epsilon$-reach set computation of a DTLHA.}\n\\label{alg:main}\n\\end{algorithm}\n\n\\begin{algorithm}\n\\SetAlgoLined \n\\BlankLine\n\\KwIn{$h_k, \\gamma_k, l_{k-1}, \\rho_{k-1}, \\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$} \n\\BlankLine\n\\Compute $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ from $\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$\\\\\n\\Compute $ \\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0),\\gamma_k)$ from $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$\\\\\n\\Update $\\rho_k \\leftarrow \\rho_{k-1} + \\mu_x$\\\\\n\\BlankLine\n\\lIf{$h_k \\ge (\\gamma_k - \\rho_k)\/\\bar{v}$}{\\Return \\Err}\\\\\n\\lIf{$dia(\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)) \\ge \\epsilon$} {\\Return \\Err} \\\\\n\\uIf{$\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0)) \\cap Inv(l_{k-1}) = \\emptyset$}{\n\t\\If{$\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0)) \\subset Inv(l_{k-1})^{\\circ}$} {\n\t\t\\uIf{$\\Deterministic \\land \\Transversal$}{\n\t\t\t\\Update $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ and $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$\n\t\t\t\\Update $\\rho_k \\leftarrow \\rho_k + \\mu_x + \\mu_c + \\mu_h$\\\\\n\t\t\t\\Update $l_k$\\\\\n\t\t\t \\Jump $\\leftarrow$ \\Jump + 1\n\t\t}\n\t\t\\lElse{\\Return \\Err}\n\t}\n}\n\\uElseIf{$\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0)) \\not\\subset Inv(l_{k-1})^{\\circ}$}{\\Return \\Err}\n\\lElse{$l_k \\leftarrow l_{k-1}$}\n\\BlankLine\n\\caption{A function {\\tt Post()}.}\n\\label{alg:post}\n\\end{algorithm}\n\n\nIn the proposed algorithm in {\\tt Post()}, $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ is computed from $\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$ as follows:\n\nGiven a polyhedron $\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$, we first compute the set of the vertices of $\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$ that is denoted as $\\V$.\nThen for each $v_i \\in \\V$, we compute \n\\[\n\tv_i(h_k) := e^{A_k h_k} v_i + \\int_0^{h_k} e^{A_k s} u_k ds\n\\] \nwhere $A_k$ and $u_k$ are given by the linear dynamics of a location $l_k$ on which the linear image of $\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$ is computed at the $k$-the computation step in Algorithm \\ref{alg:main}. \nIf we let $\\V_h := \\{v_i(h_k) : v_i \\in \\V \\}$, then we can compute $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ as follows: \n\\[\n\t\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0)) := hull(\\V_h)\n\\]\nwhere $hull(\\V_h)$ is the convex hull of $\\V_h$. \n\nOnce we have $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$, we compute $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$ in the following way.\nTo compute $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$ for a given $\\gamma_k$, we first construct a hypercubic $\\gamma_k$-neighborhood of $v_i(h_k)$ for each $v_i(h_k) \\in \\V_h$.\nLet $\\B_{\\gamma_k}(v_i(h_k))$ be such a $\\gamma_k$ hypercubic neighborhood of $v_i(h_k)$ and $\\V_{h}^{\\gamma}$ be the set of vertices of $\\B_{\\gamma_k}(v_i(h_k))$ for all $v_i(h_k) \\in \\V_h$.\nThen we can compute $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$ as follows:\n\\begin{equation} \\label{sec:design:algo:hull}\n\t\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k) := hull(\\V_h^{\\gamma}).\n\\end{equation}\n\nThis process of polyhedral image computation under a linear dynamics is illustrated in Fig. \\ref{fig:post:linear}.\nWe now show that $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$ that is computed as in (\\ref{sec:design:algo:hull}) is indeed a $\\gamma_k$-approximation of $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ for a given $\\gamma_k$.\n\n\n\n\n\\begin{figure} [htbp]\n\\begin{center}\n\t\\includegraphics[width=8cm]{linear_image.png}\n\\caption{The image computation under a linear dynamics.}\n\\label{fig:post:linear}\n\\end{center}\n\\end{figure}\n\n\n\n\n\\begin{lem}\nLet $\\H$ be the convex hull of $\\V_h^{\\gamma}$. \nThen $\\H$ is exactly the closed $\\gamma$-neighborhood of the convex hull of $\\V_h$.\n\\end{lem}\n\\begin{proof}\nSuppose $\\bar{w} \\in \\H$ and $\\bar{w} \\not\\in hull(\\V_h)$.\nThen $\\bar{w} = \\lambda \\bar{y}_1 + (1-\\lambda)\\bar{y}_2$ for some $\\bar{y}_1$ and $\\bar{y}_2$ such that $\\Vert \\bar{y}_1 - v_1 \\Vert \\le \\gamma$ and $\\Vert \\bar{y}_2 - v_2 \\Vert \\le \\gamma$ for some $v_1, v_2 \\in \\V_h$ and $0 \\le \\lambda \\le 1$.\nThen there exists $v = \\lambda v_1 + (1-\\lambda)v_2 \\in hull(\\V_h)$ such that\n\\begin{eqnarray} \\nonumber\n\\Vert \\bar{w} -v \\Vert &=& \\Vert \\lambda(\\bar{y}_1 - v_1) + (1-\\lambda)(\\bar{y}_2 - v_2) \\Vert \\nonumber \\\\\n&\\le& \\lambda \\Vert \\bar{y}_1 - v_1 \\Vert + (1-\\lambda) \\Vert \\bar{y}_2 - v_2 \\Vert \\nonumber \\\\\n&\\le& \\gamma. \\nonumber\n\\end{eqnarray}\nThus $\\bar{w}$ is in the $\\gamma$-neighborhood of the convex hull of $\\V_h$.\n\nFor the converse, consider $\\bar{z}$ in the $\\gamma$-neighborhood of the convex hull of $\\V_h$.\nThen for some $\\lambda_i \\ge 0$, $\\sum_i \\lambda_i = 1$, $\\Vert \\bar{z} - \\sum_i \\lambda_i v_i(h) \\Vert \\le \\gamma$, where $v_i(h) \\in \\V_h$.\nLet $s := \\bar{z} - \\sum_i \\lambda_i v_i(h)$.\nNow $\\bar{z} = \\sum_i \\lambda_i(v_i(h) + s)$.\nSo $\\bar{z}$ is in the convex hull of $\\lbrace v_i(h) + s \\rbrace$.\nHowever each $v_i(h) + s \\in \\B_{\\gamma}(v_i(h))$.\nHence each $v_i(h) + s$ is in the convex hull of the vertices of $\\B_{\\gamma}(v_i(h))$ which is $\\H$.\nThus $\\bar{z}$ is in $\\H$.\n\\end{proof}\n\n\n\nNotice that the first update of $\\rho_k$ in {\\tt Post()} is due to the computation of $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ from $\\hat{\\D}_{t_{k-1}}(\\B_{\\delta_k}(x_0))$ over the time interval $h_k$ under the linear dynamics of $l_{k-1}$.\nThe second update after a deterministic and transversal discrete transition is due to a series of computations from $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ that is used to determine such a discrete transition to a new $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ that represents a reached states at time $t_k$ right after a deterministic and transversal discrete transition.\nAs described in Lemma \\ref{lem:cond:inexact:transv}, the steps involved during this discrete transition are to compute\n\\begin{inparaenum}[(i)]\n\t\\item $\\hat{\\mathcal{J}}_{c,n}$ from $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ and\n\t\\item $\\D_{h_k}(\\hat{\\mathcal{J}}_{c,n})$ from $\\hat{\\mathcal{J}}_{c,n}$. \n\\end{inparaenum}\nNotice that (i) requires an intersection between a hyperplane and a polyhedron as well as a convex hull computation.\nMoreover, for (ii), we need to compute a polyhedral image under the linear dynamics of a new location that is determined in {\\tt Post()}.\nRecall that we have derived a set of conditions in Lemmas \\ref{lem:cond:inexact:istrans}, \\ref{lem:cond:inexact:det}, and \\ref{lem:cond:inexact:transv} to determine a deterministic and transversal discrete transition event.\nThese conditions are used in {\\tt Post()} to determine such an event.\nFurthermore, we also use conditions derived in Lemmas \\ref{lem:cond:inexact:over} and \\ref{lem:cond:inexact:eps}, to ensure that a set $\\hat{\\R}_{t_f}(\\B_{\\delta}(x_0), \\gamma)$, which can be constructed as a collection of $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$ as shown in the following theorem, satisfies the properties given in Remark \\ref{rem:cond:inexact}.\n\n\n\nNow, we present our main result for the problem of computing a bounded $\\epsilon$-reach set of a DTLHA.\n\n\n\\begin{thm}\nGiven input $(\\X, \\A, l_0, x_0, T,$ $N, \\epsilon)$ for a problem to compute a bounded $\\epsilon$-reach set of a DTLHA $\\A$, \nif Algorithm \\ref{alg:main} returns {\\tt done}, then a bounded $\\epsilon$-reach set of a DTLHA $\\A$ defined over the continuous state domain $\\X$ starting from an initial condition $(l_0, x_0) \\in \\mathbb{L} \\times \\mathbb{R}^n$, denoted as $\\hat{\\R}_{t_f}(x_0, \\epsilon)$, is the following:\n\\begin{equation}\n\\hat{\\R}_{t_f}(x_0, \\epsilon) := \\bigcup_{k = 1}^{K} \\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0),\\gamma_k),\n\\end{equation}\nfor some $K \\in \\mathbb{N}$ where $t_f := \\min \\{T, \\tau_N \\}$ and $\\tau_N$ is the time at the $N$-th discrete transition. \n\\end{thm}\n\\begin{proof}\nFor each $k \\le K$, \n\\begin{inparaenum}\n\\item[(i)] $\\gamma_k, h_k, \\rho_k$ satisfies Lemma \\ref{lem:cond:inexact:over}, and \n\\item[(ii)] $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0),\\gamma_k)$ satisfies Lemma \\ref{lem:cond:inexact:eps}. \n\\end{inparaenum}\nHence $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$ is guaranteed to satisfy \n$\\D_{[t, t+h]}(x_0) \\subset \\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k)$ and $d_H(\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k), \\D_{[t, t+h]}(x_0)) \\le \\epsilon$.\nFurthermore, if a deterministic and transversal discrete transition is detected at the $k$-th step by $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$, then\n\\begin{inparaenum}\n\t\\item[(iii)] by Lemmas \\ref{lem:cond:inexact:istrans}, \\ref{lem:cond:inexact:det}, and \\ref{lem:cond:inexact:transv}, there is in fact a deterministic and transversal discrete transition in $(t_{k-1}, t_k)$. \n\\end{inparaenum}\nThis implies that a deterministic and transversal discrete transition event is correctly determined. \nFinally, if the proposed algorithm returns {\\tt done}, then this implies that \n\\begin{inparaenum}\n\t\\item[(iv)] either $t_k \\ge T$ or ${\\tt jump} \\ge N$. \n\\end{inparaenum}\nHence, $t_f$ is $\\min \\{ T, \\tau_N\\}$.\nTherefore, $\\R_{t_f}$ is a bounded $\\epsilon$-reach set of $\\A$ from $x_0$ by (i), (ii), (iii), and (iv).\n\\end{proof}\n\n\n\n\n\\section{Optimization and Implementation of the Proposed Algorithm} \\label{sec:imp}\n\nA prototype software tool has been implemented, based on the architecture and the algorithm proposed in Section \\ref{sec:design}, to demonstrate the idea of a bounded $\\epsilon$-reach set computation. \nIn our implementation, we use the Multi-Parametric Toolbox \\cite{mpt} for polyhedral operations and also use some built-in Matlab functions for other calculations. \n\n\nNotice that the size of the $\\hat{\\D}_t(\\B_{\\delta}(x_0))$ right after a discrete transition increases roughly by the amount $\\gamma$ through the computation of $\\hat{\\mathcal{J}}_{c,n}$. \nThis can potentially affect the capability to determine a discrete transition event.\nHence, we determine a smaller value of $\\gamma$ to construct a tighter over-approximation of a discrete transition state. \nSuppose that a discrete transition from a location $l_i$ to some other location $l_j$ has already been determined by the proposed algorithm for given $h > 0$, $\\hat{\\D}_{t-h}(\\B_{\\delta}(x_0), \\rho)$, and $\\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\rho)$ at some time $t$.\nThen the procedure for construction of a tight over-approximation of a discrete transition state $x(\\tau_k)$ for some $\\tau_k \\in (t-h, t)$ can be improved shown in Algorithm \\ref{alg:opt}.\n\n\n\\begin{algorithm}\n\\SetAlgoLined \n\\BlankLine\n1. Partition the time interval $[t-h, t]$ into a finite sequence of $\\{ I_m \\}_{m=1}^M$ for some $M \\in \\mathbb{N}$, where\n\\[ I_m : = [t-h +(m-1) \\cdot \\Delta h, t-h + m \\cdot \\Delta h] \\]\nfor some $\\Delta h \\ll h$. \\\\\n\\BlankLine\n2. Find a time $\\tau := t-h + m \\cdot \\Delta h \\in (t-h, t)$ such that \n\t\\begin{itemize}\n\t\t\\item $volume(\\P_{\\tau}^i) > volume(\\P_{\\tau}^j)$ and\n\t\t\\item $volume(\\P_{\\tau + \\Delta h}^i) < volume(\\P_{\\tau + \\Delta h}^j)$, \n\t\\end{itemize}\n\twhere $\\P_t^k := Inv_k \\cap \\hat{\\D}_{t}(\\B_{\\delta}(x_0), \\rho)$. \\\\\n\\BlankLine\n3. Construct $\\hat{\\D}_{\\tau+\\Delta h}(\\B_{\\delta}(x_0), \\gamma' + \\rho)$ where $\\gamma' > \\Delta h \\cdot \\bar{v}$. \\\\\n\\BlankLine\n4. Compute an over-approximate discrete transition state\n\\[ \\hat{\\mathcal{J}}_{i,j} := \\hat{\\D}_{\\tau+\\Delta h}(\\B_{\\delta}(x_0), \\gamma' + \\rho) \\cap Inv_i \\cap Inv_j. \\]\n\\caption{A procedure to compute a tight over-approximation of discrete transition state.}\n\\label{alg:opt}\n\\end{algorithm}\n\n\n\n\\subsection{An Example of Bounded $\\epsilon$-Reach Set Computation} \\label{sec:imp:example}\n\nAs an example to evaluate the proposed algorithm for a bounded $\\epsilon$-reach set computation of a DTLHA $\\A$, we consider an LHA $\\A := (\\mathbb{L}, Inv, A, u, \\xrightarrow{G})$ over a continuous state space $\\X := [-8, 8] \\times [-8, 8] \\subset \\mathbb{R}^2$ where\n\\begin{enumerate}[(i)]\n\t\\item $\\mathbb{L} = \\{Up, Down,$ $Left, Right \\}$,\n\t\\item $A(l)$ and $u(l)$ for each location $l \\in \\mathbb{L}$ are defined as shown in Table \\ref{tab:ex:Au}, \n\t\\item The invariant set for each location $l \\in \\mathbb{L}$, $Inv(l)$, is defined as shown in Fig. \\ref{fig:eg:rho}, and\n\t\\item $\\xrightarrow{G}$ holds at the intersection between invariant sets of different locations. \n\\end{enumerate}\n\nNotice that all the LTI dynamics defined in the given LHA $\\A$ are asymptotically stable.\nMoreover, from the the vector fields determined by $A(l)$ and $u(l)$ for each $l \\in \\mathbb{L}$, every discrete transition which occurs along the boundary of the invariant set between different locations is deterministic and transversal. \nHence the given LHA $\\A$ is in fact a DTLHA.\n\n\n\n\\begin{table}[htdp]\n\\caption{$A(l)$ and $u(l)$ for each $l \\in \\mathbb{L}$ of $\\A$}\n\\begin{center}\n{\\small\n\\begin{tabular}{c|p{0.15\\textwidth}|c}\n\\toprule\n$l$ & \\centering{$A(l)$} & $u(l)$ \\\\ \n\\midrule\n$UP$ & \\centering{$\\begin{pmatrix} -0.2 & -1 \\\\ 3 & -0.2 \\end{pmatrix}$} & $\\begin{pmatrix} 0.1 \\\\ 0.1 \\end{pmatrix}$ \\\\ \n$DOWN$ & \\centering{$\\begin{pmatrix} -0.2 & -1 \\\\ 3 & -0.2 \\end{pmatrix}$} & $\\begin{pmatrix} -0.2 \\\\ -0.2 \\end{pmatrix}$ \\\\ \n$LEFT$ & \\centering{$\\begin{pmatrix} -0.2 & -3 \\\\ 1 & -0.2 \\end{pmatrix}$} & $\\begin{pmatrix} 0.15 \\\\ 0.15 \\end{pmatrix}$ \\\\ \n$RIGHT$ & \\centering{$\\begin{pmatrix} -0.2 & -3 \\\\ 1 & -0.2 \\end{pmatrix}$} & $\\begin{pmatrix} 0.3 \\\\ 0.3 \\end{pmatrix}$ \\\\ \n\\bottomrule\n\\end{tabular}\n}\n\\end{center}\n\\label{tab:ex:Au}\n\\end{table}%\n\nThe bounded $\\epsilon$-reach set computation problem is specified by $(\\A, l_0, x_0, T, N, \\epsilon)$ where $l_0 = Up$, $x_0 = (2.5, 6)^T$, $T = 20$ sec., $N = 10$, and $\\epsilon = 0.5$.\n\nIn this example, we also assume that numerical calculation algorithms are available for basic calculations defined in Section \\ref{sec:cond:basic} such that $a(e^{At}, \\rho)$, $a(\\int_{0}^{t} e^{A \\tau} d \\tau, \\rho)$, $a(\\H \\cap \\P, \\rho)$, and $a(hull(\\V), \\rho)$ where $\\rho$ is specified as $10^{-15}$.\n\n\n\\begin{figure}\n\\begin{center}\n\t\\includegraphics[width=8.5cm]{case_02_loc.png}\n\\caption{A bounded $\\epsilon$-reach set of a DTLHA $\\A$ starting from $(Up, [2.5, 6]^T)$.}\t\n\\label{fig:eg:rho}\n\\end{center}\n\\end{figure}\n\n\n\nA policy that is used to choose values for $(k, \\delta_k, \\gamma_k, h_k)$ is as follows:\n\\begin{enumerate}[(i)]\n\t\\item $k$ is chosen in non-decreasing manner, \n\t\\item $\\delta_k := 10^{-5}$ to define a fixed sufficiently small $\\B_{\\delta}(x_0)$,\n\t\\item $\\gamma_k := (\\epsilon - dia(\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\rho_k)))\/2$, and\n\t\\item $h_k := (\\gamma_k\/2)\/ \\bar{v}$ where $\\bar{v}$ is as defined in (\\ref{eq:h:ineq}).\n\\end{enumerate}\nNotice that (i) means that whenever the proposed $\\epsilon$-reach set algorithm fails to continue its computation at the $k$-th computation step, then the policy decides to restart the computation from the $k$-th step with different values of the other parameters.\nRecall that $\\rho_k$ denotes the approximation error of $\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0))$ when the algorithm computes $\\D_{t_k}(\\B_{\\delta_k}(x_0))$ at time $t_k$.\nAs shown in (iii), for a given $\\epsilon$, the policy chooses the largest value of $\\gamma_k$ at each computation step.\nThe equation for $\\gamma_k$ given in (iii) can easily be derived by considering \n\\begin{equation} \\nonumber\n\tdia(\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\gamma_k + \\rho_k)) \\le dia(\\hat{\\D}_{t_k}(\\B_{\\delta_k}(x_0), \\rho_k)) + 2 \\gamma_k.\n\\end{equation}\nIf we upper bound the right hand side by $\\epsilon$, then we have (iii).\n\n\nFig. \\ref{fig:eg:rho} shows the computation result.\nAs shown in Fig. \\ref{fig:eg:rho}, a bounded $\\epsilon$-reach set is successfully computed.\nIn this example, the algorithm terminates at the computation step $k = 2259$ right after the algorithm makes the tenth discrete transition from locations $Left$ to $Down$ at the time $t = 12.1415$ sec. and {\\tt jump $= 10$}.\nFor given $\\rho := 10^{-15}$, the accumulated numerical calculation error $\\rho_k$ for $\\D_{t_k}(\\B_{\\delta_k}(x_0))$ at this termination time is $2.5638 \\times 10^{-11}$.\n\n\n\n\n\\section{Conclusion} \\label{sec:con}\nWe have defined a special class of hybrid automata, called Deterministic and Transversal Linear Hybrid Automata (DTLHA), for which we can address the problem of bounded $\\epsilon$-reach set computation starting from an initial state.\nFor this class, we can also incorporate the impact of numerical calculation errors caused by finite precision numerical computation.\n\nIt is of importance to determine more general and useful models of hybrid systems that permit computational verification of safety properties. Hybrid linear systems that incorporate linear models widely employed in control systems are a natural candidate around which to build such a theory of verification and validation.\n\n\n\n\n\n\n\n\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}}