3

$ABAC + DBAC = ECFFC$

Each letter represents one number from 0-9. Every number is represented by only one letter. Find all the numbers used in the puzzle.

There are multiple answers to this puzzle.

Edit: Here is a small mini-puzzle using the same rules, but the variables are completely separate from the first puzzle.

It is a system of equations, not two separate equations.

$AB \times AB = ACC$
$AB + AB = BC$

Jonathan Allan
  • 21,150
  • 2
  • 58
  • 109
anna328p
  • 185
  • 10
  • Well the answer is complete then, no? I show it mathematically and then provide code to exhaust all alphametic permutations. The only way for there to be more solutions is with a trick that takes it out of the usual alphametic domain (as per @Reyi43's comment) – Jonathan Allan Apr 24 '16 at 05:43
  • @JonathanAllan The puzzle book from which I got the problem suggests there are more solutions. – anna328p Apr 24 '16 at 05:55
  • @Reti43 I'll upload a scan of the puzzle (in Russian) – anna328p Apr 24 '16 at 18:50
  • @Reti43 http://i.imgur.com/j5ckfYC.jpg?1 – anna328p Apr 24 '16 at 18:57
  • May I recommend posting a new puzzle for the second of the two alphametics? As it stands, it looks like an addendum to the initial puzzle, especially considering puzzles of this sort don't usually require much reading. :\ – feelinferrety Apr 26 '16 at 03:12
  • @feelinferrety it kinda is an addition. – anna328p Apr 26 '16 at 04:18
  • This puzzle doesn't make sense to me. You have stated that there are multiple answers to the puzzle, yet there is clearly only one. Additionally, you edited the puzzle to add a brand-new unrelated puzzle instead of creating a new puzzle post. – Ian MacDonald Apr 26 '16 at 15:46
  • @IanMacDonald, Yes his puzzle book said there were (see image if you can read Russian, which I cannot), he has realised there are not. – Jonathan Allan Apr 26 '16 at 16:48

4 Answers4

4

Assuming base 10 the alphanumeric ABAC + DBAC = ECFFC is:

$1020\times A + 1000\times D + 200\times B + 2\times C = 10000\times E + 1001\times C + 110\times F$
So
$999\times C = 10\times (102\times A + 100\times D + 20\times B - 1000\times E - 11\times F)$
Thus
$C=0$

Now since $(2\times A)\pmod{10} = (2\times B)\pmod{10} = F$
$(A,B,C,F) \in \{(1,6,0,2),\space(2,7,0,4),\space(3,8,0,6),\space(4,9,0,8)\}$

In each case the penultimate carry in the sum is $1$ so
$A+D+1=10\times E+C=10\times E\implies E=1$

So we can remove the case where $A=1$ $(A,B,C,E,F) \in \{(2,7,0,1,4),\space(3,8,0,1,6),\space(4,9,0,1,8)\}$

And we can remove $(2,7,0,1,4)$ since $B\neq D$ and $(3,8,0,1,6)$ since $D \neq F$

Leaving only
$(A,B,C,D,E,F)=(4,9,0,5,1,8)$


Of course if we, instead, interpret the formula as
$A\times B\times A\times C + D\times B\times A\times C = E\times C\times F\times F\times C$
There are many, many solutions.

(I count $15,284$ of such solution forms).


Brute force check using Python for first case (with explicit calculation):

>>> from itertools import permutations
>>> for a, b, c, d, e, f in permutations(range(10), 6):
...     abac = 1000 * a + 100 * b + 10 * a + c
...     dbac = 1000 * d + 100 * b + 10 * a + c
...     ecffc = 10000 * e + 1000 * c + 100 * f + 10 * f + c
...     if abac + dbac == ecffc:
...             a, b, c, d, e, f
...
(4, 9, 0, 5, 1, 8)
>>>

Brute force count for second case:

>>> from itertools import permutations
>>> count = 0
>>> for a, b, c, d, e, f in permutations(range(10), 6):
...     bac = b * a * c
...     abac = a * bac
...     dbac = d * bac
...     ecffc = e * (c * f) ** 2
...     if abac + dbac == ecffc:
...             count += 1
...
>>> count
15284
>>>

Update

As stated the question is an alphametic, so the second interpretation is invalid. However another interpretation would be to be in a base other than $10$.

For $\text{base}<10$ we may not use numbers greater than $\text{base}-1$
for bases $5$ to $9$ there are three solutions:
$\text{base},(A,B,C,D,E,F)$
$6, (2, 5, 0, 3, 1, 4)$
$8, (2, 6, 0, 5, 1, 4)$
$8, (3, 7, 0, 4, 1, 6)$

For $\text{base}>=10$ I am not quite sure where we should stop (I have not proved it to myself) but it seems there are only $6$ more solutions (making $9$ total - most likely due to divergence in the possible values of the two sides as the base increases, while $E<=1$ must remain true.):
$10, (4, 9, 0, 5, 1, 8)$
$11, (8, 2, 0, 3, 1, 5)$
$11, (9, 3, 0, 2, 1, 7)$
$12, (2, 8, 0, 9, 1, 4)$
$12, (3, 9, 0, 8, 1, 6)$
$13, (9, 2, 0, 4, 1, 5)$


Mini puzzle...
$AB\times AB = ACC\rightarrow (A,B,C)=(1,2,4)$
$AB + AB = BC\rightarrow (A,B,C)\in \{(1, 2, 4), (2, 4, 8), (2, 5, 0), (3, 7, 4), (4, 9, 8)\}$

Jonathan Allan
  • 21,150
  • 2
  • 58
  • 109
3

The solution is:

  • A = 4
  • B = 9
  • C = 0
  • D = 5
  • E = 1
  • F = 8

which written out gives:

4940 + 5940 = 10880

Reasoning:

We know very quickly that E = 1 and C = 0, so next, let's work out what F is since that double F limits the possibilities; B - A has to be 5 for it to work (it obviously can't be 0). Cases:

  • B = 5, A = 0 or B = 6, A = 1: Neither of these work since we've already established that E = 1, C = 0.
  • B = 7, A = 2: A little more subtle here, this one results in D = 7, so it doesn't work either.
  • B = 8, A = 3: Doesn't work since both D and F end up being 6.
  • B = 9, A = 4. Works, and results in F = 8, D = 5.

    and so we have the one solution.

  • Dennis Meng
    • 1,531
    • 12
    • 24
    • There's only one solution. http://bach.istc.kobe-u.ac.jp/cgi-bin/crypt.cgi?crypt=ABAC%2BDBAC%3DECFFC&crypt1=llp%2Blinear%2Blogic%3Dprolog – cst1992 Apr 25 '16 at 11:14
    • Would it be possible for you to add an explanation as to why this is the correct answer? Please note that all answers on Puzzling need to contain explanations; answers without them can be deleted. Thank you! –  Apr 25 '16 at 18:22
    • Sure thing. I'm at work now, but I'll update my answer with the explanation when I get home. – Dennis Meng Apr 25 '16 at 18:33
    2

    Solution.

    $A = 4, B = 9, C = 0, D = 5, E = 1, F = 8$

    A note before we begin.

    The analysis depends on the interpretation that the equation follows the standard alphametic rules, i.e., the leading digit cannot be 0 (not clarified) and each letter must represent a different number. Under these rules, there is only one solution. Even if we were to allow the leading letters to be 0, we wouldn't get any more solutions because it is impossible for any of them to be 0 (another letter has to be 0). In the following analysis I will show the uniqueness of that solution.

    The OP claims there are more solutions, but I'll update my answer if he clarifies how else the equation could be interpreted.

    Analysis.

    From $C + C = C \pmod{10}$, we conclude $C = 0$ and $c_1 = 0$, where $c_1$ is the carry from the first column addition.

    Since $A + D + c_3 = EC$, the only possibility is $E = 1$. By rearranging, we also get $D = 10 - c_3 - A$.

    From $A + A + c_1 = F \pmod{10}$ and $c_1 = 0$, we decude $F = even$ and $A \ne 5$.

    If $A < 5$, $c_2 = 0$, $B \gt 5$ and $c_3 = 1$. That's because there are two ways of getting the same even number mod 10, e.g., $2 + 2 = 4$ and $7 + 7 = 4 \pmod{10}$. Checking for all values:

    - $A = 2$; $F = 4, B = 7, D = 7 = B$. Contradiction.
    - $A = 3$; $F = 6, B = 8, D = 6 = F$. Contradiction.
    - $A = 4$; $F = 8, B = 9, D = 5$. Solution.

    If $A \gt 5$, then $c_2 = 1$. However, $B + B + c_2 = F \pmod{10}$ means we have $even + odd \ne even$. Contradiction.

    Edit: Extra mini-puzzle.

    The answer is

    $A = 1, B = 2, C = 4$

    Analysis

    From a comment from the OP, it's a system of equations, so the letters have the same value in both equations. Therefore, we require $B + B = C \pmod{10}$ and $B * B = C \pmod{10}$. The only option is $B = 2$, which forces $C = 4$. And from $A + A = B$, we get $A = 1$.

    Reti43
    • 1,935
    • 16
    • 12
    1

    The first part was solved. I', here for the second one:

    $AB×AB=ACC$.

    C can be one of $0,1,4,6,9$.
    If $C = 0$ it means $B = 0$ - wrong.
    If $c = 1$ it means B is $1 or 9$. B cannot be 1 because we end up with $B = C$
    So

    $(10 A + 9 )^2 = 100A + 11$
    Expanding this we get

    $100 A^2 + 180A+81 = 100A + 11$ or $100A^2 + 80A + 70 = 0$
    Calculating dela for the equation we get
    $D = 6400 - 280000$. Which is nevative. So no real solutions for A.

    $C = 4$ we get B one of 2, 8.

    For B = 2 we have:

    $(10 A + 2 )^2 = 100A + 44$
    $100 A^2 + 40A+4 = 100A + 44$ or
    $100 A^2 - 60A-40 = 0$ dividing by 20
    $5 A^2 -3A - 2 = 0$.
    Solving the eq we get A = 1 or 0.4. So $A = 1$ - found a solution.

    For B = 8, following the same logic as for B = 9 we get nowhere.
    Same goes or C = 6 And B one of 4, 6.
    Or for C = 9 and B = 3 or 7.

    Now:

    $AB+AB=BC$.
    C can be 0,2,4,6,8.
    For c = 0 , B can be 5.
    This means.

    $20A + 10 = 50$. This means A = 2. So we got $[A,B,C] = [2,5,0]$
    For C = 2 means B = 1 or 6.
    B = 1
    $20A + 2 = 12$. No solution.
    For B = 6
    $20A + 12 = 62$. No Integer solutions.

    For C = 4 B = 2 or 7.
    B = 2 We get
    $20A + 4 = 44$ So A = 2. No solution
    For B = 7 We get
    $20A + 14 = 74$. This means A = 3 So we got $[A,B,C] = [3,7,4]$

    For C = 6 We get B = 3 or 8.
    For B = 3
    $20A + 6 = 36$. NO valid solution
    For B = 8
    $20A + 16 = 86$. No integer solution.

    For C = 8 B is 4 or 9.
    For B = 4
    $20A + 8 = 48$. So A = 2. So we got $[A,B,C] = [2,4,8]$

    For B = 9
    $20A + 18 = 98$. So A = 4. We get $[A,B,C] = [4,9,8]$

    Marius
    • 18,049
    • 4
    • 54
    • 101
    • According to the OP from a comment in another puzzle, these two equations are coupled. So the proof can be simplified to requiring B + B = C (mod 10) and B X B = C (mod 10). B = 2, C = 4 is the only option. A = 1 follows trivially after that. – Reti43 Apr 25 '16 at 08:22
    • Ah...sorry. I misread it. But yeah. It's easy to combine them. – Marius Apr 25 '16 at 08:23
    • $C=4$, $B=2$ you say $20A+4=44$, not so - $20A+4=24$ and another solution is found at $A=1$ $[1,2,4]$ (which is the solution to the system of two equations, but solving the first equation only has this result so we could simply plug in those numbers to equation 2 and see that it works). – Jonathan Allan Apr 25 '16 at 16:37
    • Also, for $C=8$, $B=9$ the equation $20A+18=98$ has a solution at $A=\frac{98-18}{20}=4$ – Jonathan Allan Apr 25 '16 at 16:40
    • Oups. Right. Back to school – Marius Apr 25 '16 at 19:40