Talk:Derangement

d(n) also satisfies the recurrence: d(n) = n*d(n-1) + (-1)^n. see: http://mathworld.wolfram.com/Derangement.html I've seen the relation proved by inclusion-exclusion. DonkeyKong the mathematician (in training) 08:19, 17 July 2006 (UTC)

General formula
The page about rencontres numbers gives a general formula for the derangements as the closest integer to $$n! \over e$$. Is this formula valid for all n? I checked with the first points (ok), and it's obviously valid in the limit. Is there a proof? A corollary of this formula would be a proof that e is irrational. Albmont 13:24, 14 November 2006 (UTC)


 * It is the closest for all natural numbers except n=0. You can always get the correct integer for dn by rounding up at even n and rounding down at odd n. JRSpriggs 05:10, 23 December 2006 (UTC)


 * Probably the formula $$!n = \left\lfloor\frac{n!}{e} + \frac{1}{2}\right\rfloor$$ should somehow state this, that it doesn't work for n=0?--Thomasda (talk) 15:06, 28 October 2010 (UTC)


 * Yeah, of course, I added it to the article. Paul Breeuwsma (talk) 15:25, 5 December 2010 (UTC)

START Zlajos 17 jun 2007

1.PART
Extension: If all character once : example: ABCDE......
 * A008290 Triangle T(n,k) of rencontres numbers (number of *permutations of n elements with k fixed points).[]


 * The proof is an application of the inclusion-exclusion principle. I'm a bit surprised that this page doesn't say that. Michael Hardy 16:44, 19 June 2007 (UTC)


 * The details are on the page for Random Permutation Statistics], Maybe we should link there? -Zahlentheorie 09:45, 20 June 2007 (UTC)

1.table
COMMENT: Analogous to A008290. - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Jun 10 2005
 * If all character twice: example: AABBCC....
 * A059056 Penrice Christmas gift numbers, Card-matching numbers (Dinner-Diner matching numbers). []

1, 0, 0, 1, 1, 0, 4, 0, 1, 10, 24, 27, 16, 12, 0, 1, 297, 672, 736, 480, 246, 64, 24, 0, 1, 13756, 30480, 32365, 21760, 10300, 3568, 970, 160, 40, 0, 1, 925705, 2016480, 2116836, 1418720, 677655, 243360, 67920, 14688, 2655, 320, 60, 0, 1

2.table
If original or classic table: (1.table)

column > free or 0 : then:
 * "0" (table sign: "0")then 1 derangements,
 * "A" (table sign: 1)then 0 derangements,
 * "AB" (table sign: 11)then 1 derangements,
 * "ABC" (table sign: 111)then 2 derangements,
 * "ABCD" (table sign: 1111)then 9 derangements, etc.
 * 1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961...
 * 00166 Subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.00166 	 	 Subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.
 * analogous (2.table)
 * "0"      (table sign: "0")then 1 derangements,
 * AA       (table sign: 2)then 0 derangements,
 * AABB     (table sign: 22)then 1 derangements,
 * AABBCC   (table sign: 222)then 10 derangements,
 * AABBCCDD (table sign: 2222)then 297 derangements, etc.

FORMULA: MAPLE p := (x, k)->k!^2*sum(x^j/((k-j)!^2*j!), j=0..k); R := (x, n, k)->p(x, k)^n; f := (t, n, k)->sum(coeff(R(x, n, k), x, j)*(t-1)^j*(n*k-j)!, j=0..n*k);seq(f(0, n, 2)/2!^n, n=0..18); (AUTHOR Barbara Haas Margolius (margolius(AT)math.csuohio.edu) )
 * column > free or 0 :
 * 1, 0, 1, 10, 297, 13756, 925705, 85394646,...
 * A059072 Penrice Christmas gift numbers; card-matching numbers; dinner-diner matching numbers.[]


 * COMMENT Number of fixed-point-free permutations of n distinct letters (ABCD...), each of which appears twice. If there is only one letter of each type we get A000166. - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Oct 15 2006


 * Question:
 * 2.table
 * column: 2,3,4,5,...
 * where is it :formula or generating function(?)
 * where is it :bibliography?

3.table
If original or classic table: (1.table)

then: FORMULA: MAPLE p := (x, k)->k!^2*sum(x^j/((k-j)!^2*j!), j=0..k); R := (x, n, k)->p(x, k)^n; f := (t, n, k)->sum(coeff(R(x, n, k), x, j)*(t-1)^j*(n*k-j)!, j=0..n*k); seq(f(0, n, 3)/3!^n, n=0..18); (AUTHOR Barbara Haas Margolius (margolius(AT)math.csuohio.edu) []
 * "0" (table sign: "0")then 1 derangements,
 * "A" (table sign: 1)then 0 derangements,
 * "AB" (table sign: 11)then 1 derangements,
 * "ABC" (table sign: 111)then 2 derangements,
 * "ABCD" (table sign: 1111)then 9 derangements, etc.
 * column > free or 0 :
 * 1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961...
 * 00166 Subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.00166 	 	 Subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.
 * analogous (3.table)
 * "0"      (table sign: "0")then 1 derangements,
 * AAA       (table sign: 3)then 0 derangements,
 * AAABBB     (table sign: 33)then 1 derangements,
 * AAABBBCCC   (table sign: 333)then 56 derangements,
 * AAABBBCCCDDD (table sign: 3333)then 13833 derangements, etc.
 * column > free or 0 :
 * 1, 0, 1, 56, 13833, 6699824, 5691917785, 7785547001784,
 * A059073 Card-matching numbers (Dinner-Diner matching numbers).


 * Number of fixed-point-free permutations of n distinct letters (ABCD...), each of which appears thrice. If there is only one letter of each type we get A000166. - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Oct 15 2006


 * 2.column (free or "0" -fixed point

" "    :1   111     :2

222    :10

333    :56

444    :346

555    :2252

etc... A000172 Franel number a(n) = Sum C(n,k)^3, k=0..n. []


 * 3.column ( "1" -fixed point)

111    :3

222    :24

333    :216

444    :1824

555    :15150

etc... A000279 Card matching. [] COMMENT

Number of permutations of 3 distinct letters (ABC) each with n copies such that one (1) fixed points. E.g. if AAAAABBBBBCCCCC n=3*5 letters permutations then one fixed points n5=15150 - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Feb 02 2006


 * 4.column ( "2" fixed point)

111    :0

222    :27

333    :378

444    :4536

555    :48600

etc... A000535 Card matching. []


 * 5.column ( "3" fixed point)

111    :1

222    :16

333    :435

444    :7136

555    :99350

etc... A000489 Card matching. []


 * 3.table
 * column: 2,3,4,5,...
 * where is it :formula or generating function(?)
 * where is it :bibliography?

continued:

Zlajos 19. jun. 2007. Zlajos 21. jun. 2007. Extension: If all character twice : example: AABBCC, which has 2 A, 2 B's, and 2 C's, is
 * charcters:quadruple, example:AAAA, AAAABBBB, AAAABBBBCCCC, AAAABBBBCCCCDDDD, etc...
 * table 1.column :4, 44, 444, 4444, 44444, etc...
 * charcters:quintuple, example:AAAAA, AAAAABBBBB, AAAAABBBBBCCCCC, etc...
 * table 1.column :5, 55, 555, 5555, 55555, etc...
 * a great number of connexion of interesting !!
 * copy:[]
 * $${6 \choose 2, 2, 2} = \frac{6!}{2!\, 2!\, 2!} = 90$$

Compare the all distinct anagram for AABBCC to CCBBAA (90) one after the other :template (or schema)

AAAAAA or 6 0 0 equal, (identical): BBBBBB and CCCCCC

AAAAAB or 5 1 0 equal, (identical): BBBBBC and CCCCCA etc.

AAAABB or 4 2 0 equal, (identical): AAAACC and BBBBAA etc.

AAAABC or 4 1 1 equal, (identical): CCCCAB and BBBBAC etc.

AAABBB or 3 3 0 equal, (identical): AAACCC and BBBCCC etc.

AABBCC or 2 2 2

AAABBC or 3 2 1 equal, (identical): BBBCCA and CCCAAB etc.

4.table
Extension: If all character thrice : example: AAABBBCCC, which has 3 A, 3 B's, and 3 C's, is
 * $${9 \choose 3, 3, 3} = \frac{9!}{3!\, 3!\, 3!} =1680 $$

Compare the all distinct anagram for AAABBBCCC to CCCBBBAAA (1680) one after the other :template (or schema)

AAAAAAAAA or 9 0 0 equal, (identical): BBBBBBBBB and CCCCCCCCC

AAAAAAAAB or 8 1 0 equal, (identical): BBBBBBBBC and CCCCCCCCA etc.

AAAAAAABB or 7 2 0 equal, (identical): AAAAAAACC and BBBBBBBAA etc.

AAAAAAABC or 7 1 1 equal, (identical): CCCCCCCAB and BBBBBBBAC etc.

AAAAAABBB or 6 3 0 equal, (identical): AAAAAACCC and BBBBBBCCC etc.

AAAAAABBC or 6 2 1 equal, (identical): AAAAAACCB and BBBBBBCCA etc. .................... AAABBBCCC or 3 3 3 etc...

5.table
...4. table, 5.table sum: 90, 1680, etc.:A006480 De Bruijn's s(3,n): (3n)!/(n!)^3. []

continued! Zlajos 28. jun. 2007.

Compare the all distinct anagram for AAAAAABBBBBBB to BBBBBBAAAAAA (924) one after the other :template (or schema)

one after the other :template (or schema)

AAAAAAAAAAAA or 12 0

AAAAAAAAAAAB or 11 1

AAAAAAAAAABB or 10 2

....................

....................

BBBBBBBBBBAA or 2 10

....................

BBBBBBBBBBBB or 0 12

analogous or similar: A129352 []

MAPLE:with(combinat):T:=(n,i)->binomial(i,n)*binomial(12-i,6-n):  for n from 0 to 6 do seq(T(n, i), i=0+n..12-6+n) od; #Warning, new definition for Chi

924, 462, 210, 84, 28, 7, 1

462, 504, 378, 224, 105, 36, 7

210, 378, 420, 350, 225, 105, 28

84, 224, 350, 400, 350, 224, 84

28, 105, 225, 350, 420, 378, 210

7, 36, 105, 224, 378, 504, 462

1, 7, 28, 84, 210, 462, 924

If this is table rotated right by Pi/4. then equal 6.table

8.table
PASCAL TRIANGLE item, (portion)

9.table
continued! Zlajos 04. jul. 2007.

2. PART
Maple list:

for n from 0 to 0 do seq(binomial(i,n)*binomial(2-i,0-n), i=0+n..2-0+n ); od;#

for n from 0 to 1 do seq(binomial(i,n)*binomial(2-i,1-n), i=0+n..1-0+n ); od;#

for n from 0 to 2 do seq(binomial(i,n)*binomial(4-i,2-n), i=0+n..4-2+n ); od;#

for n from 0 to 3 do seq(binomial(i,n)*binomial(6-i,3-n), i=0+n..6-3+n ); od;

for n from 0 to 4 do seq(binomial(i,n)*binomial(8-i,4-n), i=0+n..8-4+n );  od;

for n from 0 to 5 do seq(binomial(i,n)*binomial(10-i,5-n), i=0+n..10-5+n );od

for n from 0 to 6 do seq(binomial(i,n)*binomial(12-i,6-n), i=0+n..12-6+n ); od;#

for n from 0 to 7 do seq(binomial(i,n)*binomial(14-i,7-n), i=0+n..14-7+n ); od;#

for n from 0 to 8 do seq(binomial(i,n)*binomial(16-i,8-n), i=0+n..16-8+n ); od;#

for n from 0 to 9 do seq(binomial(i,n)*binomial(18-i,9-n), i=0+n..18-9+n ); od;#

for n from 0 to 10 do seq(binomial(i,n)*binomial(20-i,10-n), i=0+n..20-10+n ); od;#

To simplify table (simple table): for 1 to 8

 * 0.

1, 1, 1


 * 1.

2, 1

1, 2


 * 2.

6, 3, 1

3, 4, 3

1, 3, 6


 * 3.

20, 10, 4, 1

10, 12, 9, 4

4, 9, 12, 10

1, 4, 10, 20


 * 4.

70, 35, 15, 5, 1

35, 40, 30, 16, 5

15, 30, 36, 30, 15

5, 16, 30, 40, 35

1, 5, 15, 35, 70


 * 5.

252, 126, 56, 21, 6, 1

126, 140, 105, 60, 25, 6

56, 105, 120, 100, 60, 21

21, 60, 100, 120, 105, 56

6, 25, 60, 105, 140, 126

1, 6, 21, 56, 126, 252


 * 6.

924, 462, 210, 84, 28, 7, 1

462, 504, 378, 224, 105, 36, 7

210, 378, 420, 350, 225, 105, 28

84, 224, 350, 400, 350, 224, 84

28, 105, 225, 350, 420, 378, 210

7, 36, 105, 224, 378, 504, 462

1, 7, 28, 84, 210, 462, 924


 * 7.

3432, 1716, 792, 330, 120, 36, 8, 1

1716, 1848, 1386, 840, 420, 168, 49, 8

792, 1386, 1512, 1260, 840, 441, 168, 36

330, 840, 1260, 1400, 1225, 840, 420, 120

120, 420, 840, 1225, 1400, 1260, 840, 330

36, 168, 441, 840, 1260, 1512, 1386, 792

8, 49, 168, 420, 840, 1386, 1848, 1716

1, 8, 36, 120, 330, 792, 1716, 3432


 * 8.

12870, 6435, 3003, 1287, 495, 165, 45, 9, 1

6435, 6864, 5148, 3168, 1650, 720, 252, 64, 9

3003, 5148, 5544, 4620, 3150, 1764, 784, 252, 45

1287, 3168, 4620, 5040, 4410, 3136, 1764, 720, 165

495, 1650, 3150, 4410, 4900, 4410, 3150, 1650, 495

165, 720, 1764, 3136, 4410, 5040, 4620, 3168, 1287

45, 252, 784, 1764, 3150, 4620, 5544, 5148, 3003

9, 64, 252, 720, 1650, 3168, 5148, 6864, 6435

1, 9, 45, 165, 495, 1287, 3003, 6435, 12870

etc...

3. PART
all 1.rows 1. numbers (and mirror)

1, 2, 6, 20, 70, 252, 924, 3432, 12870, etc...

Central binomial coefficients: C(2n,n) = (2n)!/(n!)^2.

A000984[]

all 1.rows 2. numbers (and mirror)

1, 3, 10, 35, 126, 462, 1716, 6435, 24310, 92378, 352716, etc...

C(2n+1, n+1)

A001700 []

all 1.rows 3. numbers (and mirror)

1, 4, 15, 56, 210, 792, 3003, 11440, 43758, 167960, etc...


 * Binomial coefficients C(2n,n-1).

A001791 []

all 1.rows 4. numbers (and mirror)

1, 5, 21, 84, 330, 1287, 5005, 19448, 75582, etc...


 * Binomial coefficient binomial(2n+1,n-1).

A002054 []

all 1.rows 5. numbers (and mirror)

1, 7, 36, 165, 715, 3003, 12376, 50388, 203490, 817190, etc...


 * Binomial coefficients C(2n+1,n-2).

A003516 []

all 1.rows 6. numbers (and mirror)

1, 7, 36, 165, 715, 3003, 12376, 50388, 203490, etc...


 * Binomial coefficients C(2n+1,n-2).

A003516[]

all 1.rows 7. numbers (and mirror)

1, 8, 45, 220, 1001, 4368, 18564, 77520, 319770, etc...


 * Binomial coefficients C(2n,n-3).

A002696 []

all 2.rows 1. numbers (and mirror)equal all 1.rows 2. numbers

all 2.rows 2. numbers (and mirror)

2, 4, 12, 40, 140, 504, 1848, 6864, 25740, 97240, etc...

Twice central binomial coefficients

A028329[]

all 2.rows 3. numbers (and mirror)

3, 9, 30, 105, 378, 1386, 5148, 19305, 72930, 277134, 1058148,etc...

3*C(2*n-1,n).

A003409 []

all 3.rows 3. numbers (and mirror)

6, 12, 36, 120, 420, 1512, 5544 etc...

A067804 formatted as a square array:3.rows []

all 4.rows 4. numbers (and mirror)

20, 40, 120, 400, 1400, 5040, etc...

A067804 formatted as a square array:4.rows []

all 5.rows 5. numbers (and mirror)

70, 140, 420, 1400, 4900,etc...

A067804 formatted as a square array:5.rows []

etc...

etc...

A067804 formatted as a square array:

1 	2 	6 	20 	70 	252 	924 	3432 	12870

2 	4 	12 	40 	140 	504 	1848 	6864

6 	12 	36 	120 	420 	1512 	5544

20 	40 	120 	400 	1400 	5040 		70 	140 	420 	1400 	4900 		252 	504 	1512 	5040 		924 	1848 	5544 			3432 	6864 	12870

...................................................

all diagonal left to right and bottom to top

Square the entries of Pascal's triangle.

A008459 []

all 2.table "center" 1, 4, 36, 400, 4900, 63504, 853776, etc...


 * Binomial(2n,n)^2.

A002894 []

Everything to correlate everything....

I am search: bibliography (internet), proof and etc...

continued! Zlajos 05. jul. 2007.

Not speak English
Sorry, not speak english. All corrections thanks! Zerinvary Lajos, Hungary Zlajos OEIS>>zerinvarylajos or zerinvary >>e-mail — Preceding unsigned comment added by 78.92.185.226 (talk) 06:48, 16 April 2009 (UTC)

Number parallelogram based on Pascal's triangle (and special mirror of central and multiply of diagonal)

 * OEIS


 * 1) A113899 >>
 * 2) A129352 >>
 * 3) A129536 >>
 * 4) Demo>>...mirror of central and multiply of diagonal... (Pascal háromszög tükrözése és szorzás. Minta.)

—Preceding unsigned comment added by Zlajos (talk • contribs) 07:03, 16 April 2009 (UTC)

Applications
Would it be possible to add a section on why this is useful, what are the applications of this math? - Thanks. — Preceding unsigned comment added by 62.60.15.67 (talk) 08:53, 28 August 2012 (UTC)

Dual Dearrangement
Suppose we have a list A of 2n distinct elements {a1i, a2i; i=1, 2, ..., n}. A dual dearrangement is a permutation of A in which no element a1i or a2i is at any positions 2i and 2i-1, and no two elements a1i and a2i occupy the positions 2j and 2j-1, for any j, in any order.

The method used to derive derangement problem doesn't seem to work for the dual derangement. Any thought?

Mileszhou (talk) 08:12, 20 March 2014 (UTC) Miles Zhou

Derangement product proof
Does anyone have a proof that the product of all deranged permutations equals the identity?

Darcourse (talk) 15:26, 3 March 2019 (UTC)
 * Doesn't that follow immediately by symmetry? —David Eppstein (talk) 17:05, 3 March 2019 (UTC)

I think if you assume the product of all permutations is I, and the conjecture is true for all derangements of permutations < k, then by induction on the fixed point permutations of k (all equal I over a particular set of fixed points) then as all perms=fixed point perms + derangements, derangements = I.
 * I added an answer on my talk. My suggestion that it follows from symmetry assumes that you have a symmetric definition for "the product". In what order are you multiplying them? Also, it's not even true for $$n=2$$. —David Eppstein (talk) 21:03, 3 March 2019 (UTC)
 * No matter how you define the product, you will not get the identity when there is an odd number of odd derangements. This appears to happen whenever n = 2 (mod 4); see A000387 and note the pattern of odd numbers in it. —David Eppstein (talk) 21:26, 3 March 2019 (UTC)