SlideShare a Scribd company logo
Introduction to set theory and to methodology and philosophy of
mathematics and computer programming
Union, intersection and complement
An overview
by Jan Plaza
c 2017 Jan Plaza
Use under the Creative Commons Attribution 4.0 International License
Version of February 8, 2017
Union
Axioms imply:
∀X,Y ∃Z ∀u (u ∈ Z ↔ u ∈ X ∨ u ∈ Y ).
Definition
The union of X and Y , denoted X ∪ Y , is the set Z such that
∀u (u ∈ Z ↔ u ∈ X ∨ u ∈ Y ).
Union
X Y
Example
{1} ∪ {3} = {1, 3}.
{1, 2} ∪ {2, 3} = {1, 2, 3}.
{1, 2} ∪ {1, 2, 3} = {1, 2, 3}.
Union
Fact
1. z ∈ X ∪ Y iff z ∈ X or z ∈ Y .
2. z ∈ X ∪ Y iff z ∈ X and z ∈ Y .
Intersection
Definition
Let X and Y be any sets. The intersection of X and Y , denoted X ∩ Y , is the set
{z ∈ X : z ∈ Y }. (Think of it as: {z : z ∈ X ∧ z ∈ Y }.)
X Y
X ∩ Y
Example
{1, 2} ∩ {2, 3} = {2}.
Intersection
Fact
1. z ∈ X ∩ Y iff z ∈ X and z ∈ Y .
2. z ∈ X ∩ Y iff z ∈ X or z ∈ Y .
Complement
Definition
Let X ⊆ U. The complement of X with respect to U is the set
{u ∈ U : u ∈ X}. If U is known from the context it is denoted by Xc .
X Xc
U
Example
The complement of the set of even integers with respect to Z is the set of odd integers.
The complement of Q with respect to R is the set of all irrational numbers.
Complement
Fact
1. z ∈ Xc iff z ∈ X, for every z ∈ U.
2. z ∈ Xc iff z ∈ X, for every z ∈ U.
Implementation
1. A finite set of strings can be implemented as a dynamic hash table:
a string belongs to the set iff it is a key in the hash table.
Inserting, deleting, testing membership – average O(1) time.
Union, intersection, complement - in O(n) time).
2. Consider a universe U ={a0, ..., a7}.
Any subset A of U can be represented as a bit vector.
E.g. A={a0, a1, a3} is represented by the bit vector 11010000.
Bitwise operations |, &, ~ correspond to set operations ∪, ∩, c.
Very efficient; constant time (proportional to the size of U).
Exercises
1. ∅c =...
Uc =...
2. (Xc)c
=...
Exercises
True or false?
X ∪ Y =Y ∪ X
X ∩ Y =Y ∩ X
Exercises
Complete
1. X ∪ ∅=...
X ∩ U =...
2. X ∩ ∅=...
X ∪ U =...
Exercises
Complete
1. X ∪ X =...
X ∩ X =...
2. X ∪ Xc =...
X ∩ Xc =...
Exercises
Complete
1. X ⊆ Y iff X ∪ Y =...
X ⊇ Y iff X ∩ Y =...
2. X ⊆ Y iff Xc ∪ Y =...
X ⊇ Y iff Xc ∩ Y =...
3. X ⊆ Y iff Xc ∪ Y c =...
X ⊇ Y iff Xc ∩ Y c =...

More Related Content

What's hot

union and intersection
union and intersectionunion and intersection
union and intersection
Elvira Evangelista
 
Function and Its Types.
Function and Its Types.Function and Its Types.
Function and Its Types.
Awais Bakshy
 
Cartesian product of two sets
Cartesian product of two setsCartesian product of two sets
Cartesian product of two sets
Janak Singh saud
 
Introduction to sets
Introduction to setsIntroduction to sets
Introduction to sets
Sonia Pahuja
 
1.8 Separation schema
1.8 Separation schema1.8 Separation schema
1.8 Separation schema
Jan Plaza
 
LECTURE 2: PROPOSITIONAL EQUIVALENCES
LECTURE 2: PROPOSITIONAL EQUIVALENCESLECTURE 2: PROPOSITIONAL EQUIVALENCES
LECTURE 2: PROPOSITIONAL EQUIVALENCES
MLG College of Learning, Inc
 
Relations and functions
Relations and functionsRelations and functions
Relations and functions
Heather Scott
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
nszakir
 
Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on sets
Rahul Avicii
 
Chapter 4 Cyclic Groups
Chapter 4 Cyclic GroupsChapter 4 Cyclic Groups
Chapter 4 Cyclic Groups
Tony Cervera Jr.
 
PPt on Functions
PPt on FunctionsPPt on Functions
PPt on Functionscoolhanddav
 
Sequences and series
Sequences and seriesSequences and series
Sequences and seriesmstf mstf
 
8.1 intro to functions
8.1 intro to functions8.1 intro to functions
8.1 intro to functionsBarbara Knab
 
Operations on sets
Operations on setsOperations on sets
Operations on sets
renceLongcop
 
Section 11: Normal Subgroups
Section 11: Normal SubgroupsSection 11: Normal Subgroups
Section 11: Normal Subgroups
Kevin Johnson
 
Sample Space And Events
Sample Space And EventsSample Space And Events
Sample Space And Events
DataminingTools Inc
 
Set concepts
Set conceptsSet concepts
Set concepts
Malti Aswal
 
Relations in Discrete Math
Relations in Discrete MathRelations in Discrete Math
Relations in Discrete Math
Pearl Rose Cajenta
 
Relations and Functions
Relations and FunctionsRelations and Functions
Relations and Functionstoni dimella
 
Linear Equations in Two Variables
Linear Equations in Two VariablesLinear Equations in Two Variables
Linear Equations in Two Variables
sheisirenebkm
 

What's hot (20)

union and intersection
union and intersectionunion and intersection
union and intersection
 
Function and Its Types.
Function and Its Types.Function and Its Types.
Function and Its Types.
 
Cartesian product of two sets
Cartesian product of two setsCartesian product of two sets
Cartesian product of two sets
 
Introduction to sets
Introduction to setsIntroduction to sets
Introduction to sets
 
1.8 Separation schema
1.8 Separation schema1.8 Separation schema
1.8 Separation schema
 
LECTURE 2: PROPOSITIONAL EQUIVALENCES
LECTURE 2: PROPOSITIONAL EQUIVALENCESLECTURE 2: PROPOSITIONAL EQUIVALENCES
LECTURE 2: PROPOSITIONAL EQUIVALENCES
 
Relations and functions
Relations and functionsRelations and functions
Relations and functions
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on sets
 
Chapter 4 Cyclic Groups
Chapter 4 Cyclic GroupsChapter 4 Cyclic Groups
Chapter 4 Cyclic Groups
 
PPt on Functions
PPt on FunctionsPPt on Functions
PPt on Functions
 
Sequences and series
Sequences and seriesSequences and series
Sequences and series
 
8.1 intro to functions
8.1 intro to functions8.1 intro to functions
8.1 intro to functions
 
Operations on sets
Operations on setsOperations on sets
Operations on sets
 
Section 11: Normal Subgroups
Section 11: Normal SubgroupsSection 11: Normal Subgroups
Section 11: Normal Subgroups
 
Sample Space And Events
Sample Space And EventsSample Space And Events
Sample Space And Events
 
Set concepts
Set conceptsSet concepts
Set concepts
 
Relations in Discrete Math
Relations in Discrete MathRelations in Discrete Math
Relations in Discrete Math
 
Relations and Functions
Relations and FunctionsRelations and Functions
Relations and Functions
 
Linear Equations in Two Variables
Linear Equations in Two VariablesLinear Equations in Two Variables
Linear Equations in Two Variables
 

Viewers also liked

2.2 Properties of union, intersection and complement
2.2 Properties of union, intersection and complement2.2 Properties of union, intersection and complement
2.2 Properties of union, intersection and complement
Jan Plaza
 
2.5 Disjoint, covering and complementary sets
2.5 Disjoint, covering and complementary sets2.5 Disjoint, covering and complementary sets
2.5 Disjoint, covering and complementary sets
Jan Plaza
 
2.6 Properties of inclusion
2.6 Properties of inclusion2.6 Properties of inclusion
2.6 Properties of inclusion
Jan Plaza
 
2.7 Ordered pairs
2.7 Ordered pairs2.7 Ordered pairs
2.7 Ordered pairs
Jan Plaza
 
2.4 Symmetric difference
2.4 Symmetric difference2.4 Symmetric difference
2.4 Symmetric difference
Jan Plaza
 
3.2 Power sets
3.2 Power sets3.2 Power sets
3.2 Power sets
Jan Plaza
 
2.8 Ordered tuples
2.8 Ordered tuples2.8 Ordered tuples
2.8 Ordered tuples
Jan Plaza
 
2.9 Cartesian products
2.9 Cartesian products2.9 Cartesian products
2.9 Cartesian products
Jan Plaza
 
3.7 Indexed families of sets
3.7 Indexed families of sets3.7 Indexed families of sets
3.7 Indexed families of sets
Jan Plaza
 
3.6 Families ordered by inclusion
3.6 Families ordered by inclusion3.6 Families ordered by inclusion
3.6 Families ordered by inclusion
Jan Plaza
 

Viewers also liked (10)

2.2 Properties of union, intersection and complement
2.2 Properties of union, intersection and complement2.2 Properties of union, intersection and complement
2.2 Properties of union, intersection and complement
 
2.5 Disjoint, covering and complementary sets
2.5 Disjoint, covering and complementary sets2.5 Disjoint, covering and complementary sets
2.5 Disjoint, covering and complementary sets
 
2.6 Properties of inclusion
2.6 Properties of inclusion2.6 Properties of inclusion
2.6 Properties of inclusion
 
2.7 Ordered pairs
2.7 Ordered pairs2.7 Ordered pairs
2.7 Ordered pairs
 
2.4 Symmetric difference
2.4 Symmetric difference2.4 Symmetric difference
2.4 Symmetric difference
 
3.2 Power sets
3.2 Power sets3.2 Power sets
3.2 Power sets
 
2.8 Ordered tuples
2.8 Ordered tuples2.8 Ordered tuples
2.8 Ordered tuples
 
2.9 Cartesian products
2.9 Cartesian products2.9 Cartesian products
2.9 Cartesian products
 
3.7 Indexed families of sets
3.7 Indexed families of sets3.7 Indexed families of sets
3.7 Indexed families of sets
 
3.6 Families ordered by inclusion
3.6 Families ordered by inclusion3.6 Families ordered by inclusion
3.6 Families ordered by inclusion
 

Similar to 2.1 Union, intersection and complement

MA500-2 Topological Structures 2016Aisling McCluskey, Dar.docx
MA500-2 Topological Structures 2016Aisling McCluskey, Dar.docxMA500-2 Topological Structures 2016Aisling McCluskey, Dar.docx
MA500-2 Topological Structures 2016Aisling McCluskey, Dar.docx
smile790243
 
Common fixed theorems for weakly compatible mappings via an
Common fixed theorems for weakly compatible mappings via anCommon fixed theorems for weakly compatible mappings via an
Common fixed theorems for weakly compatible mappings via an
Alexander Decker
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
mathsjournal
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
mathsjournal
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
mathsjournal
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
mathsjournal
 
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
mathsjournal
 
A unique common fixed point theorem for four
A unique common fixed point theorem for fourA unique common fixed point theorem for four
A unique common fixed point theorem for fourAlexander Decker
 
Some fixed point theorems in fuzzy mappings
Some fixed point theorems in fuzzy mappingsSome fixed point theorems in fuzzy mappings
Some fixed point theorems in fuzzy mappings
Alexander Decker
 
QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...
QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...
QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...
The Statistical and Applied Mathematical Sciences Institute
 
On uniformly continuous uniform space
On uniformly continuous uniform spaceOn uniformly continuous uniform space
On uniformly continuous uniform space
theijes
 
metric spaces
metric spacesmetric spaces
metric spaces
HamKarimRUPP
 
Fixed points of contractive and Geraghty contraction mappings under the influ...
Fixed points of contractive and Geraghty contraction mappings under the influ...Fixed points of contractive and Geraghty contraction mappings under the influ...
Fixed points of contractive and Geraghty contraction mappings under the influ...
IJERA Editor
 
Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...
Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...
Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...
inventy
 
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
IJERA Editor
 
A common fixed point theorem in cone metric spaces
A common fixed point theorem in cone metric spacesA common fixed point theorem in cone metric spaces
A common fixed point theorem in cone metric spaces
Alexander Decker
 
Fixed points theorem on a pair of random generalized non linear contractions
Fixed points theorem on a pair of random generalized non linear contractionsFixed points theorem on a pair of random generalized non linear contractions
Fixed points theorem on a pair of random generalized non linear contractions
Alexander Decker
 
An application if ivfss in med dignosis
An application if ivfss in med dignosisAn application if ivfss in med dignosis
An application if ivfss in med dignosisjobishvd
 
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...Cristiano Longo
 
Semianr 2. (2)
Semianr 2. (2)Semianr 2. (2)
Semianr 2. (2)jobishvd
 

Similar to 2.1 Union, intersection and complement (20)

MA500-2 Topological Structures 2016Aisling McCluskey, Dar.docx
MA500-2 Topological Structures 2016Aisling McCluskey, Dar.docxMA500-2 Topological Structures 2016Aisling McCluskey, Dar.docx
MA500-2 Topological Structures 2016Aisling McCluskey, Dar.docx
 
Common fixed theorems for weakly compatible mappings via an
Common fixed theorems for weakly compatible mappings via anCommon fixed theorems for weakly compatible mappings via an
Common fixed theorems for weakly compatible mappings via an
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
COMMON FIXED POINT THEOREMS IN COMPATIBLE MAPPINGS OF TYPE (P*) OF GENERALIZE...
 
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
Common Fixed Point Theorems in Compatible Mappings of Type (P*) of Generalize...
 
A unique common fixed point theorem for four
A unique common fixed point theorem for fourA unique common fixed point theorem for four
A unique common fixed point theorem for four
 
Some fixed point theorems in fuzzy mappings
Some fixed point theorems in fuzzy mappingsSome fixed point theorems in fuzzy mappings
Some fixed point theorems in fuzzy mappings
 
QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...
QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...
QMC: Operator Splitting Workshop, Compactness Estimates for Nonlinear PDEs - ...
 
On uniformly continuous uniform space
On uniformly continuous uniform spaceOn uniformly continuous uniform space
On uniformly continuous uniform space
 
metric spaces
metric spacesmetric spaces
metric spaces
 
Fixed points of contractive and Geraghty contraction mappings under the influ...
Fixed points of contractive and Geraghty contraction mappings under the influ...Fixed points of contractive and Geraghty contraction mappings under the influ...
Fixed points of contractive and Geraghty contraction mappings under the influ...
 
Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...
Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...
Convergence Theorems for Implicit Iteration Scheme With Errors For A Finite F...
 
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
 
A common fixed point theorem in cone metric spaces
A common fixed point theorem in cone metric spacesA common fixed point theorem in cone metric spaces
A common fixed point theorem in cone metric spaces
 
Fixed points theorem on a pair of random generalized non linear contractions
Fixed points theorem on a pair of random generalized non linear contractionsFixed points theorem on a pair of random generalized non linear contractions
Fixed points theorem on a pair of random generalized non linear contractions
 
An application if ivfss in med dignosis
An application if ivfss in med dignosisAn application if ivfss in med dignosis
An application if ivfss in med dignosis
 
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
 
Semianr 2. (2)
Semianr 2. (2)Semianr 2. (2)
Semianr 2. (2)
 

More from Jan Plaza

6.3 Equivalences versus partitions
6.3 Equivalences versus partitions6.3 Equivalences versus partitions
6.3 Equivalences versus partitions
Jan Plaza
 
6.1 Partitions
6.1 Partitions6.1 Partitions
6.1 Partitions
Jan Plaza
 
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
Jan Plaza
 
6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)
Jan Plaza
 
5.8 Permutations (handout)
5.8 Permutations (handout)5.8 Permutations (handout)
5.8 Permutations (handout)
Jan Plaza
 
5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)
Jan Plaza
 
5.7 Function powers
5.7 Function powers5.7 Function powers
5.7 Function powers
Jan Plaza
 
5.6 Function inverse. A handout.
5.6 Function inverse. A handout.5.6 Function inverse. A handout.
5.6 Function inverse. A handout.
Jan Plaza
 
5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.
Jan Plaza
 
5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.
Jan Plaza
 
5.5 Injective and surjective functions. Dynamic slides.
5.5 Injective and surjective functions. Dynamic slides.5.5 Injective and surjective functions. Dynamic slides.
5.5 Injective and surjective functions. Dynamic slides.
Jan Plaza
 
5.3 Basic functions. A handout.
5.3 Basic functions. A handout.5.3 Basic functions. A handout.
5.3 Basic functions. A handout.
Jan Plaza
 
5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.
Jan Plaza
 
5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.
Jan Plaza
 
5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.
Jan Plaza
 
1.4 Abstract objects and expressions
1.4 Abstract objects and expressions1.4 Abstract objects and expressions
1.4 Abstract objects and expressions
Jan Plaza
 
1.2 Axiom of pair
1.2 Axiom of pair1.2 Axiom of pair
1.2 Axiom of pair
Jan Plaza
 
1.11 Mathematical induction
1.11 Mathematical induction1.11 Mathematical induction
1.11 Mathematical induction
Jan Plaza
 
1.7 The sets of numbers
1.7 The sets of numbers1.7 The sets of numbers
1.7 The sets of numbers
Jan Plaza
 
1.6 Subsets
1.6 Subsets1.6 Subsets
1.6 Subsets
Jan Plaza
 

More from Jan Plaza (20)

6.3 Equivalences versus partitions
6.3 Equivalences versus partitions6.3 Equivalences versus partitions
6.3 Equivalences versus partitions
 
6.1 Partitions
6.1 Partitions6.1 Partitions
6.1 Partitions
 
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)6.2 Reflexivity, symmetry and transitivity (dynamic slides)
6.2 Reflexivity, symmetry and transitivity (dynamic slides)
 
6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)6.2 Reflexivity, symmetry and transitivity (handout)
6.2 Reflexivity, symmetry and transitivity (handout)
 
5.8 Permutations (handout)
5.8 Permutations (handout)5.8 Permutations (handout)
5.8 Permutations (handout)
 
5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)5.8 Permutations (dynamic slides)
5.8 Permutations (dynamic slides)
 
5.7 Function powers
5.7 Function powers5.7 Function powers
5.7 Function powers
 
5.6 Function inverse. A handout.
5.6 Function inverse. A handout.5.6 Function inverse. A handout.
5.6 Function inverse. A handout.
 
5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.5.6 Function inverse. Dynamic slides.
5.6 Function inverse. Dynamic slides.
 
5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.5.5 Injective and surjective functions. A handout.
5.5 Injective and surjective functions. A handout.
 
5.5 Injective and surjective functions. Dynamic slides.
5.5 Injective and surjective functions. Dynamic slides.5.5 Injective and surjective functions. Dynamic slides.
5.5 Injective and surjective functions. Dynamic slides.
 
5.3 Basic functions. A handout.
5.3 Basic functions. A handout.5.3 Basic functions. A handout.
5.3 Basic functions. A handout.
 
5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.5.3 Basic functions. Dynamic slides.
5.3 Basic functions. Dynamic slides.
 
5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.
 
5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.5.1 Defining and visualizing functions. Dynamic slides.
5.1 Defining and visualizing functions. Dynamic slides.
 
1.4 Abstract objects and expressions
1.4 Abstract objects and expressions1.4 Abstract objects and expressions
1.4 Abstract objects and expressions
 
1.2 Axiom of pair
1.2 Axiom of pair1.2 Axiom of pair
1.2 Axiom of pair
 
1.11 Mathematical induction
1.11 Mathematical induction1.11 Mathematical induction
1.11 Mathematical induction
 
1.7 The sets of numbers
1.7 The sets of numbers1.7 The sets of numbers
1.7 The sets of numbers
 
1.6 Subsets
1.6 Subsets1.6 Subsets
1.6 Subsets
 

Recently uploaded

Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 

2.1 Union, intersection and complement

  • 1. Introduction to set theory and to methodology and philosophy of mathematics and computer programming Union, intersection and complement An overview by Jan Plaza c 2017 Jan Plaza Use under the Creative Commons Attribution 4.0 International License Version of February 8, 2017
  • 2. Union Axioms imply: ∀X,Y ∃Z ∀u (u ∈ Z ↔ u ∈ X ∨ u ∈ Y ). Definition The union of X and Y , denoted X ∪ Y , is the set Z such that ∀u (u ∈ Z ↔ u ∈ X ∨ u ∈ Y ).
  • 3. Union X Y Example {1} ∪ {3} = {1, 3}. {1, 2} ∪ {2, 3} = {1, 2, 3}. {1, 2} ∪ {1, 2, 3} = {1, 2, 3}.
  • 4. Union Fact 1. z ∈ X ∪ Y iff z ∈ X or z ∈ Y . 2. z ∈ X ∪ Y iff z ∈ X and z ∈ Y .
  • 5. Intersection Definition Let X and Y be any sets. The intersection of X and Y , denoted X ∩ Y , is the set {z ∈ X : z ∈ Y }. (Think of it as: {z : z ∈ X ∧ z ∈ Y }.) X Y X ∩ Y Example {1, 2} ∩ {2, 3} = {2}.
  • 6. Intersection Fact 1. z ∈ X ∩ Y iff z ∈ X and z ∈ Y . 2. z ∈ X ∩ Y iff z ∈ X or z ∈ Y .
  • 7. Complement Definition Let X ⊆ U. The complement of X with respect to U is the set {u ∈ U : u ∈ X}. If U is known from the context it is denoted by Xc . X Xc U Example The complement of the set of even integers with respect to Z is the set of odd integers. The complement of Q with respect to R is the set of all irrational numbers.
  • 8. Complement Fact 1. z ∈ Xc iff z ∈ X, for every z ∈ U. 2. z ∈ Xc iff z ∈ X, for every z ∈ U.
  • 9. Implementation 1. A finite set of strings can be implemented as a dynamic hash table: a string belongs to the set iff it is a key in the hash table. Inserting, deleting, testing membership – average O(1) time. Union, intersection, complement - in O(n) time). 2. Consider a universe U ={a0, ..., a7}. Any subset A of U can be represented as a bit vector. E.g. A={a0, a1, a3} is represented by the bit vector 11010000. Bitwise operations |, &, ~ correspond to set operations ∪, ∩, c. Very efficient; constant time (proportional to the size of U).
  • 10. Exercises 1. ∅c =... Uc =... 2. (Xc)c =...
  • 11. Exercises True or false? X ∪ Y =Y ∪ X X ∩ Y =Y ∩ X
  • 12. Exercises Complete 1. X ∪ ∅=... X ∩ U =... 2. X ∩ ∅=... X ∪ U =...
  • 13. Exercises Complete 1. X ∪ X =... X ∩ X =... 2. X ∪ Xc =... X ∩ Xc =...
  • 14. Exercises Complete 1. X ⊆ Y iff X ∪ Y =... X ⊇ Y iff X ∩ Y =... 2. X ⊆ Y iff Xc ∪ Y =... X ⊇ Y iff Xc ∩ Y =... 3. X ⊆ Y iff Xc ∪ Y c =... X ⊇ Y iff Xc ∩ Y c =...