SignedPermutations
A name from the enumeratio catalogue with no kernel of its own yet; this page carries its crosswalk only.
Catalogued in the enumeratio database, with crosswalk rows in oeis, sage, sympy; not yet written up here.
✓ checked against that system · ! checked, with disagreements (hover a chip)OEIS
A000165✓SageMathSignedPermutations(n)SymPysigned_permutationsSignedPermutations(...)Catalogued in the enumeratio database, with crosswalk rows in oeis, sage, sympy; not yet written up here.Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer<0..>) -> indexed_collection<signed_permutation> | combinatorics | always |
Definition
Epsil, as the implementation runs it.
count(_n)
2 ^ _n * _n!unrank(_n, _r)
Map(Function(
(1 - 2 * (((_r - _r % _n!) / _n! - (_r - _r % _n!) / _n! % 2 ^ (j -
1)) /
2 ^ (j - 1) % 2)) * Fold(
Function(
v + 1 if v >= (_r % _n! - _r %
_n! %
(_n -
i)!) /
(_n - i)! % (_n - i + 1) +
1 else v,
v,
i,
),
(_r % _n! - _r % _n! % (_n - j)!) / (_n -
j)! %
(_n - j + 1) + 1,
Range(j - 1, 1, -1),
),
j,
), Range(1, _n, 1))rank(_n, _x)
Fold(Function(m + (2 ^ (j - 1) if _x[j] < 0 else 0), m, j), 0, Range(1, _n, 1)) *
_n! + Fold(Function(r * (_n - j + 1) + (Abs(_x[j]) - 1 - Fold(
Function(c +
(1 if Abs(_x[i]) <
Abs(_x[j]) else 0), c, i),
0,
Range(1, j - 1, 1),
)), r, j), 0, Range(
1,
_n,
1,
))valid(_n, _x)
Fold(Function(
(ReplaceAt(di_seen, Abs(_x[di_j]), 1) if di_seen[Abs(_x[di_j])] ==
0 else ReplaceAt(
di_seen,
_n + 1,
1,
)) if 1 <=
Abs(_x[di_j]) &&
Abs(_x[di_j]) <=
_n else ReplaceAt(di_seen, _n + 1, 1),
di_seen,
di_j,
), Map(Function(0, di_z), Range(1, _n + 1, 1)), Range(1, _n, 1))[_n +
1] ==
0 if Length(_x) == _n else FalseStatistics
On SignedPermutation, called as CombinatorialStat(x, "Name").
- FlagDenertIndexSt001819The negative entries plus twice the Denert index of the permutation |p(1)| ... |p(n)|.
- FlagDescentSt001893Twice the descents between entries, plus 1 when the first entry is negative.
- FlagExcedanceSt001892Twice the excedances plus the negative entries.
- FlagMajorIndexSt001433The number of negative entries plus twice the sum of the descents, a negative first entry counting as a descent at 0.
- FlagWeakExcedanceSt001817Twice the weak excedances plus the negative entries.
- IncreasingPositivePairCountSt001772Pairs i < j with 0 < p(i) < p(j): the occurrences of the signed pattern 12.
- NegativeEntryCountSt001429The number of negative entries.
- NegativeSumPairCountSt001434Pairs i < j with p(i) + p(j) < 0.
- PositiveBeforeLargerNegativePairCountSt001771Pairs i < j with 0 < p(i) < -p(j): the occurrences of the signed pattern 1-2.
- PositiveBeforeNegativeCountSt001870Twice the adjacent pairs of a positive entry followed by a negative one, plus 1 when the first entry is negative.
- PositiveEntryCountSt001430The number of positive entries.
- RightDescentsSt001896Indices 0 <= k < n with s(k) > s(k+1), where s is the inverse of p and s(0) = 0.
- SignedAlignmentCountSt001822The alignments of p: its nesting alignments, those of type EN and those of type NE.
- SignedPermutationOrderSt001555The least m >= 1 with p^m the identity, p acting on -n..n.
- SignedReflectionLengthSt001769The least number of reflections of the hyperoctahedral group with product p: n minus the positive cycles.
- SignedSortingIndexSt001821The sum, over the signed transpositions that sort p by moving n, then n - 1, and so on into place, of j - i - 1 when i < 0 and j - i otherwise.
- StasinskiVollLengthSt001823Half the pairs -n <= i < j <= n of opposite parity with p(i) > p(j), where p(-k) = -p(k) and p(0) = 0.
- TypeBInversionCountSt001428Pairs i < j with p(i) > p(j), plus pairs i <= j with -p(i) > p(j).
Maps
Into and out of SignedPermutation, called as CombinatorialMap(x, "Name"). Properties are the laws we state and what FindStat records.
From SignedPermutation
- ComplementSignedPermutation → SignedPermutationinvolutionBijectionGraded mapInvolutionMp00188Each entry ±i replaced by ±(n + 1 − i), its sign kept.
- DemazureProductWithInverseSignedPermutation → SignedPermutationGraded mapMp00260The Demazure product π⁻¹ ⋆ π in the hyperoctahedral group.
- FlagNegativesToNegativesSignedPermutation → SignedPermutationbijectioninverseBijectionGraded mapMp00271The signs rearranged so the negatives of the image count the flag negatives of the original.
- FoataHanSignedPermutation → SignedPermutationbijectioninverseBijectionGraded mapMp00190Foata and Han's fundamental transformation: each letter in turn is put on the end of the image so far, which is cut into blocks and rotated.
- InverseSignedPermutation → SignedPermutationinvolutionBijectionGraded mapInvolutionMp00162The inverse signed permutation: ±j goes to the position of j, signed as the entry there.
- InverseFoataHanSignedPermutation → SignedPermutationbijectioninverseBijectionGraded mapMp00194The inverse of Foata and Han's transformation: the last letter is peeled off and the blocks of the rest are rotated back.
- InverseKrewerasComplementSignedPermutation → SignedPermutationbijectioninverseBijectionGraded mapMp00167cπ⁻¹ with the long cycle c = (1 … n −1 … −n): position i holds π⁻¹(c(i)).
- KrewerasComplementSignedPermutation → SignedPermutationbijectionBijectionGraded mapMp00168π⁻¹c with the long cycle c = (1 … n −1 … −n): position i holds c(π⁻¹(i)).
- NegateSignsSignedPermutation → SignedPermutationbijectioninvolutionBijectionGraded mapInvolutionMp00244Every sign reversed: multiplication by the longest element −id of the hyperoctahedral group.
- NegativeCycleTypeSignedPermutation → IntegerPartitionSurjectionMp00169The lengths of the negative cycles, largest first: those of the underlying permutation with an odd number of negative entries.
- NegativesToFlagNegativesSignedPermutation → SignedPermutationbijectioninverseBijectionGraded mapMp00270The signs rearranged so the flag negatives of the image count the negatives of the original.
- PositiveCycleTypeSignedPermutation → IntegerPartitionSurjectionMp00166The lengths of the positive cycles, largest first: those of the underlying permutation with an even number of negative entries.
- ReverseSignedPermutation → SignedPermutationinvolutionBijectionGraded mapInvolutionMp00161The word read backwards, signs kept.
- RowmotionSignedPermutation → SignedPermutationbijectionBijectionGraded mapMp00281Rowmotion of the signed permutation with respect to the sorting order, through its signed Lehmer code.
- SignWordSignedPermutation → BinaryWordsurjectionSurjectionGraded mapMp00267The signs as a binary word: letter i is 1 when entry i is negative.
- StandardizationSignedPermutation → PermutationsurjectionSurjectionGraded mapMp00245The permutation of the same relative order, taking 1 < … < n < −n < … < −1.
- UnderlyingPermutationSignedPermutation → PermutationsurjectionSurjectionGraded mapMp00163The permutation left when the signs are forgotten.
To SignedPermutation
- SignedPermutationPermutation → SignedPermutationInjectionGraded mapMp00170A permutation as the signed permutation with every sign positive.