• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

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 ?
0
shilpi84
Asked:
shilpi84
  • 4
  • 2
1 Solution
 
Infinity08Commented:
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
 
Infinity08Commented:
So, for every value of a >= 14, there's a solution :

a = a
b = (5 * a) - 40
x = (3 * a) - 20
0
 
David_WardCommented:
>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
Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

 
Infinity08Commented:
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
 
David_WardCommented:
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
 
Infinity08Commented:
Should have been more clear :

x : number of marbles each start with
a : number of marbles A ends with
b : number of marbles B ends with
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

On-Demand: Securing Your Wi-Fi for Summer Travel

Traveling this summer?Check out our on-demand webinar to learn about the importance of Wi-Fi security and 3 easy measures you can start taking immediately to protect your private data while using public Wi-Fi. Follow us today to learn more!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now