Practice Exercise
Set, Relations and Functions
A. Sets
1. For each of the following sets, determine whether 2 is an element of that set.
a) {x ∈ R | x is an integer greater than 1} b) {x ∈ R | x is the square of an integer}
c) {2,{2}} d) {{2},{{2}}} e) {{2},{2,{2}}} f ) {{{2}}}
Answer: a) Yes b) No c) Yes d) No e) No f) No
2. Determine whether each of these statements is true or false. a) 0 ∈ ∅ b) ∅ ∈ {0} c) {0} ⊂ ∅
d) ∅ ⊂ {0} e) {0} ∈ {0} f ) {0} ⊂ {0} g) {∅} ⊆ {∅}
Answer: a) False b) False c) False d) True e) False f) False g) True
3. Determine whether each of these statements is true or false.
a) x ∈ {x} b) {x} ⊆ {x} c) {x} ∈ {x} d) {x} ∈ {{x}} e) ∅ ⊆ {x} f ) ∅ ∈ {x}
Answer: a) True b) True c) False d) True e) True f) False
4. Prove that (a) ∅ ⊆ 𝐴 for all set A (b) 𝐴 ⊆ 𝐴 for all A.
Answer: (a) ∀x(x ∈ ∅ → x ∈ A) is true → ∅ ⊆ 𝐴
(b) ∀x(x ∈ 𝐴 → x ∈ A) is true → 𝐴 ⊆ 𝐴
5. Prove that P(A) ⊆ P(B) if and only if A ⊆ B.
Solution: “if” part: Given A ⊆ B, we want to show that that P(A) ⊆ P(B),
Let C ∈P(A) → C⊆A
→ C⊆B since A ⊆ B
→C ∈P(B)
Thus, ∀C(C ∈ P(A) → C ∈ P(B)) is true
→ P(A) ⊆ P(B)
“Only if” : Given that P(A) ⊆ P(B), we want to show that A ⊆ B.
Suppose a ∈ A → {a} ⊆ A → {a} ∈ P(A)
→ {a} ⊆ P(B), Since P(A) ⊆ P(B)
→ {a} ⊆ B
→a∈B
Thus, ∀a(a ∈ A → a ∈ B) is true
→A⊆B
6. Let A and B be subsets of a universal set U. Show that
A ⊆ B if and only if 𝐵̅ ⊆ 𝐴̅
Solution: A ⊆ B ≡ ∀x(x ∈ A →x ∈ B) ≡ ∀x(x ∉B → x ∉ A) ≡ ∀x(x ∈ 𝐵̅ → x ∈ 𝐴̅) ≡𝐵̅ ⊆ 𝐴̅
7. Prove the second distributive law A∩(B ∪C) = (A ∩B)∪(A ∩ C) for all sets A, B, and C.
Solution: Method I: Each set is a subset of the other
Suppose that x ∈ A ∩ (B ∪C).
→(x ∈ A) ∧ (x ∈ B ∪ C) Definition of intersection
→(x ∈ A) ∧ ((x ∈ B) ∨ (x ∈ C)) Definition of union
→ ((x ∈ A) ∧ (x ∈ B)) ∨ ((x ∈ A) ∧ (x ∈ C)) Distributive law of propositions
→ (x ∈ A ∩ B )∨ (x ∈ A ∩ C) Definition of Intersection
→ x ∈ (A ∩ B) ∪ (A ∩ C) Definition of union
→A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C) (A)
Now suppose that x ∈ (A ∩ B) ∪ (A ∩ C).
→ (x ∈ A ∩ B )∨ (x ∈ A ∩ C) Definition of union
→ ((x ∈ A) ∧ (x ∈ B)) ∨ ((x ∈ A) ∧ (x ∈ C)). Definition of Intersection
→(x ∈ A) ∧ ((x ∈ B) ∨ (x ∈ C)) Distributive law of propositions
→(x ∈ A) ∧ (x ∈ B∪ C) Definition of union
→x ∈ A ∩ (B ∪ C). Definition of Intersection
→ (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C). (B)
From (A) and (B), A∩(B ∪C) = (A ∩B)∪(A ∩ C)
Method II: Set Builder form:
A∩(B∪C) ={x: (x ∈ A) ∧(x ∈B∪C)} Definition of intersection
={x: (x ∈A) ∧((x ∈ B)∨(x ∈ C))} Definition of union
={x: ((x ∈ A) ∧(x ∈ B))∨((x ∈A)∧(x ∈C))} By distributive law of logic
={x: (x ∈A ∩B )∨(x ∈A∩C)} Definition of intersection
={x: x ∈(A∩B)∪(A∩C)} Definition of union
=(A ∩B)∪(A∩C)
8. Let A, B, and C be sets. Show that ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐴 ∪ (𝐵 ∩ 𝐶) = (𝐶̅ ∪ 𝐵
̅ ) ∩𝐴̅ .
Solution: We have
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐴 ∪ (𝐵 ∩ 𝐶) = 𝐴̅ ∩(𝐵 ̅̅̅̅̅̅̅̅̅̅̅
∩ 𝐶) De Morgan law
= 𝐴̅ ∩(𝐵̅ ∪ 𝐶̅ ) De Morgan law
= (𝐵̅ ∪ 𝐶̅ ) ∩ 𝐴̅ Commutative law for intersections
= (𝐶̅ ∪ 𝐵̅ ) ∩ 𝐴̅ Commutative law for unions.
B. Relations
1. For each of these relations on the set {1, 2, 3, 4}, decide whether it is reflexive, irreflexive, symmetric,
asymmetric, antisymmetric, and transitive.
𝑎) {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)} 𝑏) {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}
𝑐) {(2, 4), (4, 2)} 𝑑) {(1, 2), (2, 3), (3, 4)}
𝑒) {(1, 1), (2, 2), (3, 3), (4, 4)} 𝑓 ) {(1, 3), (1, 4), (2, 3), (2, 4), (3, 1), (3, 4)}
Solution: a) Transitive b) Reflexive, symmetric, transitive
c) Irreflexive, Symmetric d) Antisymmetric, Asymmetric
e) Reflexive, Symmetric, Antisymmetric, Transitive f) Irreflexive
2. Determine whether the relation R on the set of all integers is reflexive, symmetric, antisymmetric,
and/or transitive, where (x, y) ∈R if and only if
a) x≠y. b) x y ≥ 1. c) x = y + 1 or x = y − 1. d) x ≡ y (mod 7).
e) x is a multiple of y. f ) x and y are both negative or both nonnegative. g) x = y2.
h) x ≥ y2.
Solution: a) Symmetric b) Symmetric, transitive c) Symmetric d) Reflexive, symmetric, transitive e)
Reflexive, transitive f) Reflexive, symmetric, transitive g) Antisymmetric h) Antisymmetric, transitive
3. Consider the following relations on {1, 2, 3, 4}:
𝑅1 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (4, 1), (4, 4)}, 𝑅2 = {(1, 1), (1, 2), (2, 1)},
𝑅3 = {(1, 1), (1, 2), (1, 4), (2, 1), (2, 2), (3, 3), (4, 1), (4, 4)},
𝑅4 = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)},
𝑅5 = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)},
𝑅6 = {(3, 4)}.
Which of these relations are reflexive, symmetric, antisymmetric or transitive?
Solution: The relations 𝑅3 and 𝑅5 are reflexive because they both contain all pairs of the form(a, a),
namely, (1, 1), (2, 2), (3, 3), and (4, 4). The other relations are not reflexive because they do not
contain all of these ordered pairs. In particular, 𝑅1 , 𝑅2, 𝑅4 , and 𝑅6 are not reflexive because (3, 3) is
not in any of these relations.
4. Let A be the set {1, 2, 3, 4}. Which ordered pairs are in the relation R= {(a, b) | a divides b}?
Solution: Here R {(a, b) :a|b}= {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}.
5. Consider these relations on the set of integers:
𝑅1 = {(𝑎, 𝑏) | 𝑎 ≤ 𝑏}, 𝑅2 = {(𝑎, 𝑏) | 𝑎 > 𝑏}, 𝑅3 = {(𝑎, 𝑏) | 𝑎 = 𝑏 𝑜𝑟 𝑎 = −𝑏},
𝑅4 = {(𝑎, 𝑏) | 𝑎 = 𝑏}, 𝑅5 = {(𝑎, 𝑏) | 𝑎 = 𝑏 + 1}, 𝑅6 = {(𝑎, 𝑏) | 𝑎 + 𝑏 ≤ 3}.
Which of these relations contain each of the pairs (1, 1), (1, 2), (2, 1), (1,−1), and (2, 2)?
Solution: The pair (1, 1) is in 𝑅1 , 𝑅3, 𝑅4, and 𝑅6; (1, 2) is in 𝑅1 and 𝑅6; (2, 1) is in 𝑅2, 𝑅5, and 𝑅6; (1,−1)
is in 𝑅2, 𝑅3, and 𝑅6; and finally, (2, 2) is in 𝑅1 , 𝑅3, and 𝑅4.
6. Find reflexive, symmetric, and transitive closures of 𝑅 = {(1,2), (2,3), (3,1)} 𝑜𝑛 𝐴 = {1,2,3}.
Answer: (i) Reflexive closure of 𝑅: 𝑅𝑟𝑒𝑓 = {(1,1), (1,2), (2,2), (2,3), (3,1), (3,3)}
(ii) Symmetric closure of 𝑅: 𝑅𝑠𝑦𝑚 = {(1,2), (2,1), (2,3), (3,2), (3,1), (1,3)}
(iii) Transitive closure of 𝑅: 𝑅𝑡𝑟𝑎𝑛𝑠 = {(1,2), (2,3), (3,1), (1,3), (2,1), (3,2), (1,1), (2,2), (3,3)}
C. Functions
1. (i) If = {(4, 𝑎), (𝑣, 𝑏), (𝑤, 𝑐)} , find the domain and range.
(ii) If f ∶ Z → Z such that 𝑓(𝑥) = 3𝑥 ∀ x ϵ Z , find the range.
(iii) Find the domain and range of {(1, 𝑎), (2, 𝑎), (3, 𝑏), (4, 𝑐)}.
(iv) Find the domain for which the functions 𝑓(𝑥) = 2𝑥 2 − 1 and 𝑔(𝑥) = 1 − 3𝑥 are equal. Also find a
domain for which the function are not – equal.
2. Write the following relations in sets of ordered pair and find which of them are functions.
𝒂. 𝑓1 = {(𝑥, 𝑦) ∶ 𝑦 = 3𝑥, 𝑥 ∈ {1,2,3} , 𝑦 ∈ {3,6,9,12}
𝒃. 𝑓2 = {(𝑥, 𝑦) ∶ 𝑦 > 𝑥 + 1 , 𝑥 = 1,2 and 𝑦 = 2,4,6}
𝒄. 𝑓3 = { (𝑥, 𝑦) ∶ 𝑥 + 𝑦 = 3 𝑥, 𝑦 ∈ {0,1,2,3}}
𝒅. 𝑓4 = {(𝑥, 𝑦) ∶ 𝑦 = 3 , 𝑥 ∈ 𝑁}
3. Let 𝐴 = {−2, −1, 0, 1, 2} and 𝑓 ∶ A → Z such that 𝑓(𝑥) = 𝑥 2 − 2𝑥 − 3 find the (i) image set of A under f
(ii) pre image of 0, −3 and 5.
4. If the function 𝑓 ∶ 𝑅 → 𝑅is defined by 𝑓(𝑥) = 𝑥 2 + 7𝑥 + 4. Find 𝑓 −1 (5) and 𝑓 −1 (7).
5. Find 𝑓𝑜𝑔 and 𝑔𝑜𝑓 if 𝑓(𝑥) = 2𝑥 + 3, 𝑔(𝑥) = 𝑥 2 + 5.
1
6. Verify associativity for f, g and h (functions from R to R) such that 𝑓(𝑥) = 2𝑥 , 𝑔(𝑥) = 2−𝑥 , ℎ(𝑥) = 𝑥 2.
7. Prove that 𝑓: 𝐶 → 𝑅 such that 𝑓(𝑧) = |𝑧|, 𝑧 ∈ 𝐶 is neither one–one nor onto.
8. Prove that 𝑥 → 𝑥³ − 𝑥 defines a mapping of 𝑅 onto 𝑅. Is itone one?
9. Let 𝑓: 𝑅 → 𝑅 such that 𝑓(𝑥) = 𝑠𝑖𝑛 𝑥,𝑔: 𝑅 → 𝑅 such that 𝑔(𝑥) = 𝑥², Find 𝑔 ∘ 𝑓 𝑎𝑛𝑑 𝑓 ∘ 𝑔.
10. If 𝑓: 𝑅 → 𝑅 such that 𝑓(𝑥) = 𝑥 2 + 3𝑥 + 1, 𝑔(𝑥) = 2𝑥 − 3, find the formulae defining 𝑓 ∘
𝑔 and 𝑔 ∘ 𝑔.
11. Define a relation 𝑅 on 𝐼 such that 𝑎 𝑅 𝑏 ⇔ 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 5). Then show that 𝑅 is an equivalence
relation on 𝐼. Find equivalence classes and a partition of 𝐼.
12. 𝑁 × 𝑁 = {(𝑎, 𝑏) ∶ 𝑎, 𝑏 ∈ 𝑁}. Define 𝑅 on 𝑁 × 𝑁, (𝑎, 𝑏)𝑅(𝑐, 𝑑) ⇔ 𝑎𝑑 = 𝑏𝑐. Prove that 𝑅 is an
equivalence relation on 𝑁 × 𝑁.
13. If 𝑓: 𝑄 → 𝑄 such that 𝑓(𝑥) = 2𝑥 and 𝑔: 𝑄 → 𝑄 such that 𝑔(𝑥) = 𝑥 + 2 be two mappings,
(𝑔 ∘ 𝑓 )−1 = 𝑓 −1 ∘ 𝑔⁻¹
1
14. Show that the mapping 𝑓: 𝑅 → 𝑅, 𝑓(𝑥) = 𝑥 , 𝑥 ≠ 0 and 𝑥 ∈ 𝑅 is one–one onto, where 𝑅 is the set of
non-zero real numbers.
15. Let 𝑋 = {1,2,3}, 𝑌 = {𝑝, 𝑞} 𝑎𝑛𝑑 𝑍 = {𝑎, 𝑏}. 𝐿𝑒𝑡 𝑓: 𝑋 → 𝑌 𝑏𝑒 𝑓 = {(1, 𝑝), (2, 𝑝), (3, 𝑞)}
𝑔: 𝑌 → 𝑍 𝑏𝑒 𝑔 = {(𝑝, 𝑏), (𝑞, 𝑏)}. 𝐹𝑖𝑛𝑑 𝑔 ∘ 𝑓.
16. Let 𝑋 = {𝑎, 𝑏, 𝑐}. Define 𝑓: 𝑋 → 𝑋 such that𝑓 = {(𝑎, 𝑏), (𝑏, 𝑎), (𝑐, 𝑐)}
Find: (𝑖) 𝑓⁻¹ (𝑖𝑖) 𝑓² (𝑖𝑖𝑖) 𝑓³ (𝑖𝑣) 𝑓⁴ .
1
17. Let 𝑓(𝑥) = 𝑥 + 2, 𝑔(𝑥) = 2 , ℎ(𝑥) = 3 are functions from 𝑅 to 𝑅
𝑥 +1
(𝑅 is the set of real numbers). Compute: (𝑖)𝑓 −1 𝑔(𝑥)(𝑖𝑖)ℎ{𝑓 (𝑔𝑓 −1 𝑦)}(ℎ, 𝑓(𝑥)) ,
1 1
18. If 𝑓(𝑥) = 𝑥 3 + 3 find the value of 𝑓(𝑥) + 𝑓 ( ).
𝑥 𝑥
1 1
19. If𝑓(𝑥) = 𝑥 2 − 𝑥 2, show that 𝑓(𝑥) + 𝑓 (𝑥) = 0.
20. Let 𝑓(𝑥) = 𝑥² − 1 𝑎𝑛𝑑 𝑔(𝑥) = (3𝑥 + 1) , Describe:(i) 𝑔 ∘ 𝑓 = (3𝑥² − 2)
(ii) 𝑓 ∘ 𝑔 = (9𝑥² − 6𝑥) (iii) 𝑓 ∘ 𝑓 = (𝑥⁴ − 2𝑥²) (iv) 𝑔 ∘ 𝑔 = (9𝑥 + 4)