PDA

View Full Version : long division


nypuzzle
Jul1-09, 03:07 AM
Hi guys,
Can you help me with this problem, please?

:confused:


...........H
.....______
EJS)HWNR
........CFJL
.....______
........CHW


where each letter is unique digit from 0 to 9

thank you!

davee123
Jul1-09, 05:21 PM
That was a pretty tricky one. Not too many clues that I could divine from the puzzle itself, so I had to completely brute-force the answer using a computer program. Were there any additional hints provided with the problem?

The other strange thing about it seems to be that the letters are pretty random. Typically, you'd have the letters A-J, or have them spell out words, like:

............I
....._____
ANT)ISLE
......HONK
......-----
........HIS

Or even spell out a word if arranged in ascending or descending order. But in this case, it seems they were just random-- as though there ought to be more to the puzzle.

DaveE

nypuzzle
Jul1-09, 05:44 PM
hey davee123

there was nothing more

how did you write code for that, I want to try on my own

thanks

davee123
Jul1-09, 05:54 PM
how did you write code for that, I want to try on my own

I wrote a quick Perl script that went through all the possible combinations of 0-9. Effectively, it assigned a digit to each letter (my variable names were simply the letter names), and tested to see if that particular combination worked. Probably took less than 5 minutes or so to write the program, and maybe 20-30 seconds to run it.

I'd be interested to know if anyone here is able to use non-brute force on this problem. Otherwise, it's more like a programming challenge rather than a brain teaser or math problem.

DaveE

nypuzzle
Jul2-09, 04:06 AM
...........H
.....______
EJS)HWNR
........CFJL
.....______
........CHW


ok, I have it!

...........7
....._____
934)7210
......6538
....._____
........672

but how can I get not by brute force..?