Lecture 01 - Set and Operations
Lecture 01 - Set and Operations
Object
?
In the context of sets, the term objects refers to the individual
items or elements that are contained within a set.
▪ A = {1, 2, 3}
▪ Students in Class: {ali, amna, hadi, sara}
▪ Cities of Pakistan: {Lahore, Karachi, Islamabad, Faisalabad, Multan, …}
In the set "Cities of Pakistan: {Lahore, Karachi, Islamabad, Faisalabad, Multan}," the
elements (city names) are capitalized because city names are proper nouns, and in
English, proper nouns are always capitalized. This rule applies to all names of
specific places, people, or organizations.
A={1,′a′,3.14,{2,3}}
A1={1},
A2={1,2},
A={1,′a′,3.14,{2,3}}
A1={1}
B2={1,2}
A={1,2,3,4,…} B={a,e,i,o,u}
Alphabets={a,b,c}
Alphabets={a,b,c}
YES, But are more suitable for programming contexts or specific applied math areas.
C = {2,4,4,6,8}
● C would still be represented as {2,4,6,8} because sets do not
allow for repeated elements.
Elements of a Set
An object in a set is called an element.
▪ A set contains the various members or elements that makeup
the set
Membership:
If K = { 3, 4, 7, 8}
L = { 4, 7, 9 }
M = { 2}
Question: 7∈K
Question: 7 ∈ K && 6 ∈ K
FINITE SETS: INFINITE SETS:
● Definition: A set is countable if you can list its elements in a sequence and can map to natural numbers
● Example:
● Definition: Uncountable sets have too many elements to be listed individually. (Cannot map to natural numbers)
● Example: The set of real numbers between 0 and 1. You cannot list them because there are infinitely many (like 0.1, 0.01, 0.001,
etc.) and you can't even get close to listing them all.
https://www.youtube.com/watch?v=HaB050B5a2Q
Set Notations
(Set – Mathematical Representation)
Example:
Syntax:
▪ S = {x ∣ condition on x} where: 𝑥 is a variable representing
the elements of the set.
▪ The condition on 𝑥 specifies which elements are included.
Set Notations
Set Builder Notations:
{0,2,4,6,8,10,12,14,16}
Class Activity
{0,2,4,6,8,10,12,14,16}
{−3,−2,−1,0,1,2,3}
Class Activity The absolute value of a
number n, denoted as ∣n∣, is
the distance of that number
Set builder notation? from zero on the number line
{−3,−2,−1,0,1,2,3}
1
={n∈Z: ∣n∣ ≤3}
Explore
= {n∈N:∣n∣≤3} Ceiling and
2 Floor
= {1,2,3}
Roster (List) Form Set builder Form
A = {a, e, i, o , u} A = {x | x is a vowel}
B = {1,2,3,4,5,6} B = {x | x ∈ N, x <7}
L = {-2, -1, 0, 1, 2, 3, 4, 5, 6}
L = {x | x ∈ Z, -2 <=x < 7}
▪ Main Text:
▪ K. Rosen: Discrete Structures and its Applications
▪ Weekly Readings:
▪ L. Lovasz: Discrete Mathematics, Elementary and Beyond
▪ Reference:
▪ R. J. Wilson: Graph Theory