relations - discrete math

Relation description

Def 1:

  • a binary relation R consists
    • set A: domain of R
    • set B: codomain of R
    • subset of A x B: graph of R
  • example:
    • A = {1,2}
    • B = {a,b,c},
    • R = {(1,a),(1,b),(2,c)} is a relation from A to B, or a subset of A x B
  • note:
    • : R is a relation from A to B
    • "": the pair (a, b) in the graph of R
  • confusing example:

Relation Types:

Reflexive, Symmetric, Transitive

  • A relation R on set S is:
  • Reflexive:
    • every element in S is related to itself
    • if for all
    • eg: the β€œequal” relation is reflexive, as every number is equal to itself
    • tips: is x β€œthe relation” to x correct
  • Symmetric:
    • order of elements in the pair don’t matter
    • , then
    • eg. the β€œis sibling of relation is symmetric” as if x is sibling of y, then y is also sibling of x
  • Transitive: (suy ra)
    • if x related to y, y related to z, then x is also related to z
    • if , and , then

Inverse relation

  • of is the relation from B to A defined by
  • change the position & reverse arrow sign: into