Jack and Jones are brothers and they both sell apples for living. Jack sells 2 apples for 1 Rs and Jones sells 3 apples for 1 Rs. They each have 30 apples. Hence, Jack earns 15 Rs a day while Jones earns 10 Rs a day. This gives a total of 25 Rs.
One day Jack got sick and couldn't sell his apples. He gave his apples to Jones. Jones sold all 60 apples at price of 5 apples for 2 Rs (as 3 apples for 1 Rs + 2 apples for 1 Rs). At the end of the day, he counted the money and ended with a total of 24 Rs.
Where has Jones lost 1 Rs?
Answer
TL,DR: It is all about operator precedence
We have the following unit price for Jack apples: 1/2.
We have the following unit price for Jones apples: 1/3.
Thus making the calculation of the total amount collected: 1/2×30+1/3×30=15+10=25
With the combined sale, we have the following unit price: 2/5
Thus making the calculation of the total amount collected: 2/5×60=24
So far so good.
When we are comparing unit price of a single apple now.
The problem occurs because of operator precedence, (1/2+1/3)/2=5/12≠2/5.
No comments:
Post a Comment