Relations - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Relations

Description:

Given the diagram of relation R, determine whether it is reflexive, symmetric, ... and R a binary relation on A. R is an equivalence relation iff R is reflexive, ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 23
Provided by: joe49
Category:
Tags: relations

less

Transcript and Presenter's Notes

Title: Relations


1
Relations Functions
  • Introductory Discrete Mathematics (CS/MAT165)

2
Cartesian Product
  • For sets A and B
  • A ? B
  • The set of all ordered pairs (a, b) where a ? A
    and b ? B

3
Relation
  • For sets A and B
  • Binary relation R is a subset of A ? B
  • x R y ? (x, y) ? R
  • x R y ? (x, y) ? R

4
Relation
  • If x R y, then define R

Range
Domain
X
Y
1 2 3
1 3 5
5
Try this!
  • Draw a diagram for the following relation
  • R (a, 1), (a, 3), (b, 2), (c, 3)

6
And this!
  • Define a relationship, R X ? Y, where X is the
    set of all possible numerical grades and Y is set
    of all possible letter grades

7
Function
  • A relation F where
  • ? x ? A, ? y ? B such that (x, y) ? F, and
  • If (x, y) ? F and (x, z) ? F, then y z
  • y F(x) ? (x, y) ? F ? F x ? y

8
Inverse Relation
  • R-1 (y, x) ? B ? A (x, y) ? R
  • Example
  • R (1, 2), (1, 3), (2, 3)
  • R-1 (2, 1), (3, 1), (3, 2)

9
Definitions
  • Binary relationA relationship from set A to
    itself
  • R is reflexive ? ? x ? A, x R x
  • R is symmetric ? ? x, y ? A, x R y ? y R x
  • R is transitive ? ? x, y, z ? A, (x R y) ? (y R
    z) ? x R z

10
Try this
  • Given the diagram of relation R, determine
    whether it is reflexive, symmetric, and/or
    transitive

? a
? b
? c
? d
11
Transitive Closure
  • Transitive closure of R
  • Rt is transitive
  • R ? Rt
  • If S is a transitive relation, and R ? S,then Rt
    ? S

12
Try this
  • Find the transitive closure Rt for the
    followingR (1, 2), (2, 2), (3, 1)
  • What is Rt - R ?

13
And this
  • Given the set of all real numbers R fill out the
    following table

14
Partition
  • For set A, a collection of nonempty, mutually
    disjoint subsets A1 An whose union is A
  • The binary relation induced by the partition R is
    defined as? x, y ? Ax R y ? x, y ? Ai

A2
A4
A1
A3
15
Prove!
  • If R is a relation induced by a partition on A,
    then R is reflexive, symmetric and transitive

16
Equivalence
  • Let A be a set and R a binary relation on A
  • R is an equivalence relation iff R is reflexive,
    symmetric, and transitive
  • For each element a in A, the equivalence class of
    a, a, also called the class of a, is the set of
    all elements x in A such that x R aa x ? A
    x R a

17
Equivalence
  • Let A be a set and R a equivalence relation on A
    and a, b ? A
  • (a R b) ? (a b)
  • How can we prove this?

18
Equivalence
  • Let A be a set and R a equivalence relation on A,
    and a, b ? A
  • Either a ? b ? or a b
  • How can we prove this?

19
Equivalence
  • Let A be a set and R a equivalence relation on A
  • The distinct equivalence classes of R form a
    partition of A
  • How can we prove this?

20
Partial Order
  • Antisymmetric
  • ? a, b ? A,(a R b) ? (b R a) ? (a b)
  • Let R be a binary relation on set A
  • R is a partial order relation iff R is reflexive,
    antisymmetric, and transitive

21
Total Order
  • Let R be a partial order relation on set A
  • If for any a and b in A, either a R b or b R a,
    then R is a total order relation on A

22
Topological Sorting
  • Given partial order relations R and R on set A,
    R is a topological sorting for R iff R is a
    total order compatible with R
Write a Comment
User Comments (0)
About PowerShow.com