Google
 
web scripts | software engineering | discrete maths | windows| programming
Welcome to RustySpigot, the Computer Science Source

main page

blog

translate
















Gotomeeting Review
Computer Science Notes
Freshlook color blends
Download Callwave
GoToWebinar Download
Printer friendly version

Relations

A relation R on A is defined to be R A x A

  • reflexive


For all a A (a,a) R

  • A reflexive relation R on set X is one where for all a in X, a is R-related to itself.

  • Examples include equality =, < greater/less than or equal to, “is a subset of” , divides |

  • An irreflexive relation R is one where for all a in X, a is never R-related to itself

  • anti-symmetric


  • A binary relation R on a set X is antisymmetric if, for all a and b in X, if a is related to b and b is related to a, then a = b

  • To prove antisymmetric show a1< a2,a2< a1 so a1=a2

Note that 'antisymmetric' is not the logical negative of 'symmetric' (whereby aRb implies bRa).

  • A binary relation R over a set X is symmetric if it holds for all a and b in X that if a is related to b then b is related to a.

  • A bijection A-> B is symmetric since inverse of bijection is a bijection

  • symmetric

  • transitive

  • A binary relation R over a set X is transitive if it holds for all a, b, and c in X, that if a is related to b and b is related to c, then a is related to c.

  • eg divisibiltiy is transitive: a|b and b|c => a|c

  • A bijection A-> B is transitive because composition of bijections is a bijection



Partial order:

A partial order is a binary relation R over a set P which is reflexive, antisymmetric, and transitive



Examples:

  • The set of natural numbers equipped with the lesser than or equal to relation, or with the divisibility relation is a partial order. Under divisibility there is a lower (lcm) and upperbound (gcd)

  • If (A, <A) and (B,<B) are partially ordered sets, then the product order is

    (a1 <A a2) ^ (b1 <A b2) <-> (a1, b1) < (a2, b2)

    ie Its just the Cartesian (normal multiplication) product of the two orders.

You can prove AxB is a partial order as follows:

  • reflexive as (a,b) < (a,b)

  • A and B are antisymmetric, so a1< a2 and a2< a1 so a1=a2 (same with b's) so

    (a1,b1)=(a2,b2)

  • a1<Aa2<Aa3 so a1<Aa3 because <A is transitive, same with b's

    (a1,b1)



Divisibility is a partial order:

  • reflexive a|a

  • antisymmetric a|b => b|a

  • transitive a|b and b|c => a|c



To prove something is a least upper bound, assume there is a lower upper bound, then it divides the elements and either divides the LUB or is the LUB: contradiction. Simliar argument for greatest lower bound.

is a partial order:

  • reflexive AA

  • anti symmetric A B B A=> B=A

  • transitive A B B C => A C

Given A,B X the greatest lower bound is A B and the lowest upper bound is A n B.

This is proved by letting C be g|b, C X and by entailment show either CAB or A n BC

The greatest lower bound of AxB = ( glb(a1,a2) ,glb(b1,b2) )

Subsets including of 0 dont have an upper bound, as 0 doesn't divide natural numbers (when using the divide operator as the PO).

N has no least upper bound (as there is no number bigger than the largest in N), but a greatest lower bound. Its subsets have both.

Lattices:

A lattice is a partially ordered set where every pair of elements has both a least upper bound and a greatest lower bound.



Well founded relation

  • A well founded relation on a set A is a relation A x A such that there are no infinitely descending chains.

  • Any non-empty subset S of a well-founded (relation) set A has a minimal element: Pick an element a0, if it is minimal then stop. Otherwise pick a1 a0. If minimal stop, if not then pick a2 a1. This can't continue for ever as is well founded, therefore there must be a minimal element.

  • If two relations <A on A and <B on B are well founded show that the relation and product relation on AxB are both well founded:

    Consider projection of product order into A -> find minimum.

    Consider proection into B-> find minimum.

    Show minimal

    Observe <L <P





Total order

A total order on a set X is any binary relation on X that is antisymmetric, transitive, and total. This means that if we denote one such relation by = then the following statements hold for all a, b and c in X:

  • if a = b and b = a then a = b (antisymmetry)

  • if a = b and b = c then a = c (transitivity)

  • a = b or b = a (totality)

A relation's property of "totality" can be described this way: that any pair of elements in the set are mutually comparable under the relation.

Notice that the totality condition implies reflexivity, that is a = a. Thus a total order is also a partial order, that is, a binary relation which is reflexive, antisymmetric and transitive.



  • The lexicographical order on the product of a set of totally ordered sets indexed by an ordinal (indexing number, eg first, second etc.) is itself a total order.

  • For example, any set of words ordered alphabetically is a total order, viewed as a subset of a product of a countable number of copies of a set formed by adding the space symbol to the alphabet (and defining a space to be less than any letter).

  • A totally ordered set is said to be complete if every subset that has an upper bound, has a least upper bound.

Equivalence relation

An equivalence relation on a set X is a binary relation on X that is reflexive, symmetric, and transitive. That is, if the relation is denoted by the symbol "~", it holds for all a, b, and c in X that

  1. (Reflexivity) a ~ a

  2. (Symmetry) if a ~ b then b ~ a

  3. (Transitivity) if a ~ b and b ~ c then a ~ c

  • If two equivalence relations over the set X are given, then their intersection (viewed as subsets of X×X) is also an equivalence relation.









Email to a friend | Printer friendly version | Link to this page | Terms of Use | Contact
Unless otherwise noted, content on this site is licensed under Creative Commons Attribution 2.5
Discrete_Maths/Relations.htm was last modified on 2006-12-20 19:16:59