Send
Close Add comments:
(status displays here)
Got it! This site "robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website. Note: This appears on each machine/browser from which this site is accessed.
Equivalence relations: math
1. Equivalence relations: math
Let us look at the mathematical concept of equivalence relations. The idea is based the concept of "equality".
2. Equality
What does it mean for two things to be "
equal"?
Is an orange "equal" to an apple?
Is an apple "equal" to an apple?
The idea of equivalence and equality depends on the definition of equality that is being used.
3. Declaration of Independence
Consider the part of the United States Declaration of Independence that goes as follows (July 4, 1776).
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness
This appears to say that all men (presumably mankind, one place for discussion) are created (how were they created, another place for discussion) "
equal". Do they stay "
equal". And so forth.
Let us return the world of abstract mathematics (as symbol manipulation) and look at the concept of equivalence relations.
4. Relations
A mathematical "relation" is a comparison between two elements of a set (or population) where each comparison is either true or false.
Consider the relation R as "is the same sex/gender as" when comparing two people. Let us assume that this is possible to do (perhaps in a possibly non-politically correct manner).
For example purposes, let us use the set (or population) of people in the audience.
5. Equivalence relation
An "equivalence relation" is a relation R on a set A that is reflexive, symmetric, and transitive.
6. Reflexive properties
7. Reflexive property
A relation
R on set
A is
reflexive if for every
x in
A,
x R x.
This can be written in mathematical form as follows.
This is read as "
for all x in (set) A, (condition) x R x (is true)"
8. Universal quantification
Universal quantification involves "
for all" within a certain domain set.
The symbol "∀" is read as "for all".
The symbol "∈" is read as "in" which is short for "is an element of" (the domain set that follows).
The symbol ":" (colon) can be thought of as saying "such that" or "it is true that" (what follows).
9. Peano: symbols
The "
there exists" symbol "
∃", and many others, were created by the Italian mathematician Giuseppe Peano (1858-1932), many by reversing letters or turning them upside down.
Peano created the "
or" symbol as "
∨" from the letter "
v" starting the Latin word
"vel" ≈ "or". The "
and" symbol "
∧" is an upside down "
or" symbol.
Other mathematicians then followed this convention in creating more symbols over time. One such symbol was the "
for all" symbol "
∀" first used in 1935 by logician Gerhard Gentzen (1909-1945) and called it, in German, "
All-Zeichen", the "
all character"
10. Example
An example is as follows.
This is read as "
for all x in the set 1, 3, 5, x is an add number"
11. Management
Rather than specify what one has done, management may generalize what you have done as "
Thank you for all that you do".
Translation: It is too hard to actually determine what you did or list everything that you did. It is much less for us to make a vague general statement that covers everything that you might have done.
12. Math
13. Reflexive laughing
An example of a
reflexive rule is the following.
It is good to be able to laugh at oneself.
Being able to laugh at yourself is said to help one live longer.
Here, the "
laugh at" relation is applied
reflexively to itself. That is, relating "
laugh at" from "
you" to "
you".
14. Not reflexive laughing
Have you heard that laughing at your spouse may help shorten your life?
Here, the "
laugh at" relation is not applied reflexively.
15. Laughing summary
Here is the diagram to summarize these laughing ideas.
The relation
R as "
is the same sex/gender as" is reflexive, since
person
x "
is the same sex/gender as" person
x.
Does a rule apply to itself? If so, the rule is reflexive.
16. Self reference
Are you the same sex or gender, whatever that is, as yourself?
Except for negation, most logical (not human) rules are reflexive.
Do some people apply rules to others but not to themselves?
17. Do as I say
Whenever someone says, "
Do as I say, not as I do" they are applying a rule to others but not to them-self. That is, the rule, to them, is not a reflexive rule. In such a case, one might call the person a "
hypocrite" using the modern sense of the word.
18. Everyone do this
The pattern becomes more clear with a diagram. The rule applies to everyone, which includes self. Negation results in interesting ideas.
Math proof that disproves itself (incompleteness)
Halting problem that detects itself halting (incomputability)
Minimal programs that detect randomness
19. Symmetric property
A relation
R on set
A is
symmetric if for every
x and
y in
A,
x R y implies that
y R x.
This can be written in mathematical form as follows.
This is read as "
for all x and y in (set) A, (condition) x R y implies (condition) y R x"
The symbol "⇒" is read as "implies" where the result is true if when the left condition is true the right condition is true.
20. Symmetry
The relation
R as "
is the same sex/gender as" is symmetric, since
person x "is the same sex/gender as" person y implies that
person y "is the same sex/gender as" person x.
Note that the relation applies both ways, since the elements identified by
x and
y can be reversed.
Does the rule go both ways? Is it a commutative property?
21. Commutativity
A commutative property is a rule where the order does not matter.
22. Addition
Addition and multiplication are commutative/symmetric operations where order does not matter.
2 + 3 = 5
3 + 2 = 5
2 * 3 = 6
3 * 2 = 6
23. Subtraction
Subtraction and division are non-commutative/non-symmetric operations where order does matter.
5 - 2 = 3
2 - 5 = -3
5 / 2 = 2.5
2 / 5 = 0.6
24. Transitive property
A relation
R on set
A is
transitive if for every
x,
y, and
z in
A,
x R y and
y R z implies that
x R z.
This can be written in mathematical form as follows.
This is read as "
for all x and y and z in (set) A, (condition) x R y and (condition) y R z implies (condition) x R z"
The symbol "
∧" is read as "
and" and means that both conditions must be
true for the result to be
true.
The relation
R as "
is the same sex/gender ass" is transitive, since
person x "is the same sex/gender as" person y and
person y "is the same sex/gender as" person z implies that
person x "is the same sex/gender as" person z.
25. Equivalence relation
A relation
R on set
A is an equivalence relation if the following properties hold.
reflexive: ∀ x ∈ A : x R x
symmetric: ∀ x, y ∈ A : x R y ⇒ y R x
transitive: ∀ x, y, z ∈ A : x R y ∧ y R z ⇒ x R z
Equivalence classes reduce the amount of information that must be considered when working with properties of the set
A.
26. Equivalence class methodology
The general approach to the equivalence class methodology is as follows.
Determine a relation.
Verify that the relation has the reflexive, symmetric, and transitive properties.
Determine equivalence classes using some method or algorithm.
Use the equivalence classes as needed to solve some identified problem.
27. Equivalence relation example
To review, here is the example.
Let A be the set of "people in the audience".
Let R be "is the same sex/gender as".
Let x, y, and z be three different people in the audience.
Then relation
R is an equivalence relation on set
A.
Thus if we assume that there are two possible sexes or genders, then there are (at most) two possible equivalence sets in the set of people in the audience.
The audience may be all male.
The audience may be all female.
There may be no audience - the degenerate case.
28. Degenerate cases: example
Degenerate cases should also be handled, such as zero or one piece of data.
What might I mean when I say that "rap music is a degenerate form of music"?
If I assume that music consists of melody, harmony, and rhythm, then, since rap music consists of primarily rhythm without discernible melody or harmony, then it is a degenerate form of music since not all parts of music are present.
That does not mean that it is bad, it just means that, from an analysis point of view, not all possible components of music, from the above definition, are present.
Note that a melody of all the same duration of note without harmony is also a degenerate form of music.
A common error in computation (e.g., programming) is a failure to handle degenerate instances of the problem.
29. Degenerate cases
In the case of determining the rules for the relation, there are two degenerate cases (see above) that can arise when one cannot determine a definite rules.
1. Everything is related to everything else.
2. Nothing is related to anything else.
In the first case where everything is related to everything else, the relation is always true, so every element belongs to the same and only equivalence class - which may not very useful.
In the second case where nothing is related to anything else, the relation is always false, so each element is not related to any other item, and so each element is a separate equivalence class - which may not be very useful.
30. Algorithms
There are computer algorithms that, given two sets and a relation definition will determine the equivalence classes. These can be somewhat involved, both in implementation and performance analysis, and are omitted here.
31. Union-find
In the well-known union-find problem,
Find and
Union are defined as follows.
Find(x) returns the set identifier of the element x. Elements x and y are in the same set if Find(x) = Find(y).
Union(x,y) merges the sets x and y and returns the merged set.
32. Heuristics
The heuristics for the union-find algorithm are as follows.
The heuristic for a Union is to always merge the smaller tree into the larger tree. For this problem, one of the sets will be known to be the smallest tree (i.e., a singleton set).
The heuristic for a Find is that path compression is used in that once the root of the tree is found, the path is traversed a second time so that all elements in the path point to the root.
33. Complexity
The asymptotic worst-case complexity of the union-find algorithm, due to Tarjan, R. (1983).
Data structures and network algorithms. Philadelphia, PA: Society for industrial and applied mathematics., is
O((m+n) α(n)) where
n is the number of nonempty cells (i.e., starting singleton sets),
m is the number of Union and Find operations, and
α is the inverse Ackerman's function, which grows very slowly.
34. Convex hull
Many solutions to the convex hull problem require handling the Union-Find problem.
35. Observations
Note that one must determine the precise rule or relation first and then apply it to the set or population to get the equivalence sets.
Note that any given element can belong to one and only one equivalence set - due to the reflexivity property.
36. End of page