aspose file tools*
The moose likes Programming Diversions and the fly likes Alphametics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "Alphametics" Watch "Alphametics" New topic
Author

Alphametics

Sameer Jamal
Ranch Hand

Joined: Feb 16, 2001
Posts: 1870
if



then

[ September 16, 2005: Message edited by: Sameer Jamal ]
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1010
    
    3
Originally posted by Sameer Jamal:
if

S E N D
M O R E
---------
M O N E Y

then

T H I S
I S A
G R E A T
T I M E
-----------
? ? ? ? ? ?


I assume addition is the operation for both of those.

Solution: Every letter corresponds to 0, so the final answer is 0. That was easy.

Also, while replying, I noticed that you lost some leading spaces clues to HTML formatting. Even if they were important, my solution still works.
Sameer Jamal
Ranch Hand

Joined: Feb 16, 2001
Posts: 1870
ANYONE
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1010
    
    3
Originally posted by Sameer Jamal:
ANYONE


You just haven't given enough information.
  • Am I correct that each letter corresponds to a single digit?
  • Can two different letters correspond to the same digit?
  • Is the spacing important? If it is, then E must equal Y, right? If not, then why not just line up the D, E, and Y?
  • There are eight unique letters in the first part and then the second part adds five more. If the two parts ARE supposed to share letter assignments, then surely multiple letters have to share a digit. If they the letter-digit assignments AREN'T supposed to carry over, then I could assign arbitrary digits to the letters in the second part and come up with quite a few final results.

  • At first I tried to ignore you, now I'm just laughing at you.
    David O'Meara
    Rancher

    Joined: Mar 06, 2001
    Posts: 13459

    Weeeellllll, it looks like the trivial solution is a solution until we're told otherwise.

    At first I tried to ignore you, now I'm just laughing at you.
    No fighting
    Ryan McGuire
    Ranch Hand

    Joined: Feb 18, 2005
    Posts: 1010
        
        3
    Originally posted by David O'Meara:
    Weeeellllll, it looks like the trivial solution is a solution until we're told otherwise.


    Ok, I get it now.

    In the first part, each letter stands for a unique digit. Using the definitions from part 1 figure out what digits to assign to the additional 5 letters (T H I G and A) in part 2 so that addition adds up to an English word.

    Note: The letter-digit assignments in part 2 do NOT have to be unique.

    Note: The final English word might contain letters from part 1.

    If you reread this thread, it shouldn't be too hard to find an answer (all caps, six letters). But you'll need to show your work to get full credit. Also, do any other words work?
    [ September 16, 2005: Message edited by: Ryan McGuire ]
    Sameer Jamal
    Ranch Hand

    Joined: Feb 16, 2001
    Posts: 1870
    Originally posted by Ryan McGuire:


    You just haven't given enough information.
  • Am I correct that each
  • At first I tried to ignore you, now I'm just laughing at you.

    You won I asked the wrong question
    [ September 16, 2005: Message edited by: Sameer Jamal ]
    Sameer Jamal
    Ranch Hand

    Joined: Feb 16, 2001
    Posts: 1870
    It should be like this



    then
    what should


    corresponds to

    Rules

    1. The mapping of letters to numbers is one-to-one. That is, the same letter always stands for the same digit, and the same digit is always represented by the same letter.

    2. The digit zero is not allowed to appear as the left-most digit in any of the addends or the sum.

    3. Spaces have no meaning

    4. Letters represent numbers from 0 to 9
    [ September 16, 2005: Message edited by: Sameer Jamal ]
    Sameer Jamal
    Ranch Hand

    Joined: Feb 16, 2001
    Posts: 1870
    BUMP
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Alphametics