Mat344LecSlides w1 2014
Mat344LecSlides w1 2014
Mat344LecSlides w1 2014
Professor S. Tanny
MAT344
Professor S. Tanny
Note: Count the number of moves that are required in your solution.
Be sure to show why the task cannot be accomplished in fewer moves.
MAT344
B.
Professor S. Tanny
MAT344
Professor S. Tanny
C. Game of SIM: In this game there are 6 dots in the plane and 2
players, Red and Blue. Each player alternately makes a move by joining
a pair of dots by a line in his (her) colour, either Red or Blue. The
winner is the first player to form a triangle in a single colour (note:
the sides of the triangle must originate at the 6 dots, and not at the
intersections of the interior lines drawn).
Is this a finite game? What is the maximum number of moves?
Would you rather go first or second?
Is there always a winner?
Is there a winning strategy for either player? If so, for which player?
Hint: To help you get the idea, think of another game between two
players that is finite and determine the answers to the above questions
for that game.
4
MAT344
Professor S. Tanny
01
00
10
11
MAT344
Professor S. Tanny
26
26
10
10
10
Think about this variation of the above question: How many different
Ontario licence plates can be issued, if each consists of 3 letters followed
by 3 numbers, where the three letters and the three numbers can come
in any order?
MAT344
Professor S. Tanny
n
Y
card (Si).
i=1
MAT344
Professor S. Tanny
20
35
28
83
8
MAT344
Professor S. Tanny
Sum Rule: If you can do one thing in n1 ways and a second thing in
n2 ways, there are n1 + n2 ways that you can do either first thing or
second thing, but not both.
Here is a more formal mathematical approach to the sum rule:
let S be the set of solutions to some mathematical problem. Suppose
we can write S = S1 S2, where S1 S2 = . Then card (S) = card
(S1)+ card (S2).
More generally, if we have S =
n
[
i=1
n
P
i=1
card (Si).
Note: The collection {S1, S2, . . . , Sn} is called an n-partition of the set
S.
Exercise: Use mathematical induction to prove the general form of the
product rule and the sum rule.
9
MAT344
Professor S. Tanny
Example: How many 3 letter sequences (so order counts) using the
letters a, b, c, d, e, f are there of the following type:
a)
b)
c)
d)
allow repetition
no repetition
no repetition and must contain e
allow repetition and must contain e
a)
b)
c)
d)
63 (product rule)
6 5 4 (product rule)
60 = (5 4) + (5 4) + (5 4) (product and sum rules)
63 53 = 91 (What do 63 and 53 each count?)
MAT344
Professor S. Tanny
MAT344
Professor S. Tanny
Permutations
We now count the number of ways to arrange the elements of a set.
Recall that by definition a set contains distinct objects. For example,
the set S = {1, 2, 3, 4} is a set with 4 elements (cardinality 4).
Sometimes we also count arrangements of multisets. A multiset is a
collection of not necessarily distinct elements, so it may contain multiple
copies of the same element. For example, M = {13, 2, 35} denotes a
multiset M containing 3 copies of the element 1, a single element 2, and
5 copies of the element 3. An arrangement of a multiset is equivalent
to arranging a set but allowing some number of repetitions of one or
more of the elements.
Let S be a set with n elements. By the Product Rule there are n! =
n (n 1) . . . 3 2 1 ways to arrange the elements of S. Further, there
are n(n 1) (n r + 1) ways to create r-element sequences (that is,
arrangements of r of the elements of S) drawn from the n elements of
S.
12
MAT344
Professor S. Tanny
Rising Factorial:
r
nr = n(n+1) (n+r1) = (n+r1)!
=
(n+r1)
(n1)!
MAT344
Professor S. Tanny
13
23
14
24
MAT344
Professor S. Tanny
What is
3
? For n 0, what is
4
n
?
0
1
n0
n
= 0 = = 1,
0
0
1
!
n0
15
MAT344
Professor S. Tanny
3
2
5
1
= 5 ways. By the
16
MAT344
Professor S. Tanny
b)
c)
d)
Now add these up, using the sum rule, to get 13.
Which answer is correct, and why?
17
MAT344
Professor S. Tanny
n+1
n
n
=
+
k
k
k1
18
MAT344
Professor S. Tanny
Fix your eye on any specific element of [n + 1], say the element (n + 1).
For any k-subset of [n + 1], (n + 1) is either in or out of the k-subset.
But a k-subset of [n +!1] where (n + 1) is out
! is a k-subset of [n], and
n
n
we know there are
such k-subsets, so
counts all the k-subsets
k
k
of [n + 1] where (n + 1) is out.
Further, any k-subset of [n+1] where (n+1) is in must contain
! a unique
n
set of k 1 additional elements from [n]. There are
ways to
k1
!
n
choose these k 1 elements so
counts all k-subsets of [n + 1]
k1
where (n + 1) is in.
By the sum rule, the right hand side also counts all the k-subsets of
[n + 1].
19
MAT344
Professor S. Tanny
Here is an algebraic proof of the previous identity. This proof uses the
factorial definition of the binomial coefficient:
!
n
n
+
k
k1
n!
n!
+ (k1)!(nk+1)!
= k!(nk)!
h
i
n!
1+
1
nk+1
(k1)!(nk)! k
h
i
n+1
n!
(k1)!(nk)! k(nk+1)
(n+1)!
= k!(nk+1)!
n+1
k