BK V2 Part1
BK V2 Part1
Discussion: For what could we need sets? How would you define sets?
Sets are more general than (for example) numbers!
1 14
2.1. Introduction to Sets
Discussion: For what could we need sets? How would you define sets?
Sets are more general than (for example) numbers!
Definition: Set
A set is a collection of (different) things, called elements.
If M is a set and x is an element of M, this will be written in shorthand
as x P M. If x is not an element of M, this will be denoted as x R M.
1 14
2.1. Introduction to Sets
Discussion: For what could we need sets? How would you define sets?
Sets are more general than (for example) numbers!
Definition: Set
A set is a collection of (different) things, called elements.
If M is a set and x is an element of M, this will be written in shorthand
as x P M. If x is not an element of M, this will be denoted as x R M.
Discussion: For what could we need sets? How would you define sets?
Sets are more general than (for example) numbers!
Definition: Set
A set is a collection of (different) things, called elements.
If M is a set and x is an element of M, this will be written in shorthand
as x P M. If x is not an element of M, this will be denoted as x R M.
Discussion: For what could we need sets? How would you define sets?
Sets are more general than (for example) numbers!
Set - Properties
‚ The elements of a set have no order
‚ Dublicates of elements will be not recognised
1 14
2.1. Introduction to Sets
Discussion: For what could we need sets? How would you define sets?
Sets are more general than (for example) numbers!
Set - Properties
‚ The elements of a set have no order
‚ Dublicates of elements will be not recognised
‚ A Set M’ can be an element of another Set M
! )
A “ tGreen, Gray , Pink , Yellow , Red u , tPink , Yellow u
1 14
2.1. Introduction to Sets
2 14
2.1. Introduction to Sets
2 14
2.1. Introduction to Sets
2 14
2.1. Introduction to Sets
2 14
2.1. Introduction to Sets
2 14
2.1. Introduction to Sets
2 14
2.2. Subsets & Proper Subsets
2.2. Subsets & Proper Subsets
3 14
2.2. Subsets & Proper Subsets
Definition: Subset
A is a subset of B, if for all x P A also x P B is valid. (Notation: A Ă B)
3 14
2.2. Subsets & Proper Subsets
Definition: Subset
A is a subset of B, if for all x P A also x P B is valid. (Notation: A Ă B)
3 14
2.2. Subsets & Proper Subsets
Some authors make the following distinction between a subset and a proper subset: If A
is a subset of B and they are NOT equal, then A is called a proper subset of B (notation:
A Ă B). If A is a subset of B and they are equal, then A is just called „subset of B“ only
(notation: A Ď B).
4 14
2.2. Subsets & Proper Subsets
Some authors make the following distinction between a subset and a proper subset: If A
is a subset of B and they are NOT equal, then A is called a proper subset of B (notation:
A Ă B). If A is a subset of B and they are equal, then A is just called „subset of B“ only
(notation: A Ď B).
Examples:
‚ The set of all bees is a proper subset of the set of all insects
4 14
2.2. Subsets & Proper Subsets
Some authors make the following distinction between a subset and a proper subset: If A
is a subset of B and they are NOT equal, then A is called a proper subset of B (notation:
A Ă B). If A is a subset of B and they are equal, then A is just called „subset of B“ only
(notation: A Ď B).
Examples:
‚ The set of all bees is a proper subset of the set of all insects
‚ t1, 3u Ă t1, 2, 3, 4u
4 14
2.2. Subsets & Proper Subsets
Some authors make the following distinction between a subset and a proper subset: If A
is a subset of B and they are NOT equal, then A is called a proper subset of B (notation:
A Ă B). If A is a subset of B and they are equal, then A is just called „subset of B“ only
(notation: A Ď B).
Examples:
‚ The set of all bees is a proper subset of the set of all insects
‚ t1, 3u Ă t1, 2, 3, 4u
‚ t1, 2, 3, 4u Ď t1, 2, 3, 4u
4 14
2.2. Subsets & Proper Subsets
Some authors make the following distinction between a subset and a proper subset: If A
is a subset of B and they are NOT equal, then A is called a proper subset of B (notation:
A Ă B). If A is a subset of B and they are equal, then A is just called „subset of B“ only
(notation: A Ď B).
Examples:
‚ The set of all bees is a proper subset of the set of all insects
‚ t1, 3u Ă t1, 2, 3, 4u
‚ t1, 2, 3, 4u Ď t1, 2, 3, 4u, which is here the same as t1, 2, 3, 4u “ t1, 2, 3, 4u
4 14
2.2. Subsets & Proper Subsets
Some authors make the following distinction between a subset and a proper subset: If A
is a subset of B and they are NOT equal, then A is called a proper subset of B (notation:
A Ă B). If A is a subset of B and they are equal, then A is just called „subset of B“ only
(notation: A Ď B).
Examples:
‚ The set of all bees is a proper subset of the set of all insects
‚ t1, 3u Ă t1, 2, 3, 4u
‚ t1, 2, 3, 4u Ď t1, 2, 3, 4u, which is here the same as t1, 2, 3, 4u “ t1, 2, 3, 4u
but in general A Ď B includes A “ B as well as A ‰ B if A and B are not specified in
detail, because A could be equal to B but A could be also a proper set of B
4 14
2.3. Set Operations
2.3. Set Operations
a) Union
Definition: Union
The union A Y B is the set of all elements that are elements of
A or B or both of them:
A Y B B tx | x P A or x P B u
Union A Y B
5 14
2.3. Set Operations
a) Union
Definition: Union
The union A Y B is the set of all elements that are elements of
A or B or both of them:
A Y B B tx | x P A or x P B u
Union A Y B
Examples:
‚ t1, 2, 3u Y t3, 4, 5u “ t1, 2, 3, 4, 5u
‚ QYI“R
5 14
2.3. Set Operations
b) Intersection
Definition: Intersection
The intersection A X B is the set of all elements that are
elements of A as well as of B:
A X B B tx | x P A and x P B u
Intersection A X B
6 14
2.3. Set Operations
b) Intersection
Definition: Intersection
The intersection A X B is the set of all elements that are
elements of A as well as of B:
A X B B tx | x P A and x P B u
Intersection A X B
Examples:
‚ t1, 2, 3u X t3, 4, 5u “ t3u
‚ RXQ“Q if and only if QĂR
6 14
2.3. Set Operations
c) Set Difference
A zB B tx | x P A and x R B u
Set Difference A zB
7 14
2.3. Set Operations
c) Set Difference
A zB B tx | x P A and x R B u
Set Difference A zB
Examples:
‚ t1, 2, 3uzt3, 4, 5u “ t1, 2u
‚ trains z long-distance trains “ regional trains
7 14
2.3. Set Operations
d) Complement
Definition: Complement
If B is a subset of A then B C “ A zB is called the complement
of B:
B C B tx | B Ď A and x P A zB u A is the complement of B
8 14
2.3. Set Operations
d) Complement
Definition: Complement
If B is a subset of A then B C “ A zB is called the complement
of B:
B C B tx | B Ď A and x P A zB u A is the complement of B
Examples:
‚ pp´8, 8q zr´1, 1sqC “ p1, 1q
‚ pStudents in the lecturehallqC “ lecturer
8 14
2.3. Set Operations
e) Symmetric Difference
A ∆B B tx | x P A zB Y B zA u Symmetric Difference
A ∆B
9 14
2.3. Set Operations
e) Symmetric Difference
A ∆B B tx | x P A zB Y B zA u Symmetric Difference
A ∆B
Examples:
‚ t1, 2, 3u∆t3, 4, 5u “ t1, 2, 4, 5u
‚ A ∆B “ H if and only if A “ B
9 14
2.3. Set Operations
f) Cartesian Product
A ˆ B “ tpa , b q | a P A and b P B u
10 14
2.3. Set Operations
f) Cartesian Product
A ˆ B “ tpa , b q | a P A and b P B u
Examples:
‚ t1, . . . , 10, J , Q , K , A u ˆ t♡, ♢, ♣, ♠u
“ tp♡, 1q, . . . , p♡, A q, p♢, 1q, . . . , p♢, A q, p♣, 1q, . . . , p♣, A q, p♠, 1q, . . . , p♠, A qu
10 14
2.3. Set Operations
f) Cartesian Product
A ˆ B “ tpa , b q | a P A and b P B u
Examples:
‚ t1, . . . , 10, J , Q , K , A u ˆ t♡, ♢, ♣, ♠u
“ tp♡, 1q, . . . , p♡, A q, p♢, 1q, . . . , p♢, A q, p♣, 1q, . . . , p♣, A q, p♠, 1q, . . . , p♠, A qu
‚ t1, 3, 5 . . . , 35u ˆ tredu Y t2, 4, 6 . . . , 36u ˆ tblacku
“ tpred, 1q, pblack, 2q, pred, 3q, . . . , pblack, 34q, pred, 35q, pblack, 36qu
10 14
2.3. Set Operations
g) Power Set
11 14
2.3. Set Operations
g) Power Set
Examples:
‚ P ptx , y , z uq “ ttx , y , z u, tx , y u, ty , z u, tx , z u, x , y , z , Hu
‚ P ptbanana, chocolate, lemon, strawberryuq
“ all possible ice-combinations without dublication
11 14
2.4. Mapping & Functions
2.4. Mapping & Functions
12 14
2.4. Mapping & Functions
12 14
2.4. Mapping & Functions
Domain Range
12 14
2.4. Mapping & Functions
12 14
2.4. Mapping & Functions
The image of the worm color A “ tPinku are the apple colors f pA q “ tRed, Greenu.
The inverse image of the apple color B “ tRedu are the worm colors f ´1 pB q “ tPink,Yellowu
12 14
2.4. Mapping & Functions
13 14
*2.5. Cardinality
*2.5. Cardinality
14 / 14
*2.5. Cardinality
The concept of cardinality becomes interesting, when the investigated set is an infinite
set! It is possible to show, that:
reference: https://web.uvic.ca/~gmacgill/LFNotes/Cardinality.pdf
14 / 14
*2.5. Cardinality
The concept of cardinality becomes interesting, when the investigated set is an infinite
set! It is possible to show, that:
‚ the set of even natural numbers has the same cardinality as the set of all natural numbers
reference: https://web.uvic.ca/~gmacgill/LFNotes/Cardinality.pdf
14 / 14
*2.5. Cardinality
The concept of cardinality becomes interesting, when the investigated set is an infinite
set! It is possible to show, that:
‚ the set of even natural numbers has the same cardinality as the set of all natural numbers
‚ the set of natural numbers has the same cardinality as the set of integers and the same
cardinality as the set of fractional numbers
reference: https://web.uvic.ca/~gmacgill/LFNotes/Cardinality.pdf
14 / 14
*2.5. Cardinality
The concept of cardinality becomes interesting, when the investigated set is an infinite
set! It is possible to show, that:
‚ the set of even natural numbers has the same cardinality as the set of all natural numbers
‚ the set of natural numbers has the same cardinality as the set of integers and the same
cardinality as the set of fractional numbers
‚ the set of real numbers has the same cardinality than the open intervall [0,1], but both
have an higher cardinality than natural numbers, which mean, that the infinite set of real
numbers between 0 and 1 has more elements than the set of all natural numbers!
reference: https://web.uvic.ca/~gmacgill/LFNotes/Cardinality.pdf
14 / 14
*2.5. Cardinality
Short written:
‚ |N| “ |2N|
‚ |N| “ |Z| “ |Q|
‚ |R| “ |r0, 1s|, but |R| ą |N| and |r0, 1s| ą |N|
reference: https://web.uvic.ca/~gmacgill/LFNotes/Cardinality.pdf
14 / 14
*2.5. Cardinality
Definition Countable
The set A is called
‚ countable, if |A | “ |N|
‚ countable at most if |A | ď |N|
‚ uncountable if |A | ą |N|
reference: https://web.uvic.ca/~gmacgill/LFNotes/Cardinality.pdf
14 / 14