Definition
A relation on a set is a partial order if it is:
- Reflexive:
- Antisymmetric:
- Transitive:
A set with a partial order is called a partially ordered set or poset, written .
Examples
Divisibility on
(a divides b) is a partial order.
Subset Relation
on a power set .
Less Than or Equal ()
on is a partial order (actually a total order).
Lexicographic Order
For strings: compare character by character.
Comparability
In a poset :
- and are comparable if or
- and are incomparable if neither nor
In :
- and are comparable ()
- and are incomparable
Total Orders
A partial order is a total order (or linear order) if every pair is comparable:
Examples:
- on — total order
- on — NOT total (unless )
Hasse Diagrams
A visual representation of a finite poset:
- Draw elements as points
- Draw line from (lower) to (higher) if with no element between
- Omit reflexive loops and transitive edges
Example: Divisibility on
12
/ \
4 6
| /|
2 3 |
\ | /
1
Special Elements
Maximal and Minimal
- is maximal if (nothing above it)
- is minimal if (nothing below it)
A poset can have multiple maximal/minimal elements.
Greatest and Least
- is the greatest element (maximum) if
- is the least element (minimum) if
A poset has at most one greatest/least element.
Upper and Lower Bounds
For subset :
- is an upper bound of if
- is a lower bound of if
Least Upper Bound (LUB) / Supremum
The least upper bound of , written or , is the smallest upper bound.
Greatest Lower Bound (GLB) / Infimum
The greatest lower bound of , written or , is the largest lower bound.
Lattices
A poset is a lattice if every pair of elements has:
- A least upper bound (join):
- A greatest lower bound (meet):
Examples
- with and
- with and
Well-Ordering
A poset is well-ordered if:
- It is a total order
- Every non-empty subset has a least element
Examples
- — well-ordered
- — NOT well-ordered (no least element)
- — NOT well-ordered ( has no least element)
Well-Ordering Theorem
Every set can be well-ordered (equivalent to Axiom of Choice).
Topological Sorting
Given a partial order on a finite set, a topological sort is a total order consistent with the partial order.
Algorithm
- Find a minimal element
- Remove it and add to sorted list
- Repeat until empty
Example
For tasks with dependencies, topological sort gives a valid execution order.
Chains and Antichains
- A chain is a totally ordered subset
- An antichain is a set of pairwise incomparable elements
Dilworth's Theorem
In a finite poset, the minimum number of chains needed to cover all elements equals the maximum size of an antichain.