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!
{{Short description|Counting technique in combinatorics}} [[File:Венов дијаграм.svg|thumbnail|[[Venn diagram]] showing the union of sets ''A'' and ''B'' as everything not in white]] In [[combinatorics]], the '''inclusion–exclusion principle''' is a counting technique which generalizes the familiar method of obtaining the number of elements in the [[union (set theory)|union]] of two [[finite set]]s; symbolically expressed as :<math> |A \cup B| = |A| + |B| - |A \cap B| </math> where ''A'' and ''B'' are two finite sets and |''S''| indicates the [[cardinality]] of a set ''S'' (which may be considered as the number of elements of the set, if the set is [[Finite set|finite]]). The formula expresses the fact that the sum of the sizes of the two sets may be too large since some elements may be counted twice. The double-counted elements are those in the [[intersection (set theory)|intersection]] of the two sets and the count is corrected by subtracting the size of the intersection. The inclusion-exclusion principle, being a generalization of the two-set case, is perhaps more clearly seen in the case of three sets, which for the sets ''A'', ''B'' and ''C'' is given by :<math>|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|</math> This formula can be verified by counting how many times each region in the [[Venn diagram]] figure is included in the right-hand side of the formula. In this case, when removing the contributions of over-counted elements, the number of elements in the mutual intersection of the three sets has been subtracted too often, so must be added back in to get the correct total. [[Image:Inclusion-exclusion.svg|thumb|Inclusion–exclusion illustrated by a Venn diagram for three sets]] Generalizing the results of these examples gives the principle of inclusion–exclusion. To find the cardinality of the union of {{mvar|n}} sets: # Include the cardinalities of the sets. # Exclude the cardinalities of the pairwise intersections. # Include the cardinalities of the triple-wise intersections. # Exclude the cardinalities of the quadruple-wise intersections. # Include the cardinalities of the quintuple-wise intersections. # Continue, until the cardinality of the {{mvar|n}}-tuple-wise intersection is included (if {{mvar|n}} is odd) or excluded ({{mvar|n}} even). The name comes from the idea that the principle is based on over-generous ''inclusion'', followed by compensating ''exclusion''. This concept is attributed to [[Abraham de Moivre]] (1718),<ref name="Roberts 2009 loc=pg. 405">{{harvnb|Roberts|Tesman|2009|loc=pg. 405}}</ref> although it first appears in a paper of [[Daniel da Silva (mathematician)|Daniel da Silva]] (1854)<ref>{{harvnb|Mazur|2010|loc=pg. 94}}</ref> and later in a paper by [[J. J. Sylvester]] (1883).<ref>{{harvnb|van Lint|Wilson|1992|loc=pg. 77}}</ref> Sometimes the principle is referred to as the formula of Da Silva or Sylvester, due to these publications. The principle can be viewed as an example of the [[Sieve theory|sieve method]] extensively used in [[number theory]] and is sometimes referred to as the ''sieve formula''.<ref>{{harvnb|van Lint|Wilson|1992|loc = pg. 77}}</ref> As finite probabilities are computed as counts relative to the cardinality of the [[probability space]], the formulas for the principle of inclusion–exclusion remain valid when the cardinalities of the sets are replaced by finite probabilities. More generally, both versions of the principle can be put under the common umbrella of [[measure theory]]. In a very abstract setting, the principle of inclusion–exclusion can be expressed as the calculation of the inverse of a certain matrix.<ref>{{harvnb|Stanley|1986|loc=pg. 64}}</ref> This inverse has a special structure, making the principle an extremely valuable technique in combinatorics and related areas of mathematics. As [[Gian-Carlo Rota]] put it:<ref>{{citation| last=Rota| first=Gian-Carlo|title=On the foundations of combinatorial theory I. Theory of Möbius functions|journal=Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete|volume=2|year=1964| issue=4|pages=340–368|doi=10.1007/BF00531932| s2cid=121334025|doi-access=free}}</ref> <blockquote>"One of the most useful principles of enumeration in discrete probability and combinatorial theory is the celebrated principle of inclusion–exclusion. When skillfully applied, this principle has yielded the solution to many a combinatorial problem."</blockquote>
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)