Misplaced Pages

Pill puzzle

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Math puzzle
This article is an orphan, as no other articles link to it. Please introduce links to this page from related articles; try the Find link tool for suggestions. (November 2015)
This article relies largely or entirely on a single source. Relevant discussion may be found on the talk page. Please help improve this article by introducing citations to additional sources.
Find sources: "Pill puzzle" – news · newspapers · books · scholar · JSTOR (October 2015)

The pill jar puzzle is a probability puzzle, which asks the expected value of the number of half-pills remaining when the last whole pill is popped from a jar initially containing n whole pills and the way to proceed is by removing a pill from the bottle at random. If the pill removed is a whole pill, it is broken into two half pills. One half pill is consumed and the other one is returned to the jar. If the pill removed is a half pill, then it is simply consumed and nothing is returned to the jar.

Mathematical derivation

The problem becomes very easy to solve once a binary variable Xk defined as Xk = 1, if the kth half pill remains inside the jar after all the whole pills are removed. The kth half pill is defined as the result of the breaking of the kth whole pill being removed from the jar. Xk = 1 if out of the n − k + 1 pills (n − k whole pills + kth half pill), the one half pill is removed at the very end. This occurs with probability 1/(n − k + 1).

The expected value is then given by, E(X1) + E(X2) + ... + E(Xn). Since E(Xk) = P(Xk = 1) = 1/(n − k + 1), the sought expected value is 1/n + 1/(n − 1) + 1/(n − 2) + ... + 1 = Hn (the nth harmonic number).

References

  1. Velleman, Daniel (April 2014). "Drug Induced Random Walk". American Mathematical Monthly. doi:10.4169/amer.math.monthly.121.04.299.
Categories: