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:Aβ>B: R is a relation from A to B
- "aRb": 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 (x,x)βR for all xβS
- 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
- (x,y)βR, then (y,x)βR
- 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 (x,y)βR, and (y,z)βR, then (x,z)βR
Inverse relation
- Rβ1 of R:AβB is the relation from B to A defined by (bRβ1a)IFF(aRb)
- change the position & reverse arrow sign: AβB into BβA