# Largest subset of $S^n$ without a loop for each element for a particular 3-element commutative magma $S$.

Let $S$ be the $3$-element commutative magma with the operation that gives the same element when the operands are the same, and the excluded element when the operations are different (i.e. $S=\{\{a,b,c\},+\}$ where $a+a=a$, $a+b=c$ and $f:\{a,b,c\} \rightarrow \{a,b,c\}$ is an automorphism on $S$ iff it is a permutation of $\{a,b,c\}$). If $H$ is a subset of $S^n$ and $h\in H$ we say $H$ has a loop for $h$ if there is an ordering of the elements $x_i \in H \setminus \{h\}$ where $x_i \neq x_j$ for $i\neq j$ such that $h+x_1+x_2\dots+x_k=h$ for some $k\le |H|-1$.

Given $n$, what is the cardinality of the largest subset $H$ of $S^n$ with no loop for at least one $h \in H$?

Note: I've asked vairiants of this on Math.SE before (more than a year ago) but gotten no answers and little attention. I thought that this could be because of the way the question was posed, so I thought I would re-phrase and re-post it to see if I could get a better response. I hope this is kosher. if not, I'm open to suggestions as to what I should do instead. If you're wondering why I included the card-games tag, it's because this question is about a variant I created of the card game Set, using a Set-like deck with $n$ properties. Also, I think this is still not a particularly well-worded question. I suspect I lack the vocabulary and/or experience to phrase it better, and would welcome any suggestions as to how to state it more succinctly/clearly.

Edit: I was looking back over this problem and realized two things:

1. It doesn't actually ask the question I originally intended to ask (I tripped myself up when formalizing it).

2. Some assertions that I made regarding the answer apply to the intended question and not this one, and are wrong for this question. I'm not deleting this question, because it's related, and I think it's reasonably interesting in it's own right, however, I am removing the erroneous claim and posting a new question asking what I orginally intended. Here is the new question.