Вы находитесь на странице: 1из 2

CS 2006: Discrete Structures Test I Part II August 2019

Series I: Solutions
1. Consider the set S of all functions from {0, 2, 4, 6, . . .} to {−1, 1}. Let f0 , f1 , f2 , . . . be distinct 3
functions in S . Define a function g ∈ S such that g 6= fi for any i (you need to prove that g 6= fi for
any i). What can you conclude from the existence of g ?
Soln: Define g(2i) = −fi (2i). Suppose g = fi for some i. Then fi (2i) = g(2i) = −fi (2i) is a
contradiction. We conclude that no countable collection of functions in S can include every member of
S . That is, S is uncountable.
2. Define a bijection from the set N + × N + to N , where N + is the set of positive integers and N = 3
{0, 1, 2, . . .}. Prove injectivity of and surjectivity of the map.
Soln: Since we know that the function 2x (2y + 1) − 1 is a bijection N × N to N , we can shift the
origin to (1, 1) and define the function 2x−1 (2(y − 1) + 1) − 1 = 2x−1 (2y − 1) − 1 to yield the
required function. The injectivity and surjectivity can be proved as was done in the class. (Here is a
simpler reasoning: f (x, y) = (x − 1, y − 1) is a bijection from N + × N + to N × N . It was proved
in the class that there is a bijection N × N to N . The composition of two bijections is the required
map.)

3. Let X, Y be non-empty sets and f : X 7→ Y be a function. Let A ⊆ X . Let Ac = {x ∈ X : x ∈ / A} 4


and [f (A)]c = {y ∈ Y : y ∈ / f (A)}. Can we say that f (Ac ) ⊇ [f (A)]c need not always hold? If
so, what is the additional condition of f needed for f (Ac ) ⊆ [f (A)]c to hold?
Soln: Let X = {a, b} and Y = {x, y}. Consider the function f (a) = f (b) = x. Let A = {a, b}.
Then Ac = ∅. Hence f (Ac ) = ∅, f (A) = {x} and [f (A)]c = {y}. Here f (Ac ) is not a superset
of [f (A)]c . However, if f is surjective, then f (Ac ) ⊇ [f (A)]c . To prove this, let z ∈ [f (A)]c . Then
z∈ / f (A). That is ∀a ∈ A, f (a) 6= z . Since f is surjective, z ∈ Img(f ) and hence ∃c ∈ X such
that f (c) = z . As c ∈ / A, c ∈ Ac . That is, z ∈ f (Ac ). Hence f (Ac ) ⊇ [f (A)]c . Note the crucial
use of the surjectivity of f in the proof.
******************************************************************************************
Series II: Solutions
******************************************************************************************
4. Consider the set S of all functions from {1, 3, 5, 7, . . .} to {2, 3}. Let g0 , g1 , g2 , . . . be distinct 3
functions in S . Define a function f ∈ S such that f 6= gi for any i (you need to prove that f 6= gi for
any i). What can you conclude from the existence of f ?
Soln: Define f (i) = 2 if g(2i + 1) = 3 and f (i) = 3 if g(2i + 1) = 2. Suppose f = gi for some i,
then we get the contradiction that f (2i + 1) 6= gi (2i + 1). We conclude that no countable collection
of function in S can include every member of S . That is, S is uncountable.

5. Define a bijection from the set N + × N to N + , where N is the set of positive integers and N = 3
{0, 1, 2, . . .}. Prove injectivity of and surjectivity of the map.
Soln: Since we know that the function 2x (2y + 1) − 1 is a bijection N × N to N , we can shift the
origin of the domain to (1, 0), and shift the image by adding 1 and define the function 2x−1 (2y + 1)
to yield the required function. The injectivity and surjectivity can be proved as was done in the class.
(Here is a simpler reasoning: f (x, y) = (x − 1, y) is a bijection from N + × N to N × N . Now,
it was already proved in the class that there is a bijection N × N to N . Finally f (x) = x + 1 is a
bijection from N to N + . The composition of three bijections is the required map.)

6. Let X, Y be non-empty sets and f : X 7→ Y be an injective function. Let A ⊆ X . Let Ac = {x ∈ 4


X:x∈ / A} and [f (A)]c = {y ∈ Y : y ∈ / f (A)}. Can we say that f (Ac ) ⊇ [f (A)]c need not hold
always? If so, Give an example where the condition fails. what is the additional condition of f needed
for f (Ac ) ⊇ [f (A)]c to hold?
Discrete Structures Mid II Part II (continued)

Soln: See solution to the same question in Series I. It is proved that f (Ac ) ⊇ [f (A)]c when f is
surjective. Let X = {a, b} and Y = {x} and f (a) = f (b) = x. Let A = {a}. Then f (A) = Y .
Thus f (Ac ) = {x} and [f (A)]c = ∅. We see that equality need not hold even when f is surjective.
It is easy to see that equality holds when f is both injective and surjective - that is, when f is bijective.

Page 2

Вам также может понравиться