Professional Documents
Culture Documents
Q4 - Practice Questions (Sets & Functions)
Q4 - Practice Questions (Sets & Functions)
Mark the following Statements as True or False (Use T for True, F for False):
viii. {2} ∈ {𝑥𝑥 ∈ 𝑹𝑹 | 𝑥𝑥 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑜𝑜𝑜𝑜 𝑎𝑎𝑎𝑎 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖} _____
i. ∅ _______
ii. {∅} _______
iii. �∅, {∅}� _______
iv. �∅, {∅}, �∅, {∅}�� _______
v. 𝒫𝒫({𝑎𝑎, 𝑏𝑏, {𝑎𝑎, 𝑏𝑏}}) _______
vi. 𝒫𝒫({∅, 𝑎𝑎, {𝑎𝑎}, {{𝑎𝑎}}}) _______
vii. 𝒫𝒫(𝒫𝒫(∅)) _______
viii. {𝑎𝑎, 𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑒𝑒} × {𝑦𝑦, 𝑧𝑧} _______
ix. {𝑦𝑦, 𝑧𝑧} × {𝑎𝑎, 𝑐𝑐, 𝑑𝑑} _______
x. {𝑎𝑎, 𝑏𝑏, 𝑐𝑐} × {𝑥𝑥, 𝑦𝑦} × {0, 1} _______
Find the truth set of each of these predicates where the domain is the set of integers.
i. 𝑃𝑃(𝑥𝑥): 𝑥𝑥 2 < 3 { }
ii. 𝑄𝑄(𝑥𝑥): 𝑥𝑥 2 > 𝑥𝑥 { }
iii. 𝑅𝑅(𝑥𝑥): 2𝑥𝑥 + 1 = 0 { }
iv. 𝑃𝑃(𝑥𝑥): 𝑥𝑥 3 ≥ 1 { }
2
Page
v. 𝑄𝑄(𝑥𝑥): 𝑥𝑥 2 = 2 { }
Draw the Venn diagrams for each of these combinations of the sets A, B, and C.
A ∩ (B ∪ C)
(A − B) ∪ (A − C) ∪ (B − C)
3
Page
A ∩ B) ∪ (A ∩ C)
What can you say about the sets A and B if we know that
a) A ∪ B = A?
b) A ∩ B = A?
c) A − B = A?
d) A ∩ B = B ∩ A?
e) A − B = B − A?
Draw a Venn diagram for the symmetric difference of the sets A and B.
4
Page
𝑛𝑛
� 𝐴𝐴𝑖𝑖 = { }
𝑖𝑖=1
𝑛𝑛
� 𝐴𝐴𝑖𝑖 = { }
𝑖𝑖=1
Suppose that the universal set is U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Find the set specified by each
of these bit strings.
a) 11 1100 1111 { }
b) 01 0111 1000 { }
c) 10 0000 0001 { }
Given two sets A and B (as bit strings), what is the bit string corresponding to
𝐴𝐴 − 𝐵𝐵
𝐵𝐵 − 𝐴𝐴
5
Page
𝐴𝐴 ∩ 𝐵𝐵
𝐴𝐴 ∪ 𝐵𝐵
Given two sets A and B (as bit strings), how can we determine that
𝐴𝐴 ⊆ 𝐵𝐵?
𝐴𝐴 ⊂ 𝐵𝐵?
Given the sets B={1,2,3,4,5}, C={3,5,7}, D={2,4,6,8}, and E={a,b}; what would be the set A if:
i) Given three sets A, B, and C; if A∩C = B∩C, then must it hold that A=B? Justify your answer
with adequate reasoning and example.
Hint: The answer is NO; just give a counterexample (i.e. Three sets A, B and C, such that A∩C =
6
Page
ii) What can you say (about A=B), if A∪C = B∪C? Give reasoning (and example).
Hint: The answer is NO; just give a counterexample (i.e. Three sets A, B and C, such that A∪C =
B∪C but A≠B).
iii) What can you say (about A=B), if A∪C = B∪C and A∩C = B∩C? Give reasoning (and example).
Hint: The answer is YES. Justify your answer by establishing that A⊆B and B⊆A.
Let A be the set of students having home in Lahore, let B be the set of students of FAST
(Lahore), and let C be the set of students living in different hostels of Lahore; then what do the
following sets represent?
i) ((A' ∪ C) - B)'
• Here A' means, complement of the set A; similarly, ((A' ∪ C) - B)' means, complement of
the set ((A' ∪ C) - B).
Note: The universal set consists of all students of BSSE studying in different institutions of
Lahore.
7
Page
𝑓𝑓(𝑥𝑥) = 1/𝑥𝑥?
𝑓𝑓 (𝑥𝑥) = √𝑥𝑥?
𝑓𝑓(𝑛𝑛) = ±𝑛𝑛.
𝑓𝑓(𝑛𝑛) = √𝑛𝑛2 + 1.
Determine whether f is a function from the set of all bit strings to the set of integers if
f (S) is the smallest integer 𝑖𝑖 such that the 𝑖𝑖th bit of S is 1 and f (S) = 0 when S is the empty
string, the string with no bits.
f (m, n) = 2m − n.
f (m, n) = m2 − n2.
f (m, n) = m2 + n2.
f (m, n) = m + n + 1.
f (m, n) = m2 − 4.
8
Page
Topic: Functions
Discrete Structures Practice Questions
f (n) = n − 1
f (n) = n2 + 1
f (n) = n3
f (n) = ⌈𝑛𝑛/2⌉
f (x) = 1. { }
f (x) = 2x + 1. { }
f (x) = ⌈𝑥𝑥/5⌉. { }
f (x)=⌊(𝑥𝑥 2 + 1)/3⌋. { }
Topic: Functions
Discrete Structures Practice Questions
Show that if x is a real number and m is an integer, then ⌈𝒙𝒙 + 𝒎𝒎⌉ = ⌈𝒙𝒙⌉ + 𝒎𝒎
𝟏𝟏
Prove that if x is a real number, then ⌊𝟐𝟐𝟐𝟐⌋ = ⌊𝒙𝒙⌋ + �𝒙𝒙 + 𝟐𝟐�.
Prove or disprove that ⌈𝒙𝒙 + 𝒚𝒚⌉ = ⌈𝒙𝒙⌉ + ⌈𝒚𝒚⌉ for all real numbers x and y.
10
Page
Topic: Functions