Baxter permutations

sage.combinat.baxter_permutations.BaxterPermutations

The combinatorial class of Baxter permutations.

A Baxter permutation is a permutation avoiding the generalized permutation patterns \(2-41-3\) and \(3-14-2\). In other words, a permutation \(\sigma\) is a Baxter permutation if for any subword \(u := u_1u_2u_3u_4\) of \(\sigma\) such that the letters \(u_2\) and \(u_3\) are adjacent in \(\sigma\), the standardized version of \(u\) is neither \(2413\) nor \(3142\).

See [Gir2012] for a study of Baxter permutations.

INPUT:

  • n – (default: None) a nonnegative integer, the size of the permutations.

OUTPUT:

Return the combinatorial class of the Baxter permutations of size n if n is not None. Otherwise, return the combinatorial class of all Baxter permutations.

EXAMPLES:

sage: BaxterPermutations(5)
Baxter permutations of size 5
sage: BaxterPermutations()
Baxter permutations
sage.combinat.baxter_permutations.BaxterPermutations_all

The enumerated set of all Baxter permutations.

See BaxterPermutations for the definition of Baxter permutations.

EXAMPLES:

sage: from sage.combinat.baxter_permutations import BaxterPermutations_all
sage: BaxterPermutations_all()
Baxter permutations
sage.combinat.baxter_permutations.BaxterPermutations_size

The enumerated set of Baxter permutations of a given size.

See BaxterPermutations for the definition of Baxter permutations.

EXAMPLES:

sage: from sage.combinat.baxter_permutations import BaxterPermutations_size
sage: BaxterPermutations_size(5)
Baxter permutations of size 5