1

I'm looking for a function like that f(x,y) not equal to f(y,x) for all integers and result must be integer also.

Thank you,

seleucia
  • 111
  • 1

2 Answers2

2

Impossible because, for any integre $n$, the equality $f(x=n,y=n)=f(y=n,x=n)$ is in contradiction to the condition $f(x,y)$ not equal $f(y,x)$.

JJacquelin
  • 66,221
  • 3
  • 37
  • 87
  • Thanks correcting me actually i found solution

    http://stackoverflow.com/questions/919612/mapping-two-integers-to-one-in-a-unique-and-deterministic-way

    – seleucia Nov 21 '13 at 18:40
2

Assuming you avoid the problem that $f(x,x)=f(x,x)$, how about $f(x,y)=x-y$?

Ross Millikan
  • 374,822