L08 - Counting: Inclusion-Exclusion, Pascal`s Triangle

L08 - Counting: Inclusion-Exclusion, Pascal’s
Triangle
CSci/Math 2112
25 May 2015
1 / 11
Photo Shoot
Example 1
Remember the photographer that is taking pictures for a toy
company of their wooden number (0-9). They gave her 10 pieces
of each digit. The second picture they wanted is one with 3
number, at least one of which should be a 7.
2 / 11
Inclusion-Exclusion
Principle of Inclusion-Exclusion
|A ∪ B| = |A| + |B| − |A ∩ B|
|A ∪ B ∪ C | = |A| + |B| + |C | − |A ∩ B| − |A ∩ C | − |B ∩ C |
+ |A ∩ B ∩ C |
n
[
A
i =
i=1
\ |I |+1 (−1)
Aj j∈I
I ⊆{1,...,n}
X
3 / 11
Disjoint
Disjoint
Two sets A and B are called disjoint if |A ∩ B| = 0 (i.e. A ∩ B = ∅).
Disjoint Union
If two sets A and B are disjoint, then there union is called a
disjoint union. In that case:
|A ∪ B| = |A| + |B|.
4 / 11
Morning Routine
Example 2
A study of 115 breakfast eaters shows that 85 also eat lunch, 58
use dental floss regularly, and 27 subscribe to a morning
newspaper. Among those who also eat lunch, 52 floss regularly and
15 get the morning paper, and 10 lunch eaters both floww and get
the paper. Four flossers neither eat lunch nor get the paper.
(a) How many of those in the study neither eat lunch, nor floss
regularly, nor get the morning paper?
(b) How many of those who use dental floss regularly also get the
morning paper?
(c) How many of those that get the morning paper neither use
dental floss nor eat lunch?
5 / 11
More on Binomial Coefficients
Symmetry
n
n
=
k
n−k
k = 0, 1, n − 1, n
n
n
=1=
,
0
n
n
n
=n=
1
n−1
6 / 11
Pascal’s Triangle
n+1
k
=
n
n
+
k −1
k
0
0
1
0
2
3
0
4
0
0
4
1
3
1
2
1
4
2
..
.
1
1
3
2
2
2
4
3
3
3
4
4
7 / 11
Pascal’s Triangle
1
1
1
1
1
1
3
4
5
1
2
1
3
6
10
1
4
10
1
5
1
..
.
8 / 11
The Binomial Theorem
(x + y )n =
n X
n n−k k
x
y
k
k=1
Why does it work?
(x + y )1 = x + y
(x + y )2 = x 2 + 2xy + y 2
(x + y )3 = x 3 + 3x 2 y + 3xy 2 + y 3
..
.
(x + y )6 =?
9 / 11
Examples
Example 3
Sum the entries of a fixed row in Pascal’s Triangle. What do you
get?
Example 4
The first 5 rows of Pascal’s Triangle are the digits of the powers of
11 (110 = 1, 111 = 11, 112 = 121, 113 = 1331, 114 = 14641).
Why is that true? Why does that not work for the fifth power or
higher? Can you find a way to make it work?
10 / 11
Sirpinski’s Triangle
Example 5
Colour all odd numbers in Pascal’s Triangle. Find a pattern?
This fractal is called Sirpinski’s Triangle.
11 / 11