Sunday, October 25, 2015

Proof of obtaining multiple of 10 by using arithmetic operations on any three numbers



While doing a few math puzzles I noted that you could take any three numbers (integers) and use basic arithmetic operations (Addition, Subtraction, Multiplication and Parentheses only)
to obtain a multiple of 10, using each number only once.



Eg.
Using 29, 73, 36: $73+36-29=80$
Using 2, 4, 7: $2*7-4=10$




Is there a proof for this theory in particular, or is there a more general theorem that applies to this? If not, is there a set of three numbers which disproves this theory?






I found a few clues while solving this:



If one of the numbers is a multiple of 5 (call it $x$) then there definitely exists a solution divisible by 10. This one is easily provable as you merely need an even number to multiply with. If any one of the remaining two numbers is even, you can use that to multiply with $x$ to get number divisible by 10. If both numbers are odd then you can add them to get an even number to multiply with $x$.



It would seem as only the units place digits have any bearing on whether it's a multiple of 10 or not. As you could take any of the examples, add or subtract any multiple of 10 from it and do the same operations to still get a multiple of ten. I feel this is also easily provable but I can't think of a way to do it which isn't long-winded.

EDIT: It can be proven as such, let $a,b$ be two integers s.t $a+b|10$
Adding two multiples of 10 ($10m,10n$) to $a$ and $b$ we get $10m+a+10n+b$
Since $a+b|10$ it can be written as $10m+10n+10k$ where $a+b=10k$
Which is divisible by ten
Now let $a,b$ be two integers s.t. $a.b|10$
Adding $10m,10n$ to $a$ and $b$ we get $(10m+a)(10n+b)$
$=100mn+10an+10bm+ab$ or $100mn+10an+10bm+10k$
Which is divisible by ten
Therefore any combination of Addition and Multiplication with the three no.s shouldn't matter.
I realise that could replace 10 with any no. in this proof and it would still work. So we really need to just prove for every single digit no.







I ran a program in python that checked for every combination of single digit no.s, but it didn't find any combination that disproves this.



I'm not sure how this question would be categorised, hence the lack lustre tags.



I'm fairly new to StackExchange. Please forgive me if I've worded this question poorly.


Answer



Let's collect some of the useful observations mentioned and implicit in the OP:





  1. Only the residue class of $a,b,c$ mod $10$ matters.

  2. If any of $a,b,c$ is divisible by $5$ then there is a solution.

  3. If any subset of $\{a,b,c\}$ has a solution, then so does $\{a,b,c\}$.



As a consequence of the above, we may assume WLOG that $\{a,b,c\}$ are distinct single digits from $1,2,3,4,6,7,8,9$.



With a little more effort, we can justify that $a$ can be replaced by $-a$, which will let us further restrict to the digits $1,2,3,4$. It's not too hard to be convinced of this by playing around with some examples, but let's give a proper proof by structural induction. More specifically, we will prove:





Proposition: Let $f(x_1,\ldots,x_n)$ be a fully parenthesized expression using each $x_i$ exactly once and only $+,-,*$ operators. Then at least one of $-f$ or $f$ can be written as a similar expression using $-x_1,x_2,\ldots,x_n$ exactly once.




This is trivial for $n=1$, and for $n=2$ we quickly verify each of the four possible expressions of two variables:
$$-(a+b) = (-a)-b,\\-(a-b) = (-a)+b,\\(b-a) = b+(-a),\\-(a*b) = (-a)*b.$$



We can now do a structural induction: suppose $n\ge 3$. By extracting the highest-level operator of $f(x_1,\ldots, x_n)$, we may write $f$ as $h(g_1(\cdots),g_2(\cdots))$, where each of $g_1,g_2,h$ are valid expressions, and the arguments of $g_1, g_2$ partition the set $\{x_1,\ldots,x_n\}$. I've deliberately obscured the arguments because the notation becomes unwieldy, as the idea is better illustrated by a simple example:





If $f(x_1,x_2,x_3,x_4,x_5) = ((x_1 * x_5) + x_2) - (x_3 - x_4)$, then we take $$h(a,b) = a-b,\quad g_1 = (x_1 * x_5) + x_2,\quad g_2 = x_3 - x_4.$$




Note that $h,g_1,g_2$ each take $

The above proposition lets us freely replace $9$ by $-9$ (which is equivalent to $1$), etc., and so we can narrow down the set $\{a,b,c\}$ to a subset of $\{1,2,3,4\}$. Lucky for us, there's only four such subsets:



$$ (1 + 2 - 3) = 0,\\
(1 + 4)*2 = 10,\\

(1 + 3 -4) = 0,\\
(2+3)*4 = 20.$$


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...