Module Code MA1032N: Logic Lecture for Week Autumn
Agenda Week 7 Lecture coverage: –Relations –Pictorial representation of relations –Matrix Representation –Some special relations
Definition
Example
Example (cont.)
Example (cont.)
Example (cont.)
Pictorial representation of relations Often the best way of illustrating the structure and properties of a relation is by means of a diagrammatic representation of the relation. In this section we will introduce two such representations 1. Digraphs 2. Matrix Representation
Digraphs In discrete mathematics a graph is a set of points (called vertices) some of which are connected by lines (or arcs) called edges. For example: Here there are the four vertices a, b, c and d with edges as shown. Note that there is an edge joining b to itself. Such an edge is called a loop.
Digraphs (Cont.)
Digraphs (Cont.) A graph in which every edge has a direction (indicated by an arrow) is called a directed graph or digraph. Notice that there are two directed edges between a and d, one in each direction and that these really are different edges.
Digraphs (Cont.) A relation R on a set A having a finite number of elements can now be represented by a digraph as follows: (i)Draw a small circular vertex for each element of A, labelling each vertex with the corresponding element. (ii)If x and y are elements of A and xRy, draw a directed edge from x to y. Do this for every pair of related elements.
Digraphs (Cont.) For example: Let A = {1, 2, 3, 4} and R = {(1, 2), (1, 3), (1, 4), (2, 2), (3, 1), (4, 2)} The digraph of R is then:
Digraphs (Cont.) For example: Let A = {a, b, c, d, e} and suppose two letters are related if the first precedes the second in the alphabet. The digraph representation of this relation is then:
Matrix Representation
Matrix Representation The two relations from above examples have the following relation matrices:
Some special relations 1.Symmetric Relations 2.Anti-symmetric Relations 3.Reflexive Relations 4.Transitive Relations
Symmetric
Symmetric (cont.) Hence y – x is divisible by 3 and so yRx.
Symmetric (cont.)
Symmetric (cont.) The only exception to this is that a symmetric relation may have loop edges: The relation R = { (1, 2), (2, 1), (2, 3), (2, 2), (3, 2) } on the set A = {1, 2, 3} is symmetric. Its digraph is as below:
Symmetric (cont.)
Symmetric (cont.) Considering again the symmetric relation of above example. We see that the matrix R is
Anti-symmetric Relations
Antisymmetric Relations
Antisymmetric Relations (cont.)
Antisymmetric Relations (cont.)
Antisymmetric Relations (cont.)
Antisymmetric Relations (cont.)
Antisymmetric Relations (cont.) Note that the criterion of a) and b) above hold.
Reflexive Relations
Reflexive Relations (cont.)
Reflexive Relations (cont.)
Reflexive Relations (cont.)
Reflexive Relations (cont.) Example: Let A = {1, 2, 3, 4} and R = {(1, 1), (1, 2), (2, 2), (2, 3), (3, 3), (3, 1), (4, 4)} gives the following digraph and matrix of R:
Transitive Relations
Transitive Relations (cont.)
Transitive Relations (cont.) In all cases where aRb and bRc it is also true that aRc. Therefore R is transitive.
Transitive Relations (cont.) Examples 2.Let A={1, 2, 3, 4} and R={(1, 1), (1, 3), (3, 1), (1, 2), (3, 2), (3, 4), (1, 4)} Then R is not transitive. To demonstrate this we need only find one occurrence of aRb and bRc for which Here we have 3R1 and 1R3 but
Transitive Relations (cont.)
Transitive Relations (cont.)
Transitive Relations (cont.) ii) every time there is an edge from x to y and an edge from y back to x there must be loops at both x and y:
Transitive Relations (cont.) b)i) every time there is a 1 in position (x, y) and a 1 in position (y, z)there must be a 1 in a position (x, z). ii) every time there is a 1 in position (x, y) and a 1 in position (y, x) there must be a 1 in both diagonal positions (x, x) and (y, y). The above interpretations would be difficult to check for relations on large sets. For small sets the following systematic approaches may be helpful.
Transitive Relations (cont.) The digraph and matrix representations for the relation Let A = {1, 2, 3, 4} and R = { (1, 1), (1, 2), (2, 3), (1, 3), (4, 1), (4, 2), (4, 3)}
Transitive Relations (cont.) Example: The matrix of a relation R on the set A = {1, 2, 3, 4} is given below: Here we find Since N(3, 3) = 0 we conclude that R is not transitive without further investigation.