Lecture 3
Lecture 3
O = {1, 3, 5, 7, 9}.
O = {x | x is an odd positive integer less than 10},
O = {x ∈ Z+ | x is odd and x < 10}.
V = {a, e, i, o, u}.
L = {1, 2, 3, . . . , 99}.
R, the set of real numbers
R+, the set of positive real numbers
C, the set of complex numbers.
[a, b] = {x | a ≤ x ≤ b}
[a, b) = {x | a ≤ x < b}
(a, b] = {x |a < x ≤ b}
(a, b) = {x |a < x < b}
Note that [a, b] is called the closed interval from a to b and (a,
b) is called the open interval from a to b.
Two sets are equal if and only if they have the same elements.
Therefore, if A and B are sets, then A and B are equal if and only
if ∀x(x ∈ A ↔ x ∈ B).We write A = B if A and B are equal sets.
The sets {1, 3, 5} and {3, 5, 1} are equal, because they have the
same elements
The set A is a subset of B if and only if every element of A is also an
element of B. We use the notation A ⊆ B to indicate that A is a subset of
the set B.
The quantification of A ⊆ B is ∀x(x ∈ A → x ∈ B).
EXAMPLE 10
Let A be the set of odd positive integers less than 10. Then |A| = 5.
EXAMPLE 11
Let S be the set of letters in the English alphabet. Then |S| = 26.
EXAMPLE 12
Because the null set has no elements, it follows that | ∅| = 0.
Solution:
Question:
𝑥 ∈ 𝐴∪ 𝐵
→ 𝑥 ∈ 𝐴∨ 𝑥 ∈ 𝐵
→ 𝑥 ∉ 𝐴∨ 𝑥 ∉ 𝐵
→ ¬ ( 𝑥 ∈ 𝐴 ) ∨¬( 𝑥 ∈ 𝐵)
→ ¬( 𝑥 ∈ 𝐴∧ 𝑥 ∈ 𝐵)
→ ¬( 𝑥 ∈ 𝐴∩ 𝐵)
→ 𝑥 ∈ 𝐴∩ 𝐵
Solution:
Q:
Solution:
Question:
Practice problems:
Definition:
Example:
Example:
Let A and B be sets. The Cartesian product of A and B, denoted
by A × B, is the set of all ordered pairs (a, b), where a ∈ A and b
∈ B. Hence,
A × B = {(a, b) | a ∈ A ∧ b ∈ B}.
EXAMPLE 17
What is the Cartesian product of A = {1, 2} and
B = {a, b, c}?
Solution:
The Cartesian product A × B is
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}.
EXAMPLE 19
What is the Cartesian product A × B × C, where
A = {0, 1}, B = {1, 2}, and C = {0, 1, 2} ?
Solution:
The Cartesian product A × B × C consists of all ordered triples (a,
b, c), where a ∈ A, b ∈ B, and c ∈ C. Hence,
A × B × C = {(0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1),
(0, 2, 2),(1, 1, 0), (1, 1, 1), (1, 1, 2), (1, 2, 0), (1, 2, 1),
(1, 2, 2)}.
Is it possible to calculate A × A?
FUNCTIONS
f
1 A
2 B
3 C
4 D
Here f is not a function since f(2)=A, and f(2)=C i.e. two elements are
assigned 2.
A function f from A to B is called one-to-one (or injective) (or
injective) whenever f (a) = f (b) implies
a = b, i.e., No element of B is the image of more than one element
in A. Or If every element of domain has unique image in Range.
Example:
EXAMPLE 22 Let g be the function from the set {a, b, c} to itself
such that g(a) = b, g(b) = c, and g(c) = a. Let f be the function from
the set {a, b, c} to the set {1, 2, 3} such that f (a) = 3, f (b) = 2, and
f (c) = 1. What is the composition of f and g, and what is the
composition of g and f ?
Solution:
The composition f ◦ g is defined by
(f ◦ g)(a) = f (g(a)) = f (b) = 2,
(f ◦ g) (b) = f (g(b)) = f (c) = 1,
and
(f ◦ g)(c) = f (g(c)) = f (a) = 3.
Note that g ◦ f is not defined, because the range of f is not a subset
of the domain of g.
Example:
Example:
1 1 1 1
⌊ − ⌋=⌊ ⌋ + ⌊ − ⌋ ?
2 2 2 2
1 1
⌊ − ⌋= ⌊ 0 ⌋ =0
2 2
1 1 1
⌊ ⌋=0 , ⌊ − ⌋ =− ⌈ ⌉ =−1
2 2 2
Q.2 Find the Boolean expression corresponding to the circuit given below.
Further, find the output if the input is
00,01,10,11 ?