[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# Marbles

Posted on 2006-04-24
Medium Priority
396 Views
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 ?
0
Question by:shilpi84
• 4
• 2

LVL 53

Accepted Solution

Infinity08 earned 2000 total points
ID: 16524452
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

...
0

LVL 53

Expert Comment

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

a = a
b = (5 * a) - 40
x = (3 * a) - 20
0

LVL 4

Expert Comment

ID: 16524872
>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.
0

LVL 53

Expert Comment

ID: 16525011
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.
0

LVL 4

Expert Comment

ID: 16525069
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.

0

LVL 53

Expert Comment

ID: 16525253
Should have been more clear :

a : number of marbles A ends with
b : number of marbles B ends with
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will be showing you how to subnet the easiest way possible for IPv4 (Internet Protocol version 4). This article does not cover IPv6. Keep in mind that subnetting requires lots of practice and time.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
###### Suggested Courses
Course of the Month20 days, left to enroll