Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to derive a non-associative operation $\circ$ such that $C = A \circ B$ and that same $C$ can not be obtained by any other combination(s) of $A$ and $B$ e.g. much like $C = \operatorname{hash}(A, B)$

share|cite|improve this question
You should give some more information. What are $A,B$? Since you included the operator theory tag, I assume they are operators on some Banach space? Is "hash" some well known function? If so include a link. Otherwise say explicitly what you mean by $C = \text{hash}(A,B)$. – user12014 Oct 26 '11 at 17:34
What kind of things are $A$ and $B$? – Henning Makholm Oct 26 '11 at 17:35
That's not a hash. A hash is meant not to be injective. – joriki Oct 26 '11 at 17:35
A and B are positive integers – Neel Basu Oct 26 '11 at 17:51
up vote 3 down vote accepted

You can take $C=2^A3^B$. This is injective and not associative, since e.g. $(1\circ1)\circ1=2^13^1\circ1=6\circ1=2^63^1=192$, whereas $1\circ(1\circ1)=1\circ6=2^13^6=1458$.

[Edit in response to the comment:]

Almost all operations are not associative, and it's straightforward to make them injective, so examples of such operations abound. Another example would be: Form $C$ by interleaving the digits of $A$ and $B$ (adding zeros where necessary). That is, if $A=7354$ and $B=81$, then $C=70305841$. You get a whole family of operations by doing this in different bases. Another example would be $C=2\left(\max(A,B)^2+\min(A,B)\right)+[A\gt B]$, where the Iverson bracket $[A\gt B]$ is $1$ if $A>B$ and $0$ otherwise.

share|cite|improve this answer
But is this unique ? e.g. $C=2^A3^B$ But is there any possibility that $C=2^M3^N$ is also true where $M \not= A$ and $N \not= B$ and can the same be done with any operator other than ^ ? – Neel Basu Oct 26 '11 at 18:44
What you call "unique" is what I more precisely referred to as "injective". Different $A$ and $B$ yield different $C$ by the fundamental theorem of arithmetic. And yes, there are gazillions of operations with which you can do this. Another one would be interleaving the digits of the numbers, for example. – joriki Oct 26 '11 at 18:49
Oh! I see. I am not from Mathematics Background actually :( However can I see another example of the same operation ? with another operator ? – Neel Basu Oct 26 '11 at 19:14
I don't know how there could be another example of the same operation, but I added another example of an operation with the same property. – joriki Oct 27 '11 at 6:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.