CSE15 Discrete Mathematics 05/03/17

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

Relations Relations on a Set. Properties of Relations.
CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
8.6 Partial Orderings. Definition Partial ordering– a relation R on a set S that is Reflexive, Antisymmetric, and Transitive Examples? R={(a,b)| a is.
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Applied Discrete Mathematics Week 11: Graphs
CSE115/ENGR160 Discrete Mathematics 05/03/11 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.
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.
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.
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.
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.
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.
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.
Representing Relations Using Digraphs
Relations and Their Properties
Citra Noviyasari, S.Si, MT
Chapter 5 Relations and Operations
CSE 2813 Discrete Structures
Partial Orders.
Partial Orderings CSE 2813 Discrete 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
Atmiya Institute of Technology & Science
6.1 Partially Ordered Sets
Relations Chapter 9.
Partial Orderings.
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Aaron Bloomfield CS 202 Epp, section ???
CSE115/ENGR160 Discrete Mathematics 04/28/11
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
8.5 Equivalence Relations
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
Relations and Digraphs
Applied Discrete Mathematics Week 6: Relations/Digraphs
Equivalence Relations
Definition 2. 20: Let R be an equivalence relation on a set A
9.5 Equivalence Relations
Relations.
Equivalence Relations
Equivalence Relations
교환 학생 프로그램 내년 1월 중순부터 6월 초 현재 학부 2,3 학년?
Basics of Relations.
Chapter 8 (Part 2): Relations
Lecture # 16 Inverse of Relations
Presentation transcript:

CSE15 Discrete Mathematics 05/03/17 Ming-Hsuan Yang UC Merced

9.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

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

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

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

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

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

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

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, |y-z|=0.8<1, but |x-z|=1.7>1 So R is not an equivalence relation

9.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

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

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

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

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

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, ≼)

Lexicographic order Definition: Given two posets (A1,≼1) and (A2,≼2), the lexicographic ordering on A1 ⨉ A2 is defined by specifying that (a1, a2) is less than (b1,b2), that is, (a1, a2) ≺ (b1,b2), either if a1 ≺1 b1 or if a1 = b1 and a2 ≺2 b2. This definition can be easily extended to a lexicographic ordering on strings (see text). Example: Consider strings of lowercase English letters. A lexicographic ordering can be defined using the ordering of the letters in the alphabet. This is the same ordering as that used in dictionaries. discreet ≺ discrete, because these strings differ in the seventh position and e ≺ t. discreet ≺ discreetness, because the first eight letters agree, but the second string is longer.

Hasse diagrams Definition: A Hasse diagram is a visual representation of a partial ordering that leaves out edges that must be present because of the reflexive and transitive properties. A partial ordering is shown in (a) of the figure above. The loops due to the reflexive property are deleted in (b). The edges that must be present due to the transitive property are deleted in (c). The Hasse diagram for the partial ordering (a), is depicted in (c).

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

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

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

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 (a1, a2) (b1, b2) if a1 < a2 or if a1=b1 and a2 ≤b2 (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