Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Inclusion–exclusion principle
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Counting derangements=== {{main|Derangement}} A well-known application of the inclusion–exclusion principle is to the combinatorial problem of counting all [[derangement]]s of a finite set. A ''derangement'' of a set ''A'' is a [[bijection]] from ''A'' into itself that has no fixed points. Via the inclusion–exclusion principle one can show that if the cardinality of ''A'' is ''n'', then the number of derangements is [''n''! / ''e''] where [''x''] denotes the [[nearest integer function|nearest integer]] to ''x''; a detailed proof is available [[Random permutation statistics#Number of permutations that are derangements|here]] and also see [[#Examples|the examples section]] above. The first occurrence of the problem of counting the number of derangements is in an early book on games of chance: ''Essai d'analyse sur les jeux de hazard'' by P. R. de Montmort (1678 – 1719) and was known as either "Montmort's problem" or by the name he gave it, "''problème des rencontres''."<ref>{{harvnb|van Lint|Wilson|1992|loc=pp. 77-8}}</ref> The problem is also known as the ''hatcheck problem.'' The number of derangements is also known as the [[subfactorial]] of ''n'', written !''n''. It follows that if all bijections are assigned the same probability then the probability that a random bijection is a derangement quickly approaches 1/''e'' as ''n'' grows.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)