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

x
?
Solved

Marbles

Posted on 2006-04-24
6
Medium Priority
?
396 Views
Last Modified: 2006-11-18
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
Comment
Question by:shilpi84
  • 4
  • 2
6 Comments
 
LVL 53

Accepted Solution

by:
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

by:Infinity08
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

by:David_Ward
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
A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

 
LVL 53

Expert Comment

by:Infinity08
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

by:David_Ward
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

by:Infinity08
ID: 16525253
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

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

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

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question