Construction of a special function.

33 Views Asked by At

Let $A$ is a some non-empty subset of $\mathbb{Z}$

There is a function: $$P:A\times A \rightarrow\mathbb{Z}$$ $$P(x,y)=(x-a)\cdot(y-b)$$ And some constant number $c$ such $c\in A$.

Here is the problem:

Construct new function $G$, that satisfy following equivalence relation: $G(x,y)=0\leftrightarrow(P(x,y)=0 \wedge x+y=c)$.

My attempt:

I tired to find that function like this:

$$G(x,y)=P(x,c-x)+P(c-y,y)$$

or like this:

$$G(x,y)=P(x,c-x)-2\cdot P(x,y)+P(c-y,y)$$.

But they are rather wrong.

Mayby some ideas?

EDIT: There is one thing extra. $0\le x,y \le c$