CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1.

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

Equivalence Relations
Relations Relations on a Set. Properties of Relations.
CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Basic Properties of Relations
Applied Discrete Mathematics Week 11: Graphs
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
Discrete Mathematics Lecture#11.
1 Partial Orderings Based on Slides by Chuck Allison from Rosen, Chapter 8.6 Modified by.
Partially Ordered Sets (POSets)
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
1 Partial Orderings Aaron Bloomfield CS 202 Rosen, section 7.6.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Discrete Structures – CNS2300
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Discrete Math for CS 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.
2.6 Equivalence Relation §1.Equivalence relation §Definition 2.18: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric,
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.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Digraphs and Relations Warm Up. The Divisibility Relation Let “|” be the binary relation on N×N such that a|b (“a divides b”) iff there is an n ∈ N such.
Rosen, Section 8.5 Equivalence Relations
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda.
Relations and their Properties
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
1 Partial Orderings Aaron Bloomfield CS 202 Epp, section ???
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.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
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.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
1 Equivalence relations Binary relations: –Let S1 and S2 be two sets, and R be a (binary relation) from S1 to S2 –Not every x in S1 and y in S2 have such.
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda.
1 Partial Orderings Based on Slides by Chuck Allison from Rosen, Chapter 8.6 Modified by.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Chapter8 Relations 8.1: Relations and their properties.
1 Partial Orderings Epp, section Introduction An equivalence relation is a relation that is reflexive, symmetric, and transitive A partial ordering.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Relations and Their Properties
Citra Noviyasari, S.Si, MT
CSE 2813 Discrete Structures
Partial Orderings CSE 2813 Discrete Structures.
CSE15 Discrete Mathematics 05/03/17
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
Atmiya Institute of Technology & Science
Relations Chapter 9.
Partial Orderings.
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Aaron Bloomfield CS 202 Epp, section ???
CSE115/ENGR160 Discrete Mathematics 04/28/11
8.5 Equivalence Relations
Relations and Their Properties
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Math (2) Haiming Chen Associate Professor, PhD
8.5 Equivalence Relations and 8.6 Partial Ordering
Applied Discrete Mathematics Week 6: Relations/Digraphs
Equivalence Relations
Formal Definition and Examples
Definition 2. 20: Let R be an equivalence relation on a set A
9.5 Equivalence Relations
Equivalence Relations
Equivalence Relations
교환 학생 프로그램 내년 1월 중순부터 6월 초 현재 학부 2,3 학년?
Presentation transcript:

CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1

8.4 Equivalence relation In traditional C, only the first 8 characters of a variable are checked by the complier Let R be relation on the set of strings of characters s.t. sRt where s and t are two strings, if s and t are at least 8 characters long and the first 8 characters of s and t agree, or s=t Easy to see R is reflexive, symmetric, and transitive 2

Example The integers a and b are related by the “congruence modulo 4” relation when 4 divides a-b We will see this relation is reflexive, symmetric and transitive The above-mentioned two relations are examples of equivalence relations, namely, relations that are reflexive, symmetric, and transitive 3

Equivalence relation A relation on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive Important property in mathematics and computer science Two elements a and b are related by an equivalence relation are called equivalent, denoted by a ∼ b, a and b are equivalent elements w.r.t. a particular equivalence relation 4

Example Let R be the relation on the set of integers s.t. aRb iff a=b or a=-b We previously showed that R is reflexive, symmetric, and transitive – R is reflexive, aRa iff a=a or a=-a – R is symmetric, aRb if a=b or a=-b, then b=a or b=-a and so bRa (also for the only if part) – R is transitive, if aRb and bRc, then (a=b or a=-b) and (b=c or b=-c). So a=c or a=-c. Thus aRc (also for the only if part) If follows that R is an equivalence relation 5

Example Let R be the relation on the set of real numbers s.t. aRb iff a-b is an integer. Is R an equivalence relation? Since a-a=0 is an integer for all real number a, aRa for all a. Hence R is reflexive Now suppose aRb, then a-b is an integer, so b-a is an integer. Hence bRa. Thus R is symmetric If aRb and bRc, then a-b and b-c are integers. So, a- c=(a-b)+(b-c) is an integer. Hence aRc. Thus R is transitive Consequently, R is an equivalence relation 6

Example Let m be a positive integer with m>1. Show that the relation R={(a,b)|a ≡ b (mod m)} is an equivalence relation on the set of integers Recall a ≡ b (mod m) iff m divides a-b. Note that a-a=0 is divided by m. Hence a ≡ a (mod m). So congruence modulo m is reflexive Suppose a ≡ b(mod m), then a-b is divisible by m, so a-b=km, where k is an integer. It follows b-a=(-k)m, so b ≡ a(mod m). Hence, congruence modulo m is symmetric 7

Example Suppose a ≡ b(mod m) and b ≡ c(mod m). Then m divides both a-b and b-c. Thus, there are integers k and l with a-b=km and b-c=lm Put them together a-c=(a-b)+(b-c) = km+lm = (k+l)m. Thus a ≡ c(mod m). So, congruence modulo m is transitive It follows that congruence modulo m is an equivalence relation 8

Example Let R be the relation on the set of real numbers s.t. xRy iff x and y are real numbers that differ by less than 1, that is |x-y|<1. Show that R is not an equivalence relation R is reflexive as |x-x|=0<1 where x ∊ R R is symmetric for if xRy, then |x-y|<1, which tells us |y-x|<1. So yRx R is not transitive. Take x=2.8, y=1.9, z=1.1, so that |x-y|=0.9 1 So R is not an equivalence relation 9

8.6 Partial orderings Often use relations to order some or all of the elements of sets Example: order words, schedule projects A relation R on a set S is called partial ordering or partial order if it is reflexive, antisymmetric, and transitive A set S together with a partial ordering R is called partially ordered set, or poset, and is denoted by (S,R) Members of S are called elements of the poset 10

Example Show that the “greater than or equal” relation ( ≥ ) is a partial ordering on the set of integers ≥ is reflexive as a ≥ a ≥ is antisymmetric as if a ≥ b and b ≥ a then a=b ≥ is transitive as if if a ≥ b and b ≥ c then a ≥ c (Z, ≥ ) is a poset 11

Example The divisbility relation | is a partial ordering on the set of positive integers, as it is reflexive, antisymmetric, and transitive We see that (Z +, |) is a poset 12

Example Show that inclusion ⊆ is a partial ordering (the relation of one set being a subset of another is called inclusion) on the power set of a set S Example: power set of {0,1,2} is P({0,1,2})= { ∅, {0}, {1}, {2}, {0,1}, {0,2}, {1,2}, {0,1,2}} A ⊆ A whenever A is a subset of S, so ⊆ is reflexive It is antiysmmetric as A ⊆ B and B ⊆ A imply that A=B It is transitive as A ⊆ B and B ⊆ C imply that A ⊆ C. Hence ⊆ is a partial ordering on P(S), and (P(S), ⊆ ) is a poset 13

Example Let R be the relation on the set of people s.t. xRy if x and y are people and x is older than y. Show that R is not a partial ordering R is antisymmetric if a person x is order than a person y, then y is not order than x R is transitive R is not reflexive as no person is older than himself/herself 14

Relation in any poset In different posets different symbols such as ≤, ⊆ and | are used for a partial ordering Need a symbol we can use when we discuss the ordering in an arbitrary poset The notation a ≼ b is used to denote (a,b) ∊ R in an arbitrary poset (S,R) ≼ is used as the “less than or equal to” relation on the set of real numbers is the most familiar example of a partial ordering, and similar to ≤ symbol ≼ is used for any poset, not just “less than or equals” relation, i.e., (S, ≼ ) 15

Comparable The elements a and b of a poset (S, ≼ ) are called comparable if either a ≼ b or b ≼ a. When a and b are elements of S s.t. neither a ≼ b nor b ≼ a, a and b are incomparable In the poset (Z+, |), are the integers 3 and 9 comparable? Are 5 and 7 comparable? The integers 3 and 9 are comparable as 3|9. the integers 5 and 7 are incomparable as 5 does not divide 7 and 7 does not divide 5 16

Total ordering Pairs of elements may be incomparable and thus we have “partial” ordering When every 2 elements in the set are comparable, the relation is called total ordering If (S, ≼ ) is a poset and every two elements of S are comparable, S is called a totally ordered or linearly ordered set, and ≼ is called a total order or a linear order A totally ordered set is also called a chain 17

Example The poset (Z, ≤ ) is totally ordered as a ≤ b or b ≤ a whenever a and b are integers The poset (Z +, |) is not tally ordered as it contains elements that are incomparable, such as 5 and 7 18

Well-ordered set (S, ≼ ) is a well-ordered set if it is a poset s.t. ≼ is a total ordering and every nonempty subset of S has a least element The set of ordered pairs of positive integers, Z + × Z + with (a 1, a 2 ) (b 1, b 2 ) if a 1 < a 2 or if a 1 =b 1 and a 2 ≤ b 2 (the lexicographic ordering), is a well-ordered set The set Z, with the usual ordering, is not well- ordered as the set of negative integers has no least element 19