Permutations by cycle type

From Wikiversity
Jump to: navigation, search
Created by mate2code.

The conjugacy classes of the symmetric group Sn are defined by the permutations' cycle types,
which correspond to the integer partitions of n. So the number of conjugacy classes of Sn is OEISA000041(n).

The first 8! = 40320 finite permutations have OEISA000041(8) = 22 different cycle types corresponding to the 22 first integer partitions.
To determine the cycle type of a permutation of up to 8 elements see this table (a supporting file of OEISA198380).


The following table (OEISA181897) shows how many permutations of n elements have cycle type k. (Compare this table.)
Blue numbers are factorials.
The number of distinct entries per row is 1,1,3,4,6,7,11,16... = OEISA073906.
The difference tables always show the differences between the rows of the table above. On the left of the difference tables are always constant columns.



0
 
1
2
2
3
3
2,2
4
4
5
3,2
6
5
7
2,2,2
8
4,2
9
3,3
10
6
11
3,2,2
12
5,2
13
4,3
14
7
15
2,2,2,2
16
4,2,2
17
3,3,2
18
6,2
19
5,3
20
4,4
21
8
Σ
 1  1 1! = 1
2 1 1 2! = 2
3 1 3 2 3! = 6
4 1 6 8 3 6 4! = 24
5 1 10 20 15 30 20 24 5! = 120
6 1 15 40 45 90 120 144 15 90 40 120 6! = 720
7 1 21 70 105 210 420 504 105 630 280 840 210 504 420 720 7! = 5040
8 1 28 112 210 420 1120 1344 420 2520 1120 3360 1680 4032 3360 5760 105 1260 1120 3360 2688 1260 5040 8! = 40320
Differences 1
2 1 1
3 2 2 4
4 3 6 3 6 18
5 4 12 12 24 20 24 96
6 5 20 30 60 100 120 15 90 40 120 600
7 6 30 60 120 300 360 90 540 240 720 210 504 420 720 4320
8 7 42 105 210 700 840 315 1890 840 2520 1470 3528 2940 5040 105 1260 1120 3360 2688 1260 5040 35280
Differences 2
3 1 2 3
4 1 4 3 6 14
5 1 6 9 18 20 24 78
6 1 8 18 36 80 96 15 90 40 120 504
7 1 10 30 60 200 240 75 450 200 600 210 504 420 720 3720
8 1 12 45 90 400 480 225 1350 600 1800 1260 3024 2520 4320 105 1260 1120 3360 2688 1260 5040 30960
Differences 3
4 2 3 6 11
5 2 6 12 20 24 64
6 2 9 18 60 72 15 90 40 120 426
7 2 12 24 120 144 60 360 160 480 210 504 420 720 3216
8 2 15 30 200 240 150 900 400 1200 1050 2520 2100 3600 105 1260 1120 3360 2688 1260 5040 27240
Differences 4
5 3 6 20 24 53
6 3 6 40 48 15 90 40 120 362
7 3 6 60 72 45 270 120 360 210 504 420 720 2790
8 3 6 80 96 90 540 240 720 840 2016 1680 2880 105 1260 1120 3360 2688 1260 5040 24024


Tables [edit]

Array of 2-element subsets of an 8-element set
(compare OEISA018900 as a square array)

All tables of 8-element permutations for this topic are organized in the same way:

  • The numbers in the leftmost column denote only the rows of the table.
  • In column # are the unique index numbers of the finite permutations (compare OEISA195663).
  • The next column contains permutations of 0...7 and 1...8 without spaces in small script, to make the table searchable (Ctrl+F). Sorting by this column brings the permutations in lex order, while the default order is reverse colex.
  • The next eight columns show the actual permutations. Elements out of their natural order are in bold case.
  • Column PM shows the permutation matrices. (Code can be copied from these fields.)
  • The next seven columns show the inversion vector without its first element (which is always zero).
  • Column IS shows which 2-cycles are part of the inversion set. Compare file on the right.
  • Column IN shows the inversion numbers. The inversion number is the sum of the inversion vector and also the cardinality of the inversion set.
  • The next column is a shorthand of those on the right without spaces in small script. These seven numbers tell how many red squares are in the columns of the arrays in IS.

To sort by more than one column you can hold the shift-key and than click the other sort buttons. *

In the default order (ordered by #) the background color of the rows changes when a new element is out of it's natural order. (Or, in other terms, when a new place on the right is necesseary to write the permutation.)

Only the table of transpositions is shown on this page.
The tables of permutations with other cycle types have own pages in this category.


Permutations with cycle type 1 (one 2-cycle) [edit]

The transpositions ordered in an array

The inversion sets in column IS show much regularity:

  • In the table's default order sets with the same red square on the lowest position are grouped together (their rows have the same background color), and the size of the red triangle increases from top to bottom.
  • When the table is first ordered by the inversion numbers in column IN and then by #, sets with the same size of the red triangle are grouped together. Within these sections the position sinks from top to bottom. From section to section the triangle size increases.


# PM IS IN
1 1 21345678
10234567
2 1 3 4 5 6 7 8

[0,1,0,0,  0,0,0,0;
1,0,0,0,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 0
11 120 12346578
01235467
1 2 3 4 6 5 7 8

[1,0,0,0,  0,0,0,0;
0,1,0,0,  0,0,0,0;
0,0,1,0,  0,0,0,0;
0,0,0,1,  0,0,0,0;

0,0,0,0,  0,1,0,0;
0,0,0,0,  1,0,0,0;
0,0,0,0,  0,0,1,0;
0,0,0,0,  0,0,0,1]

0 0 0 0 1 0 0

[0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
1,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0]

1 1000000 1 0 0 0 0 0 0
12 264 12365478
01254367
1 2 3 6 5 4 7 8

[1,0,0,0,  0,0,0,0;
0,1,0,0,  0,0,0,0;
0,0,1,0,  0,0,0,0;
0,0,0,0,  0,1,0,0;

0,0,0,0,  1,0,0,0;
0,0,0,1,  0,0,0,0;
0,0,0,0,  0,0,1,0;
0,0,0,0,  0,0,0,1]

0 0 0 1 2 0 0

[0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
1,1,0,0,0,0,0;
1,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0]

3 2100000 2 1 0 0 0 0 0
13 390 12645378
01534267
1 2 6 4 5 3 7 8

[1,0,0,0,  0,0,0,0;
0,1,0,0,  0,0,0,0;
0,0,0,0,  0,1,0,0;
0,0,0,1,  0,0,0,0;

0,0,0,0,  1,0,0,0;
0,0,1,0,  0,0,0,0;
0,0,0,0,  0,0,1,0;
0,0,0,0,  0,0,0,1]

0 0 1 1 3 0 0

[0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
1,1,1,0,0,0,0;
0,1,0,0,0,0,0;
1,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0]

5 2210000 2 2 1 0 0 0 0
14 512 16345278
05234167
1 6 3 4 5 2 7 8

[1,0,0,0,  0,0,0,0;
0,0,0,0,  0,1,0,0;
0,0,1,0,  0,0,0,0;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0,1,0,0,0,0,0;
1,0,0,0,0,0,0;
0,0,0,0,0,0,0]

9 2222100 2 2 2 2 1 0 0
21 4473 72345618
61234507
7 2 3 4 5 6 1 8

[0,0,0,0,  0,0,1,0;
0,1,0,0,  0,0,0,0;
0,0,1,0,  0,0,0,0;
0,0,0,1,  0,0,0,0;

0,0,0,0,  1,0,0,0;
0,0,0,0,  0,1,0,0;
1,0,0,0,  0,0,0,0;
0,0,0,0,  0,0,0,1]

1 1 1 1 1 6 0

[1,1,1,1,1,1,0;
0,0,0,0,1,0,0;
0,0,0,1,0,0,0;
0,0,1,0,0,0,0;
0,1,0,0,0,0,0;
1,0,0,0,0,0,0;
0,0,0,0,0,0,0]

11 2222210 2 2 2 2 2 1 0
22 5040 12345687
01234576
1 2 3 4 5 6 8 7

[1,0,0,0,  0,0,0,0;
0,1,0,0,  0,0,0,0;
0,0,1,0,  0,0,0,0;
0,0,0,1,  0,0,0,0;

0,0,0,0,  1,0,0,0;
0,0,0,0,  0,1,0,0;
0,0,0,0,  0,0,0,1;
0,0,0,0,  0,0,1,0]

0 0 0 0 0 0 1

[0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
1,0,0,0,0,0,0]

1 1000000 1 0 0 0 0 0 0
23 10800 12345876
01234765
1 2 3 4 5 8 7 6

[1,0,0,0,  0,0,0,0;
0,1,0,0,  0,0,0,0;
0,0,1,0,  0,0,0,0;
0,0,0,1,  0,0,0,0;

0,0,0,0,  1,0,0,0;
0,0,0,0,  0,0,0,1;
0,0,0,0,  0,0,1,0;
0,0,0,0,  0,1,0,0]

0 0 0 0 0 1 2

[0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
0,0,0,0,0,0,0;
1,1,0,0,0,0,0;
1,0,0,0,0,0,0]

3 2100000 2 1 0 0 0 0 0
24 15960 12348675
01237564
1 2 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