Download presentation
Presentation is loading. Please wait.
1
1 Representing Relations Part 2: directed graphs
2
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
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
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
5 Reflexivity A relation is reflexive if and only if its directed graph contains a loop at every vertex Not reflexive Reflexive
6
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
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
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.