Title: Sets Set Operations
1Sets Set Operations
2Learning Objectives
- Understand what are sets, how to build them, and
some important properties and theorems about
sets. - Understand which set operators exist that permit
to create new sets.
3Sets
- A 1, 2, ab, ba, 1, 2, 3, isabelle, table,
1,2, ab, ba, isabelle table are elements they
are members of the set A or belong to A. - Notation a ? A.
- V a, i, o, u, e Set of Vowels
- O 1,3,5,7,9 Odd numbers lt 10.
- A B if x ? A ? x ? B A 1,3,5,2,1,3,5 B
1,2,35, A B.Proving set equality
either x ? A ? x ? B or A ? B ? B ? A
4Sets
- Set Builder B x P(x) B1 x x n2
1, 0 ? n ? 10 A1 B1 - Venn Diagrams.
- Subset proper subset. A ? B A ? B A
? B A ? B - The empty set ? ? B
- Set may have other sets as members A ?,
a, b, a,b. Note A has 4 elements. ? ? A
and also ? ? B. a ? A.
5Sets
- A is finite if it has n elements, otherwise it is
infinite. - Power set P(A) B B ? A.
- The power set of A contains 2n elements where n
is the number of elements in A, also named the
cardinality of A. -
- Æ has 0 elements. P(?) has one element P(?)
? - A a P(A) ?, a P(?) ?, ?
6Set Operations
- Propositional calculus and set theory are both
instances of an algebraic system called a - Boolean Algebra.
- The operators in set theory are defined in terms
of the corresponding operator in propositional
calculus - As always there must be a universe U. All sets
are assumed to be subsets of U
7Set Operations
- Cartesian product A x B (a,b) a ? A ? b ?
B - Can be defined using sets only A x B a,
a,b a ? A ? b ? B - Note (a,b) ? (b,a) if a ? b.
- Cartesian product of n sets A1 x A2 x x An
(a1, a2, , an) ai ? Ai, i 1,,n - Union A ? B x x ? A ? x ? B
- Intersection A ? B x x ? A ? x ? B
- Venn diagrams, use Mathematica / Maple to build
sets.
8Set Operations
- Maple examples for propositional logics
9Set Operations
10Set Operations
11Set Operations
- Definitions
- The union of A and B, denoted A ? B, is the set
x x ? A ? x ? B - The intersection of A and B, denoted A ? B, is
the set x x ? A ? x ? B - Note If the intersection is void, A and B are
said to be disjoint. - The complement of A, denoted , is the set a
a ? A Note Alternative notation is Ac .If U is
the universe of discourse then U A
12Set Operations
- Definitions
- The difference of A and B, or the complement of B
relative to A, denoted , is the set of
elements of A that are not elements of B.Note
The (absolute) complement of A is U - A. - The symmetric difference of A and B, denoted A ?
B, is the set (A- B) ? ( B- A).
13Set Operations
U 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 A 1, 2,
3, 4, 5, B 4, 5, 6, 7, 8. Then
1, 2, 3, 4, 5, 6, 7, 8 4, 5
0, 6, 7, 8, 9, 10 0, 1, 2, 3, 9, 10 A
- B 1, 2, 3 B - A 6, 7, 8 1,
2, 3, 6, 7, 8
14Set Operations
15Set Operations
- Set identities to prove a set identity, several
methods - show that each set is a subset of the other one
(demonstrate in both directions) - use a set builder to find the correspondance with
propositional logic and demonstrate using rules
from propositional logic - use a membership table similar to a truth table,
a membership table represents the different
possibilities for an element to belong to a set
(1) or not (0).
16Set Operations
17Set Operations
- Example of proof
- sets are equal
18Set Operations
- Example of proof
- set builder
19Set Operations
- Example of proof
- membership table
20Set Operations
- Union and intersection of indexed
collectionsLet A1, A2, , An be an indexed
collection of sets.Union and intersection are
associative (because and and or are), we
have