aspose file tools*
The moose likes Programming Diversions and the fly likes solve it - simple mathematics! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "solve it - simple mathematics!" Watch "solve it - simple mathematics!" New topic
Author

solve it - simple mathematics!

Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
A person was about to die, and before dying he wrote his Will which went as
follows ...

"I have 17 Camels, and I have three sons. Divide my Camels in such a way,
that My eldest son gets half of them, the second one gets 1/3rd of the
total and my youngest son gets 1/9th of the total number of Camels"

How will you divide, so that every son get the right number of camels which father wrote in will?

Bye,
Viki.


Count the flowers of your garden, NOT the leafs which falls away!
Prepare IBM Exam 340 by joining http://groups.yahoo.com/group/IBM340Exam/
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
1st son: 17 * 1/2 = 8.500 ==> round up ==> 9
2nd son: 17 * 1/3 = 5.667 ==> round up ==> 6
3rd son: 17 * 1/9 = 1.889 ==> round up ==> 2

Checking: 9 + 6 + 2 = 17

The fathers will has been satisifed because all sons received the proper fraction (plus a little more.)
Shyju Lakshman
Greenhorn

Joined: Aug 02, 2005
Posts: 4
Actually i have one camel which i shall add to the total . now there are 17+1 = 18 camels.

1st son ==> 18/2 = 9 camels
2nd son ==> 18/3 = 6 camels
3rd son ==> 18/9 = 2 camels

9+6+2= 17 camels.. one camel is left which is mine.. so i am happy, and the father is happy and the sons are happy


Cheers,<br />Shyju Lakshman
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1011
    
    3
According to the problem statement, that's an invalid solution. The will specifically says, "Divide up my camels in such a way that my eldest son gets half of them..." Adding your camel to the original 17 is going against the father's request.

Besides, the father may have realized that he has allocated only 17/18 of his 17 camels and wants the remaining 17/18 of a camel to be used to pay the executor of his estate (you). Mmmm... a half ton of camel jerky.
[ August 07, 2006: Message edited by: Ryan McGuire ]
Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Originally posted by Shyju Lakshman:
Actually i have one camel which i shall add to the total . now there are 17+1 = 18 camels.

1st son ==> 18/2 = 9 camels
2nd son ==> 18/3 = 6 camels
3rd son ==> 18/9 = 2 camels

9+6+2= 17 camels.. one camel is left which is mine.. so i am happy, and the father is happy and the sons are happy


100%
 
Don't get me started about those stupid light bulbs.
 
subject: solve it - simple mathematics!