# A way to identify a unique number '$a_1$' has performed operations on '$x$'

The problem I have is bit vague, so I will try to explain as best as I can.

Suppose we have a base number '$x$' and a set of unique number $'a_1', 'a_2', 'a_3', 'a_4'$ and so on

Now $a_1$ perform some operation on $x$ and results in $y_1$ From $y_1$, I should be able to identify that $a_1$ has performed operations on this number

Now on $y_1, a_2$ performed similar operations and results in $y_2$. From $y_2$, I should be able to infer that either $a_1$ or $a_2$ has performed operations on it and none other numbers had ($a_3, a_4$ etc)

So I am looking for some logic, that can help me create this scenario.

-
Do you get to pick the numbers $x$, $a_1$, $a_2$, and so on, or are they all given to you and you only get to choose the operation? – Rahul Aug 26 '12 at 4:01
What operations are permitted? Assuming you are using $a_1$, can you form all of $a_1+x, a_1-x, x-a_1, x\cdot a_1, x/a_1, a_1/x$? Any others? – Ross Millikan Aug 26 '12 at 4:11
I can pick x. a1, a2 etc are provided. We can do some transformation on a1, a2 as well like converting them to complex numbers if needed. – user975027 Aug 26 '12 at 4:27
Any operations can be done. division, multiplication, complex, hashcode anything as long as the result again leads to a unique number. – user975027 Aug 26 '12 at 4:28

Assuming the numbers $a_i$ are to be natural numbers, then a simple approach is to define the operation $\otimes:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N}$ such that $a \otimes b=a p(a)^{b}$, where $p(a)$ is the smallest prime that does not divide $a$. Starting with $x=1$ produces $$(((x\otimes a_1)\otimes a_2)\otimes a_3)...=2^{a_1} 3^{a_2} 5^{a_3} ...,$$ from which the sequence $(a_1,a_2,a_3,...)$ is easily retrieved.

-

The operations need to be specified, otherwise there is no solution. Let me define a family of operations $f_z(x,y)=z$ (one for each real $z$, independent of $x, y$). Clearly you cannot recover $x$ from the results of these operations.

-
I don't think the question is well posed. Given that and $a_2=3$ there is no way to tell whether you applied $f_0(x,a_1)$ or $f_0(x,a_2)$ as the result is $0$ either way. So you need to restrict what operations are allowable. If the operations and $x$ are properly restricted you can find a set of $a$'s that let you identify which were used and what operation was done, but you can't leave it wide open. For example, suppose we only allow addition and $0 \lt x \lt 2^{32}$. Then if the $a_i$ are distinct powers of $2$ greater than $2^{3}1$ you can solve it. – Ross Millikan Aug 26 '12 at 5:04
I think you misunderstood my question. Ok lets suppose x = 1, a1 = 2, a2= 3, a3 = 5 etc i.e. all prime numbers. And the operation is multiplication i.e. x * a1 = 2 = y1. And y1 * a2 = 6 = y2. Now from y2, I can see that a1, a2 had performed the multiplication operation on it by dividing y2 with the given number and if the result is a whole number its a proof that y2 was resulted from the operation on x by that number. So, I dont need to have a set of operations. I just need one operation that can help me create this scenario to identify whether y is related to a. – user975027 Aug 26 '12 at 5:06
So you are asking for an operation. More than one only makes it harder. If somebody else picks the $a$'s you can't guarantee that the results will be different. As you say, if the $a$'s are all primes, multiplication works well (but watch out if $x$ matches one of the $a$'s). My example of having the $a$'s powers of $2$ and the operation addition also works. There are many other possibilities. – Ross Millikan Aug 26 '12 at 5:35

The logic should be similar to Gödel Numbering and the more sophisticated Gödel Numbering for Sequences.

-