TITLE: Notation/definition problem for commutative binary operation
QUESTION [7 upvotes]: I'm trying to describe/define the commutative binary operation on a three-element set which when the operands are the same, gives the same element and when they are different gives the element which is not an operand.
So for $\{a,b,c\}$, if we denote the operation $\#$:
$$a\#a=a\quad \text{and}
 \quad a\#b=c \quad\text(etc.)$$
I suppose I could just define it case-by-case, but the notion of "the one that's either both of these or neither of these" is so intuitive and natural that that seems like a clunky solution. It also wouldn't be particularly useful to me. I want to describe it with a notation/definition which will lend itself to arguments regarding member-wise application of the operation on tuples i.e.
$$(x_1,y_1,z_1...)\mathbf{\#}(x_2,y_2,z_2,...)=(x_1\#x_2,y_1\#y_2,z_1\#z_2,...)$$
In particular I want to discuss the properties of tuple-chains which, through repeated application of the member-wise operation, transform any given tuple into another. That is, I want to find out, given tuples $\mathbf {s}=(x_s,y_s,z_s,...)$ and $\mathbf{d}=(x_d,y_d,z_d,...)$, and considering $\mathbf{\#}$ to be right-associative, what can I say about the tuples in the sequence $\mathbf{C}=\mathbf{t_0},\mathbf{t_1},..\mathbf{t_n}$ if I know that$$\mathbf{t_0\#t_1\#}...\mathbf{\#t_n\#s}=\mathbf{d}$$
I'm not currently looking for help with that question, as I want to explore it myself for a while, and it's pretty open-ended anyway, but I have some ideas I'm setting out to prove, and I'm having trouble developing a formal definition of $\#$ that is useful in this context.
Any Ideas?

REPLY [2 votes]: I just came across this question from last year. If you're still interested, here's a simple solution:
Use the set $\mathbb{Z}_3$ of integers modulo $3$ as your three-element set, and define $$x\,\#\,y=2(x+y) \pmod{3}.$$

By the way, if you liked @BarryCipra's idea of using the cube roots of unity as your three-element set, you can define $x\,\#\,y$ to be $x^2 y^2$ or, equivalently, $\dfrac1{xy}.$  This is isomorphic to the solution using $\mathbb{Z}_3$ in the first part of this answer.