Non computational approach to this equation?

172 Views Asked by At

I was thinking about the following problem (not homework):

Let $a,b,c,d \in \{0,1,2,3,4,5,6,7,8,9\}$

Find all four digit numbers $abcd$ where the two digit numbers $$ \underline{(ab)}+\underline{(cd)}$$ sum to the two digit number $\underline{bc}$.


My approach:

Let $$ N = 1000a + 100b + 10c + d$$ where $a,b,c,d \in \{0,1,2,3,4,5,6,7,8,9\}$

For any given solution for $N$, we must have that $$(10a+b) + (10c+d) = 10b+c$$ $$\therefore 10a - 9b + 9c + d = 0$$

It was at this point that I figured the problem could be taken no further by hand, and I used a programming language to iterate over all possible values to find where the equation holds. There were 55 solutions (this is correct).

My question is, could I have taken this problem any farther (or have taken a different approach altogether) without using a computer to find the solutions (or manually attempting each combination)?

Here are the solutions, from which you can derive several patterns/constraints:

0000 0109 0110 0219 0220 0329 0330 0439 0440 0549 0550 0659 0660 0769 0770 0879 0880 0989 0990

1208 1318 1428 1538 1648 1758 1868 1978

2307 2417 2527 2637 2747 2857 2967

3406 3516 3626 3736 3846 3956

4505 4615 4725 4835 4945

5604 5714 5824 5934

6703 6813 6923

7802 7912

8901

1

There are 1 best solutions below

2
On BEST ANSWER

From the formula you already got $$ 10 a + d = 9 (b - c) $$ you obtain that $0 \le 9 (b - c) \le 99$, and thus $0 \le b - c \le 11$. Clearly the values of $b, c$ determine the values of $a, d$.

So there is $1$ solution when $b = 0$ ($c$ can only be $0$), there are $2$ solutions when $b = 1$ ($c$ can be $0, 1$), etc, $10$ solutions when $b = 9$ ($c$ can be $0, 1, \dots , 9$).

All in all $1 + 2 + \dots + 10 = 55$ solutions indeed.