Pill splitting

his week’s Riddler classic is about splitting pills to get the right dose.

I’ve been prescribed to take 1.5 pills of a certain medication every day for 10 days, so I have a bottle with 15 pills. Each morning, I take two pills out of the bottle at random.

On the first morning, these are guaranteed to be two full pills. I consume one of them, split the other in half using a precision blade, consume half of that second pill, and place the remaining half back into the bottle.

On subsequent mornings when I take out two pills, there are three possibilities:

  • I get two full pills. As on the first morning, I split one and place the unused half back into the bottle.
  • I get one full pill and one half-pill, both of which I consume.
  • I get two half-pills. In this case, I take out another pill at random. If it’s a half-pill, then I consume all three halves. But if it’s a full pill, I split it and place the unused half back in the bottle.

Assume that each pill — whether it is a full pill or a half-pill — is equally likely to be taken out of the bottle.

On the 10th day, I again take out two pills and consume them. In a rush, I immediately throw the bottle in the trash before bothering to check whether I had just consumed full pills or half-pills. What’s the probability that I took the full dosage, meaning I don’t have to dig through the trash for a remaining half-pill?

My solution:
[Show Solution]

7 thoughts on “Pill splitting”

  1. Interesting. Thank you for this.
    With respect to why the probability of ending up with all half-pills increases with the number of starting pills: I don’t have a rigorously mathematical explanation, but my sense is that you’re more likely to end up with a lot of half-pills if you ‘start’ with a lot of half pills. In the Riddler scenario, you start 10 days out with 15 whole pills, and 0 half-pills. If, instead, you started 12 days out with 18 whole pills, then when you got to 10 days out (the Riddler starting point), you’d be pretty likely to have one or two half-pills in the jar, rather than all whole pills, and therefore (I think) you’d be slightly more likely to finish with all half pills on the last day.
    Again, I haven’t crunched any number on this, it’s just my intuition.

  2. Nice solution! I also solved the problem using Mathematica, but using a different technique, and I reproduced your results. I was able to do an exact calculation using 7500 pills and the probability of ending up with a whole pill plus a half pill was 43.1446%. I tired applying Wynn’s epsilon method, for whatever that’s worth (probably not much here), and got a probability for an infinite number of pills of 28.5%. Relying entirely on intuition, I suspect the probability goes very slowly to zero as the number of pills goes to infinity.

  3. Bravo, Laurent! I’ve played around quite a bit with the question of whether the probability of a full pill and a half pill converges to something as the number of starting pills increases. I haven’t been able to rigorously answer the question, but I do suspect it doesn’t converge and instead very slowly goes to zero. I don’t have any good intuition as to why.

    1. But I should add that Joe’s suggestion makes perfect sense to me. Increasing the number of starting pills means there will be more half-pills around later, which increases likelihood of all half-pills at the end.

  4. Let W be the number of whole pills, H the number of half pills, and T=W+H the total. Let w=W/T. Consider the situation W>>1 and H>>1. The expectation value for the one-day change in W is then ΔW = -2w^2 – (1-w^2-(1-w)^3). Call the right-hand side f(w), and assume we can replace w by its expectation value. We also have Δ(2W+H)=Δ(W+T)=-3 exactly. Manipulating all this eventually yields g(w)Δw = ΔT/T, where g=(3-f)/(f-w(3-f)). Treating this as a differential equation and integrating from a start of w=1, T=T0 to an end of w=wf, T=1, we find (for very large T0) that wf = 3/[ln(T0) + c], where c=3+π/√3. This doesn’t seem to fit the numbers very well, and of course falls apart at least at the beginning (where H is not large) and end (where neither W nor H is large), and maybe in the middle if treating the expectation value as exact is misleading. But I still feel like it captures the essence of what’s happening.

    1. I was mistakenly identifying wf (the expectation value) with pf (the probability). Since the final state is either W=H=1, w=1/2, with probability pf, or W=0,H=3,w=0, with probability 1-pf, we have wf = (1/2)pf + (0)(1-pf) = pf/2. Correcting this factor of two makes the numbers work much better (in particular Emily Boyajian @Emily8191 found pf=0.31 for T0=10^6). So my claim is that pf ~ 6/log(T0) in the limit of large T0.

  5. Nice solution. This is definitely more efficient than banging out the probabilities in excel…

    I figure that the reason for the probability of the 1W1H state becoming less likely for larger initial populations ultimately comes down to this:

    You’ll never put a whole pill back into the bottle, so the only way to reach the 1W1H state on day n is to avoid drawing a specific whole pill for the entire (n-1) days beforehand.

Leave a Reply

Your email address will not be published. Required fields are marked *