You are on page 1of 18

Discrete Structures

Sets, Functions, Matrices, and Relations


(Lecture – 1)

Dr. Nirnay Ghosh


Sets
 It is the fundamental discrete structure on which all other discrete
structures are built.
 Sets are used to group objects together. Often, but not always, the
objects in a set have similar properties.
 Examples: all the students who are currently enrolled in your
college make up a set; all the students currently taking a course in
discrete mathematics at any college make up a set, etc.
 The language of sets is a means to study such collections in an
organized fashion.

2 8/28/2019
Standard Sets & Intervals

 Note that some sources do not consider 0 a natural number


 According to them, {0, 1, 2, 3,…..} is a set of whole numbers
 Intervals of real numbers: when a and b are real numbers with a < b, we write
 [a, b] = {x | a ≤ x ≤ b}
 [a, b) = {x | a ≤ x < b}
 (a, b] = {x |a < x ≤ b}
 (a, b) = {x |a < x < b}
 [a, b] is called the closed interval from a to b and (a, b) is called the open interval from a to
b.
3 8/28/2019
Definitions related to Sets

 EMPTY SET: Special set that has no elements. It is also called


null set, and is denoted by ∅. The empty set can also be
denoted by { }.
 Often, a set of elements with certain properties turns out to be the
null set. For instance, the set of all positive integers that are greater
than their squares is the null set.
 SINGLETON SET: A set with one element

4 8/28/2019
Venn Diagrams
 Tool for representing sets in graphical
form
 Universal set U: contains all the
objects under consideration
(represented by a rectangle).
 The universal set varies depending on which
objects are of interest.
 Inside this rectangle, circles or other
geometrical figures are used to
represent sets.
 Points are used to represent the
 particular elements of the set.
 Venn diagrams are often used to
indicate the relationships between sets
5 8/28/2019
Subsets

 If set A is a subset of a set B but that A ≠ B, we write A ⊂ B and


say that A is a proper subset of B.
 For A ⊂ B to be true, it must be the case that A ⊆ B and there
must exist an element x of B that is not an element of A.

6 8/28/2019
The Size of a Set, Power Set, Cartesian Product

 Example: set of positive integers

 Cartesian Products

7 8/28/2019
Cartesian Product of More than Two Sets

 A subset R of the Cartesian product A × B is called a relation


from the set A to the set B.
 The elements of R are ordered pairs, where the first element
belongs to A and the second to B.
 Example: R = {(a, 0), (a, 1), (a, 3), (b, 1), (b, 2), (c, 0), (c, 3)} is a relation
from the set {a, b, c} to the set {0, 1, 2, 3}.
 A relation from a set A to itself is called a relation on A.

8 8/28/2019
Set Operations

 A∪ B = {x | x ∈ A ∨ x ∈ B}.

 A ∩ B = {x | x ∈ A ∧ x ∈ B}.

9 8/28/2019
Set Operations

10 8/28/2019
Set Identities

11 8/28/2019
Membership Tables
 Set identities can also be proved using membership tables.
 We consider each combination of sets that an element can belong to and
verify that elements in the same combinations of sets belong to both the
sets in the identity.
 To indicate that an element is in a set, a 1 is used; to indicate that an
element is not in a set, a 0 is used.
 Example: Use a membership table to show that A ∩ (B ∪ C) = (A ∩ B) ∪
(A ∩ C).

12 8/28/2019
Generalized Unions and Intersections

13 8/28/2019
Countable & Uncountable Sets
 Recall: The cardinality of a finite set is defined by the number
of elements in the set.
 Definition: The sets A and B have the same cardinality if
there is a one-to-one correspondence between elements in A
and B. When A and B have the same cardinality, we write|A| =
|B|.
 In other words if there is a bijection from A to B.
 Recall bijection is one-to-one and onto.
 Example: Assume A = {a, b, c} and B = {α,β,γ} and function
F is defined as:
 a → α; b →β; c → γ
 F defines a bijection. Therefore A and B have the same
14 cardinality, i.e. | A | = | B | = 3. 8/28/2019
Countable & Uncountable Sets
 Definition: A set that is either finite or has the same cardinality
as the set of positive integers Z+ is called countable. A set that is
not countable is called uncountable or infinite.

 Why these are called countable?


 The elements of the set can be enumerated and listed.
 Example: Assume A = {0, 2, 4, 6, ... } set of even numbers. Is it
countable?
 Some terms: Countable, Countably infinite, Uncountable, Infinite sets

 Theorem: The set of integers Z is countable.

15 8/28/2019
Countable & Uncountable Sets
 Definition: A rational number can be expressed as the ratio of two
integers p and q such that q ≠ 0.
 ¾ is a rational number
 √2 is not a rational number.
 Theorem: The positive rational numbers are countable.
 Proof: The positive rational numbers are countable since they can be
arranged in a sequence: r1 , r2 , r3,…

 First row: q = 1
 Second row: q = 2, etc.
 Constructing the list:
 First list p/q with p + q = 2.
 Next list p/q with p + q = 3
16
and so on. 8/28/2019
Countable & Uncountable Sets
 Theorem: The set of real numbers is an uncountable set.
 Proof: We will be using proof by contradiction. Suppose that
the real numbers are countable. Then every subset of the reals is
countable, in particular, the interval [0,1] is countable. This
implies the elements of this set can be listed say r1, r2, r3, ...
where
 r1 = 0.d11d12d13d14 ...
 r2 = 0.d21d22d23d24 ...
 r3 = 0.d31d32d33d34 .....
Where, the dij ε {0,1,2,3,4,5,6,7,8,9}.
 Use Cantor’s diagonalization argument to contradict the supposition!

17 8/28/2019
Countable & Uncountable Sets
 Theorem:
Show that if A and B are sets, A is uncountable, and A ⊆ B, then B is uncountable.

 Cantor’s Theorem (The Power Set Theorem):


If A is any set, then there is an injunction from A to P(A), but no
surjection, so |A|<|P(A)|

 Theorem:

18 8/28/2019

You might also like