A derangement is a permutation of the elements of a set, such that no element appears in its original position.
Consider a set of 6 items, for instance, $ABCDEF$. There are 265 possible derangements (this is calculated as round($n!/e$)). For instance $FABCDE$
Let's coin a new term: 'poetic derangement'. For a derangement to be poetic, exactly 1 element must move exactly 1 position, exactly 2 elements must move exactly 2 positions, and exactly 3 elements must move exactly 3 positions.
For the set $ABCDEF$, there are two possible poetic derangements:
- $DAEFBC$ (Here, $A$ has moved one position, $E$ and $F$ have moved two positions, and $B$, $C$, $D$ have moved 3 positions).
- $DEABFC$ (Here, $F$ has moved one position, $A$ and $B$ have moved two positions, and $C$, $D$, $E$ have moved 3 postitions.
The poetic derangement concept applies to sets with a triangular number of elements. In general, if the number of elements of a set which move $x$ positions is defined as $Mx$, then a derangement is poetic when $Mx$ = $x$ for all $x$. That is, for a 10 element set:
- 1 element must move exactly 1 position
- 2 elements must move exactly 2 positions
- 3 elements must move exactly 3 positions
- 4 elements must move exactly 4 positions
How many such poetic derangements are there? What is the general formula?