You are on page 1of 10

Discrete Structures Practice Questions

Mark the following Statements as True or False (Use T for True, F for False):

i. 2 ∈ {𝑥𝑥 ∈ 𝑹𝑹 | 𝑥𝑥 𝑖𝑖𝑖𝑖 𝑎𝑎𝑎𝑎 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 𝑡𝑡ℎ𝑎𝑎𝑎𝑎 1} _____

ii. 2 ∈ {𝑥𝑥 ∈ 𝑹𝑹 | 𝑥𝑥 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑜𝑜𝑜𝑜 𝑎𝑎𝑎𝑎 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖} _____

iii. 2 ∈ {2, {2}} _____

iv. 2 ∈ {{2}, {{2}}} _____

v. 2 ∈ {{2}, {2, {2}}} _____

vi. 2 ∈ {{{2}}} _____

vii. {2} ∈ {𝑥𝑥 ∈ 𝑹𝑹 | 𝑥𝑥 𝑖𝑖𝑖𝑖 𝑎𝑎𝑎𝑎 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 𝑡𝑡ℎ𝑎𝑎𝑎𝑎 1} _____

viii. {2} ∈ {𝑥𝑥 ∈ 𝑹𝑹 | 𝑥𝑥 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑜𝑜𝑜𝑜 𝑎𝑎𝑎𝑎 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖} _____

ix. {2} ∈ {2, {2}} _____

x. {2} ∈ {{2}, {{2}}} _____

xi. {2} ∈ {{2}, {2, {2}}} _____

xii. {2} ∈ {{{2}}} _____

xiii. {1, 3, 3, 3, 5, 5, 5, 5, 5} = {5, 3, 1} _____

xiv. �{1}� = {1, {1}} _____

xv. ∅ = {∅} _____

xvi. 𝑥𝑥 ∈ {𝑥𝑥} _____

xvii. {𝑥𝑥} ⊆ {𝑥𝑥} _____

xviii. {𝑥𝑥} ∈ {𝑥𝑥} _____

xix. {𝑥𝑥} ∈ {{𝑥𝑥}} _____

xx. ∅ ⊆ {𝑥𝑥} _____

xxi. ∅ ∈ {𝑥𝑥} _____


1
Page

Topic: Sets & Set Operations


Discrete Structures Practice Questions

Use a Venn diagram to illustrate the relationship 𝑨𝑨 ⊆ 𝑩𝑩 and 𝑩𝑩 ⊆ 𝑪𝑪.

Use a Venn diagram to illustrate the relationships 𝑨𝑨 ⊂ 𝑩𝑩 and 𝑩𝑩 ⊂ 𝑪𝑪.

What is the cardinality of each of these sets?

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 { }

Topic: Sets & Set Operations


Discrete Structures Practice Questions

vi. 𝑅𝑅(𝑥𝑥): 𝑥𝑥 < 𝑥𝑥 2 { }

Show that (𝑨𝑨 − 𝑩𝑩) − 𝑪𝑪 = (𝑨𝑨 − 𝑪𝑪) − (𝑩𝑩 − 𝑪𝑪).

(𝐴𝐴 − 𝐶𝐶) − (𝐵𝐵 − 𝐶𝐶) ≡ (𝐴𝐴 ∩ 𝐶𝐶)

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

Topic: Sets & Set Operations


Discrete Structures Practice Questions

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

Topic: Sets & Set Operations


Discrete Structures Practice Questions

What can you say about the sets A and B if 𝑨𝑨 ⊕ 𝑩𝑩 = 𝑨𝑨?

Let 𝑨𝑨𝒊𝒊 = {… , −𝟐𝟐, −𝟏𝟏, 𝟎𝟎, 𝟏𝟏, … , 𝒊𝒊}. Then

𝑛𝑛

� 𝐴𝐴𝑖𝑖 = { }
𝑖𝑖=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

𝐴𝐴 ∩ 𝐵𝐵

Topic: Sets & Set Operations


Discrete Structures Practice Questions

𝐴𝐴 ∪ 𝐵𝐵

Given two sets A and B (as bit strings), how can we determine that

𝐴𝐴 ⊆ 𝐵𝐵?

𝐴𝐴 ⊂ 𝐵𝐵?

Why the following figure is not a Venn Diagram for 4 sets?

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:

|A|= 4, |A∩B|= 2, |A∩C|= 2, A−D = A, and A∩E = E

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

B∩C but A≠B).

Topic: Sets & Set Operations


Discrete Structures Practice Questions

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.

Show that 𝐴𝐴 − 𝐵𝐵 = 𝐴𝐴 ∩ 𝐵𝐵� using set builder notation.

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).

ii) ((A ∩ B) - C)'

Note: The universal set consists of all students of BSSE studying in different institutions of
Lahore.

7
Page

Topic: Sets & Set Operations


Discrete Structures Practice Questions

Why is f not a function from R to R if

𝑓𝑓(𝑥𝑥) = 1/𝑥𝑥?

𝑓𝑓 (𝑥𝑥) = √𝑥𝑥?

𝑓𝑓(𝑥𝑥) = ±�(𝑥𝑥 2 + 1)?

Determine whether f is a function from Z to R if

𝑓𝑓(𝑛𝑛) = ±𝑛𝑛.

𝑓𝑓(𝑛𝑛) = √𝑛𝑛2 + 1.

𝑓𝑓(𝑛𝑛) = 1/(𝑛𝑛2 − 4).

Determine whether f is a function from the set of all bit strings to the set of integers if

f (S) is the position of a 0 bit in S.

f (S) is the number of 1 bits in S.

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.

Determine whether 𝒇𝒇: 𝐙𝐙 × 𝐙𝐙 → 𝐙𝐙 is onto if

f (m, n) = 2m − n.

f (m, n) = m2 − n2.

f (m, n) = m2 + n2.

f (m, n) = m + n + 1.

f (m, n) = |m| − |n|.

f (m, n) = m2 − 4.
8
Page

Topic: Functions
Discrete Structures Practice Questions

Determine whether each of these functions from Z to Z is one-to-one.

f (n) = n − 1

f (n) = n2 + 1

f (n) = n3

f (n) = ⌈𝑛𝑛/2⌉

Give an example of an increasing function from R to itself

Give an example of a strictly increasing function from R to itself

Give an example of a decreasing function from R to itself

Give an example of a strictly decreasing function from R to itself

Let S = {−1, 0, 2, 4, 7}. Find f (S) if

f (x) = 1. { }

f (x) = 2x + 1. { }

f (x) = ⌈𝑥𝑥/5⌉. { }

f (x)=⌊(𝑥𝑥 2 + 1)/3⌋. { }

Let f (x) = �𝒙𝒙𝟐𝟐 /𝟑𝟑�. Find f (S) if

S = {−2,−1, 0, 1, 2, 3}. f(S)={ }

S = {0, 1, 2, 3, 4, 5}. f(S)={ }


9
Page

S = {1, 5, 7, 11}. f(S)={ }

Topic: Functions
Discrete Structures Practice Questions

S = {2, 6, 10, 14}. f(S)={ }

Find 𝒇𝒇 ∘ 𝒈𝒈 and ∘ 𝒇𝒇 , where f (x) = x2 + 1 and g(x) = x + 2, are functions from R to R.

Show that if x is a real number and m is an integer, then ⌈𝒙𝒙 + 𝒎𝒎⌉ = ⌈𝒙𝒙⌉ + 𝒎𝒎

Show that if x is a real number, then 𝒙𝒙 − 𝟏𝟏 < ⌊𝒙𝒙⌋ ≤ 𝒙𝒙 ≤ ⌈𝒙𝒙⌉ < 𝑥𝑥 + 1.

Show that if x is a real number and n is an integer, then

𝑥𝑥 < 𝑛𝑛 if and only if ⌊𝑥𝑥⌋ < 𝑛𝑛.

𝑛𝑛 < 𝑥𝑥 if and only if 𝑛𝑛 < ⌈𝑥𝑥⌉.

𝟏𝟏
Prove that if x is a real number, then ⌊𝟐𝟐𝟐𝟐⌋ = ⌊𝒙𝒙⌋ + �𝒙𝒙 + 𝟐𝟐�.

Prove or disprove that ⌈𝒙𝒙 + 𝒚𝒚⌉ = ⌈𝒙𝒙⌉ + ⌈𝒚𝒚⌉ for all real numbers x and y.
10
Page

Topic: Functions

You might also like