Representing Relations

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

Chapter 3. Relations Definitions Relations Binary relations Domain Range Vertex Direct edge Loops Reflective Relations Sympatric Relations Anti Symmetric.
Discrete Mathematics 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 5 Dr.-Ing. Erwin Sitompul
Representing Relations Rosen 7.3. Using Matrices For finite sets we can use zero-one matrices. Elements of each set A and B must be listed in some particular.
CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
8.3 Representing Relations. Consider the following relations on A={1,2,3,4} Consider the matrixM R1 = | | | | | | | |
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
1 Section 7.3 Representing relations (part 1: matrices)
Representing Relations Using Matrices
Discrete Mathematics Lecture # 16 Inverse of Relations.
1 Representing Relations Part 2: directed graphs.
Relations binary relations xRy on sets x  X y  Y R  X  Y Example: “less than” relation from A={0,1,2} to B={1,2,3} use traditional notation 0 < 1,
Discrete Mathematics Lecture#11.
1 Representing Relations Epp section ??? CS 202 Aaron Bloomfield.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Applied Discrete Mathematics Week 10: Equivalence Relations
Properties of Relations In many applications to computer science and applied mathematics, we deal with relations on a set A rather than relations from.
Module #21 - Relations Representing Relations Rosen 6 th ed., Ch. 8.
Chapter 4 Relations and Digraphs
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Lecture 14 Relations CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
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.
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.
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.
Discrete Mathematics Relation.
§ 每周五交作业,作业成绩占总成绩的 10% ; § 平时不定期的进行小测验,占总成绩的 20% ; § 期中考试成绩占总成绩的 20% ;期终考 试成绩占总成绩的 50% § 每周五下午 1 ; 00—3 : 00 ,答疑 § 地点:软件楼 301.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.
Section 4.4 Properties of Relations. Order Relations Draw an arrow diagram for the relation R defined on the set {1,2,3,4} such that
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
1 Chapter Equivalence, Order, and Inductive Proof.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
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 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
Representing Relations Using Matrices A relation between finite sets can be represented using a zero-one matrix Suppose R is a relation from A = {a 1,
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.
Relations Section 9.1, 9.3—9.5 of Rosen Spring 2012
1 Section 4.1 Properties of Binary Relations A binary relation R over a set A is a subset of A  A. If (x, y)  R we also write x R y. Example. Some sample.
Equivalence Relations
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), (
Section 7.3: Representing Relations In this section, we will cover two ways to represent a relation over a finite set other than simply listing the relation.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
Introduction Types of Matrices Operations
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
Module Code MA1032N: Logic Lecture for Week Autumn.
Chapter8 Relations 8.1: Relations and their properties.
Discrete Mathematical
Relations and Their Properties
Relations.
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
Relations Chapter 9.
Representing Relations
CSE115/ENGR160 Discrete Mathematics 04/28/11
Mathematical Structures for Computer Science Chapter 6
Relations: representation and closures
321 Section, Week 9 Natalie Linnell.
Discrete Math (2) Haiming Chen Associate Professor, PhD
Combining relations via relational composition
Chapter 8 (Part 2): Relations
Agenda Lecture Content: Relations (Relasi)
Representing Relations Using Matrices
Lecture # 16 Inverse of Relations
4.4 Properties of Relations
Presentation transcript:

Representing Relations Section 8.3

Representing Relations Using Matrices Let R be a relation from A to B A = {a1,a2,…,am} B = {b1,b2,…,bn} The zero-one matrix representing the relation R has a 1 as its (i,j) entry when ai is related to bj and a 0 in this position if ai is not related to bj.

Example Let R be a relation from A to B Find the relation matrix for R A={a,b,c} B={d,e} R={(a,d),(b,e),(c,d)} Find the relation matrix for R

Relation Matrices and Properties Let R be a binary relation on a set A and let M be the zero-one matrix for R. R is reflexive iff Mii=1 for all i R is symmetric iff M is a symmetric matrix i.e., M=MT R is antisymmetric if Mij=0 or Mji=0 for all ij

Example Suppose that the relation R on a set is represented by the matrix MR. ú û ù ê ë é = 1 R M Is R reflexive, symmetric, and/or antisymmetric?

Representing Relations Using Digraphs each element of the set by a point each ordered pair using an arc with its direction indicated by an arrow

Example Let R be a relation on set A A={a,b,c} R={(a,b),(a,c),(b,b),(c,a),(c,b)}. Draw the digraph that represents R a b c

Relation Digraphs and Properties A relation digraph can be used to determine whether the relation has various properties Reflexive - must be a loop at every vertex. Symmetric - for every edge between two distinct points there must be an edge in the opposite direction. Antisymmetric - There are never two edges in opposite direction between two distinct points. Transitive - If there is an edge from x to y and an edge from y to z, there must be an edge from x to z.

Example A B C D A: not reflexive, symmetric, antisymmetric, transitive B: not reflexive, not symmetric, not antisymmetric, not transitive C: not reflexive, not symmetric, antisymmetric, not transitive D: not reflexive, not symmetric, antisymmetric, transitive Label the relations above as reflexive (or not), symmetric (or not), antisymmetric (or not), and transitive (or not).