discrete mathematics mathematical reasoning basic
play

Discrete Mathematics & Mathematical Reasoning Basic Structures: - PowerPoint PPT Presentation

Discrete Mathematics & Mathematical Reasoning Basic Structures: Sets, Functions and Relations Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today


  1. Discrete Mathematics & Mathematical Reasoning Basic Structures: Sets, Functions and Relations Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 1 / 24

  2. Some important sets B = { true , false } Boolean values N = { 0 , 1 , 2 , 3 , . . . } Natural numbers Z = { . . . , − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 , . . . } Integers Z + = { 1 , 2 , 3 , . . . } Positive integers R Real numbers R + Positive real numbers Q Rational numbers C Complex numbers ∅ Empty set Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 2 / 24

  3. Sets defined using comprehension S = { x | P ( x ) } where P ( x ) is a predicate Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 3 / 24

  4. Sets defined using comprehension S = { x | P ( x ) } where P ( x ) is a predicate Example Subsets of sets upon which an order is defined [ a , b ] = { x | a ≤ x ≤ b } closed interval [ a , b ) = { x | a ≤ x < b } { x | a < x ≤ b } ( a , b ] = ( a , b ) = { x | a < x < b } open interval Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 3 / 24

  5. Notation x ∈ S membership Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 4 / 24

  6. Notation x ∈ S membership A ∪ B union; A ∩ B intersection; A − B difference Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 4 / 24

  7. Notation x ∈ S membership A ∪ B union; A ∩ B intersection; A − B difference A ⊆ B subset; A ⊇ B superset Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 4 / 24

  8. Notation x ∈ S membership A ∪ B union; A ∩ B intersection; A − B difference A ⊆ B subset; A ⊇ B superset A = B set equality Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 4 / 24

  9. Notation x ∈ S membership A ∪ B union; A ∩ B intersection; A − B difference A ⊆ B subset; A ⊇ B superset A = B set equality also 2 A P ( A ) powerset (set of all subsets of A ); Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 4 / 24

  10. Notation x ∈ S membership A ∪ B union; A ∩ B intersection; A − B difference A ⊆ B subset; A ⊇ B superset A = B set equality also 2 A P ( A ) powerset (set of all subsets of A ); | A | cardinality Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 4 / 24

  11. Notation x ∈ S membership A ∪ B union; A ∩ B intersection; A − B difference A ⊆ B subset; A ⊇ B superset A = B set equality also 2 A P ( A ) powerset (set of all subsets of A ); | A | cardinality A × B cartesian product (tuple sets) Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 4 / 24

  12. A proper mathematical definition of set is complicated (Russell’s paradox) Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  13. A proper mathematical definition of set is complicated (Russell’s paradox) The set of cats is not a member of itself Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  14. A proper mathematical definition of set is complicated (Russell’s paradox) The set of cats is not a member of itself The set of non-cats (all things that are not cats) is a member of itself Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  15. A proper mathematical definition of set is complicated (Russell’s paradox) The set of cats is not a member of itself The set of non-cats (all things that are not cats) is a member of itself Let S be the set of all sets which are not members of themselves Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  16. A proper mathematical definition of set is complicated (Russell’s paradox) The set of cats is not a member of itself The set of non-cats (all things that are not cats) is a member of itself Let S be the set of all sets which are not members of themselves S = { x | x �∈ x } (using naive comprehension) Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  17. A proper mathematical definition of set is complicated (Russell’s paradox) The set of cats is not a member of itself The set of non-cats (all things that are not cats) is a member of itself Let S be the set of all sets which are not members of themselves S = { x | x �∈ x } (using naive comprehension) Question: is S a member of itself ( S ∈ S ) ? Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  18. A proper mathematical definition of set is complicated (Russell’s paradox) The set of cats is not a member of itself The set of non-cats (all things that are not cats) is a member of itself Let S be the set of all sets which are not members of themselves S = { x | x �∈ x } (using naive comprehension) Question: is S a member of itself ( S ∈ S ) ? S ∈ S provided that S �∈ S ; S �∈ S provided that S ∈ S Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  19. A proper mathematical definition of set is complicated (Russell’s paradox) The set of cats is not a member of itself The set of non-cats (all things that are not cats) is a member of itself Let S be the set of all sets which are not members of themselves S = { x | x �∈ x } (using naive comprehension) Question: is S a member of itself ( S ∈ S ) ? S ∈ S provided that S �∈ S ; S �∈ S provided that S ∈ S Modern formulations (such as Zermelo-Fraenkel set theory) restrict comprehension. (However, it is impossible to prove in ZF that ZF is consistent unless ZF is inconsistent.) Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 5 / 24

  20. Functions Assume A and B are non-empty sets Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 6 / 24

  21. Functions Assume A and B are non-empty sets A function f from A to B is an assignment of exactly one element of B to each element of A Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 6 / 24

  22. Functions Assume A and B are non-empty sets A function f from A to B is an assignment of exactly one element of B to each element of A f ( a ) = b if f assigns b to a Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 6 / 24

  23. Functions Assume A and B are non-empty sets A function f from A to B is an assignment of exactly one element of B to each element of A f ( a ) = b if f assigns b to a f : A → B if f is a function from A to B Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 6 / 24

  24. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

  25. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Is the identity function ι A : A → A injective? Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

  26. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Is the identity function ι A : A → A injective? YES Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

  27. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Is the identity function ι A : A → A injective? YES Is the function √· : Z + → R + injective? Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

  28. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Is the identity function ι A : A → A injective? YES Is the function √· : Z + → R + injective? YES Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

  29. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Is the identity function ι A : A → A injective? YES Is the function √· : Z + → R + injective? YES Is the squaring function · 2 : Z → Z injective? Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

  30. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Is the identity function ι A : A → A injective? YES Is the function √· : Z + → R + injective? YES Is the squaring function · 2 : Z → Z injective? NO Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

  31. One-to-one or injective functions Definition f : A → B is injective iff ∀ a , c ∈ A (if f ( a ) = f ( c ) then a = c ) Is the identity function ι A : A → A injective? YES Is the function √· : Z + → R + injective? YES Is the squaring function · 2 : Z → Z injective? NO Is the function | · | : R → R injective? Colin Stirling (Informatics) Discrete Mathematics (Chaps 2 & 9) Today 7 / 24

Recommend


More recommend