permaculture playing cards*
The moose likes Programming Diversions and the fly likes juice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "juice" Watch "juice" New topic
Author

juice

ravinder thirumala
Greenhorn

Joined: May 20, 2004
Posts: 6
I have one orange glass containing orange juice and another
white glass containing apple juice. I take 50 ml of orange juice and mix it
with apple juice in the white glass. Then I take 50 ml of this
mixture and transfer it back to the orange glass. If you compare amount of apple juice in the orange glass and amount of orange juice in the white glass which is more than the other and by how much ?
ChanSan Mehbubani
Ranch Hand

Joined: Dec 30, 2003
Posts: 108
Same to same Ditto
[ May 21, 2004: Message edited by: Tanga Palti ]

I am a Papad
Ashok Mash
Ranch Hand

Joined: Oct 13, 2000
Posts: 1936
My first guess is, the Orange glass will have more Orange juice than in the other glass!

Okay, real answer, I think (don�t have the maths ready yet) is that the amount of apple juice in the Orange glass will be more than the amount of Orange juice in the other glass. Is that right?


[ flickr ]
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Equal.


- Varun
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Answer : Equal
Math : Assume each glass has 100ml of juice.
1.Initial state
Orange = 100
Apple = 100

2. Pour 50ml orange into apple.
Orange = 50
Apple = 100 + 50 with apple : orange::2:1.

3. Pour 50ml of resultant mixture in step 2 into orange.
so new Apple = 100 - a - o
where a = apple contribution = 2/3 * 50
o = orange contribution = 1/3 * 50
=> remaining orange in apple is 2/3 * 50.

new Orange = 50 + a + o (a and o as above)
=> apple in orange is 2/3 * 50.


Regards.
[ May 21, 2004: Message edited by: shankar vembu ]
C Chavan
Greenhorn

Joined: Mar 19, 2004
Posts: 27
you will have more orange juice in apple glass than apple juice in orange glass.
when you poured 50ml of orange juice in apple glass, it was whole 50 ml of orange juice.
when you poured 50ml of apple+orange mix in orange glass, there is less possibility that 50ml of apple juice will be poured in orange glass.


SCJP, SCWCD, SCBCD, SCEA
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Originally posted by C Chavan:
you will have more orange juice in apple glass than apple juice in orange glass.
when you poured 50ml of orange juice in apple glass, it was whole 50 ml of orange juice.
when you poured 50ml of apple+orange mix in orange glass, there is less possibility that 50ml of apple juice will be poured in orange glass.


I understand your argument. But what you are doing is calculating the orange in apple after the FIRST transfer. And then calculating the apple in orange after the SECOND transfer. But what needs to be done is calculate the orange in apple and vice versa after BOTH the transfers. In which case, they will be the same as explained in my earlier post.
Regards.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
If there is apple missing from the apple glass where did it go? To the orange glass. Where did the orange go to make room for the apple? To the apple glass.

If you transfer unlike amounts one glass will be filled higher than the other and you moved the same measure each way so that can't be true.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: juice