# Permutations With No Identity Elements [duplicate]

Possible Duplicate:
Number of permutations where n ≠ position n

There are $N!$ permutations of the set $\{1,2,\ldots,N\}$

How many of them have zero identity elements?

An identity element is an element that has a value equal to its position. ie When for some $i$, the ith element equals $i$.

For example, $(2,3,4,1)$ has no identity elements, whereas $(2,1,3,4)$ has two identity elements.

-
These are called derangements. This math.SE question, and this one, cover the answer to your question. –  Zev Chonoles Jun 16 '12 at 16:08
Elements mapped to themselves by a permutation are called fixed points, not "identity elements". –  hardmath Jun 16 '12 at 17:02