Foundations of Discrete Mathematics

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

Relations Relations on a Set. Properties of Relations.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Chapter 7 Relations : the second time around
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
Sets 1.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
Partially Ordered Sets (POSets)
Relations Chapter 9.
This section will discuss the symbolism and concepts of set theory
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
CompSci 102 Discrete Math for Computer Science
Copyright © Cengage Learning. All rights reserved.
Sets, Relations, and Lattices
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Chapter 2 With Question/Answer Animations. Section 2.1.
(CSC 102) Lecture 13 Discrete Structures. Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive.
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
1 Partial Orderings Epp, section Introduction An equivalence relation is a relation that is reflexive, symmetric, and transitive A partial ordering.
CPCS 222 Discrete Structures I
Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation is a relation on.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
The Relation Induced by a Partition
Relations and Their Properties
Chapter 5 Relations and Operations
Chapter 2 Sets and Functions.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
The Language of Sets If S is a set, then
1.1: Objectives Properties of Real Numbers
Unit-III Algebraic Structures
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
Equivalence Relations
Relations Chapter 9.
Set, Combinatorics, Probability & Number Theory
Relations and Digraphs
Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Chapter 2 Sets and Functions.
CS100: Discrete structures
Set Theory A B C.
Foundations of Discrete Mathematics
2.1 Sets Dr. Halimah Alshehri.
CHAPTER 1 - Sets and Intervals
Discrete Math (2) Haiming Chen Associate Professor, PhD
Applied Discrete Mathematics Week 6: Relations/Digraphs
CHAPTER 1 - Sets and Intervals
Copyright © Cengage Learning. All rights reserved.
Foundations of Discrete Mathematics
Presentation transcript:

Foundations of Discrete Mathematics Chapter 2 By Dr. Dalia M. Gil, Ph.D.

Sets Set: A collection of things called elements or members. The set of natural numbers N consists of the numbers 1, 2,... Their members are all positive.

Sets The set of integers Z consists of the natural numbers (1, 2, …), their negatives (…, -3, -2, …, 2, 3, …, and 0. Zero (0) is an integer, but not a natural number.

Ways to Describe Sets {egg1, egg2} {x} N = {1, 2, 3, …} Z = {…, -3, -2, -1, 0, 1, 2, 3, …}  This set has two elements  This set has one element  The set of natural numbers  The set of integer numbers

Describing a Set with a Builder Notation { x | x has certain properties } such that We read: “The set of x such that x has certain properties.”

Describing a Set with a Builder Notation { some expression | the expression has certain properties } Example: the set of odd natural numbers. {n | n is an odd integer, n > 0} such that

Describing a Set with a Builder Notation Example: the set of odd natural numbers. {2k – 1 | k = 1, 2, 3, …} or {2k – 1 | k  N} K belongs to N

Describing a Set with a Builder Notation The symbol  denoting set membership m  Z  m is an integer  negates the meaning of  0  N

Describing a Set with a Builder Notation The set of rational numbers Q Q = {m/n| m, n  Z, n ≠ 0} The members of Q are fractions, which are ratios of integers with nonzero denominators. Examples ¾, -2/17, 5(=5/1)

Describing a Set with a Builder Notation The set of irrational numbers. The members of irrational set cannot be written in the form m/n with m and n both integers. The decimal expansions of the irrational numbers neither terminate or repeat. Examples √2, 3√17, e, , ln 5

Describing a Set with a Builder Notation The set of complex numbers C. The members of complex set have the form a + bi where a and b are real numbers, i2 = -1 C = {a + bi | a, b  R, i2 = -1}

Describing a Set with a Builder Notation A set can be an element of another set {{a, b}, c}  is a set with two elements, {a, b} and c.

Equality of Set Sets A and B are equal, and we write A = B, if and only if A and B contain the same elements or neither set contains any element. {1, 2, 1} = {1, 2} = {2, 1} {1/2, 2/4, -3/-6}, /2} = {1/2} {t|t = r – s, r, s {0, 1, 2}} = {-2, -1, 0, 1, 2}

The empty set is a set that contains no elements. P = {n  N | 5n + 2} S = {n  N | n2 + 1 = 0} The set small of people less than 1 millimeter. These sets are all equal since none of them contains any elements.

A set A is a subset of a set B Subsets A set A is a subset of a set B (A  B), if and only if every element of A is an element of B. If A  B but A ≠ B, then A is called a proper subset of B and we write A  B ≠

Subsets A  B  A is contained in B  A is a subset of B B  A  B is superset of A

Examples of Subsets {a, b}  {a, b, c} {a, b}  {a, b, c} {a,b} is a subset of {a,b,c} {a, b}  {a, b, c} ≠ {a,b} is a proper subset of {a,b,c}

Examples of Subsets {a, b}  {a, b, {a, b}} {a, b}  {a, b, {a, b}} {a,b} is a subset of {a,b,{a,b}} {a,b} is an element of {a,b,{a,b}} {a, b}  {a, b, {a, b}} {a,b} belongs to {a,b,{a,b}}

Examples of Subsets N  Z  Q  R  C ≠ ≠ ≠ ≠ The set of natural numbers is a proper subset of the set of integer numbers. The set of integer numbers is a proper subset of the set of rational numbers.

Examples of Subsets N  Z  Q  R  C ≠ ≠ ≠ ≠ The set of rational numbers is a proper subset of the set of real numbers. The set of real numbers is a proper subset of the set of complex numbers.

For any set A, A  A and   A Subsets. Proposition 1 For any set A, A  A and   A Proof If a  A, then a  A, so A  A If   A is false, then there must exist some x   such that x  A. This an absurdity since there is no x  

If A and B are sets, then A = B if and only if A  B and B  A Subsets. Proposition 2 If A and B are sets, then A = B if and only if A  B and B  A Proof () If A = B, then A is a subset of B and B is a subset of A. () If A is a subset of B and B is a subset of A, then A = B.

Subsets. Proposition 2 a  b  membership a  b, a is an element of the set b. a  b  subset a  b, a is a set each of whose elements is also in the set b.

The Power Set The power set of a set A, denoted P(A), is the set of all subsets of A: P(A) = {B | B  A}

Examples of The Power Set If A = {a}, then P(A) = {, {a}} If A = {a, b}, then P(A) = {, {a}, {b}, {a, b}} P ({a, b, c}) = {, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}

Union and Intersection The union of sets A and B, A  B, is the set of elements in A or in B (or in both). The intersection of sets A and B, A  B, is the set of elements that belongs to both A and B.

Examples: Union and Intersection If A = {a, b, c} and b = {a, x, y, b} A  B = { a, b, c, x, y} A  B = {a, b} A  {} = {a, b, c, } B  {} = 

Examples: Union and Intersection For any set A, A   = A and A   = 

Union and Intersection The union and intersection of sets are associative operations. (A1  A2)  A3 = A1  (A2  A3) For any three sets A1, A2, A3 , the expression A1  A2  A3 is unambiguous.

Union and Intersection The union of n sets A1  A2  A3 … An is written n  Ai i=1 Represents the set of elements that belong to one or more of the sets Ai

Union and Intersection The intersection the sets A1, A2, … An is written n  Ai i=1 Represents the set of elements which belong to all of the sets Ai

Union and Intersection B = {3, 4, 5, 6} C = {2, 3, 5, 7} B  C= {2, 3, 4, 5, 6, 7} A  (B  C)= {2, 3, 4}

Union and Intersection B = {3, 4, 5, 6} C = {2, 3, 5, 7} A  B = {3, 4} (A  B)  C= {2, 3, 4, 5, 7}

Union and Intersection A  (B  C)= {2, 3, 4} (A  B)  C= {2, 3, 4, 5, 7} A  (B  C) ≠ (A  B)  C

Union and Intersection A  (B  C)= {2, 3, 4} (A  B) = {3, 4} (A  C)= {2, 3} (A  B)  (A  C)= {2, 3, 4} A  (B  C) = (A  B)  (A  C)

Union and Intersection Let A, B, and C be sets. Verify A  (B  C) = (A  B)  (A  C) Solution using proposition 2: If A and B are sets, then A = B if and only if A  B and B  A

Union and Intersection To show A, B, and C be sets. Verify A  (B  C)  (A  B)  (A  C) Let x  A  (B  C) Then x is in A and also in B  C, Since x  B  C, either x  B or x  C. This suggests two cases

Union and Intersection Case 1: x  B In this case, is in A as well as in B, so it’s in A  B Case 2: x  C In this case, is in A as well as in B, so it’s in A  C

Union and Intersection We have shown that either x  A  B or x  A  C By definition of union, x  (A  B)  (A  C)

Union and Intersection We must show that A  (B  C)  (A  B)  (A  C) Let x  (A  B)  (A  C) Then either x  (A  B) or x  (A  C) Thus, x is in both A and B or in both A and C. In either case x  A. Also x is in either B or C; thus x  B  C

Union and Intersection We must show that A  (B  C)  (A  B)  (A  C) Let x  (A  B)  (A  C) Then either x  (A  B) or x  (A  C) So x is in both A and in B  C ; that is x  A  ( B  C).

Set Difference The set difference of sets A and B (A\ B), is the set of those elements of A that are not in B. The complement of a set A is the set Ac = U \ A, where U is some universal set made clear by the context.

Examples: Set Difference {a, b, c} \ {a, b} = {c} {a, b, c} \ {a, x} = {b, c} {a, b, } \  = {a, b}

Examples: Set Difference {a, b, } \ {} = {a, b, } If A is the set {Monday, Tuesday, Wednesday, Thursday, Friday}, so Ac = {Saturday, Sunday}

Examples: Set Difference A \ B = A  Bc and (Ac)c= A Example: If A = {x  Z | x2 > 0}, then Ac ={0} U = Z (Ac)c = {0}c = {x  Z | x ≠ 0} = A

Interval Notation If a and b are real numbers with a < b, then [a, b] = {x  R | a ≤ x ≤ b} closed (a, b) = {x  R | a < x < b} open

Interval Notation If a and b are real numbers with a < b, then (a, b] = {x  R | a < x ≤ b} half open [a, b) = {x  R | a ≤ x < b} half open

The Laws of De Morgan (A  B)c = Ac  Bc (A  B)c = Ac  Bc

Prove that (A  B)c = Ac  Bc for any set A, B, and C. Let A be the statement “x  A” and B be the statement “x  B” x  (A  B)c  ¬(x  A  B)

Prove that (A  B)c = Ac  Bc for any set A, B, and C. x  (A  B)c  ¬(x  A  B)  ¬(A or B) Definition of union  ¬A and ¬B Rule for negating “or”  ¬ x  Ac and x  Bc  ¬ x  Ac  Bc Definition of intersection

Symmetric Difference The symmetric difference of two sets A and b is the set A  B of the elements that are in A or in B, but not in both. A  B = (A  B) \ ( A  B) A  B = (A \ B) ( A \ B)

Examples: Symmetric Difference {a, b, c}  {x, y, a} = { b, c, x, y} {a, b, c}   = {a, b, c} {a, b, c}  {} = {a, b, c,  }

Use a Venn diagram to illustrate that for any three sets A, B, and C, (A  B)  C = A  (B  C) A  B = {1, 2, 5, 6} C = {2, 3, 5, 7} (A  B)  C = {1, 3, 6, 7}

Use a Venn diagram to illustrate that for any three sets A, B, and C, (A  B)  C = A  (B  C) B  C = {2, 7, 4, 6} A = {1, 2, 3, 4} A  (B  C) = {1, 3, 6, 7}

The Cartesian Product of Sets If A and B are sets, the Cartesian product (the direct product) of A and B is the set A x B = {(a, b) | a  A, b  B}  “A cross B” for “A x B”

The Cartesian Product of Sets A1 x A2 x … An = = {a1, a2, … an)| ai  Ai for i=1, 2, …, n} When all the sets are equal to the same set A, A x A x … x A is written An.

The Cartesian Product of Sets The elements of A x B are called ordered pairs because the order is important: (a, b)≠ (b, a) (a, b)= (b, a) if a = b

The Cartesian Product of Sets (a, b) The first coordinate The second coordinate The elements of An are called n-tuples

The Cartesian Product of Sets Elements of A x B are equal if and only if they have the same first coordinates and the same second coordinates (a1, b1) = (a2, b2) if and only if a1 = a2 and b1 = b2

Example: The Cartesian Product of Sets Let A = {a, b} and B = {x, y, z}. Then A x B = {(a, x), (a, y), (a, z), (b, x), (b, y), (b, z)} B x A = {(x, a), (x, b), (y, a), (y, b), (z, a), (z, b)} A x B ≠ B x A

Example: The Cartesian Product of Sets Let A, B, and C be sets. Prove that A x (B  C)  (A x B)  (A x C) A x (B  C) are ordered pairs Let (x, y)  A x (B  C), so

Example: The Cartesian Product of Sets Let A, B, and C be sets. Prove that A x (B  C)  (A x B)  (A x C) Solution: Prove that any element in A x (B  C) is in (A x B)  (A x C).

Let A, B, and C be sets. Prove that A x (B  C)  (A x B)  (A x C) The elements in A x (B  C) are ordered pairs (x, y). where x, the first coordinate, is in A and y, the second coordinate is in (B  C). y is in either B or C.

Let A, B, and C be sets. Prove that A x (B  C)  (A x B)  (A x C) If y is in B, then, since x coordinate is in A, (x, y)  A x B. If y is in C, then, since x coordinate is in A, (x, y)  A x C. Thus, (x, y) is either in A x B or in A x C; thus, (x, y) is in (A x B)  (A x C), which is what we wanted to show.

Let A, B, and C be sets. Prove that (A x B)  (A x C)  A x (B  C) An element of (A x B)  (A x C) is either in A x B or in A x C. The elements in (A x B)  (A x C) are ordered pairs (x, y). (x, y)  A x B or (x, y)  A x C.

Let A, B, and C be sets. Prove that (A x B)  (A x C)  A x (B  C) If y is in B, then, since x coordinate is in A, (x, y)  A x B. If y is in C, then, since x coordinate is in A, (x, y)  A x C. In either case, x is in A and y is either in B or in C; so x  A and y  B  C. Therefore, (x, y)  A x B  C.

Let A, B, and C be sets. Prove that (A x B)  (A x C)  A x (B  C) In this example, we show that (A x B)  (A x C)  A x (B  C) In the previous example, we showed that A x (B  C)  (A x B)  (A x C) Conclusion: A x (B  C) = (A x B)  (A x C)

Let A and B be nonempty sets. Prove that A x B = B x A  A = B () Suppose that A x B = B x A is true. Suppose x  A. Since B ≠ , we can find some y  B. Thus, (x, y)  A x B. (x, y)  B x A. So x  B, giving us A  B. Similarly, B  A. Conclusion A = B. () If A = B is true, then A x B = A x A = B x A

Let A and B be nonempty sets. Prove that A x B = B x A  A = B Let A and B be nonempty sets. Prove that A x B = B x A  A = B. Is this true if A = ? If A =  and B is nonempty set, Then A x B =  = B x A, but A ≠ B. So A x B = B x A does not mean A = B in the case B = .

Binary Relations If A and B are sets. A binary relation from A to B is a subset of A x B. A binary relation on A is a subset of A x A. The empty set and the entire Cartesian product A x B are always binary relations from A to B.

Examples of Binary Relations Let A be the set of students who are registered at VCC during the Summer 2006 semester. Let B be the set {database, discrete mathematics, English} R = {(a, b) | a  A is enrolled in a course in subject b  B}

Examples of Binary Relations Let A is the set of surnames of people listed in the Sprint telephone directory. Then R = {(a, n) | a appears on page n} is a binary relation from A to the set N of natural numbers.

Examples of Binary Relations {(a, b} | a, b  N, a/b is an integer} is a binary relation on N {(a, b) | a, b  N, a – b = 2} is a binary relation on N {(x, y) | y = x2} is a binary relation on R .

A reflexive relation must contain all pairs of the form (a, a). Binary Relations A binary relation R on a set A is reflexive if and only if (a, a)  R for all a  A. A reflexive relation must contain all pairs of the form (a, a).

Examples of Reflexive Binary Relations {(x, y}  R2 | x ≤ y } is a reflexive relation on R since x ≤ x for any x  R. {(a, b)  N2 | a/b  N} is a reflexive relation on N since a/a is an integer, 1, for any a  N.

Examples of Reflexive Binary Relations R = {(x, y}  R2 | x2 + y2 > 0} is not a reflexive relation on R since (0, 0)  R.

Reflexive Relations Suppose R = {(a, b} | a, b  Z x Z | a2 = b2} Criticize and then correct the following “proof” that R is reflexive: (a, a)  R if a2 = a2.

The statement “(a, a)  R if a2 = a2” is the implication Reflexive Relations The statement “(a, a)  R if a2 = a2” is the implication “a2 = a2  (a, a)  R.” For any integer a, we have a2 = a2 and, hence, (a, a)  R. Therefore, R is reflexive.

A binary relation R on a set A is symmetric if and only Symmetric Relations A binary relation R on a set A is symmetric if and only if a, b  A and (a, b)  R, then (b, a)  R

Examples of Symmetric Relations R = {(x, y}  R2 | x2 + y2 =1} is a symmetric relation on R since if x2 + y2 =1 then y2 + x2 = 1 too: If (x, y)  R, then (y, x)  R. (x, y}  Z2 | x - y is even} is a symmetric relation on Z since if x - y is even so is y – x.

Examples of Symmetric Relations R = {(x, y}  R2 | x  y} is not a symmetric relation on R. For example, (2, 1)  R because 22  1, but (2, 1)  R because 12 < 2.

Examples of Relations Given the set A = {1, 2, 3, 4} R = {(1,1), (1, 2), (1, 4), (2, 1), (2, 2), (3, 2), (3, 3), (4, 4)} R is reflexive, but not symmetric

Antisymmetric Relations A binary relation R on a set A is antisymmetric if and only if a, b  A and both (a, b) and (b, a) are in R, then a = b.

Examples of Antisymmetric Relations R = {(x, y)  R2 | x ≤ y} is an antisymmetric relation on R since x ≤ y and y ≤ x implies y = x; thus (x, y)  R and (y, x)  R implies x = y. If S is a set and A = P (S) is the power set of S, then {(X, Y) | X, Y  P (S), X  Y} is antisymmetric since X  Y and Y  X implies X = Y.

Examples of Antisymmetric Relations R = {(1, 2), (2, 3), (3, 3), (2, 1)} is not antisymmetric on A ={1, 2, 3} because (1, 2)  R and (2, 1)  R but 1 ≠ 2. Is not symmetric because (2, 3)  R but (3, 2)  R. “antisymmetric” is not the same as “not symmetric.”

Examples of Antisymmetric Relations Is the relation R = {((x, y), (u, v))  R2 x R2 | x2 + y2 = u2 + v2 } antisymmetric? NO ((1, 2), (2, 1))  R because 12 + 22 = 22 + 12 and ((2, 1), (1, 2))  R but (1, 2) ≠ (2, 1)

A binary relation R on a set A is transitive if and only Transitive Relations A binary relation R on a set A is transitive if and only if a, b, c  A and both (a, b) and (b, c) are in R, then (a, c)  R.

Examples of Transitive Relations R = {(x, y)  R2 | x ≤ y} is a transitive relation on R since, if x ≤ y and y ≤ z, then x ≤ z: if (x, y) and (y, z) are in R then (x, y)  R. {(a, b)  Z x Z | a/b is an integer} is a transitive relation on Z since, if a/b and b/c are integers, then so is a/c because a/c = a/b . b/c.

Examples of Transitive Relations R = {(x, y)  (x, z), (y, u), (x, u) is a transitive binary relation on the set {x, y, z, u} because there is only one pair of the form (a, b), (b, c) belonging to R (that is, (x, y) and (y, u)) and, for this pair, it is true that (a, c) = (x, u)  R.

Examples of Transitive Relations R = {(a, b), (b, a), (a, a)} is not transitive the pairs (b, a) and (a, b), but not the pair (b, b). {(a, b)| a and b are people and a is an ancestor of b} is a transitive relation since if a is an ancestor of b and b is an ancestor of c, then a is an ancestor of c.

An n-ary relation on sets A1, A2, …, An is a subset of A1 x A2 x … An. High-Order Relations An n-ary relation on sets A1, A2, …, An is a subset of A1 x A2 x … An. “Binary relation” is “2-ary relation”

Equivalence Relations An equivalence relation on a set A is a binary relation R on A that is reflexive, symmetric, and transitive.

Examples of Equivalence Relations Suppose A is the set of all people in the world and R = {(a, b)  A x A | a and b have the same parents} Show that R is an equivalence relation?

R = {(a, b)  A x A | a and b have the same parents} is reflexive because R is reflexive (each person has the same set of parents as himself/herself). R is symmetric (if a and b have the same parents, then so do b and a), R is transitive (if a and b have the same parents, and b and c has the same parents, then a and c have the same parents).

Equivalence Relations (~) If R is a binary relation on a set A, and a, b  A, to prove that R is an equivalence, we must prove that R is reflexive: a ~ a for all a  A, Symmetric: if a  A and b  A and a ~ a, then b ~ a, and Transitive: if a, b, c  A and both a ~ b and b ~ c, then a ~ c.

Examples of Equivalence Relations Let A be the set of students registered at VCC. For a, b  A, call a and b equivalent if their student numbers have the same first two digits. a ~ a, for ever student a because any number has the same first two digits, so the student numbers of b and a have the same first two digits. Therefore b ~ a

Examples of Equivalence Relations Finally, if a ~ b and b ~ c, then the student numbers of a and b have the same first two digits, and the students numbers of b and c have the same first two digits, so the student numbers of a and c have the same first two digits. R is reflexive, symmetric, and transitive, R is an equivalence relation on A.

Equality is an equivalence relation The three most fundamental properties of equality are reflexive: a = a for all a, Symmetric: if a = b, then b = a; and Transitive: if a = b and b = c  A and both a ~ b and b ~ c, then a = c.

Equality is an equivalence relation The groups into an equivalence relation divides the underlying set are equivalence classes. The equivalence class of an element is the collection of all things related to it.

The Equivalence Class The equivalence class of an element a  A is the set a= {x  A | x ~ a} for all element to a. The set all equivalence classes is called the quotient set of A mod ~ and denoted A/~.

The Equivalence Class An equivalence relation is symmetric, so x ~ a or a ~ x in the definition of the equivalence class of . The set of things related to a is the same as the set of things to which a is related.

A/~ and A/~ is the quotient set of A. The set of equivalence classes of the equivalence relation ~ on a set A. is the equivalence class of a; also used to denote the congruence class of an integer a (mod n)

Examples of the quotient set Let A be the set of students registered at VCC. The equivalence relation is formed by the students who are related to a particular student x and those whose student number have the same first two digits as x’s student number.

Examples of the quotient set An equivalence class is formed by the students who is the set of all students whose student numbers begin with the same first two digits. The quotient set is the set of all equivalence classes: A/~ ={class of n| n = 05, 04, 03, 02, 01, 00, 99, 98, … }

Example of Equivalence Relations For (x, y) and (u, v) in R2, define (x, y) ~ (u, v) if x2 + y2 = u2 + v2 . Prove that ~ defines an equivalence relation on R2 and interpret the equivalence classes geometrically.

Example of Equivalence Relations If (x, y)  R2, then x2 + y2 = u2 + v2 , so (x, y) ~ (u, v): The relation is reflexive. If (x, y) ~ (u, v), then x2 + y2 = u2 + v2 , so u2 + v2 = x2 + y2 and (u, v) ~(x, y): The relation is symmetric.

Example of Equivalence Relations If (x, y) ~ (u, v) and (u, v) ~(w, z), then x2 + y2 = u2 + v2 and u2 + v2 = w2 + z2 Thus x2 + y2 = u2 + v2 = w2 + z2 Since x2 + y2 = w2 + z2 (x, y) ~ (w, z), so the relation is transitive.

Geometric Interpretation The equivalence class of (a, b) is = {(x, y)| (x, y) ~(a, b)} ={(x, y) | x2 + y2 = a2 + b2 } ={(x, y) | x2 + y2 = 12 + 02 = 1}  Graph of a circle in the Cartesian plane with center (0, 0) and radius 1.

Let ~ denote an equivalence relation on a set A Let ~ denote an equivalence relation on a set A. Then, for any x  A, x ~ a if an only if = ()Suppose = , x  because x ~ x, so x  ; thus, x ~ a. () Suppose that x ~ a. Prove that the two sets and are equal. Suppose y  . Then y ~ x and x ~ a, so y ~ a by transitivity. Thus y  , 

Let ~ denote an equivalence relation on a set A Let ~ denote an equivalence relation on a set A. Then, for any x  A, x ~ a if an only if = On the other hand. Suppose y  . Then y ~ a. Since a ~ x, we have both y ~ a and a ~ x; therefore, by transitivity, y ~ x. Thus y  and  . Therefore =

A Partition A partition of a set A is a collection of disjoint nonempty subsets of A whose union is A. These disjoint sets are called cells ( or blocks). The cells are said to partition A.

Examples of Partitions Canada is partitioned into ten provinces and three territories. Students are partitioned into groups according to the first two digits of their student numbers. The human race is partioned into groups by eye color.

Examples of Partitions A deck of playing cards is partitioned into four suits. If A = {a, b, c, d, e, f, x}, then {{a, b}, {c, d, e}, {f}, {x}} is a partition of A. So is {{a, x}, {b, d, e, f}, {c}}.

Theorem 2.4.6 The equivalence classes associated with an equivalence relation on a set A form a partition of A.

Examples of Partitions Given the set {a, b, c, d, e, f, g} The partition {{a, g}, {b, d, e, f}, {c}} corresponds to the equivalence relation whose equivalence classes are {a, g}, {b, d, e, f} and {c}

Examples of Partitions The equivalent relation (x ~ y) is represented in the figure by means a cross in row x and column y.

Partial Orders A partial order on a set A is a binary relation that is reflexive, antisymmetric, and transitive. A partially ordered set, poset for short, is a pair (A,  ), where is partial order on the set A.

Partial Orders Writing a b to mean that (a, b) is in the relation, a partial order on A is a binary relation that is reflexive: a a for all a  A, Symmetric: if a, b  A, a b and b a, then b = a, and Transitive: if a, b, c  A, a b and b c, then a c.

Partial Orders a b (“a is less than b”) signifies a b, a ≠ b, just as we use a < b (“a is less than b”) to mean a ≤ b, a ≠ b.

Examples of Partial Orders The binary relation ≤ on the real numbers is a partial order because a ≤ a for all a  R (reflexive), a ≤ b and b ≤ a implies a = b (antisymmetric), and a ≤ b, b ≤ c implies a ≤ c (transitivity).

Examples of Partial Orders Suppose some alphabet of symbols ordered partially by some relation . For “words” a = a1a2 … an and b = b1b2 … bn define a b if a and b are identical a b in the alphabet at the first position I where the words differ, or n < m, and ai = bi for i = 1, …, n Suppose some alphabet of symbols ordered partially by some relation . For “words” a = a1a2 … an and b = b1b2 … bn define a b if a and b are identical a b in the alphabet at the first position I where the words differ, or n < m, and ai = bi for i = 1, …, n

Partial Orders The definition of partial order does not require that every pair of elements be comparable, in the following sense. If (A, ) is a partially ordered set, elements a and b of A are said to be comparable if and only if either a b or b a.

Examples Partial Orders If X and Y are subsets of a set S, it need not be the case that X  Y or Y  X For example {a} and {b, c} are not comparable.

Totally Ordered Set 2. If is a partial order on a set A and every two elements of A are comparable, then is called a total order and the pair (A, ) is called a totally ordered set.

Examples of Totally Ordered Set The real numbers are totally ordered by ≤ because, for every pair a, b of real numbers, either a ≤ b or b ≤ a. The set of sets, { {a}, {b}, [c}, {a, c}} is not totally ordered by  since neither {a}  {b} nor {b}  {a}.

Maximum and Minimum Elements An element a of a poset (A, ) is maximum if and only if b a for every b  A and minimum if and only if a b for every b  A . In the poset (P({a, b, c}), ),  is a minimum element The set {a, b, c} a maximum element

Maximal and Minimal Elements An element a of a poset A is maximal if and only if, If b  A and a b, then b = a. and minimal if and only if, If b  A and b a, then b = a.

Maximal and Maximum Elements What are the maximum, minimum, maximal, and minimal elements in the poset of the following Hasse diagram.

Maximal and Maximum Elements a and b are maximal. There is no maximum d is both minimum and minimal.

A Greatest Lower Bound (glb) Let (A, ) be a poset. An element g is a greatest lower bound (glb) of elements a, b  A if and only if g a, g b, and If c a and c b for some c  A, then c g. Elements a and b can have at most one glb. When this element exists, it is denoted a ^ b (“a meet b”).

A Least Upper Bound (lub) An element l is a least upper bound (lub) of a and b if a l, g l, and If a c, b c for some c  A, then l c The lub is unique if it exists. The lub of a and b is denoted a  b, “a join b” if there is such an element.

Example of glb and lub In the poset (R, ), the greatest lower bound (glb) of two real numbers is the smaller of the two and the lower upper bound (lub) the larger.

A Lattice A poset (A, ) in which every two elements have a greatest lower bound in A and a least upper bound in A is called a lattice

Example of a Lattice In the poset (R, ), the greatest lower bound (glb) of two real numbers is the smaller of the two and the lower upper bound (lub) the larger.

Topics covered Sets. Operations on Sets. Binary Relations Union and Intersection Set Difference Symmetric Difference Binary Relations Equivalence Relations. Partial Order

Reference “Discrete Mathematics with Graph Theory”, Third Edition, E. Goodaire and Michael Parmenter, Pearson Prentice Hall, 2006. pp 38-71.