ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Inclusion-exclusion principle - Wikipedia, the free encyclopedia

Inclusion-exclusion principle

From Wikipedia, the free encyclopedia

In combinatorial mathematics, the inclusion-exclusion principle (also known as the sieve principle) states that if A1, ..., An are finite sets, then


\begin{align}
\biggl|\bigcup_{i=1}^n A_i\biggr| & {} =\sum_{i=1}^n\left|A_i\right|
-\sum_{i,j\,:\,1 \le i < j \le n}\left|A_i\cap A_j\right| \\
& {}\qquad +\sum_{i,j,k\,:\,1 \le i < j < k \le n}\left|A_i\cap A_j\cap A_k\right|-\ \cdots\ + \left(-1\right)^{n-1} \left|A_1\cap\cdots\cap A_n\right|
\end{align}

where |A| denotes the cardinality of the set A. For example, taking n = 2, we get a special case of double counting; in words: we can count the size of the union of sets A and B by adding |A| and |B| and then subtracting the size of their intersection. The name comes from the idea that the principle is based on over-generous inclusion, followed by compensating exclusion. When n > 2 the exclusion of the pairwise intersections is (possibly) too severe, and the correct formula is as shown with alternating signs.

This formula is attributed to Abraham de Moivre; it is sometimes also named for Joseph Sylvester or Henri Poincaré.[citation needed]

Inclusion-exclusion illustrated for three sets
Inclusion-exclusion illustrated for three sets
Counts of each region with progressively more terms used for n = 4
Counts of each region with progressively more terms used for n = 4

For the case of three sets A, B, C the inclusion-exclusion principle is illustrated in the graphic on the right.

Contents

[edit] Inclusion-exclusion principle in probability

In probability, for events A1, ..., An in a probability space \scriptstyle(\Omega,\mathcal{F},\mathbb{P}), the inclusion-exclusion principle becomes for n = 2

\mathbb{P}(A_1\cup A_2)=\mathbb{P}(A_1)+\mathbb{P}(A_2)-\mathbb{P}(A_1\cap A_2),

for n = 3

\begin{align}\mathbb{P}(A_1\cup A_2\cup A_3)&=\mathbb{P}(A_1)+\mathbb{P}(A_2)+\mathbb{P}(A_3)\\
&\qquad-\mathbb{P}(A_1\cap A_2)-\mathbb{P}(A_1\cap A_3)-\mathbb{P}(A_2\cap A_3)+\mathbb{P}(A_1\cap A_2\cap A_3)
\end{align}

and in general

\begin{align}
\mathbb{P}\biggl(\bigcup_{i=1}^n A_i\biggr) & {} =\sum_{i=1}^n \mathbb{P}(A_i)
-\sum_{i,j\,:\,i<j}\mathbb{P}(A_i\cap A_j) \\
&\qquad+\sum_{i,j,k\,:\,i<j<k}\mathbb{P}(A_i\cap A_j\cap A_k)-\ \cdots\ +(-1)^{n-1}\, \mathbb{P}\biggl(\bigcap_{i=1}^n A_i\biggr),
\end{align}

which can be written in closed form as

\mathbb{P}\biggl(\bigcup_{i=1}^n A_i\biggr)  =\sum_{k=1}^n (-1)^{k-1}\sum_{\scriptstyle I\subset\{1,\ldots,n\}\atop\scriptstyle|I|=k} \mathbb{P}\biggl(\bigcap_{i\in I} A_i\biggr),

where the last sum runs over all subsets I of the indices 1, ..., n which contain exactly k elements.

According to the Bonferroni inequalities, the sum of the first terms in the formula is alternately an upper bound and a lower bound for the LHS. This can be used in cases where the full formula is too cumbersome.

For a general measure space (S,Σ,μ) and measurable subsets A1, ..., An of finite measure, the above identities also hold when the probability measure \mathbb{P} is replaced by the measure μ.

[edit] Proof

To prove the inclusion-exclusion principle in general, we first have to verify the identity

1_{\cup_{i=1}^n A_i}  =\sum_{k=1}^n (-1)^{k-1}\sum_{\scriptstyle I\subset\{1,\ldots,n\}\atop\scriptstyle|I|=k} 1_{\cap_{i\in I} A_i}\qquad(*)

for indicator functions. There are at least two ways to do this:

First possibility: If suffices to do this for every x in the union of A1, ..., An. Suppose x belongs to exactly m sets with 1 ≤ m ≤ n, for simplicity of notation say A1, ..., Am. Then the identity at x reduces to

1 =\sum_{k=1}^m (-1)^{k-1}\sum_{\scriptstyle I\subset\{1,\ldots,m\}\atop\scriptstyle|I|=k} 1.

The number of subsets of cardinality k of an m-element set is the combinatorical interpretation of the binomial coefficient \textstyle\binom mk . Since \textstyle1=\binom m0 , we have

\binom m0 =\sum_{k=1}^m (-1)^{k-1}\binom mk.

Putting all terms to the left-hand side of the equation, we obtain the expansion for (1 – 1)m given by the binomial theorem, hence we see that (*) is true for x.

Second possibility: Let A denote the union of the sets A1, ..., An. Then

0=(1_A-1_{A_1})(1_A-1_{A_2})\cdots(1_A-1_{A_n})\,,

because both sides are zero for an x not in A, and if x belongs to one of the sets, say Am, then the corresponding mth factor is zero. By expanding the product on the right-hand side, equation (*) follows.

Use of (*): To prove the inclusion-exclusion principle for the cardinality of sets, sum the equation (*) over all x in the union of A1, ..., An. To derive the version used in probability, take the expectation in (*). In general, integrate the equation (*) with respect to μ. Always use linearity.

[edit] Other forms

The principle is sometimes stated in the form that says that if

g(A)=\sum_{S\,:\,S\subseteq A}f(S)

then

f(A)=\sum_{S\,:\,S\subseteq A}(-1)^{\left|A\right|-\left|S\right|}g(S)

In that form it is seen to be the Möbius inversion formula for the incidence algebra of the partially ordered set of all subsets of A.

[edit] Applications

In many cases where the principle could give an exact formula (in particular, counting prime numbers using the sieve of Eratosthenes), the formula arising doesn't offer useful content because the number of terms in it is excessive. If each term individually can be estimated accurately, the accumulation of errors may imply that the inclusion-exclusion formula isn't directly applicable. In number theory, this difficulty was addressed by Viggo Brun. After a slow start, his ideas were taken up by others, and a large variety of sieve methods developed. These for example may try to find upper bounds for the "sieved" sets, rather than an exact formula.

[edit] Derangements

A well-known application of the inclusion-exclusion principle is to the combinatorial problem of counting all derangements 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 (number of elements in) A is n, then the number of derangements is [n! / e] where [x] denotes the nearest integer to x; a detailed proof is available here.

This 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] Counting intersections

The principle of inclusion-exclusion, combined with de Morgan's theorem, can be used to count the intersection of sets as well. Let \scriptstyle\overline{A}_k represent the complement of Ak with respect to some universal set A such that \scriptstyle A_k\, \subseteq\, A for each k. Then we have

 \bigcap_{i=1}^n A_i = \overline{\bigcup_{i=1}^n \overline{A}_i}

thereby turning the problem of finding an intersection into the problem of finding a union.

[edit] See also

[edit] References

This article incorporates material from principle of inclusion-exclusion on PlanetMath, which is licensed under the GFDL.


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -