Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.company.com Module Code MA1032N: Logic Lecture for Week 8 2011-2012 Autumn.

Similar presentations


Presentation on theme: "Www.company.com Module Code MA1032N: Logic Lecture for Week 8 2011-2012 Autumn."— Presentation transcript:

1 www.company.com Module Code MA1032N: Logic Lecture for Week 8 2011-2012 Autumn

2 www.company.com Agenda Week 7 Lecture coverage: –Relations –Pictorial representation of relations –Matrix Representation –Some special relations

3 www.company.com Definition

4 www.company.com Example

5 www.company.com Example (cont.)

6 www.company.com Example (cont.)

7 www.company.com Example (cont.)

8 www.company.com 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

9 www.company.com 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.

10 www.company.com Digraphs (Cont.)

11 www.company.com 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.

12 www.company.com 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.

13 www.company.com 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:

14 www.company.com 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:

15 www.company.com Matrix Representation

16 www.company.com Matrix Representation The two relations from above examples have the following relation matrices:

17 www.company.com Some special relations 1.Symmetric Relations 2.Anti-symmetric Relations 3.Reflexive Relations 4.Transitive Relations

18 www.company.com Symmetric

19 www.company.com Symmetric (cont.) Hence y – x is divisible by 3 and so yRx.

20 www.company.com Symmetric (cont.)

21 www.company.com 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:

22 www.company.com Symmetric (cont.)

23 www.company.com Symmetric (cont.) Considering again the symmetric relation of above example. We see that the matrix R is

24 www.company.com Anti-symmetric Relations

25 www.company.com Antisymmetric Relations

26 www.company.com Antisymmetric Relations (cont.)

27 www.company.com Antisymmetric Relations (cont.)

28 www.company.com Antisymmetric Relations (cont.)

29 www.company.com Antisymmetric Relations (cont.)

30 www.company.com Antisymmetric Relations (cont.) Note that the criterion of a) and b) above hold.

31 www.company.com Reflexive Relations

32 www.company.com Reflexive Relations (cont.)

33 www.company.com Reflexive Relations (cont.)

34 www.company.com Reflexive Relations (cont.)

35 www.company.com 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:

36 www.company.com Transitive Relations

37 www.company.com Transitive Relations (cont.)

38 www.company.com Transitive Relations (cont.) In all cases where aRb and bRc it is also true that aRc. Therefore R is transitive.

39 www.company.com 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

40 www.company.com Transitive Relations (cont.)

41 www.company.com Transitive Relations (cont.)

42 www.company.com 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:

43 www.company.com 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.

44 www.company.com 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)}

45 www.company.com 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.


Download ppt "Www.company.com Module Code MA1032N: Logic Lecture for Week 8 2011-2012 Autumn."

Similar presentations


Ads by Google