Gaikov S.B.

Petya bought a microcalculator at the store "Turing Machines and Other Computing Devices," which can perform the following operations: for any numbers $x$ and $y$, it computes $x+y$, $x-y$, and $\frac{1}{x}$ (for $x \neq 0$). Petya claims that he can square any positive number using his microcalculator in no more than 6 operations. Can you do this? If yes, try to multiply any two positive numbers, making no more than 20 operations (intermediate results can be written down and reused in calculations).
Let's outline a scheme for squaring any number $x(x \neq 0)$ in 6 operations. Intermediate results will be denoted as $x_{1}, x_{2}, \ldots, x_{6}$; of course, they can be stored and reused in subsequent calculations. Thus, we need to sequentially compute: $x_{1}=1 / x, x_{2}=x+1, x_{3}=1 / x_{2}=1 /(x+1), x_{4}=x_{1}-x_{3}=1 / x-$
$1 /(x+1)=1 /\left(x^{2}+x\right), x_{5}=1 / x_{4}=x^{2}+x, x_{6}=x_{5}-x=x^{2}$.

Suppose we need to multiply numbers $x$ and $y$. The calculations are performed in the following order: first, we find $x+y$ and $x-y$ (2 operations), then we square these numbers as in part a) (another 12 operations), then we compute $z=(x+y)^{2}$ $-(x-y)^{2}$ and $1 / z=1 /(4 x y)$ (2 operations), then sequentially by addition $-2 /(4 x y)=1 /(4 x y)+1 /(4 x y)$, $3 /(4 x y)=2 /(4 x y)+1 /(4 x y)$ and $1 /(x y)=3 /(4 x y)+1 /(4 x y)$ (3 operations) and finally $1 /(1 /(x y))=x y$. In total, we needed $2+12+2+3+1=20$ operations. (Solution to problem M791 from the journal "Kvant".)