Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: A logic problem of numbers

  1. Apr 23, 2008 #1
    1. The problem statement, all variables and given/known data

    given a number of four ciphers ABCD and another four cipher number CDAB get the values of A,B,C,D if we know that 2x (ABCD)=CDAB-5

    2. Relevant equations

    2X (ABCD)=CDAB-5

    3. The attempt at a solution

    no idea.. i have try by brute force but got no results only incongruences , for example B=-3 or similar here '2 x' means multiplication
  2. jcsd
  3. Apr 24, 2008 #2
    You need to be a bit more elegant about this. Split it into powers of ten... for example in the ABCD cipher, the "A" is 100 times more value than the "A"
  4. Apr 24, 2008 #3
    no way , i get weird responses such us A=c=0 and B=-5/3 how are these kind of problems solved in Number theory ?? thanks.
  5. Apr 24, 2008 #4


    User Avatar
    Science Advisor

    Notice that AB and CD always appear together. I would do it this way:

    Let X= AB and Y= CD. Then the equation says 2(100X+ Y)= 100Y+ X- 5. Combining the X and Y terms we get the Diophantine equation
    -199X+ 98Y= 5. Do you know how to solve that? It has an infinite number of integer solutions but only one that gives a two digit positive integer for both X and Y.
  6. Apr 24, 2008 #5


    User Avatar
    Science Advisor
    Homework Helper

    This looks quite similar to this post by the way.
  7. Apr 24, 2008 #6


    User Avatar
    Science Advisor

    Very similar! That's why I deleted that thread.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook