Discrete Mathematics with Applications Chapters 6-8: Sets, - - PowerPoint PPT Presentation

discrete mathematics with applications
SMART_READER_LITE
LIVE PREVIEW

Discrete Mathematics with Applications Chapters 6-8: Sets, - - PowerPoint PPT Presentation

Set Properties and Boolean Algebras Relations and Functions Discrete Mathematics with Applications Chapters 6-8: Sets, Relations, and Functions (part 2) March 25, 2019 Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics


slide-1
SLIDE 1

Set Properties and Boolean Algebras Relations and Functions

Discrete Mathematics with Applications

Chapters 6-8: Sets, Relations, and Functions (part 2) March 25, 2019

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-2
SLIDE 2

Set Properties and Boolean Algebras Relations and Functions

Some Important Subset Relations

Inclusion of Intersection: For all sets A and B, A ∩ B ⊆ A and A ∩ B ⊆ B.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-3
SLIDE 3

Set Properties and Boolean Algebras Relations and Functions

Some Important Subset Relations

Inclusion of Intersection: For all sets A and B, A ∩ B ⊆ A and A ∩ B ⊆ B. Inclusion in Union: For all sets A and B, A ⊆ A ∪ B and B ⊆ A ∪ B.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-4
SLIDE 4

Set Properties and Boolean Algebras Relations and Functions

Some Important Subset Relations

Inclusion of Intersection: For all sets A and B, A ∩ B ⊆ A and A ∩ B ⊆ B. Inclusion in Union: For all sets A and B, A ⊆ A ∪ B and B ⊆ A ∪ B. Transitivity of Set Inclusion: For all sets A, B, and C, if A ⊆ B and B ⊆ C, then A ⊆ C.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-5
SLIDE 5

Set Properties and Boolean Algebras Relations and Functions

Some Important Subset Relations

Inclusion of Intersection: For all sets A and B, A ∩ B ⊆ A and A ∩ B ⊆ B. Inclusion in Union: For all sets A and B, A ⊆ A ∪ B and B ⊆ A ∪ B. Transitivity of Set Inclusion: For all sets A, B, and C, if A ⊆ B and B ⊆ C, then A ⊆ C. Next up is a big list of set identities.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-6
SLIDE 6

Set Properties and Boolean Algebras Relations and Functions Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-7
SLIDE 7

Set Properties and Boolean Algebras Relations and Functions

Hmmm, Looks Familiar...

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-8
SLIDE 8

Set Properties and Boolean Algebras Relations and Functions

Side by Side Comparison

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-9
SLIDE 9

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-10
SLIDE 10

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-11
SLIDE 11

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical. 1 “∨” (or) corresponds with “∪” (union)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-12
SLIDE 12

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical. 1 “∨” (or) corresponds with “∪” (union) 2 “∧” (and) corresponds with “∩” (intersection)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-13
SLIDE 13

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical. 1 “∨” (or) corresponds with “∪” (union) 2 “∧” (and) corresponds with “∩” (intersection) 3 “∼” (not) corresponds with “c” (complement)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-14
SLIDE 14

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical. 1 “∨” (or) corresponds with “∪” (union) 2 “∧” (and) corresponds with “∩” (intersection) 3 “∼” (not) corresponds with “c” (complement) 4 “t” (tautology) corresponds with “U” (universal set)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-15
SLIDE 15

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical. 1 “∨” (or) corresponds with “∪” (union) 2 “∧” (and) corresponds with “∩” (intersection) 3 “∼” (not) corresponds with “c” (complement) 4 “t” (tautology) corresponds with “U” (universal set) 5 “c” (contradiction) corresponds with “∅” (empty set)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-16
SLIDE 16

Set Properties and Boolean Algebras Relations and Functions

The algebraic structure of the set of statement forms with the logical connectives ∨, ∧, and ∼ and the algebraic structure of the set of subsets of a universal set with operations ∪, ∩, and

c appear to be, in a certain sense, identical. 1 “∨” (or) corresponds with “∪” (union) 2 “∧” (and) corresponds with “∩” (intersection) 3 “∼” (not) corresponds with “c” (complement) 4 “t” (tautology) corresponds with “U” (universal set) 5 “c” (contradiction) corresponds with “∅” (empty set)

This is not a coincidence! Both are special cases of the same general structure, known as a Boolean algebra.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-17
SLIDE 17

Set Properties and Boolean Algebras Relations and Functions Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-18
SLIDE 18

Set Properties and Boolean Algebras Relations and Functions Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-19
SLIDE 19

Set Properties and Boolean Algebras Relations and Functions

The proofs of these Boolean algebra properties are left to you as an exercise.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-20
SLIDE 20

Set Properties and Boolean Algebras Relations and Functions

The proofs of these Boolean algebra properties are left to you as an exercise. Do observe that each of the paired statements can be

  • btained from the other by interchanging all of the +’s and ·’s

and interchanging 1 and 0. Such interchanges transform any Boolean identity into its dual identity.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-21
SLIDE 21

Set Properties and Boolean Algebras Relations and Functions

The proofs of these Boolean algebra properties are left to you as an exercise. Do observe that each of the paired statements can be

  • btained from the other by interchanging all of the +’s and ·’s

and interchanging 1 and 0. Such interchanges transform any Boolean identity into its dual identity. It can be proved that the dual of any Boolean identity is also an identity. This fact is often called the duality principle for a Boolean algebra.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-22
SLIDE 22

Set Properties and Boolean Algebras Relations and Functions

Example

Theorem For all sets A, B, and C, (A ∪ B) − C = (A − C) ∪ (B − C).

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-23
SLIDE 23

Set Properties and Boolean Algebras Relations and Functions

Example

Theorem For all sets A, B, and C, (A ∪ B) − C = (A − C) ∪ (B − C). Prove this theorem

1 by showing they’re subsets of each other. 2 using Boolean algebra identities.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-24
SLIDE 24

Set Properties and Boolean Algebras Relations and Functions

First Proof. Let x ∈ (A ∪ B) − C be arbitrary. Then x ∈ A ∪ B and x ∈ C. Since x ∈ A ∪ B, we have that x ∈ A or x ∈ B. If x ∈ A, then x ∈ A − C since x ∈ C. Hence x ∈ (A − C) ∪ (B − C). The case of x ∈ B proceeds similarly. It follows that x must always lie in (A − C) ∪ (B − C) regardless. Yet x was arbitrary, and so (A ∪ B) − C ⊆ (A − C) ∪ (B − C). Conversely, let y ∈ (A − C) ∪ (B − C) be arbitrary. Then y ∈ A − C or y ∈ B − C. If y ∈ A − C, then y ∈ A and y ∈ C. Since y ∈ A, we certainly have that y ∈ A ∪ B, and so y ∈ (A ∪ B) − C. The case of y ∈ B − C proceeds similarly. It follows that y must always lie in (A ∪ B) − C. Yet y was arbitrary, and so (A − C) ∪ (B − C) ⊆ (A ∪ B) − C. Since (A ∪ B) − C and (A − C) ∪ (B − C) are subsets of each other, these two sets are equal.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-25
SLIDE 25

Set Properties and Boolean Algebras Relations and Functions

Second Proof. Let A, B, and C be arbitrary sets. Then (A ∪ B) − C = (A ∪ B) ∩ C c (set difference law) = (A ∩ C c) ∪ (B ∩ C c) (distributivity) = (A − C) ∪ (B − C) (set difference law again)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-26
SLIDE 26

Set Properties and Boolean Algebras Relations and Functions

Second Proof. Let A, B, and C be arbitrary sets. Then (A ∪ B) − C = (A ∪ B) ∩ C c (set difference law) = (A ∩ C c) ∪ (B ∩ C c) (distributivity) = (A − C) ∪ (B − C) (set difference law again) Moral of the story: set identities are easy to prove if you remember the properties of Boolean algebras!

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-27
SLIDE 27

Set Properties and Boolean Algebras Relations and Functions

Relations

Let A and B be sets. A subset relation R from A to B is a subset of A × B.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-28
SLIDE 28

Set Properties and Boolean Algebras Relations and Functions

Relations

Let A and B be sets. A subset relation R from A to B is a subset of A × B. Given an ordered pair (x, y) ∈ A × B, we say that x is related to y by R, written xRy, if, and only if, (x, y) ∈ R.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-29
SLIDE 29

Set Properties and Boolean Algebras Relations and Functions

Relations

Let A and B be sets. A subset relation R from A to B is a subset of A × B. Given an ordered pair (x, y) ∈ A × B, we say that x is related to y by R, written xRy, if, and only if, (x, y) ∈ R. A is called the domain of R and B is called the codomain of

  • R. If A = B, then we say that R is a relation on A.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-30
SLIDE 30

Set Properties and Boolean Algebras Relations and Functions

Relations

Let A and B be sets. A subset relation R from A to B is a subset of A × B. Given an ordered pair (x, y) ∈ A × B, we say that x is related to y by R, written xRy, if, and only if, (x, y) ∈ R. A is called the domain of R and B is called the codomain of

  • R. If A = B, then we say that R is a relation on A.

An n-ary relation on A1 × A2 × · · · × An is a subset of A1 × A2 × · · · × An.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-31
SLIDE 31

Set Properties and Boolean Algebras Relations and Functions

Examples

R = {(x, y) ∈ Z2 | x divides y} is a relation from Z to Z. For instance 1R2, 3R3, and −7R21, but 4R2.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-32
SLIDE 32

Set Properties and Boolean Algebras Relations and Functions

Examples

R = {(x, y) ∈ Z2 | x divides y} is a relation from Z to Z. For instance 1R2, 3R3, and −7R21, but 4R2. Let A = {1, 2, 3} and B = {1, 3, 5}. Let S = {(x, y) ∈ A × B | x < y}. This is a relation with the following graph.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-33
SLIDE 33

Set Properties and Boolean Algebras Relations and Functions

Functions

A function f : A → B is a relation with domain A and codomain B in which for every x ∈ A, there is a unique y ∈ B such that (x, y) ∈ f . We typically express this by saying that f (x) = y.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-34
SLIDE 34

Set Properties and Boolean Algebras Relations and Functions

One-to-One and Onto Functions

Let f : A → B be a function from A to B.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-35
SLIDE 35

Set Properties and Boolean Algebras Relations and Functions

One-to-One and Onto Functions

Let f : A → B be a function from A to B. f is called one-to-one (or injective) if no two elements in the domain are mapped to the same element in the codomain. In

  • ther words, f is one-to-one if, and only if, f (x1) = f (x2)

whenever x1 = x2.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-36
SLIDE 36

Set Properties and Boolean Algebras Relations and Functions

One-to-One and Onto Functions

Let f : A → B be a function from A to B. f is called one-to-one (or injective) if no two elements in the domain are mapped to the same element in the codomain. In

  • ther words, f is one-to-one if, and only if, f (x1) = f (x2)

whenever x1 = x2. Example: f : R → R defined by f (x) = 2x is one-to-one, but g : R → R defined by g(x) = x2 is not.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-37
SLIDE 37

Set Properties and Boolean Algebras Relations and Functions

One-to-One and Onto Functions

Let f : A → B be a function from A to B. f is called one-to-one (or injective) if no two elements in the domain are mapped to the same element in the codomain. In

  • ther words, f is one-to-one if, and only if, f (x1) = f (x2)

whenever x1 = x2. Example: f : R → R defined by f (x) = 2x is one-to-one, but g : R → R defined by g(x) = x2 is not. f is called onto (or surjective) if every element in B is the image of some element in A. In other words, f is onto if and

  • nly if for every y ∈ B, there is an x ∈ A such that f (x) = y.

(The set of all such y is called the range or image of f . In

  • ther words, f is onto if its range is the entire codomain.)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-38
SLIDE 38

Set Properties and Boolean Algebras Relations and Functions

Some Visuals

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-39
SLIDE 39

Set Properties and Boolean Algebras Relations and Functions

One-to-One and Onto Functions

A function f : A → B is called bijective (or a one-to-one correspondence) if f is both one-to-one and onto.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-40
SLIDE 40

Set Properties and Boolean Algebras Relations and Functions

One-to-One and Onto Functions

A function f : A → B is called bijective (or a one-to-one correspondence) if f is both one-to-one and onto. Intuitively, f is a bijection if every element in A uniquely corresponds to some element in B.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-41
SLIDE 41

Set Properties and Boolean Algebras Relations and Functions

Theorem A function f : A → B is a bijection if and only if there is a function g : B → A such that f (g(y)) = y for all y ∈ B and g(f (x)) = x for all x ∈ A.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-42
SLIDE 42

Set Properties and Boolean Algebras Relations and Functions

Theorem A function f : A → B is a bijection if and only if there is a function g : B → A such that f (g(y)) = y for all y ∈ B and g(f (x)) = x for all x ∈ A. Proof omitted.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-43
SLIDE 43

Set Properties and Boolean Algebras Relations and Functions

Theorem A function f : A → B is a bijection if and only if there is a function g : B → A such that f (g(y)) = y for all y ∈ B and g(f (x)) = x for all x ∈ A. Proof omitted. This function g is called the inverse of f and is denoted by f −1. Observe that f −1 : B → A is function g in which g(y) is the unique x ∈ A such that f (x) = y.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-44
SLIDE 44

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-45
SLIDE 45

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

1 f : R → R given by f (x) = 4x − 1

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-46
SLIDE 46

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

1 f : R → R given by f (x) = 4x − 1 2 g : Z → Z given by f (n) = 4n − 1

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-47
SLIDE 47

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

1 f : R → R given by f (x) = 4x − 1 2 g : Z → Z given by f (n) = 4n − 1 3 If T is the set of all finite strings of x’s and y’s, take

h : T → T to be the function in which for all strings s ∈ T, g(s) is s written in reverse.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-48
SLIDE 48

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

1 f : R → R given by f (x) = 4x − 1 2 g : Z → Z given by f (n) = 4n − 1 3 If T is the set of all finite strings of x’s and y’s, take

h : T → T to be the function in which for all strings s ∈ T, g(s) is s written in reverse.

Solutions:

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-49
SLIDE 49

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

1 f : R → R given by f (x) = 4x − 1 2 g : Z → Z given by f (n) = 4n − 1 3 If T is the set of all finite strings of x’s and y’s, take

h : T → T to be the function in which for all strings s ∈ T, g(s) is s written in reverse.

Solutions:

1 f is a bijection. It’s inverse is given by f −1(x) = 1

4(x + 1).

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-50
SLIDE 50

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

1 f : R → R given by f (x) = 4x − 1 2 g : Z → Z given by f (n) = 4n − 1 3 If T is the set of all finite strings of x’s and y’s, take

h : T → T to be the function in which for all strings s ∈ T, g(s) is s written in reverse.

Solutions:

1 f is a bijection. It’s inverse is given by f −1(x) = 1

4(x + 1).

2 g is not a bijection because it is not onto. For instance, 0 is

not in the range of g. (As a matter of fact, the range of g only contains the integers of the form 4m + 3 due to the Quotient-Remainder Theorem.)

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-51
SLIDE 51

Set Properties and Boolean Algebras Relations and Functions

Exercises

Which of the following functions are bijections? If a function is a bijection, what is it’s inverse?

1 f : R → R given by f (x) = 4x − 1 2 g : Z → Z given by f (n) = 4n − 1 3 If T is the set of all finite strings of x’s and y’s, take

h : T → T to be the function in which for all strings s ∈ T, g(s) is s written in reverse.

Solutions:

1 f is a bijection. It’s inverse is given by f −1(x) = 1

4(x + 1).

2 g is not a bijection because it is not onto. For instance, 0 is

not in the range of g. (As a matter of fact, the range of g only contains the integers of the form 4m + 3 due to the Quotient-Remainder Theorem.)

3 h is a bijection. In this case h−1 is just h itself.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-52
SLIDE 52

Set Properties and Boolean Algebras Relations and Functions

Some Important Types of Relations

Let R be a relation on A.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-53
SLIDE 53

Set Properties and Boolean Algebras Relations and Functions

Some Important Types of Relations

Let R be a relation on A. R is called reflexive if xRx for all x ∈ A.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-54
SLIDE 54

Set Properties and Boolean Algebras Relations and Functions

Some Important Types of Relations

Let R be a relation on A. R is called reflexive if xRx for all x ∈ A. R is called symmetric if for all x, y ∈ A, if xRy, then yRx.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-55
SLIDE 55

Set Properties and Boolean Algebras Relations and Functions

Some Important Types of Relations

Let R be a relation on A. R is called reflexive if xRx for all x ∈ A. R is called symmetric if for all x, y ∈ A, if xRy, then yRx. R is called antisymmetric if for all x, y ∈ A, if xRy and yRx, then x = y.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-56
SLIDE 56

Set Properties and Boolean Algebras Relations and Functions

Some Important Types of Relations

Let R be a relation on A. R is called reflexive if xRx for all x ∈ A. R is called symmetric if for all x, y ∈ A, if xRy, then yRx. R is called antisymmetric if for all x, y ∈ A, if xRy and yRx, then x = y. R is called transitive if for all x, y, z ∈ A, if xRy and yRz, then xRz.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-57
SLIDE 57

Set Properties and Boolean Algebras Relations and Functions

A relation that is reflexive, symmetric, and transitive is called an equivalence relation. Usually, equivalence relations are expressed with ∼ instead of R.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-58
SLIDE 58

Set Properties and Boolean Algebras Relations and Functions

A relation that is reflexive, symmetric, and transitive is called an equivalence relation. Usually, equivalence relations are expressed with ∼ instead of R. Examples: equality (=), congruence on the set of polygons, etc.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-59
SLIDE 59

Set Properties and Boolean Algebras Relations and Functions

A relation that is reflexive, symmetric, and transitive is called an equivalence relation. Usually, equivalence relations are expressed with ∼ instead of R. Examples: equality (=), congruence on the set of polygons, etc. A relation that is reflexive, antisymmetric, and transitive is called a partial order.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-60
SLIDE 60

Set Properties and Boolean Algebras Relations and Functions

A relation that is reflexive, symmetric, and transitive is called an equivalence relation. Usually, equivalence relations are expressed with ∼ instead of R. Examples: equality (=), congruence on the set of polygons, etc. A relation that is reflexive, antisymmetric, and transitive is called a partial order. Examples: the subset relation (⊆), the divisibility relation on the positive integers, etc.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-61
SLIDE 61

Set Properties and Boolean Algebras Relations and Functions

Equivalence Classes

Suppose A is a set and ∼ is an equivalence relation on A. For each a ∈ A, the equivalence class of a, denoted [a], is the set of all elements in A that are related to a by ∼ . In symbols, [a] = {x ∈ A | x ∼ a}.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-62
SLIDE 62

Set Properties and Boolean Algebras Relations and Functions

Equivalence Classes

Suppose A is a set and ∼ is an equivalence relation on A. For each a ∈ A, the equivalence class of a, denoted [a], is the set of all elements in A that are related to a by ∼ . In symbols, [a] = {x ∈ A | x ∼ a}. Theorem If ∼ is an equivalence relation on a set A, then {[a] | a ∈ A} is a partition of A and is called A modulo ∼, denoted A\∼ . Furthermore, if F is a partition of A, then there is a unique equivalence relation ∼ on A such that F = A\∼ . Proof omitted.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-63
SLIDE 63

Set Properties and Boolean Algebras Relations and Functions

Example: Modular Arithmetic

Let n > 1 be an integer. We say that a ≡ b (mod n) (read a congruent (or equivalent) to b modulo n) if n | (a − b).

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-64
SLIDE 64

Set Properties and Boolean Algebras Relations and Functions

Example: Modular Arithmetic

Let n > 1 be an integer. We say that a ≡ b (mod n) (read a congruent (or equivalent) to b modulo n) if n | (a − b). It is easy to verify that congruence mod n is an equivalence relation on Z.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-65
SLIDE 65

Set Properties and Boolean Algebras Relations and Functions

Example: Modular Arithmetic

Let n > 1 be an integer. We say that a ≡ b (mod n) (read a congruent (or equivalent) to b modulo n) if n | (a − b). It is easy to verify that congruence mod n is an equivalence relation on Z. Given an integer n, congruence mod n has n different equivalence classes, namely [0], [1], . . . , [n − 1], each corresponding to the possible remainders one can get when dividing by n.

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-66
SLIDE 66

Set Properties and Boolean Algebras Relations and Functions

Example: Modular Arithmetic

Let n > 1 be an integer. We say that a ≡ b (mod n) (read a congruent (or equivalent) to b modulo n) if n | (a − b). It is easy to verify that congruence mod n is an equivalence relation on Z. Given an integer n, congruence mod n has n different equivalence classes, namely [0], [1], . . . , [n − 1], each corresponding to the possible remainders one can get when dividing by n. For instance, for congruence mod 3, we have

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-67
SLIDE 67

Set Properties and Boolean Algebras Relations and Functions

Example: Modular Arithmetic

Let n > 1 be an integer. We say that a ≡ b (mod n) (read a congruent (or equivalent) to b modulo n) if n | (a − b). It is easy to verify that congruence mod n is an equivalence relation on Z. Given an integer n, congruence mod n has n different equivalence classes, namely [0], [1], . . . , [n − 1], each corresponding to the possible remainders one can get when dividing by n. For instance, for congruence mod 3, we have

1 [0] = {. . . , −9, −6, −3, 0, 3, 6, 9, . . .} = {3q | q ∈ Z}

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-68
SLIDE 68

Set Properties and Boolean Algebras Relations and Functions

Example: Modular Arithmetic

Let n > 1 be an integer. We say that a ≡ b (mod n) (read a congruent (or equivalent) to b modulo n) if n | (a − b). It is easy to verify that congruence mod n is an equivalence relation on Z. Given an integer n, congruence mod n has n different equivalence classes, namely [0], [1], . . . , [n − 1], each corresponding to the possible remainders one can get when dividing by n. For instance, for congruence mod 3, we have

1 [0] = {. . . , −9, −6, −3, 0, 3, 6, 9, . . .} = {3q | q ∈ Z} 2 [1] = {. . . , −8, −5, −2, 1, 4, 7, 10, . . .} = {3q + 1 | q ∈ Z}

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications

slide-69
SLIDE 69

Set Properties and Boolean Algebras Relations and Functions

Example: Modular Arithmetic

Let n > 1 be an integer. We say that a ≡ b (mod n) (read a congruent (or equivalent) to b modulo n) if n | (a − b). It is easy to verify that congruence mod n is an equivalence relation on Z. Given an integer n, congruence mod n has n different equivalence classes, namely [0], [1], . . . , [n − 1], each corresponding to the possible remainders one can get when dividing by n. For instance, for congruence mod 3, we have

1 [0] = {. . . , −9, −6, −3, 0, 3, 6, 9, . . .} = {3q | q ∈ Z} 2 [1] = {. . . , −8, −5, −2, 1, 4, 7, 10, . . .} = {3q + 1 | q ∈ Z} 3 [2] = {−7, −4, −1, 2, 5, 8, 11, . . .} = {3q + 2 | q ∈ Z}

Chapters 6-8: Sets, Relations, and Functions (part 2) Discrete Mathematics with Applications