Professional Documents
Culture Documents
Fall 2019
Discussion 4 Notes
1 Definitions
• Function f : A → B:
• Onto:
• One-to-One:
• Bijection:
• f −1 :
• f ◦ g:
• Recurrence relation
• Countably Infinite
• Uncountably Infinite
• Schroder-Bernstein Theorem
Solution:
1
• Bijection: A function f is called a bijection (or one-to-one correspondence) if it
is both one-to-one and onto.
• f −1 : Let f be a bijection from the set A to the set B. The inverse function of f is
the function that assigns to an element b belonging to B the unique element a in A
such that f (a) = b. The inverse function of f is denoted by f −1 . Hence, f −1 (b) = a
when f (a) = b.
• f ◦ g: Let g be a function from the set A to the set B and let f be a function from
the set B to the set C. The composition of the functions f and g, denoted for all
a ∈ A by f ◦ g, is defined by (f ◦ g)(a) = f (g(a)).
• Schroder-Bernstein Theorem: For two sets A and B, if |A| ≤ |B| and |B| ≤ |A|,
then |A| = |B|. Note that finding an one-to-one function from A to B shows that
|A| ≥ |B|, and finding a one-to-one function from A to B shows that |A| ≤ |B|.
1. Exercise 2.3.21
Give an explicit formula for a function from the set of integers to the set of positive integers
f : Z → Z+ that is:
2
Solution:
a) The function f (x) with f (x) = 3x + 1 when x ≥ 0 and f (x) = −3x + 2 when x < 0.
b) f (x) = |x| + 1
d) f (x) = x2 + 1
2. Exercise 2.3.37
If f and f ◦ g are onto, does it follow that g is onto? Justify your answer.
Solution: No. For example, suppose that A = {a}, B = {b, c}, and C = {d}. Let
g(a) = b, f (b) = d, and f (c) = d. Then f and f ◦ g are onto, but g is not.
3. Exercise 2.3.72
Suppose that f is an invertible function from Y to Z and g is an invertible function from X
to Y . Show that the inverse of the composition f ◦ g is given by (f ◦ g)−1 = g −1 ◦ f −1 .
Solution:
We want to show that (g −1 ◦f −1 )◦(f ◦g)(x) = x for all x ∈ X and (f ◦g)◦(g −1 ◦f −1 )(z) = z
for all z ∈ Z. We can apply the definition of the composition function to prove this. So,
for every x ∈ X, we have:
3
We have shown that (f ◦ g)−1 = g −1 ◦ f −1 .
Solution:
a) To disprove this, we can provide a counterexample. There is no value that will make
1
x2 +1
= 2.
1
=2
x2 + 1
2x2 + 2 = 1
It is easy to see that 2x2 + 2 will never be less than 2, and therefore never equal to 1.
There are many other possible counterexamples as well; any value that is not in the
range of (0, 1] will not get mapped to.
b) To disprove this, we can give a counterexample to show two values from the domain
that are not equal and map to the same value in the codomain. There are many
possible counterexamples here, but we will show that inputs of x = 1 and x = − 53
map to the same value.
x=1
f (1) = |3(1) + 1|
f (1) = |4|
f (1) = 4
x = −5/3
f (−5/3) = |3(−5/3) + 1|
f (−5/3) = | − 5 + 1|
f (−5/3) = | − 4|
f (−5/3) = 4
We can see that both x=1 and x=-5/3 map to the same value, 4. Therefore, f(x) is
not one-to-one.
4
5. Exercise 2.4.13 (b,d,f )
Is the sequence {an } a solution of the recurrence relation an = 8an−1 − 16an−2 if
b) an = 1
d) an = 4n
f) an = 2 · 4n + 3n4n
Solution:
f)
a) an = 3an−1 , a0 = 2
c) an = an−1 + n, a0 = 1
Solution:
a) an = 3an−1 = 32 an−2 = · · · = 3n a0 = 2 · 3n
5
7. Exercise 2.4.35
Show that nj=1 (aj − aj−1 ) = an − a0 , where a0 , a1 , ..., an is a sequence of real numbers.
P
This type of sum is called telescoping.
Solution:
n
X
(aj − aj−1 ) = a1 − a0 + a2 − a1 + ... + an − an−1
j=1
= an − a0
8. Not in Book
Find the value of each of these sums.
6
((−1)k − 1k )
P
a)
k=0
6
(1281/k − 1281/(k+1) )
P
b)
k=1
n
(3k 2 + k + 2)
P
c)
k=1
Solution:
a) When k is even, (−1)k − 1k = 0, and when k is odd, (−1)k − 1k = −2. Thus the sum
can be rewritten as 0 + (−2) + 0 + (−2) + 0 + (−2) + 0 = −6.
b) This is a telescoping series. Every term other than the first and last term cancel out.
(1281/1 − 1281/2 ) + (1281/2 − 1281/3 ) + ... + (1281/5 − 1281/6 ) + (1281/6 − 1281/7 ) =
128 − 1281/7 . We know that 27 = 128, so 1281/7 = 2. The sum will evaluate to
128 − 1281/7 = 128 − 2 = 126.
6
c)
n
X n
X n
X n
X
(3k 2 + k + 2) = 3 k2 + k+ 2
k=1 k=1 k=1 k=1
n(n + 1)(2n + 1) n(n + 1)
=3 + + 2n
6 2
n(n + 1)(2n + 1) n(n + 1)
= + + 2n
2 2
2n3 + 3n2 + n n2 + n
= + + 2n
2 2
= n3 + 2n2 + 3n
Solution:
For each part, we will denote the set in question as S.
a) This is countably infinite. The function f : Z+ → S, f (x) = x + 10 is a one-to-one
correspondence between S and Z+ .
c) This is finite. It is the integers in the range
{−999, 999, −999, 998, ..., −1, 0, 1, ..., 999, 998, 999, 999}
d) This is uncountable. We proved in lecture that (0, 1) is uncountable, which is a subset
of this set.
e) This is countably infinite. The function
g : Z+ → S, g(x) =
(2, x+12
) if x is odd
(3, x2 ) if x is even
is a one-to-one correspondence between S and Z+ .
7
10. Exercise 2.5.11
Give an example of two uncountable sets A and B such that A ∩ B is
a) finite
b) countably infinite
c) uncountably infinite
Solution:
There are a lot of possible answers, but here are a few:
a) A = [0, 1) and B = (−1, 0]. A ∩ B = {0}
b) A = R+ and B = R− ∪ Z+ . A ∩ B = Z+
c) A = [0, 2] and B = [1, 3]. A ∩ B = [1, 2]