Can the product $AB$ be computed using only $+, -,$ and reciprocal operators?

1.6k Views Asked by At

Can the product of $A, B$ be computed using only $+, -,$ and reciprocal operators using a calculator? You can use calculator's memory function (multiply and divide are broken though).

Additional: I should have mentioned earlier, in addition to the 3 operators, the numberpad of the calculator can be used so yes 1 can be used.

2

There are 2 best solutions below

8
On BEST ANSWER

Edit: previous answer was wrong. Posted new answer. Hopefully right this time

  1. We can compute and store $A^2$ using $$ \frac{1}{A} - \frac{1}{A+1} = \frac{1}{A^2 + A} $$ We can extract $A^2$ using only $+, -, ^{-1}.$ Similarly we can compute and store $B^2.$

  2. Then

$$\frac{1}{A+B-1} - \frac{1}{A+B} = \frac{1}{(A+B)(A+B-1)} = \frac{1}{A^2 + B^2 + 2AB - A - B} $$

where we can extract $2AB,$ again, using only $+, -, ^{-1}$ and the values for $A^2, B^2$ we computed in step $1$ above.

Thanks to joriki, now to get $AB$ from $2AB$, add $\frac{1}{2AB} + \frac{1}{2AB},$ and take the reciprocal.

3
On

J.D. and N. S. have shown how to do it if a constant $1$ is allowed. Here's a proof that it can't be done if only $A$ and $B$ can be entered, no constants.

We can show by structural induction that all expressions we can generate change sign if both $A$ and $B$ change sign.

Base case: The two atomic expressions $A$ and $B$ change sign when both $A$ and $B$ change sign.

Induction step: $x+y$ changes sign when both $x$ and $y$ change sign, $x-y$ changes sign when both $x$ and $y$ change sign, and $x^{-1}$ changes sign when $x$ changes sign.

Since $AB$ doesn't change sign when both $A$ and $B$ change sign, it follows that it can't be generated from $A$ and $B$ using only these operations.