Determine b if (a+b)/5 = (b-1)/2Date: 07/25/2003 at 01:09:20 From: M.Vijay Kumar Subject: Number Theory Both a and b are 4 four-digit numbers, a>b, and one is obtained from the other by reversing the digits. Determine b if (a+b)/5 = (b-1)/2. Date: 07/26/2003 at 11:23:11 From: Doctor Greenie Subject: Re: Number Theory Many thanks for sending us this problem - I got a lot of good mental exercise on it. Please note that a much more elegant solution may be possible; this is simply the method I came up with that works. We are given that (a+b)/5 = (b-1)/2 Working with this equation, we have 2(a+b) = 5(b-1) 2a+2b = 5b-5 or (1) 3b-2a = 5 From this we can conclude that (2) a = 1.5b (approximately) If we represent the smaller 4-digit number (b) by the string pxyq, then the larger 4-digit number (a) is the string qyxp. This 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, representing the first and last digits of the number b by p and q, respectively, we have, from (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 (3) (280x-170y)+3000p-2000q = 2p-3q+5 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. 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 the solution to the problem p=2, q=3, x=y=0. Checking this solution, we have b = 2003 a = 3002 (a+b)/5 = 5005/5 = 1001 (b-1)/2 = 2002/2 = 1001 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 have a second solution to the problem: p=6, x=3, y=5, q=9. Checking our answer.... b = 6359 a = 9536 (a+b)/5 = 15895/5 = 3179 (b-1)/2 =6358/2 = 3179 So finally we have two solutions to the problem: (a,b) = (3002,2003) and (a,b) = (9536,6359) I hope you can follow all of this. Please write back if you have any further questions about any of the work I have done. And thanks again for a great problem! - Doctor Greenie, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2015 The Math Forum
http://mathforum.org/dr.math/