Skip to content

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)OEISA000165✓SageMathSignedPermutations(n)SymPysigned_permutations
SignedPermutations(...)Catalogued in the enumeratio database, with crosswalk rows in oeis, sage, sympy; not yet written up here.
Typed signatures
TypePackageApplies
(integer<0..>) -> indexed_collection<signed_permutation>combinatoricsalways

Domain: Combinatorics

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 False

Statistics

On SignedPermutation, called as CombinatorialStat(x, "Name").

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.

Enumeration

Examples

Basic #

2nn!=482^n n! = 48 signed permutations

live ↗
InCount(SignedPermutations(3))\mathrm{Count}(\mathrm{SignedPermutations}(3))Out4848

All eight signed permutations of {1,2}\{1, 2\}

live ↗
InTake(SignedPermutations(2),8)\mathrm{Take}(\mathrm{SignedPermutations}(2), 8)Out[SignedPermutation⁡([1,2]),SignedPermutation⁡([2,1]),SignedPermutation⁡([−1,2]),SignedPermutation⁡([−2,1]),SignedPermutation⁡([1,−2]),SignedPermutation⁡([2,−1]),SignedPermutation⁡([−1,−2]),SignedPermutation⁡([−2,−1])]\bigl\lbrack{\operatorname{SignedPermutation}}([1, 2]), {\operatorname{SignedPermutation}}([2, 1]), {\operatorname{SignedPermutation}}([-1, 2]), {\operatorname{SignedPermutation}}([-2, 1]), {\operatorname{SignedPermutation}}([1, -2]), {\operatorname{SignedPermutation}}([2, -1]), {\operatorname{SignedPermutation}}([-1, -2]), {\operatorname{SignedPermutation}}([-2, -1])\bigr\rbrack
About
Examples2
CrosswalkOEISSageMathSymPy