+0
Hello people

I'm an English learner from Japan. Today I have questions not about the English language but about arithmetic, which I have found in a homework website for grade four kids. Here are the questions.

Each letter in each question stands for a 1-digit number. In each question, no two letters may stand for the same number. Two separate problems are unrelated. Find a value for each letter. (The sign * means 'multiplied by').
(1) ***=SNORE (Use the numbers: 6, 2, 0, 8, 4, 1, 3, and 9)
(2) ***=BRAND (Use the numbers: 1, 2, 4, 9, 3, 7, 8, and 5)
(3) ***=BULLET (Use the numbers: 1, 8, 6, 0, 5, 9, 2, and 4)

I have got the answers by using an almost try-and-error method. But the method takes really a lot of time:nearly 3 hours for each. Does anyone know the smartest way to solve this kind of alphametic quiz?

paco
Comments  
the brute force "try-and-error" is a good technique because you will always get all of the possible answers. the only down side of this algorithm is that is has O(n^2) time complexity. in fact, no matter what algorithm you use, this problem cannot be solved in better than O(n^2) time.

if someone presented me with this problem, i would immediately implement this algorithm (brute force) with a simple computer program. it's really the simplest systematic way of doing this.

if you used logical heuristics instead, it may be frustrating, because it isn't systematic. after 9 hours, you probably thought of some good ideas. here are some:
look at the first one: (1) ***=SNORE. T must be either 1, 2, or 3. if T is larger than 3, then the answer needs to be 6 digits and instead of 5. if T is 0, then the answer would be less than 5 digits. you can also notice that either E is 0 or Y is 1 (since *** = E in the one's place). this only narrows it down a little, but it does help. you could also try this:
(1) ***=SNORE
(*** + *** + E) * (*** + *** + Y) = *** + *** + *** + *** + E
*** + (***+***)*1000 + (***+***+***)*100 + (***+***)*10 + *** = *** + *** + *** + *** + E
(***-S)*10000 + (***+***-N)*1000 + (***+***+***-O)*100 + (***+***-R)*10 + ***-E = 0
and here is the characteristic equation:
(***-S)*10000 + (***(R+I)-N)*1000 + (***(Y+E)+***-O)*100 + (***+***(E-1))*10 + ***(Y-1) = 0
which may not actually buy you anything, but doing it may help you see something else.

-c
Oh! thank you for your reply. I'm sorry to be too late to find your reply. I never thought anyone would reply. Yes we can solve the problem by computing out simultaneous equations under constraints that variables differs each other and less than 10. But you know these are given as homework for grade four kids! I can't believe it!

The answers I got by the try-error method were as follows. If you made a program please check them.
TIE×TRY=SNORE ? 234×291=68094
CAN×SAY=BRAND ? 138×539=74382
DIE×BEST=BULLET ? 106×2694=285564

Have a nice Sunday

paco
Teachers: We supply a list of EFL job vacancies
Hi Big Chris,

Just for your next quiz:
you can also notice that either E is 0 or Y is 1 (since *** = E in the one's place).


This is not true:

BE * IT = LIE
32 * 16 = 512

Here for the one digit it is also: *** = E but neither E = 0 nor T = 1.

Also are you sure about the O(n^2) ? This would be an excellent algorithm, as it would solve even the hardest possible quiz, that is one that uses all ten digits, in only 100 operations, while a real brute-force algorithm would need 10! = 3628800.

cu
Hey paco,

If your kid gets more homework of this kind use this link (requires Java on your PC):

http://www.geocities.com/CapeCanaveral/Campus/7705/metic/metic.html

Solutions for TIE * TRY = SNORE found this URL:

190 * 182 = 34580
180 * 143 = 25740
290 * 246 = 71340
230 * 279 = 64170
160 * 149 = 23840 +
270 * 239 = 64530
234 * 291 = 68094 +
295 * 217 = 64015

But only those marked (+) use only the allowed digits.

cu
Thank you for that great link. Im helping my neighbor with his homework and we have been working on the same problem for over an hour using guess work. Thanks again
Students: We have free audio pronunciation exercises.
I need help with this problem. MENTAL+HEALTH=MATTERS