Applications of Relations


Discrete Mathematics I

10th lecture, December 13, 2019

Martin J. Dürst


© 2005-19 Martin J. Dürst Aoyama Gakuin University

Today's Schedule




Summary of Last Lecture


Last Week's Minitest


Last Week's Homework
Examples of Relations

Comment: Homework can also be submitted in Japanese

Describe three relations from the real world that can be expressed as mathematical relations.
For each relation, describe the sets used (including their size), the conditions for a tuple to be a member of the relation, the size of the Cartesian product, and the size of the relation, and give three examples of tuples belonging to the relation.

  1. A binary relation on a single set.

    Example solution: Relation on set of train stations (size ~1'000 for Kanto region), tuples of stations that can be reached from each other without changing trains, size of Cartesian product: ~1'000'000, size of relation ~50'000.
    Examples of tuples: (Fuchinobe, Nagatsuta), (Nagatsuta, Shibuya), (Hashimoto, Shinjuku); counterexample: (Fuchinobe, Shibuya)

  2. A binary relation between two different sets.

    Example solution: Marriage: Relation between a set of men and a set of women, for both sets, the size is ~4·109, size of Cartesian product is ~16·1018, size of relation is ~2·109
    Examples of tuples: (Daigo, Keiko Kitagawa), (Yoshitomo Tani, Ryoko Tani (née Tamura)), (Tom Brady, Giselle Bündchen)

  3. A relation between more than two sets.

    Example solution: Baseball: Relation between set of teams (~100), set of players (~10000), set of positions (9), and set of numbers in batting order (9), size of Cartesian product is ~81'000'000, size of relation is ~900
    Example (outdated): (Miami Marlins, Ichiro Suzuki, right field, 1st),...


Properties of Relations

A binary relation on A can be:

  1. Reflexive: xA:xRx; ∀xA: (x, x) ∈ R
  2. Symmetric: ∀x, yA: xRyyRx;
    x, yA: (x, y) ∈ R ⇔ (y, x) ∈ R
  3. Antisymmetric: ∀x, yA: xRyyRxx=y
  4. Transitive: ∀x, y, zA: xRyyRzxRz


Reflexive Relation


Symmetric Relation


Antisymmetric Relation


Transitive Relation


Additional Observations


Transitive Closure

int change = 1;
while (change) {
    change = 0;
    /* process data */
    if (/* data changed */)
        change = 1;


Cautions about Transitive Closure

Calculating the transitive closure of a relation may not be possible.

The calculation may not converge to a fixpoint.

Relations on sets of size 2:


Relations and Functions


Relations and Predicates


Equivalence Relation


Partial Order


Examples of Order Relations

Some examples need a careful definition:


Hasse Diagram

An order relation can be represented by a Hasse diagram.

How to convert a directed graph of an order relation to a Hasse diagram:

  1. Remove arrows that indicate reflexivity
  2. Rearange the vertices of the graph so that all arrows point upwards (or downwards)
  3. Remove the arrows that can be reconstructed using transitive closure
  4. Remove the arrowheads

Example: The relation "divisible by" on the set {12, 6, 4, 3, 2, 1}


Equivalence Relations and Order Relations in Matrix Representation


Total Order

If for all elements b and c in a set A,

if either bc or cb, then

≥ is a total order (relation) or linear order (relation)

(∀b, cA: bccb ⇔ ≥ is a total order on A)

The Hasse diagram of a total order is a single line, without branches

Examples: ≥ for integers or rational; dates or time; order of words in a dictionary




This Week's Homework

Deadline: December 17, 2019 (Monday), 17:00.

Format: A4 single page (using both sides is okay; NO cover page), easily readable handwriting (NO printouts), name (kanji and kana) and student number at the top right

Where to submit: Box in front of room O-529 (building O, 5th floor)

Investigate all combinations of the four properties of relations introduced in this lecture (reflexive, symmetric, antisymmetric, transitive). For each combination, give an example relation on the minimum size set possible, or explain why such a combination is impossible. Present the 16 combinations in a table similar to the tables used in the homework of lecture 4. In the table, also include a column with the minimum size of the set on which the example relation is formed. Use {b}, {b, c}, and {b, c, d} for sets with one, two, and three elements, respectively.

Hint: Two combinations are impossible. One combination is possible with a relation on an empty set. One combination is possible with a relation on a set of size one. Four combinations are possible with a relation on a set of size two. The other combinations need a relation on a set of size three.

Hint: Start with small sets and check properties.

Additional homework: Bring some small scissors to the next lecture.



reflexive relation
(main) diagonal
(主) 対角線
symmetric relation
(matrix) transposition
(行列) 転置
兄弟 (姉妹も含む)
antisymmetric relation
asymmetric relation
transitive relation
transitive closure
equivalence relation
equivalence class
representative (element)
partial order
partial order relation
order relation
partially ordered set
ordered set
mutually exclusive
Hasse diagram
vertex (plural vertices)
(グラフの) 節、頂点
total order (relation)
全順序 (関係)、線形順序 (関係)