41 lines
2.1 KiB
Markdown
41 lines
2.1 KiB
Markdown
## Types of Relations
|
|
|
|
| Relation | Explanation | Example |
|
|
| ---------------- | :-------------------------------------------------------------------------------------------------------------------- | ------------------------- |
|
|
| *transitive*<br> | "chain reaction", a information about $a$ in relation to $c$ can be inferred from the relations $a -> b$ and $b -> c$ | $a < b, b < c => a < c$ |
|
|
| *reflexive* | every element is related to itself with the given relation | $a <= a, 5 = 5$ |
|
|
| *anti-reflexive* | every element is *NOT* related to itself in the given relation | $a < a$ |
|
|
| *symmetric* | the given relation work both ways | $a = b => b = a$ |
|
|
| *antisymmetric* | the given relation only works both ways if $a$ and $b$ are the same | $a <= b, b <= a => a = b$ |
|
|
|
|
## Equivalence Relations
|
|
A relation $R$ is called _equivalence relation_ when it is _transitive, reflexive and symmetric_.
|
|
|
|
### Example:
|
|
**Question:** How many equivalence classes are there for the given equivalence relation?
|
|
$$
|
|
& ~ "on" {0, 1, 2, 3}^(2) \
|
|
& "defined by" (x_1, y_1) ~ (x_2, y_2) <==> x_1 + y_1 = x_2 + y_2
|
|
$$
|
|
> [!INFO]
|
|
> Meaning:
|
|
> The pairs $(x_1, y_1)$ and $(x_2, y_2)$ are equivalent to each other when the components of the pair added up have the same result.
|
|
|
|
Solving:
|
|
- Smallest possible sum: $(0 + 0) = 0$
|
|
- Biggest possible sum: $(3 + 3) = 6$
|
|
- All possible sums: $0, 1, 2, 3, 4, 5, 6$
|
|
|
|
Each possible sum creates it's own equivalence class. So there are $7$ equivalence classes.
|
|
|
|
> [!NOTE]
|
|
> All equivalence classes:
|
|
> $[0]_(~) = {(0, 0)}$
|
|
> $[1]_(~) = {(0, 1), (1, 0)}$
|
|
> $[2]_(~) = {(0, 2), (1, 1), (2, 0)}$
|
|
>$[3]_(~) = {(0, 3), (1, 2), (2, 1), (3, 0)}$
|
|
>$[4]_(~) = {(1, 3), (2, 2), (3, 1)}$
|
|
> $[5]_(~) = {(2, 3), (3, 2)}$
|
|
> $[6]_(~) = {(3, 3)}$
|
|
|