text:
\section{Introduction}\label{sec:intro}
This paper is aim to study statistics on bounded permutations and $213$-avoiding bounded permutations.

Let us give an overview of notation and terminology first.
Denote by $S_n$  the set of the permutations of $[n]$, where $[n]=\{1,2,\ldots,n\}$.
For a permutation $\pi=\pi_1 \pi_2 \cdots \pi_n$ in $S_n$,
a pair $(\pi_i,\pi_j)$ is called an inversion if $i<j$ and $\pi_i>\pi_j$.
Let $\inv(\pi)$ denote the number of inversions of $\pi$.
An element $i$ is called a descent of $\pi$ if $\pi_i >\pi_{i+1}$ and the descent number $\des(\pi)$ is defined to be the number of the descents of $\pi$. We say $i$ is an excedance of $\pi$ if $\pi_i > i$. While, $i$ is called
a weak excedance of $\pi$
if $\pi_i \geq i$.  Otherwise, $i$ is called a non-weak excedance.
Any permutation
statistics with the same distribution as $\inv$ are referred to as Mahonian statistics, while those equidistributed
with  $\des$ and the excedance number are called Eulerian statistics.

Given a word $w=w_1 w_2 \cdots w_n$  of length $n$, let
\begin{align*}
  \Lmap(w) &= \{i\colon w_j <w_i \text{ for all } j<i \}, \\
 \Lmal(w) &=  \{w_i \colon w_j <w_i \text{ for all } j<i \}, \\
  \Rmip(w) &= \{i\colon w_j >w_i \text{ for all } j>i \},\\
  \Rmil(w) &= \{w_i \colon w_j >w_i \text{ for all } j>i \}, \\
  \Rmal(w) &= \{w_i\colon w_j <w_i \text{ for all } j>i \}
\end{align*}
be the set of left-to-right maximum places, left-to-right maximum letters,
right-to-left minimum positions, right-to-left minimum letters  and
right-to left maximum letters respectively.
Their corresponding numerical statistics are denoted by
$\lmax(w) = \# \Lmal(w)$, $\rmin(w) = \#\Rmil(w)$ and
$\rmax(w) = \# \Rmal(w).$

Besides the linear orders, permutations can be also seen as functions.
For example, we may consider $\sigma=34152$ as a function $\sigma \colon [5] \to [5]$ with $
\sigma(1)=3,
\sigma(2)=4, \sigma(3)=1, \sigma(4)=5$ and $\sigma(5)=2$.
Thus, we can write $\sigma=(13)(245)$  and call it a cycle notation of $\sigma$.
Assume that $\sigma=\sigma_1 \sigma_2 \cdots \sigma_n$ and the bijection
$i \mapsto \sigma_i$ has $r$ disjoint cycles, whose minimum elements are $c_1, c_2,\ldots, c_r$.
Let $\Cyc(\sigma)=\{c_1, c_2,\ldots, c_r\}$  and the number of cycles of $\sigma$, $\cyc(\sigma)$, is defined to be the cardinality of $\Cyc(\sigma)$.

An occurrence of a classical pattern $p$ in a permutation $\sigma$ is a subsequence of $\sigma$ that is order-isomorphic to $p$.  Babson and Steingr\'{i}msson \cite{BS} generalized the notion of permutation patterns, to what are now known as vincular patterns, see \cite{Kitaev2011}.
 Adjacent letters in a vincular pattern which are
 underlined must stay adjacent when they are placed  back to the original permutation.
 For an instance, $41253$  contains only one occurrence of the vincular pattern $\underline{31}42$ in its subsequence $4153$, but not in $4253$.

Motivated by juggling sequence and bubble sort, Chung, Claesson, Dukes and Graham \cite{ChungClaesson} introduced the maximum drop size statistic on permutations. For more about bounded permutations, see \cite{ChungGraham, Joanna, Hyatt}.
We say that $\pi \in S_n$ has a drop at $i$ if $\pi_i <i$ and the drop size is meant to be $i-\pi_i$.
The maximum drop size of $\pi$ is defined by
\begin{equation*}
\mathrm{maxdrop(\pi)}=\max\{i-\pi_i\colon 1 \leq i \leq n\}.
\end{equation*}
Let $A(n,k)=\{\pi \in S_n \colon \maxdrop(\pi) \leq k\}$.
For convenience, we call permutations with bounded drop size
the bounded permutations.

Petersen\cite{Petersen} introduced a new  statistic, which is called the sorting index. Given a permutation $\pi$ in $S_n$, it is known that $\pi$
has a unique decomposition into transpositions
\[\pi=(i_1,j_1)(i_2,j_2)\cdots (i_k,j_k),\]
where
\[j_1<j_2< \cdots <j_k\]
and
\[i_1<j_1,i_2<j_2,\ldots,i_k<j_k.\]
The sorting index is defined by
\[\mathrm{sor(\pi)}=\sum_{r=1}^{k}(j_r-i_r).\]

Petersen showed that the sorting index is Mahonian.
Moreover, by using two different factorizations of $\sum_{\pi \in S_n} \pi$, he derived that
\begin{equation*}
    \sum_{\pi \in S_n} q^{\mathrm{sor(\pi)}}t^{\mathrm{cyc(\pi)}}=\sum_{\pi \in S_n} q^{\mathrm{inv(\pi)}}t^{\mathrm{rmin(\pi)}}=\prod_{i=1}^{n}
    (t+[i]_q-1),
\end{equation*}
where $[i]_q=1+q+\cdots+q^{i-1}$.

Based on the standard algorithm for generating a random permutation, Wilson\cite{wilson2010} defined a permutation statistic $\DIS$. It turns out that for a permutation $\pi$ in $S_n$, we have $\DIS(\pi^{-1})=\sor(\pi)$.
The first of our main results in this paper is to generalize Petersen's results to   bounded permutations, which are stated as
follows.

\begin{theorem}\label{thm:tha}
For $0 \leq k<n$, $(\inv,\lmax)$ and $(\DIS,\cyc)$ have the same joint distribution over $A(n,k)$. Moreover,  we have
\begin{equation*}
     \sum_{\sigma \in A(n,k)} q^{\inv(\sigma)}t^{\lmax(\sigma)}=\sum_{\sigma \in A(n,k)} q^{\DIS(\sigma)}t^{\cyc(\sigma)}=(t+[k+1]_q-1)^{n-k}
     \prod_{i=1}^{k}(t+[i]_q-1).
\end{equation*}
\end{theorem}
Moreover, we will show that a bijection constructed by Foata and Han \cite{Han} can be restricted to give an explanation of the equidistribution above.

Hyatt and Remmel \cite{HyattRemmel} initialed
the study of pattern avoiding bounded permutations. They gave the number of $231$-avoiding bounded permutations with $j$ descents.
 Our second main result is concerned with
 the distribution of descents over $213$-avoiding bounded permutations.
Let $A_{n,k}(\sigma)$
 denote the set of $\sigma$-avoiding permutations in $A(n,k)$.
 We have the following proposition.

\begin{proposition}\label{prop:213ballot}
For $0 \leq k \leq n$, we have $A_{n,k}(213)$ is enumerated by the
ballot number $C_{n,k}$, where
\[C_{n,k}=\frac{n-k+1}{n+1}{{n+k}\choose{k}}.\]
\end{proposition}

Let $S_n^k(321)$ be the set of $321$-avoiding permutations of length $n$ with the last element $k+1$. Lin and Kim \cite{LinKim}
mentioned that  $S_{n+1}^k(321)$ is enumerated by $C_{n,k}$.
Bailey \cite{Bailey} introduced non-negative $n,k$-arrangements
of $1$'s and $-1$'s. Assume that $\Gamma_{n,k}$ is the set of sequences with non-negative partial sums that can be formed by
 $n$ $1$'s and $k$ $-1$'s. Namely, given $a=a_1 a_2 \cdots a_{n+k} \in \Gamma_{n,k}$, we have $a_1+\cdots +a_{i} \geq 0$ for $1 \leq i \leq n+k$. Bailey showed that $\Gamma_{n,k}$ is also counted by
 $C_{n,k}$.

Let $\vnw(\pi)$ be the number of the non-weak excedances  that are before the last element of $\pi$.
For $a \in \Gamma_{n,k}$, let $\vpk(a)$ be the number of $a_i=1$ such that $a_i$ is not the rightmost $1$ and $a_{i+1}=-1$ for $1 \leq i \leq n+k-1$.
It should be mentioned that
$a$ can be also seen as a ballot path from $(0,0)$ to $(n,k)$,
while the statistic $\vpk$ can be seen as a variation of  the number of NE-turns over ballot paths as studied by Su \cite{Su}.

We will show a stronger equidistribution
over $A_{n,k}(213)$, $S_{n+1}^k(321)$ and $\Gamma_{n,k}$.

\begin{theorem}\label{thm:equidis}
Statistic $\des$ over $A_{n,k}(213)$,
statistic $\vnw$ over $ S^k_{n+1}(321)$ and statistic $\vpk$ over $ \Gamma_{n,k}$ are equally distributed.
\end{theorem}

\begin{theorem}\label{thm:generating}
Let
\[G(p,q,z)=\sum_{\pi \in A_{n,k}(213),\, 0 \leq k \leq n}p^{\des(\pi)} q^{k}z^n,  \]
then we have
\begin{align}
G(p,q,z)=\frac{1-pqz-(1-z)q+(zq-pqz-q)\widetilde{F}_0}{1-z-pqz-(1-z)q}, \label{eq:main}
\end{align}
where
\[
\widetilde{F}_0=\frac{1-zq(1+p)-\sqrt{(1+zq(1-p))^2-4zq}}{2pqz}.
\]
\end{theorem}

The outline of this paper is as follows. In Section \ref{sec:TH1}, we shall prove Theorem~\ref{thm:tha} algebraically and bijectively.
In Section \ref{sec:TH23}, we will investigate
$A_{n,k}(213)$ as well as the distributions of $\des$
over $A_{n,k}(213)$.

\section{A proof of Theorem~\ref{thm:tha}}\label{sec:TH1}

In this section, we will give two different factorizations of $\sum_{\sigma \in S(n,k)} \sigma$ by maintaining Petersen's method,
where
$$S(n,k)=\{\sigma \in S_n \colon \max_i(\sigma_i-i )\leq k\}.$$
These two factorizations allow us to give a proof of Theorem \ref{thm:tha}.

Recall that both the set of transpositions $T=\{(i,j) \colon 1 \leq i<j \leq n \}$
and the set of adjacent transpositions $S=\{(i,i+1)\colon 1\leq i \leq n-1\}$
are  generating sets for $S_n$. For convenience, we write $t_{i,j}=(i,j)$ and $s_i=(i,i+1)$.  The readers are recommended to see \cite{Brenti} for a comprehensive introduction.

Given a permutation $\pi$ in $S_{n-1}$, in order to generate a permutation in $S_n$, we may insert $n$ in all
possible positions of $\pi$. This can be performed analogously to
generate a permutation in $S(n,k)$ from $S(n-1,k)$.
Clearly, $S(n,k)=S_n$ when $n \leq k$ and $S(n,0)=12 \cdots n$.
Hence, we need only to consider the cases when $0 < k < n$.
In terms of the group algebra, for  $0 < k < n$, we define
\begin{equation*}
\Psi_{i,k}= \left\{
  \begin{array}{ll}
1+s_i + s_i s_{i-1}+ \cdots +s_i s_{i-1} \cdots s_1, & \mbox{ $0<i<k$,}\\[6pt]
1+s_i + s_i s_{i-1}+ \cdots +s_i s_{i-1} \cdots s_{i+1-k}, & \mbox{ $k \leq i \leq n-1$.}
 \end{array} \right.
\end{equation*}
Notice that each element in $\Psi_{i,k}$ can be seen as a reduced expression in $S_{i+1}$.

\begin{lemma}
For $n \geq 2$ and $0< k< n$, we have
\begin{equation}\label{eq:PSI}
  \sum_{w \in S(n,k)}w=\Psi_{1,k}\Psi_{2,k}\cdots\Psi_{n-1,k}.
\end{equation}
\end{lemma}

\begin{proof}
 We will give a proof by induction on $n$. It is clear that $\sum_{w \in S(2,k)} w=\Psi_{1,k}$. We assume that
equation (\ref{eq:PSI}) holds for $n=m-1$, namely,
\begin{equation}\label{eq:induction_m-1}
  \sum_{u \in S(m-1,k)} u=\Psi_{1,k}\Psi_{2,k}\cdots\Psi_{m-2,k}.
\end{equation}
We proceed to prove that it holds for $n=m$.
Clearly, we can identify the elements in $S(m-1,k)$ with the set $$\{\sigma \in S(m,k) \colon \sigma(m)=m\}.$$
Assume that $\sigma=\sigma_1\sigma_2\cdots \sigma_{m-1}m \in  S(m,k)$,
there are two cases to consider.
If $k > m-1$, then we have
\begin{align*}
 \sigma \cdot \Psi_{m-1,k}&= \sigma+ \sigma s_{m-1}+ \cdots +\sigma s_{m-1} s_{m-2} \cdots s_1 \\
  &=\sigma_1\sigma_2\cdots \sigma_{m-1}m+\sigma_1\sigma_2\cdots m\sigma_{m-1}+ \cdots +m\sigma_1\sigma_2\cdots \sigma_{m-1}.
\end{align*}
If $k < m$,  we have
\begin{align*}
 \sigma \cdot \Psi_{m-1,k}&= \sigma+ \sigma s_{m-1}+\sigma s_{m-1} s_{m-2} \cdots +\sigma s_{m-1} s_{m-2} \cdots s_{m-k} \\
  &=\sigma_1\sigma_2\cdots \sigma_{m-1}m+\sigma_1\sigma_2\cdots m\sigma_{m-1}+ \cdots + \sigma_1\sigma_2\cdots\sigma_{m-k-1} m \sigma_{m-k}\cdots  \sigma_{m-1}.
\end{align*}
Note that $m$ appears at
all possible positions in the above two cases such that $max_i\{\pi_i -i \}\leq k$. Hence, we have
\begin{equation}\label{eq:induction_m}
\sum_{w \in S(m,k)} w=\sum_{\sigma \in S(m,k), \sigma(m)=m} \sigma \cdot \Psi_{m-1,k}= \sum_{u \in S(m-1,k)} u \cdot \Psi_{m-1,k}.
\end{equation}
Then, equation (\ref{eq:PSI}) follows from (\ref{eq:induction_m-1})
and (\ref{eq:induction_m}). This completes the proof.
\end{proof}

Based on the factorization above, we obtain the following theorem.
\begin{theorem}\label{tha1}
For $n \geq 1$ and $0< k \leq  n$, we have
\begin{equation}\label{eq:orign}
\sum_{\sigma \in A(n,k)} q^{\mathrm{inv(\sigma)}}t^{\mathrm{lmax(\sigma)}}=(t+[k+1]_q-1)^{n-k}
     \prod_{i=1}^{k}(t+[i]_q-1).
\end{equation}
\end{theorem}

\begin{proof}
It is easy to see that  $\sigma \in A(n,k)$ if and only if
$\sigma^{-1} \in S(n,k)$ and  $lmax(\sigma)=rmin(\sigma^{-1})$.
It follows that
 \[\sum_{\sigma \in A(n,k)} q^{\mathrm{inv(\sigma)}}t^{\mathrm{lmax(\sigma)}}
 =
 \sum_{\sigma \in S(n,k)} q^{\mathrm{inv(\sigma)}}t^{\mathrm{rmin(\sigma)}}.
 \]
 Hence, to prove (\ref{eq:orign}), it suffices to show that
 \begin{equation}\label{eq:suffice}
 \sum_{\sigma \in S(n,k)} q^{\mathrm{inv(\sigma)}}t^{\mathrm{n-rmin(\sigma)}}=(1+t[k+1]_q-t)^{n-k}
     \prod_{i=1}^{k-1}(1+t[i+1]_q-t).
 \end{equation}

Let $\varphi$  be a linear map from $\mathbb{Z}[S(n,k)]$
to $\mathbb{Z}[q,t]$ such that $\mathrm{\varphi(\sigma)=q^{inv(\sigma)}t^{n-rmin(\sigma)}}$.
By the definition of $\Psi_{i,k}$, we see that
\begin{equation}\label{eq:varphipsi}
\varphi(\Psi_{i,k})= \left\{
  \begin{array}{ll}
 1+qt+\cdots +q^i t, & \mbox{ $0<i<k$},\\[6pt]
 1+qt+\cdots +q^k t, & \mbox{ $k \leq i \leq n-1$}.
 \end{array} \right.
\end{equation}

For $u \in S(i,k)$ with $u_i=i$ and $k+1 \leq i \leq n$, we deduce that
\begin{align*}
  \varphi(u \cdot \Psi_{i-1,k}) &= \varphi(u)+ \varphi(u s_{i-1})+\varphi(u s_{i-1} s_{i-2}) + \cdots +\varphi(u s_{i-1} s_{i-2} \cdots s_{i-k})\\[3pt]
   &=\varphi(u)+qt\varphi(u)+q^2t\varphi(u)+
   \cdots+q^kt\varphi(u)\\[3pt]
&=\varphi(u) \varphi(\Psi_{i-1,k}).
\end{align*}
Similarly, we may show that $\varphi(u \cdot \Psi_{i-1,k})=\varphi(u) \varphi(\Psi_{i-1,k})$  for $1 < i \leq k$.

Hence, we deduce that
\begin{align*}
   \varphi(\Psi_{1,k}\Psi_{2,k} \cdots \Psi_{n-1,k})  & =\varphi(\sum_{w \in S(n,k),w_n=n} w \cdot\Psi_{n-1,k} )  \\[3pt]
    &=\sum_{w \in S(n,k),w_n=n} \varphi(w \cdot\Psi_{n-1,k} ) \\[3pt]
    &=\sum_{w \in S(n,k),w_n=n} \varphi(w) \varphi(\Psi_{n-1,k} )\\[3pt]
    &=\varphi(\sum_{w \in S(n,k),w_n=n} w) \varphi(\Psi_{n-1,k} )\\[3pt]
    &=\varphi(\Psi_{1,k}\Psi_{2,k} \cdots \Psi_{n-2,k})\varphi(\Psi_{n-1,k} ).
\end{align*}
Then, (\ref{eq:suffice}) follows from (\ref{eq:varphipsi}).
\end{proof}

By setting $t=1$ in (\ref{eq:orign}), we deduce the following corollary, which coincides with Corollary 2.2
in \cite{ChungClaesson}.
\begin{corollary}
For $n \geq 1$ and $0< k \leq  n$, we have
\begin{equation*}
\sum_{\sigma \in A(n,k)} q^{\mathrm{inv(\sigma)}} =[k+1]_q ^{n-k} [k]_q! .
\end{equation*}
\end{corollary}

Analogously, we proceed to give another factorization of $\sum_{\sigma \in S(n,k)} \sigma$.
For  $0 < k < n$, we define
\begin{equation*}
   \Phi_{i,k}=
   \begin{cases}
  1+t_{i,i+1} + t_{i-1,i+1} + \cdots + t_{1,i+1}; & \mbox{ $0<i < k$}\\
  1+t_{i,i+1} + t_{i-1,i+1} + \cdots + t_{i+1-k,i+1}. & \mbox{ $k \leq i \leq n-1$}\\
   \end{cases}
\end{equation*}

The following lemma shows that how each element in $S(n,k)$
can be generated in terms of the minimal length product of reflections.

\begin{lemma} \label{fac_a2}
For $n \geq 2$ and $0< k< n$, we have
\begin{equation}\label{eq:PHI}
  \sum_{\sigma \in S(n,k)} \sigma=\Phi_{1,k}\Phi_{2,k}\cdots\Phi_{n-1,k}.
\end{equation}
\end{lemma}

\begin{proof}
We will give a proof by induction. Clearly,  $\sum_{\sigma \in S(2,k)} \sigma=\Phi_{1,k}$. We assume that
equation (\ref{eq:PHI}) holds for $n=m-1$.
Now we need to prove that it holds for $n=m$.
Recall that given an element $\sigma=\sigma_1\cdots \sigma_{m-1} $ in $S(m-1,k)$, we may identify  $\sigma$ with the permutation $ \sigma_1 \sigma_2\cdots \sigma_{m-1}m.$ We consider two cases.
If $k > m-1$, then we have
\begin{align*}
 \sigma \cdot \Phi_{m-1,k}&= \sigma+ \sigma t_{m-1,m}+ \cdots +\sigma t_{1,m} \\
  &=\sigma_1\sigma_2\cdots \sigma_{m-1}m+\sigma_1\sigma_2\cdots m\sigma_{m-1}+ \cdots +m\sigma_2\cdots \sigma_{m-1}\sigma_{1}.
\end{align*}
If $ k< m$, then we have
\begin{align*}
 \sigma \cdot \Phi_{m-1,k}&= \sigma+ \sigma t_{m-1,m}+ \cdots +\sigma t_{m-k,m} \\
  &=\sigma_1\sigma_2\cdots \sigma_{m-1}m+\sigma_1\sigma_2\cdots m\sigma_{m-1}+ \cdots + \sigma_1\sigma_2\cdots\sigma_{m-k-1} m \sigma_{m-k+1}\cdots \sigma_{m-1}\sigma_{m-k}.
\end{align*}
Notice that in the second case, the position of $m$ is restricted.
It can only change the position with $\sigma_{m-k},\sigma_{m-k+1}, \ldots, \sigma_{m-1}$.
Thus each element $\pi$ in the above sum satisfy that $max_i\{\pi_i -i \}\leq k$.
Hence, we deduce that
$$
\sum_{w \in S(m,k)} w=\sum_{\sigma \in S(m,k), \sigma(m)=m} \sigma \cdot \Phi_{m-1,k}=\Phi_{1,k}\Phi_{2,k}\cdots\Phi_{m-1,k}.$$
\end{proof}

The factorization above leads to the following theorem.
\begin{theorem} \label{tha2}
For $n \geq 1$ and $0< k \leq  n$, we have
\begin{equation}\label{eq:orign2}
\sum_{\sigma \in A(n,k)} q^{\mathrm{DIS(\sigma)}}t^{\mathrm{cyc(\sigma)}}=(t+[k+1]_q-1)^{n-k}
     \prod_{i=1}^{k}(t+[i]_q-1).
\end{equation}
\end{theorem}

\begin{proof}
Since $\mathrm{sor(\sigma^{-1})=DIS(\sigma)}$  and $\mathrm{cyc(\sigma)=cyc(\sigma^{-1})}$,
it suffices to show that
 \begin{equation}\label{eq:suffice2}
 \sum_{\sigma \in S(n,k)} q^{\mathrm{sor(\sigma)}}t^{n-\mathrm{cyc(\sigma)}}=(1+t[k+1]_q-t)^{n-k}
     \prod_{i=1}^{k-1}(1+t[i+1]_q-t).
 \end{equation}

Let $\phi$  be a linear map from $\mathbb{Z}[S(n,k)]$
to $\mathbb{Z}[q,t]$ such that $\mathrm{\phi(\sigma)=q^{sor(\sigma)}t^{n-cyc(\sigma)}}$.
From the construction, it is easily seen that
\begin{equation*}
  \phi(\Phi_{i,k})=
   \begin{cases}
  1+qt+\cdots +q^i t; & \mbox{ $0<i<k$}\\
  1+qt+\cdots +q^k t. & \mbox{ $k \leq i \leq n-1$}\\
   \end{cases}
\end{equation*}

Let $\sigma=\sigma_1\sigma_2\cdots\sigma_m$ with $\sigma_m=m$.
When exchange the position of $\sigma_m$ and $\sigma_i$, we investigate how the statistics $\mathrm{sor}$ and $\mathrm{cyc}$ behaves in $\sigma$. It is easily seen that
the statistic  $\mathrm{sor}$ is increased by $m-i$.
If $i=m$,
the statistic  $\mathrm{cyc}$ remains the same.
If $i<m$,   $\mathrm{cyc}$ is decreased by $1$.

Assume that $u \in S(i,k)$ with $u_i=i$ and $k+1 \leq i \leq n$. We can verify that
\begin{align*}
  \phi(u \cdot \Phi_{i-1,k}) & =\phi(u)+\phi(ut_{i-1,i})+ \cdots + \phi(ut_{i-k,i}) \\[3pt]
   &=\phi(u)+qt\phi(u)+\cdots+q^kt\phi(u)\\[3pt]
   &=\phi(u) \phi(\Phi_{i-1,k}).
\end{align*}
Similarly, we may prove that $ \phi(u \cdot \Phi_{i-1,k})=\phi(u) \phi(\Phi_{i-1,k})$ for $1<i \leq k$.

Hence, we deduce that $\phi(\Phi_{1,k}\Phi_{2,k} \cdots \Phi_{n-1,k})=\phi(\Phi_{1,k})\phi(\Phi_{2,k}) \cdots \phi(\Phi_{n-1,k})$.
It follows that
\begin{align*}
  \sum_{\sigma \in S(n,k)} q^{\mathrm{sor(\sigma)}}t^{\mathrm{n-cyc(\sigma)}} & =\phi(\sum_{\sigma \in S(n,k)} \sigma) \\[3pt]
  &=\phi(\Phi_{1,k}\Phi_{2,k} \cdots \Phi_{n-1,k}) \\[7pt]
  &=\phi(\Phi_{1,k})\phi(\Phi_{2,k}) \cdots \phi(\Phi_{n-1,k})\\[3pt]
  &=(1+t[k+1]_q-t)^{n-k}
     \prod_{i=1}^{k-1}(1+t[i+1]_q-t).
\end{align*}
This completes the proof.
\end{proof}

Combining Theorem \ref{tha1} and Theorem \ref{tha2}, we
give a proof of Theorem \ref{thm:tha}.

It should be mentioned that Chen, Gong and Guo\cite{Chen}
found that a bijection on $S_n$ defined by Foata and Han\cite{Han} mapped the statistics $\mathrm{(inv,rmin)}$ to
$\mathrm{(sor, cyc)}$. In fact, we claim that this bijection
also serves as a bijection on $S(n,k)$ that sends $\mathrm{(inv,rmin)}$ to $\mathrm{(sor, cyc)}$, which leads to a bijective proof of the equidistribution of $\mathrm{(inv,rmin)}$ and
$\mathrm{(sor, cyc)}$ over $S(n,k)$.
We present Foata and Han's bijection first.

Let $\mathrm{SE_n}$ be the set of all sequences  $a=(a_1,a_2,\ldots,a_n )$ such that $1 \leq a_i \leq i$ for $i \in [n]$. The Lehmer code of a permutation $\sigma=\sigma_1\sigma_2\cdots \sigma_n \in S_n$ is defined to be the sequence $a=Leh(\sigma)=(a_1,a_2,\ldots,a_n )$, where
$$
a_i=|\{j\colon 1 \leq j \leq i, \sigma_j \leq \sigma_i\}|.
$$
Define the A-code of a permutation $\sigma$ by $\mathrm{\text{A-code}(\sigma)=Leh ~\sigma^{-1}}$.
For $\sigma \in S_n$ and $i \in [n]$, let $k =k(i)$ be the smallest integer $k \geq 1$ such that $\sigma^{-k}(i) \leq i$. Then define
$$
\text{B-code}(\sigma)=(b_1,b_2, \ldots, b_n)~~ \text{with} ~~
b_i:=\sigma ^{-k(i)}(i).
$$
Let $\gamma=(\text{B-code})^{-1}\circ \text{A-code}$.

Combining the results of Foata and Han\cite{Han}  and Chen et al.\cite{Chen}, it is easy to see that
\[
(\inv,\Rmil,\Lmap)\sigma=(\sor,\Cyc,\Lmap)\gamma(\sigma).
\]

We assert the following proposition without giving a proof.
\begin{proposition}\label{prop:keeplmax}
 For $\sigma \in S_n$,
\begin{itemize}
  \item [1.] $Lmal(\sigma)=Rmip(\sigma^{-1})=Rmip(Leh(\sigma^{-1}))=Rmip(\text{A-code}(\sigma))$.
  \item [2.]  $Lmal(\sigma)=Rmip(\text{B-code}(\sigma))$.

\end{itemize}
\end{proposition}
Following Proposition \ref{prop:keeplmax}, we deduce that
$Lmal(\sigma)=Lmal(\gamma(\sigma))$.
Notice that the bijection $\gamma$ also keeps $\mathrm{Lmap}$. It follows that $\gamma$ also keeps the
statistic $\mathrm{\max_i \{\sigma_i-i\}}$, which
implies that $\gamma$ is   a bijection on $S(n,k)$.

\begin{proposition}
The map  $\gamma=(\text{B-code})^{-1}\circ \text{A-code}$
keeps the statistic $r:=\mathrm{\max_i \{\sigma_i-i\}}$,
that is, for any permutation $\sigma \in S_n$, we have
\[r (\sigma)=r(\gamma(\sigma)).\]
\end{proposition}
\begin{theorem}
$\gamma$ can be restricted to a bijection over $S(n,k)$ such that for $\sigma \in S(n,k)$
\[(\inv,\Rmil)\sigma=(\sor,\Cyc)\gamma(\sigma).\]
\end{theorem}
\begin{example}
Given $\sigma=571492638$, then $\text{A-code}(\sigma)=123215285$ and
$\text{B-code}^{-1}(123215285)=573291486$.
Hence, we have $\gamma(571492638)=573291486$.
It is easy to check that
\begin{align*}
  \Lmal(571492638)&=\Lmal(573291486)=\{5,7,9\},\\[3pt]
  \Lmap(571492638)&=\Lmap(573291486)=\{1,2,5\},\\[3pt]
  r(571492638)&=r(573291486)=5.
\end{align*}
\end{example}

\section{ $A_{n,k}(213)$ and Distribution of $\des$ over  $A_{n,k}(213)$ }\label{sec:TH23}

In this section, we will show that $A_{n,k}(213)$ is calculated by
the ballot number. Further, we provide bijections between any two of the structures $A_{n,k}(213)$, $S_{n+1}^{k}(321)$ and $\Gamma_{n,k}$.
Based on this, we deduce the distribution of $\des$ over $A_{n,k}(213)$,
which can be seen as  refinements of both Narayana numbers and ballot numbers.

To give a proof of Proposition \ref{prop:213ballot},
we first recall some properties of $C_{n,k}$.
The beginnings of $C_{n,k}$ are given in Table 1

\begin{table}[htp]\label{tab:ballot}
\begin{center}
\begin{tabular}{ c| c c c c c c c c }

  \hline
  {n}$\backslash${k} & 0 & 1 & 2 & 3 & 4 & 5 &6 &7\\ \hline
  0 & 1 &   &   &   &   &  & & \\
  1 & 1 & 1 &   &   &   &  & & \\
  2 & 1 & 2 & 2 &   &   &  & & \\
  3 & 1 & 3 & 5 & 5 &   &  & & \\
  4 & 1 & 4 & 9 & 14 & 14 & & &  \\
  5 & 1 & 5 & 14 & 28 & 42 & 42 &  &  \\
  6 & 1 & 6 & 20 & 48 & 90 & 132 & 132 &  \\
  7 & 1 & 7 & 27 & 75 & 165 & 297 & 429 &429  \\
  \hline
\end{tabular}
\end{center}
\vspace{0.5cm}
\caption{The beginnings of the ballot number $C_{n,k}$}
\end{table}
It can be checked that $C_{n,k}$ satisfies the following recurrences
\begin{eqnarray}
  C_{n,k} &=& C_{n-1,k}+C_{n,k-1}, \label{eq:re1}\\[4pt]
  C_{n,k}&=& C_{n-1,k}+C_{n-1,k-1}+\cdots + C_{n-1,1}+C_{n-1,0}. \label{eq:re2}
\end{eqnarray}

\begin{lemma}\label{lem:lastmaxdrop}
For $\pi \in S_n(213)$, we have
$\maxdrop(\pi)=n-\pi_n$.
\end{lemma}

\begin{proof}
Assume that $\pi_n=i$, we have
$1,2, \ldots, i$ is a subsequence of $\pi$.
It follows that $\pi^{-1}(j)\leq n-i+j$ for $1 \leq j \leq i-1$, namely,  $\pi^{-1}(j)-j \leq n-i$. Moreover, it is easy to check that  $ \pi^{-1}(j)-j < n-i$ for $ i<j \leq n$, as desired.
\end{proof}

Now we are ready to give a proof of Proposition \ref{prop:213ballot}.
\begin{proof}[Proof of Proposition~\ref{prop:213ballot}]
Assume that
$A^i_{n}(213)=\{ \pi \in A_{n}(213) \colon \pi_n=n-i\}$. Then, we have
\[A_{n,k}(213)=  \bigcup_{i=0}^k  A^i_{n}(213). \]

We aim to show that  $\# A^i_{n}(213) = \# A_{n-1,i}(213).$
Based on Lemma \ref{lem:lastmaxdrop},
this can be verified through a simple bijection from $A^i_{n}(213)$
to $A_{n-1,i}(213)$ by deleting the last element and getting the standard order. Hence, $\#A_{n,k}(213)=  \Sigma_{i=0}^k  \# A_{n-1,i}(213)$. In view of equation (\ref{eq:re2}), we deduce that $\#A_{n,k}(213)=  C_{n,k}$.
\end{proof}

\begin{corollary}
Sets  $A_{n,k}(132)$, $A_{n,k}(2\underline{13})$ and
$A_{n,k}(\underline{13}2)$ are all enumerated by $C_{n,k}$.
\end{corollary}

\begin{proof}
Since $\pi^{rc} \in S_{n,k}(132)$  if and only if
$\pi  \in A_{n,k}(213)$, then  $\#A_{n,k}(213)=\#A_{n,k}(132)$.
Notice  that $\pi$ is $213$-avoiding if and only if $\pi$
is $2\underline{13}$-avoiding, see Lemma 2.8 in \cite{Fu}. Hence, $\#A_{n,k}(213)=\#A_{n,k}(2\underline{13})$. Similarly,
we have $\#A_{n,k}(132)=\#A_{n,k}(\underline{13}2)$, as desired.
\end{proof}

As mentioned by Lin and Kim \cite{LinKim},
 $S_{n+1}^k(321)$ is enumerated by $C_{n,k}$.
 We will deduce a recurrence  of $\#S_{n}^k(321)$, which
proves this fact again.
\begin{proposition}\label{prop:321}
For $0 \leq k \leq n$, we have $\#S_{n+1}^k(321)=C_{n,k}$.
\end{proposition}

\begin{proof}
We divide $S_n^k(321)$ into two parts, namely,
\[S_n^k(321)=\{\pi \in S_n^k(321)  \colon k \geq \pi^{-1}(k) \} \cup \{\pi \in S_n^k(321)  \colon k < \pi^{-1}(k) \}.\]
It suffices to show that
\begin{equation}\label{eq:321a}
  \#\{\pi \in S_n^k(321)  \colon k \geq \pi^{-1}(k) \}=C_{n-1,k-1},
\end{equation}
and
\begin{equation}\label{eq:321b}
  \#\{\pi \in S_n^k(321)  \colon k < \pi^{-1}(k) \}=C_{n-2,k}.
\end{equation}

To show (\ref{eq:321a}), it is enough to construct a bijection
from $\{\pi \in S_n^k(321)  \colon k \geq \pi^{-1}(k) \}$
to $\{\pi \in S_{n}^{k-1}(321) \}$ by exchanging $k$ and $k+1$ in a permutation.

To show (\ref{eq:321b}), we need to construct a bijection from
$\{\pi \in S_n^k(321)  \colon k < \pi^{-1}(k) \}$
to $\{\pi \in S_{n-1}^k(321)\}$. Given $\pi \in S_n^k(321)$
with $k < \pi^{-1}(k)$, it is easy to see that $\pi_{n-1}=k$
or $\pi_{n-1}=n$.
If $\pi_{n-1}=n$, then delete $n$.
If $\pi_{n-1}=k$,  then delete $k$ and change $k+2$ to $k$ and
$i$ to $i-1$ for $k+3 \leq i \leq n$. It is easy to check that this map is a bijection and we omit it here.
In view of (\ref{eq:re1}), we complete the proof.
\end{proof}

In the following, we will construct bijections from
$A_{n,k}(213)$ to $\Gamma_{n,k}$ and  from
$S^k_{n+1}(321)$ to $\Gamma_{n,k}$ to give a proof of
Theorem \ref{thm:equidis}.
\begin{proof}[Proof of Theorem \ref{thm:equidis}]
Firstly, we
construct a bijection $\alpha$ from  $A_{n,k}(213)$ to $\Gamma_{n,k}$.

Given $\pi=\pi_1 \pi_2 \cdots \pi_n \in A_{n,k}(213)$,
let the right-to-left maximum letters of $\pi$ be $\pi_{i_1}, \pi_{i_2},
\ldots,\pi_{i_r}$ with $i_1 <i_2 < \cdots <i_r$ and $\pi_{i_1}
>\pi_{i_2}> \cdots > \pi_{i_r}$.
Create an non-negative $n,k$-arrangement $a=\alpha(\pi)$ by the following steps
\begin{itemize}
  \item Firstly, writing $i_1$ $1$'s.
  \item Secondly, for $j$ from $1$ to $r-1$, adjoining $(\pi_{i_{j}}-\pi_{i_{j+1}})$ $-1$'s with
$(i_{j+1}-i_{j})$ $1$'s .
  \item Lastly, writing $(\pi_n-n+k)$ $-1$'s.
\end{itemize}

It is easy to check that $a$ has $i_r$ $1$'s and $(\pi_{i_1}-n+k)$ $-1$'s.
Since $i_r=n$ and $\pi_{i_1}=n$, then $a$ is an $n,k$-arrangement.
Notice that,  for $1 \leq j \leq r-1$, elements larger than $\pi_{i_{j+1}}$ is at the position
$i_j$ or to the left. Hence, $i_j \geq n- \pi_{i_{j+1}}$, which implies that $a$ is non-negative.

To show that $\alpha$ is a bijection, we shall construct its inverse.
Let $a \in \Gamma_{n,k}$  with $\vpk(a)=r-1$ and $r \geq 1$.
Assume that $a$ has $p_i$ $1$'s and $n_i$ $-1$'s alternatively for
$1 \leq i \leq r$, then the corresponding $\pi$ in $A_{n,k}(213)$
can be constructed as follows.

The positions of the right to left maxima of $\pi$  are
$n-p_r- p_{r-1}-\cdots -p_2$,  $n-p_r-p_{r-1}-\cdots-p_3$, $\cdots$, $n-p_r$, $n$.
The values of the right to left maxima of $\pi$ are
$n-k+n_{r}+n_{r-1}+\cdots +n_1$, $n-k+n_{r}+n_{r-1}+\cdots +n_2$, $\cdots$, $n-k+n_r$.
Then  picking out the largest $p_r-1$ remaining elements that are smaller than $n-k+n_r$ and filling them in the positions between $n-p_r$ and $n$ in increasing order. Similarly,
we can fill the positions between $n-p_r-\cdots-p_{j+1}-p_j$
and $n-p_r-\cdots-p_{j+1}$ in the same way for $1<j<r$.
From the construction of $\pi$, it is easily to check that
$\pi$ is $132$-avoiding.
By Lemma \ref{lem:lastmaxdrop}, we obtain that
$\maxdrop(\pi) = n - \pi_n = n-(n-k+n_r)=k-n_r\leq k$.
Hence $\pi$ is a permutation in $A_{n,k}(213)$ and
$\alpha$ is a bijection between $A_{n,k}(213)$ and $\Gamma_{n,k}$.

Moreover, it is easy to see from the construction of the bijection $\alpha$ that $\des(\pi)=\rmax(\pi)-1=\vpk(a)$.

Now, we proceed to give a bijection $\beta$ from $S_{n+1}^k(321)$ to $\Gamma_{n,k}$.
Notice  that
 a permutation is $321$-avoiding if and only if both the subsequence formed by its weak excedance values and the one formed
by the remaining non-weak excedance values are increasing.
Given

$\pi=\pi_1 \pi_2 \cdots \pi_{n+1}
 \in S_{n+1}^k(321)$,
let the non-weak excedance values
of $\pi$ that are before position $n+1$ be $\pi_{i_1}, \pi_{i_2},
\ldots,\pi_{i_r}$ with $i_1 <i_2 < \cdots <i_r$ and $\pi_{i_1}
<\pi_{i_2}< \cdots < \pi_{i_r}$.
Create a non-negative $n,k$-arrangement $a=\beta(\pi)$ by the following steps
\begin{itemize}
  \item Firstly, writing $(i_1-1)$ $1$'s and $\pi_{i_1}$ $-1$'s.
  \item Secondly, for $j$ from $1$ to $r-1$, adjoining $(i_{j+1}-i_{j})$ $1$'s with $(\pi_{i_{j+1}}-\pi_{i_{j}})$ $-1$'s.
  \item Lastly, writing $(n+1-i_{r})$ $1$'s and $(k-\pi_{i_r})$ $-1$'s.
\end{itemize}

 Since $i_j-1 \geq \pi_{i_j}$ and $n \geq k$, it is
easy to check that $a$ is an non-negative $n,k$-arrangement.

To show $\beta$ is a bijection,  we will construct its inverse.
Let $a \in \Gamma_{n,k}$ with $\vpk(a)=r-1$
and $p_i$ $1$'s and $n_i$ $-1$'s alternatively for
$1 \leq i \leq r$.
 We construct  the corresponding $\pi$ in $S^k_{n+1}(321)$ as follows.

Elements $k-n_{r}- \cdots -n_3-n_2 $,  $k-n_{r}- \cdots -n_3 $, $\cdots$, $k-n_{r}$ are at the positions
$p_1+1$, $p_1+p_2+1$, $\cdots$, $p_1+p_2+\cdots +p_{r-1}+1$.
Element $k+1$
is at the position $n+1$. The remaining elements are placed
in the remaining places in increasing order.

By the definition of $\beta$, we may easily deduce that  $\vpk(a)=\vnw(\pi)$. The proof is completed.
\end{proof}

\begin{example} Let $n=8$, $k=7$ and
 $\pi=83475612$, the right to left maxima of $\pi$
are $\pi_1=8, \pi_4=7, \pi_6=6, \pi_8=2$.
Then, we have \[a=\alpha(\pi)=1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1.\]

As the inverse of $\alpha$, for
 $a=1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1$,
we have $n=8$, $k=7$, $r=\vpk(a)+1=4$, $p_1=1$, $p_2=3$, $p_3=2$, $p_4=2$,
$n_1=1$, $n_2=1$, $n_3=4$ and $n_4=1$.
Then $8,7,6,2$ are placed at positions $1,4,6,8$
and $\pi=\alpha^{-1}(a)=83475612$.

Let $n=8$, $k=7$ and $\sigma=314527698$. The non-weak excedance values of $\sigma$ that are before position $9$
are $\sigma_2=1, \sigma_5=2, \sigma_7=6$.
Then, we have \[b=\beta(\sigma)=1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1.\]

As the inverse of $\beta$, for $b=1,-1,1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1$,
we have $n=8$, $k=7$, $r=\vpk(b)+1=4$, $p_1=1$, $p_2=3$, $p_3=2$, $p_4=2$,
$n_1=1$, $n_2=1$, $n_3=4$ and $n_4=1$.
Then $1,2,6$ are placed at positions $2,5,7$
and $\sigma=\beta^{-1}(b)=314527698$.
\end{example}

For  completeness, we present the bijection from $A_{n,k}(213)$ to $S_{n+1}^k(321)$ as follows.

Given $\pi=\pi_1 \pi_2 \cdots \pi_n \in A_{n,k}(213)$,
let the right-to-left maximum letters of $\pi$ be $\pi_{i_1}, \pi_{i_2},
\ldots,\pi_{i_r}$ with $i_1 <i_2 < \cdots <i_r$ and $\pi_{i_1}
>\pi_{i_2}> \cdots > \pi_{i_r}$.
Construct a permutation $\sigma \in S^k_{n+1}(321)$ by the following
steps:

\begin{itemize}
  \item The positions of the non-weak excedances of $\sigma$ before the last element  are $i_1+1$, $i_2+1$, $\ldots$, $i_{r-1}+1$.
  \item  The values of the the non-weak excedances of $\sigma$ before the last element  are $n-\pi_{i_2}$, $n-\pi_{i_3}$, $\ldots$,
      $n-\pi_{i_r}$.
  \item  Place $k+1$ in the $n+1$-th place and then put the remaining elements to the remaining places in increasing order.
\end{itemize}

It is easy to check that it is a bijection and the inverse of the bijection is omitted. As an example, $83475612$ is mapped to $314527698$.

In the following, we will give the distribution of $\des$
over $A_{n,k}(213)$. By Theorem \ref{thm:equidis},
it suffices to deduce the distribution of $\vpk$ over $\Gamma_{n,k}$.

\begin{proof}[Proof of Theorem \ref{thm:generating}]
Let
\[F(p,q,z)=\sum_{a \in \Gamma_{n,k},\, 0 \leq k \leq n
} p^{\vpk(a)} q^{n-k}z^n,\]

\[F^u(p,q,z)=\sum_{a \in \Gamma^u_{n,k},\, 0 \leq k \leq n
} p^{\vpk(a)} q^{n-k}z^n,\]

\[F^d(p,q,z)=\sum_{a \in \Gamma^d_{n,k},\, 0 \leq k \leq n
} p^{\vpk(a)} q^{n-k}z^n.\]
where $\Gamma^u_{n,k}$ ($\Gamma^d_{n,k}$) is the set of  arrangements $a \in \Gamma(n,k)$ with  $a_{n+k}=1$ ($a_{n+k}=-1$).

Let
\begin{equation*}
  F(p,q,z)=\sum_{k \geq 0} F_k(p,z)q^k = \sum_{n \geq 0} f_n(p,q)z^n,
\end{equation*}
\begin{equation*}
  F^u(p,q,z)=\sum_{k \geq 0} F^u_k(p,z)q^k = \sum_{n \geq 0} f_n^u(p,q)z^n,
\end{equation*}
\begin{equation*}
  F^d(z,p,q)=\sum_{k \geq 0} F^d_k(p,z)q^k = \sum_{n \geq 0} f^d_n(p,q)z^n.
\end{equation*}
Then we have $f^u_1(p,q)=q$.  By considering two cases of the
the last element of an non-negative $n,k$-arrangement,
being $1$ or $-1$,  we deduce the following two recurrences.
For $n \geq 1$, we have
\begin{equation}\label{eq:furecurrence}
  f^u_{n+1}(p,q) =q f^u_{n}(p,q)  + pq f^d_{n}(p,q).
\end{equation}
For $n \geq 0$, we have

\begin{equation}\label{eq:fdrecurrence}
    f^d_{n+1}(p,q) =q^{-1} f^u_{n+1}(p,q)  + \{q^{ \geq 0}\}(q^{-1} f^d_{n+1}(p,q)),
\end{equation}
where $\{q^{ \geq 0}\}$ is the linear operator extracting all terms
in the power series representation containing non-negative powers of $q$.

Summing (\ref{eq:furecurrence}) over $n \geq 1$ and summing
(\ref{eq:fdrecurrence}) over $n \geq 0$, we deduce that
\begin{align*}
  \sum_{n \geq 1} f^u_{n+1}(p,q) z^{n+1}&=\sum_{n \geq 1} (q f^u_{n}(p,q)  + pq f^d_{n}(p,q)) z^{n+1}, \\[4pt]
  \sum_{n \geq 0} f^d_{n+1}(p,q) z^{n+1}&=\sum_{n \geq 0} (q^{-1} f^u_{n+1}(p,q)  + \{q^{ \geq 0}\}(q^{-1} f^d_{n+1}(p,q))) z^{n+1}.
\end{align*}
We deduce that
\begin{align}
  &F^u(p,q,z)-qz=qz F^u(p,q,z)+pqzF^d(p,q,z) , \label{eq:genre1} \\[5pt]
 &F^d(p,q,z)=q^{-1}F^u(p,q,z)+q^{-1}F^d(p,q,z)-q^{-1}F_0(p,z), \label{eq:genre2}
\end{align}
where
\[F_0(p,z)=\sum_{a \in \Gamma_{n,n},\, n \geq 1} p^{\vpk(a)} z^n.\]

Recall that the Narayana number $N_{n,m}$ is the number of Dyck path
of semilength $n$ having $m$ peaks and
\begin{equation*}
  \sum_{1 \leq m \leq n} N_{n,m} x^n y^m= \frac{1-x(1+y)-\sqrt{(1+x(1-y))^2-4x}}{2x},
\end{equation*}
see \cite{Callan} for reference.

\begin{align}\label{eq:F0}
 F_0(p,z)&=\frac{\sum_{1 \leq m \leq n} N_{n,m} z^n p^m}{p} \notag\\[4pt]
 &=\frac{1-z(1+p)-\sqrt{(1+z(1-p))^2-4z}}{2zp}.
\end{align}

By solving (\ref{eq:genre1}) and (\ref{eq:genre2}), we derive that
\begin{align*}
  F^u(p,q,z) & = \frac{(1-q^{-1})qz-pzF_0(z,p)}{1-qz-pz-(1-qz)q^{-1}},    \\[6pt]
  F^d(p,q,z) & = \frac{z-q^{-1}(1-qz)F_0(z,p)}{1-qz-pz-(1-qz)q^{-1}}.
\end{align*}

Then
\begin{align*}
  F(p,q,z) & =1 + F^u(z,p,q)+ F^d(z,p,q) \\[5pt]
   & =\frac{1-pz-(1-qz)q^{-1}+(z-pz-q^{-1})F_0(z,p)}{1-qz-pz-(1-qz)q^{-1}}.
\end{align*}
Hence, by changing $q$ to $q^{-1}$ and $z$ to $zq$ above we
obtain (\ref{eq:main}).
\end{proof}

\section*{Acknowledgement}
The first author was supported by the National Natural Science Foundation of China (No.~11701420) and
Natural Science Foundation Project of Tianjin Municipal Education Committee (No.~2017KJ243,~No.~2018KJ193).
The second author was supported by the National Natural Science Foundation of China (No.~11801378,~No.~12071440) and the Zhejiang Provincial Natural Science Foundation of China (No.~LQ17A010004).

redpajama_set_name: RedPajamaArXiv


This presentation exposes the 5 Myths that prevent supply chain professionals from optimising their supply chains and ultimately improving business outcomes.
It explores the idea that these myths endure as a result of 'The Supply Chain' often being thought of as an executional cost centre, rather than a strategic opportunity.
It concludes that to achieve superior supply chain performance for your organisation you need to realise how to get there. And busting some myths, many of which are based on outdated business practices, is a pretty good place to start.


text:
How Carroll Shelby Built America's Most Iconic Muscle Car And Became A Racing Legend
From raising chickens to racing Cobras, Carroll Shelby's high-octane life led him from East Texas to global fame.
When health complications forced auto racer Carroll Shelby into early retirement, he turned his success on the Formula 1 racing circuit into a lucrative career as a high-performance car designer.
Bernard Cahier/Getty ImagesCarroll Shelby at the 24 Hours of Le Mans race on June 21, 1959.
The AC Cobra sports car, known as the Shelby Cobra, is his most iconic design, but the true story behind the Ford v Ferrari film is what elevated Shelby's legacy in Formula 1 racing to legendary status.
Carroll Shelby's Need For Speed
Carroll Shelby's love for fast cars took hold at an early age. He was born Carroll Hall Shelby on January 11, 1923, in the small but burgeoning town of Leesburg, Texas.
Shelby's father, Warren Hall Shelby, and mother, Eloise, had relocated to the area so he could work at the local post office, where the young Shelby got his first taste of speed.
"My father loved cars," Shelby said in a 2008 CNN interview. "And my father was a rural mail carrier that drove pretty fast. I remember when I was three years old I would stand up in this Whippit that he had, and I would say, 'Let's go faster, dad. Let's go faster.'"
Open roads and a father with a car fixation paved the way for Shelby's racing career. He enrolled in the Army Air Force and served as a flight instructor during World War II. When the war was over, Shelby tried his hand at being a chicken farmer, but when that failed, he went full throttle into racing.
From Amateur Racer To Automotive Legend
Wikimedia CommonsCarroll Shelby racing in an Aston Martin DBR1/200 at the 12 Hours of Sebring race in 1958.
"The desire for speed has always been there," Carroll Shelby said, "and I don't try to modify it."
Two years after his first drag race in 1952, Aston Martin invited Shelby to drive for them, and the opportunity kicked his racing career into high gear. In 1956 and 1957, Sports Illustrated named Shelby "Sports Car Driver of the Year."
One of his more iconic moments came during a 100-mile race. Behind the wheel of a V8-powered Maserati race car, Shelby spun out in the first lap. Determined, he regained ground to win first place and cement his standing as an American racing champion.
In his nine-year racing career, Shelby competed in 148 races, won 50 and finished second in 17.
The Legendary Second Career Of Carroll Shelby
Bernard Cahier/Getty ImagesCarroll Shelby in his first Le Mans race.
In 1960, after a heart condition drove him to retirement, he established a Goodyear Racing Tire distributorship in California. Not ready to leave the fast lane, he opened the Shelby School of High Performance Driving with plans to start building performance cars on the side.
"I started to look around and moved to California because I knew I'd never be able to do it in Texas," Carroll Shelby recounted later in an interview. He found what he was looking for in Detroit, Michigan.
Ford Motor Company agreed to give Shelby an AC chassis, a few small-block V8 engines, and $25,000 in funding for him to build a sports car that could beat Chevrolet's Corvette. That car became the 1962 Shelby Cobra 260 Roadster.
With support from Ford, the Cobra became the centerpiece of his career as a car designer. The car's rising popularity also gave him the momentum he needed to open the Shelby American auto shop in Venice, California.
Wikimedia CommonsA Shelby 1965 Ford Mustang GT350.
Finished and ready to roll, the Cobra performed on the track and shined with style. With Ford's backing, the car garnered national and international attention.
However, the true test was the racing track. In its first race at the Los Angeles Times Grand Prix, the Cobra started poorly, fell back, took the lead in lap nine before breaking a rear hub and not being able to finish the race.
Still, the Cobra proved to be lighter and faster than the new Corvette Stingray. So, Ford gave Shelby the green light and the money to start building newer models.
The True Story Behind Ford v Ferrari
The story behind Carroll Shelby and Ken Miles leading Ford to victory over Ferrari at the 24 Hours of Le Mans race in France in 1966 is the subject of the Matt Damon and Christian Bale film Ford v. Ferrari.
After producing several new Cobra models over the years and a high-performance Mustang, the Shelby Mustang GT350, Ford had a new challenge for Carroll Shelby: beat Ferrari at the 24 Hours of Le Mans Grand Prix.
At Le Mans, Ford was on a losing streak. After performing poorly at Le Mans 1964, none of Ford's cars finished the race the following year.
Meanwhile, Ferrari was on a five-time winning streak. So much so that Ferrari only entered two cars at Le Mans 1966, anticipating to once again win the race.
ISC Images & Archives/Getty ImagesCar owner Carroll Shelby sits on the front of his Ford GT-40 after drivers Ken Miles (L) and Lloyd Ruby (R) drove the car to victory in the Daytona Continental at Daytona International Speedway.
But Ford was determined. Investing a reported $10 million in its Le Mans program, Ford turned its failing GT40 car project over to Shelby American.
The team quickly started making improvements to the car, and Shelby hired racing wizard Ken Miles to test drive the results. Depicted in the film Ford v Ferrari, the powerful personalities of the men synergized as they worked to prepare for Le Mans in 1966.
Bernard Cahier/Getty ImagesKen Miles with Carroll Shelby during the 1966 24 Hours of Le Mans.
That year, the Shelby American team's new and improved Ford GT40 Mark II finished first, second, and third at Le Mans. Although the glory for Ken Miles was short lived, the win made Shelby and all the racers involved superstars. The following year, Ford beat Ferrari again to put an end to Ferrari's hot streak.
The Legacy Of Carroll Shelby
Central Press/Hulton Archive/Getty ImagesFord CEO Henry Ford II (second from left) with Ford drivers after their success in Ford GT40 Mk.II cars at the 24 Hours of Le Mans, France on June 19, 1966. On the podium are race winners Bruce McLaren (left) and Chris Amon (far right) with Ken Miles (center, left) and Denis Hulme (center, right), who finished in second place. Miles was killed in a crash two months later.
Altogether, Carroll Shelby reportedly built more than 1000 Cobras and 14,500 Shelby Mustangs between 1962 and 1970. However, what he did off the track gave him the most fulfillment.
"We built the Automobile Hall of Fame in Dearborn[, Michigan]. I'm in that. And my children's foundation. I'm very proud of that," he said. "It's fun to build cars, but there's got to be a lot more to life than that. I've been so damn lucky to live this long, racing with nitro-glycerine pills in my mouth. I have so much to be thankful for. I wear a Santy Claus watch to remind me that every day's Christmas."
Shelby left the racing business entirely for a while and became the face of a chili mix that he later sold to Kraft. With the money from the chili brand, he bought his own private island and spent time hunting big game in Africa.
In 1982, he finally returned to high-performance car designing. This time for Chrysler. After creating special-editions of the Dodge Charger and a few other cars, a need for a heart transplant in 1990 stopped Shelby in his tracks. Although he was down, he was not out.
Upon making a full recovery, Shelby had a new lease on life. In order to help others in need of transplants, Shelby founded the Shelby Children's Foundation.
Carroll Shelby discusses high-performance vehicles in a Ford promotional video.
Soon thereafter, Shelby needed a kidney transplant as well. After receiving a kidney from his son Michael in 1996, Shelby started the road to recovery again and kept on going.
By the early aughts, Shelby was back to doing what he loved the most. In 2003, he again partnered with Ford on new Mustang concepts for the company's centennial birthday. The end result was the Ford GT500KR, a 540-horsepower version of the original King of the Road model. Ford unveiled the car at the New York Auto Show in 2007, and Carroll Shelby made an appearance for promotion.
Although Shelby and Ford's partnership ended in dispute, the cars they created together are still iconic today. In 2012, Shelby passed away at 89, but his legacy lives as one of the legends of American racing.
From raising chickens to racing Cobras, Shelby lived and died in the fast lane and he wouldn't have had it any other way. At 74 years old, Carroll Shelby was asked what he thought he'd be doing at age 85. He simply replied: "Building cars, I hope."
Now that you're done reading about American racing legend Carroll Shelby and the Shelby Cobra, check out this post about the worst cars ever sold or see 25 of the weirdest cars ever built.
The Shocking Story Of Christie Downs, The Little Girl Who Survived Being Shot By Her Own Mother
Inside Poveglia Island's History Of Death And Madness

redpajama_set_name: RedPajamaCommonCrawl


This little marshmallow girl, I just have so much love for her. Ever since getting this sleep suit she has been sleeping amazing. It is my bff. No joke. I was looking at her tonight while I was feeding her and I teared up (#hormones) because she is just so perfect and little (not really she is huge) and just I can't believe I was entrusted TWO humans to take care of. I feel like I am 18 still and shouldn't have two kids, but here I am at 27 years old with two amazing (sometimes super cranky) kids. Speaking of hormones though my hair started falling out. I could make someone a wig with the amount of hair I am losing, it is kind of alarming. I still have some hair left on my head though so its probably fine.
Russ is defending his thesis TOMORROW. I am so so proud of this guy. He has put so much effort and time into it, all the while being the best dad and husband. We have really tried to enjoy our last few weeks here in MI and the free babysitting so we have gone out a whole bunch with just each other and it has just been amazing. I had missed him!
Charlotte is the best big sister. If I have to leave the room and shower, or make lunch, or do laundry she is always there to keep Elizabeth entertained and happy. She will be 3 in a few short weeks and I can hardly believe she will be that old. She is still my little sidekick and follows me around everywhere. She is so sweet, and loves her sister more than anything. Don't get me wrong she still has her diva moments and can throw 7 tantrums in 10 minutes but hopefully she grows out of that soon?
Sometimes while Char naps we hang out and just play on my bed. This particular day I had TRIED to get them both to nap at the same time but little miss wasn't having it. I brought her to my bed and we played for a little and she just passed out right next to me it was so cute.
Ok don't judge me but sometimes I let Charlotte pick out E's clothes...she usually picks out something hilarious and this day was no exception haha.
We tried taking another Christmas picture and this time it actually turned out pretty good, but I didn't get it together in time and we will just send out a "We've moved!" card in a few months when things settle down.


text:
Recent CIPC warnings to state-owned companies raises the spotlight on public sector governance
The recent warnings issued by the Company and Intellectual Property Commission to five state-owned companies demonstrate once again just how seriously boards need to take their governance role, says Parmi Natesan, Executive: Centre for Corporate Governance at the Institute for Directors in Southern Africa (IoDSA).
As reported in Business Day Live, the CIPC warned the boards of the South African Express Airways, South African Forestry Company, South African Broadcasting Corporation, South African Post Office and the Central Energy Fund that they risked being declared delinquent or of being placed on probation if they failed to address their non-compliance with the Companies Act.
A finding of delinquency will adversely affect the long-term reputation of these directors, effectively calling their fitness for office into question. It could also results in these directors being disqualified in terms of the Companies Act, from taking up Directorship positions in the future.
"The CIPC has indicated that it intends to be proactive in holding these companies and their boards to account," observes Natesan. Governance best practice, as denoted in King III Principle 6.1, is for the board to take ultimate accountability for ensuring compliance with laws and regulations. "Compliance with the law is not optional, and directors need to make sure that the companies that they are overseeing are doing so."
Natesan points out that the IoDSA's 2014 benchmark study of board performance shows that public-sector boards, by their own admission, are lagging those in the private sector in most areas.
Aside from the board, Natesan says that in the public sector, the audit committee should play a big role in ensuring that the company, inter alia, complies with the applicable legislation. However, audit committees in the public sector generally need to be strengthened, as is indicated by the high percentage of public-sector entities whose financial statements are disclaimed annually by the Auditor-General—for example, only 48 percent of audited organisations obtained an unqualified audit opinion in 2011-12, while 94 percent were found to be materially non-compliant with legislation. The CIPC said it is particularly concerned about irregular expenditure, which points directly to a lack of quality audit committee oversight.
"The long and short of it is that audit committees have a vital role to play in assisting their boards with discharging their duties as regards to compliance. In the public sector, particularly, audit committees sometimes face several challenges which make it difficult for them to adequately fulfil their responsibilities," says Natesan. "As this latest development shows, boards in both the public and private sectors will bear the consequences of their audit committee's lack of performance, and should thus be looking for ways to improve it—such as participating in the Public Sector Audit Committee Forum, a forum created to strengthen Audit Committees in the public sector."
MEDIA CONTACT: Cathlen Fourie, 012 664 2833, cathlen@thatpoint.co.za
LinkedIn: The Institute of Directors in Southern Africa group


text:
Q: Running multi container application dependent on other containers I am fairly new to docker.
My problem is - I have a multi container application(zookeeper, kafka, producer, consumer) in which I want to run the producer and the consumer containers only after the zookeeper and kafka containers are up and running. How to edit the docker-compose file and achieve that? Thanks in advance

A: The depends_on instruction only allows you to manage the starting order.
However, it does not wait for your service to be up and running before triggering the next.
If you want to start a service after your dependance is up, then you'll have to look at tools like wait-for-it or dockerize.
You can find more info on the official Docker documentation

A: Check the depends_on directive in the docker-compose documentation.
__ from the docs __

depends_on Express dependency between services, Service dependencies
  cause the following behaviors:
docker-compose up starts services in dependency order. In the
  following example, db and redis are started before web.
docker-compose up SERVICE automatically includes SERVICE's
  dependencies. In the following example, docker-compose up web also
  creates and starts db and redis.
docker-compose stop stops services in dependency order. In the
  following example, web is stopped before db and redis.

Simple example:
version: "3.7"
services:
  web:
    build: .
    depends_on:
      - db
      - redis
  redis:
    image: redis
  db:
    image: postgres

redpajama_set_name: RedPajamaStackExchange