You are on your way to your friend's house. You decide to carry 2 apples to your friend. To get to their house, you must pass across 8 gates. At each gate, the keeper will take half the amount of apples you have and return one apple back. The question is, how many apples should you carry at the beginning?
This is because
Each gatekeeper will take one apple (half of two) and return one to you, meaning you keep the same number of apples through each gate.
I am not sure if it's this easy. But here's a try.
You need to carry only 2 Apples. At each gate, the keeper will take half the amount i.e. 1 apple and will return it. At the end, you are still left with 2 apples.
Let’s work backwards: (2 apples - 1) * 2 = 2. Therefore, you only need to bring 2 apples.
You could only bring one apple, and walk through the gates and back. Then you should have around 1.8 apples. Then leave the .8 and repeat for infinite apples! :P