Raw

2. Methodical guidelines / Методичні вказівки

This section is self-contained: it collects all the theory needed for the theme — binary relations, their representations, properties, operations, and types — together with the techniques used to solve the tasks in 3classroom.md. No outside material is required.

2.1 What a relation is

A binary relation RR from a set AA to a set BB is any subset of the Cartesian product A×BA \times B — that is, any set of ordered pairs (a,b)(a,b) with aAa \in A and bBb \in B. When (a,b)R(a,b) \in R we say “aa is related to bb” and write aRba\,R\,b; otherwise a̸ ⁣Rba \not\!R\,b.

Most of this work concerns a relation on a set AA: a subset of A×AA \times A. Because A×AA \times A has A2|A|^2 pairs, there are 2A22^{|A|^2} different relations on AA. Two special relations recur:

  • the identity (equality) relation {(a,a):aA}\{(a,a) : a \in A\} — every element related only to itself;
  • the empty relation \varnothing and the universal relation A×AA \times A.

2.2 Three ways to represent a relation

The same relation can be written in three interchangeable forms; a task may ask for any of them.

  • Ordered pairs — list the members of RR, e.g. R={(1,2),(2,3),(1,3)}R = \{(1,2),(2,3),(1,3)\}.
  • Boolean matrix MRM_R — an A×A|A|\times|A| grid with Mij=1M_{ij} = 1 exactly when (ai,aj)R(a_i, a_j) \in R, and 00 otherwise. Rows are the “from” element, columns the “to” element.
  • Directed graph (digraph) — draw a node for each element of AA and an arrow aba \to b for each pair (a,b)R(a,b) \in R. A pair (a,a)(a,a) becomes a self-loop.

For example, R={(1,1),(1,2),(2,3)}R = \{(1,1),(1,2),(2,3)\} on {1,2,3}\{1,2,3\} has the matrix 110001000\begin{smallmatrix}1&1&0\\0&0&1\\0&0&0\end{smallmatrix} and a digraph with a loop at 11 and arrows 121\to 2, 232\to 3.

2.3 The core properties

Let RR be a relation on a set AA. The properties tested throughout this work are:

Property Definition In the digraph In the matrix MRM_R
Reflexive (a,a)R(a,a) \in R for every aAa \in A a self-loop at every node the whole diagonal is 11
Irreflexive (a,a)R(a,a) \notin R for every aAa \in A no self-loops anywhere the whole diagonal is 00
Symmetric (a,b)R(b,a)R(a,b)\in R \Rightarrow (b,a)\in R every arrow has a reverse MRM_R is symmetric (Mij=MjiM_{ij}=M_{ji})
Antisymmetric (a,b)R(a,b)\in R and (b,a)Ra=b(b,a)\in R \Rightarrow a=b no two distinct nodes joined both ways no iji \neq j with Mij=Mji=1M_{ij}=M_{ji}=1
Asymmetric (a,b)R(b,a)R(a,b)\in R \Rightarrow (b,a)\notin R no reverse arrow and no self-loop zero diagonal and no mirror pair
Transitive (a,b),(b,c)R(a,c)R(a,b),(b,c)\in R \Rightarrow (a,c)\in R every 2-step path abca\to b\to c has a shortcut aca\to c the $1$s of the Boolean MR2M_R^2 are already 11 in MRM_R
Antitransitive (a,b),(b,c)R(a,c)R(a,b),(b,c)\in R \Rightarrow (a,c)\notin R no 2-step path has a shortcut wherever MR2M_R^2 has a 11, MRM_R has a 00

Small digraphs illustrating the reflexive, symmetric, antisymmetric, and transitive properties

Three cautions that decide many exercises:

  • Reflexive and irreflexive are not opposites. A relation can be neither — e.g. {(1,1)}\{(1,1)\} on {1,2}\{1,2\} has a loop at 11 (so not irreflexive) but misses the loop at 22 (so not reflexive).
  • Antisymmetric is not “not symmetric.” They are different conditions. The identity relation is both symmetric and antisymmetric; many relations are neither. Antisymmetry only forbids a 2-cycle between distinct elements — self-loops (a,a)(a,a) never violate it. Asymmetric is the stronger cousin: asymmetric == irreflexive ++ antisymmetric (a strict order such as << is the archetype).
  • A “no” needs a witness. To disprove a property, exhibit one concrete offending pair (or missing pair): e.g. “not transitive because (1,2),(2,3)R(1,2),(2,3)\in R but (1,3)R(1,3)\notin R.”

2.4 Operations on relations

Since relations are sets of pairs, the set operations apply directly. For relations RR and SS on AA:

Operation Definition
Union RS={(a,b):(a,b)R or (a,b)S}R \cup S = \{(a,b) : (a,b)\in R \ \text{or}\ (a,b)\in S\}
Intersection RS={(a,b):(a,b)R and (a,b)S}R \cap S = \{(a,b) : (a,b)\in R \ \text{and}\ (a,b)\in S\}
Difference RS={(a,b):(a,b)R and (a,b)S}R \setminus S = \{(a,b) : (a,b)\in R \ \text{and}\ (a,b)\notin S\}
Complement R=(A×A)R={(a,b):(a,b)R}\overline{R} = (A\times A)\setminus R = \{(a,b) : (a,b)\notin R\}
Inverse R1={(b,a):(a,b)R}R^{-1} = \{(b,a) : (a,b)\in R\}

The complement is taken relative to the universe A×AA \times A (all A2|A|^2 possible pairs), so always know how large A×AA \times A is. The inverse simply reverses every pair (reverses every arrow in the digraph, transposes the matrix): if RR means “aa divides bb”, then R1R^{-1} means “aa is a multiple of bb.”

(A related construction, used later, is composition SR={(a,c):(a,b)R and (b,c)S for some b}S \circ R = \{(a,c) : (a,b)\in R \text{ and } (b,c)\in S \text{ for some } b\} — “follow RR, then SS.” It is not needed for this work.)

2.5 Types of relation

Certain combinations of properties have names and great importance:

  • Equivalence relationreflexive + symmetric + transitive. It models a notion of “sameness” and splits AA into disjoint equivalence classes (a partition): each element lies in exactly one class of things related to it. Examples: equality, “same remainder mod nn”, “on the same team.”
  • Partial orderreflexive + antisymmetric + transitive. It models a consistent “\le” in which some elements may be incomparable. Examples: \le on numbers, \subseteq on sets, and divisibility aba \mid b on the positive integers.

Recognising a type is just checking the three defining properties and naming the result.

2.6 Working checklist

  • To classify a relation, test the six properties one at a time; for each, either argue it holds for all required pairs, or give one counterexample.
  • Watch the two traps: reflexive needs (a,a)(a,a) for every aa (a single missing loop kills it); antisymmetric is about distinct elements only.
  • For a relation defined by a formula on the integers, test a property by reasoning about the formula (e.g. “xy=yxxy=yx, so the relation xy1xy\ge 1 is symmetric”) and disprove it with a specific small pair.
  • For an operation task, write both relations as pairs first, then combine; for a complement, remember the universe is A×AA\times A.
  • To find a type, check reflexive + (symmetric ⇒ equivalence) or (antisymmetric ⇒ partial order), together with transitive.

Practical/Practical2/2method.md · 6.5 KB · updated 2026-08-01 20:18