Computation of Al-Salam Carlitz and Askey-Wilson moments using Motzkin paths

In this paper we study the moments of polynomials from the Askey scheme, and we focus on Askey-Wilson polynomials. More precisely, we give a combinatorial proof for the case where d = 0. Their values have already been computed by Kim and Stanton in 2015, however, the proof is not completely combinatorial, which means that an explicit bijection has not been exhibited yet. In this work, we use a new combinatorial approach for the simpler case of Al-Salam-Carlitz, using a sign reversing involution that directly operates on Motzkin path. We then generalize this method to Askey-Wilson polynomials with d = 0 only, providing the first fully combinatorial proof for that case. Mathematics Subject Classifications: 05A10, 33D50,05A19


Introduction
Enumeration of objects is a powerful tool for understanding their properties and revealing hidden connections between them. Among other things, constructing explicit bijections is widely considered to be the best way to enumerate objects because bijections give us insight to understand how objects are related to each other. An interesting feature of combinatorics is that it is often related to other fields in mathematics. In this paper, we focus on the combinatorics of orthogonal polynomials. It is known by Favard that any monic polynomial P n (x) satisfies a three-term recurrence P n+1 (x) = (x − b n )P n (x) − λ n P n−1 (x). Viennot's theory [14] provides a connection bewteen orthonal polynomials and combinatorics. Indeed, Viennot showed that the nth moment is the sum of weighted Motzkin paths of length n whose weights are defined using b n and λ n . Askey-Wilson polynomials (defined in [2]) moments depend of four parameters a, b, c and d. Askey-Wilson moments have been studied with Motzkin paths by Kim and Stanton [10]. The starcaise tableaux, introduced by Corteel and Williams in [4] and studied in [3] were also used to study those polynomials. Ismail, Stanton and Viennot [5] used q-Hermite Polynomials and inhomogenous matchings and Kim and Stanton [10] recently computed the general moment of Askey Wislon polynomials. However, this proof is not completely combinatorial. We compute Askey-Wilson moments using uniquely Motzkin paths, thus providing a combinatorial proof; using a sign reversing involution on Motzkin paths. A combinatorial proof has been already given for a more specific case (c = d = 0) in [10] using a bijection between Motzkin paths and Doubly Striped Skew Shapes and a sign reversing involution on Striped Skew Shapes. The proof we are looking for is more general (case d = 0) and operates directly on Motzkin paths. In order to find a solution to the previously described problem, we also focused on a simpler family of orthogonal polynomials: the Al-Salam-Carlitz polynomials. Their moments have already been computed with a combinatorial proof using Striped Skew Shapes by Dongsu Kim. However, the Striped Skew Shapes seem to be specific to this case and it was not possible to generalize them to our situation. Looking at the effects of the sign reversing involution at the Motzkin paths level, we find patterns and behaviors that seem to reproduce in our more general case. We use this phenomenon to define a less specific sign reversing involution at the Motzkin paths level. In the first section, we look at the Al-Salam-Carlitz polynomials case, and propose a new proof for the value of their moments. This proof is rather simple, but the method and the formalism we introduce will pave the way for the last section, in which we extend the method to the Askey-Wilson polynomials moments in the case d = 0 only.

Context and goal
In this section, we introduce the notations and some of the different approaches used for this problem ; giving a very brief review of the litterature on the subject. In particular, we define Askey-Wilson polynomials as well as their moments, and explain three approaches that have been used for computing those moments. Later, we recall the method used in [10] that makes use of Striped Skew shapes, and explain how we plan to generalize it to the case of Askey-Wilson polynomials case.
Orthogonal polynomials are a family {P n (x)} n 0 of polynomials satisfying β α P n (x)P m (x)w(x)dx = 0 if n = m, for constants a, b and a weight function w(x). The quantity µ n = β α x n w(x)dx is called the nth moment. Note that since the integral is linear, if we know the moments µ n , we can compute the integral β α P (x)w(x)dx for any polynomial P (x).
The Askey-Wilson polynomials (defined in [2]) are the most general polynomials among the orthogonal polynomials classified by the Askey scheme. Special cases of the Askey-Wilson polynomials include q-Hahn, q-Racah, q-Laguerre, q-Charlier, q-Hermite polynomials, etc.
We now introduce Motzkin paths, which are the objects used in the first combinatorial approach described below. It is a tool that we will use a lot throughout this paper. We are given a set of steps S = {s 1 , s 2 , . . . , s k }, such that each step s i has a direction, that can be up, down or horizontal, and a weight ω(s j ) ∈ R. In our context, the weight function may implicitly depend on fixed real parameters and on the height i of the beginning of the step. A step going up applies a change to the height of 1, a step going down applies a change to the height of −1, and a horizontal step applies a change to the height of 0. Now, a Motzkin Path of length n on the set of steps S is a sequence of n steps in S that starts at height 0 and ends at height 0, and always keeping a nonnegative level. We will denote the set of such paths Mot n (S), or Mot n when there is no ambiguity on the set of steps. We extend the weight function ω to Motzkin paths by setting ω(P ) = n k=1 ω(s j k ), for P = (s j 1 , . . . , s jn ).
Throughout this paper, we will graphically represent the steps and the Motzkin paths as in figure 1. Note that the weight depends on the level and on the variables a and q.

Three combinatorial approaches
In this subsection, we present three combinatorial approaches that are studied for computing the nth moment µ = µ n (a, b, c, d; q) of the Askey-Wilson polynomials. We only introduced the definitions and notations of the Motzkin paths approach, because this is the one that we will use in this paper. The other two approaches involve tools and techniques that we will not use and are for mainly information purposes. The results that they brought will allow us to see how our result compares, and complements the state of the art on the subject. In particular, we recall theorem 2 that gives the value of the moments in the most general case. Also, we state theorem 1 which gives a combinatorial proof for the moments, but in a less general case. This means that our result is the natural extension of theorem 1.

First combinatorial approach: Motzkin paths
It is known by Favard that any monic orthogonal polynomial P n (x) satisfies a three-term Viennot [14] showed that the moment µ n is the sum of weights of weighted Motzkin paths of length n whose weights are defined using b n and λ n . Viennot's theory provides a connection between orthogonal polynomials and combinatorics.
The monic Askey-Wilson polynomials P n = P n (x; a, b, c, d; q) are defined by the threeterm recurrence P n+1 = (x − b n )P n − λ n P n−1 with P −1 = 0 and P 0 = 1 for b n = 1 2 (a + a −1 − (A n + C n )) and λ n = 1 4 A n−1 C n , where Since b n and λ n are complicated, it is difficult to compute µ n using Motzkin paths. However, when c = d = 0, we have b n = 1 2 (a + b)q n and λ n = (1 − q n )(1 − abq n−1 ). Kim and Stanton [10] found the following formula for µ n (a, b, 0, 0; q) using Motzkin paths:

Second combinatorial approach: staircase tableaux
The staircase tableaux were first introduced by Corteel and Williams [4] and further studied in [3]. Corteel and Williams showed that the moment µ n (a, b, c, d; q) is a generating function for staircase tableaux of length n. They also showed that staircase tableaux have a connection with an important statistical mechanics model called asymmetric exclusion process (ASEP). The weight of a staircase tableau, which is rather complicated, involves some complex numbers. Hence, it is not so easy to study µ n using staircase tableaux. Using staircase tableaux, Kim and Stanton [10] showed that the coefficient of the highest term a n b n c n d n q ( n 2 ) in 2 n (abcd) n µ n (a, b, c, d; q), which turns out to be a polynomial, is the Catalan number Cat(n/2) if n is even, and 0 otherwise.
It is worthwhile noting that staircase tableaux contain permutation tableaux as special cases. Permutation tableaux are in bijection with permutations and there are many interesting bijections transforming certain statistics. Permutation tableaux have connections with total positivity in Grassmannian and a statistical mechanics model called partially asymmetric exclusion process (PASEP).

Third combinatorial approach: q-Hermite polynomials
The Askey-Wilson integral is Ismail, Stanton, and Viennot [7] showed that the integral I is a generating function for inhomogeneous matchings on four blocks [n 1 ] [n 2 ] [n 3 ] [n 4 ] for n 1 , n 2 , n 3 , n 4 0 using q-Hermite polynomials. Here, "inhomogeneous" means that every edge connects two elements in different blocks. By enumerating this generating function they proved (2) combinatorially.
Kim and Stanton [11] recently found that their idea can be extended to compute the moment µ n (a, b, c, d; q) as follows. Let π 0 (cos θ) n w(cos θ, a, b, c, d; q)dθ.
Then I 0 = I and µ n (a, b, c, d; q) = I n /I. In [11] they showed that I n is a generating function for matchings on five blocks [n] [n 1 ] [n 2 ] [n 3 ] [n 4 ] for n 1 , n 2 , n 3 , n 4 0 in which homogeneous edges are only in the first block [n]. Using this combinatorial model, [11] found the following formula for the moment µ n .
If c = 0 in the above theorem, we get the following theorem immediately after exchanging c and d.
Theorem 3 ([10], [11]). The Askey-Wilson moments for d = 0 are Note that the proof of Theorem 3 is not completely combinatorial. When ac = bd = q, then the moment becomes surprisingly simple.

Corollary 4 ([11]
). We have where the second sum is over all integers A and B such that |A| + |B| k and A + B ≡ k mod 2.
This proves the following positivity conjectured in [10]. Their proof of Corollary 4 makes use of basic hypergeometric series.

Goal of this article
The theorem 1 which is a specific case of the theorem 3 has a combinatorial proof using Motzkin paths and Doubly Striped skew shapes. We recall the method as it will be close to ours, because it also uses a sign reversing involution argument. Since our goal is to find a combinatorial proof of theorem 3, we later briefly explain our strategy. This strategy will, in the next section, be explained further on the Al-Salam-Carlitz case. Let us sketch the proof of theorem 1 done in [10] in order to show the idea that we will generalize.
First, the connection provided by [14] leads to equation 3.
In the case c = d = 0, A n = 1−abq n a and C n = a(1 − q n ) give for λ n and b n , the respective values 4λ n = (1 − abq n−1 )(1 − q n ) and 2b n = (a + b)q n . Thereby leading to the possible steps S described as in the figure 2. One can state the following thanks to a variation of Penaud's decomposition [12]: Where Mot n (a, b) denotes the Motzkin paths of size n constituted of the steps shown in figure 2, and Mot * n (a, b) denotes the set of weighted Motzkin paths in Mot n (a, b) such that there is no peak of weight 1, that is an up step of weight -1 immediately followed by a down step of weight -1.
In [10], Kim and Stanton then use a bijection ψ between Motzkin paths and striped skew shapes. Striped skew shapes are objects that share similarities with Motzkin paths, we also similarly define a weight function for them. This bijection is explicitely defined in the section 3 of their paper. We give an example of the corresponding striped skew shape to a Motzkin path by the function ψ in figure 3.
Because ψ preserves the weight, we obtain equation 4.
where SSS stands for the set of Doubly Striped Skew Shapes. In order to use a sign reversing involution argument, they define an involution φ acting on striped skew shapes. This function is a reversing sign involution, meanging that it satisfies the condition ω(φ(S)) = ±ω(S), φ 2 (S) = S.
By a standard argument, the sum then simplifies to a sum over the set of fixpoints of φ, as written in formula 5. Intuitively, the function φ will cancel every Motzkin paths that contains black dots or grey cases in the upper part.
The fixpoints of φ are the elements described in the figure 5, which are the striped skew shapes that only contains grey cases on the lower side, and white dots. At this stage, one needs to compute the weighted sum over the set of fixpoints. To compute the sum over the elements of f ixpoint(φ) of the weighted striped skew shapes, a bijection δ between elements of f ixpoint(φ) and words over 0, 1, 2 is used. This bijection preserves weight if we consider that for w = w 1 . . . w k , with u 0, v 2 and t 1, weight(w) = q ( t+1 2 ) a u b v q inversions(w) with the ordering: 0 < 1 < 2. This leads to formula 6, which is the expected result.
Remark 5. The function φ takes the black dot or the grey case on the left of minimal height, and then applies the change.(refer to [10] for a complete definition). The description of its action on Motzkin paths is very complicated and involves a lot of different cases (some possibilities on Doubly Striped Skew Shapes are shown in the figure 21 of the appendix).

Method
In term of Motzkin paths, we have is also a sign reversing involution of fix points ψ −1 (F ixpoint(φ)), a set that will now be referred to as F (a, b).
A Motzkin path is a fixpoint ofφ iff its image by ψ is of the previously described form. The set of fixpoints ofφ can also be described as follows. With the set of steps if and only if it consists of elements in A, followed by only elements in B. Formally, for every 0 i u + t, s i ∈ A ; and for every u + t < i u + v + 2t, s i ∈ B. Such paths are described in figure 6. Figure 6: Fixpoints ofφ with the notation used in [10] The idea is to understand the bijectionφ that can be defined in a more general case than φ as it is not restricted by the doubly striped skew shapes. To do so, we look at the direct effect of φ, at the Motzkin path level instead of the striped skew shapes level.
We first introduced and solved another problem, to better our understanding of the problem and to introduce the paired words. Paired words will be structurally close to the set of fixpoints.
In [9], a similar combinatorial proof has been made for the Al-Salam-Carlitz moments (introduced in the next section) using simply striped skew shapes. In Section 2, we first give a combinatorial proof of Al-Salam-Carlitz moments using only Motzkin paths.
Later, we generalize this approach in section 3 to Askey-Wilson polynomials and make a proof of theorem 3, that is fully combinatorial.

Al-Salam Carlitz moments
The Al-Salam Carlitz polynomials U (a) n (x) (see [1]) are a family of orthogonal polynomials defined by the following generating function : In this section, we prove the following using Motzkin path only, a result which was previously proven in [9] with striped skew shapes. (This proof is very similar to a more complicated one, done for Motzkin path moments where c = 0 in section 3). If we denote by L n the n th moment of the Al-Salam-Carlitz polynomials, the result states that

Definitions and intuition
These polynomials satisfy the three terms recurrence relation: Let us define Mot n , set of Motzkin paths over the following weighted steps: According to Viennot's theory [14], the Motzkin paths defined with the previously defined steps (figure 7) allow us to compute the n th moment, as described by formula 7. P ∈Motn ω(P ) = L n (7) Remark 7. The main idea in the following is to cancel all paths with a step of B followed by a step of A by switching the positions or finding an element of A followed by an element of B with the same weight, the gain of q exponent will be compensated by replacing a q i decreasing step by a −1 decreasing step. In order to remove all paths of E 1 and E 2 (defined later here 2.3), we need to define φ the following way. But let us first introduce the paired words formalism. Figure 8: Definition of A, B and C

Bijection with paired words
In this subsection we introduce a formalism which is helpful to define a sign reversing involution and characterize its set of fixpoints.
One defines paired words on the alphabet {a, 1} and the ordering a < 1 1 as a pair of: • a word w on the alphabet {a, 1} • a set of pairs F on the word w which has to respect the following conditions The pair has to respect the ordering between the letters) The set of Motzkin paths without −1 down step is in bijection with paired words (bijection κ briefly defined in figure 9); an example is given in figure 10. Figure 9: Equivalence between paired word and Motzkin paths a 1 1 a 1 ⇔ κ a q 1 q 1 a 1 Figure 10: A path and its corresponding paired word
• For each (w 1 , (the index of the −1 which will be replaced by a q i down step, thus i iterations that multiplies by q −1 must be done in order to compensate).
• Initialisation: w i 0 is replaced by a q i step; weight is multiplied by −q level(i 0 ) • Induction: Let i p+1 = max{i|i < i p &w i ∈ A}. By induction, w i p+1 ∈ B so we can apply f to (w ip , w i p+1 ). The weight is multiplied by q −1 .
Lemma 10. We can do at least i such described iterations.
Proof. Refer to E This defines a functionφ 1 from Mot n with a −1 step to Mot n . Let j 0 = min{j|w j ∈ B}, and j 1 the index of the last modified step if ψ 1 was applied (n + 1 if there is no step in C).
Before going further, one is advised to look at the full example given in the appendix B in order to fully understand how the function φ works.

Maximal paired words and fixpoints
In this subsection, we define an ordering between paired words which is total. The set of fixpoints for φ exactly corresponds to paired words such that their paired word is maximal for that ordering.
Definition 13. We define the ordering between set of pairs on a word as follows: • If F and F are both maximal for the inclusion ordering then let i 1 be the smallest integer such that there exists j 0 such that (i 0 , j 0 ) ∈ F and (i 0 , j 0 ) / ∈ F . Such an index always exists because otherwise the first case is applicable. If there exists no j 1 such that (i 0 , j 1 ) ∈ F , then F F according to the first case. If there exists j 1 such that For each word, there exists only one pairing T which is maximal for the previously defined ordering.
Proof. Let T and T be two maximal pairings over w.
• If T or T are not maximal for the inclusion ordering, we have a contradiction. Indeed this would mean that there exists no (i, j) such that (i, j) is a valid pair over • is clearly a total ordering among maximal sets due to the second item of the definition. Thus T = T .
With the previously stated result, we have P ∈M P w(P ) = P ∈F w(P ), where P ∈ F ⇔ the electronic journal of combinatorics 28(3) (2021), #P3.1 The function κ is a bijection between F and maximal paired words for .
Remark 16. The proof that this is a bijection is not done here because a very similar and more complicated proof is already done for the case c = 0 in section 3.
Remark 17. In order to obtain that set of fixpoints, φ takes a path with an element in C and produces an element which is smaller than that path where −1 is replaced by q i , thus it is not maximal (hence only path without step in C and maximal are fixpoints). This is the reason f has been chosen that way.
Since the number of 1 is equal to the exponent of a, and the exponent of q is equal to the number of inversion in the word (see section 3 for a more general proof), then

Theorem 3 is a generalization of the formula for Al-Salam-Carlitz moments
In this subsection, we see combinatorially why the theorem 3 is a generalization of the formula for Al-Salam-Carlitz moments. As we will see in the next chapter, the Askey-Wilson moments are generated by the sum of the weighted Motzkin paths with the following possible steps.
The Al-Salam-Carlitz moments, are found by summing the weighted Motzkin paths with the following possible steps.
Since there is no up step with a weight of −1 available, this means that the procedure used to remove the peaks on weight 1, and leading to the multiplicative factor n k=0 , is not required anymore. Also, we can see that the set of available steps are a subset of the set of available steps for the Askey-Wilson polynomials, provided that b = 1. The steps with a weight involving c is not present. This means that moments are provided by the sum where the indexes w and t are always 0. When we chose c = 0, the weight of the paths involving steps with a c is zero. Hence, it is no surprise that without the multiplicative factor, the formula taking b = 1 and c = 0 coincides. Indeed, the formula provided by theorem 3 leads to

Definitions
The Askey-Wilson polynomials and the corresponding coefficients A n , C n , λ n and b n are defined as in the introduction 1.
The computation of the A n and B n coefficients (defined in [10]) gives the following.
A n = (1−abq n )(1−acq n ) a and C n = a(1 − q n )(1 − bcq n−1 ), which gives for λ n and b n , Hence, using Viennot's theory [14], we define Motzkin paths on the weighted steps described in figure 15 according to the value of λ n and b n . Remark 19. In the figure 15, we define the set of steps that will be used to remove most of the paths. They are the equivalent to the black dots steps in what has been done for c = 0 in [10]. They will behave similarly as they have the same important property, namely ∀s ∈ C, ∃s such that w(s) * −q i = w(s ). So those steps will be used to cancel Motzkin path such that their weight can be increased by q i .
• t 2 = #BS, t 1 = #{−1(↑), −1(↓)} and t 3 = #BC (t 1 , t 2 and t 3 implicitely depends of the considered path) Definition 21. We denote by Mot n the set of Motzkin paths of size n built with steps in the figure 12 and byMot n the set of paths that do not have a step in C nor a abcq 2i horizontal path.
(Proven by counting the number of letters on each step).

Bijection between words and Motzkin paths
In this subsection, we create a link between words and Motzkin paths using paired words.
A paired word w, F upon the alphabet {a, b, c, abc, −1} is a word w and a set of couple of indexes F such that, (i)∀(i, j) ∈ F, w i < w j (for the ordering a < b < c < abc), or If condition (i) is fulfilled, one will say that F respects the ordering. If (ii) is fulfilled, all letters are paired at most once. Let us denote by P W the set of all possible paired words on this alphabet (no length restriction). We define the mapping κ :M ot n → P W as in the figure 16.
Definition 23. We define the ordering between set of pairs on a word as follows: • If F F then F F • If F and F are both maximal for the inclusion ordering then let i 1 be the smallest integer such that there exists j 0 such that (i 0 , j 0 ) ∈ F and (i 0 , j 0 ) / ∈ F . Such an index always exists because otherwise the first case is applicable. If there exists no j 1 such that (i 0 , j 1 ) ∈ F , then F F according to the first case. If there exists j 1 such that (i 0 , j 1 ) ∈ F , then if j 0 = j 1 , it contradicts the definition of i 0 . If j 0 < j 1 , κ is a bijection between Motzkin paths without element in C nor abcq 2i−1 horizontal step and paired words. However, it is not a bijection between Motzkin paths of size n without element in C nor abcq 2i−1 horizontal step and paired words of size n.

Involution and cancellation
Let f be the function defined in figure 17: figure 17, α, β and γ stand for the corresponding letter in the paired word that will be defined in section 3.4.
For a complete formal definition, please refer to appendix D.
Definition 27. f −1 is clearly a bijection from D f −1 to D f . Let f be its reciprocal function.
the electronic journal of combinatorics 28(3) (2021), #P3.1 Figure 17: Informal definition of f −1 Figure 18: Definition of g Remark 28. It is more intuitive to define f −1 instead of defining f directly; as it will be precisely defined in the 3rd item of the Lemma 29, f −1 's action consists in taking a couple of steps for which the corresponding word is not maximal and produces a larger word for .
We define φ as in the previous section. The only difference lies in function f , and ∃A, B such that D f = A × B. Intuitively, f −1 is a function that takes two consecutive steps that do not correspond to a maximal pairing and corrects it. The image of the path after an iteration of f −1 is always larger for (defined in section 3.2).
• (Key item) For each P ∈ M P , either κ(P ) is maximal for , or ∃(i, j) such that (s i , s j ) ∈ D f −1 and, with P the path such that f −1 has been applied to (s i , s j ), κ(P ) κ(P ). (Where(P ) is the path where g has been applied to each step if possible and abcq 2i−1 has been replaced by abcq 2i . Note that this path is thus iñ M P n ).
Proof. Item 1 and 2 directly come from the definition of f and g. To prove the 3rd item, we use the complete definition of f −1 given as the reverse of f defined in appendix D. First, the definition of f −1 is such that the corresponding resulting word w' (ie κ(P )) is equal to the initial word w (ie κ(P )).
• If we can apply f −1 : case (1), then it extends on the right a pair that could be extended.
case (2), then it merges two different pairs to create a larger pair (which fulfills (ii)); the new pair is larger than the leftmost one so (w, F ) < (w, F ).
case (3), then it creates a new possible pair so F ⊂ F .
case (4), then it extends on the left a pair that could be extended.
• Conversly, if (w, F ) is not maximal, let (w, F ) be a larger paired word: -If F ⊂ F , then case (3) can be applied at least once (it does not necessarily give F , case (1) and (4) can be required afterward).
-If ∃(i, j) ∈ F , (i , j) ∈ F and i < i, if i − 1 is paired in F then we can apply (2), else we can apply (4) to (i − 1, i).
Definition of φ 1 : Let i 0 = min{i|w i ∈ C}. (the index of the −1 which will be replaced by a q i down step, thus i iterations that multiplies by q −1 must be done in order to compensate).
• Initialisation: Apply g to s i 0 ; weight is multiplied by −q level(i 0 ) .
-If w i = abcq 2i , w i becomes abcq 2i−1 ; weight is multiplied by q −1 -Else, apply f to (w i p+1 , w i p+1 +1 ); weight is multiplied by q −1 This defines a functionφ 1 from M P with a −1 step to M P . Let j 0 = min{j|w j ∈ B}, and j 1 the index of the last modified step if ψ 1 was applied (n + 1 if there is no step in C).
Since ψ 1 is obviously a bijection from E 1 to E 2 , we can define ψ 2 = ψ −1 1 which is a bijection from E 2 to E 1 . We then define ψ : Mot n → Mot n Thanks to Lemma 29 and Lemma 31, the following result holds: Where ω(w) is the weight of κ(w, F ) where (w, F ) is the only maximal paired word on w (using Lemma 24). Since W (n) does not contain words of constant size, we can not compute this sum directly. In the next section, we make a bijection from triple of words with a specific size to W (n) to solve this problem.

Construction of γ
Let us consider Lemma 33. (i) For every word w in W a,b,c,abc,−1 , there exists a triple w = (w 1 , w 2 , w 3 ) such that γ(w ) = w. (ii) For every two triple of words w 1 and w 2 , w 1 = w 2 ⇒ γ(w 1 ) = γ(w 2 ). Which means γ is a bijection between all words and all triple of words.
The proof of Lemma 35 is done in Section 4. In total, the weight is

Concluding the proof
Where ω(w) is the weight of κ(w, F ) where (w, F ) is the only maximal paired word on w (using Lemma 24). Also, Thanks to Lemma 34. Also, because of Lemma 35, if (w 1 , w 2 , w 3 ) ∈ M u,v,w,t , then

Proof of Lemma 35 with crossings
Recall: In this section, we prove Lemma 35 using crossings, a formalism on paired words which is introduced to simplify the proof. This proof could equivalently be done directly on Motzkin paths by considering the sum of the level of all steps rather than the crossings.
Remark 38. The corrective terms n 1 and n 2 simplify when we sum over all possible triple of words, because of a trivial involution that cancels them (for every pair with α = abc, reverse with the first b inside the pair if it exists, for every pair with α = b, reverse with the first abc inside the pair if it exists). Remark 40. As shown in the figure, the vertical line is "slightly on the left", which means that if γ is a left element of a pair (ie ∃δ, (γ, δ) ∈ F ) then the crossing with this pair is not counted. Also, if γ is a right element of a pair (ie ∃δ, (δ, γ) ∈ F ), the crossing with this pair is counted.
Remark 41. The number of crossings in the word after the number of −1 has been doubled, is also equal to the exponent of q in the corresponding Motzkin path (trivial). Hence, the previous lemma is equivalent to the following: For w paired word, (number of crossings) = t1−t2+1 Proof. First, let us make some remarks which will be useful for the proof of the lemma. For convenience, let us define inv = (inv 1 + inv 2 + inv 3 ) + n 1 − n 2 (which is not the number of inversion in the resulting word).
• If w does not contain any pair, according to the fact that the pairing should be maximal for the previously defined pairing rules, this means the number of inversion is also 0, as the number of −1.
The number of abc is 0 or 1, because if it is greater than 2, at least 2 abc could be paired together.
(a and b behaves the same according to (iv)). Also, Which is what we want, indeed: • Other cases are similar but not exactly the same. We really recommand to read appendix G for the complete proof.
Remark 42. We have not considered the (-1) up steps that are created by δ except for the case α = −1, β = −1 because the q exponent is 0 so there is no line going down from them, thus it does not change the number of crossings.

Conclusion
As described in subsection 1.3.2, we computed first with a combinatorial approach Al-Salam-Carlitz moments using a sign reversing involution directly on the Motzkin paths. It was possible to adapt this proof for Askey-Wilson moments for the case c = d = 0 giving an alternative combinatorial proof of what has been done by Stanton and Kim in [10] with doubly striped skew shapes. The same proof has also been adapted in order to define a sign reversing involution for the case d = 0 of Askey-Wilson polynomials; giving a more complicated set of fixpoints that required to define another bijection. In order to pursue this work the natural next steps would be to generalize first to the most general Askey-Wilson moments (no restriction on a, b, c, d) and then to other families of orthogonal polynomials. Note that the most general case is different because it is no longer a polynomial in a, b, c and d.   Figure 22: Reminder a aq q aq −1 aq q 2 −1 1 2 3 4 5 6 7 8 Figure 23: P In the following, the function f will be the function defined in the figure 11. Let us recall how φ works in that case (P ∈ E 1 ): • i 0 is the index of the first orange step, here 5. Level(5) = 2, thus 2 iterations.
• i 1 is the index of the last red step before i 0 • (i) Apply f to (P i1 , P i1+1 ). This defines P 1 . (1 st iteration) • i 2 is the index of the last red step before i 1 (which is now a blue step) • (ii) Apply f to (P i2 , P i2+1 ). This defines P 2 = φ(P ).
a aq q aq q aq q 2 −1 1 2 3 4 5 6 7 8 a aq q aq q aq q 2 −1 In this section we define a mapping from W a,b,c,abc, , which corresponds to doubling the number of −1 in the word; however this has to be done bijectively, meaning that all words of W a,b,c,abc,−1 (u − t 2 , v − t 2 , w − t 2 , t 2 , t 1 ) should be possible and all of them should correspond to a unique label of a Motzkin path in F a,b,c .
We extend the existing mapping defined in [10] for the case c = 0. This creates a word in M a,b,c,abc,−1 of length u+v +w +t 1 −2 * t 2 from a Motzkin path in F a,b,c . This mapping gives us a mapping from words of length u + v + w + 2 * (t 1 − t 2 ) (the label of the Motzkin path) to words of length u + v + w + 2 * t 1 − t 2 . Let δ be this mapping.
Let us callη the function that gives from (w 1 , w 2 , w 3 ) the corresponding Motzkin path. (Such that the label is the maximal pairing of η(w)) Remark 46. There are four intermediate results to prove.  Figure 25: Extension of the map, part 1 ⇒ Figure 26: Extension of the map, part 2 Proof. (1) To prove (i) and (iii), we will prove later that a Motzkin path P is in F a,b,c iff its corresponding paired word (w, F ) is maximal. This will thus prove (i), and since γ is a bijection, γ −1 (w) is a triple (w 1 , w 2 , w 3 ) such thatη(w 1 , w 2 , w 3 ) is the Motzkin path corresponding to the maximal pairing of w. If (w, F ) is maximal, since the maximal pairing is unique, η(w 1 , w 2 , w 3 ) = (w, F ) which proves (iii). (2) (iv) comes from the fact that γ is a bijection thus injective, and the mapping previously from path to words is also injective, so η is injective, thusη is injective. Figure 27: Definition of f : Case (i) when the decreasing step is matched to abq i or a 2 bcq 2i * 2 ⇔ when the decreasing step is matched to a 2 bcq 2i Figure 29: Definition of f : Case (iii) Remark 47. The star conditions are necessary because the decreasing step alone does not provide enough information to know if the corresponding letter α in the word is smaller than β. Defining the f function directly on paired words would have prevented this issue.

E Proof of Lemma 10
Definition 48. In order to prove this result, we introduce a new mapping g : Mot n → {A, B, C} n defined as the following.
• For s possible step, Proof. We will prove the Lemma 10 by induction using the following property : after k iterations, where Inversions i0 = {(i, j)|g(w) i < g(w) j &i < j i 0 } for the ordering A < B and A < C.
Proof. First, let us make some remarks which will be useful for the proof of the lemma. For convenience, let us define inv = (inv 1 + inv 2 + inv 3 ) + n 1 − n 2 (which is not the number of inversion in the resulting word).
The number of abc is 0 or 1, because if it is greater than 2, at least 2 abc could be paired together.