Hard Math Problem: Who Can Do it?

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

downhiller80

Platinum Member
Apr 13, 2000
2,353
0
0
If I can see how to do it I'll solve it with my head, like I would have for this.

Sometimes it's very satisfying to be able to write a program in 5 minutes that solves it in 10 seconds!

I wish I'd caught this thread at the satrt :(

Seb
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
We can still try to find the real way ;) to figure this out then! Maybe there is some linear algebra involved
 

GL

Diamond Member
Oct 9, 1999
4,547
0
0
I'm working on a solution, but this is what I have so far:
I'm using a -> instead of a => to avoid confusion with the <= statement.

From the right hand side of the addition problem...
Y + 5E = Y -> E = 0

From the left hand side we have...
6T <= N but T > E = 0 so at the very minimum T = 1 and N >= 6 so N is one of {6,7,8,9}. Even if N = 9, it is obvious that T = 1 for 6(1) < 9 but 6(2) > 9.
So T = 1

Back to the right hand side, second column from the right...
T + 5V mod 10 = T -> 5V mod 10 = 0 so V is one of {2,4,6,8}.

Now, let us take note that (R + 5L) + [(T + 5V - T)/ 10) = X1 and X1 mod 10 = 0. Simplified, this is (R + 5L) + (5V / 10) = X1 and X1 mod 10 = 0.

...I'm tired...off to bed but somebody else can takeover from here. I'm sure there's a better way than my method.

-GL
 

beat mania

Platinum Member
Jan 23, 2000
2,451
0
76
I've got it! ... sort of...
If you want to follow the solution, I suggest listing it as E = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, T = 0,1, ... etc
and cross out numbers as you go along. It'll help.

Start these equations:
1) Y+5E=Y+10a
2) a+T+5V=T+10b
3) b+R+5L=E+10c
4) c+I+5E=N+10d
5) d+H+5W=I+10e
6) e+6T=N

the lower case letters are carries

7) from 1) 5E=a10 => E=2a
8) from 2) E + 10V = 20b
since 20b is multiple of 10 and 10V is multiple of 10, E = 0. V cannot = 0 because then E = 0 also, which cannot be true.
then a = 0 from (7)
since E = 0, in eqn (6), T != 0, so T = 1 since N <= 9.
so that means N = 6,7,8,or 9, and e = 0,1,2, or 3

9) V = 2b from eqn (8)
from eqn (2), the max b can be is 5, since max of a + T + 5V < 60
10) table:
b = 0, V = 0 <== impossible, E = 0 already, b != 0
b = 1, V = 2
b = 2, V = 4
b = 3, V = 6
b = 4, V = 8
b = 5, V = 10 <== impossible, b != 5
so b = 1,2,3,or 4 and V = 2,4,6,or 8
11) at eqn(3), b+R+5L = 10c < 60 for the same reason as listed at (9)
c != 0 because b!= 0. max of c is 5. so c can equal 1 to 5.
12) from eqn(4), c+I=N+10d. c != 0, so max < 20. which means d = 0 or 1
13) make a table of c, N, I, d using eqns in (11) and (12), and you will find out that under all possibilities of 20 different combinations, d = 0 always.
also you will find out that I never = 9.
14) use this knowledge in eqn (5), H + 5W = I + e10.
W = 2,3,4,5,6,or 7 since e < 4. in fact, max of I + e10 = 38.
if W = 2,4,6, then H = I, which cannot be true. so W = 3,5,or7
when W = 3,5,or 7, then e cannot be 0. therefore, N != 6 in eqn (6).
15) you can look at eqn (14) as H+5 = I mod 10. since I != 0,1,9, to satisify this eqn, H != 4,5,and 6
at this point, you should have H = 2,3,7,8, or 9. As H+5 = I mod 10, the corresponding I to each H is 7,8,2,3,4. These are the possible I's.
16) from eqn(3), b + R + 5L = c10
since L != 0, c != 0.
if L = 2,4,6,or 8, then you can look at this eqn as b + R = 10
then do a list of tables as in (13)
L = 2
b = 1, V = 2, R = 9 <== L = V, bad
b = 2, V = 4, R = 8
b = 3, V = 6, R = 7
b = 4, V = 8, R = 6
L = 4
b = 1, V = 2, R = 9
b = 2, V = 4, R = 8 <== L = V, bad
b = 3, V = 6, R = 7
b = 4, V = 8, R = 6
L = 6
b = 1, V = 2, R = 9
b = 2, V = 4, R = 8
b = 3, V = 6, R = 7 <== L = V, bad
b = 4, V = 8, R = 6 <== L = R, bad
L = 8
b = 1, V = 2, R = 9
b = 2, V = 4, R = 8
b = 3, V = 6, R = 7
b = 4, V = 8, R = 6 <== L = V, bad

for L = 2, c = 2,
L = 4, c = 3
L = 6, c = 4
L = 8, c = 5.
remember, 1 <= b <= 4, so this is as far as it goes.

there are some invalid combos such as L =2, b = 1, V = 2, R = 9, etc,.

if L = 3,5,7,or 9, then (b + R + 5) mod 10 = 0.
then
L = 3
b = 1, V = 2, R = 4
b = 2, V = 4, R = 3
b = 3, V = 6, R = 2
b = 4, V = 8, R = 1 <=== remember that T = 1? so this is no good.
L = 5
b = 1, V = 2, R = 4
b = 2, V = 4, R = 3
b = 3, V = 6, R = 2
b = 4, V = 8, R = 1 <=== remember that T = 1? so this is no good.
L = 7
b = 1, V = 2, R = 4
b = 2, V = 4, R = 3
b = 3, V = 6, R = 2
b = 4, V = 8, R = 1 <=== remember that T = 1? so this is no good.
L = 9
b = 1, V = 2, R = 4
b = 2, V = 4, R = 3
b = 3, V = 6, R = 2
b = 4, V = 8, R = 1 <=== remember that T = 1? so this is no good.

for L = 3, c = 2
L = 5, c = 3
L = 7, c = 4
L = 9, c = 5

notice R never = 5 and c never = 1.

there are only 2 valid cases of b = 4 : L = 2, R = 6, b = 4, V = 8, c = 2 &amp; L = 4, R = 6, b = 4, V = 8, c = 3.
Since there are only 2, I manually tried these 2 cases, and they don't work. Conclusion: b != 4.
there are 7 valid cases of b = 2, and I tried these manually too, and they don't work also. b != 2.
(I didn't want to do this too but I was stuck)
following this new revelation, if you made up a table, you'll see that R != 3, 6, and 8. so R = 2,4,7,or 9.

17) at this time, only L, V, and Y can be 6.
since Y is the left over number, as it works with any number, I decided to leave it. (this is a pretty big assumption) so its only L and V.
with my &quot;trusty&quot; table, see that there is only one valid case of L = 6: R = 9, b = 1, V = 2, c = 4.
solving for more variables, I found that it doesn't work! so V = 6, L != 6.
V = 2b, b = 3.

18) eqn (3): 3 + R + 5L = c10
then letter left to find are for 2,3,5,7,8,9
only 2 and 7 for R would work for the above equation.

19) if you've been checking numbers off, only I and L can be 4 (excluding Y). 2 possible cases of L = 4 in the table --- they don't work.
so I = 4.
20) rewrite eqn (4) and (6) c + 4 = N, e + 6 = N ==> c = e + 2.
since e = 1,2,or 3 and c = 2,3,4,or 5, that means c != 2.
actually, here at this point, there only 7 valid cases for the L-R-b-V-c combinations.

the correct one is L = 7, R = 2, b = 3, V =6, c = 4

plug back in, and do some easy algebra,and you get br0wn's answers.
E = 0, T = 1, I = 4, N = 8, W = 3, H = 9, Y = 5, V = 6, R = 2, L = 7,
plus the carries: a = 0, b = 3, c = 4, d = 0, e = 2.


Conclusion:
basically after about 10 minutes I didn't feel like trying to do more derivation and look for super subtle equations, and had to resort to looking for numbers that are easy to eliminate. Probably verified about 15 sets of numbers to find the right one. at least it was better than 8! sets of numbers :p
once at 16), you can basically just try all 23 possible sets and see which one is right. which is probably what I would've needed to do if it turns out that Y = 6 (my assumption was that Y != 6)
This took me an hour to do. and another 1/2 hour to write :p