Relations and Partial Orders, Slides of Discrete Mathematics

Relations, their properties, and closure. It also covers equivalence relations, partial orders, and lattices. The reflexive, symmetric, and transitive closure of a relation is explained with examples. The Warshall's algorithm is used to compute the transitive closure. Equivalence classes and partial orders are defined, and the concepts of maximal, minimal, maximum, minimum, join semi-lattice, meet semi-lattice, and lattice are explained.

Typology: Slides

2021/2022

Available from 08/19/2022

SamenKhan
SamenKhan 🇵🇰

231 documents

1 / 33

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Relations
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21

Partial preview of the text

Download Relations and Partial Orders and more Slides Discrete Mathematics in PDF only on Docsity!

Relations

Outline

  • (^) Relation:
  • (^) Properties
  • (^) Combining relations
  • (^) Representing relations
  • (^) Closure of relations
    • (^) Reflexive closure, diagonal relation, Warshall’s Algorithm,
  • (^) Equivalence relations:
    • (^) Equivalence class, partitions,
    • (^) Partial order (POSET)
    • (^) Hasse Diagram, POSET, Minimal, Maximal, Minimum, Maximum, Upper bound, lower bond, Least Upper bound, greatest lower bound, Lattices

Reflexive Closure

  • (^) In general, the reflexive closure of a relation R

on A is R where ={ (a,a) | aA}

  • (^)  is the diagonal relation on A
  • (^) Question : How can we compute the diagonal

relation using

5

Reflexive Closure

  • (^) Example: Consider the relation R = {(1,1), (1,2), (2,1), (3,2)} on set {1,2,3}
    • (^) Is it reflexive?
    • (^) How can we produce a reflective relation containing R that is as small as possible?

7

Reflexive Closure – Cont.

  • (^) The diagonal relation on A is:  = {( a , a ) | aA }.
  • (^) The reflexive closure of R is then: R  .
  • (^) Properties:
    • (^) R  ( R  );
    • (^) R   is reflexive;
    • (^)  S ( RSS is reflexive)  ( R  )  S.
  • (^) In zero-one matrix notation: M R  M
  • Turn on all the diagonal bits!

8

Example

  • (^) Consider R = {( a , b ) ZZ | a < b }
  • (^) The reflexive closure of relation R is: R   = {( a , b ) ZZ | a < b }  {( a , a ) | aZ } = {( a , b ) ZZ | ab }

10

Symmetric Closure (optional)

  • (^) Example: Consider

R ={(1,1), (1,2), (2,2), (2,3), (3,1), (3,2)}

  • (^) R is not symmetric; the pairs missing are: (2,1), (1,3).
  • (^) If we add those, we obtain the new relation: {(1,1), (1,2), ( 1 , 3 ), ( 2 , 1 ), (2,2), (2,3), (3,1), (3,2)}. The new relation is symmetric.

11

Symmetric Closure (optional)

  • (^) When a relation R on a set A is not symmetric:
    • (^) How to minimally augment R (adding the minimum number of ordered pairs) to have a symmetric relation?
    • (^) The symmetric closure of R.

13

Transitive Closures

  • (^) Consider R = {(1,3), (1,4), (2,1), (3,2)}.
    • (^) R is not transitive;
    • (^) What are the missing terms?
      • (^) Few are: (1,2), (2,3), (2,4), (3,1).
    • (^) If we add those, we obtain the new relation: {(1,2), (1,3), (1,4), (2,1), (2,3), (2,4), (3,1), (3,2)}.
    • (^) Is the above relation transitive?
    • (^) No, it is not. Missing terms such as (1,1), (2,2)… Transitive closure is more complicated to build.

14

Transitive Closure

  • (^) When a relation R on a set A is not transitive:
    • (^) How to minimally augment R (adding the minimum number of ordered pairs) to have a transitive relation?
    • (^) The transitive closure of R.

Warshall’s Algorithm: Example

  • (^) Compute the transitive closure of
    • (^) The relation R={(1,1),(1,2),(1,4),(2,2),(2,3),(3,1), (3,4),(4,1),(4,4)}
    • (^) On the set A={1,2,3,4}

Warshall’s Algorithm

  • (^) Let A={a,b,c,d}
  • (^) R={(a,b),(b,a),(b,c),(c,d)}

Equivalence Relation

  • (^) Consider the set of every person in the world
  • (^) Now consider a R relation such that (a,b) R if a and b are siblings.
  • (^) Clearly this relation is
    • (^) Reflexive
    • (^) Symmetric, and
    • (^) Transitive
  • (^) Such as relation is called an equivalence relation
  • (^) Definition : A relation on a set A is an equivalence relation if it is reflexive, symmetric, and transitive

Equivalence Relation

  • (^) A={1,2,3}
  • (^) R= {(1,1),(2,2),(3,3)}