What would the function $f$ look like, that returns $1$ if an integer $x = 0$ and an integer $y \neq 0$, and returns $0$ otherwise?

40 Views Asked by At

What would the function $f$ look like, that returns $1$ if an integer $x = 0$ and an integer $y \neq 0$, and returns $0$ otherwise?

Examples:

  1. $ x = 0\; ,\; y = 3 \quad then \quad f_{(x, y)} = 1 $
  2. $ x = 6\; ,\; y = 2 \quad then \quad f_{(x, y)} = 0 $
  3. $ x = 0\; ,\; y = 0 \quad then \quad f_{(x, y)} = 0 $
2

There are 2 best solutions below

0
On

After a bit of googling, and searching other questions here, I came up with this:

\begin{equation} f_{(x, y)} = \lceil \frac{y}{\left( k \cdot x + 1 \right) \cdot \left( y + 1 \right)} \rceil \quad when \;\; k\to\infty \end{equation}

0
On

$$ f(x,y)= \begin{cases} 1&&\text{if }x=0\text{ and }y\ne0\\ 0&&\text{otherwise} \end{cases} $$