Lecture notes · Math for Computer Science · Lecture 11

Relations, Partial Orders, and Scheduling

MIT 6.042J Mathematics for Computer Science, lecture 11, explained in plain English

Want this lecture to stick? In LessonBound you get checked practice questions for every part, can ask about anything you don't get, and can listen with your screen off. Free, no ads.

Learn this lecture free

Watch or read the original lecture: MIT OpenCourseWare.

Part 1 · 0:00–10:00

This part explains what a relation is, how to draw one as a directed graph, and three properties (reflexive, symmetric, antisymmetric) that relations can have.

Key ideas

Words to know

relation
A set of pairs that shows which items are linked to which. Think of a list of 'who likes whom' pairs.
cross product
All the possible pairs you can make by taking one item from the first set and one item from the second set.
reflexive
A relation where every item is linked to itself. Everyone in the group has to like themselves.
antisymmetric
A relation where, if x links to y and y links back to x, then x and y must be the same thing. Two different items cannot link to each other both ways.

Example

Imagine a group of friends where an arrow means 'likes.' If Julie likes Bill but Bill does not like Julie, the arrow only goes one way, so this relation is not symmetric. Drawing the arrows makes it easy to see which properties hold and which do not.

3 checked practice questions for this part are in the app.

Part 2 · 10:00–20:00

This part teaches three ways a relation can behave (transitive, symmetric, antisymmetric) and uses them to define equivalence relations and equivalence classes.

Key ideas

Words to know

transitive
A relation is transitive if passing through a middle step carries the link across. If x links to y and y links to z, then x links to z.
symmetric
A relation is symmetric if it works in both directions. If x links to y, then y also links to x.
antisymmetric
A relation is antisymmetric if the only way a link works both ways is when the two items are the same. If x links to y and y links to x, then x and y must be equal.
equivalence class
A group made of every item that is related to a chosen item. All items in the group count as the same in the rule being used.

Example

Think of the rule 'was born in the same month as.' If Ana and Ben share a birth month, then Ben and Ana do too, so the rule works both ways. If Ana and Ben share a month and Ben and Cara share a month, then Ana and Cara share one too. Anyone is also in the same month as themselves, so the rule has all three properties and groups people into twelve equivalence classes.

3 checked practice questions for this part are in the app.

Part 3 · 20:00–30:00

This part explains how equivalence relations split a set into groups, and introduces partial orders and posets, which rank items.

Key ideas

Words to know

equivalence class
A group of items that are all treated as the same under a rule, such as all numbers that give the same remainder when divided by 5.
partition
A way of splitting a whole set into separate pieces, where every item belongs to exactly one piece.
partial order
A rule for ranking items, like less than or equal to, that is reflexive, antisymmetric, and transitive. Not every pair of items has to be comparable.
poset
Short for partially ordered set: a set of items together with a partial order rule.

Example

Think of sorting a pile of coins into piles so that every coin goes into exactly one pile and no coin is left out. Each pile is like an equivalence class, and all the piles together make a partition. The lesson does this with whole numbers, grouping them by their remainder when divided by 5.

3 checked practice questions for this part are in the app.

Part 4 · 30:00–40:00

This part explains how a partial order, a set of 'must come before' rules, can be drawn as a simpler picture called a Hesse diagram.

Key ideas

Words to know

Hesse diagram
A simple picture of a partial order, drawn as a directed graph with the self loops and the transitivity arrows left out.
partial order
A set of rules saying which items must come before others. Some pairs may be unordered.
transitivity
If A comes before B, and B comes before C, then A comes before C, even if nobody drew that arrow.
closure
The full set of arrows you get after adding every arrow that transitivity forces. The lesson uses it to describe the complete, messy graph.

Example

Think about getting dressed for a formal event. Your underwear must go on before your pants, and your pants must go on before your belt, so you also know underwear comes before the belt. A Hesse diagram shows just the key steps like these, and you can work out the rest by following the chain.

3 checked practice questions for this part are in the app.

Part 5 · 40:00–50:00

This part explains why a partial order cannot loop back on itself, which lets us rank its elements, and why some pairs of elements still cannot be compared.

Key ideas

Words to know

poset
A set of items with a rule that says which items are related to which, where the rule follows the partial order rules (reflexive, antisymmetric, and transitive).
directed cycle
A chain of arrows, each pointing to the next, that starts at one item and comes back to that same item.
transitive
A rule where if a is related to b, and b is related to c, then a is also related to c.
incomparable
Two items where neither one is related to the other, so you cannot say which comes first.

Example

Think of a family tree where each person is related to their parents and grandparents. You can never be your own ancestor, so the arrows never loop back. Some pairs of cousins are not directly linked in the way you might expect, so they cannot be ranked against each other in that one way.

3 checked practice questions for this part are in the app.

Part 6 · 50:00–1:00:00

This part explains how a partial order (where some items can't be compared) can be stretched into a total order (a full ranking), and why every finite set of that kind can be ranked this way.

Key ideas

Words to know

poset
A set of items with a partial order, meaning a rule that says some items come before others, but not every pair can be compared.
topological sort
A full ranking of all the items that still follows every 'comes before' rule from the original partial order.
minimal element
An item with no other item in the set that is smaller than it.
chain
A list of different items where each one is related to the next, like a step-by-step line going up the order.

Example

Think of getting dressed. Socks must go on before shoes, and underwear must go on before pants, but socks and a shirt have no required order between them. A topological sort is one complete line-up of all the steps that still respects every must-come-before rule.

3 checked practice questions for this part are in the app.

Part 7 · 1:00:00–1:03:55

This part proves that in a finite set with an ordering, the start of a longest chain is a minimal element, meaning nothing in the set is smaller than it.

Key ideas

Words to know

chain
a list of elements where each one is related to the next, like a line of people where each stands behind the one before.
cycle
a loop that goes around and comes back to where it started, like walking in a circle. A poset does not allow one.
contradiction
a statement that cannot be true, because it clashes with something already known. Proofs reach a contradiction to show an assumption is wrong.
minimal element
an element with nothing in the set that is smaller than it.

Example

Imagine a line of people standing one behind another, as long as possible. If someone outside the line could step to the front and still fit the order, the line was not the longest possible. That is the same logic the proof uses: a longer chain would break the assumption that the chain was the longest.

3 checked practice questions for this part are in the app.

← Lecture 10: Graph Theory III · Lecture 13: Sums and Asymptotics →

Notes written by AI (Claude) from the lecture's official transcript, so check anything important against the lecture. MIT OpenCourseWare · CC BY-NC-SA 4.0 · not affiliated with or endorsed by MIT. These notes are shared under the same license.

LessonBound · Free lecture notes · Privacy · Terms · New York