1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A money puzzle

  1. Nov 30, 2016 #1
    1. The problem statement, all variables and given/known data
    I am trying to solve the following puzzle. The problem is that there are two unknowns and I could come up with only one equation.

    A man went into a bank to cash a check. In handing over the money the cashier, by mistake, gave him dollars for cents and cents for dollars. He pocketed the money without examining it, and spent a nickel ( 5 cents) on his way home. He then found that he possessed exactly twice the amount of the check. He had no money in his pocket before going to the bank. What was the exact amount of that check?

    2. Relevant equations
    Let x - number of dollars and y - number of cents
    check amount - ## 100x + y ##
    paid amount - ##100y + x ##
    amount left after spending a nickel - ## 100y + x - 5 ##

    So the first equation we get is:
    ## 100y + x - 5 = 2 (100x + y) ##

    After solving it, we get
    ## y = \frac { 199x + 5 } { 98} ##

    3. The attempt at a solution
    As there is not enough info for another equation, I tried the trial and error approach. To get a whole number the numerator has to be a multiple of 98. To have an even number in the numerator, x has to be an odd number.

    I tried using a few values of x but didn't get an answer. I am not sure if I am headed in the right direction. Is there a better way of doing this?

    Thanks.
     
  2. jcsd
  3. Nov 30, 2016 #2

    jedishrfu

    Staff: Mentor

    Have you tried to plot it and remember that both x and y must be integers?
     
  4. Nov 30, 2016 #3

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You also have ## x = \frac{98 y - 5}{199}##.
     
    Last edited: Nov 30, 2016
  5. Nov 30, 2016 #4
    I tried plotting the equation using Winplot but it is hard to locate a pair that satisfies the equation.
     
  6. Nov 30, 2016 #5

    PeroK

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    ##199## is a prime number. Does that help?
     
  7. Nov 30, 2016 #6

    jedishrfu

    Staff: Mentor

    This is a linear diophantine equation because the x and y must be integers and they are related in a linear way.

    https://en.wikipedia.org/wiki/Diophantine_equation

    I did find a solution using a MATLAB clone (freemat.org) and you'll need to try solutions of x from 5 to 99 to find the corresponding y which can be done via google in the search bar. The MATLAB approach was faster because of its builtin vector calculating.

    I'm not sure of any other way to solve it.
     
  8. Nov 30, 2016 #7

    PeroK

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The fact that 199 is prime helps! But, I'm not sure how much for a pre-calc question.
     
  9. Nov 30, 2016 #8

    jedishrfu

    Staff: Mentor

    This may be overkill for this problem but then again what is life for if not for learning new things:

    https://en.wikipedia.org/wiki/Kuṭṭaka

     
  10. Nov 30, 2016 #9

    PeroK

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    There is an elementary solution. Hint: consider the two cases where ##y < 50## and ##y \ge 50##.

    Your equations are correct, but if you start again, there's a quicker way with this approach.

    PS to keep things simple, assume he did have a nickel in change. I.e. ##x \ge 5##.
     
  11. Dec 24, 2016 #10

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You can also quickly brute force it with Excel.
     
  12. Dec 25, 2016 #11

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    If you rewrite that as ## y = 2x + \frac { 3x + 5 } { 98} ##, isn't a solution obvious?
     
  13. Dec 25, 2016 #12
    Oh...got it. Thanks.

    $31.63.
     
  14. Dec 25, 2016 #13
    Jedishfru,

    The solution (31, 63) doesn't seem to follow that GCD rule. Am I missing something?
     
  15. Dec 30, 2016 #14

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Applying the GCD rule to the equation you ended up with in post #1, it says the gcd of 199 and 98 must be a factor of 5. Since 199 and 98 are coprime, the gcd is 1, so it is trivially true and not useful here.
    Likewise, applying it to the answer, 31 and 63 are coprime, so, again, it just says 1 divides 5.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: A money puzzle
  1. Numerical puzzle (Replies: 5)

  2. Factoring puzzle (Replies: 5)

  3. Yes/No logic puzzle (Replies: 2)

Loading...