Find the range of absolute values with inequality and two variables

130 Views Asked by At

Given $|x - y| < 1 $, what is the range covered in inequality? then update the inequality such that the range covers only $0$ & $1$. $(x ≥ 0 \land y ≥ 0 \land X, Y \in \mathbb{Z})$

  1. We can find the range by solving the inequality as $ -1 < x - y < 1 $, so the range covered is $(-1, 1)$, is it correct?

  2. if I want to update the inequality such that the range covers only $0$ & $1$ as $|x - y| \in [0, 1]$, not sure how to approach this part. Should I write a system of equations to represent it?

Thank you.

1

There are 1 best solutions below

0
On

We have the following cases

  • $x-y>0 \implies x - y < 1$ that is

$$x-1<y<x$$

  • $x-y<0 \implies -x + y < 1$ that is

$$x<y<x+1$$

then trace the inequalities in the $xy-$plane.