APPLE + LEMON = BANANA

Each of the letters in the equation above represents one of the digits from 0 to 9. Determine which digit corresponds to each letter. Assume there are no leading zeros. (Although programmed solutions are acceptable, I'm more interested in logical approaches to the answer.)

Source: rec.puzzles. Used as Ken's Puzzle of the Day 5/16/95.


Solutions were received from many people. (Perhaps I should let puzzles last for two weeks more often?) Some of the representative ones are below. The unique solution is: 67794+94832=162626.
>From Philippe Fondanaiche

-B is obviously equal to 1 which is the figure carried over from the equation 
A + L + r = 10 + A where r ( = 0 or 1) is carried over from P + E + r' = 10*r
+ N

-the equation A + L + r = 10 + A triggers L = 9 and r = 1

-as P<9 and E<9 and P + E +r' = 10 + N, then N < E and N < P

-E + N = A. If it is not the case, E + N = 10 + A, then L + O + 1 = O + 10 = N
+ 10 ==> O = N, that is impossible.

-as A<9 and E + N = A, then N<4. So, the 2 possible values of N are N=2 and
N=3
   ¤ if N=2,then O=3
      ¤¤ E=4  ==> A=6. We find the solution:
           APPLE=67794  LEMON=94832    BANANA=162626
      ¤¤ E=5 ==> A=7. Easy to check that there is no solution for P and M
      ¤¤ E=6 ==> A=8. As above,no solution.
   ¤ if N=3,then O=4 and E=5. No solution for P and M

From Larry Baum:

 APPLE
 LEMON
------
BANANA

It is immediately clear that B=1 and L=9.  
Since L=9, there is no carry to the tens column, so 
        1) E+N=A  
        2) N+1=O  
and there must be a carry to the hundreds column.
There is definitely a carry to the ten-thousands column.  

So there are only two cases:

A) no carry to thousands column; then:
        3) 1+P+M=A
        4) P+E=N+10

1) & 3) => P+M=E+N-1
Subtracting 4) => M-E=E-11 or 2E=M+11
Since B=1,L=9 1)=> N is not 0 and E<=6 => M+11 <= 12 => M<=1.  Since
B=1, M must be 0 => 2E=11  oops!

So case B MUST be true:
b) carry to thousands column; then:
        3) 1+P+M=A+10   P+M=A+9
        4) 1+P+E=N+10   P+E=N+9

1) & 3) => P+M=E+N+9
Subtracting 4) => M-E=E or M=2E
So (E,M) can be: (2,4) (3,6) (4,8)
E=2: P=N+7.  Since P<=8, N=0 or 1.  But N=0 => A=E & N=1 => N=B;  either
way: oops!
E=3: P=N+6.  Since P<=8, N=0, 1 or 2.  N can't be 0 or 1 for the same
reasons just mentioned. N=2 => O=3=E oops!

So E=4, M=8: P=N+5.  N=0, 1, 2, or 3.  N=0 or 1 are out for the usual
reasons. 
N=3 => O=4=E (and P=M=8).  So N must be 2 => A=6, O=3, P=7

 67794
 94832
------
162626

is the unique solution.

Mail to Ken