9. Bags in the Shed. A truck delivered 4 bags of cement. They are stacked in the truck bed. The worker can carry one bag at a time from the truck to the gate, or from the gate to the shed. The worker can carry the bags in any order, each time taking the top bag, carrying it where needed, and placing it on top of the stack (if there are already bags). If there is a choice to carry a bag from the truck or from the gate, the worker chooses each option with a probability of 0.5. In the end, all the bags end up in the shed.

a) (for 7th grade, 1 point). What is the probability that the bags will end up in the shed in the reverse order compared to how they were stacked in the truck?

b) (for 7th grade, 1 point). What is the probability that the bag that was second from the bottom in the truck will end up at the bottom in the shed?
Solution. a) This is possible only if the worker each time carries a bag from the machine to the gate and immediately takes it to the shed. The probability of this is $(1 / 2)^{3}=1 / 8$.

b) This will happen only if the worker first brings three bags in a row to the gate (the probability of this is $(1 / 2)^{2}=1 / 4$), and then carries a bag from the gate to the shed (the probability of this is $1 / 2$). Therefore, the probability of such an event is $1 / 4 \cdot 1 / 2=1 / 8$.

Answer: a) $1 / 8 ;$ b) $1 / 8$.