Docsity

CSE Lecture Notes: Sets, Lecture notes of Discrete Mathematics

Toggle sidebar
bg1
CSE Notes: Sets and Cartesian Products
How do you construct a
set?
How is a set notated?
How do you indicate an
interval for a set?
What are the different
types of operations that
can be used in a set?
How can we illustrate a
subset relative to the
universal set using a Venn
Diagram?
Sets and Set Components
A set is an unordered collection of different elements. A set can be written
explicitly by listing its elements using set bracket
Sets may have seemingly
unrelated elements, such as: {a, 2, Fred, New Jersey}
If the order of the elements is changed or any element of a set is repeated, it does
not make any changes in the set
The objects in a set are called the elements or members of the set
Set Notation
Sets can be notated in two ways: Roster/Tabular Form or Set Builder Notation
Set Builder Notation: characterizes the elements by stating their property or
properties
Examples:
- The set {a,e,i,o,u} is written as: A = {x: x is a vowel in English alphabet}
- The set {1,3,5,7,9} is written as: B = {x: 1≤x<10 and (x%2) ≠ 0}
If an element x is a member of any set S, it is denoted by x S∈ and if an element
y is not a member of set S, it is denoted by y S∉
Roster/Tabular Form: The set is represented by listing all the elements comprising
it. The elements are enclosed within braces and separated by commas
Examples:
- Set of vowels in English alphabet, A = {a,e,i,o,u}
- Set of odd numbers less than 10, B = {1,3,5,7,9}
Interval Notation
(a, b) = Open Interval
[a, b] = Closed Interval
[a, b] = { x| a ≤ x ≤ b }
[a, b) = { x| a ≤ x < b }
(a, b] = { x| a < x ≤ b }
(a, b) = { x| a < x < b }
Sets and Operations
A datatype or type is the name of a set
Together with a set of operations that can be performed on objects from that set
Boolean: the name of the set {0,1} together with operations on one or more
elements of this set such as AND, OR, and NOT
Two sets are equal if and only if they have the same elements
That is if A and B are sets, then A and B are equal if and only if:
∀𝑥
(
𝑥∈𝐴↔𝑥∈𝐵
)
(We write A=B if A and B are equal sets if this is the case)
Venn Diagram
The Rectangle represents the Universal set that contains all the objects
The Circles represent two sets
– U: 26 letters of English alphabet
– V: a set of vowels in the English alphabet
pf3

Partial preview of the text

Download CSE Lecture Notes: Sets and more Lecture notes Discrete Mathematics in PDF only on Docsity!

CSE Notes: Sets and Cartesian Products How do you construct a set? How is a set notated? How do you indicate an interval for a set? What are the different types of operations that can be used in a set? How can we illustrate a subset relative to the universal set using a Venn Diagram? Sets and Set Components  A set is an unordered collection of different elements. A set can be written explicitly by listing its elements using set bracket  Sets may have seemingly unrelated elements, such as: {a, 2, Fred, New Jersey}  If the order of the elements is changed or any element of a set is repeated, it does not make any changes in the set  The objects in a set are called the elements or members of the set Set Notation  Sets can be notated in two ways: Roster/Tabular Form or Set Builder Notation  Set Builder Notation: characterizes the elements by stating their property or properties  Examples:

  • The set {a,e,i,o,u} is written as: A = {x: x is a vowel in English alphabet}
  • The set {1,3,5,7,9} is written as: B = {x: 1≤x<10 and (x%2) ≠ 0}  If an element x is a member of any set S, it is denoted by x ∈S and if an element y is not a member of set S, it is denoted by y ∉S  Roster/Tabular Form: The set is represented by listing all the elements comprising it. The elements are enclosed within braces and separated by commas  Examples:
  • Set of vowels in English alphabet, A = {a,e,i,o,u}
  • Set of odd numbers less than 10, B = {1,3,5,7,9} Interval Notation (a, b) = Open Interval [a, b] = Closed Interval  [a, b] = { x| a ≤ x ≤ b }  [a, b) = { x| a ≤ x < b }  (a, b] = { x| a < x ≤ b }  (a, b) = { x| a < x < b } Sets and Operations  A datatype or type is the name of a set  Together with a set of operations that can be performed on objects from that set  Boolean: the name of the set {0,1} together with operations on one or more elements of this set such as AND, OR, and NOT  Two sets are equal if and only if they have the same elements  That is if A and B are sets, then A and B are equal if and only if:

∀ 𝑥 ( 𝑥 ∈ 𝐴 ↔ 𝑥 ∈ 𝐵 ) (We write A=B if A and B are equal sets if this is the case)

Venn Diagram  The Rectangle represents the Universal set that contains all the objects  The Circles represent two sets

  • U: 26 letters of English alphabet
  • V: a set of vowels in the English alphabet

Describe some of the different types of sets Types of Sets  Sets can be classified into many types. Some of which are finite, infinite, subset, universal, proper, singleton set, etc.  Finite Set: A set which contains a definite number of elements is called a finite set.

  • Example: S={x|x ∈N S={x|x ∈N and 70>x>50}  Infinite Set: A set containing an infinite number of elements is called an infinite set.
  • Example: S={x|x ∈N S={x|x ∈N and x>10}  Subset: A set containing elements found in the superset * Denoted by A ⊆B if

and only if ∀ 𝑥 ( 𝑥 ∈ 𝐴 → 𝑥 ∈ 𝐵 )

  • Example: Let, X= {1,2,3,4,5,6} and Y= {1,2}. Here, set Y is a subset of set X as all the elements of set Y is in set X. Hence, we can write Y ⊆X  Proper subset: A subset of, but not equal to the superset
  • Example: Let, X = {1,2,3,4,5,6} and Y = {1,2}. Here set Y ⊂X since all elements in Y are contained in X too and X has at least one more element than set Y.  Universal Set: A collection of all elements in a particular context or application. All the sets in that context or application are essentially subsets of this universal set. *Universal sets are represented as U.
  • Example: We may define U as the set of all animals on earth. In this case, the set of all mammals, the set of all fish, and the set of all insects are subsets of U.  Empty/Null Set: An empty set contains no elements. It is denoted by ∅. As the number of elements in an empty set is finite, empty set is a finite set. *The cardinality of empty set or null set is zero.
  • Example: S={x|x ∈ Nand 7 < x < 8} = ∅  Singleton/Unit Set: A set containing only one element. * A singleton set is denoted by {s}.
  • Example: S={x|x ∈N, 7<x<9} = {8}  Equal vs Equivalent Sets: Equal sets contain the same elements. Equivalent sets