Marbles

Two marble sellers A and B plan to play a marble game. Initially they have the same no. of marbles
in the stock, before starting the game. Now the game starts.
A wins 20 marbles in the first run and loses (2/3)rd of the stock in the play-off. What was the no. of marbles
with each of them, before they started the game ?
Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
a = (x + 20) * (1/3)
b = (x - 20) + (x + 20) * (2/3)

(3 * a) - 20 = x
((3 * b) + 20) / 5 = x

(3 * a) - 20 = ((3 * b) + 20) / 5
b = ((((3 * a) - 20) * 5) - 20) / 3
b = (5 * a) - 40

x has to be at least 20 (a has to be at least 14), or A couldn't have been able to win 20 from B in the first round.

Multiple solutions :

if x = 22 :
a = 14
b = 30

if x = 25 :
a = 15
b = 35

...

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
So, for every value of a >= 14, there's a solution :

a = a
b = (5 * a) - 40
x = (3 * a) - 20
Commented:
>Initially they have the same no. of marbles in the stock, before starting the game.

>What was the no. of marbles with each of them, before they started the game ?

a=b
2a=a+b
2b=a+b

(a+20) / 3

b-20+(a+20)*2/3

The Marble sellers A and B both started the game with 21 marbles each.
Commented:
21 won't work, as (a+20) / 3 is not an integer value then ! The minimum correct value is 22 as i showed in my first post.
Commented:
damn!

Not thinking straight, in fact (Infinity08) I missed the point of your answer, I would not have posted here at all, if I had read yours properly.

Commented:
Should have been more clear :