Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a set $S = \{ 1,2,3,4,5,6,7 \} $

I know that the number of bijective functions $S\rightarrow S$ without any restrictions is $7!$, but how can I count the number of bijective functions $ \phi : S \rightarrow S$ such that $\phi (x) \not= x$ for all $x \in S$?

share|improve this question
3  
These are the derangements. Please see the Wikipedia article. –  André Nicolas Feb 18 at 2:18

1 Answer 1

up vote 4 down vote accepted

This is the same as the number of derrangements between sets of size 7. Also know as 7 subfactorial denoted $!7$

derrangements do not have a nice closed formula, however they do obey the recurrence relation

$!n=(n-1)(!(n-1)+!(n-2))$

the first $7$ values are $0,1,2,9,44,265,1854$. So $!7=1854$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.