# Dyck paths with catastrophes modulo the positions of a given pattern

Jean-Luc Baril  LIB, Université de Bourgogne Franche-Comté
B.P. 47 870, 21078 Dijon Cedex France
E-mail<EMAIL_ADDRESS>Sergey Kirgizov  LIB,
Université de Bourgogne Franche-Comté
B.P. 47 870, 21078 Dijon Cedex France
E-mail<EMAIL_ADDRESS>Armen Petrossian  ESEO Paris
78140 Vélizy-Villacoublay
E-mails<EMAIL_ADDRESS>
###### Abstract

For any pattern $p$ of length at most 2, we provide generating functions and
asymptotic approximations for the number of $p$-equivalence classes of Dyck
paths with catastrophes, where two paths of the same length are $p$-equivalent
whenever the positions of the occurrences of the pattern $p$ are the same.

Keywords: Dyck path with catastrophes, equivalence relation, pattern,
enumeration, generating function.

##  1 Introduction and notation

A _Dyck path with catastrophes_ is a lattice path in the first quadrant of the
$xy$-plane that starts at the origin, ends on the $x$-axis, and is made of up-
steps $U=(1,1)$, down-steps $D=(1,-1)$, and catastrophe steps $C_{k}=(1,-k)$,
$k\geqslant 2$, so that catastrophe steps always end on the $x$-axis.
Depending on the context, we can use the symbol $C$ to design a catastrophe
step, and by convenience we use $C_{1}=D$. We let $\mathcal{E}$ denote the set
of all Dyck paths with catastrophes, and $\mathcal{D}$ be the set of _Dyck
paths_ , i.e. the paths in $\mathcal{E}$ that do not contain any catastrophe
steps $C_{k}$, $k\geqslant 2$. The _length_ $|P|$ of a path $P$ is the number
of its steps. The empty path is denoted by $\epsilon$. See Figure 1 for an
example of a Dyck path with catastrophes of length $14$. A pattern consists of
consecutive steps in a path. We will say that an occurrence of a pattern (or
for short a pattern) is at position $i\geqslant 1$ in a path whenever the
first step of the pattern appears at the $i$-th step of the path, the second
step at the $(i+1)$-st step, and so on. The height of an occurrence of a
pattern is the minimal ordinate reached by its points. For instance, the Dyck
path with catastrophes $P=UUC_{2}UUUDUDDUC_{2}UD$ contains three occurrences
of the pattern $UU$ at positions $1$, $4$ and $5$, and the heights of these
occurrences are respectively $0$, $0$ and $1$.

$C_{2}$$C_{2}$

Figure 1: Dyck path with catastrophes $UUC_{2}UUUDUDDUC_{2}UD$.

The concept of a Dyck path with catastrophes was first introduced by Krinik et
al. in [9] in the context of queuing theory. These paths correspond to the
evolution of a queue by allowing some resets modeled by a catastrophe step
$C_{k}$, $k\geqslant 2$. Then, Banderier and Wallner [1] provided enumerative
results and limit laws of these objects. They showed how any non empty path
$P\in\mathcal{E}$ can be decomposed either as $P=U\alpha D\beta$, or
$P=U\alpha_{1}U\alpha_{2}\ldots U\alpha_{k}C_{k}\beta$ for some $k\geqslant
2$, where $\alpha,\alpha_{1},\alpha_{2},\ldots,\alpha_{k}$ are Dyck paths in
$\mathcal{D}$ and $\beta\in\mathcal{E}$. They deduced a functional equation
for the generating function $E(x)=\sum_{n\geqslant 0}e_{n}x^{n}$ where $e_{n}$
is the number of paths of length $n$ in $\mathcal{E}$, with the solution

$E(x)=\frac{2x-1+\sqrt{1-4\,{x}^{2}}}{x-1+(1+x)\sqrt{1-4\,{x}^{2}}}.$

The sequence $(e_{n})_{n\geqslant 0}$ corresponds to A224747 in the On-line
Encyclopedia of Integer Sequences (OEIS) [12], and the first values for
$n\geqslant 0$ are $1,0,1,3,5,12,23,52,105,232,480$. More recently, Baril and
Kirgizov [4] exhibited a one-to-one correspondence between Dyck paths with
catastrophes of length $n$ and Dyck paths of length $2n$ avoiding $UUU$ and
$DUD$ at height at least one, and where every occurrence of $UD$ on the
$x$-axis appears before (but not necessarily contiguous with) an occurrence of
$UUU$.

On the other hand, in [2, 3, 4, 5, 6, 10] the authors investigated equivalence
relations on the sets of Dyck paths, Motzkin paths, skew Dyck paths,
Łukasiewicz paths, and Ballot paths where two paths of the same length are
equivalent whenever they coincide on all occurrences of a given pattern. The
main goal of this study consists in extending these studies for Dyck paths
with catastrophes by considering the analogous equivalence relation on
$\mathcal{E}$.

###### Definition 1.1

Two Dyck paths of the same length and with catastrophes are $p$-equivalent
whenever they have the same positions of the occurrences of the pattern $p$.

For instance, the path $UUDUUC_{3}$ is $U$-equivalent to $UUC_{2}UUC_{2}$
since the occurrences of $U$ appear at the same positions in the two paths.

Then, one may naturally split the set $\mathcal{E}$ into $p$-equivalence
classes, which are constructed so that paths $P$ and $Q$ in $\mathcal{E}$
belong to the same $p$-equivalence class if, and only if, they are
$p$-equivalent.

In this paper, we provide ordinary generating functions (o.g.f. for short) for
the number of $p$-equivalence classes in $\mathcal{E}$ with respect to the
length whenever $p$ is a pattern of length at most two. Our method consists in
providing one-to-one correspondences between equivalence classes and certain
subsets of $\mathcal{E}$ (called subsets of representative elements) and
enumerating them using algebraic techniques. Remark that only one pattern of
size 2, namely $DD$, gives a non-rational generating function. For this
pattern, the construction of a set of representative elements and its
enumeration are quite intricate and handled in the last subsection of the
paper. We refer to Table 1 for an overview of our results.

Pattern | OEIS [12] | Sequences for $a_{n}$, $2\leqslant n\leqslant 10$, and formulæ | Theorem | O.g.f.
---|---|---|---|---
$U$ |  Shift of A037952 |  1, 1, 3, 4, 10, 15, 35, 56, 126, … $\displaystyle{n-1\choose{\lfloor\frac{n-2}{2}\rfloor}}$ | Thm 2.2 | Algebraic
$D$ | New |  1, 1, 3, 5, 11, 21, 42, 84, 162, … $\begin{cases}\displaystyle{n\choose\frac{n-3}{2}}&\text{ if }n\text{ is odd,}\\\ \displaystyle{n\choose\frac{n-4}{2}}+{n\choose\frac{n}{2}}/\left(\frac{n}{2}+1\right)&\text{ otherwise}\end{cases}$ | Thm 2.4
$C$ | A212804 |  1, 1, 2, 3, 5, 8, 13, 21, 34, … $\begin{cases}c_{n}=c_{n-1}+c_{n-2},\\\ c_{0}=1,c_{1}=0\end{cases}$ | Thm 2.6 |
$UU$ | A347493 |  1, 1, 3, 4, 8, 13, 24, 41, 75, … $\begin{cases}f_{n}=f_{n-1}+f_{n-2}+f_{n-4},\\\ f_{0}=1,f_{1}=0,f_{2}=1,f_{3}=1\end{cases}$ | Thm 3.2
$UD$ | A215004 |  1, 1, 3, 5, 10, 17, 30, 50, 84, … $\begin{cases}g_{n}=2g_{n-1}+g_{n-2}-3g_{n-3}+g_{n-5},\\\ g_{1}=0,g_{0}=g_{2}=g_{3}=1,g_{4}=3\end{cases}$ | Thm 3.4
$UC$ | New |  1, 1, 2, 4, 5, 9, 15, 24, 40, … $\begin{cases}i_{n}=2i_{n-1}-i_{n-2}+i_{n-3}-i_{n-4}+i_{n-5}-i_{n-6}+i_{n-7},\\\ i_{0}=1,i_{1}=0,i_{2}=1,i_{3}=1,i_{4}=2,i_{5}=4,i_{6}=5\end{cases}$ | Thm 3.6 | Rational
$DC$ | New |  1, 1, 1, 2, 2, 4, 6, 9, 14, … $\begin{cases}j_{n}=2j_{n-1}-j_{n-2}+j_{n-5}-j_{n-6}+j_{n-7},\\\ j_{0}=1,j_{1}=0,j_{2}=j_{3}=j_{4}=1,j_{5}=2,j_{6}=2\end{cases}$ | Thm 3.8 |
$CU$ |  Shift of  A000045 |  1, 1, 1, 2, 3, 5, 8, 13, 21, … $\begin{cases}k_{n}=k_{n-1}+k_{n-2},\\\ k_{0}=1,k_{1}=0,k_{2}=k_{3}=k_{4}=1\end{cases}$ | Thm 3.10 |
$DU$ | A212804 |  1, 1, 2, 3, 5, 8, 13, 21, 34, … $\begin{cases}\ell_{n}=\ell_{n-1}+\ell_{n-2},\\\ \ell_{0}=1,\ell_{1}=0,\ell_{2}=1\end{cases}$ | Thm 3.12 |
$DD$ | New |  1, 1, 2, 1, 4, 5, 11, 11, 27, … General formula remains to be found | Thm 3.15 | Algebraic

Table 1: Summary of results, generating functions are given in the
corresponding theorems.

##  2 Patterns of length one

Our goal in this section is to provide generating functions that count
$p$-equivalence classes with respect to the path length, whenever the pattern
$p$ is $U,$ $D,$ or $C$. For each pattern, the method consists in constructing
a set of representative elements of $p$-equivalence classes and enumerating
them with respect to the length by giving a generating function. From this, we
deduce a closed-form expression (that depends on the length) or a recurrence
relation for the number of corresponding $p$-equivalence classes.

###  2.1 Pattern $U$

Let us define the set $\mathcal{A}$ consisting of the union of the set
$\mathcal{D}$ of Dyck paths with the set $\mathcal{D}^{\prime}$ of paths in
$\mathcal{E}$ having only one catastrophe $C_{k}$, $k\geqslant 2$, located at
the end of the path. We will prove that there is a one-to-one correspondence
between $\mathcal{A}$ and the $U$-equivalence classes of $\mathcal{E}$, and we
enumerate them by providing a generating function that counts $\mathcal{A}$
with respect to the length.

###### Theorem 2.1

There is a bijection between $\mathcal{A}$ and the set of $U$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{A}$ such that $P$ and $Q$ belong to the same $U$-equivalence
class. If we have $P\in\mathcal{D}$, then we choose $Q=P\in\mathcal{A}$.
Otherwise, we decompose
$P=\alpha_{1}C_{k_{1}}\alpha_{2}C_{k_{2}}\ldots\alpha_{r}C_{k_{r}}\alpha_{r+1}$
where $r\geqslant 1$, $k_{i}\geqslant 2$ for $1\leqslant i\leqslant r$ and all
$\alpha_{i}$ do not contain any catastrophe steps. If $\alpha_{r+1}$ is empty,
then we set $Q=\alpha_{1}D\alpha_{2}D\ldots\alpha_{r}C_{k}$ where
$k=(k_{1}-1)+(k_{2}-1)+\ldots+(k_{r-1}-1)+k_{r}=\sum_{i=1}^{r}k_{i}-(r-1)\geqslant
2r-(r-1)\geqslant 2$. If $\alpha_{r+1}$ is not empty, it can be written
$\alpha^{\prime}D$, and we set
$Q=\alpha_{1}D\alpha_{2}D\ldots\alpha_{r}D\alpha^{\prime}C_{k}$ where
$k=k_{1}-1+k_{2}-1+k_{r-1}-1+k_{r}-1+1=\sum_{i=1}^{r}k_{i}-r+1\geqslant
2r-r+1\geqslant 2$. In these last two cases, we have $Q\in\mathcal{A}$ so that
$P$ and $Q$ belong to the same $U$-equivalence class.

Now, let us prove that if $P$ and $Q$ are two paths of the same length in
$\mathcal{A}$ lying in the same $U$-equivalence class, then $P=Q$. According
to the decomposition of a Dyck path with catastrophes (see the Introduction),
we write either $P=\alpha$ or $P=\alpha U\alpha_{1}U\alpha_{2}\ldots
U\alpha_{k}C_{k}$ (respectively $Q=\alpha^{\prime}$ or
$Q=\alpha^{\prime}U\alpha^{\prime}_{1}U\alpha^{\prime}_{2}\ldots
U\alpha^{\prime}_{\ell}C_{\ell}$) for some $k,\ell\geqslant 2$ and where
$\alpha$, $\alpha^{\prime}$, $\alpha_{i}$, $\alpha^{\prime}_{i}$ are some Dyck
paths. Since a Dyck path is characterized by the positions of its up steps,
and $P$ and $Q$ are in the same $U$-equivalence class, we necessarily have
$\alpha=\alpha^{\prime}$, $\alpha^{\prime}_{i}=\alpha^{\prime}_{i}$ for
$i\leqslant\min\\{k,\ell\\}$, which implies that $P=Q$. $\Box$

###### Theorem 2.2

The o.g.f. with respect to the length for the set $\mathcal{A}$ is given by

$A(x)=\frac{\left(1-\sqrt{1-4x^{2}}\right)\left(1-x\right)}{x\left(2x-1+\sqrt{1-4x^{2}}\right)}.$

The series expansion of $A(x)$ is

$1+x^{2}+x^{3}+3x^{4}+4x^{5}+10x^{6}+15x^{7}+35x^{8}+56x^{9}+126x^{10}+210x^{11}+O\left(x^{12}\right).$

Proof. A path in $\mathcal{A}$ is either a Dyck path in $\mathcal{D}$, or a
path $\alpha U\alpha_{1}U\alpha_{2}U\alpha_{3}\ldots U\alpha_{k}C_{k}$ where
$k\geqslant 2$ and $\alpha,\alpha_{1},\ldots,\alpha_{k}$ are some Dyck paths.
We deduce that $A(x)=D(x)+D(x)\cdot\frac{x^{2}D(x)^{2}}{1-xD(x)}\cdot x$ where
$D(x)=\frac{1-\sqrt{1-4x^{2}}}{2x^{2}}$ is the o.g.f. that counts Dyck paths
with respect to the length (see [7]). $\Box$

###### Remark 2.1

With Theorem 2.2, it is easy to check that
$x^{2}-2x+1+(-2x^{2}+3x-1)A(x)+(2x^{2}-x)A(x)^{2}=~{}0,$ and the coefficient
$a_{n}$ of $x^{n}$ in $A(x)$ is ${n-1\choose{\lfloor\frac{n-2}{2}\rfloor}}$
which generates a shift of the sequence A037952 in OEIS [12]. Using a
classical analysis [8, 11] of dominant singularity of $A(x)$, $a_{n}$ has the
asymptotic approximation $\frac{2^{n}}{\sqrt{2\pi n}}.$

###  2.2 Pattern $D$

Let us define the set $\mathcal{B}$ consisting of the union of the set
$\mathcal{D}$ of Dyck paths with the set $\mathcal{D}^{\prime\prime}$ of paths
$P\in\mathcal{E}$ having only one catastrophe.

###### Theorem 2.3

There is a bijection between $\mathcal{B}$ and the set of $D$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{B}$ such that $P$ and $Q$ belong to the same $D$-equivalence
class. If we have $P\in\mathcal{D}$, then we choose $Q=P\in\mathcal{B}$;
otherwise, we decompose
$P=\alpha_{1}C_{k_{1}}\alpha_{2}C_{k_{2}}\ldots\alpha_{r}C_{k_{r}}\alpha_{r+1}$
where $r\geqslant 1$, $k_{i}\geqslant 2$ for $1\leqslant i\leqslant r$ and all
$\alpha_{i}$ do not contain any catastrophe steps. If $\alpha_{r+1}$ is empty,
then we set $Q=\alpha_{1}U\alpha_{2}U\ldots\alpha_{r}C_{k}$ where
$k=(k_{1}+1)+(k_{2}+1)+\ldots+(k_{r-1}+1)+k_{r}=r-1+\sum_{i=1}^{r}k_{i}$. If
$\alpha_{r+1}$ is not empty, it is necessarily a Dyck path, and we set
$Q=\alpha_{1}U\alpha_{2}U\ldots\alpha_{r}C_{k}\alpha_{r+1}$ where
$k=k_{1}+1+k_{2}+1+k_{r-1}+1+k_{r}=r-1+\sum_{i=1}^{r}k_{i}$. In all these
cases, we have $Q\in\mathcal{B}$ so that $P$ and $Q$ belong to the same
$D$-equivalence class.

With a similar argument as for the proof of Theorem 2.1, it is easy to prove
that if $P$ and $Q$ are two paths in $\mathcal{B}$ lying in the same class,
then $P=Q$.

$\Box$

###### Theorem 2.4

The o.g.f. with respect to the length for the set $\mathcal{B}$ is given by

$B(x)=\frac{\left(1-\sqrt{1-4x^{2}}\right)\left(2x^{3}-4x^{2}+1+(2x^{2}-1)\sqrt{1-4x^{2}}\right)}{2x^{4}\left(2x-1+\sqrt{1-4x^{2}}\right)}.$

The series expansion of $B(x)$ is

$1+x^{2}+x^{3}+3x^{4}+5x^{5}+11x^{6}+21x^{7}+42x^{8}+84x^{9}+162x^{10}+330x^{11}+O\left(x^{12}\right).$

Proof. A path in $\mathcal{B}$ is either a Dyck path in $\mathcal{D}$, or a
path of the form $\alpha U\alpha_{1}U\alpha_{2}U\alpha_{3}\ldots
U\alpha_{k}C_{k}\beta$ where $k\geqslant 2$ and
$\alpha,\alpha_{1},\ldots,\alpha_{k},\beta$ are some Dyck paths. We deduce
that $B(x)$ satisfies the functional equation
$B(x)=D(x)+\frac{x^{3}D(x)^{4}}{1-xD(x)}$ where
$D(x)=\frac{1-\sqrt{1-4x^{2}}}{2x^{2}}$ is the o.g.f. that counts Dyck paths
with respect to the length (see [7]). $\Box$

###### Remark 2.2

We have
$5x^{3}-4x^{2}-x+1+(-2x^{4}-5x^{3}+5x^{2}+x-1)B(x)+(2x^{5}-x^{4})B(x)^{2}=0,$
and the coefficient $b_{n}$ of $x^{n}$ in $B(x)$ is

$b_{n}=\begin{cases}\displaystyle{n\choose\frac{n-3}{2}}&\text{ if }n\text{ is
odd,}\vspace{1ex}\\\
\displaystyle{n\choose\frac{n-4}{2}}+{n\choose\frac{n}{2}}/\left(\frac{n}{2}+1\right)&\text{
otherwise.}\end{cases}$

This last result can be easily obtained by combining already known formulæ
(see A002054 and A344191 in [12]), or directly using Maple. The sequence
$b_{n}$ has an asymptotic approximation $\frac{2^{n+\frac{1}{2}}}{\sqrt{\pi
n}}.$

###  2.3 Pattern $C$

In this section, two paths of the same length are $C$-equivalent whenever, for
any $k\geqslant 2$ they have the same positions of the occurrences of $C_{k}$.
For instance,

$UUDDUUC_{2}UUUC_{3}UUC_{2}UD$

is $C$-equivalent to

$UDUDUUC_{2}UUUC_{3}UUC_{2}UD,$

but not to

$UUUDUUC_{4}UUUC_{3}UUC_{2}UD.$

Let $\mathcal{C}$ be the set of paths $P\in\mathcal{E}$ such that:

($i$) $P=(UD)^{k}$ for $k\geqslant 0$, or

($ii$)
$P=(UD)^{\ell_{1}}U^{k_{1}}C_{k_{1}}(UD)^{\ell_{2}}U^{k_{2}}C_{k_{2}}\ldots(UD)^{\ell_{r}}U^{k_{r}}C_{k_{r}}(UD)^{\ell_{r+1}}$
with $r\geqslant~{}1$, $\ell_{i}\geqslant 0$ for $1\leqslant i\leqslant r+1$,
and $k_{i}\geqslant 2$ for $1\leqslant i\leqslant r$.

###### Theorem 2.5

There is a bijection between $\mathcal{C}$ and the set of $C$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{C}$ such that $P$ and $Q$ belong to the same $C$-equivalence
class. If we have $P\in\mathcal{D}$, then we choose $Q=(UD)^{k}\in\mathcal{C}$
with $k=|P|/2$. Otherwise, we decompose
$P=\alpha_{1}C_{k_{1}}\alpha_{2}C_{k_{2}}\ldots\alpha_{r}C_{k_{r}}\alpha_{r+1}$
where $r\geqslant 1$, $k_{i}\geqslant 2$ for $1\leqslant i\leqslant r$ and all
$\alpha_{i}$ do not contain any catastrophe steps. We set
$Q=(UD)^{j_{1}}U^{k_{1}}C_{k_{1}}(UD)^{j_{2}}U^{k_{2}}C_{k_{2}}\ldots\break(UD)^{j_{r}}U^{k_{r}}C_{k_{r}}(UD)^{j_{r+1}}$
where $j_{i}+k_{i}=|\alpha_{i}|$, $1\leqslant i\leqslant r$ and
$j_{r+1}=|\alpha_{r+1}|$. We have $Q\in\mathcal{C}$ so that $P$ and $Q$ belong
to the same $C$-equivalence class. Due to the form of $Q$, it is
straightforward to see that if $P$ and $Q$ are two paths in $\mathcal{C}$
lying in the same class, then $P=Q$. $\Box$

###### Theorem 2.6

The o.g.f. with respect to the length for the set $\mathcal{C}$ is given by

$C(x)=\frac{1-x}{1-x-x^{2}}.$

The series expansion of $C(x)$ is

$1+x^{2}+x^{3}+2x^{4}+3x^{5}+5x^{6}+8x^{7}+13x^{8}+21x^{9}+34x^{10}+55x^{11}+O\left(x^{12}\right).$

Proof. Due to the definition of the set $\mathcal{C}$, we obtain directly the
functional equation
$C(x)=\frac{1}{1-x^{2}}+\frac{1}{1-x^{2}}\cdot\frac{C^{\prime}(x)}{1-C^{\prime}(x)}$
where $C^{\prime}(x)=\frac{x^{3}}{1-x}\cdot\frac{1}{1-x^{2}}$ is the o.g.f.
that counts the paths of the form $(UD)^{\ell}U^{k}C_{k}$ for $\ell\geqslant
0$ and $k\geqslant 2$. $\Box$

###### Remark 2.3

From Theorem 2.6, we deduce that the coefficient $c_{n}$ of $x^{n}$ in $C(x)$
satisfies $c_{n}=c_{n-1}+c_{n-2}$ for $n\geqslant 2$ with $c_{0}=1$ and
$c_{1}=0$, which generates the sequence A212804 in [12] (it is a variant of
the well known Fibonacci sequence A000045). Using the classical method for
asymptotic approximation (see [8, 11]), we have

$c_{n}\sim\frac{3-\sqrt{5}}{5-\sqrt{5}}\cdot\left(\frac{\sqrt{5}-1}{2}\right)^{n}.$

##  3 Patterns of length two

In this section, we provide generating functions that count $p$-equivalence
classes with respect to the length whenever the pattern $p$ is $UU$, $UD$,
$UC$, $DC$, $CU$, $DU$ or $DD$. The techniques used are similar, although more
elaborate, to those used in the previous section.

###  3.1 Pattern $UU$

Let $\mathcal{F}$ be the set of paths $P\in\mathcal{E}$ such that:

($i$) $P=(UD)^{k}$ for $k\geqslant 0$, or

($ii$) $P=(UD)^{\ell_{0}}U^{k_{1}}\alpha_{1}U^{k_{2}}\alpha_{2}\ldots
U^{k_{r}}\alpha_{r}$ where $r\geqslant 1$, $\ell_{0}\geqslant 0$,
$k_{i}\geqslant 2$ for $1\leqslant i\leqslant r$, all $\alpha_{i}$ for
$1\leqslant i\leqslant r-1$ are either $(DU)^{k}D$ or $(DU)^{k}DD$ for some
$k\geqslant 0$, and $\alpha_{r}$ is either $(DU)^{k}C_{s}$ or $(DU)^{k}DC_{s}$
for some $k\geqslant 0$ and with $s\geqslant 1$ is so that the path ends on
the $x$-axis (note that $s$ can be 1, and in this case $C_{1}=D$).

###### Theorem 3.1

There is a bijection between $\mathcal{F}$ and the set of $UU$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{F}$ such that $P$ and $Q$ belong to the same $UU$-equivalence
class. If $P$ does not contain occurrences of $UU$, then we choose
$Q=(UD)^{k}\in\mathcal{F}$ where $k=|P|/2$. Otherwise, we decompose
$P=\alpha_{0}U^{k_{1}}\alpha_{1}U^{k_{2}}\ldots\alpha_{r-1}U^{k_{r}}\alpha_{r}$
where $r\geqslant 1$, $k_{i}\geqslant 2$ for $1\leqslant i\leqslant r$, and
such that all occurrences of $UU$ in $P$ belong necessarily to a run
$U^{k_{i}}$ for some $i$.

We set
$Q=(UD)^{\ell_{0}}U^{k_{1}}\beta_{1}U^{k_{2}}\ldots\beta_{r-1}U^{k_{r}}\beta_{r}$
where $\ell_{0}=|\alpha_{0}|$, and for $1\leqslant i\leqslant r-1$,
$\beta_{i}=(DU)^{\frac{t_{i}-1}{2}}D$ if $t_{i}=|\alpha_{i}|$ is odd,
$\beta_{i}=(DU)^{\frac{t_{i}-2}{2}}DD$ otherwise; finally, we set
$\beta_{r}=(DU)^{\frac{t_{r}-1}{2}}C_{s}$ if $t_{r}=|\alpha_{r}|$ is odd, and
otherwise, $\beta_{r}=(DU)^{\frac{t_{r}-2}{2}}DC_{s}$ with $s\geqslant 1$ is
chosen so that $Q$ ends on the $x$-axis.

We have $Q\in\mathcal{F}$ so that $P$ and $Q$ belong to the same
$UU$-equivalence class. It is straightforward to see that if $P$ and $Q$ are
two paths in $\mathcal{F}$ lying in the same class, then $P=Q$. $\Box$

###### Theorem 3.2

The o.g.f. with respect to the length for the set $\mathcal{F}$ is given by

$F(x)={\frac{x-1}{\left(x+1\right)\left({x}^{3}-{x}^{2}+2\,x-1\right)}}.$

The series expansion of $F(x)$ is

$1+x^{2}+x^{3}+3x^{4}+4x^{5}+8x^{6}+13x^{7}+24x^{8}+41x^{9}+73x^{10}+127x^{11}+O\left(x^{12}\right).$

Proof. Due to the definition of $\mathcal{F}$, we have
$F(x)=\frac{1}{1-x^{2}}+\frac{1}{1-x^{2}}\cdot\frac{1}{1-\frac{x^{3}}{(1-x)^{2}}}\frac{x^{3}}{(1-x)^{2}}$.
A simple calculation completes the proof. $\Box$

###### Remark 3.1

The coefficient $f_{n}$ of $x^{n}$ in $F(x)$ satisfies
$f_{n}=f_{n-1}+f_{n-2}+f_{n-4}$ with $f_{0}=1,f_{1}=0,f_{2}=1,f_{3}=1$, which
generates the sequence A347493 in [12]. An asymptotic approximation of $f_{n}$
is

$f_{n}\sim\frac{(a-1)(a^{2}-a+2)^{n}}{a(a+1)(-3a^{2}+2a-2)}\approx
0.26212\cdot 1.75487^{n},$

where
$a=\frac{(44+12\sqrt{69})^{2/3}+2(44+12\sqrt{69})^{1/3}-20}{6(44+12\sqrt{69})^{1/3}}$.

###  3.2 Pattern $UD$

Let $\mathcal{G}$ be the set of paths $P\in\mathcal{E}$ such that either :

($i$) $P=(UD)^{k}$ for some $k\geqslant 0$, or

($ii$) $P=(UD)^{\ell}U^{k}C_{k}(UD)^{m}$ with $\ell,m\geqslant 0$ and
$k\geqslant 2$, or

($iii$)
$P=(UD)^{\ell_{0}}U^{k_{1}}(UD)^{\ell_{1}}U^{k_{2}}(UD)^{\ell_{2}}\ldots
U^{k_{r}}(UD)^{\ell_{r}}U^{k_{r+1}}C_{s}(UD)^{\ell_{r+1}}$ with $r\geqslant
1$, $\ell_{0},\ell_{r+1}\geqslant 0$, $k_{i}\geqslant 1$ for $1\leqslant
i\leqslant r$, $k_{r+1}\geqslant 0$, $\ell_{i}\geqslant 1$ for $1\leqslant
i\leqslant r$, and $s\geqslant 1$ is so that the path ends on the $x$-axis
(note that $s$ can be one).

###### Theorem 3.3

There is a bijection between $\mathcal{G}$ and the set of $UD$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{G}$ such that $P$ and $Q$ belong to the same $UD$-equivalence
class. If $P$ satisfies the case ($i$), then we obviously set $Q=P$. If
$P=(UD)^{\ell}\alpha(UD)^{m}$ with $l,m\geqslant 0$ and $\alpha$ is a nonempty
path in $\mathcal{E}$ avoiding $UD$, then we set
$Q=(UD)^{\ell}U^{k}C_{k}(UD)^{m}$. Otherwise, we decompose
$P=(UD)^{\ell_{0}}\alpha_{1}(UD)^{\ell_{1}}\alpha_{2}(UD)^{\ell_{2}}\ldots\alpha_{r}(UD)^{\ell_{r}}\alpha_{r+1}$
with all $\alpha_{i}$ being non-empty partial paths avoiding $UD$ (except
$\alpha_{r+1}$ that can be empty). If $|\alpha_{r+1}|>1$ then we set
$Q=(UD)^{\ell_{0}}U^{k_{1}}(UD)^{\ell_{1}}U^{k_{2}}(UD)^{\ell_{2}}\ldots\\\
U^{k_{r}}(UD)^{\ell_{r}}U^{k_{r+1}}C_{s}$ where $k_{i}=|\alpha_{i}|$ and
$k_{r+1}+1=|\alpha_{r+1}|$; otherwise, if $|\alpha_{r+1}|=0$ then we set
$Q=(UD)^{\ell_{0}}U^{k_{1}}(UD)^{\ell_{1}}U^{k_{2}}(UD)^{\ell_{2}}\ldots
U^{k_{r}-1}C_{s}(UD)^{\ell_{r}}$ where $k_{i}=|\alpha_{i}|$ and $s$ is so that
$Q$ ends on the $x$-axis. For all these cases, we have $Q\in\mathcal{G}$ so
that $P$ and $Q$ belong to the same $UD$-equivalence class. Due to the form of
a path in $\mathcal{G}$, if $P$ and $Q$ are two paths in $\mathcal{G}$ lying
in the same $UD$-equivalence class, the $P=Q$. $\Box$

###### Theorem 3.4

The o.g.f. with respect to the length for the set $\mathcal{G}$ is given by

$G(x)=\frac{2x^{3}-2x+1}{\left(1-x^{2}-x\right)\left(1-x\right)^{2}\left(x+1\right)}.$

The series expansion of $G(x)$ is

$1+x^{2}+x^{3}+3x^{4}+5x^{5}+10x^{6}+17x^{7}+30x^{8}+50x^{9}+84x^{10}+138x^{11}+O\left(x^{12}\right).$

Proof. According to the different cases in the definition of $\mathcal{G}$,
$G(x)$ is given by:

$1+\frac{x^{2}}{1-x^{2}}+\frac{1}{1-x^{2}}\frac{x^{3}}{1-x}\frac{1}{1-x^{2}}+\frac{1}{1-x^{2}}\frac{R(x)}{1-R(x)}\frac{x}{1-x}\frac{1}{1-x^{2}}$

where $R(x)=\frac{x^{3}}{(1-x)(1-x^{2})}$ is the o.g.f. that counts the paths
of the form $U^{k}(UD)^{\ell}$ with $k,\ell\geqslant 1$. $\Box$

###### Remark 3.2

The coefficient $g_{n}$ of $x^{n}$ in $G(x)$ satisfies
$g_{n}=2g_{n-1}+g_{n-2}-3g_{n-3}+g_{n-5}$ for $n>4$ with $g_{1}=0$,
$g_{0}=g_{2}=g_{3}=1$, $g_{4}=3$, which generates the sequence A215004 in
[12]. An asymptotic approximation of $g_{n}$ is

$g_{n}\sim\frac{4(5-2\sqrt{5})}{5(\sqrt{5}-3)^{2}}\cdot\left(\frac{\sqrt{5}+1}{2}\right)^{n}\approx
0.72360\cdot 1.61803^{n}.$

###  3.3 Pattern $UC$

In this section, two paths are $UC$-equivalent whenever they coincide on all
their occurrences $UC_{k}$ for $k\geqslant 2$. For instance, $UUDUC_{2}$ and
$UDUUC_{2}$ are $UC$-equivalent, while $UDUUC_{2}$ and $UUUUC_{4}$ are not.

Let $\mathcal{I}_{1}$ be the set of paths of length $n\geqslant 0$,
$n\notin\\{1,3\\}$, defined by either

($i$) $(UD)^{\frac{n}{2}}$ if $n$ is even, or

($ii$) $(UD)^{\frac{n-5}{2}}UUUDC_{2}$ if is $n$ is odd.

Let $\mathcal{I}$ be the set consisting of the union of $\mathcal{I}_{1}$ with
the set of paths of the form
$\alpha_{1}U^{k_{1}}C_{k_{1}}\alpha_{2}U^{k_{2}}C_{k_{2}}\ldots\alpha_{r}U^{k_{r}}C_{k_{r}}\alpha_{r+1}$
where $r\geqslant 1$, all values $k_{i}$ are at least $2$, and all
$\alpha_{i}$ are in $\mathcal{I}_{1}$.

###### Theorem 3.5

There is a bijection between $\mathcal{I}$ and the set of $UC$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{I}$ such that $P$ and $Q$ belong to the same $UC$-equivalence
class. If $P$ does not contain any pattern $UC$, then we set
$Q=(UD)^{\frac{n}{2}}$ if $n$ is even, and $Q=(UD)^{\frac{n-5}{2}}UUUDC_{2}$
otherwise. If $P$ contains $r\geqslant 1$ occurrences of $UC$, then we
decompose $P=\alpha_{1}UC\alpha_{2}UC\ldots\alpha_{r}UC\alpha_{r+1}$ where all
$\alpha_{i}$ are paths avoiding $UC$. Showing the size of every catastrophes,
we obtain the decomposition
$P=\alpha_{1}UC_{k_{1}}\alpha_{2}UC_{k_{2}}\ldots\alpha_{r}UC_{k_{r}}\alpha_{r+1}$
where $k_{i}\geqslant 2$ for $1\leqslant i\leqslant r$.

We set
$Q=\beta_{1}U^{k_{1}}C_{k_{1}}\beta_{2}U^{k_{2}}C_{k_{2}}\ldots\beta_{r}U^{k_{r}}C_{k_{r}}\beta_{r+1}$
where all $\beta_{i}$ are in $\mathcal{I}_{1}$ (all $\beta_{i}$ are entirely
determined by the length of each $\alpha_{i}$). We have $Q\in\mathcal{I}$ so
that $P$ and $Q$ belong to the same $UC$-equivalence class. Obviously, due to
the definition of $\mathcal{I}$, if $P$ and $Q$ belong to $\mathcal{I}$ in the
same $UC$-equivalence class, then $P=Q$. $\Box$

###### Theorem 3.6

The o.g.f. with respect to the length for the set $\mathcal{I}$ is given by

$I(x)={\frac{{x}^{5}-2\,{x}^{4}+2\,{x}^{3}-2\,{x}^{2}+2\,x-1}{{x}^{7}-{x}^{6}+{x}^{5}-{x}^{4}+{x}^{3}-{x}^{2}+2\,x-1}}.$

The series expansion of $I(x)$ is

$1+x^{2}+x^{3}+2x^{4}+4x^{5}+5x^{6}+9x^{7}+15x^{8}+24x^{9}+40x^{10}+65x^{11}+O\left(x^{12}\right).$

Proof. The o.g.f. for $\mathcal{I}_{1}$ is $I_{1}(x)=\frac{1}{1-x}-x-x^{3}$
and the o.g.f. for $\mathcal{I}$ is
$I_{1}(x)+I_{1}(x)\cdot\frac{I_{2}(x)}{1-I_{2}(x)}$ where
$I_{2}(x)=\frac{I_{1}(x)x^{3}}{1-x}$ is the o.g.f. of a nonempty sequence of
terms of the form $\alpha U^{k}C_{k}$ with $\alpha\in\mathcal{I}_{1}$ and
$k\geqslant 2$. $\Box$

###### Remark 3.3

The coefficient $i_{n}$ of $x^{n}$ in $I(x)$ satisfies
$i_{n}=2i_{n-1}-i_{n-2}+i_{n-3}-i_{n-4}+i_{n-5}-i_{n-6}+i_{n-7}$ for
$n\geqslant 7$ with $i_{0}=1,i_{1}=0,i_{2}=1,i_{3}=1,i_{4}=2,i_{5}=4$, and
$i_{6}=5$. This sequence does not appear in [12]. An asymptotic approximation
of $i_{n}$ is

$i_{n}\sim 0.28134\cdot 1.64072^{n}.$

###  3.4 Pattern $DC$

In this section, two paths are $DC$-equivalent whenever they coincide on all
their occurrences $DC_{k}$ for $k\geqslant 2$.

Let $\mathcal{J}_{1}$ be the set of paths of length $n\geqslant 0$, $n\neq 1$,
defined by either

($i$) $(UD)^{\frac{n}{2}}$ if $n$ is even, or

($ii$) $(UD)^{\frac{n-3}{2}}UUC_{2}$ if is $n$ is odd.

Let $\mathcal{J}$ be the set consisting of the union of $\mathcal{J}_{1}$ with
the set of paths of the form
$\alpha_{1}U^{k_{1}+1}DC_{k_{1}}\alpha_{2}U^{k_{2}+1}DC_{k_{2}}\ldots\alpha_{r}U^{k_{r}+1}DC_{k_{r}}\alpha_{r+1}$
where $r\geqslant 1$, all values $k_{i}$ are at least $2$, and all
$\alpha_{i}$ are in $\mathcal{J}_{1}$.

###### Theorem 3.7

There is a bijection between $\mathcal{J}$ and the set of $DC$-equivalence
classes of $\mathcal{E}$.

Proof. The proof is obtained mutatis mutandis as for Theorem 3.5. $\Box$

###### Theorem 3.8

The o.g.f. with respect to the length for the set $\mathcal{J}$ is given by

$J(x)=\frac{x^{3}-2x^{2}+2x-1}{x^{7}-x^{6}+x^{5}-x^{2}+2x-1}.$

The series expansion of $J(x)$ is

$1+x^{2}+x^{3}+x^{4}+2x^{5}+2x^{6}+4x^{7}+6x^{8}+9x^{9}+14x^{10}+20x^{11}+O\left(x^{12}\right).$

Proof. The o.g.f. for $\mathcal{J}_{1}$ is $J_{1}(x)=\frac{1}{1-x}-x$ and the
o.g.f. for $\mathcal{J}$ is
$J_{1}(x)+J_{1}(x)\cdot\frac{J_{2}(x)}{1-J_{2}(x)}$ where
$J_{2}(x)=\frac{J_{1}(x)x^{5}}{1-x}$ is the o.g.f. of a nonempty sequence of
terms of the form $\alpha U^{k+1}DC_{k}$ with $\alpha\in\mathcal{J}_{1}$ and
$k\geqslant 2$. $\Box$

###### Remark 3.4

The coefficient $j_{n}$ of $x^{n}$ in $J(x)$ satisfies
$j_{n}=2j_{n-1}-j_{n-2}+j_{n-5}-j_{n-6}+j_{n-7}$ for $n\geqslant 7$ with
$j_{0}=1,j_{1}=0,j_{2}=j_{3}=j_{4}=1,j_{5}=2,j_{6}=2$ which is not in [12]. An
asymptotic approximation of $j_{n}$ is

$j_{n}\sim 0.25317\cdot 1.48698^{n}.$

###  3.5 Pattern $CU$

In this section, two paths are $CU$-equivalent whenever they coincide on all
their occurrences $C_{k}U$ for $k\geqslant 2$.

Let $\mathcal{K}_{1}$ be the set of paths of even length defined by $(UD)^{k}$
for $k\geqslant 0$.

Let $\mathcal{K}_{2}$ be the set of paths of length $n\neq 1$ defined by
$(UD)^{k}$, $k\geqslant 1$, if $n$ is even, and $(UD)^{k}UUC_{2}$, $k\geqslant
0$, if $n$ is odd.

Let $\mathcal{K}$ be the set consisting of the union of $\mathcal{K}_{2}$ with
the set of paths of the form
$\beta_{1}U^{k_{1}}C_{k_{1}}\beta_{2}U^{k_{2}}C_{k_{2}}\ldots\beta_{r}U^{k_{r}}C_{k_{r}}\beta_{r+1}$
where $k_{i}\geqslant 2$ for $1\leqslant i<r$, and for $1\leqslant i<r+1$,
$\beta_{i}\in\mathcal{K}_{1}$, and $\beta_{r+1}$ is a path from
$\mathcal{K}_{2}$.

###### Theorem 3.9

There is a bijection between $\mathcal{K}$ and the set of $CU$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{K}$ such that $P$ and $Q$ belong to the same $CU$-equivalence
class. If $P$ does not contain any pattern $CU$, then we set
$Q=(UD)^{\frac{n}{2}}$ whenever $n=|P|$ is even, and we set
$Q=(UD)^{\frac{n-3}{2}}UUC_{2}$ otherwise; in both cases
$Q\in\mathcal{K}_{2}$. If $P$ contains $r\geqslant 1$ occurrences of $CU$,
then we decompose $P=\alpha_{1}CU\alpha_{2}CU\ldots\alpha_{r}CU\alpha_{r+1}$
where all $\alpha_{i}$ are paths avoiding $CU$. Showing the size of every
catastrophe, we obtain the decomposition
$P=\alpha_{1}C_{k_{1}}U\alpha_{2}C_{k_{2}}U\ldots\alpha_{r}C_{k_{r}}U\alpha_{r+1}$
where all $k_{i}$ are at least $2$. So, we set
$Q=\beta_{1}U^{k_{1}}C_{k_{1}}\beta_{2}U^{k_{2}}C_{k_{2}}\ldots\beta_{r}U^{k_{r}}C_{k_{r}}\beta_{r+1}$
where $|\alpha_{1}|=|\beta_{1}|$, $|\alpha_{i}|+1=|\beta_{i}|+k_{i}$ for
$1<i<r+1$, $|\alpha_{r+1}|+1=|\beta_{r+1}|$, and

  * •

for $1\leqslant i<r+1$, $\beta_{i}\in\mathcal{K}_{1}$;

  * •

$\beta_{r+1}$ is a path from $\mathcal{K}_{2}$.

We have $Q\in\mathcal{K}$ so that $P$ and $Q$ belong to the same
$CU$-equivalence class. Obviously, due to the definition of $\mathcal{K}$, if
$P$ and $Q$ belong to $\mathcal{K}$ in the same $CU$-equivalence class, then
$P=Q$. $\Box$

###### Theorem 3.10

The o.g.f. with respect to the length for the set $\mathcal{K}$ is given by

$K(x)=\frac{x^{4}+x-1}{x^{2}+x-1}.$

The series expansion of $K(x)$ is

$1+x^{2}+x^{3}+x^{4}+2x^{5}+3x^{6}+5x^{7}+8x^{8}+13x^{9}+21x^{10}+34x^{11}+O\left(x^{12}\right).$

Proof. Due to the definition of $\mathcal{K}$, the o.g.f. $K(x)$ is given by

$K(x)=\frac{1}{1-x}-x+\frac{1}{1-x^{2}}\cdot\frac{1}{1-\frac{x^{3}}{(1-x)(1-x^{2})}}\cdot\frac{x^{3}}{1-x}\cdot\frac{x^{2}}{1-x}.$

$\Box$

###### Remark 3.5

The coefficient $k_{n}$ of $x^{n}$ in $K(x)$ satisfies $k_{n}=k_{n-1}+k_{n-2}$
for $n\geqslant 5$ with $k_{0}=1,k_{1}=0,k_{2}=k_{3}=k_{4}=1$ which is a shift
of the Fibonacci sequence A000045 in [12]. An asymptotic approximation of
$k_{n}$ is

$k_{n}\sim\frac{2(\sqrt{5}-2)}{5-\sqrt{5}}\cdot\left(\frac{2}{\sqrt{5}-1}\right)^{n}\approx
0.17082\cdot 1.61803^{n}.$

###  3.6 Pattern $DU$

Let $\mathcal{L}$ be set of paths $P\in\mathcal{E}$ such that

$P=U^{\ell_{1}}(DU)^{k_{1}}U^{\ell_{2}}(DU)^{k_{2}}\ldots
U^{k_{r}}(DU)^{k_{r}}U^{\ell_{r+1}}C_{s}$

with $r\geqslant 1$, $\ell_{i},k_{i}\geqslant 1$ for $1\leqslant i\leqslant
r$, $\ell_{r+1}\geqslant 0$, and $s$ is so that the path ends on the $x$-axis
(note that $s$ can be $1$, and in this case $C_{1}=D$).

###### Theorem 3.11

There is a bijection between $\mathcal{L}$ and the set of $DU$-equivalence
classes of $\mathcal{E}$.

Proof. First, we prove that for every $P\in\mathcal{E}$ there is
$Q\in\mathcal{G}$ such that $P$ and $Q$ belong to the same $DU$-equivalence
class. We decompose
$P=\alpha_{1}(DU)^{k_{1}}\alpha_{2}(DU)^{k_{2}}\alpha_{3}(DU)^{k_{3}}\ldots\alpha_{r}(DU)^{k_{r}}\alpha_{r+1}$
with all $\alpha_{i}$ being non-empty paths avoiding $DU$, with $r\geqslant
0$, and all $k_{i}$ are at least one. Then we set
$Q=U^{\ell_{1}}(DU)^{k_{1}}U^{\ell_{2}}(DU)^{k_{2}}U^{\ell_{3}}(DU)^{k_{3}}\ldots
U^{\ell_{r}}(DU)^{k_{r}}U^{\ell_{r+1}-1}C_{s}$ where $\ell_{i}=|\alpha_{i}|$,
and where $s$ is so that the path ends on the $x$-axis. For all these cases,
we have $Q\in\mathcal{L}$ so that $P$ and $Q$ belong to the same
$DU$-equivalence class. Due to the form of a path in $\mathcal{L}$, if $P$ and
$Q$ are two paths in $\mathcal{L}$ lying in the same $DU$-equivalence class,
then $P=Q$. $\Box$

###### Theorem 3.12

The o.g.f. with respect to the length for the set $\mathcal{L}$ is given by

$L(x)=\frac{1-x}{1-x-x^{2}}.$

The series expansion of $L(x)$ is

$1+x^{2}+x^{3}+2x^{4}+3x^{5}+5x^{6}+8x^{7}+13x^{8}+21x^{9}+34x^{10}+55x^{11}+O\left(x^{12}\right).$

Proof. According to the definition of $\mathcal{L}$ and handling separately
the cases where $r=1$ and $r\geqslant 2$, the o.g.f. $L(x)$ is given by:

$1+\frac{x^{2}}{1-x^{2}}+\frac{R(x)}{1-R(x)}\cdot\frac{x}{1-x}$

where $R(x)=\frac{x^{3}}{(1-x)(1-x^{2})}$ is the o.g.f. that counts paths of
the form $U^{\ell}(DU)^{k}$ with $k,\ell\geqslant 1$. $\Box$

###### Remark 3.6

The coefficient $\ell_{n}$ of $x^{n}$ in $G(x)$ satisfies
$\ell_{n}=\ell_{n-1}+\ell_{n-2}$ for $n\geqslant 3$ with
$\ell_{0}=1,\ell_{1}=0,\ell_{2}=1$, which generates the sequence A212804 in
[12] (a variant of the well known Fibonacci sequence A000045). An asymptotic
approximation of $\ell_{n}$ is

$\ell_{n}\sim\frac{(\sqrt{5}-3)}{5-\sqrt{5}}\cdot\left(\frac{2}{\sqrt{5}-1}\right)^{n}\approx
0.27639\cdot 1.61803^{n}.$

###  3.7 Pattern $DD$

In [2], the authors exhibited a set $\overline{\mathcal{A}}$ (denoted
$\mathcal{A}$ in [2]) of representatives for the $DD$-equivalence classes of
Dyck paths: $\overline{\mathcal{A}}$ consists of Dyck paths $P$ satisfying

Condition $(C)$: $P$ avoids $UUDU$ and the minimal ordinate reached by every
occurrence of $UDU$ is at most one (i.e. the height of every occurrence of
$UDU$ is at most $1$).

For a Dyck path $P$, we denote by $\psi(P)$ the unique path in
$\overline{\mathcal{A}}$ $DD$-equivalent to $P$. In [2], it is shown how
$\psi(P)$ can be constructed from $P$ after several transformations preserving
the positions of all occurrences of $DD$. The following proposition extends
this result for the set $\mathcal{D}^{\prime}$ of Dyck paths with only one
catastrophe $C_{k}$ at the end.

###### Proposition 3.1

For any path $P\in\mathcal{D}^{\prime}$ ending with catastrophe $C_{k}$,
$k\geqslant 2$, there is a unique path in $\mathcal{D}^{\prime}$, denoted
$\psi(P)$, which is $DD$-equivalent to $P$, ending with catastrophe $C_{k}$
(the same $k$ as for $P$), and satisfying Condition $(C)$.

Proof. Let $Q$ be the Dyck path obtained from $P$ by replacing $C_{k}$ with
$D^{k}$. Using [2], there is a unique path $\psi(Q)$ in
$\overline{\mathcal{A}}$ in the class of $Q$. Replacing the last $D^{k}$ of
$\psi(Q)$ with $C_{k}$, there is a unique Dyck path with only catastrophe
$C_{k}$ at the end equivalent to $P$. $\Box$

###### Lemma 3.1

Let $P$ be a path in $\mathcal{E}$. If $P$ contains at least two catastrophes,
then there exists $Q\in\mathcal{E}$ in the class of $P$, such that $Q$ has
only one catastrophe.

Proof. We obtain $Q$ from $P$ by replacing with $U$ every catastrophe, except
the last, and by increasing the size of the last catastrophe so that
$Q\in\mathcal{E}$. See Figure 2 for an example with two catastrophes. $\Box$

Figure 2: Example for Lemma 3.1 with two catastrophes.

Considering this previous lemma, we can focus our study on the set of Dyck
paths with at most one catastrophe. Recall that $\mathcal{D}^{\prime\prime}$
is the set of paths in $\mathcal{E}$ having only one catastrophe (see Section
2.2).

###### Lemma 3.2

Let $P$ be a path of length $n$ in $\mathcal{D}^{\prime\prime}$ (i.e. $P$
contains only one catastrophe). The size of the catastrophe and $n$ have
different parity.

Proof. For any Dyck path in $\mathcal{D}^{\prime\prime}$ having the
catastrophe of size $k$, the number of $U$ minus the number of $D$ equals $k$,
which implies that the number of $U$ and $D$ (which is equal to $n-1$) has the
same parity as $k$. $\Box$

In the following, for a given path $P$, a $D$-step will be called isolated if
and only if it does not lie in an occurrence of $DD$.

###### Lemma 3.3

Let $P$ be a path in $\mathcal{D}^{\prime\prime}$ having its catastrophe of
size $k\geqslant 2$. We have $P=QC_{k}R$ where $R$ is a Dyck path. If $R$
contains isolated $D$-steps, then there is a path in
$\mathcal{D}^{\prime\prime}$, $DD$-equivalent to $P$, with a catastrophe
$C_{k+2}$ of size $k+2$, and such that every $D$-step on the right of
$C_{k+2}$ is not isolated.

Proof. First, we construct $P^{\prime}=Q^{\prime}C_{k}R^{\prime}$, where
$Q^{\prime}C_{k}$ is the result of application of Proposition 3.1 on $QC_{k}$
and $R^{\prime}$ is obtained applying $\phi$ from [2] on $R$. It implies that
$P^{\prime}$ and $P$ are $DD$-equivalent and this construction ensures that
the height of the rightmost isolated $D$ step in $P^{\prime}$ is at most one.
After this, we distinguish three cases according to the position and the
height of the rightmost isolated $D$-step.

  * -

if $R^{\prime}=R_{1}UD$, then the paths $Q^{\prime}UR_{1}UC_{k+2}$ and $P$ are
equivalent;

  * -

if $R^{\prime}=R_{1}UDUR_{2}$ where $UR_{2}$ is a Dyck path, then
$Q^{\prime}UR_{1}UC_{k+2}UR_{2}$ and $P$ are equivalent;

  * -

if $R^{\prime}=R_{1}UDUR_{2}$ where $UUR_{2}$ is a Dyck path then
$Q^{\prime}UR_{1}C_{k+2}UUR_{2}$ and $P$ are equivalent.

$\Box$

###### Lemma 3.4

Let $P$ be a path in $\mathcal{D}^{\prime\prime}$ satisfying Condition $(C)$
and having its catastrophe of size $k\geqslant 4$. Then, there is a path
$Q\in\mathcal{D}^{\prime\prime}$, equivalent to $P$, having its catastrophe of
size $k-2$, and such that $C_{k}$ and $C_{k-2}$ are in the same position in
$P$ and $Q$, respectively.

Proof. Before describing the construction of $Q$, it is worth noticing the
following fact. There is an occurrence of $UUU$ at height $k-3$ on the left of
$C_{k}$ in $P$. Indeed, let us consider the rightmost $U$ at height $k-3$ on
the left of $C_{k}$; clearly it necessarily precedes a step $U$ which
constitutes an occurrence of $UU$ at height $k-3$. Moreover, since $P$ avoids
$UUDU$, the two steps $UU$ are necessarily followed by another step $U$, and
$P$ can be decomposed $P=P_{1}UUUP_{2}C_{k}P_{3}$ where $P_{1}$ is a prefix of
a Dyck path ending at height $k-3$, $UP_{2}D$ is a Dyck path and $P_{3}$ is a
Dyck path. We complete the proof by setting $Q=P_{1}UDUP_{2}C_{k-2}P_{3}$. See
Figure 3 for an illustration of this construction. $\Box$

Figure 3: Illustration for Lemma 3.4.

####  3.7.1 The case of odd length

Let $\mathcal{A}^{\prime}$ be the subset of paths in $\overline{\mathcal{A}}$
avoiding $UDU$, and not ending with $UD$, which also is the set of paths in
$\overline{\mathcal{A}}$ without isolated $D$-steps. Let $\mathcal{A}_{2}$ be
the set of paths satisfying Condition $(C)$ and having only one catastrophe
$C_{2}$ at the end.

###### Proposition 3.2

A set of representatives of the $DD$-equivalence classes of odd length Dyck
paths with catastrophes, is the set $\mathcal{R}_{1}$ of paths $R=AA^{\prime}$
where $A\in\mathcal{A}_{2}$ and $A^{\prime}\in\mathcal{A}^{\prime}$.

Proof. First, let us prove that for any path $P\in\mathcal{E}$, there is a
path $Q\in\mathcal{R}_{1}$ lying in the same class. We obtain $Q$ by applying
the following process: ($i$) we apply Lemma 3.1; ($ii$) we apply Lemma 3.3;
($iii$) we apply $\psi$ extended to Dyck paths with only one catastrophe (see
Proposition 3.1); ($iv$) we apply Lemma 3.4 and Proposition 3.1, and we repeat
it until the size of the catastrophe reaches $2$ (thanks to Lemma 3.2). In the
case where $UD$ precedes $C_{2}$, i.e. $Q=Q_{1}UDC_{2}Q_{2}$, we replace the
path with $Q_{1}UUC_{4}Q_{2}$ (see Fig. 4) and we apply Lemma 3.4 and
Proposition 3.1.

Figure 4: Illustration for Proposition 3.2.

Now, it suffices to prove that two different paths $Q$ and $Q^{\prime}$ in
$\mathcal{R}_{1}$ with the same length cannot belong to the same class. Let us
assume that $Q$ and $Q^{\prime}$ lie in the same class. We decompose
$Q=RC_{2}S$ and $Q^{\prime}=R^{\prime}C_{2}S^{\prime}$. Suppose that
$|S|\geqslant|S^{\prime}|$. Since $S^{\prime}$ does not contain isolated
$D$-steps, $S^{\prime}$ is entirely determined by the positions of occurrences
of $DD$, which implies that $S$ has the form $S=TS^{\prime}$. Since $S$ does
not contain an isolated $D$-step, $T$ cannot end with $UD$, and since $Q$ is
$DD$-equivalent to $Q^{\prime}$ it cannot end with $DD$, which means that $T$
is empty. So we have $|S|=|S^{\prime}|$ and then $S=S^{\prime}$. Using
Proposition 3.1 for $RC_{2}$ and $R^{\prime}C_{2}$, we obtain $Q=Q^{\prime}$.
$\Box$

###### Theorem 3.13

(The case of odd length) The o.g.f. for the number of $DD$-equivalence classes
of odd length paths in $\mathcal{E}$ is given by:

$N(x)=\frac{8x^{3}}{(x^{2}+\sqrt{1-3x^{4}-2x^{2}}+1)^{2}(-x^{4}+(1+x^{2})\sqrt{1-3x^{4}-2x^{2}}-2x^{2}+1)}.$

We have
$N(x)=x^{3}+x^{5}+5x^{7}+11x^{9}+33x^{11}+88x^{13}+247x^{15}+O(x^{16})$.

Proof. By Proposition 3.2, it suffices to provide the o.g.f. $N(x)$ for
$\mathcal{A}_{2}\times\mathcal{A}^{\prime}$ with respect to the length. Sets
$\mathcal{A}_{2}$ and $\mathcal{A}^{\prime}$ are constructed as follows

where $\mathcal{N}_{udu}$ is the set of non-empty Dyck paths avoiding $UDU$,
$\overline{\mathcal{A}}$ is the set of representatives for the
$DD$-equivalence classes of Dyck paths, e.g. Dyck paths avoiding $UUDU$ and
having all $UDU$ at height 0 or 1, and $\mathcal{B}$ is the set of Dyck paths
having all $UDU$ on $x$-axis and not starting with $UDU$. From [2] it follows
that

$\displaystyle\overline{A}(x)$
$\displaystyle=\frac{1-x^{2}+\sqrt{-3x^{4}-2x^{2}+1}}{1+x^{6}+x^{4}-3x^{2}-\left(x^{4}-1\right)\sqrt{-3x^{4}-2x^{2}+1}},$
$\displaystyle B(x)$
$\displaystyle=\frac{2-x^{2}-x^{4}+x^{2}\sqrt{-3x^{4}-2x^{2}+1}}{1-x^{2}+\sqrt{-3x^{4}-2x^{2}+1}},$

and from [2, 13] we have
$N_{udu}(x)=(x^{2}-\sqrt{-3x^{4}-2x^{2}+1}+1)/(2x^{2})-1$.

Finally, we compute
$N(x)=\overline{A}(x)\left(B(x)-x^{2}\right)A^{\prime}(x)x^{3}A^{\prime}(x)$
where $A^{\prime}(x)$ satisfies
$A^{\prime}(x)=1+x^{2}N_{udu}(x)A^{\prime}(x)$.

$\Box$

####  3.7.2 The case of even length

###### Proposition 3.3

A set of representatives of the $DD$-equivalence classes of even length Dyck
paths with catastrophes is the set $\mathcal{R}_{2}$ defined by the union of
$\overline{\mathcal{A}}$ with the sets $\mathcal{S}_{0}$ and $\mathcal{S}_{1}$
defined below:

\- $\mathcal{S}_{0}$ is the set of Dyck paths $S=PDUUC_{3}$ where $PDU$ is a
prefix of Dyck path satisfying condition $(C)$, and ending at height $2$,

\- $\mathcal{S}_{1}$ is the set of Dyck paths $S=PDDC_{3}$ where $P$ is a
prefix of Dyck path satisfying condition $(C)$, and ending at height $5$.

Proof. Let $P$ be a path in $\mathcal{E}$. If $P$ does not contain any
catastrophe, then using Lemma 1 from [2], there is a unique path in
$\overline{\mathcal{A}}$ equivalent to $P$. Now, let us assume that $P$
contains at least one catastrophe. We obtain $Q$ by applying the following
process: ($i$) we apply Lemma 3.1; we apply Lemma 3.3; we apply $\psi$
(extended to Dyck paths with only one catastrophe); we apply Lemma 3.4
followed by Proposition 3.1 until the path contains only one catastrophe
$C_{3}$ (thanks to Lemma 3.2). We decompose the obtained path $Q=RC_{3}S$
where $S$ is a Dyck path with no isolated $D$-step. With the same argument
used at the beginning of the proof of Lemma 3.4, $R$ is of the form
$R=R^{\prime}UUUR^{\prime\prime}$ where $R^{\prime}$ and $UR^{\prime\prime}D$
are Dyck paths.

  1. ($a$)

if $R^{\prime\prime}$ is empty, i.e. $R=R^{\prime}UUU$, we replace $Q$ with
$R^{\prime}UDUDS\in\overline{\mathcal{A}}$;

  2. ($b$)

if $R^{\prime\prime}=TU$ ends with $U$, i.e. $R=R^{\prime}UUUTU$, we replace
$Q$ with $R^{\prime}UDUTUDS\in\overline{\mathcal{A}}$;

  3. ($c$)

if $R^{\prime\prime}=TUD$ ends with $UD$, i.e. $R=R^{\prime}UUUTUD$, we
replace $Q$ with $R^{\prime}UDUTUUC_{3}S$ (see the illustration below); In the
case where $T$ ends with $U$, we apply the transformation $(a)$ and we obtain
a path in $\overline{\mathcal{A}}$;

After applying all these transformations, the path is either in
$\overline{\mathcal{A}}$, or it satisfies Condition ($C$) and contains only
one catastrophe $C_{3}$ that follows an occurrence $DUU$ or $DD$.

If $S$ is empty then the path lies in $\mathcal{R}_{2}$. Otherwise, $S$ does
not contain isolated $D$-step and it starts necessarily with $UU$. In this
case we set $S=UUS^{\prime}$ and make the catastrophe disappear as follows:

  1. ($d$)

if $R$ ends at height 3 with $DUU$, we set $R=R^{\prime}DUU$ and replace $Q$
with $R^{\prime}DUDUDUS^{\prime}\in\overline{\mathcal{A}}$;

  2. ($e$)

if $R$ ends with $UUUT$, where $UT$ is a prefix of a Dyck path ending at
height 1 and with $DD$, we set $R=R^{\prime}UUUT$ and replace $Q$ by
$R^{\prime}UDUTUDUS^{\prime}$.

$\Box$

###### Theorem 3.14

(The case of even length) The o.g.f. $V(x)$ for the number of $DD$-equivalence
classes of even length paths in $\mathcal{E}$ is given by:

$V(x)=\frac{4\left(x^{4}-x^{2}-1\right)\sqrt{-3x^{4}-2x^{2}+1}+8x^{8}+20x^{6}+8x^{4}-4}{\left(\left(-x^{2}-1\right)\sqrt{-3x^{4}-2x^{2}+1}+x^{4}+2x^{2}-1\right)\left(x^{2}+\sqrt{-3x^{4}-2x^{2}+1}+1\right)^{2}}.$

We have
$V(x)=1+x^{2}+2x^{4}+4x^{6}+11x^{8}+27x^{10}+73x^{12}+194x^{14}+529x^{16}+1448x^{18}+O\\!\left(x^{19}\right)$.

Proof. By Proposition 3.3, it suffices to provide the o.g.f. $M(x)$ for
$\overline{\mathcal{A}}\cup\mathcal{S}_{0}\cup\mathcal{S}_{1}$ with respect to
the length. Sets $\mathcal{S}_{0}$ and $\mathcal{S}_{1}$ are constructed as
follows:

where $\mathcal{A}^{\prime}$ is the set of non-empty Dyck paths avoiding $UDU$
not ending with $UD$, $\overline{\mathcal{A}}$ is the set of representatives
for the $DD$-equivalence classes of Dyck paths, e.g. Dyck paths avoiding
$UUDU$ and having all $UDU$ at height 0 or 1, and $\mathcal{B}$ is the set of
Dyck paths having all $UDU$ on $x$-axis and not starting with $UDU$.

Then, we have

$S_{0}(x)=x^{2}\cdot(\overline{A}(x)-1-x^{2}\cdot\overline{A}(x)-x^{4}\cdot\overline{A}(x))$

and

$S_{1}(x)=x^{4}\cdot\overline{A}(x)(B(x)-x^{2})A^{\prime}(x)(A^{\prime}(x)-1)$

which gives the claimed result after a simple calculation. $\Box$

####  3.7.3 The general case

Combining Theorems 3.13 and 3.14, we deduce:

###### Theorem 3.15

The o.g.f. $L(x)$ for the number of $DD$-equivalence in $\mathcal{E}$ is given
by

$\frac{\left(4x^{4}-4x^{2}-4\right)\sqrt{-3x^{4}-2x^{2}+1}+8x^{8}+20x^{6}+8x^{4}-8x^{3}-4}{\left(\left(-x^{2}-1\right)\sqrt{-3x^{4}-2x^{2}+1}+x^{4}+2x^{2}-1\right)\left(x^{2}+\sqrt{-3x^{4}-2x^{2}+1}+1\right)^{2}},$

and it satisfies the following equation:
$x^{10}-x^{9}+4x^{8}-3x^{7}+5x^{6}-5x^{5}+2x^{4}-2x^{3}+x^{2}-x+1+\left(-x^{10}+x^{9}-6x^{8}+5x^{7}-9x^{6}+6x^{5}-3x^{4}+3x^{3}+x-1\right)L\\!\left(x\right)+\left(x^{10}-x^{9}+4x^{8}-3x^{7}+5x^{6}-3x^{5}+2x^{4}-x^{3}\right)L\\!\left(x\right)^{2}=0$.

The first coefficients of $x^{n}$, $n\geqslant 2$, of the series expansion of
$L(x)$ are $1,1,2,1,4,5,11,11,27,33,73,88,194,247,\ldots$, and they do not
correspond to a part of a sequence listed in [12].

An asymptotic approximation of these coefficients is

$\frac{41\sqrt{2}}{2\sqrt{\pi}}\cdot\frac{\sqrt{3}^{n+1}}{n^{\frac{3}{2}}}\mbox{
for }n\mbox{ even, and }$
$\frac{135\sqrt{2}}{4\sqrt{\pi}}\cdot\frac{\sqrt{3}^{n}}{n^{\frac{3}{2}}}\mbox{
otherwise. }$

##### Acknowledgments.

The authors would like to thank the anonymous referees for useful remarks and
comments. This work was supported in part by the project ANER ARTICO funded by
Bourgogne-Franche-Comté region of France and ANR JCJC PICS.

## References

  * [1] C. Banderier and M. Wallner, Lattice paths with catastrophes, _Electron. Notes Discret. Math._ , 59 (2017), 131–146.
  * [2] J.-L. Baril and A. Petrossian, Equivalence of Dyck paths modulo some statistics, _Discrete Math._ , 338 (2015), 655–660.
  * [3] J.-L. Baril and A. Petrossian, Equivalence classes of Motzkin paths modulo a pattern of length at most two, _J. Integer Seq._ , 18 (2015), 15.7.1.
  * [4] J.-L. Baril and S. Kirgizov, Bijections from Dyck and Motzkin meanders with catastrophes to pattern avoiding Dyck paths, _Discrete Math. Lett._ , 7 (2021), 5–10.
  * [5] J.-L. Baril, S. Kirgizov, and A. Petrossian, Enumeration of Łukasiewicz paths modulo some patterns, _Discrete Math._ , 342(4) (2019), 997–1005.
  * [6] J.-L. Baril, J.L. Ramírez, L.M. Simbaqueba, Equivalence classes of skew Dyck paths Modulo some patterns, _Integers_ , 22 (2022).
  * [7] E. Deutsch, Dyck path enumeration, _Discrete Math._ , 204(1999), 167–202.
  * [8] P. Flajolet and R. Sedgewick, _Analytic Combinatorics_ , Cambridge University Press, 2009.
  * [9] A. Krinik, G. Rubino, D. Marcus, R.J. Swift, H. Kasfy, H. Lam.  Dual processes to solve single server systems.  J. Stat. Plan. Inference, 135(2005), 1, 121–147.
  * [10] K. Manes, A. Sapounakis, I. Tasoulas, and P. Tsikouras, Equivalence classes of ballot paths modulo strings of length 2 and 3, _Discrete Math._ , 339(10) (2016), 2557–2572.
  * [11] A.G. Orlov, On asymptotic behavior of the Taylor coefficients of algebraic functions, _Sib. Math. J._ , 25(5) (1994), 1002–1013.
  * [12] N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences. Available at https://oeis.org/.
  * [13] Y. Sun, The statistic “number of udu’s” in Dyck paths, _Discrete Math._ , 287 (2004), 177–186.


latexA float is stuck latex‘h’ float specifier

# Spin Hall effect of radiofrequency waves in magnetized plasmas

Yichen Fu<EMAIL_ADDRESS>I. Y. Dodin  Hong Qin  Princeton Plasma
Physics Laboratory, Princeton, NJ 08543
Department of Astrophysical Sciences, Princeton University, Princeton, NJ
08544

###### Abstract

In inhomogeneous media, electromagnetic-wave rays deviate from the
trajectories predicted by the leading-order geometrical optics. This effect,
called the spin Hall effect of light, is typically neglected in ray-tracing
codes used for modeling waves in plasmas. Here, we demonstrate that the spin
Hall effect can be significant for radiofrequency waves in toroidal magnetized
plasmas whose parameters are in the ballpark of those used in fusion
experiments. For example, an electron-cyclotron wave beam can deviate by as
large as ten wavelengths ($\sim 0.1\,\text{m}$) relative to the lowest-order
ray trajectory in the poloidal direction. We calculate this displacement using
gauge-invariant ray equations of extended geometrical optics, and we also
compare our theoretical predictions with full-wave simulations.

##  I Introduction

Precise modeling of radiofrequency (RF) waves in magnetic-fusion experiments
is essential for many applications, including cyclotron heating, current drive
[1, 2, 3], and suppression of tearing modes [4, 5]. Waves with short
wavelengths, particularly those in the electron-cyclotron and lower-hybrid
frequency range, are commonly modeled with ray-tracing codes [6, 7, 8, 9, 10,
11], which are based on geometrical optics (GO) [12, 13]. In the traditional,
lowest-order GO, the evolution of the ray coordinate $\mathbf{x}$ and momentum
$\mathbf{k}$ (wavevector) are governed by the Hamiltonian that equals the
local dispersion function and ignores the local gradients of the medium
parameters [14]. However, the evolution of the wave polarization in an
inhomogeneous medium produces corrections that make rays deviate from the
trajectories predicted by this lowest-order Hamiltonian [15, 16]. This effect,
which is similar to the spin-orbital interaction in quantum mechanics and the
spin-orbital-like coupling in atomic systems [17, 18], is known as the spin
Hall effect (SHE) of light. It is being actively studied as an important
photonic effect in various physical systems [19, 20, 21, 22, 23, 24, 25, 26,
27, 28]. Plasma was recently identified as a medium where the SHE manifests
[29, 30, 31]. But the importance of the SHE for practical plasma applications
has not been explored, and the common ray-tracing codes used in fusion
research ignore the SHE entirely [32]. In this paper, we show that the SHE can
be significant for RF waves in magnetized plasmas whose parameters are in the
ballpark of those used in fusion experiments. The results reported enrich the
understanding of the SHE and demonstrate the importance of an
interdisciplinary approach to wave effects found in various media.

We calculate the SHE using equations of “extended GO” (XGO) as formulated in
Refs. 31, 29. By comparing XGO predictions with two-dimensional (2-D) full-
wave (FW) simulations, we show that the ray equations that account for the SHE
describe waves in fusion plasmas more accurately than the traditional ray
equations. For three-dimensional (3-D) toroidal plasmas, we show that
electromagnetic waves in the electron-cyclotron frequency range can deviate by
as large as ten wavelengths in the poloidal plane relative to the GO
predictions. Displacements of this size can be important in practice, for
example, because processes like collisionless absorption and mode conversion
can be very sensitive to the spatial distribution of the wave energy.

Our paper is organized as follows. In Sec. II, we introduce basic theory. In
Sec. III, we apply this theory to waves in cold magnetized plasma,
specifically, in a plasma slab (Sec. III.2) and toroidal plasma (Sec. III.3).
In Sec. IV, we conclude our results. Auxiliary calculations are presented in
appendices.

##  II Basic equations

Let us start by briefly restating the derivation of the XGO ray equations [30,
31]. Consider a multicomponent wave field $\Psi$ on a given space (or
spacetime) $x^{\mu}$ and suppose that this wave is governed by an equation of
the form $\hat{D}\Psi=0$, where $\hat{D}$ is some linear dispersion operator
generally of integro-differential form. Assume that the wave has an eikonal
form $\Psi(x^{\mu})=\mathrm{e}^{\mathrm{i}\theta(x^{\mu})}\psi(x^{\mu})$.
Here, the scalar function $\theta$ is a fast real phase and
$\bar{k}_{\mu}\doteq\partial_{\mu}\theta$ is the associated wavevector, which
is generally a field on $x^{\mu}$. (The symbol $\doteq$ denotes definitions,
$\partial_{\mu}\doteq\partial/\partial x^{\mu}$, and
$\partial^{\mu}\doteq\partial/\partial k_{\mu}$.) The multicomponent function
$\psi$ represents a slow complex envelope governed by
$\hat{\mathcal{D}}\psi=0$, where
$\hat{\mathcal{D}}\doteq\mathrm{e}^{-\mathrm{i}\theta}\hat{D}\mathrm{e}^{\mathrm{i}\theta}$.
We assume that the least scale $L$ of the envelope dynamics is much smaller
than the local wavelength $\lambda\doteq 2\pi/\bar{k}$, yielding a small
parameter $\epsilon\doteq\lambda/L\ll 1$ (the “GO parameter”). Then, assuming
Euclidean or pseudo-Euclidean (e.g., Minkowski) coordinates for simplicity,
one obtains [31]

$\displaystyle\hat{\mathcal{D}}\approx\mathsf{D}(x^{\mu},\bar{k}_{\mu}(x^{\mu}))-\mathrm{i}\mathsf{V}^{\mu}\partial_{\mu}-\mathrm{i}(\partial_{\mu}\mathsf{V}^{\mu})/2.$
(1)

Here, the “local dispersion tensor” $\mathsf{D}$, which is a matrix function
on the ray phase space $(x^{\mu},k_{\mu})$, is the Weyl symbol of $\hat{D}$,
and
$\mathsf{V}^{\mu}\doteq(\partial^{\mu}\mathsf{D}(x^{\mu},k_{\mu}))|_{k_{\mu}=\bar{k}_{\mu}(x^{\mu})}$.
We assume that the Hermitian part of the dispersion tensor, $\mathsf{D}_{\rm
H}\doteq(\mathsf{D}+\mathsf{D}^{\dagger})/2$, is $\mathcal{O}(1)$, while its
anti-Hermitian part, $\mathsf{D}_{\rm
A}\doteq(\mathsf{D}-\mathsf{D}^{\dagger})/(2\mathrm{i})$, is
$\mathcal{O}(\epsilon)$, so one can use
$\mathsf{V}^{\mu}(x^{\mu})\approx(\partial^{\mu}\mathsf{D}_{\rm
H}(x^{\mu},k_{\mu}))|_{k_{\mu}=\bar{k}_{\mu}(x^{\mu})}$. Then,
$\mathsf{D}_{\rm A}$ determines local damping, while the wave propagation is
determined entirely by $\mathsf{D}_{\rm H}$, namely, as follows.

To the zeroth order in $\epsilon$, Eq. (1) gives

$\displaystyle\mathsf{D}_{\rm
H}(x^{\mu},\bar{k}_{\mu}(x^{\mu}))\psi(x^{\mu})=0,$ (2)

so $\psi$ is the eigenvector of $\mathsf{D}_{\rm H}$ corresponding to an
eigenvalue $\Lambda$ that is zero on the solution at $\epsilon\to 0$. To
eliminate mode conversion, which makes the analysis more complicated [31], let
us assume that $\mathsf{D}_{\rm H}(x^{\mu},k_{\mu})$ has only one eigenvalue
that is zero at $k_{\mu}=\bar{k}_{\mu}(x^{\mu})$; we call it an active mode.
Then, Eq. (2) can be restated as follows. Consider the corresponding unit
eigenvector $\eta$,

$\displaystyle\mathsf{D}_{\rm
H}\eta=\Lambda\eta,\quad\eta^{\dagger}\eta=1,\quad\Lambda=\eta^{\dagger}\mathsf{D}_{\rm
H}\eta,$ (3)

where all quantities are considered as functions of $(x^{\mu},k_{\mu})$. Then,
$\Lambda(x^{\mu},\bar{k}_{\mu}(x^{\mu}))=0$ serves as an approximate
dispersion relation, and
$\psi(x^{\mu})=\eta(x^{\mu},\bar{k}_{\mu}(x^{\mu}))a(x^{\mu})$, where
$a(x^{\mu})$ is a scalar amplitude. To separate the phase dynamics from the
amplitude dynamics completely, we attribute the whole phase that the envelope
may have to $\theta$ and $\eta$, so the function $a$ is real by definition. We
note that $\eta$ is defined only up to $\mathrm{e}^{\mathrm{i}\varphi}$, where
$\varphi$ is real and slow but otherwise arbitrarily. This constitutes a U(1)
gauge symmetry of XGO, with $\varphi$ being the gauge potential (see below).

To the first order in $\epsilon$, Eq. (1) gives
$\psi(x^{\mu})=\eta(x^{\mu},\bar{k}_{\mu}(x^{\mu}))a(x^{\mu})+\psi_{\perp}(x^{\mu})$,
where $\psi_{\perp}=\mathcal{O}(\epsilon)$ is perpendicular to $\eta$. Then,
projecting Eq. (1) on $\eta$ gives [31]

$\displaystyle(\Lambda-U)a-\mathrm{i}[V^{\mu}\partial_{\mu}+(\partial_{\mu}V^{\mu})/2-\Gamma]a=0.$
(4)

Here, $\Lambda$ is as in Eq. (3), $\Gamma\doteq\eta^{\dagger}\mathsf{D}_{\rm
A}\eta$,
$U\doteq\operatorname{Im}[(\partial_{\mu}\eta^{\dagger})\mathsf{V}^{\mu}\eta]$,
and $\eta=\eta(x^{\mu},\bar{k}_{\mu}(x^{\mu}))$, so $\partial_{\mu}$ applies
to both its arguments. Since $a$ is real by definition, the imaginary part of
Eq. (1) gives an amplitude equation
$[V^{\mu}\partial_{\mu}+(\partial_{\mu}V^{\mu})/2-\Gamma]a=0$, and the real
part of Eq. (1) gives a dispersion relation
$\mathcal{H}(x^{\mu},\bar{k}_{\mu}(x^{\mu}))=0$, where
$\mathcal{H}\doteq\Lambda-U$ and [31]

$\displaystyle
U=U_{0}-\mathsf{A}_{\mu}^{(x)}\,\partial^{\mu}\Lambda+\mathsf{A}_{(k)}^{\mu}\,\partial_{\mu}\Lambda,$
(5) $\displaystyle
U_{0}\doteq\operatorname{Im}\left[\left(\partial^{\mu}\eta^{{\dagger}}\right)\mathsf{D}_{\mathrm{H}}\left(\partial_{\mu}\eta\right)\right],$
(6)
$\displaystyle\mathsf{A}_{\mu}^{(x)}\doteq\operatorname{Im}\left(\eta^{{\dagger}}\partial_{\mu}\eta\right),\quad\mathsf{A}_{(k)}^{\mu}\doteq\operatorname{Im}\left(\eta^{{\dagger}}\partial^{\mu}\eta\right).$
(7)

As usual [13], the corresponding ray equations are

$\displaystyle\dot{x}^{\mu}=\partial^{\mu}\mathcal{H},\quad\dot{k}_{\mu}=-\partial_{\mu}\mathcal{H},$
(8)

where the dot denotes $\mathrm{d}/\mathrm{d}\tau$, $\tau$ is a parameter along
the ray, and $k_{\mu}$ represents $\bar{k}_{\mu}$ (the bar is omitted from now
on for brevity). These correspond to the canonical Lagrangian
$\mathcal{L}=k_{\mu}\dot{x}^{\mu}-\mathcal{H}$. But note that
$\dot{x}^{\mu}=\partial^{\mu}\Lambda+\mathcal{O}(\epsilon)$,
$\dot{k}_{\mu}=-\partial_{\mu}\Lambda+\mathcal{O}(\epsilon)$,
$\mathsf{A}_{\mu}^{(x)}=\mathcal{O}(\epsilon)$, and
$\mathsf{A}^{\mu}_{(k)}=\mathcal{O}(\epsilon)$, so $U\approx
U_{0}-\dot{x}^{\mu}\mathsf{A}_{\mu}^{(x)}-\dot{k}_{\mu}\mathsf{A}_{(k)}^{\mu}+\mathcal{O}(\epsilon^{2})$.
Omitting $\mathcal{O}(\epsilon^{2})$, which is negligible within the assumed
accuracy, one arrives at an equivalent noncanonical Lagrangian

$\displaystyle\mathcal{L}=\left[\dfrac{k_{\mu}}{2}-\mathsf{A}_{\mu}^{(x)}\right]\dot{x}^{\mu}-\left[\dfrac{x^{\mu}}{2}+\mathsf{A}^{\mu}_{(k)}\right]\dot{k}_{\mu}-(\Lambda-
U_{0}),$ (9)

where an insignificant full derivative
$\mathrm{d}(k_{\mu}x^{\mu}/2)/\mathrm{d}\tau$ has been omitted. The functions
$\mathsf{A}$ define the Berry connections [33]. It plays the role of the
Abelian vector potential in the present context. The corresponding
Euler–Lagrange equations are as follows:

$\displaystyle\dot{x}^{\mu}$ $\displaystyle=+\partial^{\mu}(\Lambda-
U_{0})+{\mathsf{F}^{\mu}}_{\nu}\dot{x}^{\nu}+\mathsf{F}^{\mu\nu}\,\dot{k}_{\nu},$
(10a) $\displaystyle\dot{k}_{\mu}$ $\displaystyle=-\partial_{\mu}(\Lambda-
U_{0})-{\mathsf{F}_{\mu}}^{\nu}\dot{k}_{\nu}-\mathsf{F}_{\mu\nu}\,\dot{x}^{\nu},$
(10b)

where the functions $\mathsf{F}$ (with various indices) are understood as the
Berry curvatures:

$\displaystyle{\mathsf{F}^{\mu}}_{\nu}$ $\displaystyle\doteq
2\operatorname{Im}[(\partial^{\mu}\eta^{{\dagger}})\partial_{\nu}\eta],\,\,\mathsf{F}^{\mu\nu}\doteq
2\operatorname{Im}[(\partial^{\mu}\eta^{{\dagger}})\partial^{\nu}\eta],$ (11a)
$\displaystyle{\mathsf{F}_{\mu}}^{\nu}$ $\displaystyle\doteq
2\operatorname{Im}[(\partial_{\mu}\eta^{{\dagger}})\partial^{\nu}\eta],\,\,\mathsf{F}_{\mu\nu}\doteq
2\operatorname{Im}[(\partial_{\mu}\eta^{{\dagger}})\partial_{\nu}\eta].$ (11b)

This result generalizes the corresponding equations in Refs. 26 to arbitrary
dispersive operators $\hat{D}$. In particular, one can show (see Appendix A)
that Eqs. (10) are gauge-invariant, i.e., unaffected by a variable
transformation $\eta\to\mathrm{e}^{\mathrm{i}\varphi}\eta$. Still, Eqs. (6)
and (11) can be inconvenient for numerical integration. Assuming that $\eta$
is provided by a generic eigensolver, having its phase arbitrary makes
$\eta(x^{\mu},k_{\mu})$ discontinuous, resulting in large $\mathsf{F}$. This
undermines both the accuracy of the perturbation model and the numerical
stability of the integrator. A more practical form of $U_{0}$ and $\mathsf{F}$
is derived in Appendix B and generalize the corresponding formulas from Refs.
34, 26:

$\displaystyle
U_{0}=\mathrm{Im}\sum_{m}\dfrac{\eta^{{\dagger}}(\partial^{\mu}\mathsf{D}_{\rm
H})\eta_{m}\eta_{m}^{{\dagger}}(\partial_{\mu}\mathsf{D}_{\rm
H})\eta}{\Lambda_{m}},$ (12a)
$\displaystyle\mathsf{F}^{\mu\nu}=2\mathrm{Im}\sum_{m}\dfrac{\eta^{{\dagger}}(\partial^{\mu}\mathsf{D}_{\rm
H})\eta_{m}\eta_{m}^{{\dagger}}(\partial^{\nu}\mathsf{D}_{\rm
H})\eta}{\Lambda_{m}^{2}}.$ (12b)

Lowering the indices $\mu$ and $\nu$ on the right-hand side of Eq. (12b)
yields the corresponding components of $\mathsf{F}$ with lower and mixed
indices. Here, $\eta_{m}$ and $\Lambda_{m}$ are the unit eigenvectors and the
corresponding eigenvalues of $\mathsf{D}_{\rm H}$ that correspond to modes
with $\Lambda_{m}\neq\Lambda$; we call them passive modes. These equations
have the benefit of “numerical gauge invariance” in that changing
$\eta\to\mathrm{e}^{\mathrm{i}\varphi}\eta$ leaves both $U_{0}$ nor
$\mathsf{F}$ intact. It is also seen from Eqs. (12) that the SHE is amplified
when one or more of the passive modes is in resonance with the active mode,
namely, $\Lambda_{m}\approx 0$. In this regime, one can also expect mode
conversion, i.e., tunneling of the wave action between separate dispersion
surfaces. However, this tunneling scales with $\Lambda_{m}$ exponentially [13,
35], while the SHE scales with $\Lambda_{m}$ algebraically, so it can be
amplified at small $\Lambda_{m}$ while the mode conversion remains negligible.

The SHE in the present study originates from the internal degree of freedom
associated with vector components of the photon field in plasmas. It is also
similar to the spin-orbital-like coupling that appears in the non-Abelian
gauge field theory for electron wave functions in atomic systems [17, 18], but
the mechanism there is different. Another difference is that the gauge
potential in the present context is Abelian, since we only study here the
propagation of one single mode away from the mode-conversion region, and the
eigenmode is non-degenerate. For the plasma waves near the mode conversion
region, the effects of eigenmode degeneracy are important [29]. Then a non-
Abelian gauge theory similar to that in atomic systems [17, 18] is necessary.

##  III Waves in cold magnetized plasma

###  III.1 Basic equations

Let us apply the above results to a cold-plasma model, which is commonly used
for ray tracing in fusion devices [2]. For simplicity, let us neglect the ion
response, plasma flows, and dissipation, and let us also assume that the waves
have a fixed frequency $\omega$, as usual. Then, the linear-wave equations can
be written as $\hat{D}\Psi=0$, where
$\mathsf{D}=\mathsf{D}_{\mathrm{H}}=H(\mathbf{x},\mathbf{k})-\omega$,

$\displaystyle\hat{H}(\mathbf{x},-\mathrm{i}\partial_{\mathbf{x}})=\begin{pmatrix}-\mathrm{i}\boldsymbol{\Omega}(\mathbf{x})\times&\mathrm{i}\omega_{\mathrm{p}}(\mathbf{x})&0\\\
-\mathrm{i}\omega_{\mathrm{p}}(\mathbf{x})&0&\mathrm{i}c\,\partial_{\mathbf{x}}\times\\\
0&-\mathrm{i}c\,\partial_{\mathbf{x}}\times&0\end{pmatrix},$ (13)

and $\Psi(t,\mathbf{x})=(\mathbf{v},\mathbf{E},\mathbf{B})^{\intercal}$ is a
9-dimensional column vector (the symbol ⊺ denotes transposition) that includes
the properly normalized velocity $\mathbf{v}$, the wave electric field
$\mathbf{E}$, and the wave magnetic field $\mathbf{B}$ [36]. Also, $\times$
denotes vector product, as usual; $\omega_{\mathrm{p}}(\mathbf{x})=[4\pi
q^{2}\bar{n}(\mathbf{x})/m]^{1/2}$ is the plasma frequency; $q$, $m$, and
$\bar{n}(\mathbf{x})$ are the electron charge, mass, and background density,
correspondingly;
$\boldsymbol{\Omega}(\mathbf{x})=q\bar{\mathbf{B}}(\mathbf{x})/(mc)$ is the
gyrofrequency; $\bar{\mathbf{B}}(\mathbf{x})$ is the background magnetic
field; and $c$ is the speed of light. In fusion applications of the electron
waves governed by Eq. (13), one typically has $\omega\sim\omega_{\rm
p}\sim\Omega$, so we attribute this range, loosely, as the electron-cyclotron
range. The eigenvectors of $\mathsf{D}_{\mathrm{H}}$ are the same as those of
$H$, so $H\eta_{m}=(\Lambda_{m}+\omega)\eta_{m}$.

Typically, Berry curvature arises from degeneracy points in the dispersion
relation that behave as magnetic monopoles [34]. In the cold plasma model
considered here, there are four degeneracy points known as Weyl points [37,
38]. The spatial locations where $\omega_{\rm p}$ and $\Omega$ are zero also
serve as degeneracy points. In addition, Berry curvature has a contribution
from infinite $k$ [37], because the wavevector space is not compact in cold
plasmas. Because $\epsilon\ll 1$, the system changes slowly on the scale of
the wavelength. Thus, we can treat the evolution of a single-mode wave packet
as an adiabatic process when mode conversion is absent.

###  III.2 SHE in a plasma slab

First, let us consider waves propagating perpendicular to the magnetic field
in a plasma slab, with coordinates denoted $\mathbf{x}\equiv(x,y,z)$. There
are three modes in this case: an O mode with $\omega>\omega_{\rm p}$ and two X
modes, with $\omega<\omega_{\mathrm{uh}}$ and $\omega>\omega_{\mathrm{uh}}$,
respectively, where $\omega_{\mathrm{uh}}$ is the upper-hybrid frequency,
$\omega_{\mathrm{uh}}=(\Omega^{2}+\omega_{\mathrm{p}}^{2})^{1/2}$. We assume a
homogeneous magnetic field along the $z$ axis, with magnitude
$|\bar{\mathbf{B}}|=0.5\,\text{T}$, so $\Omega\approx 8.8\times
10^{10}\,\text{s}^{-1}$. We also adopt
$\omega_{\mathrm{p}}(\mathbf{x})=\omega_{\mathrm{p},0}(1+x/L_{0})$, with
$L_{0}=1\,\text{m}$ and $n(x=0)=10^{19}\,\text{m}^{-3}$, so
$\omega_{\mathrm{p},0}\approx 1.8\times 10^{11}\,\text{s}^{-1}$. The centers
of the wave beams simulated pass through $\mathbf{x}_{0}=(0,0,0)$, where the
wavevector is $\mathbf{k}_{0}=(-200,0,0)\,\text{m}^{-1}$, so $\epsilon\sim
0.03$. The ray-tracing simulations are performed, separately for O waves and X
waves, using Eqs. (10) and (12). Deviations of the ray trajectory from the $x$
axis in this geometry, if any, are entirely due to the SHE.

We also compare our XGO ray tracing with FW simulations, which we perform
using the finite-difference time-domain method described in Ref. [39]. For
simplicity, we assume that the system is uniform along the $z$ axis
($\partial_{z}=0$), so 2-D modeling is enough. For the FW simulations, the
initial field is taken to be

$\displaystyle\Psi=\eta\,\mathrm{e}^{\mathrm{i}\mathbf{k}_{0}\cdot\mathbf{x}}\exp\left[-(\mathbf{x}-\mathbf{x}_{0})^{2}/(2\sigma^{2})\right]+\mathcal{O}(\epsilon),$
(14)

with $\sigma=3.5\,\text{cm}$. The (nonnegligible) term $\mathcal{O}(\epsilon)$
is specified in Appendix C. For comparison with the ray-tracing simulations,
“the” wave coordinate $\mathbf{x}$ is defined as that of the maximum of the
beam action density $\mathcal{I}\doteq|\Psi|^{2}$, and the same applies to
“the” wavevector $\mathbf{k}$. The spatial grid sizes are chosen to be $\Delta
x=\Delta y=8.0\times 10^{-5}\,\text{m }\sim 10^{-2}\lambda$ so that the FW
simulation can capture the SHE accurately. The temporal grid size is $\Delta
t=7.8\times 10^{-6}\,\text{ns}$. Then, the phase space velocity of the wave is
about $0.1(\Delta x/\Delta t)<\Delta x/\Delta t$, which ensures numerical
stability [40]. For a typical case where the XGO equations can be calculated
on a laptop within a few minutes, the 2-D FW simulation has to be carried out
on a cluster and consumes $\sim 10^{4}$ CPU hours (and 3-D simulations would
have been prohibitively expensive.)

Figure 1: Simulations of an X wave with $\omega<\omega_{\mathrm{uh}}$ in the
$(x,y)$ plane. Shown are snapshots at $t=0$ and $t=4\,\text{ns}$. (a)
$\operatorname{Re}B_{z}$, (b) $\mathcal{I}$; (c) a zoom-in on the green
rectangle from (b). The ray trajectories from the GO (dashed blue curve), XGO
(solid red curve), and FW (green discs) simulations.

As an example, we present typical results of numerical simulations for an X
wave with $\omega<\omega_{\mathrm{uh}}$ in Fig. 1. The wave packet moves
roughly along the $-x$ axis with increasing wavenumber $k_{x}$. The
trajectories from GO and XGO are very close to each other yet distinguishable
at high resolution. As seen in the zoomed-in plot [Fig. 1(c)], the separation
$\varsigma$ between them is about $3\,\text{mm}$, and FW simulations are in
better agreement with XGO than they are with GO. As could be expected from
Eqs. (10), this separation constitutes about 1% of the ray path $\ell$, so
$\varsigma/\ell\sim\epsilon$. For all three modes, the comparison between XGO
and FW simulations is presented in Fig. 2. In GO, all three rays would travel
along $y=0$, so the horizontal displacement of the X-wave rays is entirely due
to the SHE. The O wave does not exhibit the SHE because its polarization
vector $\eta$ remains parallel to the $z$-axis and has a fixed phase, so
$\partial_{\mu}\eta\equiv 0$ and
$\operatorname{Im}[(\partial^{\mu}\eta^{\dagger})\partial^{\nu}\eta]\equiv 0$,
so $U_{0}\equiv 0$ by Eq. (6) and $\mathsf{F}\equiv 0$ by Eqs. (11). Notably,
this difference between the SHE for X and O waves is consistent with the fact
that these modes have different Chern numbers $C$, which are integrals of the
Berry curvatures and represent waves’ topological invariants [41, 38, 42]. The
O wave has $C=0$, the X wave with $\omega<\omega_{\mathrm{uh}}$ has $C=2$, and
the X wave with $\omega>\omega_{\mathrm{uh}}$ has $C=-1$.

Figure 2: The comparison between XGO (solid curves) and FW (discs) simulation
results for the O wave (blue in the middle), X wave with
$\omega<\omega_{\mathrm{uh}}$ (green on the left), and X wave with
$\omega>\omega_{\mathrm{uh}}$ (red on the right). In GO, all three rays would
travel along $y=0$.

###  III.3 SHE in a toroidal plasma

The SHE, which accumulates over time, can result in more significant
$\varsigma/\ell$ when the group velocity is small. To illustrate this, let us
consider the propagation of electromagnetic waves in a toroidal plasma. We
assume

$\displaystyle\omega_{\mathrm{p}}(\mathbf{x})=\omega_{\mathrm{p,0}}\left[\exp\left({-\frac{(R-R_{0})^{2}}{2\sigma_{R}^{2}}-\frac{z^{2}}{2\sigma_{z}^{2}}}\right)+d\right],$
(15)

where $R\doteq(x^{2}+y^{2})^{1/2}$, $\sigma_{R}^{2}=0.1\,\text{m}^{2}$,
$\sigma_{z}^{2}=1\,\text{m}^{2}$, $d=0.01$, and the density maximum is located
at $(R_{0},z_{0})=(1,0)\,\text{m}$, where
$\omega_{\mathrm{p}}=\omega_{\mathrm{p,0}}=1.8\times 10^{11}\,\text{s}^{-1}$,
same as before. We also assume that the magnetic field is toroidal,
specifically, aligned with the unit-vector field $(-y/R,x/R,0)$ and
$\Omega(\mathbf{x})={\Omega_{0}}R_{0}/R(\mathbf{x})$, with
$\Omega_{0}=8.8\times 10^{10}\,\text{s}^{-1}$, also same as before.

Figure 3: The propagation of an RF wave in the electron-cyclotron range in (a)
the $(x,y)$ plane and (b) the $(R,z)$ plane. The gray scale indicates the
local density or $\omega_{\rm p}$ (a) in the plane $z=0$ and (b) in any
toroidal cross section. The stars mark the initial position of the rays. The
GO and XGO rays are shown as dashed blue and solid red curves, respectively.

Consider a wave starting at $\mathbf{x}_{0}=(0,1.45,0)\,\text{m}$ with initial
wavevector $\mathbf{k}_{0}=(-330,150,-250)\,\text{m}^{-1}$ and $\omega\approx
3.1\times 10^{10}\,\text{s}^{-1}$, which is the lowest-frequency mode in the
system. The numerical results are presented in Fig. 3 and show that the
separation between the XGO and GO trajectories is as large as $\varsigma\sim
0.1\,\text{m}$, which is about ten wavelengths. FW simulations for this case
would have to be 3-D, i.e., computationally expensive, so they are not
reported. Instead, we have calculated the parameters that determine XGO
applicability. We have found that $\epsilon\lesssim 0.06\ll 1$ [Fig. 4(a)] and
the passive mode closest to the active mode remains nonresonant on the whole
ray trajectory [Fig. 4(b)]. This means that breaking of the XGO ordering and
mode conversion that we have ignored are indeed not to be expected. In other
words, our simulations are well within the XGO validity regime, hence the
predicted large value of $\varsigma$ is not an artifact. Such a large
deviation can significantly affect resonant absorption of radiofrequency waves
in fusion applications [2]. Therefore, typical ray-tracing codes that are
based on GO instead of XGO are at risk of missing important physics, even if
usually the SHE is less pronounces than in our example.

Figure 4: (a) The local GO parameter $\epsilon$ along the GO and XGO
trajectories. The local length scale is calculated as
$L(\mathbf{x})\doteq\min(|\omega_{\mathrm{p}}/\nabla\omega_{\mathrm{p}}|,|\boldsymbol{\Omega}/\nabla\boldsymbol{\Omega}|)$.
The GO and XGO results are shown as dashed blue and solid red curves,
respectively. (b) The frequency $\omega_{m}$ of the passive mode closest to
the active mode evaluated on the XGO trajectory
$(\mathbf{x}(t),\mathbf{k}(t))$, in units $\omega$, as a function of the ray
path. Since $\omega_{m}/\omega-1\sim 1$, mode conversion is not to be
expected.

##  IV Conclusions

Here, we present the first systematic study of the SHE for magnetized plasmas.
We start with the XGO formulation of the SHE and derive a gauge-invariant form
of the ray equations that describe SHE for general waves [Eq. (10)]. We also
express the right-hand side in a form that is better suited for simulations
due to its “numerical gauge invariance” [Eqs. (12)]. Then, we perform ray-
tracing simulations based on these equations for electromagnetic waves in a
cold magnetized collisionless electron plasma slab and compare them with 2-D
FW simulations. We show that the FW simulations are in better agreement with
XGO, which retains the SHE, than they are with GO simulations, which ignores
the SHE. Finally, we present an example of a large SHE in toroidal plasma,
where a wave beam deviates from the GO trajectory by a distance of roughly ten
wavelengths. In fusion devices, such a large deviation can significantly
affect resonant absorption of radiofrequency waves. Therefore, typical ray-
tracing codes that are based on GO instead of XGO are at risk of missing
important physics, even if usually the SHE is less pronounces than in our
example.

###### Acknowledgements.

This research was supported by the Department of Energy through contract No.
DE-AC02-09CH11466. Y. F. thanks Peifeng Fan for fruitful discussions.

##  Appendix A Gauge invariance of the ray Lagrangian

In this section, we prove the gauge invariance of the ray Lagrangian defined
in Eq. (9):

$\displaystyle\mathcal{L}=\left[\dfrac{k_{\mu}}{2}-\mathsf{A}_{\mu}^{(x)}\right]\dot{x}^{\mu}-\left[\dfrac{x^{\mu}}{2}+\mathsf{A}^{\mu}_{(k)}\right]\dot{k}_{\mu}-(\Lambda-
U_{0}),$

where

$\displaystyle
U=U_{0}-\mathsf{A}_{\mu}^{(x)}\,\partial^{\mu}\Lambda+\mathsf{A}_{(k)}^{\mu}\,\partial_{\mu}\Lambda,$
(16) $\displaystyle
U_{0}\doteq\operatorname{Im}\left[\left(\partial^{\mu}\eta^{{\dagger}}\right)\mathsf{D}_{\mathrm{H}}\left(\partial_{\mu}\eta\right)\right],$
(17)
$\displaystyle\mathsf{A}_{\mu}^{(x)}\doteq\operatorname{Im}\left(\eta^{{\dagger}}\partial_{\mu}\eta\right),\quad\mathsf{A}_{(k)}^{\mu}\doteq\operatorname{Im}\left(\eta^{{\dagger}}\partial^{\mu}\eta\right).$
(18)

As a reminder, we assume the notation $\partial_{\mu}\doteq\partial/\partial
x^{\mu}$ and $\partial^{\mu}\doteq\partial/\partial k_{\mu}$, and $\eta$
denotes a unit polarization vector of the active eigenmode, which is also an
eigenvector of $\mathsf{D}_{\mathrm{H}}$:

$\displaystyle\mathsf{D}_{\mathrm{H}}\eta=\Lambda\eta,\quad\eta^{\dagger}\eta=1,\quad\Lambda=\eta^{\dagger}\mathsf{D}_{\mathrm{H}}\eta,$
(19)

and $\Lambda$ is the corresponding eigenvalue.

Let us consider a gauge transformation
$\eta\to\mathrm{e}^{\mathrm{i}\varphi}\eta$, where $\varphi(x^{\mu},k_{\mu})$
is a real function. This transformation does not affect $\Lambda$, while
$U_{0}$ is transformed as follows:

$\displaystyle
U_{0}\to\operatorname{Im}\big{[}(\partial^{\mu}\eta^{\dagger})\mathsf{D}_{\mathrm{H}}(\partial_{\mu}\eta)+(\partial^{\mu}\varphi)(\partial_{\mu}\varphi)\Lambda+\Phi\big{]},$
(20)
$\displaystyle\Phi=\mathrm{i}\Lambda\big{[}(\partial_{\mu}\varphi)(\partial^{\mu}\eta^{\dagger})\eta-(\partial^{\mu}\varphi)\eta^{\dagger}(\partial_{\mu}\eta)\big{]}.$
(21)

Since both $\varphi$ and $\Lambda$ are real, the term
$(\partial^{\mu}\varphi)(\partial_{\mu}\varphi)\Lambda$ is real and therefore
does not contribute to $U_{0}$. Also,

$\displaystyle
0=\partial(\eta^{\dagger}\eta)=(\partial\eta^{\dagger})\eta+\eta^{\dagger}(\partial\eta),$
(22)

so $(\partial\eta^{\dagger})\eta$ is purely imaginary. Here and further,
$\partial$ denotes a derivative with respect to any coordinate in the ray
phase space $(\mathbf{x},\mathbf{k})$. Hence, $\Phi$ is real and therefore
does not contribute to $U_{0}$ either. Then, according to Eq. (20), the gauge
transformation leaves $U_{0}$ intact.

Now let us consider the Berry connections $\mathsf{A}$. These functions
transform as follows:

$\displaystyle\mathsf{A}^{(x)}_{\mu}\to\operatorname{Im}\left(\eta^{\dagger}\partial_{\mu}\eta+\mathrm{i}\partial_{\mu}\varphi\right)=\mathsf{A}^{(x)}_{\mu}+\partial_{\mu}\varphi,$
(23) $\displaystyle\mathsf{A}_{\mu}^{(x)}\dot{x}^{\mu}$
$\displaystyle+\mathsf{A}_{(k)}^{\mu}\dot{k}_{\mu}$
$\displaystyle\to\mathsf{A}_{\mu}^{(x)}\dot{x}^{\mu}+\mathsf{A}_{(k)}^{\mu}\dot{k}_{\mu}+(\partial_{\mu}\varphi)\dot{x}^{\mu}+(\partial^{\mu}\varphi)\dot{k}_{\mu}$
$\displaystyle=\mathsf{A}_{\mu}^{(x)}\dot{x}^{\mu}+\mathsf{A}_{(k)}^{\mu}\dot{k}_{\mu}+\dot{\varphi}.$
(24)

The extra term $\dot{\varphi}$ is a total time derivative and thus does not
contribute to the equation of motion. Therefore, up to this insignificant full
time derivative, the non-canonical Lagrangian (9) is gauge-invariant and so
are the corresponding ray equations.

##  Appendix B Derivation of $\boldsymbol{\mathsf{F}}$ and
$\boldsymbol{U_{0}}$

The formulas for $\mathsf{F}$ and $U_{0}$ are well-known in condensed matter
physics, but not so well known for general waves and in plasma physics in
particular, so it is instructive to present their general derivation. Here, we
do so by adapting the corresponding calculation from Ref. [34].

Because $\mathsf{D}_{\mathrm{H}}$ is a Hermitian matrix, one can choose its
orthonormal eigenvectors to form a complete basis. Let us consider any one of
them, $\eta_{n}$, and decompose its derivative (with respect to any given
parameter) in this basis:

$\displaystyle\partial\eta_{n}=(\eta_{n}^{\dagger}\partial\eta_{n})\eta_{n}+\sum_{s\neq
n}(\eta_{s}^{\dagger}\partial\eta_{n})\eta_{s}.$ (25)

To calculate the coefficients in the latter sum, let us differentiate
$\mathsf{D}_{\mathrm{H}}\eta_{n}=\Lambda_{n}\eta_{n}$ and multiply the result
by $\eta_{m}^{\dagger}$ with $m\neq n$ from the left. This gives

$\displaystyle\eta_{m}^{\dagger}\partial\eta_{n}=\dfrac{\eta_{m}^{\dagger}(\partial\mathsf{D}_{\mathrm{H}})\eta_{n}}{\Lambda_{n}-\Lambda_{m}}\quad(m\neq
n),$ (26)

assuming $\Lambda_{n}\neq\Lambda_{m}$. Hence, one can rewrite Eq. (25) as

$\displaystyle\partial\eta_{n}=\left(\eta_{n}^{\dagger}\partial\eta_{n}\right)\eta_{n}+\sum_{m\neq
n}\dfrac{\eta_{m}^{\dagger}(\partial\mathsf{D}_{\mathrm{H}})\eta_{n}}{\Lambda_{n}-\Lambda_{m}}\eta_{m}.$
(27)

Plugging this into Eq. (17) yields

$\displaystyle U_{0}=\operatorname{Im}\sum_{m\neq
n}\dfrac{\eta_{n}^{\dagger}(\partial^{\mu}\mathsf{D}_{\mathrm{H}})\eta_{m}\eta_{m}^{\dagger}(\partial_{\mu}\mathsf{D}_{\mathrm{H}})\eta_{n}}{(\Lambda_{m}-\Lambda_{n})^{2}/\Lambda_{m}}.$
(28)

Similarly, plugging Eq. (27) into

$\displaystyle\mathsf{F}^{\mu\nu}\doteq
2\operatorname{Im}[(\partial^{\mu}\eta_{n}^{{\dagger}})\partial^{\nu}\eta_{n}]$
(29)

and making use of the fact that $(\partial\eta_{n}^{\dagger})\eta_{n}$ is
purely imaginary [cf. Eq. (22)], leads to

$\displaystyle\mathsf{F}^{\mu\nu}=2\operatorname{Im}\sum_{m\neq
n}\dfrac{\eta_{n}^{\dagger}(\partial^{\mu}\mathsf{D}_{\mathrm{H}})\eta_{m}\eta_{m}^{\dagger}(\partial^{\nu}\mathsf{D}_{\mathrm{H}})\eta_{n}}{(\Lambda_{n}-\Lambda_{m})^{2}}.$
(30)

Finally, let us choose $\eta_{n}$ to be the polarization vector of the active
mode, $\eta_{n}=\eta$, so $\Lambda_{n}=\Lambda$. By the dispersion relation,
one has $\Lambda=\mathcal{O}(\epsilon)$, so within the assumed accuracy Eqs.
(28) and (30) can as well be written as follows:

$\displaystyle U_{0}=\operatorname{Im}\sum_{m\neq
n}\dfrac{\eta_{n}^{\dagger}(\partial^{\mu}\mathsf{D}_{\mathrm{H}})\eta_{m}\eta_{m}^{\dagger}(\partial_{\mu}\mathsf{D}_{\mathrm{H}})\eta_{n}}{\Lambda_{m}},$
(31) $\displaystyle\mathsf{F}^{\mu\nu}=2\operatorname{Im}\sum_{m\neq
n}\dfrac{\eta_{n}^{\dagger}(\partial^{\mu}\mathsf{D}_{\mathrm{H}})\eta_{m}\eta_{m}^{\dagger}(\partial^{\nu}\mathsf{D}_{\mathrm{H}})\eta_{n}}{\Lambda_{m}^{2}}.$
(32)

Similar formulas for ${\mathsf{F}^{\mu}}_{\nu}$, ${\mathsf{F}_{\mu}}^{\nu}$,
and $\mathsf{F}_{\mu\nu}$ are derived in the same way.

##  Appendix C Construction of wave packets

Within XGO, terms $\mathcal{O}(\epsilon)$ in expressions for the field are not
negligible [31]. In particular, they must be retained when constructing
initial wave packets for full-wave simulations if the spin Hall effect must be
retained. In this section, we derive an explicit approximation for these terms
and apply it to cold-plasma waves.

A slow complex envelope $\psi(x^{\mu})$ is governed by

$\hat{\mathcal{D}}\psi=0,$ (33)

where $\hat{\mathcal{D}}$ is approximated by Eq. (1) of the main article up to
insignificant terms $\mathcal{O}(\epsilon^{2})$. This operator can be
represented as
$\hat{\mathcal{D}}\approx\mathsf{D}_{\mathrm{H}}(x^{\mu},\bar{k}_{\mu}(x^{\mu}))+\hat{\mathscr{D}}$,
where $\mathsf{D}_{\mathrm{H}}=\mathcal{O}(1)$ and
$\hat{\mathscr{D}}=\mathcal{O}(\epsilon)$ under the assumptions specified in
the main article. Then, one can expand $\psi$ in the basis of orthonromal
eigenvectors of $\mathsf{D}_{\rm H}(x^{\mu},\bar{k}_{\mu}(x^{\mu}))$ as

$\psi(x^{\mu})=\sum_{m}\eta_{m}\left(x^{\mu},\bar{k}_{\mu}(x^{\mu})\right)a_{m}(x^{\mu}),$
(34)

where $a_{n}$ are scalar amplitudes. Then, Eq. (33) gives

$\sum_{m}\Lambda_{m}\eta_{m}a_{m}=\mathcal{O}(\epsilon),$ (35)

whence $\Lambda_{m}a_{m}=\mathcal{O}(\epsilon)$ for each $m$. Consider the
region where $\mathsf{D}_{\mathrm{H}}$ has only one eigenvalue that is close
to zero, say $\Lambda_{n}=\mathcal{O}(\epsilon)$, i.e., only the $n$th mode is
on-shell (propagating wave that satisfies a dispersion relation). Such mode
may have $a_{n}=\mathcal{O}(1)$ and is called an active mode. The remaining
modes, for which $\Lambda_{m}=\mathcal{O}(1)$, have to have
$a_{m}=\mathcal{O}(\epsilon)$ and are called passive modes [31].

Although small, passive modes must be accounted in simulations that are
intended to capture the SHE. In particular, the initial wave envelope
$\psi(t=0)$ must be constructed with accuracy not less than
$\mathcal{O}(\epsilon)$. To do, let us represent the envelope as
$\psi=\eta_{n}a_{n}+\psi_{\perp}$,

$\displaystyle\psi_{\perp}\doteq\sum_{m\neq
n}\eta_{m}a_{m}=\mathcal{O}(\epsilon).$ (36)

Then,

$\displaystyle(\mathsf{D}_{\mathrm{H}}+\hat{\mathscr{D}})(\eta_{n}a_{n}+\psi_{\perp})=0,$
(37)

where an error $\mathcal{O}(\epsilon^{2})$ in the approximation of
$\hat{\mathcal{D}}$ has been ignored. Since
$\hat{\mathscr{D}}\psi_{\perp}=\mathcal{O}(\epsilon^{2})$, this term can be
ignored as well. Then, multiplying the equation by $\eta_{m}^{\dagger}$ with
$m\neq n$ from the left, one obtains

$a_{m}=-\dfrac{\eta_{m}^{\dagger}\hat{\mathscr{D}}(\eta_{n}a_{n})}{\Lambda_{m}}+\mathcal{O}(\epsilon^{2}).$
(38)

Therefore, up to $\mathcal{O}(\epsilon)$, the total wave field $\Psi$ can be
expressed in the following form parameterized by a single function, $a_{n}$:

$\Psi(\mathbf{x})=\mathrm{e}^{\mathrm{i}\theta}\left(a_{n}\eta_{n}-\sum_{m\neq
n}\dfrac{\eta_{m}^{\dagger}\hat{\mathscr{D}}(\eta_{n}a_{n})}{\Lambda_{m}}\right).$
(39)

For cold plasma, the dispersion operator is
$\hat{D}=\hat{H}-\mathrm{i}\partial_{t}$, where
$\hat{H}(\mathbf{x},-\mathrm{i}\partial_{\mathbf{x}})$ is defined in Eq. (12)
of the main article. Using $\theta=k_{\mu}x^{\mu}$ and
$\mathsf{D}_{\mathrm{H}}=H(\mathbf{x},\mathbf{k})-\omega$, the operator
$\hat{\mathcal{D}}=\mathsf{D}_{\mathrm{H}}+\hat{\mathscr{D}}$ can be
calculated exactly:

$\hat{\mathscr{D}}=\begin{pmatrix}0&0&0\\\
0&0&\mathrm{i}c\,\partial_{\mathbf{x}}\times\\\
0&-\mathrm{i}c\,\partial_{\mathbf{x}}\times&0\end{pmatrix}-\mathrm{i}\partial_{t},$
(40)

where $\partial_{t}=0$ for stationary waves.

## References

  * Fisch [1987] N. J. Fisch, Rev. Mod. Phys. 59, 175 (1987).
  * Prater  _et al._ [2008] R. Prater, D. Farina, Y. Gribov, R. W. Harvey, A. K. Ram, Y.-R. Lin-Liu, E. Poli, A. P. Smirnov, F. Volpe, E. Westerhof, _et al._ , Nucl. Fusion 48, 035006 (2008).
  * Figini  _et al._ [2012] L. Figini, J. Decker, D. Farina, N. B. Marushchenko, Y. Peysson, E. Poli, and E. Westerhof, in  _EPJ Web of Conferences_, Vol. 32 (EDP Sciences, 2012) p. 01011.
  * Reiman [1983] A. H. Reiman, Phys. Fluids 26, 1338 (1983).
  * Petty  _et al._ [2004] C. C. Petty, R. J. La Haye, T. C. Luce, D. A. Humphreys, A. W. Hyatt, J. Lohr, R. Prater, E. J. Strait, and M. R. Wade, Nucl. Fusion 44, 243 (2004).
  * Kritz  _et al._ [1982] A. H. Kritz, H. Hsuan, R. C. Goldfinger, and D. B. Batchelor, in  _Heating in Toroidal Plasmas 1982_ (Elsevier, 1982) pp. 707–723.
  * Pereverzev [1998] G. V. Pereverzev, Phys. Plasmas 5, 3529 (1998).
  * Smirnov and Harvey [2001] A. P. Smirnov and R. W. Harvey, CompX Report CompX-2000-01 (2001).
  * Poli  _et al._ [2001] E. Poli, A. G. Peeters, and G. V. Pereverzev, Comput. Phys. Commun. 136, 90 (2001).
  * Farina [2007] D. Farina, Fusion Sci. Technol. 52, 154 (2007).
  * Marushchenko  _et al._ [2014] N. B. Marushchenko, Y. Turkin, and H. Maaßberg, Comput. Phys. Commun. 185, 165 (2014).
  * Kravtsov and Orlov [1990] Y. A. Kravtsov and Y. I. Orlov,  _Geometrical Optics of Inhomogeneous Media_ , Vol. 38 (Springer, 1990).
  * Tracy  _et al._ [2014] E. R. Tracy, A. J. Brizard, A. S. Richardson, and A. N. Kaufman,  _Ray Tracing and Beyond: Phase Space Methods in Plasma Wave Theory_ (Cambridge University Press, 2014).
  * Stix [1992] T. H. Stix,  _Waves in Plasmas_ (Springer Science & Business Media, 1992).
  * Littlejohn and Flynn [1991] R. G. Littlejohn and W. G. Flynn, Phys. Rev. A 44, 5239 (1991).
  * Weigert and Littlejohn [1993] S. Weigert and R. G. Littlejohn, Phys. Rev. A 47, 3506 (1993).
  * Zygelman [1990] B. Zygelman, Phys. Rev. Lett. 64, 256 (1990).
  * Zygelman [2013] B. Zygelman, J. Phys. B 46, 134011 (2013).
  * Onoda  _et al._ [2004] M. Onoda, S. Murakami, and N. Nagaosa, Phys. Rev. Lett. 93, 083901 (2004).
  * Bliokh and Bliokh [2006] K. Y. Bliokh and Y. P. Bliokh, Phys. Rev. Lett. 96, 073903 (2006).
  * Bliokh  _et al._ [2008] K. Y. Bliokh, A. Niv, V. Kleiner, and E. Hasman, Nat. Photonics 2, 748 (2008).
  * Bliokh  _et al._ [2015] K. Y. Bliokh, F. J. Rodríguez-Fortuño, F. Nori, and A. V. Zayats, Nat. Photonics 9, 796 (2015).
  * Ruiz and Dodin [2015a] D. E. Ruiz and I. Y. Dodin, Phys. Lett. A 379, 2337 (2015a).
  * Ruiz and Dodin [2015b] D. E. Ruiz and I. Y. Dodin, Phys. Rev. A 92, 043805 (2015b).
  * Ling  _et al._ [2017] X. Ling, X. Zhou, K. Huang, Y. Liu, C.-W. Qiu, H. Luo, and S. Wen, Rep. Prog. Phys. 80, 066401 (2017).
  * Perez  _et al._ [2021] N. Perez, P. Delplace, and A. Venaille, Proc. R. Soc. Lond. A 477, 20200844 (2021).
  * Yamamoto [2018] N. Yamamoto, Phys. Rev. D 98, 061701 (2018).
  * Oancea  _et al._ [2020] M. A. Oancea, J. Joudioux, I. Y. Dodin, D. E. Ruiz, C. F. Paganini, and L. Andersson, Phys. Rev. D 102, 024075 (2020).
  * Ruiz and Dodin [2017] D. E. Ruiz and I. Y. Dodin, Phys. Plasmas 24, 055704 (2017).
  * Ruiz [2017] D. E. Ruiz,  _A geometric theory of waves and its applications to plasma physics_ , Ph.D. thesis, Princeton University (2017).
  * Dodin  _et al._ [2019] I. Y. Dodin, D. E. Ruiz, K. Yanagihara, Y. Zhou, and S. Kubo, Phys. Plasmas 26, 072110 (2019).
  * [32] Quasioptical schemes [31, 43] do not infer the envelope evolution from the rays but rather evolve the envelope independently. As a result, the envelope is allowed to drift away from the reference ray and SHE is automatically accounted for as long as this effect is not too large.
  * Simon [1983] B. Simon, Phys. Rev. Lett. 51, 2167 (1983).
  * Berry [1984] M. V. Berry, Proc. R. Soc. Lond. A. 392, 45 (1984).
  * Dodin  _et al._ [2017] I. Y. Dodin, D. E. Ruiz, and S. Kubo, Phys. Plasmas 24, 122116 (2017), 1709.02841 .
  * Dodin and Startsev [2021] I. Y. Dodin and E. A. Startsev, Phys. Plasmas 28, 092101 (2021), 2005.14369 .
  * Gao  _et al._ [2016] W. Gao, B. Yang, M. Lawrence, F. Fang, B. Béri, and S. Zhang, Nat. Commun. 7, 12435 (2016).
  * Fu and Qin [2021] Y. Fu and H. Qin, Nat. Commun. 12, 3924 (2021).
  * Fu and Qin [2022] Y. Fu and H. Qin, J. Plasma Phys. 88, 835880401 (2022).
  * Inan and Marshall [2011] U. S. Inan and R. A. Marshall,  _Numerical Electromagnetics: the FDTD Method_ (Cambridge University Press, 2011).
  * Parker  _et al._ [2020] J. B. Parker, J. B. Marston, S. M. Tobias, and Z. Zhu, Phys. Rev. Lett. 124, 195001 (2020).
  * Qin and Fu [2023] H. Qin and Y. Fu, Sci. Adv. 9, eadd8041 (2023).
  * Balakin  _et al._ [2007] A. A. Balakin, M. A. Balakina, G. V. Permitin, and A. I. Smirnov, J. Phys. D: Appl. Phys. 40, 4285 (2007).