Discrete Math (2) Haiming Chen Associate Professor, PhD

Slides:



Advertisements
Similar presentations
Representing Relations
Advertisements

CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
Discrete Mathematics Relations
Relations - review A binary relation on A is a subset of A×A (set of ordered pairs of elements from A) Example: A = {a,b,c,d,e} R = { (a,a),(a,b),(b,b),(b,c),
Basic Properties of Relations
Relations.
Discrete Mathematics Lecture # 16 Inverse of Relations.
Ch. 8: Relations 8.1 Relations and their Properties.
Relations & Their Properties. Copyright © Peter Cappello2 Introduction Let A & B be sets. A binary relation from A to B is a subset of A x B. Let R be.
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
1 Representing Relations Part 2: directed graphs.
Discrete Mathematics Lecture#11.
1 Section 7.1 Relations and their properties. 2 Binary relation A binary relation is a set of ordered pairs that expresses a relationship between elements.
Relation. Relations Recall the definition of the Cartesian (Cross) Product: The Cartesian Product of sets A and B, A x B, is the set A x B = { : x  A.
1 Relations and Their Properties Epp, section ??? CS 202 Aaron Bloomfield.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a Fall 2002KSU - Discrete Structures1.
1 Relations Rosen 6 th ed., § Relations Re lationships between elements of sets occur in many contextsRe lationships between elements of sets occur.
Unit Unit 04 Relations IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP1 Unit 4 Relations.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
1 Relations and Their Properties Rosen, section 7.1 CS/APMA 202 Aaron Bloomfield.
Discrete Mathematics Relation.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
CS 103 Discrete Structures Lecture 19 Relations. Chapter 9.
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Discrete Structures – CNS2300
Chapter Relations and Their Properties
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
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.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
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 B = {a,b} {( 0, a), (
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Lecture 7: Relations Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
Agenda Review:  Relation Properties Lecture Content:  Divisor and Prime Number  Binary, Octal, Hexadecimal Review & Exercise.
2-1 Basic Assumptions Objective: To use number properties to simplify expressions.
Relations and Their Properties
Citra Noviyasari, S.Si, MT
CSE 2813 Discrete Structures
Relations and Their Properties
Partial Orderings CSE 2813 Discrete Structures.
Atmiya Institute of Technology & Science
Partial Orderings.
Applied Discrete Mathematics Week 10: Relations
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Relations and Their Properties
CSE 504 Discrete Structures & Foundations of Computer Science
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
Applied Discrete Mathematics Week 9: Equivalence Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Math (2) Haiming Chen Associate Professor, PhD
CS2210 Discrete Structures Relations
Relations and Their Properties
8.1 Relations and Their Properties
Discrete Math (2) Haiming Chen Associate Professor, PhD
8.1 Relations and Their Properties
Discrete Math (2) Haiming Chen Associate Professor, PhD
CSE15 Discrete Mathematics 04/26/17
Discrete Math (2) Haiming Chen Associate Professor, PhD
Applied Discrete Mathematics Week 5: Boolean Algebra
Relations and their Properties
Introduction to Relations and Functions
Discrete Math (2) Haiming Chen Associate Professor, PhD
Basics of Relations.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Agenda Lecture Content: Relations (Relasi)
Lecture # 16 Inverse of Relations
Ø Let the universe set U={1,2,3,...,10}.
Presentation transcript:

Discrete Math (2) Haiming Chen Associate Professor, PhD Department of Computer Science, Ningbo University http://www.chenhaiming.cn

Relations Relations between elements of sets represented using the structure called a relation, which is a subset of the Cartesian product of the sets e.g. A╳B, where A is a set of companies, and B is a set of telephones A={Intel, Lenovo, ICBC}, B={07548888, 01006666, 0209999}

Relations If two sets, the relation is represented by a set of ordered pairs Binary relations A={Intel, Lenovo, ICBC}, B={07548888, 01006666, 0209999} {{Intel, 05748888}, {Lenovo, 010006666}, {ICBC, 0209999}}

Graphical representation of relationship

Functions as Relations an element a of A is assigned to the unique element b ∈ B such that (a, b) ∈ R not a function one-to-many relationship

Relations on a set Let A be the set {1, 2, 3, 4}. Which ordered pairs are in the relation R = {(a, b) | a divides b}?

Relations on a set Which of these relations contain each of the pairs (1, 1), (1, 2), (2, 1), (1,−1), and (2, 2)?

Properties of Relations The relation R on the set A is reflexive if ∀a((a, a) ∈ R)

The relation R on the set A is reflexive if ∀a((a, a) ∈ R)

Properties of Relations the relation R on the set A is symmetric if ∀a∀b((a, b) ∈ R → (b, a) ∈ R). if and only if a is related to b implies that b is related to a. the relation R on the set A is antisymmetric if ∀a∀b(((a, b) ∈ R ∧ (b, a) ∈ R) → (a = b)). if and only if there are no pairs of distinct elements a and b with a related to b and b related to a a relation can lack both of these two properties symmetric symmetric antisymmetric antisymmetric antisymmetric

Properties of Relations antisymmetric antisymmetric symmetric symmetric antisymmetric antisymmetric symmetric a relation can have both of these two properties symmetric and antisymmetric are not opposites

Properties of Relations Using quantifiers we see that the relation R on a set A is transitive if we have ∀a∀b∀c(((a, b) ∈ R ∧ (b, c) ∈ R) → (a, c) ∈ R). transitive transitive transitive

Properties of Relations transitive transitive transitive transitive

Combining Relations ={(1,2), (1,3), (1,4),(2,2),(3,3)} Let A = {1, 2, 3} and B = {1, 2, 3, 4}. The relations R1 = {(1, 1), (2, 2), (3, 3)} and R2 = {(1, 1), (1, 2), (1, 3), (1, 4)} can be combined to obtain ={(1,2), (1,3), (1,4),(2,2),(3,3)}

Combining Relations

Combining Relations Let R be a relation from a set A to a set B and S a relation from B to a set C. The composite of R and S is the relation consisting of ordered pairs (a, c), where a ∈ A, c ∈ C, and for which there exists an element b ∈ B such that (a, b) ∈ R and (b, c) ∈ S. We denote the composite of R and S by S ◦R.

Combining Relations

Homework Page 581, Ex.3, 6, 30, 56