6
$\begingroup$

An anagram is direct word switch or word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once


Solve this alphametic

$$\text{ENLIST} + \text{SILENT} + \text{LISTEN} = \text{ANAGRAM}$$

Leading zero is ok.
There is only 1 solution.

$\endgroup$
  • $\begingroup$ damn, this is hard. $\endgroup$ – Marius Oct 5 '16 at 6:15
  • $\begingroup$ Do we have to anagram anything before solving? $\endgroup$ – Beastly Gerbil Oct 5 '16 at 6:32
  • $\begingroup$ @BeastlyGerbil No, it just usual alphametic question. $\endgroup$ – Jamal Senjaya Oct 5 '16 at 6:34
  • 1
    $\begingroup$ @JamalSenjaya there is no solution for base 10, if E, S, L or N are not 0, and if so, it is not a good question. There are some solutions if the base 10+. Only 1 solution for base 11. But I am not sure that's your intention? $\endgroup$ – Oray Oct 5 '16 at 7:44
  • 1
    $\begingroup$ @Marius then it is a bad question in my opinion. $\endgroup$ – Oray Oct 5 '16 at 8:19
3
$\begingroup$

Ok, here we go.

ENLIST+SILENT+LISTEN=ANAGRAM
E or S or L can be 0 -- from the problem statement. We start by assuming one of them IS 0.

--digit 7--

A is 1 - it's the carry digit from E+S+L, one of which is 0, the other two can at most be 8 and 9; even with maximal carry from N+I+I, E+S+L cannot exceed 19, so A must be 1

--digit 1--

M = (2T+N) % 10
M > 1, T>1, N>1, T≠N, 2T+N > 11, 2T+N≠20, 2T+N≠21

There are relatively few combinations of T and N that do not include 0 or 1, are not the same digit, and do not add to a value ending in 0, 1, T or N.
So... we just exhaustively list them here by hand, and track the carry digit of the addition (c1) while we're at it.

(T,N,M;c1) in   (2,9,3;1),(3,6,2;1),(3,8,4;1),(3,9,5;1),(4,5,3;1),(4,7,5;1),(4,8,6;1),
                (4,9,7;1),(6,2,4;1),(6,3,5;1),(6,5,7;1),(6,7,9;1),(7,2,6;1),(7,4,8;1),
                (7,5,9;1),(7,8,2;2),(7,9,3;2),(8,3,9;1),(8,6,2;2),(8,7,3;2),(8,9,5;2),
                (9,3,1;2),(9,4,2;2),(9,5,3;2),(9,6,4;2),(9,7,5;2),(9,8,6;2)

--digit 2--

c1=(2T+N)div10 in (1,2)
(S+N+E + c1) % 10 = 1; S>1, E>1

We're making one of E, S, or L be zero as permitted by the problem. Use that, combined with the T,N,M values above, to build sets of possible T,N,M,E,S for E=0 and for S=0. for L=0 we can't do much here, as digit 2 doesn't involve L. The rules for digit 2 exclude several of the previous (T,N,M) sets, so we're narrowing down possibilities for those digits if E or S are 0.

Let's examine each case in turn; first E=0, then S, then L:

if E=0:  S+N+0 + c1 = 11:
(T,N,M,E,S;c2)  (3,6,2,0,4;1),(3,8,4,0,2;1),(4,7,5,0,3;1),(4,8,6,0,2;1),
                (6,2,4,0,8;1),(6,7,9,0,3;1),(7,2,6,0,8;1),(7,4,8,0,6;1),
                (8,3,9,0,7;1),(8,6,2,0,3;1),(8,7,3,0,2;1),(9,4,2,0,5;1),
                (9,5,3,0,4;1),(9,6,4,0,3;1),(9,7,5,0,2;1)

if S=0: 0+N+E + c1 = 11:
(T,N,M,E,S;c2)  (3,6,2,4,0;1),(3,8,4,2,0;1),(4,7,5,3,0;1),(4,8,6,2,0;1),
                (6,2,4,8,0;1),(6,7,9,3,0;1),(7,2,6,8,0;1),(7,4,8,6,0;1),
                (8,3,9,7,0;1),(8,6,2,3,0;1),(8,7,3,2,0;1),(9,4,2,5,0;1),
                (9,5,3,4,0;1),(9,6,4,3,0;1),(9,7,5,2,0;1)

if L=0: S+N+E + c1 = 11 or 21
                cannot narrow down possibilities using L

--digit 5--

c4=(2L+S+c3)div10
2I+N+c4 = 2I+N+(2L+S+c3)div10 = 11 or 21

Here we again do some exhaustive listing of possibilities. digit 5 is 1 (A), so we know what the sum must be, and it is based on I, N, and the carry digit from digit 4 (c4). c4, in turn, is based on L and S and c3 (the carry digit from digit 3). We know c3 can only be 0,1,2 so rather than try to determine what it is, we just look at all the possibilities, combined with knowing that exactly one of E,S,L is 0. So this table lists all those permutations, simplifying the sum for digit 5 based on what each line has assumed c3 and the 0 digit to be. We then combine with the similarly simplified sum for digit 2. These two together will tell us for each line whether N and S are even or odd. We then take that and filter the (T,N,M,E,S) sets further by excluding those which don't match the required evenness/oddness, and list what's left.

        c3      0       2I+N+(2L+S+c3)div10     S+N+E + (2T+N)div10     because 2I+N+c4 must be 11 or 21, ...
       ------------------------------------------------------------------------------------------------------------
        0       E       2I+N+(2L+S)div10        S+N + (2T+N)div10       -- N is even, S is odd                          (T,N,M,E,S) in (8,6,2,0,3),(9,4,2,0,5),(9,6,4,0,3)
        0       S       2I+N+(2L)div10          N+E + (2T+N)div10       -- N and E must both be odd                     (T,N,M,E,S) in (4,7,5,3,0),(6,7,9,3,0),(8,3,9,7,0)
        0       L       2I+N                    S+N+E + (2T+N)div10     -- N and exactly one of S or E is odd
        1       E       2I+N+(2L+S+1)div10      S+N + (2T+N)div10       -- N and S must both be odd                     (T,N,M,E,S) in (4,7,5,0,3),(6,7,9,0,3),(8,3,9,0,7)
        1       S       2I+N+(2L+1)div10        N+E + (2T+N)div10       -- N is even, E is odd                          (T,N,M,E,S) in (8,6,2,3,0),(9,4,2,5,0),(9,6,4,3,0)
        1       L       2I+N+1                  S+N+E + (2T+N)div10     -- N is even, exactly one of S or E is odd
        2       E       2I+N+(2L+S+2)div10      S+N + (2T+N)div10       -- N is even, S is odd                          (T,N,M,E,S) in (8,6,2,0,3),(9,4,2,0,5),(9,6,4,0,3)
        2       S       2I+N+(2L+2)div10        N+E + (2T+N)div10       -- N and E must both be odd                     (T,N,M,E,S) in (4,7,5,3,0),(6,7,9,3,0),(8,3,9,7,0)
        2       L       2I+N+2                  S+N+E + (2T+N)div10     -- N and exactly one of S or E is odd

We've narrowed the scope pretty well if E or S is zero. If L=0 none of this will help, but we can only determine that by excluding all E=0/S=0 possibilities.

--digit 6--

(E+S+L+c5) % 10 = N
Same principle. We don't know what c5 is, so we'll try them all. And again, combine with all possibilities for the zero digit. On each line we filter the (T,N,M,E,S) sets again based on if they yield a distinct L that satisfies the rule for this digit. Note we have to merge the lists together for c3=0,1,2 in digit 5 (fortunately c3=0 and c3=2 are identical lists), since for this table we're only filtering on c5 and not c3, so each line started with 6 possibilities. After excluding what doesn't work with the rule for digit 6, what's listed here is what's left. Also added c1 and c2 back in to the sets data, and included c6, assuming we might want all of that soon (turns out this was probably not necessary).

        c5      0       E+S+L+c5
       -----------------------------------
        0       E       S+L=N                   (T,N,M,E,S,L;c1,c2,c6) in (6,7,9,0,3,4;1,1,0),(8,3,9,0,7,6;1,1,1)
        0       S       E+L=N                   (T,N,M,E,S,L;c1,c2,c6) in (6,7,9,3,0,4;1,1,0),(8,3,9,7,0,6;1,1,1)
        0       L       E+S=N
        1       E       S+L+1=N                 (T,N,M,E,S,L;c1,c2,c6) in (9,4,2,0,5,8;2,1,1),(9,6,4,0,3,2;2,1,0),(8,3,9,0,7,5;1,1,1)
        1       S       E+L+1=N                 (T,N,M,E,S,L;c1,c2,c6) in (9,4,2,5,0,8;2,1,1),(9,6,4,3,0,2;1,1,0),(8,3,9,7,0,5;1,1,1)
        1       L       E+S+1=N
        2       E       S+L+2=N                 (T,N,M,E,S,L;c1,c2,c6) in (9,4,2,0,5,7;2,1,1),(4,7,5,0,3,2;1,1,0),(6,7,9,0,3,2;1,1,0),(8,3,9,0,7,4;1,1,1)
        2       S       E+L+2=N                 (T,N,M,E,S,L;c1,c2,c6) in (9,4,2,5,0,7;2,1,1),(4,7,5,3,0,2;1,1,0),(6,7,9,3,0,2;1,1,0),(8,3,9,7,0,4;1,1,1)
        2       L       E+S+2=N


If S or E are zero, this is a small enough list to just grind through now and see if we can find a complete solution.

--see if any of the E=0 / S=0 sets work--

digit 3: (I+E+T+c2) % 10 = R
(I+E+T+c2)div10 = c3
digit 4: (2L+S+c3) % 10 = G
(2L+S+c3)div10 = c4
(2I+N+c4) = 11 or 21

Now we list out all the digits from each candidate set found above, and include A=1, so we know what digits are left to be assigned. then we have a rule from digit 3 for what R will be, and we know it can only be one of those unused digits; it depends on I, which must also be one of those unused digits. so we just try the digits left to be assigned, one by one, as I, and see which ones give a unique R from the digit 3 rule. If we find any such (I,R) pairs, we list them, also including what the c3 value was for that (I,R). we then use the digit 4 rule to see what G must be, given the c3 of each (I,R) set, and also list the c4 from that rule. Again, we filter (--X) any results where G is not unique. If we find an (I,R,G) set that is unique, it must satisfy one final constraint, that of digit 5's rule; we test that final requirement for the I and c4 we just found, and see if it works. failure at any point in this process we flag as (--XX) and go on to the next one.

TNMESLAIRG      left            I+E+T+c2%10
=====================================================================================================================================
6790341         258     c2=1    I+0+6+1%10=R: (I,R:c3,G,c4) in (5,2:1,2,1)--X (8,5:1,2,1).  2I+N+c4: 24 ≠ 11 or 21.     --XX
8390761         245     c2=1    I+0+8+1%10=R: (I,R:c3,G,c4) in (5,4:1,0,2)--X                                           --XX
6793041         258     c2=1    I+3+6+1%10=R: (I,R:c3,G,c4) in --X                                                      --XX
8397061         245     c2=1    I+7+8+1%10=R: (I,R:c3,G,c4) in --X                                                      --XX
9420581         367     c2=1    I+0+9+1%10=R: --X                                                                       --XX
9640321         578     c2=1    I+0+9+1%10=R: --X                                                                       --XX
8390751         246     c2=1    I+0+8+1%10=R: (I,R:c3,G,c4) in --X                                                      --XX
9425081         367     c2=1    I+5+9+1%10=R: (I,R:c3,G,c4) in --X                                                      --XX
9643021         578     c2=1    I+3+9+1%10=R: (I,R:c3,G,c4) in (5,8:1,5,0)--X                                           --XX
8397051         246     c2=1    I+7+8+1%10=R: (I,R:c3,G,c4) in (6,2:2,2,1)--X                                           --XX
9420571         368     c2=1    I+0+9+1%10=R: --X                                                                       --XX
4750321         689     c2=1    I+0+4+1%10=R: (I,R:c3,G,c4) in --X                                                      --XX
6790321         458     c2=1    I+0+6+1%10=R: (I,R:c3,G,c4) in (8,5:1,8,0)--X                                           --XX
8390741         256     c2=1    I+0+8+1%10=R: (I,R:c3,G,c4) in (6,5:1,6,1)--X                                           --XX
9425071         368     c2=1    I+5+9+1%10=R: (I,R:c3,G,c4) in (3,8:1,5,1)--X (8,3:2,6,1).  2I+N+c4: 21 == 21.          SOLUTION?
(...stopped here, leaving the other 3 sets unchecked)

Here we have a set of all digit values that seems to satisfy all the constraints that got us to this point:

TNMESLAIRG=9425071836

Hopefully there were no errors in any of the preceding work, either in an assumption or in a calculation. Time to see if this solution actually works!

--verify--

ENLIST+SILENT+LISTEN=ANAGRAM ?

547809+087549+780954=1416312 ?

IT DOES!

$\endgroup$
  • $\begingroup$ Can you write a short executive summary on what is the essence of your reasoning? $\endgroup$ – Matsmath Nov 4 '16 at 20:22
  • $\begingroup$ I'm not sure that's possible. This is more or less verbatim the flow I followed in trying to solve this, as I just scribbled down my notes as I focused on digit by digit. Digit 7 was easiest; then I started right to left with digits that summed to A in the answer, and figured out what I knew about each. That led me to the realization that I could list out the possible combinations of digit values that could work, and see how the various rules for each digit would trim that list. Turned out that approach led me to an answer before I had to solve for all possible cases, so I stopped there. $\endgroup$ – Rubio Nov 4 '16 at 20:29
  • $\begingroup$ Heh. On reviewing this, I see that for digit 6, "We don't know what c5 is" isn't entirely true; we know it can't be 0, so that could have been dropped from the table. It didn't matter anyway since the 0 and 2 cases are duplicative. $\endgroup$ – Rubio Nov 4 '16 at 22:09
0
$\begingroup$

Starting Point

A must be < 3 (so 0, 1, or 2) because 999999*3 < 3000000

Also, from the comments by @Marius and @Jamal

E, S, or L must be 0 and the digits are distinct.

Therefore

A must be either 1 or 2.

And from a comment by @Marius

Applying Bedford's Law, A is most likely 1.

$\endgroup$
-5
$\begingroup$

Since my comment was nuked above I am posting here this partial answer:

$547809 + 087549 + 780954 = 1416312$

I used elaborate, multi-page long reasoning, after which I ended up with only roughly 5000 possibilities. Then "it was easy to see", or "it was easy to guess" the answer.

$\endgroup$
  • 1
    $\begingroup$ This is wrong. Not the solution, but your answer. You should always provide reasoning. Answers like "and then magic happened" or "here be dragons" are not the best answers, by far. $\endgroup$ – Marius Oct 5 '16 at 6:53
  • 2
    $\begingroup$ from 5000 possibilities it was easy to guess ? $\endgroup$ – Sikorski Oct 5 '16 at 6:55
  • 4
    $\begingroup$ @Matsmath. I've read them and I still think this is wrong. You did not start with an idea on how to get to the answer. You started with the answer that I bet you found using a software. If you would have started with "Since 0 is allowed as a leading digit, most probably one of the letter $S,L,E$ is $0$. And $A$ can be 1 or 2, but according to Benford's law it is most probably that is 1", then this would have been a good start. $\endgroup$ – Marius Oct 5 '16 at 7:00
  • 1
    $\begingroup$ @Marius, I am afraid the comment section is not for extended discussion. However, I think you have completely misunderstood the question, and what is the real challenge here. The OP, since tagged this question with the no-computers tag, clearly interested in the methodology of finding out the final answer, and not in the final answer itself. Presenting the final answer is a good start to write an elaborate, cumbersome reasoning around it, and provide the OP with the sought-after methodology. Happy puzzling! $\endgroup$ – Matsmath Oct 5 '16 at 7:04
  • 5
    $\begingroup$ Well...comments ARE for discussions. I didn't want to extend this too far. I just offered a reason to why I downvoted this answer. Because that's the moral thing to do. $\endgroup$ – Marius Oct 5 '16 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.