The sum rule states that if A and B are disjoint sets then ∣A∪B∣=$|A| + |B|$.
According to the sum rule, if A1,A2,...,An are nparwise disjoint sets then ∣A1∪A2∪...∪An∣=$|A_1| + |A_2| + ... + |A_n|$.
title: ExampleA student can choose one project from project lists of three lecturers.- John's list has 11.- Bill's has 10.- Eve's has 8.No project occurs twice. How many possible projects are there to choose from?- $A = \{ p | p \text{ is a project on John's list} \}$- $B = \{ p | p \text{ is a project on Bill's list} \}$- $C = \{ p | p \text{ is a project on Eve's list} \}$Hence $|A \cup B \cup C| = |A| + |B| + |C| = 29$.
The inclusion-exclusion principle states that ∣A∪B∣=$|A| + |B| - |A \cap B|$.
The inclusion-exclusion principle can be applied for three sets, by applying the same rule twice, ∣A∪(B∪C)∣, giving us:
?
∣A∪B∪C∣=∣A∪(B∪C)∣=∣A∣+∣B∪C∣−∣A∩(B∪C)∣=∣A∣+∣B∣+∣C∣−∣B∩C∣−∣A∩(B∪C)∣=∣A∣+∣B∣+∣C∣−∣B∩C∣−∣(A∩B)∪(A∩C)∣=∣A∣+∣B∣+∣C∣−∣B∩C∣−(∣A∩B∣+∣A∩C∣−∣(A∩B)∩(A∩C)∣)=∣A∣+∣B∣+∣C∣−∣B∩C∣−∣A∩C∣−∣A∩C∣+∣A∩B∩C∣Link to original
nk to do the kth task
?
Then, there are n1⋅n2⋅...⋅nk ways to do the whole sequence of k tasks
∣A1×A2×...×Ak∣=∣A1∣⋅∣A2∣⋅...⋅∣Ak∣
title: Example 1If each number plate contains a sequence of three letters followed by three digits (and no such sequence is prohibited), then the number of available different number plates is:$$ 26 \cdot 26 \cdot 26 \cdot 10 \cdot 10 \cdot 10 = 17, 576, 000$$
Usage with functions
If ∣A∣=n and ∣B∣=m then the number of different f:A→B functions is:
?
m⋅m⋅...⋅mn=mn
title: Example 2 (with functions)Let $A = \{ a,b,c \}, B = \{ d,e \} \rightsquigarrow n = 3, m = 2$.- There are $2$ ways to choose a value for $a$.Then there are $2$ ways to choose a value for $b$ and then $c$.Hence $2^3 = 8$.
Let S be a finite set having n elements. How many subsets does S have?
Or otherwise, what is the cardinality of P(S)?
We list the elements of S:s1,s2,...,sn.
We can choose a subset A of S by going through this list and decide for each element whether it is in A or not.
We have one ‘task’ for each element: n tasks total
Each task can be done in two ways: IN or OUT
We choose whether to leave it in or leave it out.
Among any group of 367 people, there must be at least two with the same birthdays.
If an exam is marked on a scale from 0 to 100, then from 102 students, there must be at least two with the same mark.
If A and B are finite sets with ∣A∣>∣B∣ and f:A→B is a function, then f is not one-to-one.
For every n∈N+, there is a multiple of n that is not 0, and has only 0s and 1s for its digits.
Take any n∈N+, consider n+1 many numbers.
1,11,111,...,111..1n+1
Observe that there are n possible different remainders when a natural number is divided by n, these are 0,1,...,n−1.
Because there are n+1 numbers on the above list, by the pigeonhole principle, there must be two with the same remainder when divided by n.
Then “the larger of these numbers minus the smaller one”
is divisible by n and so is a multiple of n
has only 0s and 1s for its digits
Generalised pigeonhole principle
Generalised pigeonhole principle
The pigeonhole principle states that if n objects are placed into k boxes, then there is at least one box containing at least $\lceil n/k \rceil$ objects.
How many ways can we select k persons from a group of n people if the order of selection does not matter?
As seen before, if the order of selection matters, there are (n−k)!n! ways.
But then for each set A of k people, we counted the the people in A the number of ways k persons can be ordered. (k!)
So, if the selection order does not matter, then the number of ways is:
k!(n−k)!n!=(n−k)!⋅k!n!=(nk) or nCk
This leaves us with the binomial coefficient equation.
Given we have an unlimited supply of 3 types of fruit:
A: apples
O: oranges
P: peaches
How many ways are there to select 4 pieces of fruit, if the order of selection does not matter, only the type of fruit / not the individual piece matters?
We could consider a box which can store 4 pieces of fruit, the box can have 3 compartments, each can store one of 3 types of fruit. Compartments are divided by 2 movable dividers that can be shifted depending on how many types of each fruit we want to store. For example:
2 apples, 1 orange, 1 peach: AA∣O∣P
4 oranges: ∣OOOO∣
1 apple, 3 peaches: A∣∣PPP
4 apples: AAAA∣∣
So if we have to choose k objects from a set of n objects, with repetition allowed, we need a box with k places for the chosen object and n−1 places for the dividers dividing the box into n compartments.
Given any random box: ∗∗∣∗∗∗∣∗∣∣, we have k+n−1 places.
The number of ways we can choose our k objects is the number of ways we can distribute the dividers in the box. Out of the k+n−1 places, we hace to choose n−1 for the dividers. The number of ways of doing this is: