Showing posts with label top. Show all posts
Showing posts with label top. Show all posts

Wednesday, March 12, 2014

Very Hard Maths Logic Question

There is a jar in which there are two types of candies – 20 blueberry and 16 strawberry. You perform the following steps:
1) You take out two candies.
2) If the two candies are of same flavor, you add a blueberry one otherwise, you add the strawberry one.
You repeat these two steps till there is just one candy remaining in the jar. Which flavored candy will be left?
Also, if you began with 100 blueberry candies and 93 strawberry candies, which flavor would have been the last one to remain ?



Answer:
Let us suppose that there are x blueberry candies and y strawberry candies. While removing the candies, there can be three possibilities:
1) 2 blueberry candies. In this case, you will replace one blueberry candy and so the jar will have x+1 blueberry and y-2 strawberry candies.
2) 2 strawberry candies. In this case, you will replace 1 blueberry candy and so the jar will have x-1 blueberry candies and y strawberry candies.
3) 1 blueberry and 1 strawberry. In this case, you will replace a strawberry candy and so the jar will have x-1 blueberry candies and y strawberry candies.

In this way at each step, we are either removing a blueberry candy or replacing 2 strawberry candies by 1 blueberry candy irreversibly till there is only one candy left. Thus each strawberry candy is equivalent to 2 blueberry candies.

Therefore, if there are odd number of strawberry candies, the last candy will be strawberry and if there are even number of strawberry candies, the last one will be a blueberry one.




Maths Problem

There has been a house on fire. The fireman is now standing in the middle rung of the ladder and trying to extinguish the fire. He climbs 6 rungs more but the heat and deadly flames make him climb down 10 rungs. When the fire is settling gradually, he climbs 18 rungs and reaches the top of the ladder for better access to the house.
Calculate the number of rungs in the ladder ?



Maths Problem




Answer:

29 rungs
Suppose he is standing on m at first which is the middle rung.
He climbs 6 rungs which makes his position to be m+6.
He climbs down ten rungs which makes his position to be (m+6-10) = m-4
He climbs 18 rungs to reach the top t which makes his position (m-4+18) = m+14
Now, m+14 = t
Which means there are 14 rungs above the middle rung and 14 rungs below the middle rung. Counting the middle rung as well, it makes a total of 29 rungs