Cycles in the graph of overlapping permutations avoiding barred patterns

As a variation of De Bruijn graphs on strings of symbols, the graph of overlapping permutations has a directed edge π(1)π(2) . . . π(n+1) from the standardization of π(1)π(2) . . . π(n) to the standardization of π(2)π(3) . . . π(n + 1). In this paper, we consider the enumeration of d-cycles in the subgraph of overlapping (231, 41̄32)avoiding permutations. To this end, we introduce the notions of marked Motzkin paths and marked Riordan paths, where a marked Motzkin (resp. Riordan) path is a Motzkin (resp. Riordan) path in which exactly one step before the leftmost return point is marked. We show that the number of closed walks of length d in the subgraph of overlapping (231, 41̄32)-avoiding permutations are closely related to the number of marked Motzkin paths and that of marked Riordan paths. By establishing bijections, we get the enumerations of marked Motzkin paths and marked Riordan paths. As a corollary, we provide bijective proofs of two identities involving Catalan numbers in answer to the problem posed by Ehrenborg, Kitaev and Steingŕımsson. Moreover, we get the enumerations of (231, 41̄32)-avoiding affine permutations and (312, 324̄1)-avoiding affine permutations.


Introduction
This work is motivated by the problem of determining the number of d-cycles in the graph of overlapping pattern avoiding permutations, which was initiated by Ehrenborg et al. [15].
The classic problem of enumerating permutations avoiding a given pattern has received a great deal of attention and has led to interesting variations.For a thorough summary of the current status of research, see Bóna's book [6,7] and Kitaev's book [20].
A barred permutation τ of [k] is a permutation of S k having a bar over one of its elements.Let τ be the permutation of [k] by unbarring τ , and τ be the permutation obtained from τ by removing the barred elements.For any permutation π, if every subsequence which is order-isomorphic to τ can be extended to a subsequence which is order-isomorphic to τ , then we say that π avoids the pattern τ .For example, if π = 37258416 and τ = 235 14, then we have τ = 23514 and τ = 1243.All subsequences of the pattern 1243 are 3586 and 2586, which are subsequence of 35816 and 25816.So we have π ∈ S 8 (235 14).The classes S n (321, 3 142) and S n (231, 4 132) are enumerated by the n-th Motzkin number, see [2,8,17,19].In [9], Chen et al. established a correspondence between Riordan paths and (321, 3 142)-avoiding derangements.
A De Bruijn graph is a directed graph on vertex set {0, 1, . . ., q − 1} n , the set of all strings of length n over an alphabet of size q, in which there is a directed edge from the string x to the string y if and only if the last n − 1 coordinates of x agree with the first n − 1 coordinates of y.It is well known that the number of directed cycles of length d, for d n, is given by 1 d e|d µ(d/e)q e , ( where the sum is over all divisors e of d, and where µ denotes the number theoretic Möbius function, see ( [18], p.126) for instance.Recall that µ(n) is (−1) k if n is a product of k distinct primes and is zero otherwise.For a permutation π = π(1)π(2) . . .π(n) consisting of distinct real numbers, the standardization of π is the unique permutation τ ∈ S n which is order-isomorphic to π.For example, the standardization of 4(−1)53 is 3142.
The graph of overlapping τ -avoiding permutations, denoted by G(n, τ ), is the subgraph of G(n) having the vertex set S n (τ ) and the edge set S n+1 (τ ).For example, the graph G(2, {231, 4 132}) is illustrated in Figure 1.Recently, Ehrenborg et al. [15] derived that, the electronic journal of combinatorics 23(3) (2016), #P3.57for d n, the number of cycles of length d in the graph G(n, 312) is given by which can be viewed as an analogous result for De Bruijn graphs.In their paper [15], they also posed the problem of evaluating the number of d-cycles in the graph of overlapping permutations avoiding any set of patterns of length 3 or more.In this paper, we derive that, for n  In order to get the enumeration of d-cycles in the graph G(n, {231, 4 132}), we introduce the notions of marked Motzkin paths, marked Riordan paths and free Motzkin paths.
A Motzkin path of order n is a lattice path in Z × Z from (0, 0) to (n, 0) using up steps U = (1, 1), down steps D = (1, −1) and horizontal steps H = (1, 0), and never lying below the x-axis [13].Denote by M n the set of all Motzkin paths of order n.It is well known that Motzkin paths of order n are counted by the n-th Motzkin number A free Motzkin path is just a Motzkin path but without the restrictions that it has to end with a point on the x-axis and that it cannot go below the x-axis.Let FM n denote the set of free Motzkin paths from (0, 0) to (n, 0).By simple arguments we have that A marked Motzkin path is a Motzkin path in which exactly one step before the leftmost return point is distinguished.Recall that for a lattice path, the points on the x-axis except for the initial point are called return points.In this sense, the ending point is always a return point.Denote by M * n the set of all marked Motzkin paths of order n.Let α n = m n−2 + δ i,1 where m −1 = 0 and δ n,1 = 1 if n = 1 and 0 otherwise.By simple computation, we derive that the number of marked Motzkin paths of order n with k return the electronic journal of combinatorics 23(3) (2016), #P3.57points is given by where the sum is over all compositions P = (n 1 , n 2 , . . ., n k ) of n into k parts.Recall that a composition of a non-negative integer n into k parts is a list of k positive integers (n 1 , n 2 , . . ., n k ) such that their sum is n.
By establishing a bijection Φ between the set M * n and the set FM n , we derive that where the second sum is over all compositions P = (n 1 , n 2 , . . ., n k ) of n into k parts.
A Riordan path is a Motzkin path without horizontal steps on the x-axis.Denote by R n the set of Riordan paths from (0, 0) to (n, 0).The Riordan number r n counts the number of Riordan paths from (0, 0) to (n, 0), see [3] and sequence A005043 in [21] for other combinatorial interpretations of r n .A marked Riordan path is a Riordan path in which exactly one step before the leftmost return point is distinguished.Denote by R * n the set of all marked Riordan paths from (0, 0) to (n, 0).Furthermore, denote by FM(n, k) the set of all free Motzkin paths from (0, 0) to (n, k).
Let R * n (U ) denote the subset of R * n in which the marked step of each path is an up step.Analogously, let R * n (H) (resp.R * n (D)) denote the subset of R * n in which the marked step of each path is a horizontal (resp.down) step.
By establishing a bijection Γ between the set R * n (U )∪R * n (H) and the set FM(n−1, 1), and a bijection Υ between the subset of R * n (U ) in which each path has k return points and the set FM(n − 1 − k, k − 1), we derive that where the second sum is over all compositions P = (n 1 , n 2 , . . ., n k ) of n into k parts.Note that each connected subgraph of a path is also a path.Hence a composition (n 1 , n 2 , . . ., n k ) of n can be thought of as a subgraph of the path on n vertices, where n i is the size of the ith connected component.The number of connected components of the subgraph is the number of parts of the composition.Analogously, a cyclic composition of n is defined to be a subgraph of the labeled cycle on n vertices where each component is a path.
Given a cyclic composition P of n into k parts, we first label the path containing the vertex 1 by B 1 .Then label the connected components of P clockwise by B 2 , B 3 , . . ., B k .The type of P , denoted by type(P), is defined to be (n 1 , n 2 , . . ., n k ), where n i is the size of B i .The compositions and the cyclic compositions of n are closely related by the following trivial observation.n and β n = c n−1 + δ n,1 .Using generating functions, Ehrenborg et al. [15] proved that where the sum is over all cyclic compositions P of type (n 1 , n 2 , . . ., n k ).They also asked for bijective proofs of (1.6) and (1.7).By Observation 1.1, Formulae (1.6) and (1.7) can be rewritten as where the sum is over all compositions P = (n 1 , n 2 , . . ., n k ) of n into k parts.
Relying on the bijections Φ and Υ, we provide bijective proofs of Formulae (1.8) and (1.9) in answer to the problem posed by Ehrenborg et al. [15].
Let S n denote the set of all bijections π : Z → Z such that S n is called the affine symmetric group, and the elements of S n are called affine permutations.The combinatorial description of affine permutations is due to Lusztig and the first combinatorial study of them was conducted in [10,16].
As an interesting variation of pattern avoidance on ordinary permutations, Crites [11] studied the generating functions for affine permutations avoiding a given pattern.In his paper [11], he derived that the number of 231-avoiding affine permutations in S n is given by 2n−1 n .We denote by S n (τ ) the set of all τ -avoiding permutations in S n .Based on Formula (1.4), we derive that 2 The bijective proofs of (1.4) and (1.5) Throughout this section we identify a path with a word by encoding each up step by the letter U , each down step by D and each horizontal step by H.If P = p 1 p 2 . . .p n is a path, then the reverse of the path, denoted by P , is defined by p n p n−1 . . .p 1 .For example, the reverse of the path P = HU DDU DH is given by HDU DDU H.
Theorem 2.1.There is a bijection Φ between the set of M * n and the set FM n .
Proof.We first define a map Φ from the set M * n to the set FM n .Given a marked Motzkin path P ∈ M * n , we define Φ(P ) as follows.Let A be the starting point of the marked step.Denote by P + the section of the P which goes from (0, 0) to the point A. Let P − denote the remaining section of P .Define Φ(P ) = P − P + .
According to the construction of the map Φ, we preserve the number of up steps, the number of down steps and the number of horizontal steps.Hence, the map Φ is well defined, that is, Φ(P ) ∈ FM n .
In order to show that the map Φ is a bijection, we describe a map Φ from the set FM n to the set M * n .Given a free Motzkin path L ∈ FM n , we define Φ (L) as follows.Let B be the lowest point of the path L. If there are more than one such lowest point, we choose B to be the rightmost one.Denote by L − the section of L which goes from (0, 0) to the point B. Let L + denote the remaining section of L. Denote by L * − the path obtained from L − by marking its first step.Define Φ (L) = L + L * − .Since the map Φ preserves the number of up steps, the number of down steps, and the number of horizontal steps, the resulting path is from (0, 0) to (n, 0).Since B is the (rightmost) lowest point of L, the path L + has only one lowest point in L. This implies that L + has only one lowest point and its initial point is the lowest point of L + .Clearly, the ending point of L − is the lowest point in both L and Φ (L).Hence, the resulting path Φ (L) is a Motzkin path of order n.Moreover, the marked step is to the left of the first return point of Φ (L).This implies that the map Φ is well defined.
It is easily seen that the starting point of P + is the (rightmost) lowest point of Φ(P ).This ensures that the maps Φ and Φ are inverse of each other.Hence, the map Φ is a bijection, which completes the proof.
Figure 2 shows, as an example, a marked Motzkin path P ∈ M * 8 in which a down step is marked, and Figure 3 shows a free Motzkin path Φ(P ) ∈ FM 8 , whose (rightmost) lowest point is B. A Dyck path of order n is a lattice path in Z × Z from (0, 0) to (2n, 0) using up steps U = (1, 1) and down steps D = (1, −1), and never lying below the x-axis [12].Denote by D n the set of all Dyck paths of order n.It is well known that Dyck paths of order n are counted by the n-th Catalan number c n = 1 n+1 2n n .A free Dyck path is just a Dyck path but without the restrictions that it has to end with a point on the x-axis and that it cannot go below the x-axis.Let FD n denote the set of free Dyck paths from (0, 0) to (2n, 0).By simple arguments we have that |FD n | = 2n n .A marked Dyck path is a Dyck path in which exactly one up step before the leftmost return point is distinguished, and each peak of height one maybe marked or not.Recall that the height of a step is defined to be the y-coordinate of its ending point.The height of a peak is the defined to be the height of its up step.Denote by D * n the set of all marked Dyck paths of order n.From the construction of the bijection Φ, one can easily verify that for any marked Motzkin path L in which the marked step is an up step, its corresponding free Motzkin path Φ(L) starts with an up step.Hence, we have the following result.
Theorem 2.2.The map Φ induces a bijection between the set of marked Dyck paths of order n but without any marked peaks and the set of free Dyck paths of order n that starts with an up step.
By simple arguments, we have that the number of free Dyck paths from (0, 0) to (2n, 0) that start with an up step is equal to . Moreover, the number of marked Dyck paths of order n but without any marked peaks is counted by where the second sum is over all compositions P = (n 1 , n 2 , . . ., n k ) of n into k parts.By Theorem 2.2, we derive that By simple computation, we get that the number of marked Dyck paths of order n with k return points is given by where the sum is over all compositions P = (n 1 , n 2 , . . ., n k ) of n into k parts.Thus, the left-hand side of (1.8) counts the number of all marked Dyck paths of order n, while the right-hand side of (1.8) counts the number of all free Dyck paths of order n.In order to prove (1.8), it suffices to establish a bijection between the set D * n and the set FD n .

Theorem 2.3.
There is a bijection between the set of D * n and the set FD n .
Proof.We first define a map Ψ from the set D * n to the set FD n .Given a marked Dyck path P ∈ D * n , we define L = Ψ(P ) by the following rules: the electronic journal of combinatorics 23(3) (2016), #P3.57 • Let O and N be the initial point and the ending point of P , respectively.
• Let A is the starting point of the up step in the leftmost marked peak.If there is no such marked peak, let A = N .
• If P has exactly t marked peaks, then it can be uniquely decomposed as where each P i is a (possibly empty) Dyck path.
According to the construction of the map Ψ, we preserve the number of up steps and the number of down steps.Hence, the map Ψ is well defined, that is, Ψ(P ) ∈ FD n .
In order to show that the map Ψ is a bijection, we describe a map Ψ from the set FD n to the set D * n .Given a free Dyck path L ∈ FD n , we define Ψ (L) by the following rules: • Let N be the ending point of L.
• Let A be the starting point of the leftmost up step that is above the x-axis.If there is no such up step, let A = N .
• Denote by L AN the section of L that goes from the point A to the point N .
• If L starts with a down step, then L is uniquely decomposed as where each L i is a (possibly empty) Dyck path.Set • If L starts with an up step, then set Ψ (L) = Φ −1 (L AN ).
By Theorem 2.2, the path Φ −1 (L AN ) is a marked Dyck path without any marked peaks.Hence, the resulting path Ψ (L) is a marked Dyck path of order n.This implies that the map Ψ is well defined.Since Φ is a bijection, one can easily check that the map Ψ and Ψ are inverses of each other.Thus, the map Ψ is a bijection.This completes the proof.Now we proceed to give a combinatorial proof of Formula (1.5).A lifted Motzkin path of order n is a free Motzkin path from (0, 0) to (n, 1) such that it starts with an up step and all the points are above the x-axis except for the initial point.Denote by LM n the set of lifted Motzkin paths of order n.A marked lifted Motzkin path is a lifted Motzkin path in which exactly one step is marked.Let LM * n denote the set of marked lifted Motzkin paths of order n.

Theorem 2.4.
There is a bijection between the set LM * n and the set FM(n, 1).
Proof.Given a marked lifted Motzkin path P ∈ LM * n , we shall construct a path Ω(P ) ∈ FM(n, 1) as follows.If the first step of P is marked, then let Ω(P ) = P .Otherwise, let A be the starting point of the marked step.Denote by P + the section of P which goes from (0, 0) to the point A, and P − denote the remaining section of P .Define Ω(P ) = P − P + .It is easily seen that the map Ω preserves the number of up steps, the number of horizontal steps and the number of down steps.This yields that the resulting path Ω(P ) is a free Motzkin path from (0, 0) to (n, 1), that is, the map Ω is well defined.
Conversely, given a free Motzkin path L ∈ FM(n, 1), we wish to recover a path Ω (L) ∈ LM * n as follows.Let B be the lowest point of the path L. If there are more than one such lowest point, we choose B to be the rightmost one.If B is the initial point of L, define Ω (L) = L. Otherwise, let L − denote the section of L which goes from (0, 0) to the point B, and L + denote the remaining section of L. Denote by L * − the path obtained from L − by marking its first step.Define Ω (L) = L + L * − .Since the map Ω preserves the number of up steps, the number of down steps and the number of horizontal steps, the resulting path is from (0, 0) to (n, 1).One can easily verify that the resulting path Ω (L) is a lifted Motzkin path when B is the initial point of L. In order to show that the map Ω is well defined, it remains to show that Ω (L) ∈ LM * n when B is not the initial point of L. It is easy to check that the point B is the lowest point of L − both in L and Ω (L).Obviously, B is the ending point of Ω (L) and the y-coordinate of B is 1.Hence, all the points of L − are weakly above the line y = 1 in Ω (L).Moreover, the path L + has exactly one lowest point according to the definition of B. Clearly, the initial point of L + is such point.This implies that all the remaining points of L + are above the x-axis in Ω (L).Thus, the resulting path Ω (L) is a lifted Motzkin path of order n.
It is easily seen that the ending point of P − is the (rightmost) lowest point of Ω(P ).Since the section P − contains at least one step, the initial point of Ω(P ) is not the (rightmost) lowest point of Ω(P ).This ensures that the maps Ω and Ω are inverse of each other.Hence, the map Ω is a bijection, which completes the proof.
Theorem 2.5.There is a bijection between the set R * n (U ) ∪ R * n (H) and the set FM(n − 1, 1).
Proof.First, we describe a map Γ from the set , we construct a path Γ(L) by the following procedure.
• Let O and A be the initial point and the leftmost return point of L, respectively.
• Let L OA denote the section of L which goes from O to A, and let L denote the remaining section of L.
• Let L be the path obtained from L OA by removing its last down step.
the electronic journal of combinatorics 23(3) (2016), #P3.57 By Theorem 2.4, the path Ω(L ) ∈ FM(n − 1, 1) which starts with either an up step or a horizontal step.Meanwhile, the path L is a free Motzkin path ending on the x-axis in which each step is below the x-axis.Hence, the resulting path Γ(L) ∈ FM(n − 1, 1).Conversely, given a path P ∈ FM(n − 1, 1), we can recover a path Γ (P ) ∈ R * n (U ) ∪ R * n (H) as follows.
• Let s be the leftmost step in P which is weakly above the x-axis.
• Let P + denote the section of P which goes from (0, 0) to the starting point of s, and let P − denote the remaining section of P .
By Theorem 2.4, the path Ω −1 (P − ) is a marked lifted Motzkin path in which either an up step or a horizontal step is marked.This implies that the marked step s is to the left of the leftmost return point in the resulting path Γ (P ).Since each step of P + is below the x-axis, all the steps of P + is above the x-axis.Hence, we deduce that Γ Since Ω is a bijection, one can easily check that the maps Γ and Γ are inverses of each other.Thus, the map Γ is a bijection, which completes the proof.
Figure 4 shows, as an example, a marked Riordan path L ∈ R * 8 (U ) in which an up step is marked, and Figure 5 shows a free Motzkin path Γ(L) ∈ FM(7, 1).Theorem 2.6.Fix n 2 and 1 k n − 1.There is a bijection between the subset of R * n (U ) in which each path has exactly k return points and the set FM(n − 1 − k, k − 1).Proof.First, we describe a map Υ from the subset of R * n (U ) in which each path has k return points to the set FM(n − 1 − k, k − 1).Given a path L ∈ R * n (U ) with exactly k return points, it can be uniquely decomposed as where each L i is a Riordan path having exactly one return point.Now we proceed to construct a path Υ(L) by the following procedure.
• For all 1 i k, denote by L i the path obtained from L i by removing its rightmost step.
• Let L be the path obtained from Ω(L 1 ) by removing its leftmost step.
By Theorem 2.4, it is easy to check that Ω(L 1 ) is a free Motzkin path which starts with an up step and ends on the line y = 1.From the construction of the map Υ, we remove altogether k down steps and one up step.Hence, the resulting path Υ(L) is a free Motzkin path from (0, 0) to (n Conversely, given a path P ∈ FM(n − 1 − k, k − 1), we wish to recover a path Υ (P ) ∈ R * n (U ).Clearly, the path P can be uniquely decomposed as where the step s i is last step that leaves the line y = i − 1 for all 1 i k − 1, P 1 is the section of P from (0, 0) to the starting point of s 1 , each P i is the section of P between the steps s i−1 and s i for all 2 i k − 1, and P k is the remaining section of P .Obviously, each s i is an up step.Moreover, P 1 is a free Motzkin path ending on the x-axis and each P i is a Motzkin path in which each step is weakly above the line y = i − 1 for all 2 i k.
Define Υ (P ) = Ω −1 (U P 1 )Ds 1 P 2 Ds 2 P 3 D . . .s k−1 P k D. By Theorem 2.4, one can easily check that the resulting path Υ (P ) ∈ R * n (U ).Moreover, the maps Υ and Υ are inverses of each other.Hence, the map Υ is the desired bijection.This completes the proof.From Theorems 2.5 and 2.6, it follows that the electronic journal of combinatorics 23(3) (2016), #P3.57 Hence, we have On the other hand, by simple computation, we have where the second sum is over all compositions P = (n 1 , n 2 , . . ., n k ) of n into k parts.
Combining Formulae (2.2) and (2.3), we are led to Formula (1.5).Notice that our bijection Υ reduces to a bijection between the subset of D * n in which each path has k return points but without marked peaks and the set of free Dyck paths from (0, 0) to (2n − 1 − k, k − 1).By simple computation, one can verify that the former set is counted by the left-hand side of Formula (1.9), while the latter set is counted by the right-hand side of Formula (1.9).This leads to a bijective proof of (1.9).

Cycles in the graph of (231, 4 132)-avoiding permutations
We begin with some definitions and notations.A cut point of a permutation π ∈ S n is an index j with 1 j n − 1 such that for all i and k satisfying 1 i j < k n we have π(i) < π(k).The cut points split a permutation into components, each ending at a cut point.A permutation without cut points is said to be indecomposable.Proof.We first define a map f from the set W n,d (231, 4 132) to the set S n,d (231, 4 132).Given a closed walk W = (σ 1 , σ 2 , . . ., σ d ) ∈ W n,d (231, 4 132), we recursively generate a sequence (π 1 , π 2 , . . ., π d ) of permutations in which π i ∈ S i+n for all i = 1, 2, . . ., d.Let π 1 = σ 1 .Suppose that we have obtained π i−1 .Now we proceed to construct π i from π i−1 by the following insertion algorithm.
We prove Claim 2 by induction on i.Since π 1 = σ 1 , the claim obviously holds for i = 1.Assume that the claim also holds for i − 1.From the construction of π i , it is easily seen that the subsequence π i (1)π i (2) . . .π i (n + i − 1) is order-isomorphic to π i−1 .Hence, the subsequence π i (j)π i (j +1) . . .π i (n+j) is order-isomorphic to σ j for all j i−1.From Claim 1, it follows that the subsequence π i (i)π i (i + 1) . . .π i (i + n) of π i is order-isomorphic to σ i .This completes the proof of Claim 2.
By Claim 2, the subsequence π d (1)π d (2) . . .π d (n + 1) is order-isomorphic to σ 1 , and the subsequence π In order to show that π d ∈ S n,d (231, 4 132), it remains to show that π d avoids the patterns 231 and 4 132.First, we aim to show that π d avoids the pattern 231.In fact, we show that π i ∈ S n+i (231) for all 1 i d.We prove the assertion by induction on i.Since σ 1 ∈ S n+1 (231) and π 1 = σ 1 , the assertion holds for i = 1.Assume that the assertion holds for m i − 1, that is, π m ∈ S n+m (231) for all m i − 1.Now we proceed to show that π i ∈ S n+i (231).Suppose that the subsequence π i ( )π i (j)π i (k) is an occurrence of 231 where < j < k.Recall that the subsequence π i (1)π i (2) . . .π i (n + i − 1) is order-isomorphic to π i−1 , and the subsequence π i (i)π i (i + 1) . . .π i (n + i) is order isomorphic to σ i .Thus, from σ i ∈ S n+1 (231) and the induction hypothesis that π i−1 ∈ S n+i−1 (231), it follows that < i and k = n + i.According to the construction of π i , we have would form an occurrence of 231.In the former case, π i−1 ( )π i−1 (j)π i−1 (i − 1 + a) would form an occurrence of 231 in π i−1 .This contradicts the fact that π i−1 ∈ S n+i−1 (231).In the latter case, the subsequence σ i (a)σ i (j − i − 1)σ i (n + 1) would form an occurrence of 231 in σ i .This contradicts the fact that σ i ∈ S n+1 (231).Hence, we have π i ∈ S n+i (231).
Our next goal is to show that π d also avoids the pattern 4 132.We claim that π i ∈ S n+i (4 132) for all i = 1, 2, . . ., d.We prove the claim by induction on i. Obviously, the claim holds for i = 1 since π 1 = σ 1 and σ 1 ∈ S n+1 (4 132).Assume that π m ∈ S n+m (4 132) for all m i − 1.Now we proceed to show that π i ∈ S n+i (4 132).If not, there must exist three indices , j, k ( < j < k) such that π i ( )π i (j)π i (k) is an occurrence of 321 which cannot be extended to an occurrence of 4 132.More precisely, we have π i (m) > π i (k) for all < m < j.Recall that the subsequence π i (1)π i (2) . . .π i (n + i − 1) is orderisomorphic to π i−1 and the subsequence π i (i)π i (i + 1) . . .π i (n + i) is order-isomorphic to σ i .Since both π i−1 and σ i avoids the pattern 4 132, we have < i and k = n + i.Then we have 1 Recall that π i (m) > π i (n + i) for all < m < j.This implies that j < i−1+b.Then the subsequence π i ( )π i (j)π i (i−1+b) would from an occurrence of 321.Since π i (1)π i (2) . . .π i (n + i − 1) avoids the pattern 4 132, there exists an integer m such that < m < j and π i ( )π i (m)π i (j)π i (i − 1 + b) forms an occurrence of 4132.Then we have π i (m) < π i (i − 1 + b) < π i (n + i).This yields a contradiction with the fact that π i (m) > π i (n + i) for all < m < j.Thus, we deduce that the indices , j, k do not exist.Hence, we have π i ∈ S n+i (4 132).
In order to show that the map f is a bijection, it suffices to show that the maps f and f are inverses of each other.First, we aim to show that f (f (W )) = W for any closed walk W = (σ 1 , σ 2 , . . ., σ d ) ∈ W n,d (231, 4 132).By the construction of the map f , we recursively generate a sequence (π 1 , π 2 , . . ., π d ) of permutations in which each π i is a permutation of [n + i] and f (W ) = π d .By Claim 2, the subsequence π d (i)π d (i + 1) . . .π d (i + n) is order-isomorphic to σ i .From the construction of the map f , it is easily seen that f (f (W )) = W .
Given a permutation π ∈ S n,d (231, 4 132), suppose that the entry π(d + a) is the maximum among the entries π(d + 1), π(d + 2), . . ., π(2d).The permutation is said to be of type one if π(k) < π(d + a) for all 1 k d.Otherwise, it is said to be of type two.We partition the set S n,d (231, 4 132) into two subsets X and Y , where X is the set all permutations of type one and Y is the set of all permutations of type two.(ii) The subsequence π(1)π(2) . . .π(a − 1) is a permutation of [a − 1] which is orderisomorphic to the subsequence π(d Proof.It is easily seen that if π has properties (i), (ii) and (iii), then π ∈ X.Now suppose that π ∈ X, we shall show that π verifies properties (i), (ii) and (iii).
By Lemma 3.3, one can easily verify that g (π) ∈ X and and the maps g and g are inverses of each other.Hence, the map g is a bijection.This completes the proof.
Define ξ(π) to be the permutation obtained from σ by marking the a-th entry of the rightmost component of σ.
Notice that the bijection χ induces an one-to-one correspondence between the set of indecomposable (231, 4 132)-avoiding permutations of [n] and the set of Motzkin paths of order n with exactly one return point.
By Lemma 3.7, it is easy to verify that the cardinality of the set S L d (231, 4 132) is given by the left-hand side of Formula 1.4, while the cardinality of the subset of S R d (231, 4 132) in which each component contains at least two entries is given by the left-hand side of Formula 1.5.Together with Formulae (1.4) and (1.5), Lemmas 3. The result follows by classic Möbius inversion.This completes the proof.
Together with Formula (4.2), Lemmas 4.2 and 4.3 lead to the following result.

1 .
Case 1. k > 1.If b i+1 = b i +1 for 1 i k −1, then by property (iv) the subsequence π(b i )π(b i+1 )π(d + b 1 ) would form an occurrence of 321 which cannot be extended to a pattern 4132, which yields a contradiction.This implies that b i+1 −b i 2 for 1 i k−1.If b k+1 = b k + 1, then by property (iii) , the subsequence π(b k )π(d + b 1 )π(d + b 2 ) would form an occurrence of 321 which cannot be extended to a pattern 4132, which yields a contradiction.This yields that b k+1 − b k 2. Thus, we deduce that when k > 1, we have b i+1 − b i 2 for all 1 i k.Case 2. k = 1.We claim that d > 1.If not, suppose that d = 1.Since n 2, we have n+d 3. Recall that b 1 = 1 when d = 1.By property (iv) , the subsequence π(1)π(2)π(3) would form an occurrence of 321, which cannot be extended to an occurrence of 4132.This yields a contradiction.Hence, the claim is proved, that is, we have d > 1.Then we have b 2 − b 1 = d + b 1 − b 1 = d 2. This completes the proof.Lemma 3.5.Let n d There is a bijection between the set X and the set S L d (231, 4 132).

Lemma 3 . 6 .n 2 and n d 1 .
Let There is a bijection between the set Y and the set of permutations π ∈ S R d (231, 4 132) in which each component contains at least two entries.Proof.Given a permutation π ∈ Y , suppose that π(d + a) is the maximum among the entries π(d + 1), π(d + 2), . . ., π(2d).Suppose that there are exactly k entries among the entries π(1), π(2), . . ., π(d) which are larger than π d+a .Let π(b 1 ), π(b 2 ), . . ., π(b k ) be such entries, where b 1 < b 2 < . . .< b k < d + a.By Lemma 3.4, π has Properties (i) -(vi) .Now we proceed to define a map ξ from the set Y to the set of permutations π ∈ S R d (231, 4 132) in which each component contains at least two entries.Assume that b k+1 Hence, the resulting permutation σ ∈ S d (231, 4 132).Since b k d and b k+1 = d + a, we have that |σ k | = b k+1 − b k − 1 d + a − 1 − d = a − 1.This ensures that the rightmost component of σ contains at least a entries.Thus, we have ξ(π) ∈ S R d (231, 4 132).In order to show that the map ξ is well defined, it remains to show that each component of ξ(π) contains at least two entries.By property (vi) , we have |σ i | = b i+1 − b i − 1 1 for all 1 i k.Hence, we have concluded that the map ξ is well defined.Conversely, given a permutation σ ∈ S R d (231, 4 132) in which each component contains at least two entries, we shall recover a permutation ξ (σ) ∈ Y .Suppose that σ is uniquely decomposes asσ = (1 σ 1 ) ⊕ (1 σ 2 ) . . .⊕ (1 σ k ),where each σ i is a (231, 4 132)-avoiding permutation.Assume that the a-th entry of the last component ofσ is marked.Let b 1 = a and b i+1 = b i + |σ i | for all 1 i k.Let ξ (σ) to the permutation π such that the subsequence π(b i + 1)π(b i + 2) . . .π(b i+1 − 1) is order-isomorphic to σ i for all 1 i k, and satisfies properties (ii) -(vi) .Recall that b i+1 − b i = |σ i | 1.By Lemma 3.4, we have π ∈ Y and the maps ξ and ξ are inverses of each other.Hence, the map ξ is the desired bijection.This completes the proof.

Theorem 3 . 8 .and n d 1 ,
5 and 3.6 imply that, for n 2 and n d 1, |S n,d (231, 4 132)| = |X| + |Y | Formula (3.1), we get the enumeration of closed walks of length d in the graph G(n, 231, 4 132).For n 2 and n d 1, the number of closed walks of length d in the graph G(n, 231, 4 132) is given by Following the approach given in [15], we get the enumeration of d-cycles in the graph G(n, 231, 4 132).Theorem 3.9.For n 2 the number of d-cycles in the graph G(n, 231, 4 132) is given by 1 Let h(d) denote the number of d-cycles.A closed walk of length d can be obtained by choosing a divisor e of d, an e-cycle and a starting point on the cycle.By repeating the e-cycle d/e times, we obtain a closed walk of length d.Hence, by Theorem 3.