Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CS F222: Discrete Structures For Computer Science: Tutorial - 4 (Set Theory and Functions)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CS F222: Discrete Structures for Computer Science

Tutorial - 4 (Set Theory and Functions)

1. Prove or give a counter example for the following.


(a) Let A and B be two sets such that 2A ⊆ 2B . Then A ⊆ B. (2X is the power set of X.)
(b) Let A, B, and C be sets such that A ⊆ B and B ⊆ C then A ⊆ C.
(c) Let A, B, and C be sets such that A ∈ B and B ∈ C then A ∈ C.
(d) Let A, B, and C be sets such that A ⊂ B and A ⊂ C then A ⊂ B ∩ C.
Solution: (a) Recall that 2A is the set of all subsets of A, including A itself. The condition tells us
that every subset of A is also a subset of B, and in particular A itself is a subset of B. So A ⊆ B.
(b) Consider any element a ∈ A. Since A ⊆ B, every element of A is also an element of B, so a ∈ B.
By the same reasoning, a ∈ C since B ⊆ C. Thus every element of A is an element of C, so A ⊆ C.
(c) Let A = {x}, B = {x, {x}}, and C = {{x, {x}}, y}. These sets satisfy A ∈ B and B ∈ C, but
A∈/ C.
(d) Note that ⊂ denotes the proper subset. Hence the statement will not hold to true for the case
A = B ∩ C.
2. Prove the following qualities for sets
(a) A ∪ B = A ∩ B
(b) A ∩ B = A ∪ B (Home work)
Proof of (a). We show that A ∪ B ⊆ A ∩ B and A ∩ B ⊆ A ∪ B.
To show that A ∪ B ⊆ A ∩ B, let x ∈ A ∪ B. Thus, x ∈ / A ∪ B, which implies x ∈
/ A and x ∈
/ B. This
implies, x ∈ A and x ∈ B. Hence, , x ∈ A ∩ B. Hence, A ∪ B ⊆ A ∩ B.
To show that A ∩ B ⊆ A ∪ B, let x ∈ A ∩ B. Thus, x ∈
/ A and x ∈
/ B, which implies x ∈
/ A ∪ B. Hence,
x ∈ A ∪ B. Therefore, A ∩ B ⊆ A ∪ B.
Proof of (b) is similar.
3. Prove that S = (S ∩ T ) ∪ (S − T ) for all sets S and T .
Solution: We will show both of the following: S ⊆ (S ∩ T ) ∪ (S − T ) and (S ∩ T ) ∪ (S − T )S.

To prove first case, consider any element x ∈ S. Either x ∈ T or x ∈


/ T.
• If x ∈ T , then x ∈ S ∩ T , and thus also x ∈ (S ∩ T ) ∪ (S − T ).
• If x ∈
/ T , then x ∈ (S − T ), and thus again x ∈ (S ∩ T ) ∪ (S − T ).
To prove the latter part, consider any x ∈ (S ∩ T ) ∪ (S − T ). Either x ∈ S ∩ T or x ∈ S − T

• If x ∈ S ∩ T , then x ∈ S.
• If x ∈ S − T , then also x ∈ S

4. Answer the following questions on Cartesian product of sets.

(a) Let A = {a, b, c} and P(A) be the power set of A. Find the set P(A) × A.
(b) Find a set A such that A ⊆ A × A.
(c) Let A, B, C and D be sets such that A ⊆ C and B ⊆ D, show that A × B ⊆ C × D.

1
(d) Let A, B, C and D be sets such that A × B ⊆ C × D. Prove or disprove that A ⊆ C and B ⊆ D.

Solution: (a) Here, A = {a, b} and P(A) = {φ, {a}, {b}, {a, b}}.
Thus, P(A) × A = {(φ, a), (φ, b), ({a}, a), ({a}, b), ({b}, a), ({b}, b), ({a, b}, a), ({a, b}, b)}
(b) A = φ. Note that A × A = φ when A = φ.
(c) We know that A ⊆ C and B ⊆ D. To show that A × B ⊆ C × D, let (a, b) ∈ A × B where a ∈ A
and B ∈ B. Since A ⊆ C and B ⊆ D, a ∈ C and b ∈ D. Thus, (a, b) ∈ C × D. Hence, A × B ⊆ C × D.
(d) Not true. Let A = {a}, B = ∅, C = {c}, and D = {d}. In this case, A × B = φ, hence
A × B ⊆ C × D. But, A is not a subset of C.
2
5. Let A be a set with n elements. Prove that there are 2n binary relations on A by using mathemat-
ical induction. Also, compute that number of ternary relations on A and prove the correctness by
mathematical induction.
Solution:
We prove this by induction on number of elements in A i.e., n.
Base Case: If n = 0 then, number of relations is 20 = 1 (Empty set). If n = 1 then, number of binary
relations is 21 = 2 In particular, if A = {x} then, A × A = {(x, x)}).
Hypothesis: Assume that the statement is true for all sets with at most k elements where k ≥ 1.
Induction Step: Let A be the set with k + 1 elements, k ≥ 1. Let A = {x1 , x2 , ..., xk , xk+1 }. From hy-
2
pothesis, we know that for k elements, number of binary relations are 2k . For (k+1)th element, we have
the following 2k+1 binary elements: (x1 , xk+1 ), (x2 , xk+1 ), ..., (xk , xk+1 ), (xk+1 , x1 ), (xk+1 , x2 ), ..., (xk+1 , xk ), (xk+1 , xk+1
2 2 2
Therefore, number of binary relations for the set A = 2k × 22k+1 = 2k +2k+1 = 2(k+1)
3
The number of ternary relations on A are 2n .
6. Determine whether each of the following function is a bijection from R to R.

(a) f (x) = 2x + 1
(b) f (x) = −3x2 + 7
(c) f (x) = (x2 + 1)/(x2 + 2)
(d) f (x) = (x + 1)/(x + 2)

Solution:
(a) Yes. One-to-one: Let f (x1 ) = f (x2 ), which implies 2x1 + 1 = 2x2 + 1. Thus, x1 = x2 .
Onto function. Let y be a real number (in co-domain) such that f (x) = y, which gives us 2x + 1 = y.
Thus, x = (y − 1)/2 is also a real number. Thus, for any real number y in the co-domain, there exists
a pre-image (y − 1)/2 in the domain.
(b). No. The function is not one-to-one function. For x = 1 and x = −1, the function maps to the
same number 4 in the co-domain.
(c). No. The function is not one-to-one function. For x = 1 and x = −1, the function maps to the
same number 2/3 in the co-domain.
(d) No. The function is not define at x = −2.

You might also like