Академический Документы
Профессиональный Документы
Культура Документы
1
2
n +
| |
|
\ .
1
n
k
k
=
4
Identity:
Q: Count ways to create a committee of even size from n people?
1. For 2k n,
1
0
2
2
n
k
n
k
>
| |
=
|
\ .
0
...
0 2 4 2 2
k
n n n n n
k k
>
| | | | | | | | | |
+ + + + =
| | | | |
\ . \ . \ . \ . \ .
5
Identity:
Q: Count ways to create a committee of even size from n people?
2. A committee of even size can be formed as follows:
Step 1: Choose the 1
st
person in or out 2 ways
Step 2: Choose the 2
nd
person in or out 2 ways
Step n-1: Choose the (n-1)
th
person in or out 2 ways
Step n: Choose the n
th
person in or out 1 way
By multiplication rule, there are 2
n-1
ways to form this committee.
1
0
2
2
n
k
n
k
>
| |
=
|
\ .
6
: n multi-choose k
Counts the ways to choose k elements from a set of n elements
with repetition allowed
{1, 2, 3, 4, 5, 6, 7, 8} (n = 8, k = 6)
{1, 3, 3, 5, 7, 7} or {1, 1, 1, 1, 1, 1}
n
k
| |
| |
|
|
\ .
\ .
9
Identity:
Q: How many ways to create a non-decreasing sequence of length k
with numbers from {1, 2, 3, , n} and underline 1 term?
1. There are ways to create the sequence, then k ways to
choose the underlined term.
1
1
n n
k n
k k
+ | | | |
| | | |
=
| |
| |
\ . \ .
\ . \ .
n
k
| |
| |
|
|
\ .
\ .
10
Identity:
Q: How many ways to create a non-decreasing sequence of length k
with numbers from {1, 2, 3, , n} and underline 1 term?
2. Determine the value that will be underlined, let it be r.
Make a non-decreasing sequence of length k-1 from {1, 2, 3, , n+1}.
Convert this sequence:
Any rs chosen get placed to the left of our underlined r.
Any n+1s chosen get converted to rs and placed to the right of our r.
1
1
n n
k n
k k
+ | | | |
| | | |
=
| |
| |
\ . \ .
\ . \ .
Hence, there are such sequences.
1
1
n
n
k
+ | |
| |
|
|
\ .
\ .
11
Identity:
Example: n = 5, k = 9, and our underlined value is r = , then we
are choosing a length 8 sequence from {1, 2, 3, 4, 5, 6}
1
1
n n
k n
k k
+ | | | |
| | | |
=
| |
| |
\ . \ .
\ . \ .
1 1 2 3 3 5 6 6
1 1 2 3 3 5 2 2 2
2
1. Choose r
2. Create k-1 sequence
from n+1 numbers
3. Convert
8-sequence:
converts to
9-sequence:
12
Fibonacci Numbers a number sequence defined as
F
0
= 0, F
1
= 1,
and for n 2, F
n
= F
n-1
+ F
n-2
i.e. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144
5 + 8
Fibonacci Numbers
13
Fibonacci Nos: Combinatorial Interpretation
f
n
: Counts the ways to tile an n-board with squares and dominoes.
14
Example: n = 4, f
4
= 5
Fibonacci Nos: Combinatorial Interpretation
15
Fibonacci Nos: Combinatorial Interpretation
f
n
: Counts the ways to tile an n-board with squares and dominoes.
Define f
-1
= 0 and let f
0
= 1 count the empty tiling of 0-board.
Then f
n
is a Fibonacci number and for n 2,
f
n
= f
n-1
+ f
n-2
= F
n + 1
16
If the first tile is a square, there are
f
n 1
ways to complete sequence.
If the first tile is a domino, there are
f
n 2
ways to complete sequence.
Hence, f
n
= f
n
1
+ f
n 2
= F
n + 1
Fibonacci Nos: Combinatorial Interpretation
Q: How many ways to tile an n-board with squares and dominoes?
17
Identity: For n 0, f
0
+ f
1
+ f
2
+ + f
n
= f
n+2
-1
1. By definition there are f
n + 2
tilings of an (n+2)-board;
excluding the all-squares tiling leaves f
n + 2
1.
Q: How many tilings of an (n+2)-board have at least 1 domino?
18
Identity: For n 0, f
0
+ f
1
+ f
2
+ + f
n
= f
n+2
-1
2. Consider the last domino
(in spots k+1 & k+2).
f
k
ways to tile first k spots
1 way to tile remaining spots
Q: How many tilings of an (n+2)-board have at least 1 domino?
1 2 3 n n+1 n+2
1 2 3 n n+1 n+2
1 2 3 n n+1 n+2
1 2 3 n n+1 n+2
1 2 3 n n+1 n+2
...
...
...
...
...
.
.
.
.
.
.
.
.
.
f
0
f
1
f
2
f
n-1
f
n
Cells 1, 2, , k k+1 k+2
Summing over all possible
locations of k gives LHS.
19
Identity: For n 1, 3f
n
= f
n+2
+ f
n-2
Set 1: Tilings of an n-board; by definition, |Set 1| = f
n
Set 2: Tilings of an (n+2)-board or an (n-2)-board;
by definition, |Set 2| = f
n+2
+ f
n-2
Create a 1-to-3 correspondence between the set of n-tilings and the
set of (n+2)-tilings and (n-2)-tilings.
20
Identity: For n 1, 3f
n
= f
n+2
+ f
n-2
For each n-tiling, make 3 new tilings
by adding a domino
by adding two squares
a. if n-tiling ends in a square, put
a domino before the last square.
b. if n-tiling ends in a domino,
remove the domino
n-tiling
n-tiling
(n-1)-tiling
(n-2)-tiling
n-tiling
21
Identity: For n 0,
We say there is a fault at cell i, if both tilings are breakable at cell i.
( )
2
1
0
n
k n n
k
f f f
+
=
=
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
22
Identity: For n 0,
Q: How many tilings of an n-board and (n+1)-board exist?
1. By definition, f
n
f
n+1
tilings exist.
2. Place the (n+1)-board directly above the n-board.
Consider the location of the last fault.
( )
2
1
0
n
k n n
k
f f f
+
=
=
1 2 3 ... n n+1
1 2 3 ... n
23
Identity: For n 0,
How many tiling pairs have their last fault at cell k?
There are ( f
k
)
2
ways to tile the first k cells.
1 fault free way to tile the remaining cells:
( )
2
1
0
n
k n n
k
f f f
+
=
=
k
... k-1, k
Summing over all possible
locations of k gives LHS.
24
Identity: For n 0, 2
n
= f
n
+ f
n-1
+
Q: How many binary sequences of length n exist?
1. There are 2
n
binary sequences of length n.
2. For each binary sequence define a tiling as follows:
1 is equivalent to a square in the tiling.
01 is equivalent to a domino.
2
2
0
2
n
n k
k
k
f
=
-
25
Example:
The binary sequence 011101011 maps to the 9-tiling shown below.
2
2
0
2
n
n k
k
k
f
=
-
01 1 1 01 01 1
If no 00 exists, this gives a unique tiling of length
n (if the sequence ended in 1)
n-1 (if the sequence ended in 0)
Identity: For n 0, 2
n
= f
n
+ f
n-1
+
26
Identity: For n 0, 2
n
= f
n
+ f
n-1
+
What if 00 exists?
Let the first occurrence of 00 appear in cells k+1, k+2 (k n-2)
Match this sequence to the k-tiling defined by the first k terms of
the sequence. (Note: k > 0, then the kth digit must be 1)
Each k-tiling will be counted times.
2
2
0
2
n
n k
k
k
f
=
-
0 0
... ...
2 3 4 k 1 k+3 n-1 n
k+1 k+2
f
k
2
n-2-k
2
n-2-k
27
Identity: For n 0, 2
n
= f
n
+ f
n-1
+
2
2
0
2
n
n k
k
k
f
=
-