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!

Changing Numbers To Prescribed Values Under Special Limitations

  1. Feb 9, 2013 #1



    Is there any way to turn x into z only using the first two terms, andor a constant, and the operators ' + ', ' - ', ' * ', ' / '.

    I know I can take ((x)-(x mod 10)) + y = z, but this uses a modulus.

    ... Basically the core of the question is can I change any number's last digit and its decimal value to something I decide by only using the number itself and the desired digit and decimal?

    I feel like splitting the numerator and denominator and running independent operations on each might be the way to go.
    Last edited: Feb 9, 2013
  2. jcsd
  3. Feb 9, 2013 #2


    User Avatar
    2017 Award

    Staff: Mentor

    1217x = 2221116
    3y = 23
    As those do not have a common divisor (apart from 1), you can find integers q,r, such that qx+ry=1. That can be written with a long series of "x+x+x+... -y-y-y-..." (or vice versa), of course, so you do not need q and r.
    In the same way, you can get 1820. Add y and you are done.

    ? If you can use the constant z/x, it is easy.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook