9.3. How many solutions in integers $x, y$ does the inequality $|y-x|+|3 x-2 y| \leq a$ have a) for $a=2$; b) for $a=20$?
Answer: a) 13; b) 841. Solution. Let $m=y-x, n=3 x-2 y$, then (expressing $x$, y from these equations) we get $x=2 m+n$ and $y=3 m+n$ and thus, for any integers m, n there correspond integers $x, y$ (and vice versa), i.e., there is a one-to-one correspondence between ordered pairs (m.n) and ( $x, y$ ). Therefore, we need to determine how many pairs (m.n) of integers satisfy the inequality $|m|+|n| \leq a$.

a) For $a=2$ such pairs can be easily listed: these are four pairs $( \pm 1, \pm 1)$ plus four pairs $( \pm 1,0)$, $( \pm 2,0)$ plus four pairs $(0, \pm 1),(0, \pm 2)$ and one more zero pair $(0,0)$. In total, there are 13 pairs (m.n), corresponding to 13 solutions of the original inequality. b) First, let's find the number of pairs of natural numbers ( $m . n$ ), for which $m+n=c$ for a given natural $c$. It is easy to see that the number of such pairs is $c-1$ (solutions are the pairs $(1, c-1),(2, c-2), \ldots,(c-1,1))$. Therefore, the number of pairs of natural numbers satisfying the inequality $m+n \leq 20$ is $1+2+\ldots .+19=190$. Then the total number of pairs of non-zero integers satisfying the inequality $|m|+|n| \leq a$ will be four times greater, i.e., 760. The number of solutions of the form $(m, 0)$ is 41 (these are the pairs $(-20,0),(-19,0) \ldots,(20,0))$ and, similarly, there are 41 solutions of the form $(0, n)$, but in this case, we counted the zero pair twice. Thus, the total number of solutions is $760+41+40=841$.