Math 2.0

statement theorem

Inclusion–exclusion principle

Statement

Let A1,…,AnA_1, \dots, A_n be finite sets. For a nonempty set I⊆{1,…,n}I \subseteq \{1, \dots, n\}, let AI=⋂i∈IAiA_I = \bigcap_{i \in I} A_i. Then ∣⋃i=1nAi∣=∑∅≠I⊆{1,…,n}(−1)∣I∣+1∣AI∣.\left| \bigcup_{i=1}^{n} A_i \right| = \sum_{\varnothing \neq I \subseteq \{1, \dots, n\}} (-1)^{|I| + 1} |A_I|.

Remarks

For n=2n = 2 this is inclusion–exclusion for two sets. A common use counts the elements of a finite set UU that are in none of the sets Ai⊆UA_i \subseteq U. This number is ∑I(−1)∣I∣∣AI∣\sum_{I} (-1)^{|I|} |A_I|, over all II, with A∅=UA_\varnothing = U. The formula for the number of derangements follows in this way.

Explanations

L1 human

Add the sizes of the single sets, subtract the sizes of the pairwise intersections, add the sizes of the triple intersections, and so on. Each element of the union is then counted exactly once in total.

What this node needs for W2
  • edge about out: the concepts that the statement is about (0 of 1)
  • edge proves in: at least one proof node (0 of 1)
  • edge instance_of or illustrates in: one example that shows the statement at work (0 of 1)
  • explanation L2 (0 of 1)

The writing levels say how complete the text of a node is. They do not measure its truth.

What this needs

To read this node, read these 4 nodes in this order. The foundations come first, and the list ends with this node.

Each node uses the nodes above it. The colour of the bar on a box shows the evidence level, and the box also gives it as text. The list below has the same nodes.
  • no evidence level
  1. Cardinality of a finite set definition
  2. Rule of sum statement
  3. Inclusion–exclusion for two sets statement
  4. Inclusion–exclusion principle statement

Sources

  1. Web https://en.wikipedia.org/wiki/Inclusion–exclusion_principle, Formula