1. Replace each of the stars in the units place of the numbers in the expression

$$
\left|\frac{77777777777 *}{77777777777 *}-\frac{555555555554}{555555555559}\right|
$$

with some digit so that the expression takes on the smallest possible value.
SOLUTION. Let $x$ and $y$ be the digits we will add to the numerator and denominator of the first fraction, respectively. Since we will algebraically manipulate the entire expression in absolute value, for the sake of clearer notation, we introduce the designation $N=11111111110$. The individual numbers in the given expression can then be expressed as:

$$
\begin{aligned}
& 77777777777 x=7 N+x, \\
& 77777777777 y=7 N+y, \\
& 555555555554=5 N+4, \\
& 555555555559=5 N+9 .
\end{aligned}
$$

The expression under consideration can then be written and simplified as follows:

$$
\begin{aligned}
& \left|\frac{7 N+x}{7 N+y}-\frac{5 N+4}{5 N+9}\right|=\frac{|(7 N+x)(5 N+9)-(5 N+4)(7 N+y)|}{(7 N+y)(5 N+9)}= \\
& =\frac{\left|\left(35 N^{2}+5 x N+63 N+9 x\right)-\left(35 N^{2}+5 y N+28 N+4 y\right)\right|}{(7 N+y)(5 N+9)}= \\
& =\frac{|5 \cdot(7-y+x) \cdot N+9 x-4 y|}{(7 N+y)(5 N+9)} .
\end{aligned}
$$

Let us also denote the numerator and denominator of the obtained fraction:

$$
C=|5 \cdot(7-y+x) \cdot N+9 x-4 y| \quad \text { and } \quad D=(7 N+y)(5 N+9) \text {. }
$$

If we substitute different pairs of digits for $x, y$, the denominator $D$ will take only ten different values in the range

$$
(7 N+0)(5 N+9) \leqq D \leqq(7 N+9)(5 N+9)
$$

Now let's see what large or small values the numerator $C$ will take. Since the number $9 x-4 y$ is at most two-digit, while the number $N$ is twelve-digit, the order of the numerator $C$ will depend on whether the factor $(7-y+x)$ is zero or not. Therefore, we will consider these two possibilities separately.

A. Case $7-y+x=0$. Then $y=x+7$ and the numerator $C$ is of the form

$$
C=|5 \cdot 0 \cdot N+(9 x-4 y)|=|9 x-4(x+7)|=|5 x-28| .
$$

Since the digit $y$ (equal to $x+7$) is at most 9, the digit $x$ is 0, 1, or 2, so the expression $|5 x-28|$ equals 28, 23, or 18. The smallest value of the numerator $C$ is thus 18 and is achieved only for $x=2$ and $y=9$. By a fortunate "coincidence," the denominator $D$ has its largest value for $y=9$, so

$$
\min \left\{\frac{C}{D}\right\}=\frac{18}{(7 N+9)(5 N+9)}
$$

B. Case $7-y+x \neq 0$. Let's show that the values of the numerator $C$ (and thus the values of the fraction $C / D$) are "enormous" in comparison to case A. From the inequality $7-y+x \neq 0$ it follows that $|7-y+x| \geqq 1$ (the number $7-y+x$ is an integer), so we have

$$
C=|5 \cdot(7-y+x) \cdot N+9 x-4 y| \geqq 5 \cdot|7-y+x| \cdot N-|9 x-4 y| \geqq 5 N-|9 x-4 y| .
$$

Since $x$ and $y$ are digits, it is clear that $|9 x-4 y| \leqq 81$. From the last estimate of $C$ and the maximum value of $D$, it follows that

$$
\frac{C}{D} \geqq \frac{5 N-81}{(7 N+9)(5 N+9)}
$$

The last fraction is "many times" larger than the fraction at the end of case A, because both fractions have the same denominator, while comparing the numerators clearly results in: $5 N-81 \gg 18$ (the inequality $5 N-81>18$ holds for values of $N \geq 20$).

Conclusion: We will add the digit $x=2$ to the numerator and the digit $y=9$ to the denominator.

GUIDING PROBLEMS: