# A greedy cryptarithm

Find all solutions to

$$\begin{array}& & & &E&A&T\\& & &A&T&E\\+&E&A&T&E&N\\\hline&Y&U&M&M&Y\end{array}$$ Where different letters represents different digits from $$0$$ to $$9$$.

Problem by myself

• The usual trick to narrow the answer down to a single solution is to require an extra property, like "YUMMY must be divisible by TEA" or something along those lines. With all the multiple solutions left in, the puzzle feels unfinished. – Bass Aug 10 at 7:56

Let's look at carries: col 4 to col 5 must be 1, hence carry $$3\rightarrow 4 \in \{1,2\}$$, $$A \in \{8,9\},U \in \{0,1\}$$ $$Y=E+1$$. From the last, carry $$1\rightarrow 2 \in \{0,1\}$$, but as cols 2 and 3 are completely identical their in and out carries must be the same, therefore all four carries are 1, $$A=9,U=0,T+N=11,E+T=M$$

Therefore $$N\le 8$$, so $$T\ge 3$$; also $$M\le 8,E \ge 1$$, so $$T\le 7$$, $$M\ge 4$$.

Summary so far:

$$A=9,U=0$$ $$3\le T\le 7$$ $$1\le E\le 5$$ $$4\le M=E+T\le 8$$ $$Y=E+1$$ $$N+T=11$$ but $$E=5$$ can be ruled out because it forces the collision $$M=8,T=3,N=8$$

Let's split on $$E$$ and $$T$$: $$E=1 \Rightarrow Y=2, (T,N,M) = (3,8,4),(4,7,5),(6,5,7),(7,4,8)$$ --- $$E=2 \Rightarrow Y=3, (T,N,M) = (4,7,6),(5,6,7),(6,5,8)$$ --- $$E=3 \Rightarrow Y=4, (T,N,M) = (5,6,8)$$ --- $$E=4 \Rightarrow Y=5, (T,N,M) = (3,8,7)$$

Oof, that wasn't pretty, but I think that's them all:

$$9$$ solutions.

• You can verify your $9$ solutions with this python script, so there are no more (outputs e,a,t,n). – Alexey Burdin Aug 11 at 8:43
• You really like your python scripts, don't you @AlexeyBurdin? (And nothing wrong with that!) – Paul Panzer Aug 11 at 8:56
• Well, I'll phase it like that: "If a problem can be killed in a reasonable amount of time and computations, it may be considered enough effort of solving it (except when purely math solution is needed)", so python/ruby/R/Mathematica is worth for it. ) – Alexey Burdin Aug 11 at 9:35

Partial answer (without the proof of uniqueness):

To make the double carry work in leftmost digits, we should have A = 8 or 9 (carry from previous column can be 1 or 2). We have T+E+N=10c+Y (c means carry value). But from the leftmost column we have Y=E+1, so T+N=10c+1. So carry value is 1 (since 2 is too large) and T+N=11. Next, we have A+T+E=M(+1) in two different columns, that means that all carries should be 1 (not 2). So, the only possible values for the thousands column are A=9 and U=0.
Now let's check suitable values for the E and Y:
E=7 and Y=8. This won't work since T must be 1 or 2 (to make A+T+E less than 19), so N can be only 9 (to make T+N=11), but the 9 is already taken by A.
E=6 and Y=7. Here T must be no more than 3, so N must be no less than 8. Since it's already A=9, it must be N=8 and T=3, so we have M=9+3+6+1-10=9. A contradiction again.
E=5 and Y=6. If we take T=4 and N=7, we get M=9, and for T=3 and N=8 we get M=8. Won't work since 8 and 9 are already taken.
E=4 and Y=5. Same reasoning as above.
E=3 and Y=4. We can take T=5, N=6 and get M=8. So, we found a solution: 395+953+39536=40884.