Representing Relations - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Representing Relations

Description:

Elements of each set A and B must be listed in some particular ... on a set, A ... A relation R on a set A. is called Symmetric if (b,a) R whenever (a,b) ... – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 15
Provided by: Hod69
Category:

less

Transcript and Presenter's Notes

Title: Representing Relations


1
Representing Relations
  • Rosen 6.3

2
Using Matrices
  • For finite sets we can use zero-one matrices.
    Elements of each set A and B must be listed in
    some particular (but arbitrary) order. When AB
    we use the same ordering for A and B.
  • mij 1 if (ai,bj) ??R
  • 0 if (ai,bj) ?R

3
Example Zero-One Matrix
b1 b2 b3
a1 a2 a3
R (a1,b1), (a1,b2), (a2,b2), (a3,b2), (a3,b3)
4
Matrix of a relation on a set, A
  • Can be used to determine whether the relations
    has certain properties.
  • Recall that R on A is reflexive if (a,a) ?R for
    every element a? A.

Reflexive Not Reflexive
5
A relation R on a set A
  • is called Symmetric if (b,a) ?R whenever (a,b) ?R
    for a,b ?A. MR (MR)t
  • Is antisymmetric (a,b) ?R and (b,a) ?R only if
    ab for a,b ?A is antisymmetric.
  • If mij 1, i?j, mji 0

Symmetric Antisymmetric Neither
6
Examples
Reflexive Symmetric
Reflexive Antisymmetric
7
Let R1, R2 be relations on A
  • A 1,2,3
  • R1 (1,1), (1,3), (2,1), (3,3)
  • R2 (1,1), (1,2), (1,3), (2,2), (2,3), (3,1)

8
R1?R2, R1?R2
MR1?R2 MR1 ? MR2, MR1?R2 MR1 ? MR2
9
What is R1 ? R2?
  • The composite of R1 and R2 is the relation
    consisting of ordered pairs (a,c) where a ? A, c
    ? A, and for which there exists an element b ? A
    such that (a,b) ? R1 and (b,c) ? R2.
  • R1 ? R2 (1,1), (1,2), (1,3), (3,1), (2,1),
    (2,2), (2,3)

10
Boolean Product
  • Let A aij be an m by k zero-one matrix and B
    bij be a k by n zero-one matrix. Then the
    Boolean Product of A and B denoted by A B is
    the m by n matrix with i,j entry cij where
  • cij (ai1?b1j) ? (ai2 ? b2j) ?... ? (aik ? bkj).

11
What is R1 ? R2?
  • R1 ? R2 (1,1), (1,2), (1,3), (3,1), (2,1),
    (2,2), (2,3)
  • MR1?R2 MR1 MR2

12
Directed Graphs (Digraph)
  • A directed graph consists of a set V of vertices
    together with a set E of ordered pairs of
    elements of V called edges.
  • (a,b), a is initial vertex, b is the terminal
    vertex

Reflexive (Loops) Symmetric (Edges both ways)
b
a
c
13
Relation R on a set A
R (a,b), (b,b), (b,c), (c,a),
(c,c) Transitive
b
a
c
14
Relation R on a set A
R (a,a), (a,c), (b,b), (b,a), (b,c),
(c,c) Reflexive Antisymmetric
b
a
c
Write a Comment
User Comments (0)
About PowerShow.com