All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
The reversed numbers (Posted on 2005-09-16) Difficulty: 2 of 5
Both a and b are four-digit numbers and one is obtained from the other by reversing the digits.

Determine them, knowing that 2 * (a + b) = 5 * (b - 1).

Show your reasoning.

  Submitted by pcbouhid    
Rating: 4.5000 (4 votes)
Solution: (Hide)
We are given that

2 * (a + b) = 5 * (b - 1)

Working with this equation, we have :

3b - 2a = 5........(eq. 1)

From this we can conclude that :

a = 1.5b (approximately, since a and b are 4-digit numbers).....(eq. 2)

If we represent the smaller 4-digit number b by the string pxyq, then the larger 4-digit number a is the string qyxp.

The equation (2) places restrictions on the combinations of first and last digits p and q that our numbers a and b can have.

The following table lists all the possible 4-digit combinations for the numbers a and b based on the restrictions imposed by equation (2) above:

                b      a
              ------------
              1xy2    2yx1
              2xy3    3yx2
              2xy4    4yx2
              3xy4    4yx3
              3xy5    5yx3
              4xy6    6yx4
              4xy7    7yx4
              5xy7    7yx5
              5xy8    8yx5
              6xy9    9yx6
For any of the above possibilities we have, from equation (1) above, the following:

3b - 2a = 5

or

3 * (1000p + 100x + 10y + q) - 2 * (1000q + 100y + 10x + p) = 5
300x + 30y + 3 * (1000p + q) - 200y - 20x - 2 * (1000q + p) = 5

which we can rearrange as

(280x - 170y) + 3000p - 2000q = 2p - 3q + 5......(eq. 3)

The variables p, q, x, and y are all single-digit positive integers, so the left-hand side of this equation is divisible by 10. So, the right-hand side of the equation must therefore also be divisible by 10.

The table above shows all the possible combinations of digits p and q; let's find which of those combinations satisfy the condition that (2p - 3q + 5) is divisible by 10:

              p    q      (2p - 3q + 5)
              ---------------------------
              1    2     2 -  6 + 5 =   1
              2    3     4 -  9 + 5 =   0
              2    4     4 - 12 + 5 =  -3
              3    4     6 - 12 + 5 =  -1
              3    5     6 - 15 + 5 =  -4
              4    6     8 - 18 + 5 =  -5
              4    7     8 - 21 + 5 =  -8
              5    7    10 - 21 + 5 =  -6
              5    8    10 - 24 + 5 =  -9
              6    9    12 - 27 + 5 = -10
So now there are only two possibilities for the digits p and q:

(p,q) = (2,3)

or

(p,q) = (6,9)

Now let's try each of these two possibilities in equation (3) above, remembering that p, q, x, and y are single-digit integers.

(280x - 170y) + 3000p - 2000q = 2p - 3q + 5

For (p,q) = (2,3) we find :

280x - 170y + 6000 - 6000 = 4 - 9 + 5 = 0
280x - 170y = 0
28x - 17y = 0

The only solution in single-digit integers for this equation is (x,y) = (0,0); this gives us one solution to the problem :

p = 2 , q = 3, x = y = 0.

We have :

b = 2003
a = 3002

Checking :

2 * (3002 + 2003) = 5 * (2003 - 1)
2 * 5005 = 5 * 2002
10010 = 10010

For (p,q) = (6,9) we find :

280x - 170y + 18000 - 18000 = 12 - 27 + 5 = - 10
280x - 170y = - 10
28x - 17y = - 1

We now solve this as a diophantine equation with x and y single-digit integers:

17y = 28x + 1
17y = 17x + 11x + 1
y = x + (11x + 1)/17

The expression (11x + 1) must be divisible by 17; trying single-digit integer values for x, we have :

11 * 1 + 1 = 12
11 * 2 + 1 = 23
11 * 3 + 1 = 34

34 is divisible by 17. So we now have :

x = 3
y = 3 + (34/17) = 3 + 2 = 5.

And we find a second solution to the problem:

p = 6, x = 3, y = 5, q = 9.

We have:

b = 6359
a = 9536


Checking:

2 * (9536 + 6359) = 5 * 6358
2 * 15895 = 5 * 6358
31790 = 31790

Thus we have two solutions to the problem:

(a,b) = (3002,2003)

and

(a,b) = (9536,6359)

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle Answer K Sengupta2022-07-22 02:24:31
re: Less brute forcegoFish2005-09-17 10:40:47
More brute forceCharlie2005-09-16 19:38:29
SolutionTwo answersOld Original Oskar!2005-09-16 19:30:53
Solutionre: SolutionLeming2005-09-16 19:28:03
Second Solutionnp_rt2005-09-16 19:28:01
re: SolutionCharlie2005-09-16 19:24:34
SolutionAndre2005-09-16 19:13:05
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (12)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information