# Timeout for a Martin Gardner puzzle

With my 10 year-old VN student today we took a break from Physics and Chemistry (vector diagrams with billiard balls was a bit too heavy and the webwhiteboard app was pretty awful) to look at one of Martin Gardner's simpler problems:
G O O D
+ T I M E
________
M A T H S

The ten letters each being different letters.
Care to try your hand at it? Note that D and E are interchangeable but we don't care.
What is the number represented by MATHS? Can you find more than one solution?

No takers huh? It's not easy because only two digits appear twice, O and M. There are in fact four solutions, and of course a Python sledge hammer would get you there quickly.
Let's get the ball rolling:
There can be four carries C1 (right), C2, C3, C4 (left)
M is obviously 1, C4=1 and G+T+C3 >=10
D+E may generate C1 (0 or 1)
O+M+C1 may generate C2 (0 or 1)
O+I+C2 may generate C3 (0 or 1)
G+T+C3 >=10 so C4 =1 and M = 1
All ten digits are present and all are different.
D,E,G,T,M,O are all non-zero.
(If O is zero C1=1, else H=M and C2=0 so that I=T - O is also not 0)
There was a hint in one article: O=3 but I'd prefer to find it myself.
One way to solve is to make a table and eliminate where possible
0 1 2 3 4 5 6 7 8 9
A _ X _ X _ _ _ _ X X
D X X X _ _ _ _ _ _
E X X X _ _ _ _ _ _
G X X X X _ _ _ _ _ _
H _ X X _ _ _ _ _ _
I _ X X _ _ _ _ _ _
M X Y X X X X X X X X
O X X X Y X X X X X X
S _ X _ X _ _ _ _ _ _
T X X _ X _ _ _ _ _ _
C1 _ _
C2 _ _
C3 _ _
C4 X Y
Note that:
D+E=S+10*C1
O+M+C1=H+10*C2
O+I+C2=A+10*C3
G+T=A+10
A<G, A<T, A<=7 ==> G,T > 3
I don't have python skills (at least not in that sense); but other maths blogs are good....

We see G and T are interchangeable, so we can arbitrarily choose G < T
Likewise for D and E, so choose D < E
That guarantees at least four solutions if there is one.
This is one that does not need a computer, but perseverance and deduction and elimination
Whoops G and T cannot be switched because T occurs twice, just D and E
It seems clear O can be 8 or 4, not just 3
A quickie python tells me
1 5884 6719 12603
1 5889 6714 12603
2 7336 2918 10254
2 7338 2916 10254
3 7443 2816 10259
3 7446 2813 10259
But an article claims also 16750 - ah found it, G could be 9 after all!
4 9332 7418 16750
4 9338 7412 16750
But the idea was to do this mentally

Meet the Author of this Blog
online today!

## FargoFan

sydney, New South Wales, Australia

Retired but teaching and studying every day, travelling whenever I can and at home wherever I happen to be. From a small family but wishing I were part of a larger one. My students are scattered all over the world, as is my family. Language is a part [read more]