# Calculate the value of X and Y

I have "X" no. of flowers and I am going to a temple. I put the flowers into the temple pond. At that time it doubled. I gave "Y" no. of flowers to that temple. Then I go to another temple and put the remaining flowers into the temple pond and it doubled and I gave "Y" no. of flowers to that temple. Then I go to the next temple and same process repeated. Put the remaining flowers into the temple pond and it doubled and I gave "Y" no. of flowers to that temple. After that I don't have any flowers.

Please give me the value of ""

-
Note that there are many solutions. The smallest is $X=7$, $Y=8$, as mentioned in an answer. But it also could be $X=14$, $Y=16$, r o$X=21$, $Y=24$, and so on. Maybe $X=7000$, $Y=8000$, though that might be a bit hard to carry. –  André Nicolas Feb 8 '13 at 9:43

Its simple

X is 7 and Y is 8..

EDIT: Explanation

When you went to first temple with x flowers and put them into pond you have 2x flowers. When you give y flowers you are left with 2x-y flowers.

When you went to second temple and put flowers in pond you have 2(2x-y) flowers, after giving flowers to temple yo are left with 2(2x-y)-y flowers.

When you went to third temple and put flowers in pond you now have 2(2(2x-y)-y) flowers. Now

2(2(2x-y)-y) = y. Since you are left with no flowers now.

Solving...

8x = 7y.

This is inconsistent system of equations. Any pair of values satisfying the constrain are solution.

In case when x>y, for eg, x=8 and y=7, will not satisfy the problem as number of flowers left will keep on increasing.

In case x"<"y, for eg, x=7 and y=8, will satisfy the problem constrain as number of flowers left will now keep on decreasing.

Hence any pair that satisfy the constrains

8x=7y & x"<"y are the solution to the problem.

-