Wednesday, September 10, 2014

2014/082) solve in integer

Alan and Bob have a whole number of dollars. Alan says to Bob, “If you give me  3 dollars, I will have n times as much as you”. Bob saya to Alan, “If you give me n dollars, I will have 3 times as much as you”.

 Let alan have a dollars and Bob b dollars
so we get
$a+3=n*(b-3)$

 $b+n=3*(a-n)$

from 1st we get $a = (nb-3n-3)$
put in 2nd to get
$b+ n = 3(nb-4n-3) = 3nb -12n -9$
or $n=\dfrac{b+9}{3*b-13}$
as $n\gt 0$ , $a\gt 0$,$b\gt0$ we get  $3b\gt13\  or\  b > 4$

$b+ 9\gt3b - 13$ or $22\gt\ 2b$ or $b\lt 11$
now $b+ 9$ should be divisible by $3b - 13$
or $3b + 27$ should be divisible by $3b - 13$


or 40 should be divsible by 3b - 13 or 3b -13 should be( 2 mod 3) so we get factors of 40 (2 mod 3)  2 or 5 or 8 or 20 giving b = 5 or 6 or 7 or 11

putting those 4 values of b we find

a=11, b=5, n=7
a=6, b=6, n=3
a=5, b=7, n=2
a=5,b= 11,n=1 

No comments: