I was trying to write an equation that showed that three elements of a set were all equal to one another without relying on the transitive property.
For some set of elements ${\{A, B, C}\}$, if the transitive property holds then the equation that shows that they are all equal to one another can be written as follows:
$$A=B=C$$
Assuming that the transitive property holds, the relation $A=C$ is implied without being written.
However, if the transitive property does not hold, the shortest way to write this equivalence equation is as follows:
$$A=B=C=A$$
For 3 elements in a set there are only 3 relationships (between two elements) which means the equation above is (one of) the shortest way of representing all the equivalence relationships as it only uses three equal signs.
I was then wondering whether I could write a similar equation for a set of four elements. The shortest one that I could find is the following example:
$$A=B=C=D=A=C=B=D$$
The above equation is a bit problematic as the relation $B=C$ is written twice which means the above equation requires 7 equal signs even though there are only 6 unique relationships between two elements in the set. I don't think it is possible to represent the equation with only 6 equal signs though.
In contrast, I was able to find to find the shortest length for a set of 5 elements as shown below:
$$A=B=C=D=E=A=C=E=B=D=A$$
There are only 10 pairs in the set and the length only uses 10 equal signs thus avoiding any redundant writing.
$$$$
I am pretty sure that all sets with an odd number of elements can be represented without redundancy. I am pretty sure that sets of even numbers greater than 2 require at least one redundant written relationship but am unsure of how much redundant writing is required for even numbers after 4.
Is there a way to determine the necessary amount of redundant writing for the even numbers greater than 2?

