# Lecture on Counting II

```Lecture on Counting II
Warm-up
Exercise 1. 1. Flip a fair coin n times. How many possibly
outcomes? (2n )
n
2. How many outcomes contain exactly 2 Head?
( 2 ) 3. How many contain at most 2 Heads? ( n0 + n1 + n2 )
4 How many contain an even number of Heads?
Write Pascal triangle, and do the expansion of (x + y)n for n = 0, 1, 2, 3,
Terms appearing
in (x + y)n : xi y n−i .
n
Coefficient: i
Why? – can be proved by induction. But look at the expansion of (x1 + y1 )(x2 + y2 )(x3 + y3 ).
Theorem 1 (Binomial theorem).
(x + y)n =
n X
n n−j j
x y .
j
j=0
Application I: find coefficients
Exercise 2. Expansion of (x + y)4 = x4 + 4x3 y + 6x2 y 2 + 4xy 3 + y 4 .
Exercise 3. coefficient of x12 y 13 in (x + y)25 .
How about in (x + y)27 ? in (2x + 3y)25 ? in (3x − y/2)25 ?
Exercise 4. coefficient of x12 in (x + 1)25 , (x − 4)50 , etc.
Question: what is the total sum of all coefficients in (2x + 3y)100 ?
Application II: evaluation
Exercise 5.
n X
n
k
k=0
Exercise 6.
n
X
= 2n .
n
(−1)
= (1 + (−1))n = 0.
k
k=0
n
n
n
n
= 2n−1 .
Hence 0 + 2 + &middot; &middot; &middot; + 2i + &middot; &middot; &middot; = 2n−1 , and sumk 2k−1
k
Exercise 7.
n
X
2k
k=0
Challenging:
n
X
n
= 3n .
k
n
3n + 1
2
=
k
2
k
k=0,even
Application III: identities
Exercise 8.
Exercise 9.
n+1
k+1
n
n
=
+
.
k
k+1
X n
X n
k
k
x = x(
xk )0 = x((x + 1)n )0 = nx(x + 1)n−1 .
k
k
k
k
1
```