# Thread: Long division with letters problem

1. ## Long division with letters problem

Hi,

I have found a long division problem and I am getting stuck with the solution, to be honest i dont even know where to start!!

(The . above the X is not for recurring numbers, it is just there so the top line of the division sits correctly)

The question is: solve the following long division, each letter represents a unique digit (0-9)

Code:
.      B
XZD)BUMG
APZK
ABU

2. I don't quite get you.

3. Originally Posted by MysticGenius
Code:
.      B
XZD)BUMG
APZK
ABU
You should notice stuff like B > 1 , B = A + 1, B * XYD > 999, ...

HINT: XZD = 934

4. Originally Posted by Wilmer
You should notice stuff like B > 1 , B = A + 1, B * XYD > 999, ...

HINT: XZD = 934
Thanks very much for this but i still do not follow how you got XZD=934..

MG

5. Trial and error, after establishing some reasonable ranges...

Only 2 equations given:
B(100X + 10Z + D) = 1000A + 100P + 10Z + K

1000B + 100U + 10M + G - (1000A + 100P + 10Z + K) = 100A + 10B + U

With 10 variables, you'd need 10 equations to "solve"; so some guesswork required.

These are known as "alphametic puzzles". Use google to see examples.

6. Originally Posted by Wilmer
Trial and error, after establishing some reasonable ranges...

Only 2 equations given:
B(100X + 10Z + D) = 1000A + 100P + 10Z + K

1000B + 100U + 10M + G - (1000A + 100P + 10Z + K) = 100A + 10B + U

With 10 variables, you'd need 10 equations to "solve"; so some guesswork required.

These are known as "alphametic puzzles". Use google to see examples.
Hi,

thanks for that, I have looked through google and there is no real explanation on this just a load of solutions to common puzzles.

based on the assumption you have solved this and have showed what XZD is, please can you show me how you got that?

thanks

7. I wrote a looper program.

Full solution: 7210 / 934 = 7 remainder 672

8. Originally Posted by Wilmer
I wrote a looper program.

Full solution: 7210 / 934 = 7 remainder 672

i was actually hoping for the workings, as I actually want to know how to do this - Can someone show me how to do this by hand?

Thanks

9. Changed your lettering to a to j:
Code:
       a
====
bcd)aefg
hicj
====
hae
My program (simplified):
Loop 10 variables a to j from 0 to 9 keeping the variables distinct
Keep a > 1, h = a-1, b > 0

u = 100*b + 10*c + d
v = 1000*a + 100*e + 10*f + g
w = 1000*h + 100*i + 10*c + j
x = 100*h + 10*a + e

If w = a * u and x = v - w then print a,u,v,w,x

Result: 7, 934, 7210, 6538, 672

I don't think anybody can show how to do this completely by hand,
as it's a bit like teaching how to dig a hole
But you never know: perhaps someone can...but won't be me!

10. Originally Posted by Wilmer
Changed your lettering to a to j:
Code:
       a
====
bcd)aefg
hicj
====
hae
My program (simplified):
Loop 10 variables a to j from 0 to 9 keeping the variables distinct
Keep a > 1, h = a-1, b > 0

u = 100*b + 10*c + d
v = 1000*a + 100*e + 10*f + g
w = 1000*h + 100*i + 10*c + j
x = 100*h + 10*a + e

If w = a * u and x = v - w then print a,u,v,w,x

Result: 7, 934, 7210, 6538, 672

I don't think anybody can show how to do this completely by hand,
as it's a bit like teaching how to dig a hole
But you never know: perhaps someone can...but won't be me!
Thanks so much...can i ask what software you used? was it matlab?

MG

11. I use UBasic, and do the programming myself; here tizz:

FOR a = 2 TO 9
FOR b = 1 TO 9 : IF b = a THEN NEXT b
FOR c = 0 TO 9 : IF c = a OR c = b THEN NEXT c
FOR d = 0 TO 9 : IF d = a OR d = b OR d = c THEN NEXT d
u = b*100 + c*10 + d
FOR e = 0 TO 9 : IF e=a OR e=b OR e=c OR e=d THEN NEXT e
FOR f = 0 TO 9 : IF f=a OR f=b OR f=c OR f=d OR f=e THEN NEXT f
FOR g = 0 TO 9 : IF g=a OR g=b OR g=c OR g=d OR g=e OR g=f THEN NEXT g
h = a-1 : IF h=b OR h=c OR h=d OR h=e OR h=f OR h=g THEN NEXT g
v = a*1000 + e*100 + f*10 + g
x = h*100 + a*10 + e
FOR i=0 to 9: IF i=a OR i=b OR i=c OR i=d OR i=e OR i=f OR i=g OR i=h THEN NEXT i
FOR j=1 to 9: IF j=a OR j=b OR j=c OR j=d OR j=e OR j=f OR j=g OR j=h OR j=i THEN NEXT j
w = h*1000 + i*100 + c*10 + j
IF w = a*u AND x = v - w THEN PRINT a,u,v,w,x
ENDLOOPS

Hope that helps.

,

,

,

,

,

,

,

,

,

,

# long division with letters

Click on a term to search for related topics.