Page 1 of 1

TWELVE+NINE+TWO=ELEVEN+SEVEN+FIVE

Posted: May 24th, 2020, 9:13 am
by Gengulphus
Like all alphametics, this one is solvable by computer, either using a completely brute force search of all the permutations of the digits 0 to 9 or a somewhat more intelligent search using things like: look at the 72 allowed combinations of E and N (neither can be zero because they're leading digits, and they cannot be equal to each other). For each of those combinations, we can use the rightmost two columns of the addition to determine W and O, eliminate the combinations for which that produces a duplicated digit among E, N, W and O, and proceed with further branching of possibilities by making assumptions about the remaining digits and eliminations of them by deducing that other remaining digits are duplicate or leading zeros.

So the challenge is to produce the (unique) solution by a reasoned argument, making that argument as simple and humanly comprehensible as possible. The number of cases that a human needs to consider in it is a rough measure of that - the lower that number, the better the solution...

I should say that this is not an original alphametic - I came across it while reading about something else - and I do not yet have a solution I find satisfactorily simple myself!

Gengulphus

Re: TWELVE+NINE+TWO=ELEVEN+SEVEN+FIVE

Posted: May 25th, 2020, 12:03 pm
by cinelli
I think this is significantly more complicated than my puzzle

viewtopic.php?f=73&t=22194

:). Welcome back, Gengulphus.

Cinelli

Re: TWELVE+NINE+TWO=ELEVEN+SEVEN+FIVE

Posted: May 26th, 2020, 8:26 am
by jfgw
It's great to see you back, Gengulphus.

I didn't see that many ways to reduce the amount of brute force. I brute-forced all values of T, V, E and N in a spreadsheet and came up with one candidate.

Spoiler,

First, make life simpler by deducting EIVE from both sides. This gives us TWNLNE+TWO=ELEVEN+SFVEN.

There are a few rules:
1. No two digits may be the same
2. From the original equation, E, F, N, S and T are all leading digits so cannot be 0.
3. E plus a carry = T so E cannot be 9.
4. E cannot be 0 so E plus a carry cannot be 1. T cannot be 1.
5. L+S+a possible carry must produce a carry, therefore, L+S>=9.

Trying all values of T, V, E and N, the others can be calculated (except for I which is determined by elimination).

O can be calculated by looking at the units column only. W can then be calculated by looking at the tens and units columns only, and so on.

O=2N-E (Mod 10)
W=(2EN-NE-O)/10 (Mod 10)
L=(2VEN-TWO-NE)/100 (Mod 10)
F=(NLNE+TWO-EVEN-VEN)/1000 (Mod 10)
S=(WNLNE+TWO-LEVEN-FVEN)/10000 (Mod 10)

Applying rules 1 to 4 left three candidates. Rule 5 then eliminated all but one.

I must be 3 as this is the only digit not otherwise used.

E=4
F=9
I=3
L=7
N=2
O=0
S=8
T=5
V=1
W=6

564714+2324+560=474142+84142+9314
=567598
TWLTFS (It would have been nice if it had spelt something relevant).

It will be interesting to see what short cuts I have missed.


Julian F. G. W.

Re: TWELVE+NINE+TWO=ELEVEN+SEVEN+FIVE

Posted: May 26th, 2020, 12:02 pm
by UncleEbenezer
jfgw wrote:It's great to see you back, Gengulphus.

I didn't see that many ways to reduce the amount of brute force. I brute-forced all values of T, V, E and N in a spreadsheet and came up with one candidate.

Spoiler,
Julian F. G. W.


Skipping over the spoiler, just in case I get inspired myself:-

If you got it down to T, V, E and N, then surely you have just three vars to brute-force, since we know T=E+1 from the limits to carry.

From the right, we also have N+N = E+O (mod 10), so E+O is even, and N is constrained. But that still leaves a lot more brute force than I'm prepared to attempt.

What this calls for is a new understanding of mod10 (or modX) arithmetic. Hmmm ... where's Conway when you need a leap of imagination?

Re: TWELVE+NINE+TWO=ELEVEN+SEVEN+FIVE

Posted: May 26th, 2020, 7:55 pm
by jfgw
UncleEbenezer wrote:If you got it down to T, V, E and N, then surely you have just three vars to brute-force, since we know T=E+1 from the limits to carry.

How did I miss that? It must have been late :) Part of my answer was "E plus a carry = T so E cannot be 9" so I should have made use of it.
UncleEbenezer wrote: N+N = E+O (mod 10), so E+O is even, and N is constrained.

I did note that E and O are either both even or both odd but did not consider that to be useful considering that I was calculating O from other digits including E. I do not see how N is constrained.

Julian F. G. W.

Re: TWELVE+NINE+TWO=ELEVEN+SEVEN+FIVE

Posted: May 26th, 2020, 10:32 pm
by jfgw
UncleEbenezer wrote:If you got it down to T, V, E and N, then surely you have just three vars to brute-force, since we know T=E+1 from the limits to carry.

It could be that the only advantage is a shorter spreadsheet. There are 107 possibilities for the first 7 digits (V,E,N,T,O,W,L) that cannot be ruled out without checking further (unless I am missing some tricks).

Julian F. G. W.

Re: TWELVE+NINE+TWO=ELEVEN+SEVEN+FIVE

Posted: May 27th, 2020, 2:31 pm
by Gengulphus
jfgw wrote:
UncleEbenezer wrote:If you got it down to T, V, E and N, then surely you have just three vars to brute-force, since we know T=E+1 from the limits to carry.

How did I miss that? It must have been late :) Part of my answer was "E plus a carry = T so E cannot be 9" so I should have made use of it.

For what it's worth, I did eventually realise that T was necessarily equal to E+1, but it took me an embarrassingly long time!

Gengulphus