I entered a store and spent one-half of the money that was in my wallet. When I came out I found that I had just as many paise as I had rupees and half as many rupees as I had paise when I went in.
How much money did I have with me when I entered the store ?
( Given: 1 Rupee = 100 Paise ).
If you let r and p be the numbers of rupees and paise you started with, and R and P are what you have at the end, then p + 100r is the value (in paise) at the beginning and, similarly, P + 100R is the value you have at the end. The latter is half of the former, so:
p + 100r = 2(P + 100R).
We also know, from the problem, that P=r, and R=p/2.
Substitute and solve:
p + 100r = 2(r + 100(p/2))
p + 100r = 2r + 100p
98r = 99p
There are, of course, infinitely many solutions to that equation, but since (I assume) we are restricted to integers, change it into two parameterized equations. Since 98 and 99 have no common factors, we have:
r = 99i
and
p = 98i,
where i can be any whole number (including 0). Actually, any integer, from a mathematical view, but we can't really have negative currency. You can have no currency, however, and half of nothing is still nothing. So, the simplest solution is that "I" entered and left the store with nothing in my pockets at all.
Don't like that? Say i=1, and I entered with 99 rupees and 98 paise (for a value of 9998 paise) and left with 49 rupees and 99 paise (for a value of 4999 paise, indeed half of 9998). All other solutions are integer multiples of these figures. As an aside, I don't see where the values are limited to 0≤I≤100. Anyway, parameterized equations make it really simple to find all the solutions.
|
Posted by DJ
on 2003-03-20 10:17:20 |