I have a challenge. This may be little tricky or even not possible but wanted to check if anyone has any thoughts on this?
PS : This question is in general and not related to only to R. May be I can say its general mathematics
I have a data
df
ColA ColB ColC
6 9 27
1 4 32
4 8 40
If you observe closely, there is some relationship between these columns.
Example, (ColC/ColB)+ColA will give you number 9.
df
ColA ColB ColC ColD
6 9 27 9
1 4 32 9
4 8 40 9
However this data is manipulated and I made sure there is some relation. But in general, lets us take any numbers, is there a way to find if there is any relationship between these numbers. Need not be (ColC/ColB)+ColA . It could be anything.
Say we have 5 columns of numeric data. I need to find mathematical operation between these so that common number exists.
This is more into mathematics(algebra). Can anyone let me know is this even possible ?
For finitely many given points in $\Bbb Q^3$ we can find a polynomial $f(x,y,z)\in \Bbb Q[x,y,z]$, which vanishes at these points. For example, for your points $$ u=(6,9,29), v=(1,4,32), w=(4,8,40) $$ the polynomial you have found is $$ f(x,y,z)=xy-9y+z. $$ Indeed $f(u)=f(v)=f(w)=0$, and this corresponds to your "rule" $\frac{z}{y}+x=9$.
On the other hand, there are many more choices. For example, we can also find $$ f(x,y,z)=4x^2 - 35xy + 4xz + 264x - 2yz $$ Then also $f(6,9,27)=f(1,4,32)=f(4,8,40)=0$. This looks more complicated, but it shows that we have many choices, and that this will work.
For reference see Polynomial interpolation in several variables.