1 Representing Relations Part 2: directed graphs.

Slides:



Advertisements
Similar presentations
Representing Relations
Advertisements

Reflexive example: AB = AB Symmetric example: AB = BA
Relations Relations on a Set. Properties of Relations.
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 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.
Chapter 3 Relations. Section 3.1 Relations and Digraphs.
Basic Properties of Relations
Representing Relations Using Matrices
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
Reflexive -- First sentence of proof is: (1) Let x  Z (2) Let (x,x)  R. (3) Let (x,x)  I (4) Let x  R.
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.
1 Representing Relations Epp section ??? CS 202 Aaron Bloomfield.
Relations Chapter 9.
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
Relations (1) Rosen 6 th ed., ch. 8. Binary Relations Let A, B be any two sets. A binary relation R from A to B, written (with signature) R:A↔B, is a.
Module #21 - Relations Representing Relations Rosen 6 th ed., Ch. 8.
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.
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.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
8.3 Representing Relations Directed Graphs –Vertex –Arc (directed edge) –Initial vertex –Terminal vertex.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
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.
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
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
Relations Section 9.1, 9.3—9.5 of Rosen Spring 2012
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.
Chap. 7 Relations: The Second Time Around
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.
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Module Code MA1032N: Logic Lecture for Week Autumn.
Chapter8 Relations 8.1: Relations and their properties.
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.
Equivalence Relations and Classes
Discrete Mathematical
Relations and Their Properties
Relations.
CSE 2813 Discrete Structures
Partial Orders.
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 
Relations Chapter 9.
Representing Relations
CSE115/ENGR160 Discrete Mathematics 04/28/11
Graphs and Graph Models
Applied Discrete Mathematics Week 10: Equivalence Relations
Relations and Their Properties
Relations: representation and closures
Relations and Digraphs
Representing Relations
4.5 Equivalence Relations
Lesson 4-1 Using Properties Designed by Skip Tyler, Varina High School
Discrete Math (2) Haiming Chen Associate Professor, PhD
Combining relations via relational composition
Verifying Segment Relationships
Chapter 8 (Part 2): Relations
Agenda Lecture Content: Relations (Relasi)
4.4 Properties of Relations
Presentation transcript:

1 Representing Relations Part 2: directed graphs

2 Directed Graph digraphvertices edgesA directed graph (digraph) is a a set of vertices (also called nodes) and a set of edges (or arcs) connecting them The graph is directed because for each vertex pair (a,b), the initial vertex (a) is the starting point, and the terminal vertex (b) is the ending point of the edge The edge is represented graphically as an arrow pointing from a to b

3 Example The directed graph on the left consists of the set E of ordered pairs {(a,b), (b,c), (a,c), (c,a), (c,d), (d,d)} and the edges between them loop The ordered pair (d,d) is represented in the graph by a loop (an edge that connects a vertex to itself)

4 Representing relations A relation R on a set A can be represented by a digraph that has the elements of A as its vertices and the ordered pairs (a,b)  R as its edges –provides visual display of relation –can be used to determine properties of the relation

5 Reflexivity A relation is reflexive if and only if its directed graph contains a loop at every vertex Not reflexive Reflexive

6 Symmetry A relation is symmetric if and only if for every edge between distinct vertices in its graph there is an edge in the opposite direction (for every edge (x,y) there is an edge (y,x)) Not symmetricSymmetric

7 Antisymmetry A relation is antisymmetric if and only if its graph contains NO two edges in opposite directions between distinct vertices Not antisymmetric Antisymmetric

8 Transitivity A relation is transitive if, whenever its graph contains an edge (x,y) and an edge (y,z), it also contains an edge (x,z) Not transitiveTransitive