Results 1 to 14 of 14

Math Help - Letter / Number puzzle

  1. #1
    Newbie
    Joined
    Jun 2010
    Posts
    5

    Letter / Number puzzle

    Hi,
    I'm trying to solve this puzzle for a geocaching challenge:

    AB + CD = EF
    AG + CE = FH
    BF - GE = AJ
    A>C
    Numbers to be used are 1 to 9

    Thanks,
    FoxEcho
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor Unknown008's Avatar
    Joined
    May 2010
    From
    Mauritius
    Posts
    1,260
    Just a quick question, does AB mean A times B or a number with digits AB?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2010
    Posts
    5
    AB is a number with digits AB,
    and so on and so forth.

    FE
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie hungthinh92's Avatar
    Joined
    Jun 2010
    From
    Virginia, US
    Posts
    23
    Quote Originally Posted by FoxEcho View Post
    Hi,
    I'm trying to solve this puzzle for a geocaching challenge:

    AB + CD = EF
    AG + CE = FH
    BF - GE = AJ
    A>C
    Numbers to be used are 1 to 9

    Thanks,
    FoxEcho
    Do they need to be different. I mean A≠b≠C
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor Unknown008's Avatar
    Joined
    May 2010
    From
    Mauritius
    Posts
    1,260
    I guess so, if it was not, the question wouldn't use different letters to represent the digits.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie hungthinh92's Avatar
    Joined
    Jun 2010
    From
    Virginia, US
    Posts
    23
    Quote Originally Posted by Unknown008 View Post
    I guess so, if it was not, the question wouldn't use different letters to represent the digits.
    Ommm silly me! I just ate lunch, so my brain starts working again
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jun 2010
    Posts
    5
    Yes, all numbers are different.
    Numbers 1 to 9 are represented by letters A to J
    (the letter I has not been used to avoid confusion with the number 1).
    FE
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    The lazy programmer's solution, in Java:

    Code:
    public class NumPuzz1 {
        public static void main(String[] args) {
            long time=System.currentTimeMillis();
            int a,b,c,d,e,f,g,h,j;
            for(a=2;a<10;a++)
            for(b=1;b<10;b++) if(b!=a)
            for(c=1;c<a;c++)  if(c!=b)
            for(d=1;d<10;d++) if(d!=a && d!=b && d!=c)
            for(e=1;e<10;e++) if(e!=a && e!=b && e!=c && e!=d)
            for(f=1;f<10;f++) if(f!=a && f!=b && f!=c && f!=d && f!=e)
            for(g=1;g<10;g++) if(g!=a && g!=b && g!=c && g!=d && g!=e && g!=f)
            for(h=1;h<10;h++) if(h!=a && h!=b && h!=c && h!=d && h!=e && h!=f && h!=g)
            for(j=1;j<10;j++) if(j!=a && j!=b && j!=c && j!=d && j!=e && j!=f && j!=g && j!=h)
                if(10*a+b + 10*c+d == 10*e+f && 10*a+g + 10*c+e == 10*f+h && 10*b+f - (10*g+e) == 10*a+j)
                    System.out.println(a+","+b+","+c+","+d+","+e+","+f+","+g+","+h+","+j);
            System.out.println("Elapsed: "+((System.currentTimeMillis()-time)/1000.0)+" seconds");
        }
    }
    Output:

    Code:
    3,6,1,8,5,4,2,7,9
    Elapsed: 0.047 seconds
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie hungthinh92's Avatar
    Joined
    Jun 2010
    From
    Virginia, US
    Posts
    23
    Quote Originally Posted by undefined View Post
    The lazy programmer's solution, in Java:

    Code:
    public class NumPuzz1 {
        public static void main(String[] args) {
            long time=System.currentTimeMillis();
            int a,b,c,d,e,f,g,h,j;
            for(a=2;a<10;a++)
            for(b=1;b<10;b++) if(b!=a)
            for(c=1;c<a;c++)  if(c!=b)
            for(d=1;d<10;d++) if(d!=a && d!=b && d!=c)
            for(e=1;e<10;e++) if(e!=a && e!=b && e!=c && e!=d)
            for(f=1;f<10;f++) if(f!=a && f!=b && f!=c && f!=d && f!=e)
            for(g=1;g<10;g++) if(g!=a && g!=b && g!=c && g!=d && g!=e && g!=f)
            for(h=1;h<10;h++) if(h!=a && h!=b && h!=c && h!=d && h!=e && h!=f && h!=g)
            for(j=1;j<10;j++) if(j!=a && j!=b && j!=c && j!=d && j!=e && j!=f && j!=g && j!=h)
                if(10*a+b + 10*c+d == 10*e+f && 10*a+g + 10*c+e == 10*f+h && 10*b+f - (10*g+e) == 10*a+j)
                    System.out.println(a+","+b+","+c+","+d+","+e+","+f+","+g+","+h+","+j);
            System.out.println("Elapsed: "+((System.currentTimeMillis()-time)/1000.0)+" seconds");
        }
    }
    Output:

    Code:
    3,6,1,8,5,4,2,7,9
    Elapsed: 0.047 seconds
    what is A, B, C, D...?
    If A=3 B=6...
    then AB+CD = 99 :| i'm sorry
    You forgot they are different. But still that's nice programming
    Last edited by hungthinh92; June 10th 2010 at 11:22 AM. Reason: my stupidity
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Jun 2010
    Posts
    5
    Wow! Thanks a lot!
    If I have other puzzles like this (which I'm sure I'll have)
    I'll post them here if you don't mind.

    Merci,
    FE
    Follow Math Help Forum on Facebook and Google+

  11. #11
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,119
    Thanks
    68
    Quote Originally Posted by FoxEcho View Post
    I'm trying to solve this puzzle for a geocaching challenge:
    Aren't those competitions, thus illegal for you to get help?
    Follow Math Help Forum on Facebook and Google+

  12. #12
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by hungthinh92 View Post
    what is A, B, C, D...?
    If A=3 B=6...
    then AB+CD = 99 :| i'm sorry
    You forgot they are different. But still that's nice programming
    Yes A=3, B=6, etc. Figured I could omit that since it's the most natural way to list them out.

    AB = 36
    CD = 18

    36 + 18 = 54, not 99...

    Quote Originally Posted by Wilmer View Post
    Aren't those competitions, thus illegal for you to get help?
    That is a good point. I don't know what geocaching is, and thought it's just some puzzle for fun that doesn't really count for anything.
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Super Member Deadstar's Avatar
    Joined
    Oct 2007
    Posts
    722
    I'm trying a non-computing approach.

    Finding an ordering on them is easier. Reduces amount of possibilities.

    Brb not looking at solution
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Newbie
    Joined
    Jun 2010
    Posts
    5
    Like he says, this is just for fun,
    you can have all the help you want,
    or none at all if you don't want any.
    It's each and everyone's call.
    Most of the times, when you're stuck on a puzzle,
    the creator of the puzlle will guide you in the correct path,
    if you ask him (and as the saying goes, it makes the puzzle creator
    feel so much superior... ha ha ha)

    Again,
    thanks for the help!
    FE
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: June 19th 2011, 04:41 PM
  2. essay on the number\letter e help!!!!
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: December 1st 2010, 03:14 AM
  3. Number puzzle...
    Posted in the Number Theory Forum
    Replies: 8
    Last Post: April 9th 2009, 10:24 PM
  4. [SOLVED] [SOLVED] Letter and number substitution problem
    Posted in the Algebra Forum
    Replies: 1
    Last Post: March 7th 2008, 05:07 PM
  5. number puzzle
    Posted in the Algebra Forum
    Replies: 10
    Last Post: September 12th 2006, 06:37 PM

Search Tags


/mathhelpforum @mathhelpforum