suppose he s left wit two black bean at d end n though he picks those two black beans he has to put one back n tat uld b putting d black one in so he s left wit black bean at d end ..........
though ya answer has a point it leaves d end wit one loophole tat is at d end ya shld specify tat if he s done picking everything he wont drop anything back ........
while dropping into the pile or picking up from the pile it is just the white bean ,,,i dont know how one bean can be less every time..bcoz only black is moved in and out of the pot every time ..and so only white bean can be inside the pot ..can any one explain me the logic ...yak
I think the problem should state clear WHERE the white beans are discarded. Ofc if you read carefully, and use the fact that each time there is 1 less bean in the pot, you figure out that the 2 white beans are discarded OUTSIDE the pot. On the other hand, it depends how you read the statement which says "each time there is 1 less bean in the pot", cause some (judging by the comments above) dont realise that if you remain only with white beans in the pot the procedure would become an infinite loop and contradicts the statement that at each "1 less bean in the pot" statement.
It's easy when you disregard useless info. The exact number of beans is irrelevant, as is the large pile of beans. Whether beans are “discarded” or “placed in the bean-pile”, they are OUT of the pot. Whether they are dropped back in or taken from the pile, they are being put IN the pot. Ultimately it is the Change in the bean-count in the pot that is important…
Each turn, 2 beans are OUT and 1 bean is IN. There are 3 possible scenarios for each turn:
Pulled OUT Back IN NET CHANGE
-2w +1b (from pile) -2w +1b
-2b +1b (returned) -1b
-1b -1w +1w (returned) -1b
So, white beans only ever decrease by 2. Since the original white count was odd, the white bean-count will always be odd, eventually leaving only 1 white bean.
Black beans will only ever change by 1, either decreasing (when at least one black bean is pulled from pot), or increasing (from the pile, when 2 whites are pulled).
No matter what combination of beans are pulled through numerous turns, eventually the pot is left with 1 white bean and 1 black bean. These are pulled out, the black is OUT and the white is returned alone.
basically u can never be left wif 2 white beans at the end because the only time white beans are taken out is when you take 2 white beans, therefore 1 white bean will be left behind.
another way of explaining is :
there are odd number of beans, and each time 2 white beans are taken out.so the scenario can also be 1 white bean and X number of black beans and the answer will be the same
though ya answer has a point it leaves d end wit one loophole tat is at d end ya shld specify tat if he s done picking everything he wont drop anything back ........
Each turn, 2 beans are OUT and 1 bean is IN. There are 3 possible scenarios for each turn:
Pulled OUT Back IN NET CHANGE
-2w +1b (from pile) -2w +1b
-2b +1b (returned) -1b
-1b -1w +1w (returned) -1b
So, white beans only ever decrease by 2. Since the original white count was odd, the white bean-count will always be odd, eventually leaving only 1 white bean.
Black beans will only ever change by 1, either decreasing (when at least one black bean is pulled from pot), or increasing (from the pile, when 2 whites are pulled).
No matter what combination of beans are pulled through numerous turns, eventually the pot is left with 1 white bean and 1 black bean. These are pulled out, the black is OUT and the white is returned alone.
Pulled OUT ... Back IN ........... NET CHANGE
-2w .......... +1b (from pile) ... -2w +1b
-2b .......... +1b (returned) .... -1b
-1b -1w ...... +1w (returned) .... -1b
another way of explaining is :
there are odd number of beans, and each time 2 white beans are taken out.so the scenario can also be 1 white bean and X number of black beans and the answer will be the same