Practice Quiz 3

advertisement
Practice Quiz 3
Recursive Definitions
Relations
Basic Counting
Pigeonhole Principle
Permutations & Combinations
Discrete Probability
Problems
•
The Fibonacci numbers f0, f1, f2, … are
defined as f0 = 0, f1 = 1, and fn = fn-1 + fn-2
, for n > 1. Prove that the function f(n) =
f1 + f3 + … + f2n-1 is equal to f2n whenever
n is a positive integer.
Problems
• Consider the relation R = {x, y | x + y > 10} on the set
of positive integers.
– Is R reflexive? Justify your answer.
– Is R symmetric? Justify your answer.
– Is R antisymmetric? Justify your answer.
– Is R transitive? Justify your answer.
• Suppose that R1 and R2 are symmetric relations on a
set A. Prove or disprove that R1 – R2 (set difference)
is also symmetric.
Problems
• Given the relation on the set {0, 1, 2, 3} defined
by the ordered pairs (0,0), (1,1), (1,3), (2,2), (2,3),
(3,1), (3,3)
– What is the 0-1 matrix representation of this
relation?
– Is the relation reflexive, symmetric and/or
transitive?
– Is the relation an equivalence relation?
Problems
• How many students must be in a class to
guarantee that at least 5 were born on the same
day of the week?
• What is the coefficient of x7y12 in the expansion of
(x+y)19?
• What is the probability that a randomly selected
day of the year (365 days) is in May?
• Suppose that you pick two cards one at a time at
random from an ordianary deck of 52 cards. Find
p(both cards are diamonds).
The Fibonacci numbers, f0, f1, f2, … are defined as f0 = 0,
f1 = 1, and fn = fn-1 + fn-2 , for n > 1. Prove that the
function (n) = f1 + f3 + … + f2n-1 is equal to f2n whenever n
is a positive integer.
Basis Step
If n = 1, then (1) = f2*1 - 1 = f1 = 1 = f2.
The Fibonacci numbers, f0, f1, f2, … are defined as f0 = 0,
f1 = 1, and fn = fn-1 + fn-2 , for n > 1. Prove that the
function (n) = f1 + f3 + … + f2n-1 is equal to f2n whenever n
is a positive integer.
Inductive Step
Assume (k) = f1 + f3 + … + f2k-1 = f2k for k  n .
We must show that this implies that (n+1) = f2(n+1)
(n+1) = f1 + f3 + … + f2n-1 + f2n+1
(n+1) = (n) + f2n+1
(n+1) = f2n + f2n+1 = f2n+2 = f2(n+1)
Given the relation on the set {0,1,2,3} defined
by the ordered pairs: (0,0), (0,2), (1,1), (1,2),
(2,0), (2,2), (3,3).
• What is the 0-1 matrix?
• Is the relation:
– Reflexive?
• Yes
– Symmetric?
• No
– Transitive?
• No
– An equivalence relation?
• No
1
0

1

0
0 1 0
1 1 0
0 1 0

0 0 1
Suppose that R1 and R2 are symmetric relations on a
set A. Prove or disprove that R1 – R2 (set difference)
is also symmetric.
Proof:
Assume that R1 and R2 are symmetric relations on a set A.
We must show that if (a,b)  R1 - R2, then (b,a)  R1 – R2.
If (a,b)  R1 – R2, then (a,b)  R1 and (a,b)  R2.
Since R1 is symmetric, (b,a)  R1.
Since R2 is symmetric, it follows that (b,a)  R2, for if (b,a)
was in R2, then (a,b) would have been in R2.
Hence, since (b,a) is in R1 and not in R2, (b,a)  R1 – R2.
Therefore R1 – R2 is symmetric.
Consider the relation R = {x, y | x + y > 10} on the set of
positive integers.
Is R reflexive? Justify your answer.
Is R symmetric? Justify your answer.
Is R antisymmetric? Justify your answer.
Is R transitive? Justify your answer.
• R is not reflexive, since 1 + 1 < 10, so (1,1) is not in R.
• R is symmetric, since x + y > 10 means that y + x > 10,
so (x, y)  R implies (y, x)  R.
• R is not antisymmetric, since (2, 10) and (10, 2)  R,
but 2  10.
• R is not transitive since (2, 9)  R and (9, 3)  R, but
(2, 3)  R because 2 + 3 < 10.
How many students must be in a class to
guarantee that at least 5 were born on the
same day of the week?
By the pigeonhole principle: 7*4+1 = 29
What is the coefficient of x12y7 in the
expansion of (x+y)19?
Solution: Use the binomial expansion formula
n
( x  y ) n   C (n, j ) x n  j y j
j 0
 n  n  n  n 1  n  n  2 2
 n  n 1  n  n
 xy    y
   x    x y    x y  ...  
 0
 1
 2
 n  1
 n
So the 8th coefficient is C(19,7) = 19!/7!12! = 50,388.
Download